/* Hallmark: Fast Coffee bean-to-cup story · roast-room direction · 2026-11-18 */
/* Fast Coffee «Bean to Cup» — tokens are law (DESIGN.md) */
@font-face { font-family: "Kanit"; src: url(../fonts/kanit-800i-latin.woff2) format("woff2"); font-weight: 800; font-style: italic; font-display: swap; }
@font-face { font-family: "Kanit"; src: url(../fonts/kanit-400-latin.woff2) format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Kanit"; src: url(../fonts/kanit-500-latin.woff2) format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Martian Mono"; src: url(../fonts/martianmono-var-latin.woff2) format("woff2"); font-weight: 100 800; font-stretch: 75% 112.5%; font-display: swap; }

:root {
  --roast: #120A06;
  --roast-2: #1E120B;
  --roast-3: #2A1A10;
  --crema: #E9B77A;
  --speed: #FFD102;
  --milk: #F3ECE2;
  --ash: #A79A8C;
  --rule: rgba(243, 236, 226, .14);
  --ink: #100300;
  --night: #0B0604;
  --text-2: rgba(243, 236, 226, .8);
  --scrim: rgba(13, 7, 5, .72);
  --scrim-soft: rgba(13, 7, 5, .25);
  --scrim-deep: rgba(13, 7, 5, .9);
  --edge: rgba(5, 2, 1, .55);
  --plate: rgba(18, 10, 6, .86);
  --speed-line: rgba(255, 209, 2, .5);
  --glow-a: rgba(255, 170, 40, .34);
  --glow-b: rgba(255, 120, 20, .10);
  --glow-final: rgba(255, 160, 30, .26);
  --shade: rgba(0, 0, 0, .55);
  --sheen: rgba(255, 255, 255, .55);
  --paper-plate: rgba(255, 255, 255, .9);

  --f-display: "Kanit", "Arial Narrow", system-ui, sans-serif;
  --f-text: "Kanit", system-ui, sans-serif;
  --f-mono: "Martian Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --ease-io: cubic-bezier(.65, 0, .35, 1);
  --pad: clamp(20px, 5.2vw, 88px);
  --radius: 2px;
}

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--roast); color: var(--milk); -webkit-text-size-adjust: 100%; overflow-x: clip; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
body { margin: 0; font: 400 17px/1.55 var(--f-text); letter-spacing: .005em; overflow-x: clip; }
img, canvas, video { display: block; max-width: 100%; }
a { color: inherit; }
.mono { font-family: var(--f-mono); font-size: 12px; letter-spacing: .04em; text-transform: uppercase; font-stretch: 100%; }
.skip { position: absolute; left: -9999px; top: 0; z-index: 100; background: var(--speed); color: var(--ink); padding: 10px 14px; }
.skip:focus { left: 12px; top: 12px; }
:focus-visible { outline: 2px solid var(--speed); outline-offset: 3px; }

/* ---------- buttons: a slanted plate, the brand's −18° cut ---------- */
.btn {
  --h: 54px;
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: var(--h); padding: 0 28px; border: 0; text-decoration: none; cursor: pointer;
  font: 800 italic 18px/1 var(--f-display); letter-spacing: .01em; color: var(--ink); background: var(--speed);
  clip-path: polygon(10px 0, 100% 0, calc(100% - 10px) 100%, 0 100%);
  transition: transform .25s var(--ease-out), background-color .25s var(--ease-out);
  isolation: isolate; overflow: hidden;
}
.btn::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(105deg, transparent 30%, var(--sheen) 46%, transparent 62%); transform: translateX(-120%); transition: transform .6s var(--ease-out); }
.btn:hover { transform: translateY(-2px); }
.btn:hover::after { transform: translateX(120%); }
.btn:active { transform: translateY(0) scale(.98); }
.btn--sm { --h: 40px; padding: 0 18px; font-size: 15px; }
.btn--lg { --h: 64px; padding: 0 38px; font-size: 21px; }

/* ---------- top bar ---------- */
.bar { position: fixed; inset: 0 0 auto 0; z-index: 30; display: flex; align-items: center; gap: 20px; padding: 16px var(--pad); pointer-events: none; }
.bar > * { pointer-events: auto; }
.bar__brand img { width: 104px; height: auto; }
.bar__slate { margin: 0 auto 0 8px; display: flex; align-items: center; gap: 12px; font: 500 11px/1 var(--f-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--ash); }
.bar__dot { width: 6px; height: 6px; border-radius: 50%; background: var(--speed); box-shadow: 0 0 12px var(--speed); }

/* ---------- the stage ---------- */
.stage { position: relative; height: 760vh; height: 760svh; }
.stage__pin { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; background: var(--roast); }
.stage__poster, .stage__poster img, .stage__gl, .stage__intro { position: absolute; inset: 0; width: 100%; height: 100%; }
.stage__poster img { object-fit: cover; }
.stage__gl { opacity: 0; transition: opacity .6s linear; }
.stage__gl.is-live { opacity: 1; }
.stage__intro { object-fit: cover; opacity: 0; transition: opacity .3s linear; }
.stage__intro.is-on { opacity: 1; }
.stage__grade { position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(90deg, var(--scrim) 0%, var(--scrim-soft) 38%, transparent 55%),
    radial-gradient(120% 90% at 60% 50%, transparent 55%, var(--edge) 100%);
}
.stage__grade::after { content: ""; position: absolute; inset: -50%; opacity: .07; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='160' height='160' filter='url(%23n)'/></svg>");
}

.copy { position: absolute; left: var(--pad); bottom: clamp(48px, 11vh, 120px); width: min(520px, 40vw); z-index: 5; }
.copy__kicker { margin: 0 0 18px; color: var(--crema); }
.copy__title { margin: 0 0 28px; font: 800 italic clamp(60px, 6.6vw, 118px)/.88 var(--f-display); letter-spacing: -.025em; color: var(--milk); white-space: nowrap; }
.h2 { text-wrap: balance; }
.copy__title .line { display: block; overflow: hidden; padding: 0 .08em .06em 0; margin-bottom: -.06em; }
.copy__title .line > span { display: block; }
.copy__title .line:last-child > span { color: var(--speed); }
.chapters { position: relative; height: 112px; margin-bottom: 30px; }
.ch { position: absolute; inset: 0; }
.ch__no { margin: 0 0 10px; display: flex; gap: 12px; align-items: baseline; color: var(--milk); }
.ch__no b { color: var(--speed); font-weight: 700; }
.ch__text { margin: 0; max-width: 46ch; font-size: 18px; line-height: 1.5; color: var(--text-2); }
.ch:not(.is-on) { visibility: hidden; }
.ch .w { display: inline-block; overflow: hidden; vertical-align: top; }
.ch .w > span { display: inline-block; }

.rail { position: absolute; right: var(--pad); top: 50%; transform: translateY(-50%); z-index: 5; display: flex; gap: 14px; height: min(46vh, 380px); }
.rail__track { position: relative; width: 1px; height: 100%; background: var(--rule); }
.rail__fill { position: absolute; inset: 0; background: var(--speed); transform-origin: top; transform: scaleY(0); }
.rail__marks { list-style: none; margin: 0; padding: 0; position: relative; height: 100%; font: 500 10px/1 var(--f-mono); color: var(--ash); }
.rail__marks li { position: absolute; left: 0; transform: translateY(-50%); transition: color .3s; }
.rail__marks li.is-on { color: var(--speed); }
.hint { position: absolute; left: 50%; bottom: 22px; transform: translateX(-50%); z-index: 5; margin: 0; display: flex; flex-direction: column; align-items: center; gap: 10px; color: var(--ash); font-size: 10px; transition: opacity .4s; }
.hint__line { width: 1px; height: 38px; background: linear-gradient(var(--speed), transparent); transform-origin: top; animation: hint 1.8s var(--ease-io) infinite; }
@keyframes hint { 0% { transform: scaleY(0); } 50% { transform: scaleY(1); transform-origin: top; } 51% { transform-origin: bottom; } 100% { transform: scaleY(0); transform-origin: bottom; } }
.is-scrolled .hint { opacity: 0; }

/* ---------- 360 station ---------- */
.spin { position: relative; height: 340vh; height: 340svh; background: var(--roast); }
.spin__pin { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; }
.spin__glow { position: absolute; right: calc(6vw + min(46vh, 26vw)); top: 50%; width: 120vmin; height: 120vmin; transform: translate(50%, -50%) scale(var(--glow, .6)); background: radial-gradient(closest-side, var(--glow-a), var(--glow-b) 50%, transparent 72%); opacity: var(--glowA, 0); }
.spin__box { position: absolute; right: 6vw; top: 50%; width: min(92vh, 52vw); aspect-ratio: 1; transform: translateY(-50%); }
.spin__cv { width: 100%; height: 100%; }
.spin__copy { position: absolute; left: var(--pad); top: 50%; transform: translateY(-50%); width: min(560px, 40vw); z-index: 2; }
.eyebrow { margin: 0 0 18px; color: var(--crema); display: flex; gap: 12px; }
.eyebrow b { color: var(--speed); font-weight: 700; }
.h2 { margin: 0 0 28px; font: 800 italic clamp(40px, 4.4vw, 76px)/.92 var(--f-display); letter-spacing: -.02em; }
.h2--xl { font-size: clamp(48px, 6vw, 108px); }
.spec { margin: 0; }
.spec__row { display: grid; grid-template-columns: 110px 1fr; gap: 16px; padding: 14px 0; border-top: 1px solid var(--rule); }
.spec__row dt { color: var(--ash); padding-top: 4px; }
.spec__row dd { margin: 0; font-size: 16px; }
.steps { list-style: none; margin: 0; padding: 0; position: absolute; inset: 0; pointer-events: none; }
.steps__i { position: absolute; left: var(--x); top: var(--y); display: flex; align-items: center; gap: 10px; padding: 8px 14px 8px 8px; background: var(--plate); border: 1px solid var(--speed-line); font: 500 14px/1 var(--f-text); white-space: nowrap; transition: opacity .45s var(--ease-out), transform .45s var(--ease-out); }
.steps__i b { display: grid; place-items: center; width: 26px; height: 26px; background: var(--speed); color: var(--ink); font-size: 10px; }
.steps__i::before { content: ""; position: absolute; left: -22px; top: 50%; width: 22px; height: 1px; background: var(--speed); }
.js .steps__i { opacity: 0; transform: translate(-6px, 8px); }
.js .steps.is-on .steps__i { opacity: 1; transform: none; }
.steps.is-on .steps__i:nth-child(2) { transition-delay: .12s; }
.steps.is-on .steps__i:nth-child(3) { transition-delay: .24s; }

/* ---------- deal ---------- */
.deal { position: relative; padding: clamp(96px, 16vh, 180px) var(--pad); background: linear-gradient(var(--roast), var(--roast-2) 30%, var(--roast-2)); }
.deal__head { max-width: 720px; margin-bottom: clamp(40px, 7vh, 72px); }
.lead { margin: 0; max-width: 54ch; font-size: 19px; line-height: 1.55; color: var(--text-2); }
.ledger { list-style: none; margin: 0; padding: 0; }
.ledger__row { position: relative; display: grid; grid-template-columns: minmax(140px, 3fr) 5fr 5fr; align-items: baseline; gap: 24px; padding: clamp(22px, 3.4vh, 34px) 0; }
.ledger__row::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 1px; background: var(--rule); transform-origin: left; transform: scaleX(var(--draw, 1)); }
.ledger__k { color: var(--ash); }
.ledger__v { font: 800 italic clamp(40px, 5.2vw, 88px)/1 var(--f-display); letter-spacing: -.02em; color: var(--milk); }
.ledger__row:first-child .ledger__v { color: var(--speed); }
.ledger__v i { font-style: italic; font-weight: 400; font-size: .42em; color: var(--ash); padding: 0 .2em; vertical-align: middle; }
.ledger__v small { font-size: .38em; color: var(--ash); letter-spacing: 0; }
.ledger__d { font-size: 16px; color: var(--text-2); max-width: 44ch; }
.deal__note { margin: 24px 0 0; padding-top: 18px; border-top: 1px solid var(--rule); color: var(--ash); text-transform: none; letter-spacing: .02em; }

/* ---------- on site ---------- */
.onsite { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 6vw, 110px); align-items: center; padding: clamp(80px, 14vh, 160px) var(--pad); background: var(--roast-2); }
.onsite__fig { position: relative; margin: 0; }
.onsite__fig::before { content: ""; position: absolute; inset: 18px -18px -18px 18px; background: var(--speed); clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%, 0 0, 8px 8px, 8px calc(100% - 8px), calc(100% - 8px) calc(100% - 8px), calc(100% - 8px) 8px, 8px 8px); }
.onsite__fig img { position: relative; width: 100%; height: auto; aspect-ratio: 3 / 4; object-fit: cover; }
.drinks { list-style: none; margin: 30px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.drinks li { padding: 9px 12px; border: 1px solid var(--rule); color: var(--milk); font-size: 11px; }

/* ---------- final ---------- */
.final { position: relative; display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); align-items: center; gap: 40px; min-height: 100vh; padding: clamp(80px, 12vh, 140px) var(--pad); overflow: hidden; background: radial-gradient(40% 55% at 76% 55%, var(--glow-final), transparent 70%), var(--roast); }
.final__station { grid-column: 2; grid-row: 1; justify-self: center; width: auto; height: min(80vh, 760px); filter: drop-shadow(0 40px 60px var(--shade)); }
.final__copy { grid-column: 1; grid-row: 1; }
.final__actions { margin-top: 36px; display: flex; flex-wrap: wrap; align-items: center; gap: 22px 30px; }
.tel { font-size: 15px; text-decoration: none; border-bottom: 1px solid var(--speed); padding-bottom: 4px; }
.tel:hover { color: var(--speed); }

/* ---------- footer ---------- */
.foot { padding: 48px var(--pad) 36px; background: var(--night); border-top: 1px solid var(--rule); }
.foot__row { display: flex; flex-wrap: wrap; align-items: center; gap: 22px 36px; color: var(--ash); }
.foot__row p { margin: 0; text-transform: none; line-height: 1.7; }
.foot__link { margin-left: auto; text-decoration: none; color: var(--milk); }
.credit { margin-top: 32px; display: inline-flex; align-items: center; gap: 14px; text-decoration: none; color: var(--ash); font-size: 14px; }
.credit:hover { color: var(--milk); }
.credit__plate { display: inline-grid; place-items: center; padding: 4px 8px; background: var(--paper-plate); border-radius: var(--radius); }
.credit__plate img { height: 36px; width: auto; }

/* ---------- mobile dock (sticky request button from the 2nd screen) ---------- */
.dock { position: fixed; left: 12px; right: 62px; bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 40; display: none; height: 56px; align-items: center; justify-content: center; gap: 10px; text-decoration: none; font: 800 italic 18px/1 var(--f-display); color: var(--ink); background: var(--speed); clip-path: polygon(10px 0, 100% 0, calc(100% - 10px) 100%, 0 100%); transform: translateY(140%); transition: transform .45s var(--ease-out); box-shadow: 0 10px 30px var(--shade); }
.dock.is-on { transform: none; }

/* reveal helpers (JS adds .rv to parents) */
.js .rv-up { opacity: 0; transform: translateY(26px); transition: opacity .8s var(--ease-out), transform .9s var(--ease-out); }
.js .is-in .rv-up, .js .rv-up.is-in { opacity: 1; transform: none; }

/* ---------- phone profile ---------- */
@media (max-width: 760px) {
  body { font-size: 16px; }
  .bar { padding: 12px 16px; gap: 10px; }
  .bar__brand img { width: 84px; }
  .bar__slate { display: none; }
  .bar .btn--sm { margin-left: auto; --h: 38px; font-size: 14px; padding: 0 16px; }
  .stage { height: 640vh; height: 640svh; }
  .stage__grade { background: linear-gradient(180deg, transparent 40%, var(--scrim-deep) 66%, var(--night) 100%); }
  .copy { left: 20px; right: 20px; width: auto; bottom: calc(22px + env(safe-area-inset-bottom)); }
  .copy__kicker { margin-bottom: 10px; font-size: 10px; }
  .copy__title { font-size: clamp(46px, 13.2vw, 60px); margin-bottom: 16px; }
  .chapters { height: 104px; margin-bottom: 16px; }
  .ch__no { margin-bottom: 6px; }
  .ch__text { font-size: 15.5px; }
  .copy__cta { width: calc(100% - 50px); --h: 54px; }
  .rail { right: 12px; top: 96px; transform: none; height: 30vh; }
  .rail__marks { display: none; }
  .hint { display: none; }

  .spin { height: 300vh; height: 300svh; }
  .spin__box { right: auto; left: 50%; top: 64px; width: min(100vw, 62vh); transform: translateX(-50%); }
  .spin__glow { right: 50%; top: calc(64px + min(50vw, 31vh)); }
  .spin__copy { left: 20px; right: 20px; top: auto; bottom: 88px; width: auto; transform: none; }
  .spin__copy .h2 { font-size: 38px; margin-bottom: 14px; }
  .spec__row { grid-template-columns: 90px 1fr; padding: 8px 0; gap: 10px; }
  .spec__row dd { font-size: 14px; }
  .spec__row:nth-child(n+4) { display: none; }
  .steps__i { font-size: 12px; padding: 6px 10px 6px 6px; }
  .steps__i b { width: 22px; height: 22px; }

  .deal { padding: 80px 20px 72px; }
  .ledger__row { grid-template-columns: 1fr; gap: 8px; padding: 22px 0; }
  .ledger__v { font-size: 48px; }
  .lead { font-size: 17px; }
  .onsite { grid-template-columns: minmax(0, 1fr); padding: 72px 20px; }
  .onsite__fig { margin-right: 18px; }
  .final { grid-template-columns: minmax(0, 1fr); min-height: auto; padding: 80px 20px 100px; gap: 24px; }
  .final__station { grid-column: 1; grid-row: 1; height: 420px; }
  .final__copy { grid-column: 1; grid-row: 2; }
  .final__actions .btn { width: calc(100% - 50px); }
  .foot { padding-bottom: 96px; }
  .foot__link { margin-left: 0; }
  .credit { flex-wrap: wrap; }
  .dock { display: flex; }
  .copy__cta { transition: opacity .25s var(--ease-out); }
  .is-scrolled .copy__cta { opacity: 0; pointer-events: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; }
}
