/* Prohibition Hemp Co. storefront. Tokens, type, controls and shared chrome.
   Grounds (shared brief, docs/round3-brief.md "Grounds"): Ink first, Evergreen as the brand field, photography
   where a section can carry it, Ivory only as a material (label panels, selected options, reading sheets). */
@font-face { font-family: "Archivo"; src: url("../fonts/Archivo-var.ttf") format("truetype"); font-weight: 100 900; font-stretch: 62% 125%; font-display: swap; }
@font-face { font-family: "Bitter"; src: url("../fonts/Bitter-var.ttf") format("truetype"); font-weight: 100 900; font-display: swap; }

:root {
  /* Identity colours (round3/identity/palette.json) */
  --ivory: #F2EBDD; --ink: #191B17; --evergreen: #243E32; --copper: #A76543; --gold: #C29A3E;
  --gold-text: #D0B26E; /* Field Gold 70% over Ivory, palette.json tint */ --evergreen-deep: #1C3228; --ink-raised: #22241F; --ink-70: #5A5952; --ink-15: #D1CCBF;
  /* Roles (measured contrast in design/design-tokens.md) */
  --bg: var(--ink); --fg: var(--ivory); --muted: #BDB8AB; --line: rgba(242, 235, 221, .16); --line-strong: rgba(242, 235, 221, .34);
  --control-line: #8C897F; --field: var(--evergreen); --field-eng: #31503F;
  --error: #E8907E; --ok: #A9CDA0; --focus: #9CC8E8;
  /* Type */
  --f-display: "Archivo", "Arial Narrow", "Roboto Condensed", sans-serif;
  --f-text: "Bitter", "Rockwell", Georgia, serif;
  --label-track: .16em;
  /* Layout */
  --max: 1320px; --gutter: 60px; --gap: 24px; --section: 120px; --header-h: 72px; --notice-h: 0px;
  /* Motion (design/motion-sheet.md) */
  --ease-out: cubic-bezier(.2, .7, .1, 1); --t-fast: 180ms; --t-mid: 320ms; --t-enter: 640ms;
}
@media (max-width: 900px) { :root { --gutter: 32px; --section: 96px; } }
@media (max-width: 600px) { :root { --gutter: 20px; --gap: 12px; --section: 72px; --header-h: 60px; } }

/* A paper surface: Ivory as a material, with the pack's ink */
.paper { --bg: var(--ivory); --fg: var(--ink); --muted: var(--ink-70); --line: rgba(25, 27, 23, .18); --line-strong: rgba(25, 27, 23, .4); --control-line: var(--ink-70); --error: #9B2C1C; --ok: var(--evergreen); --focus: #1F5F8B; background: var(--bg); color: var(--fg); }
.ever { --bg: var(--evergreen); --muted: #C9C6B9; --line: rgba(242, 235, 221, .2); background: var(--bg); color: var(--fg); }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 16px); background: var(--ink); }
body { margin: 0; background: var(--bg); color: var(--fg); font: 400 18px/1.56 var(--f-text); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; overflow-x: clip; }
@media (min-width: 1100px) { body { font-size: 19px; line-height: 1.53; } .label { font-size: 14px; } }
@media (max-width: 600px) { body { font-size: 17px; line-height: 1.53; } }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, h4 { margin: 0; font-weight: inherit; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
.skip:focus { position: fixed !important; left: 12px; top: 12px; width: auto; height: auto; clip: auto; z-index: 100; background: var(--ivory); color: var(--ink); padding: 12px 18px; font-family: var(--f-display); font-weight: 600; }
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.wrap { width: min(100% - 2 * var(--gutter), var(--max)); margin-inline: auto; }

/* --- Type roles. Condensed caps speak; Bitter explains and heads the quieter sections. --- */
.display { font-family: var(--f-display); font-weight: 800; font-stretch: 62%; text-transform: uppercase; line-height: .9; letter-spacing: 0; }
.h-1 { font-size: clamp(44px, 6.1vw, 88px); }
.h-2 { font-size: clamp(36px, 3.9vw, 56px); }
.h-3 { font-size: clamp(26px, 2.2vw, 32px); line-height: .95; }
.serif-head { font: 600 clamp(32px, 3.3vw, 48px)/1.1 var(--f-text); letter-spacing: -.01em; }
.label { font-family: var(--f-display); font-weight: 600; font-stretch: 100%; font-size: 13px; line-height: 1.3; letter-spacing: var(--label-track); text-transform: uppercase; }
.label-lg { font-size: 13px; }
.kicker { color: var(--gold-text); }
.paper .kicker { color: var(--ink); }
.lede { font-size: 20px; line-height: 1.5; max-width: 34em; }
@media (max-width: 600px) { .lede { font-size: 18px; } }
.muted { color: var(--muted); }
.strike { position: relative; display: inline-block; }
.strike s { text-decoration: none; }
.strike::after { content: ""; position: absolute; left: -4%; right: -4%; top: 47%; height: .085em; border-bottom: .028em solid; border-top: .085em solid; box-sizing: content-box; transform: translateY(-50%); color: var(--strike, var(--gold)); }

/* --- Controls --- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 12px; min-height: 52px; padding: 0 28px; border: 1.5px solid var(--fg); background: var(--fg); color: var(--bg); font-family: var(--f-display); font-weight: 600; font-size: 13px; letter-spacing: var(--label-track); text-transform: uppercase; text-decoration: none; border-radius: 0; transition: background var(--t-fast), color var(--t-fast); }
.btn:hover { background: transparent; color: var(--fg); }
.btn:active { transform: translateY(1px); }
.btn[disabled] { background: transparent; border-color: var(--control-line); color: var(--muted); cursor: not-allowed; }
.btn-ghost { background: transparent; color: var(--fg); }
.btn-ghost:hover { background: var(--fg); color: var(--bg); }
.btn-block { width: 100%; }
svg.arrow { width: 18px; height: 10px; flex: none; }
.menu-list svg.arrow { width: 28px; height: 16px; color: var(--gold); }
.link { font-family: var(--f-display); font-weight: 600; font-size: 13px; letter-spacing: var(--label-track); text-transform: uppercase; text-decoration: none; display: inline-flex; align-items: center; gap: 10px; border-bottom: 1.5px solid currentColor; padding: 12px 0 6px; line-height: 1; }
.link:hover { color: var(--gold); }
.paper .link:hover { color: var(--evergreen); }
.icon-btn { width: 44px; height: 44px; display: inline-grid; place-items: center; background: none; border: 0; padding: 0; position: relative; color: inherit; }
.icon-btn svg { width: 22px; height: 22px; }
.icon-btn:hover { color: var(--gold); }
.input { min-height: 52px; width: 100%; padding: 0 16px; background: var(--ink-raised); border: 1.5px solid var(--control-line); border-radius: 0; font-size: 17px; color: var(--fg); }
.paper .input { background: #F7F2E8; }
.ever .input { background: var(--evergreen-deep); }
.input::placeholder { color: var(--muted); opacity: .85; }
.input:focus { border-color: var(--fg); }
.input[aria-invalid="true"] { border-color: var(--error); }
.error-text { color: var(--error); font-size: 15px; }

.crumbs { display: flex; gap: 10px; color: var(--muted); margin-bottom: 18px; }
.crumbs a { text-decoration: none; padding: 13px 0; margin: -13px 0; } .crumbs a:hover { text-decoration: underline; }
@media (max-width: 600px) { .pdp-page .crumbs > :nth-last-child(-n+2) { display: none; } }

/* --- Header --- */
.site-header { position: sticky; top: 0; z-index: 30; background: var(--ink); color: var(--ivory); border-bottom: 1px solid var(--line); }
.site-header.is-scrolled { box-shadow: 0 10px 30px -20px rgba(0, 0, 0, .9); }
.header-row { height: var(--header-h); display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 24px; }
.brand { display: inline-flex; align-items: center; min-height: 44px; }
.brand img { height: 36px; width: auto; }
.nav-main { display: flex; gap: 40px; }
.nav-main a { font-family: var(--f-display); font-weight: 600; font-size: 13px; letter-spacing: var(--label-track); text-transform: uppercase; text-decoration: none; padding: 14px 0; position: relative; }
.nav-main a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 8px; height: 1.5px; background: var(--gold); transform: scaleX(0); transform-origin: left; transition: transform var(--t-mid) var(--ease-out); }
.nav-main a:hover::after, .nav-main a[aria-current="page"]::after { transform: scaleX(1); }
.header-tools { display: flex; justify-content: flex-end; align-items: center; gap: 4px; }
.cart-count { position: absolute; top: 4px; right: 1px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 9px; background: var(--gold); color: var(--ink); font: 700 11px/18px var(--f-display); text-align: center; }
.cart-count[hidden] { display: none; }
.menu-btn { display: none; }
@media (max-width: 900px) {
  .header-row { grid-template-columns: auto 1fr auto; gap: 8px; }
  .nav-main { display: none; }
  .menu-btn { display: inline-grid; margin-left: -12px; }
  .brand { justify-self: center; }
  .brand img { height: 28px; }
  .header-tools { margin-right: -10px; gap: 0; }
}

/* --- Dialog sheets: menu, search, cart, filters --- */
dialog.sheet:not([open]) { display: none; }
dialog.sheet { margin: 0; padding: 0; border: 0; max-width: none; max-height: none; background: var(--ink); color: var(--ivory); }
dialog.sheet::backdrop { background: rgba(10, 11, 9, .62); }
.sheet-right { inset: 0 0 0 auto; width: min(460px, 100vw); height: 100dvh; display: flex; flex-direction: column; border-left: 1px solid var(--line); }
.sheet-left { inset: 0 auto 0 0; width: min(420px, 100vw); height: 100dvh; display: flex; flex-direction: column; }
dialog.sheet.sheet-top { inset: 0 0 auto 0; width: 100vw; max-height: 100dvh; overflow-y: auto; overscroll-behavior: contain; border-bottom: 1px solid var(--line); }
dialog.sheet[open].sheet-right { animation: in-right var(--t-mid) var(--ease-out); }
dialog.sheet[open].sheet-left { animation: in-left var(--t-mid) var(--ease-out); }
dialog.sheet[open].sheet-top { animation: in-top var(--t-mid) var(--ease-out); }
@keyframes in-right { from { transform: translateX(40px); opacity: 0; } }
@keyframes in-left { from { transform: translateX(-40px); opacity: 0; } }
@keyframes in-top { from { transform: translateY(-24px); opacity: 0; } }
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 68px; padding: 0 12px 0 24px; border-bottom: 1px solid var(--line); }
.sheet-body { flex: 1; overflow: auto; padding: 24px; overscroll-behavior: contain; }
.sheet-foot { border-top: 1px solid var(--line); padding: 20px 24px calc(20px + env(safe-area-inset-bottom)); display: grid; gap: 14px; }
.menu-list { display: grid; border-top: 1px solid var(--line); }
.menu-list a { display: flex; justify-content: space-between; align-items: center; min-height: 72px; border-bottom: 1px solid var(--line); text-decoration: none; font-family: var(--f-display); font-weight: 800; font-stretch: 62%; text-transform: uppercase; font-size: 44px; line-height: 1; }
.menu-list a[aria-current="page"] { color: var(--gold); }
.menu-sub { margin-top: 28px; display: grid; gap: 4px; }
.menu-sub a { min-height: 44px; display: flex; align-items: center; text-decoration: none; }
.search-box { position: relative; }
.search-box .input { padding-right: 96px; font-size: 20px; min-height: 60px; }
.search-clear { position: absolute; right: 8px; top: 8px; min-height: 44px; padding: 0 12px; background: none; border: 0; }
.search-status { min-height: 24px; margin: 16px 0 8px; }
.search-results { display: grid; }
.search-results a { display: grid; grid-template-columns: 64px 1fr auto; gap: 16px; align-items: center; padding: 10px 8px; text-decoration: none; border-bottom: 1px solid var(--line); }
.search-results a:hover, .search-results a:focus-visible { background: var(--ink-raised); }
.search-results .thumb { width: 64px; height: 80px; background: var(--field); overflow: hidden; }
.search-results .thumb img { width: 100%; height: 100%; object-fit: cover; }
.search-results mark { background: rgba(194, 154, 62, .4); color: inherit; }
.search-empty { padding: 24px 0; display: grid; gap: 14px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { min-height: 44px; padding: 0 16px; border: 1.5px solid var(--control-line); background: transparent; display: inline-flex; align-items: center; gap: 8px; font-family: var(--f-display); font-weight: 600; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; text-decoration: none; }
.chip:hover { border-color: var(--fg); }
/* Cart */
.cart-line { display: grid; grid-template-columns: 88px 1fr; gap: 16px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.cart-line .thumb { background: var(--field); aspect-ratio: 3 / 4; overflow: hidden; }
.cart-line .thumb img { width: 100%; height: 100%; object-fit: cover; }
.cart-line h3 { font: 600 17px/1.3 var(--f-text); }
.cart-line .row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 12px; margin-top: 12px; }
.cart-line .card-price { white-space: nowrap; }
@media (max-width: 360px) { .cart-line { grid-template-columns: 64px 1fr; gap: 12px; } .sheet-body { padding: 16px; } }
.qty { display: inline-grid; grid-template-columns: 44px 44px 44px; align-items: center; border: 1.5px solid var(--control-line); height: 44px; }
.qty button { height: 42px; background: none; border: 0; font-size: 20px; line-height: 1; }
.qty button:disabled { color: #5E5B53; cursor: not-allowed; }
.qty output { text-align: center; font-family: var(--f-display); font-weight: 600; font-size: 15px; }
.text-btn { background: none; border: 0; padding: 0; min-height: 44px; text-decoration: underline; text-underline-offset: 3px; color: var(--muted); font-size: 15px; }
.text-btn:hover { color: var(--fg); }
.subtotal { display: flex; justify-content: space-between; align-items: baseline; }
.subtotal strong { font-family: var(--f-display); font-weight: 800; font-stretch: 62%; font-size: 30px; }
.cart-empty { text-align: center; padding: 48px 8px; display: grid; gap: 18px; justify-items: center; }
.handoff { padding: 22px; display: grid; gap: 10px; border: 1px solid var(--copper); }
.toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); transform: translate(-50%, 20px); background: var(--ivory); color: var(--ink); padding: 14px 20px; opacity: 0; pointer-events: none; transition: opacity var(--t-mid), transform var(--t-mid) var(--ease-out); z-index: 60; font-size: 15px; max-width: calc(100vw - 32px); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
dialog .toast { top: 84px; bottom: auto; }
body.buybar-on .toast { bottom: calc(92px + env(safe-area-inset-bottom)); }
input[type=search]::-webkit-search-cancel-button { -webkit-appearance: none; display: none; }

/* Engravings as alpha masks, coloured in CSS */
.eng { display: block; background: currentColor; -webkit-mask: var(--src) center / contain no-repeat; mask: var(--src) center / contain no-repeat; }
.eng-sheaf { --src: url("../img/eng-sheaf.png"); }
.eng-seedling { --src: url("../img/eng-seedling.png"); }
.eng-seed { --src: url("../img/eng-seed.png"); }
.eng-leaf { --src: url("../img/eng-leaf.png"); }
.eng-seal { --src: url("../img/eng-seal.png"); }
/* The pack's copper double rule (thick 3 : thin 1) */
.double-rule { height: 6px; border-top: 3px solid var(--copper); border-bottom: 1px solid var(--copper); }
.ticket-no { display: inline-grid; place-items: center; min-width: 88px; height: 44px; padding: 0 18px; position: relative; font-family: var(--f-display); font-weight: 800; font-stretch: 62%; font-size: 25px; line-height: 1; color: var(--gold); }
.ticket-no::before { content: ""; position: absolute; inset: 0; border: 1.5px solid currentColor; opacity: .7; }

/* --- Footer --- */
.site-footer { background: var(--ink); color: var(--ivory); padding: 0 0 calc(32px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); }
.footer-grid { display: grid; grid-template-columns: 1.3fr repeat(4, 1fr); gap: var(--gap); padding: 64px 0 56px; border-bottom: 1px solid var(--line); }
.footer-brand img { width: 180px; }
.footer-brand p { margin-top: 20px; color: var(--muted); font-size: 15px; max-width: 22em; }
.footer-col h3 { color: var(--gold-text); margin-bottom: 14px; }
.footer-col a { display: flex; align-items: center; min-height: 40px; text-decoration: none; font-size: 16px; }
.footer-col a:hover { color: var(--gold); text-decoration: underline; text-underline-offset: 4px; }
.footer-legal { display: grid; grid-template-columns: 2fr 1fr; gap: var(--gap); padding-top: 28px; font-size: 14px; line-height: 1.55; color: var(--muted); }
.footer-legal .meta { text-align: right; }
.footer-col details summary { list-style: none; }
.footer-col details summary::-webkit-details-marker { display: none; }
@media (min-width: 901px) { .footer-col summary { pointer-events: none; } .footer-col .chev { display: none; } }
@media (max-width: 900px) {
  .footer-grid { grid-template-columns: 1fr; gap: 0; padding-top: 48px; }
  .footer-brand { padding-bottom: 32px; }
  .footer-col { border-top: 1px solid var(--line); }
  .footer-col summary { display: flex; justify-content: space-between; align-items: center; min-height: 56px; cursor: pointer; }
  .footer-col summary h3 { margin: 0; }
  .footer-col details[open] .chev { transform: rotate(180deg); }
  .footer-col .links { padding-bottom: 16px; }
  .footer-legal { grid-template-columns: 1fr; }
  .footer-legal .meta { text-align: left; }
}

/* --- Review mode (?review in the URL): outlines sample and unverified data for internal review only --- */
body.review [data-review] { outline: 1.5px dashed #FF6B5A; outline-offset: 2px; position: relative; }
body.review [data-review]::before { content: attr(data-review); position: absolute; z-index: 5; top: -10px; left: 6px; background: #B3261E; color: #fff; font: 600 10px/1.6 var(--f-display); letter-spacing: .08em; text-transform: uppercase; padding: 0 6px; white-space: nowrap; pointer-events: none; }

/* Motion: entrances only after content is ready */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity var(--t-enter) var(--ease-out), transform var(--t-enter) var(--ease-out); transition-delay: var(--d, 0ms); }
.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important; scroll-behavior: auto !important; }
  .js .reveal { opacity: 1; transform: none; }
}
