/* VIGIL Coffee Co. — "Half-light". Tokens in DESIGN.md. */
:root {
  --night: #0d0d0c; --night-2: #1b1b19; --night-line: #2c2c29;
  --paper: #f4f2ed; --paper-2: #e9e6df; --paper-line: #d6d2c9;
  --ash: #6b6862; --smoke: #a8a59e;
  --serif: 'Fraunces', Georgia, serif; --sans: 'Inter Tight', system-ui, sans-serif;
  --s1: .8rem; --s2: 1.0625rem; --s3: 1.3125rem; --s4: 1.66rem; --s5: 2.07rem; --s6: 2.6rem; --s7: 3.25rem; --s8: 4.05rem;
  --gut: clamp(1rem, 4vw, 3.5rem); --max: 1320px;
  --ease: cubic-bezier(.16, 1, .3, 1);
  color-scheme: light;
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
button, a, summary { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
@media (pointer: fine) { html { overscroll-behavior: none; } }
html { -webkit-text-size-adjust: 100%; text-rendering: optimizeLegibility; scroll-padding-top: 5rem; }
html.locked { overflow: hidden; }
body { margin: 0; background: var(--paper); color: var(--night); font: 400 var(--s2)/1.6 var(--sans); font-feature-settings: 'ss01', 'cv11'; -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: .22em; }
a:hover { text-decoration-thickness: 2px; }
::selection { background: var(--night); color: var(--paper); }
.night ::selection, .night::selection { background: var(--paper); color: var(--night); }
:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; border-radius: 2px; }
html { scrollbar-color: var(--ash) var(--paper-2); }
h1, h2, h3 { font-family: var(--serif); font-weight: 300; font-optical-sizing: auto; line-height: 1.05; letter-spacing: -.02em; margin: 0; text-wrap: balance; }
p { margin: 0 0 1em; text-wrap: pretty; }
.wrap { width: min(100% - 2 * var(--gut), var(--max)); margin-inline: auto; }
.skip { position: absolute; left: -999px; top: .5rem; background: var(--night); color: var(--paper); padding: .6rem 1rem; z-index: 100; }
.skip:focus { left: .5rem; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.tnum { font-variant-numeric: tabular-nums; }

/* ---------- header ---------- */
.site-head { position: fixed; inset: 0 0 auto; z-index: 40; color: var(--paper); mix-blend-mode: difference; }
.site-head { padding-top: env(safe-area-inset-top); }
.site-head .wrap { display: flex; align-items: center; gap: 2rem; height: 4.25rem; }
.wordmark { font: 400 1.35rem/1 var(--serif); letter-spacing: .32em; text-decoration: none; margin-right: auto; padding-left: .32em; }
#site-nav { display: flex; gap: 1.75rem; }
#site-nav a, .bag-btn { font-weight: 500; font-size: .95rem; text-decoration: none; }
#site-nav a[aria-current='page'] { text-decoration: underline; }
.bag-btn { display: inline-flex; align-items: center; gap: .45rem; background: none; border: 0; color: inherit; font: inherit; font-weight: 500; cursor: pointer; padding: .4rem 0; }
.bag-btn svg, .menu-toggle svg { width: 20px; height: 20px; }
.count { display: inline-grid; place-items: center; min-width: 1.35rem; height: 1.35rem; border-radius: 99px; background: currentColor; font-size: .72rem; }
.count > * , .count { color: inherit; }
.bag-btn .count { background: var(--paper); color: var(--night); }
.menu-toggle { display: none; background: none; border: 0; color: inherit; padding: .5rem; margin-right: -.5rem; cursor: pointer; }
@media (max-width: 760px) {
  .menu-toggle { display: inline-flex; }
  #site-nav { position: fixed; inset: 4.25rem 0 auto; flex-direction: column; gap: 0; background: var(--night); padding: .5rem var(--gut) 1.25rem; transform: translateY(-120%); visibility: hidden; transition: transform .4s var(--ease), visibility 0s .4s; mix-blend-mode: normal; }
  #site-nav.open { transform: none; visibility: visible; transition: transform .4s var(--ease); }
  #site-nav a { padding: .85rem 0; font-size: 1.15rem; border-bottom: 1px solid var(--night-line); color: var(--paper); }
  .site-head:has(#site-nav.open) { mix-blend-mode: normal; background: var(--night); }
}

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .6rem; min-height: 3rem; padding: 0 1.6rem; border-radius: 999px; border: 1px solid var(--night); background: var(--night); color: var(--paper); font: 500 1rem/1 var(--sans); text-decoration: none; cursor: pointer; transition: background .25s var(--ease), color .25s var(--ease), transform .25s var(--ease); }
.btn:hover { background: transparent; color: var(--night); }
.btn:active { transform: scale(.98); }
.btn.ghost { background: transparent; color: var(--night); }
.btn.ghost:hover { background: var(--night); color: var(--paper); }
.night .btn { background: var(--paper); color: var(--night); border-color: var(--paper); }
.night .btn:hover { background: transparent; color: var(--paper); }
.btn.added { background: var(--paper-2); color: var(--night); border-color: var(--paper-line); }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.btn svg { width: 18px; height: 18px; }

/* ---------- hero: the one orchestrated moment ---------- */
.hero { position: relative; background: var(--night); color: var(--paper); }
.hero-stage { position: relative; height: 100svh; min-height: 560px; overflow: hidden; background: var(--night); }
.dawn { position: absolute; inset: 0; background: var(--paper); transform: translate3d(0, 100%, 0); will-change: transform; }
.dawn::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 1px; background: var(--paper-line); }
.hero-canvas { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; transition: opacity 1.2s var(--ease); }
.hero-stage.ready .hero-canvas { opacity: 1; }
.hero-fallback { position: absolute; right: 8%; top: 50%; translate: 0 -50%; width: min(34vw, 360px); display: none; }
.hero-stage.no-3d .hero-fallback { display: block; }
.hero-copy { position: absolute; left: var(--gut); bottom: clamp(3rem, 12vh, 8rem); width: min(44rem, 50%); }
.hero-copy h1, .hero-copy h2 { font-size: clamp(2.7rem, 6.2vw, 6rem); margin-bottom: 1.4rem; }
.hero-copy p { font-size: var(--s3); max-width: 30ch; color: var(--smoke); margin-bottom: 1.8rem; }
.hero-copy.day { color: var(--night); }
.hero-copy.day p { color: var(--ash); }
.hero-copy .actions { display: flex; gap: .8rem; flex-wrap: wrap; }
.hero-copy.c2, .hero-copy.c3 { visibility: hidden; opacity: 0; }
.hero-stage.static .hero-copy.c1, .hero-stage.static .hero-copy.c2 { display: none; }
.hero-stage.static .hero-copy.c3 { visibility: visible; opacity: 1; }
.hero-stage.static .dawn { transform: none; }
.scroll-cue { position: absolute; left: var(--gut); bottom: 1.4rem; font-size: .85rem; color: var(--smoke); display: flex; align-items: center; gap: .6rem; }
.scroll-cue i { display: block; width: 1px; height: 2.2rem; background: linear-gradient(var(--smoke), transparent); animation: cue 2.4s var(--ease) infinite; transform-origin: top; }
@keyframes cue { 0% { transform: scaleY(0); } 60%, 100% { transform: scaleY(1); opacity: 0; } }
@media (max-width: 760px), (max-aspect-ratio: 1/1) {
  .hero-copy { width: auto; right: var(--gut); bottom: 2.2rem; }
  .hero-copy h1, .hero-copy h2 { font-size: clamp(2.3rem, 10vw, 3.4rem); margin-bottom: .9rem; }
  .hero-copy p { font-size: 1.05rem; margin-bottom: 1.2rem; }
  .hero-fallback { right: 50%; translate: 50% 0; top: 14%; width: 46vw; }
  .scroll-cue { display: none; }
}

/* ---------- sections ---------- */
section { position: relative; }
.night { background: var(--night); color: var(--paper); }
.pad { padding-block: clamp(4.5rem, 11vw, 9rem); }
.lede { font: 300 clamp(1.7rem, 3.4vw, 2.9rem)/1.18 var(--serif); letter-spacing: -.015em; max-width: 26ch; margin: 0 0 1.2em; }
.muted { color: var(--ash); }
.night .muted { color: var(--smoke); }
.split-head { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 2rem 4rem; align-items: end; margin-bottom: clamp(2.5rem, 5vw, 4.5rem); }
.split-head h2 { font-size: clamp(2.4rem, 5vw, 4.4rem); }
.split-head p { max-width: 40ch; margin: 0; }
@media (max-width: 760px) { .split-head { grid-template-columns: 1fr; } }

/* The shelf: all twelve, light to dark. The rising black line is the roast system made visible. */
.shelf { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: clamp(.4rem, 1vw, 1rem); align-items: end; }
.shelf a { text-decoration: none; display: block; }
.shelf img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; background: var(--paper-2); transition: transform .5s var(--ease); }
.shelf a:hover img { transform: translateY(-6px); }
.shelf span { display: block; font: 400 1.05rem/1.2 var(--serif); margin-top: .7rem; }
.shelf small { display: block; color: var(--ash); font-size: .82rem; }
@media (max-width: 1000px) { .shelf { grid-template-columns: repeat(6, minmax(0, 1fr)); row-gap: 2rem; } }
@media (max-width: 560px) { .shelf { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* Promises: a definition list, not cards. */
.terms-list { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--night-line); margin: 0; }
.terms-list div { padding: 1.6rem 1.5rem 0 0; }
.terms-list dt { font: 400 var(--s4)/1.15 var(--serif); margin-bottom: .6rem; }
.terms-list dd { margin: 0; color: var(--smoke); max-width: 28ch; }
@media (max-width: 900px) { .terms-list { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 1.5rem; } }
@media (max-width: 520px) { .terms-list { grid-template-columns: 1fr; } }

.roast-key { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 1rem; margin: 0; padding: 0; list-style: none; }
.roast-key li { display: grid; grid-template-rows: 9rem auto auto; gap: .5rem; }
.roast-key .bar { background: linear-gradient(var(--night) 0 var(--split), var(--paper-2) var(--split)); border: 1px solid var(--paper-line); }
.roast-key b { font: 400 1.25rem/1.2 var(--serif); }
.roast-key span { color: var(--ash); font-size: .92rem; }
@media (max-width: 760px) { .roast-key { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---------- shop grid ---------- */
.filters { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 2rem; }
.filters button { min-height: 2.6rem; padding: 0 1.1rem; border-radius: 999px; border: 1px solid var(--paper-line); background: transparent; font: 500 .95rem var(--sans); color: var(--night); cursor: pointer; transition: background .2s var(--ease), border-color .2s; }
.filters button:hover { border-color: var(--night); }
.filters button[aria-pressed='true'] { background: var(--night); color: var(--paper); border-color: var(--night); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: 3rem 1.5rem; list-style: none; padding: 0; margin: 0; }
.card a.shot { display: block; background: var(--paper-2); overflow: hidden; }
.card a.shot img { aspect-ratio: 4 / 5; object-fit: cover; width: 100%; transition: transform .7s var(--ease); }
.card a.shot:hover img { transform: scale(1.03); }
.card-row { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; margin-top: 1rem; }
.card h3 { font-size: 1.7rem; }
.card h3 a { text-decoration: none; }
.card .price { font-weight: 500; }
.card p { color: var(--ash); margin: .35rem 0 1rem; font-size: .97rem; }
.card .btn { min-height: 2.6rem; padding: 0 1.2rem; font-size: .93rem; }

/* ---------- product page ---------- */
.pdp { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: clamp(2rem, 6vw, 6rem); padding-top: 7rem; padding-bottom: clamp(4rem, 9vw, 7rem); align-items: start; }
.pdp-shot { background: var(--paper-2); position: sticky; top: 5.5rem; }
.pdp-shot img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.crumbs { font-size: .9rem; color: var(--ash); margin-bottom: 1.6rem; }
.crumbs a { color: inherit; }
.pdp h1 { font-size: clamp(3.4rem, 7vw, 6rem); margin-bottom: .6rem; }
.pdp .roast-line { font-size: 1.1rem; margin-bottom: 1.5rem; color: var(--ash); }
.pdp .line { font: 300 var(--s4)/1.25 var(--serif); margin-bottom: 1.6rem; max-width: 24ch; }
.buy { display: flex; align-items: center; gap: 1.2rem; flex-wrap: wrap; padding: 1.4rem 0; border-block: 1px solid var(--paper-line); margin-bottom: 2rem; }
.buy .price { font: 400 var(--s5)/1 var(--serif); }
.buy small { flex-basis: 100%; color: var(--ash); font-size: .9rem; }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: .7rem 2rem; margin: 0 0 2rem; }
.facts dt { color: var(--ash); }
.facts dd { margin: 0; }
.pdp-body { max-width: 62ch; }
.notes-row { display: flex; flex-wrap: wrap; gap: .5rem; margin: 0 0 1.6rem; padding: 0; list-style: none; }
.notes-row li { border: 1px solid var(--paper-line); border-radius: 999px; padding: .3rem .9rem; font-size: .92rem; }
@media (max-width: 860px) { .pdp { grid-template-columns: 1fr; padding-top: 5.5rem; } .pdp-shot { position: static; } }

/* ---------- prose (story, faq, legal) ---------- */
.page-head { padding-top: clamp(8rem, 16vw, 12rem); padding-bottom: clamp(2.5rem, 5vw, 4rem); }
.page-head h1 { font-size: clamp(2.8rem, 7vw, 5.6rem); max-width: 14ch; }
.page-head p { font-size: var(--s3); color: var(--ash); max-width: 46ch; margin-top: 1.4rem; }
.night.page-head p { color: var(--smoke); }
.prose { max-width: 68ch; padding-bottom: clamp(4rem, 9vw, 7rem); }
.prose h2 { font-size: var(--s5); margin: 2.6em 0 .7em; }
.prose h3 { font: 600 1.08rem/1.4 var(--sans); letter-spacing: 0; margin: 2em 0 .5em; }
.prose ul, .prose ol { padding-left: 1.2em; margin: 0 0 1.2em; }
.prose li { margin-bottom: .45em; }
.prose .updated { color: var(--ash); font-size: .95rem; }
.legal-toc { columns: 2; column-gap: 3rem; padding-left: 1.2em; margin-bottom: 2.5rem; }
@media (max-width: 600px) { .legal-toc { columns: 1; } }
details.qa { border-top: 1px solid var(--paper-line); }
details.qa:last-of-type { border-bottom: 1px solid var(--paper-line); }
details.qa summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; gap: 1rem; padding: 1.3rem 0; font: 400 var(--s3)/1.3 var(--serif); }
details.qa summary::-webkit-details-marker { display: none; }
details.qa summary svg { flex: none; width: 20px; height: 20px; margin-top: .25rem; transition: transform .3s var(--ease); }
details.qa[open] summary svg { transform: rotate(45deg); }
details.qa > div { padding: 0 0 1.4rem; max-width: 62ch; color: #33322f; }

/* ---------- footer ---------- */
.site-foot { background: var(--night); color: var(--paper); padding-block: clamp(4rem, 8vw, 6rem) 2rem; }
.foot-grid { display: grid; grid-template-columns: 1.4fr repeat(3, minmax(0, 1fr)); gap: 2.5rem; }
.foot-grid .wordmark { font-size: 2rem; display: inline-block; margin-bottom: 1rem; }
.foot-grid p { color: var(--smoke); max-width: 32ch; }
.foot-grid h2 { font: 600 .95rem/1.4 var(--sans); letter-spacing: 0; margin-bottom: .9rem; }
.foot-grid ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .5rem; }
.foot-grid a { text-decoration: none; color: var(--smoke); }
.foot-grid a:hover { color: var(--paper); text-decoration: underline; }
.foot-base { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-top: 4rem; padding-top: 1.4rem; border-top: 1px solid var(--night-line); color: var(--smoke); font-size: .88rem; }
@media (max-width: 800px) { .foot-grid { grid-template-columns: 1fr 1fr; } .foot-grid > :first-child { grid-column: 1 / -1; } }

/* ---------- bag drawer ---------- */
#bag { position: fixed; inset: 0; z-index: 60; }
.bag-scrim { position: absolute; inset: 0; background: rgba(13, 13, 12, .5); opacity: 0; transition: opacity .3s var(--ease); }
.bag-panel { position: absolute; top: 0; right: 0; bottom: 0; width: min(100%, 440px); background: var(--paper); display: flex; flex-direction: column; transform: translateX(100%); transition: transform .45s var(--ease); }
#bag.open .bag-scrim { opacity: 1; }
#bag.open .bag-panel { transform: none; }
.bag-top { display: flex; justify-content: space-between; align-items: center; padding: 1.2rem 1.5rem; border-bottom: 1px solid var(--paper-line); }
.bag-top h2 { font-size: var(--s4); }
.bag-close { background: none; border: 0; padding: .5rem; margin-right: -.5rem; cursor: pointer; color: var(--night); }
.bag-close svg { width: 22px; height: 22px; }
.bag-lines { list-style: none; margin: 0; padding: 0 1.5rem; overflow: auto; flex: 1; overscroll-behavior: contain; }
.bag-line { display: grid; grid-template-columns: 64px 1fr auto; grid-template-areas: 'img name total' 'img qty qty'; gap: .3rem 1rem; padding: 1.1rem 0; border-bottom: 1px solid var(--paper-line); align-items: center; }
.bag-line img { grid-area: img; background: var(--paper-2); }
.bag-line > div:first-of-type { grid-area: name; }
.bag-line > div:first-of-type a { font: 400 1.2rem var(--serif); text-decoration: none; display: block; }
.bag-line > div:first-of-type span { color: var(--ash); font-size: .88rem; }
.bag-line .line-total { grid-area: total; font-variant-numeric: tabular-nums; }
.qty { grid-area: qty; display: inline-flex; align-items: center; gap: .2rem; border: 1px solid var(--paper-line); border-radius: 999px; width: max-content; }
.qty button { width: 2.25rem; height: 2.25rem; border: 0; background: none; cursor: pointer; display: grid; place-items: center; color: var(--night); border-radius: 999px; }
.qty button:hover { background: var(--paper-2); }
.qty button svg { width: 14px; height: 14px; }
.qty output { min-width: 1.4rem; text-align: center; font-variant-numeric: tabular-nums; }
.bag-empty { padding: 2rem 0; color: var(--ash); }
.bag-sum { padding: 1.3rem 1.5rem calc(1.6rem + env(safe-area-inset-bottom)); border-top: 1px solid var(--paper-line); background: var(--paper-2); }
.bag-sum dl { display: grid; grid-template-columns: 1fr auto; gap: .4rem; margin: 0 0 .8rem; font-variant-numeric: tabular-nums; }
.bag-sum dd { margin: 0; text-align: right; }
.bag-sum .total { font-weight: 600; font-size: 1.1rem; }
.bag-sum .note { font-size: .88rem; color: var(--ash); margin: 0 0 .3rem; min-height: 0; }
.bag-sum .btn { width: 100%; margin-top: .8rem; }
.soon { font-size: .88rem; color: var(--ash); margin: .7rem 0 0; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* the hero ends in daylight, so its last buttons go back to ink on paper */
.hero-copy.day .btn { background: var(--night); color: var(--paper); border-color: var(--night); }
.hero-copy.day .btn:hover { background: transparent; color: var(--night); }
.hero-copy.day .btn.ghost { background: transparent; color: var(--night); }
.hero-copy.day .btn.ghost:hover { background: var(--night); color: var(--paper); }

/* ================= richer pass: wordmark, grain, runway, photography ================= */
.hero-word { position: absolute; left: 50%; top: 47%; transform: translate(-50%, -50%); font: 400 30vw/.8 var(--serif); letter-spacing: .03em; color: #2b2b28; mix-blend-mode: difference; white-space: nowrap; pointer-events: none; user-select: none; will-change: transform; }
@media (max-width: 760px), (max-aspect-ratio: 1/1) { .hero-word { top: 33%; font-size: 31vw; } }

/* film grain: one SVG noise tile, screened over night surfaces */
.grain { position: relative; }
.grain::after { content: ''; position: absolute; inset: 0; z-index: 3; pointer-events: none; opacity: .11; mix-blend-mode: screen;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .6 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }

/* the shelf as a walk: swipe row by default, pinned horizontal scroll on desktop */
.runway { background: var(--paper); padding-top: clamp(4.5rem, 10vw, 8rem); overflow: hidden; }
.runway-head { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 1.5rem 4rem; align-items: end; margin-bottom: clamp(2rem, 4vw, 3.5rem); }
.runway-head h2 { font-size: clamp(2.4rem, 5vw, 4.4rem); }
.runway-head p { margin: 0; max-width: 40ch; }
.runway-track { list-style: none; margin: 0; padding: 0 var(--gut) 1.5rem; display: flex; gap: clamp(1rem, 2.2vw, 2.5rem); overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain; will-change: transform; }
.runway-track::-webkit-scrollbar { display: none; }
.runway-item { flex: none; width: clamp(14rem, 24vw, 21rem); scroll-snap-align: start; scroll-margin-left: var(--gut); }
.runway-item:nth-child(even) { margin-top: clamp(1.5rem, 4vh, 3.25rem); }
.runway-item a { display: block; text-decoration: none; }
.runway-item img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; background: var(--paper-2); transition: transform .6s var(--ease); }
.runway-item a:hover img { transform: translateY(-8px); }
.rn { display: block; font: 300 clamp(2rem, 3.1vw, 3.1rem)/1 var(--serif); letter-spacing: -.02em; margin-top: 1.1rem; }
.rr { display: block; margin-top: .45rem; }
.rnotes { display: block; color: var(--ash); font-size: .93rem; }
.rp { display: block; margin-top: .45rem; font-weight: 500; font-variant-numeric: tabular-nums; }
.runway-foot { display: flex; align-items: center; gap: 1rem; padding-block: 1.25rem clamp(3.5rem, 8vw, 6rem); color: var(--ash); font-size: .9rem; }
.runway-bar { flex: 1; height: 2px; background: var(--paper-line); position: relative; }
.runway-bar i { position: absolute; inset: 0; background: var(--night); transform-origin: left center; transform: scaleX(0); }
.runway.pinned { padding-top: 0; }
.runway.pinned .runway-pin { height: 100svh; display: flex; flex-direction: column; justify-content: center; padding-top: 4rem; }
.runway.pinned .runway-head { margin-bottom: 1.75rem; }
.runway.pinned .runway-head h2 { font-size: clamp(2rem, 3.4vw, 3.2rem); }
.runway.pinned .runway-track { overflow: visible; scroll-snap-type: none; padding-bottom: 0; }
.runway.pinned .runway-item { width: min(24vw, 21rem, 33vh); }
.runway.pinned .runway-foot { padding-block: 1.5rem 0; }
@media (max-width: 760px) { .runway-head { grid-template-columns: 1fr; } .runway-item { width: 68vw; } }

/* photography: full-bleed bands and framed figures, always black and white */
.band { position: relative; overflow: hidden; min-height: min(92svh, 56rem); display: flex; align-items: flex-end; background: var(--night); color: var(--paper); }
.band .band-img { position: absolute; left: 0; top: -8%; width: 100%; height: 116%; object-fit: cover; will-change: transform; }
.band::before { content: ''; position: absolute; inset: 0; z-index: 1; background: linear-gradient(to top, rgba(13, 13, 12, .88) 0%, rgba(13, 13, 12, .35) 45%, rgba(13, 13, 12, .15) 100%); }
.band .band-copy { position: relative; z-index: 2; padding-block: clamp(3rem, 8vw, 6rem); }
.band h2 { font-size: clamp(2.5rem, 6.4vw, 5.8rem); max-width: 15ch; margin-bottom: 1.4rem; }
.band p { font-size: var(--s3); max-width: 36ch; color: #d9d6cf; margin: 0; }
.band.short { min-height: min(64svh, 38rem); }
.band.short h2 { font: 300 clamp(1.8rem, 3.6vw, 3.1rem)/1.15 var(--serif); max-width: 24ch; margin: 0; }

.gift { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1fr); gap: clamp(2rem, 6vw, 6rem); align-items: center; }
.gift figure, .duo figure, .brew figure { margin: 0; overflow: hidden; }
.gift img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.gift h2 { font-size: clamp(2.4rem, 5vw, 4.4rem); margin-bottom: 1.4rem; }
.gift p { max-width: 38ch; margin-bottom: 1.8rem; }
@media (max-width: 760px) { .gift { grid-template-columns: 1fr; } }

.page-head.has-photo { position: relative; overflow: hidden; min-height: min(86svh, 50rem); display: flex; align-items: flex-end; }
.page-head.has-photo .band-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.page-head.has-photo::before { content: ''; position: absolute; inset: 0; z-index: 1; background: linear-gradient(to top, rgba(13, 13, 12, .9), rgba(13, 13, 12, .3) 60%, rgba(13, 13, 12, .45)); }
.page-head.has-photo .wrap { position: relative; z-index: 2; }
.duo { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(.75rem, 2vw, 1.5rem); margin: 3rem 0; width: min(100vw - 2 * var(--gut), 62rem); }
.duo img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.duo figcaption { font-size: .88rem; color: var(--ash); margin-top: .6rem; }
@media (max-width: 600px) { .duo { grid-template-columns: 1fr; } }

.brew { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1fr); gap: clamp(2rem, 6vw, 6rem); align-items: center; }
.brew img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.brew h2 { font-size: var(--s6); margin-bottom: 1.6rem; }
.brew ol { margin: 0; padding: 0; list-style: none; counter-reset: step; max-width: 44ch; }
.brew li { counter-increment: step; display: grid; grid-template-columns: 2.4rem 1fr; padding: 1rem 0; border-top: 1px solid var(--night-line); color: #d9d6cf; }
.brew li::before { content: counter(step); font: 300 1.5rem/1.2 var(--serif); color: var(--paper); }
@media (max-width: 760px) { .brew { grid-template-columns: 1fr; } }
.band.short::before { background: linear-gradient(to right, rgba(13, 13, 12, .92) 0%, rgba(13, 13, 12, .7) 45%, rgba(13, 13, 12, .15) 100%); }
@media (max-width: 760px) { .band.short::before { background: rgba(13, 13, 12, .72); } }

/* ================= photoreal film hero (replaces the 3D carton) ================= */
.hero-poster, .hero-poster img { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-poster img { object-fit: cover; object-position: 72% 50%; }
@media (max-aspect-ratio: 9/10) { .hero-poster img { object-position: 50% 50%; } }
.hero-stage .hero-poster { opacity: 0; }
.hero-stage.static .hero-poster { opacity: 1; }                 /* reduced motion or no script: the dawn still */
.hero-stage.static .hero-canvas { display: none; }
.hero-canvas { opacity: 0; transition: opacity .9s var(--ease); }
.hero-stage.ready .hero-canvas { opacity: 1; }
/* a soft shade under the words so they read over any frame */
.hero-stage::after { content: ''; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(to right, rgba(13, 13, 12, .78) 0%, rgba(13, 13, 12, .45) 38%, rgba(13, 13, 12, 0) 62%); }
.hero-copy, .scroll-cue { z-index: 2; }
.hero-copy p { color: #d2cfc8; }
.hero-copy .btn.ghost { color: var(--paper); border-color: var(--paper); background: transparent; }
.hero-copy .btn.ghost:hover { background: var(--paper); color: var(--night); }
@media (max-width: 760px), (max-aspect-ratio: 1/1) {
  .hero-stage::after { background: linear-gradient(to top, rgba(13, 13, 12, .92) 0%, rgba(13, 13, 12, .7) 30%, rgba(13, 13, 12, 0) 58%); }
}

/* header: a solid night bar (the black top of the carton); clear over the film with a top shade */
.site-head { mix-blend-mode: normal; background: var(--night); color: var(--paper); transition: background-color .35s var(--ease); }
.site-head.over-hero { background: linear-gradient(rgba(13, 13, 12, .78), rgba(13, 13, 12, 0)); }
@media (max-width: 760px) { .site-head.over-hero:has(#site-nav.open) { background: var(--night); } }

/* ================= Where to start: four picks, each a link to its coffee ================= */
.starts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(1rem, 2vw, 1.75rem); list-style: none; padding: 0; margin: 0; }
.starts a { display: grid; gap: .3rem; text-decoration: none; height: 100%; align-content: start; }
.starts .tag { font: 600 .74rem/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--ash); padding-bottom: .75rem; border-bottom: 1px solid var(--paper-line); margin-bottom: .75rem; }
.starts li:first-child .tag { color: var(--night); border-bottom-color: var(--night); }
.starts img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; background: var(--paper-2); transition: transform .7s var(--ease); }
.starts a:hover img { transform: translateY(-6px); }
.starts b { font: 300 2.1rem/1.05 var(--serif); letter-spacing: -.02em; margin-top: .9rem; }
.starts .rr { font-size: .88rem; color: var(--ash); }
.starts .why { color: var(--night); margin-top: .35rem; max-width: 30ch; }
.starts .go { display: flex; justify-content: space-between; gap: 1rem; margin-top: .9rem; padding-top: .8rem; border-top: 1px solid var(--paper-line); font-weight: 500; font-size: .95rem; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .22em; }
.starts .go i { font-style: normal; text-decoration: none; display: inline-block; }
.starts a:hover .go { text-decoration-thickness: 2px; }
@media (max-width: 900px) { .starts { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 2.5rem; } }
@media (max-width: 420px) { .starts b { font-size: 1.7rem; } }

/* The roast key as navigation: every bar opens that type's page. */
.types-h { font: 600 .78rem/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--ash); margin: clamp(3.5rem, 7vw, 6rem) 0 1.5rem; }
.types-title { font-size: clamp(2rem, 4vw, 3.2rem); margin-bottom: clamp(2rem, 4vw, 3rem); }
.types-band { background: var(--paper-2); }
.roast-key.types { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.roast-key.types li { display: block; }
.roast-key.types a { display: grid; grid-template-rows: 7.5rem auto auto auto; gap: .45rem; text-decoration: none; height: 100%; align-content: start; }
.roast-key.types .bar { transition: transform .5s var(--ease); }
.roast-key.types a:hover .bar { transform: translateY(-5px); }
.roast-key.types a:hover b { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .2em; }
.roast-key.types small { font-size: .8rem; color: var(--ash); font-weight: 500; }
.roast-key.types a[aria-current] .bar { outline: 2px solid var(--night); outline-offset: 3px; }
.roast-key .bar.one { background: radial-gradient(circle at 50% 50%, var(--night) 0 1.1rem, transparent 1.15rem), var(--paper); }
.types-band .roast-key .bar { background-color: var(--paper); }
.types-band .roast-key .bar:not(.one) { background: linear-gradient(var(--night) 0 var(--split), var(--paper) var(--split)); }
@media (max-width: 1000px) { .roast-key.types { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 2.25rem; } }
@media (max-width: 520px) { .roast-key.types { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Type pages */
.page-head.type-head { min-height: min(68svh, 40rem); }
.type-head .crumbs, .type-head .crumbs a { color: var(--smoke); }
.type-head .crumbs { font-size: .92rem; margin-bottom: 1.2rem; }
.grid.few { grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 340px)); }
.night h2.lede { font: 300 clamp(1.7rem, 3.4vw, 2.9rem)/1.18 var(--serif); }

/* Legal pages: tables and a summary box */
.prose table { width: 100%; border-collapse: collapse; margin: 0 0 1.6em; font-size: .95rem; }
.prose th, .prose td { text-align: left; vertical-align: top; padding: .75rem .9rem .75rem 0; border-top: 1px solid var(--paper-line); }
.prose th { font-weight: 600; }
.prose .tbl { overflow-x: auto; }
.prose .tbl table { min-width: 34rem; }
.prose .box { background: var(--paper-2); padding: 1.4rem 1.5rem .6rem; margin: 0 0 2rem; }
.prose .box h3 { margin-top: 0; }
.prose h2 { scroll-margin-top: 5.5rem; }
.prose address { font-style: normal; margin: 0 0 1.2em; }
