/* Golden Bean: one dark, warm, cinematic theme. System fonts only (no font downloads). */
:root {
  --bg: #0e0a08; --bg-2: #16100c; --bg-3: #1d1611;
  --ink: #f4ead9; --dim: #c2b09a; --faint: #8f7d69;
  --gold: #d4a24c; --gold-2: #f0c879; --gold-soft: rgba(212, 162, 76, 0.14);
  --line: rgba(244, 234, 217, 0.12); --glass: rgba(20, 14, 10, 0.66);
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: "Inter", "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", Consolas, monospace;
  --gutter: clamp(16px, 5vw, 72px);
  --ease: cubic-bezier(.2, .7, .2, 1);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.6 var(--sans); overflow-x: hidden; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--serif); font-weight: 500; letter-spacing: -0.01em; margin: 0; }
em { font-style: italic; color: var(--gold-2); }
p { margin: 0; }
.muted { color: var(--dim); }
.skip { position: absolute; left: -9999px; top: 8px; z-index: 100; background: var(--gold); color: #1a1006; padding: 8px 14px; border-radius: 8px; }
.skip:focus { left: 12px; }
:focus-visible { outline: 2px solid var(--gold-2); outline-offset: 3px; }

/* buttons */
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 13px 22px; border-radius: 999px; background: var(--gold); color: #1a1006; font-weight: 600; font-size: 15px; text-decoration: none; transition: background .25s var(--ease), transform .25s var(--ease); }
.btn:hover { background: var(--gold-2); transform: translateY(-1px); }
.btn.ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); }
.btn.ghost:hover { box-shadow: inset 0 0 0 1px var(--gold); color: var(--gold-2); }
.btn.small { padding: 8px 16px; font-size: 14px; }

/* nav */
.nav { position: fixed; inset: 0 0 auto 0; z-index: 50; display: flex; align-items: center; justify-content: space-between; padding: 14px var(--gutter); transition: background .3s, backdrop-filter .3s, box-shadow .3s; }
.nav.solid { background: rgba(14, 10, 8, 0.78); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); box-shadow: 0 1px 0 var(--line); }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--serif); font-size: 20px; letter-spacing: 0.01em; }
.mark { width: 28px; height: 28px; }
.mark ellipse { fill: var(--gold); }
.mark path { fill: none; stroke: var(--bg); stroke-width: 2.4; stroke-linecap: round; }
.nav nav { display: flex; align-items: center; gap: clamp(12px, 2.4vw, 30px); }
.nav nav a:not(.btn) { text-decoration: none; color: var(--dim); font-size: 14px; transition: color .2s; }
.nav nav a:not(.btn):hover { color: var(--ink); }

/* hero */
.hero { position: relative; min-height: 100svh; display: flex; flex-direction: column; justify-content: center; padding: 120px var(--gutter) 90px; overflow: hidden; }
.hero-glow { position: absolute; inset: -20% -10% auto auto; width: 80vmax; height: 80vmax; background: radial-gradient(closest-side, rgba(212, 162, 76, 0.22), rgba(212, 162, 76, 0.05) 55%, transparent 72%); pointer-events: none; }
.hero-bean { position: absolute; right: max(-60px, calc(var(--gutter) - 80px)); top: 50%; width: min(46vw, 640px); height: auto; transform: translateY(-46%); pointer-events: none; }
.hero-bean circle { fill: none; stroke: rgba(212, 162, 76, 0.13); stroke-width: 1; }
.hero-bean .b { fill: rgba(212, 162, 76, 0.07); stroke: rgba(240, 200, 121, 0.55); stroke-width: 1.2; }
.hero-bean .c { fill: none; stroke: rgba(240, 200, 121, 0.55); stroke-width: 1.2; }
.eyebrow { font-size: 12px; letter-spacing: 0.24em; text-transform: uppercase; color: var(--gold); font-weight: 600; margin-bottom: 18px; }
.hero h1 { font-size: clamp(52px, 9.5vw, 136px); line-height: 0.98; max-width: 11ch; position: relative; }
.hero .lead { max-width: 520px; margin-top: 26px; font-size: clamp(16px, 1.5vw, 19px); color: var(--dim); position: relative; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; position: relative; }
.cue { position: absolute; left: 50%; bottom: 26px; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 8px; font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--faint); text-decoration: none; }
.cue span { width: 1px; height: 46px; background: linear-gradient(var(--gold), transparent); animation: cue 2.2s var(--ease) infinite; transform-origin: top; }
@keyframes cue { 0% { transform: scaleY(0); } 60% { transform: scaleY(1); opacity: 1; } 100% { transform: scaleY(1); opacity: 0; } }

/* the pinned extraction */
.process { position: relative; height: 620vh; }
.stage { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; overflow: clip; background: var(--bg); }
.scene, .gfx, .clips, .clips video { position: absolute; inset: 0; width: 100%; height: 100%; }
.clips video { object-fit: cover; opacity: 0; transition: opacity .35s; }
.clips video.on { opacity: 1; }
.gfx { pointer-events: none; }
.grain { position: absolute; inset: 0; pointer-events: none; opacity: 0.09; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  animation: grain 0.9s steps(6) infinite; }
@keyframes grain { 0% { background-position: 0 0; } 20% { background-position: -37px 23px; } 40% { background-position: 29px -51px; } 60% { background-position: -61px -13px; } 80% { background-position: 41px 47px; } 100% { background-position: 0 0; } }
.scrim { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(90deg, rgba(14, 10, 8, 0.72) 0%, rgba(14, 10, 8, 0.38) 30%, transparent 46%); }

.chapters { position: absolute; left: var(--gutter); top: 50%; transform: translateY(-50%); width: min(32vw, 420px); }
.ch { position: absolute; left: 0; top: 50%; width: 100%; opacity: var(--o, 0); transform: translateY(calc(-50% + (1 - var(--o, 0)) * 18px)); visibility: hidden; }
.ch .num { font-family: var(--mono); font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--faint); margin-bottom: 16px; }
.ch .num span { color: var(--gold); }
.ch h2 { font-size: clamp(30px, 3.6vw, 52px); line-height: 1.05; margin-bottom: 18px; }
.ch p:not(.num) { color: var(--dim); font-size: clamp(15px, 1.2vw, 17px); max-width: 38ch; }
.ch strong { color: var(--ink); font-weight: 600; }

/* HUD cards (the motion-graphic read-outs) */
.hud { position: absolute; inset: 0; pointer-events: none; }
.card { position: absolute; right: 36px; width: 214px; padding: 12px 14px; border-radius: 14px; background: var(--glass); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); box-shadow: inset 0 0 0 1px var(--line), 0 18px 40px rgba(0, 0, 0, 0.35); opacity: var(--o, 0); transform: translateX(calc((1 - var(--o, 0)) * 14px)); visibility: hidden; }
.card[data-slot="0"] { top: 20%; }
.card[data-slot="1"] { top: 44%; }
.card[data-slot="2"] { top: 68%; }
.card .k { display: block; font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--faint); font-weight: 600; }
.card .v { display: flex; align-items: baseline; gap: 4px; font-family: var(--mono); font-weight: 500; font-size: 26px; line-height: 1.2; color: var(--ink); font-variant-numeric: tabular-nums; }
.card .v small { font-size: 13px; color: var(--dim); }
.card.ring { display: flex; align-items: center; gap: 12px; }
.card .v.narrow { display: none; }
.card.ring svg { width: 48px; height: 48px; flex: none; transform: rotate(-90deg); }
.track { fill: none; stroke: var(--line); stroke-width: 3.5; }
.arc { fill: none; stroke: var(--gold); stroke-width: 3.5; stroke-linecap: round; }
.bars { display: block; width: 100%; height: 26px; margin-top: 6px; }
.bars rect { fill: rgba(244, 234, 217, 0.22); }
.bars rect.hi { fill: var(--gold); }
.meter { display: block; position: relative; height: 4px; margin-top: 8px; border-radius: 4px; background: var(--line); }
.meter i { position: absolute; top: -3px; left: 50%; width: 10px; height: 10px; margin-left: -5px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 3px rgba(212, 162, 76, 0.25); }
.meter::after { content: ""; position: absolute; left: 50%; top: -5px; width: 1px; height: 14px; background: var(--dim); }
.chart { display: block; width: 100%; height: auto; margin-top: 8px; overflow: visible; }
.chart .grid { stroke: var(--line); stroke-width: 1; fill: none; }
.chart .ref { fill: none; stroke: rgba(244, 234, 217, 0.18); stroke-width: 1.5; stroke-dasharray: 3 3; }
.chart .live { fill: none; stroke: var(--gold); stroke-width: 2; stroke-linejoin: round; }
.chart .dot { fill: var(--gold-2); }
.chart text { fill: var(--faint); font: 9px var(--mono); }
.steps { display: flex; gap: 5px; list-style: none; margin: 9px 0 2px; padding: 0; }
.steps li { flex: 1; text-align: center; font: 600 10px var(--mono); padding: 5px 0; border-radius: 6px; color: var(--faint); background: rgba(244, 234, 217, 0.06); transition: background .3s, color .3s; }
.steps li.done { color: #1a1006; background: var(--gold); }

/* hotspots on the group */
.hotspots { position: absolute; inset: 0; pointer-events: none; }
.hotspot { position: absolute; left: 0; top: 0; width: 38px; height: 38px; margin: -19px 0 0 -19px; border: 0; padding: 0; border-radius: 50%; background: transparent; cursor: pointer; opacity: 0; visibility: hidden; transform: translate(var(--x, -100px), var(--y, -100px)); transition: opacity .3s; }
.hotspot::before { content: ""; position: absolute; inset: 9px; border-radius: 50%; background: var(--gold-2); box-shadow: 0 0 0 4px rgba(240, 200, 121, 0.28), 0 0 22px rgba(240, 200, 121, 0.6); transition: transform .25s var(--ease); }
.hotspot::after { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 1.5px solid var(--gold-2); animation: ping 2s var(--ease) infinite; }
@keyframes ping { 0% { transform: scale(0.5); opacity: 0.9; } 100% { transform: scale(1.6); opacity: 0; } }
.hotspot span { position: absolute; left: 50%; bottom: calc(100% + 6px); transform: translateX(-50%) translateY(4px); white-space: nowrap; font-size: 12px; font-weight: 600; padding: 5px 10px; border-radius: 999px; background: var(--glass); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); opacity: 0; transition: opacity .2s, transform .2s; pointer-events: none; }
.hotspot:hover span, .hotspot:focus-visible span, .hotspot[aria-expanded="true"] span { opacity: 1; transform: translateX(-50%); }
.hotspot:hover::before, .hotspot[aria-expanded="true"]::before { transform: scale(1.25); }
.hotspot.live { visibility: visible; pointer-events: auto; }

/* spec panel */
.spec { position: absolute; right: 28px; top: 50%; transform: translateY(-50%); width: min(330px, calc(100% - 32px)); padding: 22px 22px 20px; border-radius: 18px; background: rgba(20, 14, 10, 0.86); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); box-shadow: inset 0 0 0 1px rgba(212, 162, 76, 0.35), 0 30px 60px rgba(0, 0, 0, 0.5); z-index: 5; animation: rise .35s var(--ease); }
.spec[hidden] { display: none; }
@keyframes rise { from { opacity: 0; transform: translateY(calc(-50% + 14px)); } to { opacity: 1; transform: translateY(-50%); } }
.spec .close { position: absolute; top: 10px; right: 10px; width: 34px; height: 34px; border-radius: 50%; border: 0; background: rgba(244, 234, 217, 0.08); color: var(--ink); font-size: 20px; line-height: 1; cursor: pointer; }
.spec .close:hover { background: rgba(244, 234, 217, 0.16); }
.spec .kicker { font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--gold); font-weight: 600; }
.spec h3 { font-size: 24px; line-height: 1.15; margin: 6px 36px 14px 0; }
.spec dl { display: grid; grid-template-columns: 1fr auto; gap: 0; margin: 0; }
.spec dt, .spec dd { padding: 8px 0; border-top: 1px solid var(--line); font-size: 14px; }
.spec dt { color: var(--dim); }
.spec dd { margin: 0; font-family: var(--mono); color: var(--ink); text-align: right; }
.spec .chart.big { margin-top: 14px; }
.spec .chart.big[hidden] { display: none; }
.spec .note { margin-top: 12px; font-size: 13px; color: var(--faint); }
.stage.spec-open .card { opacity: 0 !important; }

/* step rail */
.rail { position: absolute; left: 50%; bottom: 26px; transform: translateX(-50%); display: flex; gap: 10px; }
.rail button { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; width: clamp(64px, 9vw, 120px); padding: 6px 0; border: 0; background: none; color: var(--faint); font: 600 11px var(--sans); letter-spacing: 0.14em; text-transform: uppercase; cursor: pointer; }
.rail i { display: block; width: 100%; height: 2px; background: var(--line); border-radius: 2px; overflow: hidden; }
.rail b { display: block; height: 100%; width: 100%; background: var(--gold); transform-origin: left; transform: scaleX(0); }
.rail button.on { color: var(--ink); }
.rail button:hover { color: var(--gold-2); }

/* origins */
.origins, .recipe, .visit { padding: clamp(80px, 12vw, 150px) var(--gutter); }
.origins h2, .recipe h2 { font-size: clamp(34px, 4.6vw, 64px); line-height: 1.05; max-width: 16ch; }
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 46px; }
.origin { padding: 26px; border-radius: 20px; background: linear-gradient(160deg, var(--bg-3), var(--bg-2)); box-shadow: inset 0 0 0 1px var(--line); transition: transform .35s var(--ease), box-shadow .35s; }
.origin:hover { transform: translateY(-4px); box-shadow: inset 0 0 0 1px rgba(212, 162, 76, 0.4); }
.origin .where { font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--gold); font-weight: 600; }
.origin h3 { font-size: 26px; margin: 10px 0 6px; }
.origin .notes { color: var(--dim); }
.origin dl { display: grid; grid-template-columns: auto 1fr; gap: 4px 16px; margin: 20px 0 0; font-size: 14px; }
.origin dt { color: var(--faint); }
.origin dd { margin: 0; }
.roast { display: flex; gap: 6px; margin-top: 18px; }
.roast span { flex: 1; height: 4px; border-radius: 4px; background: var(--line); }
.roast span.on { background: var(--gold); }

/* recipe */
.recipe { display: grid; grid-template-columns: 1fr 1.1fr; gap: 40px; align-items: end; border-top: 1px solid var(--line); }
.recipe .muted { margin-top: 18px; max-width: 42ch; }
.spec-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; margin: 0; background: var(--line); border-radius: 18px; overflow: hidden; box-shadow: inset 0 0 0 1px var(--line); }
.spec-grid div { background: var(--bg-2); padding: 22px; }
.spec-grid dt { font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--faint); font-weight: 600; }
.spec-grid dd { margin: 6px 0 0; font-family: var(--mono); font-size: clamp(22px, 2.4vw, 30px); color: var(--ink); }

/* visit */
.visit { text-align: center; background: radial-gradient(60% 80% at 50% 100%, rgba(212, 162, 76, 0.16), transparent 70%); border-top: 1px solid var(--line); }
.visit h2 { font-size: clamp(44px, 7vw, 96px); line-height: 1; }
.visit .lead { color: var(--dim); margin: 20px auto 30px; max-width: 46ch; }
.foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; padding: 26px var(--gutter) 34px; font-size: 13px; color: var(--faint); border-top: 1px solid var(--line); }

/* tablet */
@media (max-width: 1099px) {
  .card { width: 190px; right: 24px; }
  .card .v { font-size: 22px; }
  .chapters { width: min(34vw, 360px); }
}

/* phone: subject on top, read-outs in a row, copy at the bottom */
@media (max-width: 759px) {
  .nav nav a:not(.btn) { display: none; }
  .process { height: 560vh; }
  .scrim { background: linear-gradient(180deg, transparent 46%, rgba(14, 10, 8, 0.82) 64%, rgba(14, 10, 8, 0.96) 100%); }
  .chapters { left: 20px; right: 20px; top: auto; bottom: 84px; transform: none; width: auto; height: 150px; }
  .ch { top: auto; bottom: 0; transform: translateY(calc((1 - var(--o, 0)) * 14px)); }
  .card { transform: translateY(calc((1 - var(--o, 0)) * 10px)); }
  .ch .num { margin-bottom: 8px; }
  .ch h2 { font-size: 27px; margin-bottom: 8px; }
  .ch p:not(.num) { font-size: 14.5px; line-height: 1.5; }
  .card { top: auto !important; bottom: 248px; right: auto; width: calc((100% - 52px) / 3); padding: 9px 10px; border-radius: 12px; }
  .card[data-slot="0"] { left: 16px; }
  .card[data-slot="1"] { left: calc(16px + (100% - 52px) / 3 + 10px); }
  .card[data-slot="2"] { left: calc(16px + 2 * ((100% - 52px) / 3 + 10px)); }
  .card .k { font-size: 9px; letter-spacing: 0.08em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .card .v { font-size: 18px; }
  .card .v small { font-size: 11px; }
  .card.ring { display: block; }
  .card.ring svg { display: none; }
  .card .bars, .card .chart, .meter, .card .wide { display: none; }
  .card .v.narrow { display: flex; }
  .steps { margin-top: 5px; gap: 2px; }
  .steps li { font-size: 8px; padding: 3px 0; }
  .rail { bottom: 22px; left: 20px; right: 20px; transform: none; gap: 8px; }
  .rail button { flex: 1; width: auto; font-size: 10px; letter-spacing: 0.06em; }
  .spec { right: 12px; left: 12px; top: auto; bottom: 12px; width: auto; transform: none; max-height: 78%; overflow: auto; background: rgba(20, 14, 10, 0.97); animation: sheet .35s var(--ease); }
  .stage.spec-open .chapters, .stage.spec-open .rail { opacity: 0; }
  @keyframes sheet { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: none; } }
  .cards { grid-template-columns: 1fr; }
  .recipe { grid-template-columns: 1fr; }
  .spec-grid { grid-template-columns: repeat(2, 1fr); }
  .hero h1 { font-size: clamp(48px, 15vw, 72px); }
  .hero-bean { width: 92vw; right: -34vw; top: 24%; opacity: 0.55; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .grain, .cue span, .hotspot::after { animation: none; }
}

/* Zentro demo label (2026-11-17): every demo says it is a demo */
.zdemo { position: fixed; left: 12px; bottom: 12px; z-index: 60; max-width: calc(100vw - 24px); padding: 7px 12px; border-radius: 999px; font: 12px/1.3 system-ui, sans-serif; color: #e9e2dc; background: rgba(14, 10, 8, 0.72); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border: 1px solid rgba(255, 255, 255, 0.12); }
.zdemo a { color: #fff; }
