/* Brindle Roasted — website template (pager lab draft)
   ---------------------------------------------------------------------------
   BRAND SETTINGS
   Everything a buyer normally changes lives in this block. Colours are used
   by name below; the 3D scene reads --t-ground-dark and the nut colours too.
   --------------------------------------------------------------------------- */
:root {
  --t-ground: #e9ede5;        /* light page ground (pale sage grey) */
  --t-ground-2: #dfe4dc;      /* panels on the light ground */
  --t-ground-dark: #0f3a2c;   /* the story and roast sections */
  --t-ground-dark-2: #0b2e23;
  --t-ink: #10231b;           /* all text on light grounds */
  --t-ink-soft: #3b4f46;      /* secondary text on light grounds */
  --t-on-dark: #eef2ea;       /* text on dark grounds */
  --t-on-dark-soft: #a9bdb1;
  --t-line: #c4cdc2;
  --t-line-dark: #28544534;
  --t-accent: #f5b800;        /* the one action colour */
  --t-on-accent: #10231b;

  /* roasted nut colours, read by the scene */
  --t-nut-1: #c08a4a;
  --t-nut-2: #9e6230;
  --t-nut-3: #6f4322;

  --t-display: 'Anton', 'Impact', 'Arial Narrow', sans-serif;
  --t-body: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --t-mono: 'Space Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;

  --radius: 14px;
  --gutter: clamp(16px, 4vw, 72px);
  --section: clamp(96px, 12vw, 168px);
}

/* Fonts (SIL Open Font License, licence files in /fonts) */
@font-face { font-family: 'Anton'; src: url('../fonts/anton-latin-400-normal.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Inter'; src: url('../fonts/inter-latin-wght-normal.woff2') format('woff2'); font-weight: 100 900; font-display: swap; }
@font-face { font-family: 'Space Mono'; src: url('../fonts/space-mono-latin-400-normal.woff2') format('woff2'); font-weight: 400; font-display: swap; }

/* ---- base ---------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { background: var(--t-ground-dark); color: var(--t-ink); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--t-body);
  font-size: 17px;
  line-height: 1.5;
  background: var(--t-ground);
  overflow-x: clip;
}
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3, p, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }
:focus-visible { outline: 2px solid var(--t-accent); outline-offset: 3px; }

.skip { position: absolute; left: var(--gutter); top: -60px; background: var(--t-accent); color: var(--t-on-accent); padding: 10px 16px; border-radius: 999px; z-index: 100; font-weight: 600; text-decoration: none; }
.skip:focus { top: 14px; }

.label {
  font-family: var(--t-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.small { font-size: 14px; }

.display {
  font-family: var(--t-display);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: -0.005em;
  line-height: 0.92;
  text-wrap: balance;
}
.title {
  font-family: var(--t-display);
  font-weight: 400;
  text-transform: uppercase;
  line-height: 0.95;
  font-size: clamp(40px, 6vw, 84px);
  text-wrap: balance;
}
.lede { font-size: clamp(17px, 1.3vw, 20px); line-height: 1.45; max-width: 36em; }

/* ---- buttons -------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 22px;
  border-radius: 999px;
  border: 1.5px solid var(--t-accent);
  background: var(--t-accent);
  color: var(--t-on-accent);
  font: 600 15px/1 var(--t-body);
  text-decoration: none;
  cursor: pointer;
  transition: transform .35s cubic-bezier(.2,.7,.2,1), background .35s, color .35s, border-color .35s;
  -webkit-tap-highlight-color: transparent;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: scale(.985); }
.btn-small { padding: 10px 16px; font-size: 14px; }
.btn-ghost { background: transparent; color: inherit; border-color: currentColor; }
.btn-ghost:hover { background: color-mix(in srgb, currentColor 10%, transparent); }

/* ---- nav ------------------------------------------------------------------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  padding: 14px var(--gutter);
  color: var(--t-on-dark);
  transition: color .5s, background .5s;
}
.nav.on-light { color: var(--t-ink); background: color-mix(in srgb, var(--t-ground) 86%, transparent); backdrop-filter: blur(10px); }
.nav-brand { font-family: var(--t-display); text-transform: uppercase; font-size: 22px; letter-spacing: .01em; text-decoration: none; }
.nav-links { display: flex; gap: 26px; }
.nav-links a { text-decoration: none; font-size: 14px; font-weight: 500; opacity: .85; }
.nav-links a:hover { opacity: 1; text-decoration: underline; text-underline-offset: 4px; }
@media (max-width: 760px) { .nav-links { display: none; } }

/* ---- canvas ---------------------------------------------------------------- */
.stage-canvas {
  position: fixed; inset: 0; z-index: 0;
  pointer-events: none;
  background: var(--t-ground-dark);
  opacity: 1;
  transition: opacity .5s;
}
.stage-canvas canvas { display: block; width: 100%; height: 100%; }
.stage-canvas .poster { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
html.gl-ok .stage-canvas .poster { display: none; }
html:not(.gl-ok) .stage-canvas canvas { display: none; }
.stage-canvas.is-hidden { opacity: 0; }

/* ---- story (pinned) --------------------------------------------------------- */
main { position: relative; z-index: 1; }
.story { position: relative; color: var(--t-on-dark); min-height: 100vh; }
.story-pin {
  position: relative;
  height: 100vh; height: 100svh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  padding: 0 var(--gutter);
}
.rail {
  position: absolute; left: var(--gutter); top: 50%; transform: translateY(-50%);
  display: grid; gap: 18px;
  font-family: var(--t-mono); font-size: 11px; letter-spacing: .08em;
  color: var(--t-on-dark-soft);
}
.rail li { opacity: .35; transition: opacity .4s; position: relative; padding-left: 18px; }
.rail li::before { content: ''; position: absolute; left: 0; top: 50%; width: 10px; height: 1px; background: currentColor; transform: translateY(-50%); }
.rail li.is-on { opacity: 1; color: var(--t-on-dark); }

.stage {
  grid-row: 1; grid-column: 1;
  max-width: 34rem;
  opacity: 0;
  transform: translateY(18px);
  pointer-events: none;
  will-change: opacity, transform;
  margin-left: 56px;
}
/* The first stage is visible before the scene starts and whenever it cannot run. */
.stage[data-stage="1"] { opacity: 1; transform: none; pointer-events: auto; }
.stage.stage-center { grid-column: 1 / -1; justify-self: center; text-align: center; max-width: 40rem; margin-left: 0; align-self: end; margin-bottom: clamp(32px, 8vh, 88px); }
.stage.stage-right { grid-column: 2; justify-self: end; margin-left: 0; }
.stage.is-on { pointer-events: auto; }
.stage .display { font-size: clamp(54px, 7.4vw, 124px); margin: 18px 0 22px; }
.stage.stage-center .display { font-size: clamp(34px, 3.6vw, 56px); margin-bottom: 14px; }
.stage .lede { color: var(--t-on-dark-soft); color: color-mix(in srgb, var(--t-on-dark) 82%, var(--t-ground-dark)); }
.stage .label { color: var(--t-on-dark-soft); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.row-list { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px 28px; font-size: 16px; color: var(--t-on-dark-soft); }
.row-list li { position: relative; padding-left: 16px; }
.row-list li::before { content: ''; position: absolute; left: 0; top: .62em; width: 7px; height: 7px; border-radius: 50%; background: var(--t-accent); }

.hint {
  position: absolute; left: 50%; bottom: 22px; transform: translateX(-50%);
  font-family: var(--t-mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--t-on-dark-soft);
  display: flex; align-items: center; gap: 10px;
  transition: opacity .5s;
}
.hint::after { content: ''; width: 1px; height: 28px; background: currentColor; opacity: .7; animation: hint 2.6s ease-in-out infinite; transform-origin: top; }
@keyframes hint { 0%, 100% { transform: scaleY(.2); } 50% { transform: scaleY(1); } }
.hint.is-off { opacity: 0; }

/* ---- sections on the light ground ------------------------------------------ */
.range, .stockists { background: var(--t-ground); padding: var(--section) var(--gutter); }
.section-head {
  display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 24px 64px; align-items: end;
  margin-bottom: clamp(40px, 6vw, 80px);
}
.section-head .label { grid-column: 1 / -1; color: var(--t-ink-soft); }
.section-head .lede { color: var(--t-ink-soft); }
@media (max-width: 980px) { .section-head { grid-template-columns: 1fr; } }

.products { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.product {
  border: 1px solid var(--t-line); border-radius: var(--radius);
  padding: 22px 22px 26px;
  display: grid; gap: 12px;
  background: var(--t-ground);
}
.product h3 { font-family: var(--t-display); text-transform: uppercase; font-weight: 400; font-size: clamp(26px, 2.4vw, 34px); line-height: 1; }
.product p { color: var(--t-ink-soft); font-size: 15.5px; }
.product .price { color: var(--t-ink); font-family: var(--t-mono); font-size: 18px; margin-top: 6px; }
.product .price span { color: var(--t-ink-soft); font-size: 13px; }
.product-art { height: 170px; border-radius: 10px; background: var(--t-ground-2); position: relative; overflow: hidden; }
.swatch { position: absolute; inset: 0; background-image: radial-gradient(ellipse 48% 36% at 50% 56%, var(--a) 0 55%, transparent 56%), radial-gradient(ellipse 30% 20% at 35% 42%, color-mix(in srgb, var(--a) 70%, white) 0 50%, transparent 51%); }
.s-almond { --a: var(--t-nut-1); }
.s-cashew { --a: #c9723a; }
.s-pecan  { --a: var(--t-nut-3); }
@media (max-width: 860px) { .products { grid-template-columns: 1fr; } .product-art { height: 120px; } }

.order { margin-top: clamp(40px, 6vw, 80px); border-top: 1px solid var(--t-line); padding-top: clamp(32px, 4vw, 56px); }
.order-row { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, .7fr); gap: 40px 64px; }
@media (max-width: 860px) { .order-row { grid-template-columns: 1fr; } }
.field { border: 0; padding: 0; margin: 0; display: grid; gap: 12px; align-content: start; }
.field > .label { color: var(--t-ink-soft); margin-bottom: 4px; }
.choice {
  display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: center;
  padding: 14px 16px; border: 1px solid var(--t-line); border-radius: 12px; cursor: pointer;
  transition: border-color .3s, background .3s;
}
.choice:has(input:checked) { border-color: var(--t-ink); background: var(--t-ground-2); }
.choice input { accent-color: var(--t-ink); width: 18px; height: 18px; margin: 0; }
.choice b { font-family: var(--t-mono); font-weight: 400; }
select {
  font: 500 16px/1.2 var(--t-body); color: var(--t-ink);
  padding: 14px 16px; border: 1px solid var(--t-line); border-radius: 12px; background: var(--t-ground);
}
.total { display: flex; justify-content: space-between; align-items: baseline; font-size: 16px; color: var(--t-ink-soft); margin-top: 6px; }
.total strong { font-family: var(--t-display); font-weight: 400; font-size: 40px; color: var(--t-ink); line-height: 1; }
.order .small { color: var(--t-ink-soft); }
.order .btn { justify-self: start; }

/* ---- roast (dark) ------------------------------------------------------------ */
.roast { background: var(--t-ground-dark); color: var(--t-on-dark); padding: var(--section) var(--gutter); }
.roast .section-head .label, .roast .section-head .lede { color: var(--t-on-dark-soft); }
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; border-top: 1px solid rgba(238,242,234,.18); padding-top: 28px; }
.steps li { display: grid; gap: 12px; align-content: start; }
.step-num { font-family: var(--t-mono); font-size: 11px; letter-spacing: .08em; color: var(--t-accent); }
.steps h3 { font-family: var(--t-display); font-weight: 400; text-transform: uppercase; font-size: clamp(30px, 3vw, 44px); line-height: 1; }
.steps p { color: var(--t-on-dark-soft); font-size: 15.5px; }
@media (max-width: 980px) { .steps { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .steps { grid-template-columns: 1fr; } }

/* ---- stockists ---------------------------------------------------------------- */
.stockist-list { border-top: 1px solid var(--t-line); }
.stockist-list li {
  display: grid; grid-template-columns: 1.2fr 1fr .8fr; gap: 16px;
  padding: 18px 0; border-bottom: 1px solid var(--t-line);
}
.stockist-list li span:first-child { font-weight: 600; }
.stockist-list li span:not(:first-child) { color: var(--t-ink-soft); }
@media (max-width: 700px) { .stockist-list li { grid-template-columns: 1fr; gap: 2px; } }
.wholesale { margin-top: clamp(40px, 6vw, 80px); display: grid; gap: 14px; max-width: 40rem; }
.wholesale h3 { font-family: var(--t-display); text-transform: uppercase; font-weight: 400; font-size: clamp(30px, 3vw, 44px); line-height: 1; }
.wholesale p { color: var(--t-ink-soft); }
.wholesale .btn { justify-self: start; }

/* ---- footer -------------------------------------------------------------------- */
.footer { background: var(--t-ground-dark-2); color: var(--t-on-dark); padding: clamp(56px, 8vw, 110px) var(--gutter) 32px; position: relative; z-index: 1; }
.footer-name { font-family: var(--t-display); text-transform: uppercase; font-size: clamp(56px, 12vw, 190px); line-height: .9; letter-spacing: -.01em; margin-bottom: clamp(32px, 5vw, 64px); }
.footer-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; border-top: 1px solid rgba(238,242,234,.18); padding-top: 28px; margin-bottom: 40px; }
.footer-cols .label { color: var(--t-on-dark-soft); margin-bottom: 8px; }
.footer-cols p { font-size: 15.5px; }
.footer-cols a { text-decoration: none; }
.footer-cols a:hover { text-decoration: underline; text-underline-offset: 4px; }
.footer .small { color: var(--t-on-dark-soft); }
@media (max-width: 700px) { .footer-cols { grid-template-columns: 1fr; } }

/* ---- phones ---------------------------------------------------------------------- */
@media (max-width: 760px) {
  .story-pin { grid-template-columns: 1fr; align-items: end; padding-bottom: 64px; }
  .rail { display: none; }
  .stage, .stage.stage-right, .stage.stage-center { grid-column: 1; justify-self: start; text-align: left; margin-left: 0; max-width: none; align-self: end; margin-bottom: 0; }
  .stage .display { font-size: clamp(44px, 13vw, 64px); }
  .stage.stage-center .display { font-size: clamp(30px, 9vw, 44px); }
  .row-list { justify-content: flex-start; }
  .hint { display: none; }
}

/* ---- reduced motion ---------------------------------------------------------------- */
html.motion-reduced .story-pin { height: auto; min-height: 100vh; display: grid; gap: 40px; padding-top: 120px; padding-bottom: 80px; align-content: start; }
html.motion-reduced .stage { grid-row: auto; grid-column: 1; opacity: 1; transform: none; pointer-events: auto; justify-self: start; text-align: left; max-width: 34rem; margin: 0 0 0 56px; }
html.motion-reduced .stage.stage-center .display { font-size: clamp(54px, 7.4vw, 124px); }
html.motion-reduced .rail, html.motion-reduced .hint { display: none; }
html.motion-reduced .stage-canvas { position: fixed; }
html.motion-reduced .stage-canvas::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, var(--t-ground-dark) 0%, var(--t-ground-dark) 42%, color-mix(in srgb, var(--t-ground-dark) 62%, transparent) 100%); }
@media (max-width: 760px) { html.motion-reduced .stage { margin-left: 0; } }
html.motion-reduced .btn, html.motion-reduced .hint::after { transition: none; animation: none; }

/* poster capture: hide the page so only the scene is in the screenshot */
html.poster-mode main, html.poster-mode .nav, html.poster-mode .footer { visibility: hidden; }
