/* ==========================================================================
   Cà Phê Lát
   1. Fonts + tokens      6. Home: about        11. Product page
   2. Base + helpers      7. Shop cards         12. Story + contact
   3. Header + menu       8. Recipes            13. Footer
   4. Loader              9. Recipe page        14. Motion
   5. Scroll films       10. PHIN diagrams      15. Phones
   ========================================================================== */

/* 1. Fonts + tokens -------------------------------------------------------
   Brand type, self-hosted (SIL Open Font License):
     Frank Ruhl Libre  Hebrew headlines
     Heebo             body and interface
     Be Vietnam Pro    Latin data: CẦU ĐẤT, WASHED, 1 KG
     Amatic SC         the personal signature only                          */
@font-face { font-family: 'Frank Ruhl Libre'; font-weight: 300 900; font-display: swap; src: url('../assets/fonts/frank-ruhl-libre.woff2') format('woff2'); unicode-range: U+0307-0308, U+0590-05FF, U+200C-2010, U+20AA, U+25CC, U+FB1D-FB4F; }
@font-face { font-family: 'Frank Ruhl Libre'; font-weight: 300 900; font-display: swap; src: url('../assets/fonts/frank-ruhl-libre-latin.woff2') format('woff2'); unicode-range: U+0000-00FF, U+2000-206F, U+2190-2199; }
@font-face { font-family: 'Heebo'; font-weight: 100 900; font-display: swap; src: url('../assets/fonts/heebo.woff2') format('woff2'); unicode-range: U+0307-0308, U+0590-05FF, U+200C-2010, U+20AA, U+25CC, U+FB1D-FB4F; }
@font-face { font-family: 'Heebo'; font-weight: 100 900; font-display: swap; src: url('../assets/fonts/heebo-latin.woff2') format('woff2'); unicode-range: U+0000-00FF, U+2000-206F, U+2190-2199; }
@font-face { font-family: 'Be Vietnam Pro'; font-weight: 400; font-display: swap; src: url('../assets/fonts/be-vietnam-pro-400.woff2') format('woff2'); unicode-range: U+0000-00FF, U+2000-206F; }
@font-face { font-family: 'Be Vietnam Pro'; font-weight: 400; font-display: swap; src: url('../assets/fonts/be-vietnam-pro-vi-400.woff2') format('woff2'); unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB; }
@font-face { font-family: 'Be Vietnam Pro'; font-weight: 500; font-display: swap; src: url('../assets/fonts/be-vietnam-pro-500.woff2') format('woff2'); unicode-range: U+0000-00FF, U+2000-206F; }
@font-face { font-family: 'Be Vietnam Pro'; font-weight: 500; font-display: swap; src: url('../assets/fonts/be-vietnam-pro-vi-500.woff2') format('woff2'); unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB; }
@font-face { font-family: 'Be Vietnam Pro'; font-weight: 600; font-display: swap; src: url('../assets/fonts/be-vietnam-pro-600.woff2') format('woff2'); unicode-range: U+0000-00FF, U+2000-206F; }
@font-face { font-family: 'Be Vietnam Pro'; font-weight: 600; font-display: swap; src: url('../assets/fonts/be-vietnam-pro-vi-600.woff2') format('woff2'); unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB; }
@font-face { font-family: 'Amatic SC'; font-weight: 700; font-display: swap; src: url('../assets/fonts/amatic-sc-he-700.woff2') format('woff2'); unicode-range: U+0590-05FF, U+200C-2010, U+20AA, U+FB1D-FB4F; }
@font-face { font-family: 'Amatic SC'; font-weight: 700; font-display: swap; src: url('../assets/fonts/amatic-sc-700.woff2') format('woff2'); unicode-range: U+0000-00FF, U+2000-206F; }

:root {
  /* Brand palette */
  --paper: #F4F1E8;        /* warm paper */
  --ink: #233F2E;          /* green ink */
  --ochre: #98643D;        /* complementary */
  --field-green: #E2E6D8;  /* info field: arabica */
  --field-sand: #EADCC9;   /* info field: robusta */
  /* Derived */
  --ink-2: #5A6A5D;
  --line: rgba(35, 63, 46, .18);
  --ochre-light: #DDB58E;  /* ochre, lifted for use over film */
  --night: #121C15;

  --display: 'Frank Ruhl Libre', 'David', serif;
  --sans: 'Heebo', system-ui, 'Arial Hebrew', sans-serif;
  --data: 'Be Vietnam Pro', 'Heebo', sans-serif;
  --hand: 'Amatic SC', 'Frank Ruhl Libre', cursive;

  --ease: cubic-bezier(.2, .7, .1, 1);
  --pad: clamp(18px, 4vw, 56px);
}

/* 2. Base + helpers ------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { background: var(--paper); color: var(--ink); -webkit-font-smoothing: antialiased; overflow-x: hidden; overflow-x: clip; }
body { background: var(--paper); font: 400 17px/1.7 var(--sans); overflow-x: hidden; overflow-x: clip; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; background: none; border: 0; }
input, textarea { font: inherit; color: inherit; }
a, button, input, textarea { -webkit-tap-highlight-color: transparent; }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible { outline: 2px solid var(--ochre); outline-offset: 4px; }
::selection { background: var(--ink); color: var(--paper); }
h1, h2, h3 { font-family: var(--display); font-weight: 500; letter-spacing: -.012em; line-height: 1.08; text-wrap: balance; }
ol, ul { list-style: none; }

/* Latin data lines: Vietnamese names, process, weights */
.data { font-family: var(--data); font-size: .78em; font-weight: 500; letter-spacing: .09em; direction: ltr; unicode-bidi: isolate; }
.kicker { display: inline-block; padding-bottom: 9px; border-bottom: 1px solid var(--line); font-size: 15px; font-weight: 500; color: var(--ochre); }
.sign { font: 700 34px/1 var(--hand); letter-spacing: .02em; color: var(--ochre); }
.sign .data { font-size: .5em; letter-spacing: .12em; color: var(--ink-2); vertical-align: middle; }

/* The logo and symbol are cut-outs painted with the current text colour,
   so one file serves the paper pages and the film. */
.logo, .symbol { display: block; background: currentColor; -webkit-mask: var(--src) center / contain no-repeat; mask: var(--src) center / contain no-repeat; }
.logo { --src: url('../assets/brand/wordmark.png'); aspect-ratio: 1000 / 231; width: 158px; }
.symbol { --src: url('../assets/brand/symbol.png'); aspect-ratio: 640 / 635; width: 64px; }

.btn {
  display: inline-flex; align-items: center; gap: 12px;
  padding: 14px 26px; border-radius: 99px;
  background: var(--ink); color: var(--paper);
  font-size: 16px; font-weight: 500;
  transition: transform .4s var(--ease), background-color .3s, color .3s;
}
.btn i { font-style: normal; transition: transform .4s var(--ease); }
.btn:hover { transform: translateY(-2px); }
.btn:hover i { transform: translateX(-4px); }
.btn.ghost { background: none; color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.btn.ghost:hover { background: var(--ink); color: var(--paper); }
.btn.light { background: var(--paper); color: var(--ink); }
.lnk { display: inline-flex; gap: 10px; padding-bottom: 5px; border-bottom: 1px solid currentColor; font-weight: 500; }
.lnk i { font-style: normal; transition: transform .4s var(--ease); }
.lnk:hover i { transform: translateX(-4px); }

.section { padding: clamp(64px, 10vh, 120px) var(--pad); }
.head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 24px; margin-bottom: clamp(36px, 6vh, 60px); }
.head h2 { font-size: clamp(42px, 5.6vw, 88px); }
.head .kicker + h2 { margin-top: 20px; }
.head p { max-width: 420px; color: var(--ink-2); }

/* 3. Header + menu -------------------------------------------------------- */
.bar { position: fixed; inset: 0 0 auto; z-index: 20; display: flex; align-items: center; gap: 48px; padding: 18px var(--pad); transition: color .45s; }
.bar::before {
  content: ''; position: absolute; inset: 0; z-index: -1;
  background: rgba(244, 241, 232, .86);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line); opacity: 0; transition: opacity .45s;
}
.bar.on-light::before { opacity: 1; }
.bar.on-dark { color: var(--paper); }

.links { display: flex; gap: 34px; margin-inline-end: auto; font-size: 17px; }
.links a { position: relative; opacity: .82; transition: opacity .3s; }
.links a::after { content: ''; position: absolute; inset: auto 0 -5px; height: 1px; background: currentColor; transform: scaleX(0); transform-origin: 0; transition: transform .45s var(--ease); }
.links a:hover, .links a[aria-current] { opacity: 1; }
.links a:hover::after, .links a[aria-current]::after { transform: scaleX(1); transform-origin: 100%; }

.pill { display: inline-flex; align-items: center; gap: 10px; padding: 11px 22px; border-radius: 99px; background: var(--ink); color: var(--paper); font-size: 16px; font-weight: 500; white-space: nowrap; transition: background-color .45s, color .45s, transform .35s var(--ease); }
.pill:hover { transform: translateY(-1px); }
.bar.on-dark .pill { background: var(--paper); color: var(--ink); }

.menu-toggle, .menu-panel { display: none; }

/* 4. Loader ----------------------------------------------------------------
   Green screen, the symbol fills with ivory as the film downloads, then the
   screen lifts like a curtain. --load (0..1) is set from scrub.js.          */
.loader { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; background: var(--ink); color: var(--paper); transition: transform 1s cubic-bezier(.76, 0, .24, 1), visibility 1s; }
.loader.done { transform: translateY(-100%); visibility: hidden; }
.loader-inner { display: grid; justify-items: center; gap: 26px; transition: opacity .35s, transform .6s var(--ease); }
.loader.done .loader-inner { opacity: 0; transform: translateY(-30px); }
.loader-mark { position: relative; width: clamp(112px, 16vw, 150px); aspect-ratio: 640 / 635; }
.loader-mark .symbol { position: absolute; inset: 0; width: 100%; }
.loader-mark .symbol:first-child { opacity: .2; }
.loader-mark .symbol:last-child { clip-path: inset(calc(100% - var(--load, 0) * 100%) 0 0 0); transition: clip-path .35s ease; }
.loader .logo { width: clamp(150px, 20vw, 190px); }
.loader-line { font-family: var(--data); font-size: 11px; font-weight: 500; letter-spacing: .28em; direction: ltr; opacity: .7; }

/* 5. Scroll films ------------------------------------------------------------ */
.scrub-track { position: relative; height: 400vh; background: var(--night); color: var(--paper); }
.scrub-stage { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; }
.stage-poster, .scrub-stage video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.scrub-stage video { transition: opacity .6s ease; }
.is-loading .scrub-stage video { opacity: 0; }
.stage-vignette { position: absolute; inset: 0; pointer-events: none; background: radial-gradient(120% 90% at 50% 50%, transparent 55%, rgba(8, 14, 10, .55) 100%), linear-gradient(to bottom, rgba(8, 14, 10, .5), transparent 24%, transparent 70%, rgba(8, 14, 10, .62)); }
.stage-grain { position: absolute; inset: -50%; pointer-events: none; opacity: .07; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)'/%3E%3C/svg%3E"); animation: grain .9s steps(2) infinite; }
@keyframes grain { 0% { transform: translate(0, 0); } 50% { transform: translate(2%, -1%); } 100% { transform: translate(-1%, 2%); } }

.cap { position: absolute; z-index: 5; padding: 0 20px; opacity: 0; visibility: hidden; will-change: opacity, transform; }
.cap-0 { inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.cap-1 { inset-inline-start: clamp(1.2rem, 7vw, 6rem); bottom: 16vh; max-width: 34rem; }
.cap-title { font-size: clamp(3.2rem, 8vw, 7.2rem); line-height: 1.02; text-shadow: 0 2px 34px rgba(0, 0, 0, .5); }
.roast-caption h2 em { font-style: normal; color: var(--ochre-light); }
/* Second headline line: same white as the first */
.cap-title em { font-style: normal; color: inherit; }
.cap-head { font-size: clamp(2.3rem, 4.8vw, 4.2rem); text-shadow: 0 2px 34px rgba(0, 0, 0, .55); }
.cap-sub { max-width: 34rem; margin-top: 1.3rem; font-size: 1.2rem; line-height: 1.6; color: rgba(244, 241, 232, .9); text-shadow: 0 1px 14px rgba(0, 0, 0, .65); }
.cap-body { max-width: 28rem; margin-top: 1rem; font-size: 1.15rem; line-height: 1.6; color: rgba(244, 241, 232, .9); text-shadow: 0 1px 14px rgba(0, 0, 0, .65); }
.cap .data { display: block; margin-bottom: 1rem; color: var(--ochre-light); text-shadow: 0 1px 14px rgba(0, 0, 0, .65); }
.scroll-hint { position: absolute; left: 50%; bottom: 7vh; transform: translateX(-50%); font-size: .85rem; letter-spacing: .08em; color: rgba(244, 241, 232, .75); }
.scroll-hint span { display: block; width: 1px; height: 38px; margin: 0 auto .8rem; background: linear-gradient(to bottom, transparent, var(--ochre-light)); animation: drip 1.8s ease-in-out infinite; }
@keyframes drip { 0% { transform: scaleY(0); transform-origin: top; } 45% { transform: scaleY(1); transform-origin: top; } 55% { transform: scaleY(1); transform-origin: bottom; } 100% { transform: scaleY(0); transform-origin: bottom; } }

/* The closing beat of the intro: the film darkens, the symbol and wordmark
   arrive, then the note from Gleb and Ilana appears line by line.
   Each piece reads --t (0..1), set per element from home.js.               */
.film-dim { position: absolute; inset: 0; z-index: 4; background: radial-gradient(90% 70% at 50% 50%, rgba(10, 18, 13, .82), rgba(10, 18, 13, .52)); opacity: var(--dim, 0); pointer-events: none; }
.cap-end { position: absolute; inset: 0; z-index: 5; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0; padding: 90px 24px 60px; text-align: center; pointer-events: none; }
.cap-end > * { opacity: var(--t, 0); transform: translateY(calc((1 - var(--t, 0)) * 26px)); will-change: opacity, transform; }
.cap-end .symbol { width: clamp(64px, 7vw, 92px); transform: translateY(calc((1 - var(--t, 0)) * 26px)) scale(calc(.82 + var(--t, 0) * .18)); }
.cap-end .logo { width: clamp(190px, 21vw, 300px); margin-top: 22px; }
.cap-end .rule { width: 56px; height: 1px; margin: 30px 0 26px; background: var(--ochre-light); transform: scaleX(var(--t, 0)); }
.cap-end p { max-width: 21em; font: 400 clamp(1.5rem, 2.5vw, 2.3rem)/1.4 var(--display); text-shadow: 0 2px 26px rgba(0, 0, 0, .5); }
.cap-end p + p { margin-top: .35em; }
.cap-end .sign { margin-top: 24px; font-size: clamp(40px, 4vw, 56px); color: var(--ochre-light); }

/* Roast film (story page) */
.roast-track { background: var(--night); }
#roastFinaleVideo { z-index: 1; opacity: 0; pointer-events: none; will-change: opacity; }
.roast-track .stage-vignette { z-index: 2; background: linear-gradient(to bottom, rgba(8, 14, 10, .5), transparent 24%), linear-gradient(to top left, rgba(8, 14, 10, .74), transparent 58%); }
.roast-caption, .roast-end, .roast-last { position: absolute; z-index: 4; inset-inline-start: 7%; bottom: 14%; max-width: 80%; }
.roast-caption h2, .roast-end h2, .roast-last h2 { margin-bottom: 18px; font-size: clamp(42px, 5.6vw, 88px); text-shadow: 0 2px 34px rgba(0, 0, 0, .55); }
.roast-last h2 em { font-style: normal; color: var(--ochre-light); }
.roast-caption p, .roast-end p { font-size: 18px; text-shadow: 0 1px 14px rgba(0, 0, 0, .65); }
.roast-end, .roast-last { opacity: 0; }

/* Paper panels rise over the film with rounded shoulders */
.rise { position: relative; z-index: 2; margin-top: -28px; border-radius: 28px 28px 0 0; background: var(--paper); box-shadow: 0 -30px 60px -40px rgba(8, 14, 10, .6); }

/* 6. Home: about ---------------------------------------------------------- */
.about { display: grid; grid-template-columns: minmax(0, 380px) minmax(0, 540px); justify-content: center; gap: clamp(40px, 7vw, 120px); align-items: center; }
.frame { position: relative; width: 100%; max-width: 380px; margin: 0; justify-self: center; }
.frame img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 200px 200px 18px 18px; background: var(--field-green); }
.frame figcaption { position: absolute; inset-inline-start: 18px; bottom: 18px; padding: 7px 14px; border-radius: 99px; background: rgba(244, 241, 232, .92); font-size: 13px; color: var(--ink-2); }
.frame .symbol { position: absolute; inset-inline-end: -22px; top: 8%; width: 92px; padding: 0; color: var(--ink); filter: drop-shadow(0 0 0 var(--paper)); }
.frame .stamp-bg { position: absolute; inset-inline-end: -34px; top: calc(8% - 12px); width: 116px; aspect-ratio: 1; border-radius: 50%; background: var(--paper); }
.about h2 { margin: 0 0 26px; font-size: clamp(40px, 4.8vw, 76px); }
.about p { max-width: 30em; margin-bottom: 1.1em; font-size: 19px; color: var(--ink-2); }
.about p.lead { font: 400 clamp(22px, 2vw, 28px)/1.5 var(--display); color: var(--ink); }
.about .sign { display: block; margin: 26px 0 30px; }


/* 7. Shop cards -----------------------------------------------------------
   Four across on desktop, two on tablets and phones. */
.shop { border-top: 1px solid var(--line); }
.lots { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(14px, 2vw, 28px); }
.lot { display: flex; flex-direction: column; }
.ph { position: relative; display: grid; place-items: center; aspect-ratio: 4 / 5; border-radius: 18px; overflow: hidden; background: var(--field); }
.ph img { width: 60%; border-radius: 4px; box-shadow: 0 26px 44px -26px rgba(35, 63, 46, .6), 0 2px 6px rgba(35, 63, 46, .12); transform: rotate(-4deg); transition: transform .8s var(--ease); }
.lot:nth-child(even) .ph img { transform: rotate(3deg); }
.lot:hover .ph img { transform: rotate(0deg) translateY(-3%) scale(1.03); }
.ph .symbol { width: 36%; opacity: .26; }
.meta { display: flex; justify-content: space-between; align-items: start; gap: 12px; margin-top: 18px; }
.meta h3 { font-size: clamp(24px, 2vw, 30px); }
.meta .kg { font: 500 20px/1.3 var(--display); white-space: nowrap; }
.lot .data { margin-top: 8px; color: var(--ochre); }
.lot .where { margin-top: 10px; font-size: 15px; color: var(--ink-2); }
.soon { margin: 4px 0 18px; font-size: 14px; color: var(--ink-2); }
.lot .btn { margin-top: auto; justify-content: space-between; padding: 13px 20px; font-size: 15px; }
.facts { width: 100%; margin: 22px 0 26px; border-top: 1px solid var(--line); }
.facts div { display: flex; justify-content: space-between; gap: 16px; padding: 11px 0; border-bottom: 1px solid var(--line); font-size: 16px; }
.facts dt { color: var(--ink-2); }
.facts dd .data { font-size: .8em; }

/* Ticker */
.ticker { overflow: hidden; padding: 15px 0; border-block: 1px solid var(--line); white-space: nowrap; font-size: 16px; }
.ticker div { width: max-content; animation: marquee 38s linear infinite; }
.ticker span { margin: 0 56px; color: var(--ochre); }
@keyframes marquee { to { transform: translateX(50%); } }

/* A word from us (sticker postcards) */
.ritual { display: grid; grid-template-columns: 1fr 1fr; border-bottom: 1px solid var(--line); }
.ritual > div { padding: clamp(48px, 9vh, 96px) var(--pad); }
.ritual > .stamp-pair { padding-block: clamp(56px, 10vh, 110px); }
.ritual h2 { margin: 0 0 24px; font-size: clamp(48px, 5.4vw, 88px); }
.ritual h2 i { font-style: normal; font-weight: 400; color: var(--ochre); }
.ritual p { max-width: 360px; margin-bottom: 30px; color: var(--ink-2); }
.stamp-pair { position: relative; display: flex; align-items: center; justify-content: center; gap: 0; overflow: hidden; background: var(--field-sand); border-inline-start: 1px solid var(--line); }
/* Our own postage stamps, drawn from the brand landscapes */
.stamp-pair .stamp { width: 38%; max-width: 230px; height: auto; transform: rotate(-9deg); filter: drop-shadow(0 18px 22px rgba(35, 63, 46, .28)); transition: transform .8s var(--ease); }
.stamp-pair .stamp + .stamp { margin-inline-start: -4%; transform: rotate(8deg) translateY(26px); }
.stamp-pair:hover .stamp { transform: rotate(-4deg) translateY(-6px); }
.stamp-pair:hover .stamp + .stamp { transform: rotate(4deg) translateY(16px); }
.stamp-pair > span { position: absolute; bottom: 28px; font-size: 14px; color: var(--ink-2); }

/* 8. Recipes -------------------------------------------------------------- */
.recipes-band { padding-block: clamp(56px, 8vh, 96px); background: var(--ink); color: var(--paper); }
.recipes-band .head { margin-bottom: clamp(26px, 4vh, 40px); }
.recipes-band .head h2 { font-size: clamp(34px, 3.8vw, 60px); }
.recipes-band .rcards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.recipes-band .rcard { flex-direction: row; }
.recipes-band .rcard .pic { flex: none; width: 36%; aspect-ratio: 1; }
.recipes-band .rcard .txt { flex: 1; align-items: center; border-top: 0; border-inline-start: 1px solid var(--line); }
.recipes-band .rcard .num { display: none; }
.recipes-band .kicker { color: var(--ochre-light); border-color: rgba(244, 241, 232, .25); }
.recipes-band .head p { color: rgba(244, 241, 232, .75); }
.rcards { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: clamp(18px, 2.4vw, 34px); }
.rcard { position: relative; display: flex; flex-direction: column; border-radius: 22px; overflow: hidden; background: var(--paper); color: var(--ink); transition: transform .6s var(--ease); }
.rcard:hover { transform: translateY(-6px); }
.rcard .pic { aspect-ratio: 5 / 4; overflow: hidden; background: #f4f0e6; }
.rcard .pic img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
.rcard:hover .pic img { transform: scale(1.06); }
.rcard .txt { display: flex; align-items: end; justify-content: space-between; gap: 20px; padding: 24px 28px 28px; border-top: 1px solid var(--line); }
.rcard h3 { font-size: clamp(28px, 2.6vw, 40px); }
.rcard p { margin-top: 6px; color: var(--ink-2); }
.rcard .go { flex: none; display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; border: 1px solid var(--ink); font-size: 20px; transition: background-color .3s, color .3s; }
.rcard:hover .go { background: var(--ink); color: var(--paper); }
.rcard .num { position: absolute; inset-inline-start: 22px; top: 18px; font: 500 12px var(--data); letter-spacing: .14em; color: var(--ochre); }

/* 9. Recipe page ---------------------------------------------------------- */
.page-top { padding-top: clamp(120px, 18vh, 170px); }
.crumb { display: inline-flex; gap: 8px; margin-bottom: 26px; font-size: 15px; color: var(--ink-2); }
.crumb:hover { color: var(--ink); }
.recipe-hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .9fr); gap: clamp(30px, 6vw, 100px); align-items: center; padding-bottom: clamp(50px, 8vh, 90px); }
.recipe-hero h1 { margin: 20px 0 18px; font-size: clamp(50px, 7vw, 112px); line-height: 1; }
.recipe-hero .sub { font: 400 clamp(22px, 2.2vw, 30px)/1.4 var(--display); color: var(--ink-2); }
.recipe-hero .pic { border-radius: 50%; overflow: hidden; aspect-ratio: 1; background: #f4f0e6; box-shadow: inset 0 0 0 1px var(--line); }
.recipe-hero .pic img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.04); }
.chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 30px; }
.chips span { padding: 8px 16px; border-radius: 99px; background: var(--field-green); font-size: 15px; }
.chips span:nth-child(even) { background: var(--field-sand); }

.recipe-body { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: clamp(30px, 6vw, 100px); align-items: start; padding-top: clamp(50px, 8vh, 90px); border-top: 1px solid var(--ink); }
.recipe-body h2 { margin-bottom: 26px; font-size: clamp(32px, 3.2vw, 48px); }
.need { position: sticky; top: 110px; padding: clamp(26px, 3vw, 40px); border-radius: 22px; background: var(--field-green); }
.need li { display: flex; gap: 14px; padding: 15px 0; border-bottom: 1px solid var(--line); font-size: 19px; }
.need li:last-child { border-bottom: 0; padding-bottom: 0; }
.need li::before { content: ''; flex: none; width: 9px; height: 9px; margin-top: .62em; border-radius: 50%; background: var(--ochre); }
.need .note { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); font-size: 14px; color: var(--ink-2); }
.steps li { display: grid; grid-template-columns: auto 1fr; gap: clamp(18px, 2.4vw, 36px); padding: 30px 0; border-bottom: 1px solid var(--line); }
.steps li:first-child { padding-top: 0; }
.steps .n { font: 400 clamp(56px, 6vw, 92px)/.9 var(--display); color: var(--ochre); min-width: 1.1em; }
.steps p { padding-top: 8px; font-size: clamp(19px, 1.6vw, 23px); line-height: 1.65; }
.tip { display: flex; gap: 18px; margin-top: 34px; padding: 24px 28px; border-radius: 18px; background: var(--field-sand); font-size: 18px; }
.tip b { flex: none; font: 700 30px/1 var(--hand); color: var(--ochre); }

/* 10. PHIN diagrams -------------------------------------------------------- */
.phin { margin-top: clamp(60px, 10vh, 110px); padding: clamp(28px, 4vw, 56px); border-radius: 26px; background: #fff; background: color-mix(in srgb, var(--paper) 55%, #fff); box-shadow: inset 0 0 0 1px var(--line); }
.phin .head { margin-bottom: 26px; }
.phin .head h2 { font-size: clamp(30px, 3.2vw, 48px); }
.phin img { width: 100%; }
.phin .scroller { overflow-x: auto; }
.phin .scroller img { min-width: 640px; }
.next-recipe { display: flex; justify-content: space-between; align-items: center; gap: 24px; margin-top: clamp(60px, 10vh, 110px); padding: clamp(26px, 3vw, 44px); border-radius: 22px; background: var(--ink); color: var(--paper); }
.next-recipe span { color: var(--ochre-light); font-size: 15px; }
.next-recipe h3 { margin-top: 4px; font-size: clamp(30px, 3.4vw, 52px); }
.next-recipe img { width: clamp(90px, 12vw, 150px); aspect-ratio: 1; object-fit: cover; border-radius: 50%; }

/* 11. Product page -------------------------------------------------------- */
.product { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(30px, 6vw, 100px); align-items: start; }
.product .gallery { display: grid; grid-template-columns: 1.15fr .85fr; gap: 18px; align-items: end; padding: clamp(26px, 4vw, 60px); border-radius: 26px; background: var(--field); }
.product .gallery img { width: 100%; border-radius: 6px; box-shadow: 0 30px 50px -28px rgba(35, 63, 46, .55), 0 2px 6px rgba(35, 63, 46, .12); }
.product h1 { margin: 20px 0 10px; font-size: clamp(46px, 5.6vw, 88px); }
.product .data.big { font-size: 14px; color: var(--ochre); }
.product .facts div { padding: 15px 0; font-size: 18px; }
.product .price { margin: 6px 0 22px; padding: 18px 22px; border-radius: 16px; background: var(--field-green); font-size: 16px; color: var(--ink-2); }
.product .price b { display: block; font: 500 24px var(--display); color: var(--ink); }
.product .row { display: flex; flex-wrap: wrap; gap: 12px; }
.product .landscape { grid-column: 1 / -1; margin-top: clamp(30px, 5vh, 60px); }
.landscape img { width: 100%; border-radius: 22px; mix-blend-mode: multiply; }

/* 12. Story + contact ----------------------------------------------------- */
.story { display: grid; justify-items: center; gap: clamp(28px, 4vw, 44px); max-width: 860px; margin-inline: auto; text-align: center; }
.story .frame { max-width: 400px; }
.story h2 { margin-bottom: 26px; font-size: clamp(40px, 4.8vw, 76px); }
.story .text p { max-width: 34em; margin: 0 auto 1.1em; font-size: 20px; color: var(--ink-2); }
.story .text p.lead { font: 400 clamp(24px, 2.4vw, 34px)/1.45 var(--display); color: var(--ink); }
.story .sign { display: block; margin-top: 22px; }
.duo { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(16px, 2vw, 28px); margin-top: clamp(50px, 8vh, 90px); }
.duo figure { margin: 0; padding: clamp(16px, 2vw, 28px); border-radius: 22px; background: var(--field-green); }
.duo figure + figure { background: var(--field-sand); }
.duo img { width: 100%; border-radius: 12px; mix-blend-mode: multiply; }
.duo figcaption { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-top: 16px; }
.duo figcaption b { font: 500 24px var(--display); }
.cta-band { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 24px; margin-top: clamp(50px, 8vh, 90px); padding: clamp(28px, 4vw, 56px); border-radius: 26px; background: var(--ink); color: var(--paper); }
.cta-band h3 { font-size: clamp(32px, 3.6vw, 56px); }

.contact { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(40px, 7vw, 120px); align-items: start; min-height: 78vh; }
.contact h1 { margin: 26px 0; font-size: clamp(54px, 6.6vw, 108px); line-height: 1; }
.contact h1 i { display: block; margin-top: .25em; font-style: normal; font-size: .5em; font-weight: 400; color: var(--ochre); }
.contact-intro p { max-width: 440px; font-size: 19px; color: var(--ink-2); }
.contact-details { display: grid; gap: 4px; max-width: 440px; margin-top: 40px; border-top: 1px solid var(--ink); }
.contact-details div { display: flex; justify-content: space-between; gap: 24px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.contact-details dt { color: var(--ink-2); }
.contact-details a { direction: ltr; unicode-bidi: isolate; }
.contact-form { display: flex; flex-direction: column; padding: clamp(26px, 3vw, 44px); border-radius: 22px; background: var(--field-green); }
.contact-form label { margin-top: 24px; font-size: 15px; font-weight: 500; color: var(--ink-2); }
.contact-form label:first-child { margin-top: 0; }
.contact-form input, .contact-form textarea { width: 100%; padding: 12px 0; background: none; border: 0; border-bottom: 1px solid var(--ink); border-radius: 0; outline: none; resize: vertical; }
.contact-form input:focus, .contact-form textarea:focus { border-bottom-color: var(--ochre); }
.contact-form input[type="email"] { direction: ltr; text-align: right; }
.contact-form .btn { align-self: flex-start; margin-top: 30px; }
.form-note { margin-top: 14px; font-size: 14px; color: var(--ink-2); }
.contact-form.done .form-note { color: var(--ochre); }

/* 13. Footer --------------------------------------------------------------
   Centred note from Gleb and Ilana, then wordmark + newsletter, then links. */
.foot { padding: clamp(64px, 10vh, 110px) var(--pad) 30px; background: var(--paper); }
.foot-hello { display: grid; justify-items: center; gap: 22px; max-width: 46em; margin: 0 auto clamp(48px, 8vh, 84px); text-align: center; }
.foot-hello .symbol { width: 66px; }
.foot-note { font: 400 clamp(20px, 1.9vw, 27px)/1.55 var(--display); }
.foot-hello .sign { font-size: 40px; }
.foot-main { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 40px; padding-top: clamp(40px, 6vh, 64px); border-top: 1px solid var(--line); }
.foot-main .logo { width: clamp(240px, 32vw, 520px); }
.foot-main p { margin-top: 18px; color: var(--ink-2); }
.news { scroll-margin-top: 120px; }
.news label { display: block; margin-bottom: 12px; font: 400 30px/1.15 var(--display); }
.news .field { display: flex; border-bottom: 1px solid var(--ink); }
.news input { flex: 1; min-width: 240px; padding: 12px 0; background: none; border: 0; outline: none; direction: ltr; text-align: right; }
.news button { padding: 0 4px; font-size: 16px; font-weight: 500; white-space: nowrap; }
.news .hint { display: block; margin-top: 10px; font-size: 14px; color: var(--ink-2); }
.news .ok { display: block; height: 0; overflow: hidden; font-size: 14px; color: var(--ochre); transition: height .4s; }
.news.done .ok { height: 28px; padding-top: 8px; }
.news.done .field { opacity: .4; pointer-events: none; }
.news.done .hint { display: none; }
.foot-base { display: flex; flex-wrap: wrap; gap: 8px 28px; margin-top: clamp(36px, 6vh, 60px); padding-top: 22px; border-top: 1px solid var(--line); font-size: 14px; color: var(--ink-2); }
.foot-base nav { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-inline-end: auto; }
.foot-base a:hover { color: var(--ink); }

/* 14. Motion -------------------------------------------------------------- */
.rv { opacity: 0; transform: translateY(40px); transition: opacity 1s var(--ease) var(--d, 0s), transform 1.2s var(--ease) var(--d, 0s); }
.rv.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .rv { opacity: 1; transform: none; transition: none; }
  .stage-grain, .scroll-hint span { animation: none; }
  .loader, .loader-inner { transition-duration: .01s; }
}

/* 15. Phones -------------------------------------------------------------- */
@media (max-width: 1000px) {
  .lots { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  body { font-size: 16px; }
  .bar { gap: 10px; padding: 13px var(--pad); }
  .logo { width: 128px; }
  .links { display: none; }
  .pill { margin-inline-start: auto; padding: 9px 16px; font-size: 14px; }

  .menu-toggle { position: relative; display: block; flex: none; width: 42px; height: 42px; border-radius: 50%; border: 1px solid currentColor; transition: transform .35s var(--ease); }
  .menu-toggle:active { transform: scale(.94); }
  .menu-toggle span { position: absolute; left: 12px; right: 12px; top: 50%; height: 1.5px; margin-top: -.75px; background: currentColor; border-radius: 2px; transition: transform .45s var(--ease); }
  .menu-toggle span:first-child { transform: translateY(-3.5px); }
  .menu-toggle span:last-child { transform: translateY(3.5px); }
  .menu-open .menu-toggle span:first-child { transform: rotate(45deg); }
  .menu-open .menu-toggle span:last-child { transform: rotate(-45deg); }

  .menu-panel { position: fixed; inset: 0; z-index: 19; display: flex; flex-direction: column; padding: calc(96px + env(safe-area-inset-top, 0px)) var(--pad) calc(28px + env(safe-area-inset-bottom, 0px)); background: var(--paper); color: var(--ink); opacity: 0; visibility: hidden; transition: opacity .35s ease, visibility .35s; overscroll-behavior: contain; }
  .menu-open .menu-panel { opacity: 1; visibility: visible; }
  .menu-open .bar::before { opacity: 0; }
  .menu-open, .menu-open body { overflow: hidden; }
  .menu-panel nav { display: flex; flex-direction: column; border-top: 1px solid var(--ink); }
  .menu-panel nav a { display: flex; align-items: center; justify-content: space-between; padding: 16px 0 14px; border-bottom: 1px solid var(--line); font: 500 clamp(40px, 12vw, 56px)/1.1 var(--display); opacity: 0; transform: translateY(26px); transition: opacity .5s var(--ease), transform .7s var(--ease), color .2s; }
  .menu-open .menu-panel nav a { opacity: 1; transform: none; transition-delay: calc(90ms + var(--i) * 70ms); }
  .menu-panel nav a i { font: 400 22px/1 var(--sans); }
  .menu-panel nav a[aria-current] { color: var(--ochre); }
  .menu-panel nav a[aria-current] i { visibility: hidden; }
  .menu-foot { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-top: auto; padding-top: 20px; color: var(--ink-2); opacity: 0; transition: opacity .5s ease; }
  .menu-open .menu-foot { opacity: 1; transition-delay: .35s; }
  .menu-foot .sign { font-size: 28px; }
  .menu-foot .symbol { width: 44px; color: var(--ink); }

  .cap-1 { inset-inline: 20px; bottom: 14vh; max-width: none; text-align: center; }
  /* Sized from the measured text width, so each line fills the screen without wrapping */
  .cap-title { font-size: calc((100vw - 40px) / 7); line-height: 1.16; }
  .cap-sub { max-width: none; margin-top: 1rem; font-size: calc((100vw - 40px) / 17.2); white-space: nowrap; }
  .cap-body { max-width: none; font-size: 1.05rem; }
  .cap-end { padding: 80px 22px 40px; }
  .roast-caption, .roast-end, .roast-last { inset-inline: 22px; bottom: 27%; max-width: none; text-align: center; }
  .roast-caption p, .roast-end p { max-width: 20em; margin-inline: auto; }
  /* The captions now sit over the pale beans: a soft dark band behind them keeps them readable */
  .roast-track .stage-vignette { background: linear-gradient(to bottom, rgba(8, 14, 10, .5), transparent 22%), linear-gradient(to top, rgba(8, 14, 10, .5) 0%, rgba(8, 14, 10, .66) 30%, rgba(8, 14, 10, .4) 52%, transparent 74%); }
  .roast-caption h2, .roast-end h2, .roast-last h2 { text-shadow: 0 2px 22px rgba(0, 0, 0, .75), 0 1px 3px rgba(0, 0, 0, .45); }
  .roast-caption p, .roast-end p { text-shadow: 0 1px 12px rgba(0, 0, 0, .85); }
  .roast-caption h2, .roast-end h2, .roast-last h2 { font-size: clamp(38px, 11vw, 56px); }
  .roast-caption p, .roast-end p { font-size: 16px; }
  .cap-end p { max-width: none; font-size: calc((100vw - 44px) / 16.9); white-space: nowrap; }
  .rise { margin-top: -22px; border-radius: 22px 22px 0 0; }

  .about, .recipe-hero, .recipe-body, .product, .story, .contact { grid-template-columns: 1fr; }
  .section { padding-block: 52px; }
  .page-top { padding-top: 104px; }
  .about { gap: 30px; padding-top: 44px; padding-bottom: 40px; }
  .shop { padding-top: 44px; }
  .frame, .story .frame { max-width: none; }
  .story { gap: 26px; }
  .story h2 { margin-bottom: 16px; }
  .story .text p { font-size: 17px; }
  .frame img { aspect-ratio: 4 / 3; border-radius: 120px 120px 16px 16px; }
  .about > div { text-align: center; }
  .about h2 { margin: 0 0 16px; }
  .about p { margin-inline: auto; }
  .about .sign { margin: 18px 0 20px; }
  .head { margin-bottom: 28px; }
  .head .kicker + h2 { margin-top: 14px; }
  .ritual > div { padding-block: 52px 44px; text-align: center; }
  .ritual h2 { margin-bottom: 18px; }
  .ritual p { margin: 0 auto 26px; }
  .ritual > .stamp-pair { padding-block: 44px 68px; }
  .recipes-band .head { align-items: center; text-align: center; gap: 12px; }
  .recipes-band { padding-block: 48px; }
  .frame .symbol { width: 62px; inset-inline-end: 16px; top: 16px; }
  .frame .stamp-bg { width: 82px; inset-inline-end: 6px; top: 6px; }
  .head { flex-direction: column; align-items: start; }
  .recipe-hero .pic { max-width: 340px; margin-inline: auto; order: -1; }
  .need { position: static; }
  .steps li { padding: 24px 0; }
  .tip { flex-direction: column; gap: 6px; }
  .next-recipe img { width: 84px; }
  .product .gallery { grid-template-columns: 1.15fr .85fr; }
  .duo { grid-template-columns: 1fr; }
  .cta-band { flex-direction: column; align-items: flex-start; }
  .contact { min-height: 0; }

  .lots { gap: 26px 12px; }
  .ph { border-radius: 14px; }
  .meta { flex-direction: column; gap: 4px; margin-top: 14px; }
  .meta h3 { font-size: 22px; }
  .meta .kg { font-size: 17px; }
  .lot .where { font-size: 14px; }
  .lot .btn { padding: 11px 15px; font-size: 14px; }

  .ritual { grid-template-columns: 1fr; }
  .stamp-pair { min-height: 0; border-inline-start: 0; border-top: 1px solid var(--line); }
  .recipes-band .rcards { grid-template-columns: 1fr; }
  .recipes-band .rcard .txt { padding: 18px 20px; }
  .rcard .go { width: 40px; height: 40px; }

  /* Footer on phones: note, newsletter card, link grid, edge-to-edge wordmark, small print */
  .foot { display: flex; flex-direction: column; align-items: stretch; padding: 48px var(--pad) calc(26px + env(safe-area-inset-bottom, 0px)); }
  .foot-main, .foot-base { display: contents; }
  .foot-hello { order: 0; gap: 16px; margin-bottom: 32px; }
  .news { order: 1; padding: 28px 22px 24px; border-radius: 20px; background: var(--field-green); scroll-margin-top: 96px; }
  .news input { min-width: 0; padding: 14px 0; }
  .foot-base nav { order: 2; display: grid; grid-template-columns: 1fr 1fr; column-gap: 20px; margin: 34px 0 0; border-top: 1px solid var(--ink); }
  .foot-base nav a { padding: 16px 0 15px; border-bottom: 1px solid var(--line); font-size: 17px; color: var(--ink); }
  .foot-main > div { order: 3; margin-top: 44px; text-align: center; }
  .foot-main .logo { width: 100%; }
  .foot-base > span { order: 4; margin-top: 28px; padding-top: 18px; border-top: 1px solid var(--line); text-align: center; font-size: 13px; }
  .foot-base > span + span { order: 5; margin-top: 6px; padding-top: 0; border-top: 0; }
}

/* Additions: PHIN labels, scene captions, footer column titles */
.phin .diagram { position: relative; min-width: 640px; }
.phin .diagram span { position: absolute; left: 77%; transform: translateY(-58%); font-size: clamp(14px, 1.35vw, 18px); font-weight: 500; white-space: nowrap; }
.scenes { min-width: 640px; }
.scenes ol { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 6px; text-align: center; }
.scenes li { padding: 0 10px; font-size: clamp(14px, 1.3vw, 17px); color: var(--ink-2); }
.scenes li b { display: block; font: 400 30px/1.1 var(--display); color: var(--ochre); }
.phin h3 { margin: 40px 0 14px; font-size: clamp(24px, 2.2vw, 32px); }
.foot nav b { font: 500 14px var(--sans); letter-spacing: 0; direction: rtl; }
.aside-note { margin-top: 26px; font-size: 15px; color: var(--ink-2); }
.recipes-page .rcards { margin-top: clamp(30px, 5vh, 50px); }
.recipes-page .rcard { background: var(--field-green); }
.recipes-page .rcard:nth-child(even) { background: var(--field-sand); }
.recipes-page .rcards { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1100px) { .recipes-page .rcards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .recipes-page .rcards { grid-template-columns: 1fr; } }
.recipes-page .rcard .pic { background: none; }
.recipes-page .rcard .pic img, .recipe-hero .pic img, .rcard .pic img { mix-blend-mode: multiply; }
.frame img { mix-blend-mode: multiply; }
