/* ==========================================================================
   Maryam Tabatabaei · redesign prototype · Phase 3
   Mobile-first. Plain CSS, no framework, so it drops straight into a WP theme.
   Palette and track colours are locked (CLAUDE.md §7). Type: system #2 "One Voice" by default
   (Maryam, 5 Oct 2026: "simple, minimal font"). #1 and #3 stay in the switcher for comparison.
   ========================================================================== */

/* ---------- tokens ---------- */
:root {
  /* brand palette (locked) */
  --espresso: #180C04;
  --espresso-2: #21120A;
  --espresso-3: #2C190C;
  --cream: #F8F0E3;
  --saffron: #C4891A;
  --saffron-lt: #E0A83A;
  --pomegranate: #8B3020;
  --mahogany: #A85830;

  /* six track colours (locked 24 Apr / 21 May 2026) */
  --t-barista: #8E5FB8;
  --t-brewing: #3F6DB5;
  --t-roasting: #D9722B;
  --t-sensory: #DCC13E;
  --t-green: #5C7A45;
  --t-water: #3E92A8;
  --t-cherry: #C0392B;
  --t-brown: #7A4A24;

  /* ink on espresso */
  --ink: var(--cream);
  --ink-soft: rgba(248, 240, 227, .78);
  --ink-muted: #BFAE98;          /* 8.4:1 on espresso */
  --line: rgba(248, 240, 227, .14);
  --line-strong: rgba(248, 240, 227, .28);

  /* layout */
  --gutter: clamp(20px, 5vw, 56px);
  --maxw: 1280px;
  --hdr: 60px;
  --sec: clamp(72px, 9vw, 140px);
  --radius: 14px;

  /* motion: brand easing */
  --ease: cubic-bezier(.2, .8, .3, 1);

  /* ---------- type system #1 · Atelier Light (default) ---------- */
  --f-display: "Instrument Serif", "Iowan Old Style", Georgia, serif;
  --f-sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-mono: "Geist Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --f-fa: "Estedad", "Vazirmatn", Tahoma, sans-serif;
  --display-weight: 400;
  --display-track: -.012em;
  --display-lh: 1.02;
  --ds: 1;                       /* display size multiplier */
  --em-style: italic;
  --label-track: .1em;
}

/* ---------- type system #2 · One Voice: one grotesk for everything ---------- */
:root[data-type="2"] {
  /* one typeface for everything: headings, body, labels, dates and prices */
  --f-display: "Geist", ui-sans-serif, system-ui, sans-serif;
  --f-mono: "Geist", ui-sans-serif, system-ui, sans-serif;
  --f-fa: "Vazirmatn", "Estedad", Tahoma, sans-serif;
  --display-weight: 300;
  --display-track: -.032em;
  --display-lh: 1.06;
  --ds: .82;
  --em-style: normal;
  --label-track: .08em;
}
/* figures line up in columns without a monospace face */
:root[data-type="2"] body { font-feature-settings: "kern", "liga", "calt", "tnum"; }

/* ---------- type system #3 · Zero-licence: same idea as #1, Inter text, no mono ---------- */
:root[data-type="3"] {
  --f-sans: "Inter", ui-sans-serif, system-ui, sans-serif;
  --f-mono: "Inter", ui-sans-serif, system-ui, sans-serif;
  --label-track: .08em;
}
:root[data-type="3"] body { font-feature-settings: "kern", "liga", "calt", "tnum", "cv11"; }

@media (min-width: 1024px) {
  :root { --hdr: 72px; }
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
/* Lenis smooth wheel scrolling (smooth.js): its own rules, and no CSS smooth scroll on top of it */
html.lenis, html.lenis body { height: auto; }
html.lenis { scroll-behavior: auto !important; }
.lenis.lenis-smooth [data-lenis-prevent] { overscroll-behavior: contain; }
.lenis.lenis-stopped { overflow: clip; }
.lenis.lenis-smooth iframe { pointer-events: none; }
body {
  margin: 0;
  background: var(--espresso);
  color: var(--ink);
  font: 400 17px/1.6 var(--f-sans);
  font-feature-settings: "kern", "liga", "calt";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration-color: var(--saffron); text-underline-offset: 3px; }
button { font: inherit; color: inherit; }
p, h1, h2, h3, figure, blockquote, dl, dd { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--saffron); outline-offset: 3px; border-radius: 4px; }
section[id], [id^="door-"] { scroll-margin-top: calc(var(--hdr) + 16px); }

.wrap {
  width: 100%;
  max-width: calc(var(--maxw) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--saffron); color: var(--espresso); padding: 12px 16px; border-radius: 8px;
  font-weight: 500; text-decoration: none;
}
.skip:focus { top: 12px; }

/* ---------- type primitives ---------- */
.display {
  font-family: var(--f-display);
  font-weight: var(--display-weight);
  letter-spacing: var(--display-track);
  line-height: var(--display-lh);
  text-wrap: balance;
}
.display em { font-style: var(--em-style); color: var(--saffron); }
h2.display { font-size: calc(var(--ds) * clamp(36px, 2.6vw + 26px, 66px)); }

.label {
  font: 400 14px/1.4 var(--f-mono);
  letter-spacing: var(--label-track);
  text-transform: uppercase;
  color: var(--ink-muted);
}
.fa {
  font-family: var(--f-fa);
  font-weight: 300;
  letter-spacing: 0;
  text-transform: none;
  font-size: 1.06em;
  margin-inline-start: .5em;
}
.sec-head { display: grid; gap: 14px; margin-bottom: clamp(28px, 4vw, 56px); max-width: 44em; }
.sec-head--row { max-width: none; display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 16px 32px; }
.sec-head--row > div { display: grid; gap: 14px; }
.sec-sub { color: var(--ink-soft); }
.section { padding-block: var(--sec); }
/* back-to-back dark sections share one gap instead of two */
.doors + .cohorts, .cohorts + .story { padding-top: 0; }

/* ---------- buttons & links ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 24px;
  border-radius: 999px; border: 1px solid transparent;
  font: 500 16px/1 var(--f-sans);
  text-decoration: none; cursor: pointer;
  transition: background-color .4s var(--ease), color .4s var(--ease), border-color .4s var(--ease);
}
.btn-primary { background: var(--saffron); color: var(--espresso); }
.btn-primary:hover { background: var(--saffron-lt); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.btn-ghost:hover { border-color: var(--saffron); color: var(--saffron-lt); }
.text-link {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px;
  font-weight: 500; color: var(--ink); text-decoration: none;
  border-bottom: 1px solid var(--saffron);
}
.text-link:hover { color: var(--saffron-lt); }

/* ---------- header: phone = MENU · mark · BOOK, always visible ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(24, 12, 4, .86);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  backdrop-filter: blur(14px) saturate(1.2);
  border-bottom: 1px solid transparent;
  transition: border-color .4s var(--ease);
}
.site-header.is-scrolled { border-bottom-color: var(--line); }
.hdr {
  height: var(--hdr);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
}
.hdr-menu, .hdr-book {
  min-height: 44px; min-width: 44px;
  font: 500 14px/1 var(--f-mono);
  letter-spacing: .14em; text-transform: uppercase;
  cursor: pointer;
}
.hdr-menu {
  justify-self: start;
  background: none; border: 0; padding: 0 4px; color: var(--ink);
}
.hdr-book {
  justify-self: end;
  background: var(--saffron); color: var(--espresso);
  border: 0; border-radius: 999px; padding: 0 20px;
  transition: background-color .4s var(--ease);
}
.hdr-book:hover { background: var(--saffron-lt); }
.hdr-brand {
  justify-self: center;
  display: inline-flex; align-items: center; justify-content: center; gap: 12px;
  text-decoration: none; min-height: 44px; min-width: 44px;
}
.hdr-brand img, .hdr-brand-img { width: 40px; height: 40px; }
.hdr-name { display: none; font: 500 16px/1 var(--f-sans); letter-spacing: -.005em; }
.hdr-nav { display: none; }

@media (min-width: 600px) {
  .hdr-name { display: inline; }
}
@media (min-width: 1024px) {
  .hdr { grid-template-columns: auto 1fr auto; gap: 32px; }
  .hdr-menu { display: none; }
  .hdr-brand { justify-self: start; }
  .hdr-nav { display: flex; justify-content: center; gap: 4px; }
  .hdr-nav a {
    display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px;
    font-size: 15px; text-decoration: none; color: var(--ink-soft);
    transition: color .3s var(--ease);
  }
  .hdr-nav a:hover { color: var(--ink); }
  .hdr-book { min-height: 44px; }
}

/* ---------- hero: Maryam in her atelier (real photo, never AI) ---------- */
.hero-grid {
  position: relative;
  display: grid;
  align-items: end;
  min-height: min(calc(100svh - var(--hdr)), 900px);
}
.hero-photo { position: absolute; inset: 0; margin: 0; overflow: hidden; }
.hero-photo img { width: 100%; height: 100%; object-fit: cover; object-position: 36% 16%; }
.hero-photo::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to bottom, rgba(24, 12, 4, 0) 26%, rgba(24, 12, 4, .6) 50%, rgba(24, 12, 4, .94) 70%, var(--espresso) 100%);
}
.hero-copy {
  position: relative; z-index: 1;
  display: grid; gap: 16px; justify-items: start;
  padding: 0 var(--gutter) 28px;
}
.hero-copy > .label { font-size: clamp(16px, 1.3vw + 11px, 21px); letter-spacing: .1em; color: var(--ink-soft); }
.hero-line { font-size: calc(var(--ds) * clamp(42px, 4.6vw + 22px, 64px)); max-width: 12.5em; color: var(--cream); }
.hero-sub { color: var(--ink-soft); font-size: 16px; line-height: 1.5; max-width: 36em; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 28px; margin-top: 4px; }
.hero-next {
  display: grid; gap: 2px; min-height: 44px; align-content: center;
  text-decoration: none; color: var(--ink-soft); font-size: 15px;
}
.hero-next .label { color: var(--saffron); }
.hero-next:hover span:last-child { color: var(--ink); text-decoration: underline; text-decoration-color: var(--saffron); }
@media (min-width: 1024px) {
  .hero-grid {
    grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
    align-items: stretch;
    min-height: min(calc(100svh - var(--hdr)), 960px);
  }
  .hero-photo { position: relative; grid-column: 2; grid-row: 1; }
  .hero-photo img { position: absolute; inset: 0; object-position: 30% 22%; }   /* never lets the photo set the hero's height */
  .hero-photo::after { background: linear-gradient(to right, var(--espresso) 0%, rgba(24, 12, 4, 0) 18%); }
  .hero-copy {
    grid-column: 1; grid-row: 1; align-self: center; gap: 22px;
    padding: 64px 56px 72px max(var(--gutter), calc((100vw - var(--maxw)) / 2));
  }
  .hero-line { font-size: calc(var(--ds) * clamp(52px, 3.2vw + 16px, 78px)); }
  .hero-sub { font-size: 17px; }
}

/* ---------- interlude: the one signature motion (AI texture video) ---------- */
.interlude { margin-top: clamp(40px, 6vw, 88px); }
.interlude-inner {
  position: relative; overflow: hidden; isolation: isolate;
  margin-inline: var(--gutter);
  aspect-ratio: 4 / 5;
  border-radius: var(--radius);
  background: #120803 url("../media/roaster-poster-mobile.jpg") center / cover no-repeat;
}
.interlude-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.interlude-inner::after {
  content: ""; position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(to top, rgba(24, 12, 4, .92) 0%, rgba(24, 12, 4, .55) 38%, rgba(24, 12, 4, 0) 70%);
}
.interlude-copy { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; padding-bottom: 28px; }
.interlude-line { font-size: calc(var(--ds) * clamp(28px, 2.2vw + 18px, 54px)); max-width: 17em; color: var(--cream); }
.ai-tag, .motion-toggle {
  position: absolute; top: 14px; z-index: 3;
  display: inline-flex; align-items: center;
  background: rgba(24, 12, 4, .72); color: var(--cream);
  font: 500 14px/1 var(--f-mono); letter-spacing: .06em; text-transform: uppercase;
  border-radius: 6px;
}
.ai-tag { left: 14px; padding: 8px 10px; max-width: calc(100% - 130px); line-height: 1.3; }
.motion-toggle { right: 14px; min-height: 44px; padding: 0 14px; border: 1px solid var(--line-strong); border-radius: 999px; cursor: pointer; }
@media (min-width: 768px) {
  .interlude-inner {
    --inset: max(var(--gutter), calc((100vw - var(--maxw)) / 2));
    margin-inline: 0; aspect-ratio: auto;
    height: min(calc(100svh - var(--hdr)), 56.25vw);
    border-radius: 0;
    clip-path: inset(0 var(--inset) round 18px);
    background-image: url("../media/roaster-poster.jpg");
  }
  .ai-tag { left: calc(var(--inset) + 16px); }
  .motion-toggle { right: calc(var(--inset) + 16px); }
  .interlude-copy { padding-bottom: clamp(32px, 5vw, 72px); }
}

/* ---------- credentials strip ---------- */
.creds {
  margin-top: clamp(40px, 6vw, 88px);
  border-block: 1px solid var(--line);
  overflow: hidden;
}
.marquee { display: flex; width: max-content; }
.marquee-list { display: flex; flex-shrink: 0; }
.marquee-list li {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 20px 20px;
  font: 400 14px/1 var(--f-mono); letter-spacing: var(--label-track); text-transform: uppercase;
  color: var(--ink); white-space: nowrap;
}
.marquee-list li span { color: var(--ink-muted); }
.marquee-list li::after {
  content: ""; width: 6px; height: 6px; margin-left: 30px;
  background: var(--saffron); transform: rotate(45deg);
}
@media (prefers-reduced-motion: no-preference) {
  .marquee { animation: marquee 56s linear infinite; }
  .creds:hover .marquee { animation-play-state: paused; }
}
@keyframes marquee { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) {
  .marquee { width: auto; }
  .marquee-list { flex-wrap: wrap; justify-content: center; padding-block: 8px; }
  .marquee-list[aria-hidden="true"] { display: none; }
  .marquee-list li { padding: 10px 16px; white-space: normal; }
}

/* ---------- three doors ---------- */
.doors-row { display: grid; gap: 12px; }
.door {
  --c: var(--saffron);
  display: grid; grid-template-rows: 190px auto;
  border-radius: var(--radius); overflow: hidden;
  background: var(--espresso-2);
  border: 1px solid var(--line);
  color: inherit; text-decoration: none;
  transition: border-color .5s var(--ease);
}
.door:hover { border-color: color-mix(in oklab, var(--c) 60%, transparent); }
.door-media { display: block; position: relative; overflow: hidden; background: var(--espresso-3); }
.door-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
.door:hover .door-media img { transform: scale(1.035); }
.door-body {
  display: grid; gap: 8px; align-content: start;
  padding: 20px 20px 22px;
  border-top: 3px solid var(--c);
}
.door-title { display: block; font-size: calc(var(--ds) * 44px); color: var(--cream); }
.door-text { color: var(--ink-soft); max-width: 36ch; }
.door-cta {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px;
  font-weight: 500; color: var(--saffron);
}
.door:hover .door-cta { color: var(--saffron-lt); }
.badge {
  display: inline-block; margin-left: 8px; padding: 3px 8px; border-radius: 999px;
  border: 1px solid var(--line-strong); color: var(--ink);
  font-size: 14px; letter-spacing: .06em;
}

@media (min-width: 768px) and (max-width: 1023px) {
  .doors-row { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .door { grid-template-rows: 200px auto; }
  .door-title { font-size: calc(var(--ds) * 36px); }
}
/* desktop: image accordion, the hovered door opens wider */
@media (min-width: 1024px) {
  .doors-row { display: flex; gap: 12px; height: clamp(540px, 44vw, 640px); }
  .door {
    position: relative; flex: 1 1 0; min-width: 0;
    display: flex; flex-direction: column; justify-content: flex-end;
    transition: flex-grow .8s var(--ease), border-color .5s var(--ease);
  }
  .door-media { position: absolute; inset: 0; }
  .door-body {
    position: relative; z-index: 3;
    padding: 120px 32px 32px;
    border-top: 0;
    background: linear-gradient(to top, rgba(24, 12, 4, .97) 36%, rgba(24, 12, 4, .6) 70%, rgba(24, 12, 4, 0));
  }
  .door-body::before {
    content: ""; position: absolute; left: 32px; top: 88px; width: 40px; height: 3px; background: var(--c);
  }
  .door-title { font-size: calc(var(--ds) * 56px); }
  .doors-row:hover .door, .doors-row:focus-within .door { flex-grow: 1; }
  .doors-row .door:hover, .doors-row .door:focus-visible { flex-grow: 1.75; }
}

/* ---------- next cohorts ---------- */
.chips {
  display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none;
  margin: 0 calc(var(--gutter) * -1) 20px; padding: 2px var(--gutter);
}
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex-shrink: 0;
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 44px; padding: 0 16px;
  border: 1px solid var(--line-strong); border-radius: 999px;
  background: transparent; color: var(--ink);
  font: 400 14px/1 var(--f-mono); letter-spacing: .06em; text-transform: uppercase;
  cursor: pointer;
  transition: background-color .3s var(--ease), color .3s var(--ease), border-color .3s var(--ease);
}
.chip[style]::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--c); }
.chip:hover { border-color: var(--cream); }
.chip[aria-pressed="true"] { background: var(--cream); color: var(--espresso); border-color: var(--cream); }

.cohort-list { border-top: 1px solid var(--line); counter-reset: none; }
.cohort {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) auto;
  grid-template-areas:
    "date name  book"
    "date meta  book"
    "date price book";
  column-gap: 10px;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.c-date { grid-area: date; align-self: start; display: grid; gap: 2px; padding-top: 2px; }
.c-day { font: 400 17px/1.1 var(--f-mono); white-space: nowrap; color: var(--saffron); font-variant-numeric: tabular-nums; }
.c-mon { font: 400 14px/1.2 var(--f-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--ink-muted); }
.c-dow { display: none; }
.c-name { grid-area: name; font-size: 18px; line-height: 1.3; }
.c-track { display: inline-flex; align-items: center; gap: 10px; }
.c-track::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--c); flex-shrink: 0; }
.c-level { display: none; }
.c-meta, .c-price { font: 400 14px/1.45 var(--f-mono); color: var(--ink-muted); padding-left: 19px; }
.c-meta { grid-area: meta; }
.c-price { grid-area: price; }
.c-price.is-price { color: var(--cream); }
.c-book {
  grid-area: book;
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; min-width: 60px; padding: 0 12px;
  border: 1px solid var(--line-strong); border-radius: 999px;
  font: 500 15px/1 var(--f-sans); text-decoration: none; color: var(--ink);
  transition: border-color .3s var(--ease), color .3s var(--ease), background-color .3s var(--ease);
}
.c-book:hover { border-color: var(--saffron); color: var(--saffron-lt); }
.cohort:hover .c-book, .cohort:focus-within .c-book { border-color: var(--saffron); }
.js .cohort-list:not(.is-open) .is-extra { display: none; }
.cohort-more { margin-top: 24px; }
.cohort-preview { display: none; }

@media (min-width: 768px) {
  .cohort {
    grid-template-columns: 136px minmax(0, 1fr) 96px 120px auto;
    grid-template-areas: "date name meta price book";
    padding: 18px 0;
    transition: background-color .3s var(--ease);
  }
  .cohort:hover { background: rgba(248, 240, 227, .025); }
  .c-date { align-self: center; padding-top: 0; }
  .c-dow { display: inline; text-transform: none; letter-spacing: 0; }
  .c-name { font-size: 19px; }
  .c-day { font-size: 19px; }
  .c-level { display: inline; color: var(--ink-soft); }
  .c-lvl-m { display: none; }
  .c-meta, .c-price { padding-left: 0; }
  .c-date { grid-template-columns: auto; }
}
@media (min-width: 1024px) {
  .cohort-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 48px; align-items: start; }
  .cohort-preview {
    display: block; position: sticky; top: calc(var(--hdr) + 24px);
    aspect-ratio: 4 / 5; border-radius: var(--radius); overflow: hidden;
    background: var(--espresso-3);
  }
  .cohort-preview::before { content: ""; position: absolute; inset: 0 0 auto; height: 3px; background: var(--c); z-index: 2; }
  .cohort-preview img { width: 100%; height: 100%; object-fit: cover; transition: opacity .35s var(--ease); }
  .cohort-preview img.is-swapping { opacity: .25; }
  .preview-cap {
    position: absolute; left: 0; right: 0; bottom: 0; z-index: 1;
    display: grid; gap: 6px; padding: 80px 20px 20px;
    background: linear-gradient(to top, rgba(24, 12, 4, .95) 30%, rgba(24, 12, 4, 0));
  }
  .preview-title { font: var(--display-weight) calc(var(--ds) * 30px)/1.05 var(--f-display); letter-spacing: var(--display-track); }
}

/* ---------- Maryam story: sticky photo swaps per step (desktop), thumbnails on phones ---------- */
.story-grid { display: grid; gap: 28px; }
.story-media { display: none; }
.story-body { display: grid; gap: 24px; justify-items: start; }
.story-head { display: grid; gap: 18px; }
.story-head > p:not(.label) { color: var(--ink-soft); max-width: 60ch; }
.steps { width: 100%; border-top: 1px solid var(--line); }
.step {
  display: grid; grid-template-columns: 64px minmax(0, 1fr); column-gap: 14px; row-gap: 2px; align-items: center;
  padding: 12px 0; border-bottom: 1px solid var(--line);
}
.step-thumb { grid-row: span 2; width: 64px; height: 64px; object-fit: cover; border-radius: 8px; }
.step-when { font: 400 14px/1.4 var(--f-mono); letter-spacing: .04em; color: var(--saffron); }
.step-what { font-size: 16px; line-height: 1.45; }
@media (min-width: 1024px) {
  .story-grid { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 72px; align-items: start; }
  .story-media {
    display: block; position: sticky; top: calc(var(--hdr) + 32px);
    height: min(calc(100svh - var(--hdr) - 64px), 760px);
    border-radius: var(--radius); overflow: hidden; background: var(--espresso-3);
  }
  .story-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .8s var(--ease); }
  .story-img.is-on { opacity: 1; }
  .step { grid-template-columns: 120px minmax(0, 1fr); padding: 26px 0; min-height: 20vh; align-items: start; }
  .step-thumb { display: none; }
  .step-when { grid-row: span 1; padding-top: 3px; }
  .step-what { font-size: 19px; color: var(--ink-muted); transition: color .5s var(--ease); }
  .step.is-on .step-what { color: var(--cream); }
}

/* ---------- testimonial (cream, for rhythm) ---------- */
.voice { background: var(--cream); color: var(--espresso); }
.voice .label { color: #6B5644; }            /* 6.1:1 on cream */
.voice-fig { display: grid; gap: 28px; margin-top: 24px; }
.voice-quote p {
  font-size: calc(var(--ds) * clamp(32px, 2.9vw + 20px, 64px));
  line-height: 1.1;
  max-width: 21em;
}
.voice-quote p::before { content: "\201C"; color: var(--saffron); margin-right: .04em; }
.voice-quote p::after { content: "\201D"; color: var(--saffron); margin-left: .02em; }
.voice-by { display: grid; gap: 4px; }
.voice-name { font-weight: 500; font-size: 17px; }

/* ---------- journal ---------- */
.journal { position: relative; }
.posts { border-top: 1px solid var(--line); }
.post {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  grid-template-areas: "thumb meta" "thumb title";
  column-gap: 16px; row-gap: 4px; align-items: center;
  padding: 16px 0; border-bottom: 1px solid var(--line);
  text-decoration: none; color: inherit;
}
.post-thumb { grid-area: thumb; width: 72px; height: 72px; object-fit: cover; border-radius: 10px; }
.post-meta { grid-area: meta; }
.post-title { grid-area: title; font-size: 18px; line-height: 1.35; }
.post-arrow { display: none; }
.post:hover .post-title { text-decoration: underline; text-decoration-color: var(--saffron); text-underline-offset: 4px; }
.post-preview { display: none; }

@media (min-width: 768px) {
  .post {
    grid-template-columns: 280px minmax(0, 1fr) 40px;
    grid-template-areas: "meta title arrow";
    padding: 26px 0;
  }
  .post-thumb { display: none; }
  .post-title { font-size: 26px; line-height: 1.25; letter-spacing: -.01em; }
  .post-arrow { grid-area: arrow; display: block; justify-self: end; color: var(--saffron); font-size: 22px; transition: transform .4s var(--ease); }
  .post:hover .post-arrow { transform: translateX(4px); }
}
/* desktop hover preview that follows the pointer */
@media (min-width: 1024px) and (hover: hover) and (pointer: fine) {
  .post-preview {
    display: block; position: absolute; left: 0; top: 0; z-index: 5;
    width: 280px; aspect-ratio: 4 / 5; border-radius: var(--radius);
    pointer-events: none; opacity: 0; transform: translate(-50%, -50%) scale(.96);
    transition: opacity .35s var(--ease);
    overflow: hidden; background: var(--espresso-3);
  }
  .post-preview img { width: 100%; height: 100%; object-fit: cover; }
  .post-preview.is-on { opacity: 1; }
}

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding-top: var(--sec); }
.ft-top { display: grid; gap: 24px; justify-items: start; }
.ft-logo { width: 96px; height: 96px; }
.ft-cta { display: grid; gap: 20px; justify-items: start; }
.ft-cta .display { font-size: calc(var(--ds) * clamp(32px, 2.4vw + 22px, 56px)); max-width: 14em; }
.ft-cols {
  display: grid; grid-template-columns: 1fr 1fr; gap: 32px 24px;
  margin-top: 56px; padding-top: 32px; border-top: 1px solid var(--line);
}
.ft-cols { grid-template-areas: "visit tracks" "contact contact"; }
.ft-cols > :nth-child(1) { grid-area: visit; }
.ft-cols > :nth-child(2) { grid-area: contact; }
.ft-cols > :nth-child(3) { grid-area: tracks; }
.ft-cols .label { margin-bottom: 8px; }
.ft-cols a, .ft-cols li > span {
  display: inline-flex; align-items: center; min-height: 44px;
  text-decoration: none; color: var(--ink-soft); overflow-wrap: anywhere;
}
.ft-cols a:hover { color: var(--ink); }
.ft-tracks li {
  display: flex; align-items: center; gap: 10px; min-height: 36px; color: var(--ink-soft);
}
.ft-tracks li::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--c); }
.ft-name {
  margin-top: 56px;
  font-size: 11vw;
  line-height: 1;
  padding-bottom: .06em;
  white-space: nowrap;
  overflow-x: clip;
  color: var(--cream);
}
.ft-name span { display: inline-block; }
.ft-base {
  display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; align-items: center;
  margin-top: 32px; padding-block: 20px 104px;
  border-top: 1px solid var(--line);
  font-size: 14px; color: var(--ink-muted);
}
.ft-base a { color: var(--ink-muted); min-height: 44px; display: inline-flex; align-items: center; }
.ft-base .fa { margin: 0; font-size: 15px; }
/* language switch (1.0.0): العربية on English pages, English on Arabic pages */
.hdr-nav .hdr-lang { color: var(--saffron-lt); margin-inline-start: 8px; border: 1px solid var(--line-strong); border-radius: 999px; padding: 0 14px; }
.hdr-nav .hdr-lang:hover { color: var(--ink); border-color: var(--saffron); }
.hdr-lang[lang="ar"], .ft-lang[lang="ar"], .menu-lang[lang="ar"] { font-family: "IBM Plex Sans Arabic", var(--f-sans); letter-spacing: 0; text-transform: none; }
.ft-base .ft-lang { color: var(--saffron-lt); }
@media (min-width: 768px) {
  .ft-top { grid-template-columns: auto 1fr; align-items: end; gap: 40px; }
  .ft-logo { width: 112px; height: 112px; }
  .ft-cta { grid-template-columns: 1fr auto; align-items: end; justify-items: stretch; }
  .ft-cols { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .ft-cols { grid-template-areas: "visit contact tracks"; }
}

/* ---------- dialogs: menu overlay + book sheet ---------- */
dialog { padding: 0; border: 0; color: var(--ink); }
dialog::backdrop { background: rgba(10, 5, 2, .72); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }

.menu {
  width: 100%; max-width: none; height: 100%; max-height: none; margin: 0;
  background: var(--espresso);
}
.menu-inner { min-height: 100%; display: flex; flex-direction: column; }
.menu-bar { border-bottom: 1px solid var(--line); }
.menu .hdr { grid-template-columns: 1fr auto 1fr; }
.menu .hdr-menu { display: inline-flex; align-items: center; }
.menu-bar .hdr-brand-img { justify-self: center; }
.menu-nav { display: grid; gap: 32px; padding-block: 24px 40px; }
.menu-doors li { border-bottom: 1px solid var(--line); }
.menu-doors a {
  display: grid; gap: 4px; padding: 18px 0; text-decoration: none;
}
.menu-doors .display { font-size: calc(var(--ds) * 44px); }
.menu-links { display: grid; }
.menu-links a { display: flex; align-items: center; min-height: 48px; font-size: 19px; text-decoration: none; color: var(--ink-soft); }
.menu-links a:hover { color: var(--ink); }
.menu-contact { display: flex; flex-wrap: wrap; gap: 12px; }

.sheet {
  width: 100%; max-width: 100%; margin: auto 0 0; max-height: 92svh;
  background: var(--espresso-2);
  border-radius: 20px 20px 0 0;
  border-top: 1px solid var(--line-strong);
}
.sheet-inner { padding: 22px var(--gutter) calc(24px + env(safe-area-inset-bottom)); display: grid; gap: 16px; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.sheet-head .display { font-size: calc(var(--ds) * 32px); }
.sheet-close {
  min-height: 44px; padding: 0 14px; border-radius: 999px; cursor: pointer;
  background: transparent; border: 1px solid var(--line-strong);
  font: 500 14px/1 var(--f-mono); letter-spacing: .12em; text-transform: uppercase;
}
.sheet-list { display: grid; gap: 10px; }
.sheet-opt {
  display: grid; gap: 4px; padding: 16px 18px;
  border: 1px solid var(--line); border-left: 3px solid var(--c); border-radius: 12px;
  text-decoration: none; background: var(--espresso-3);
  transition: border-color .3s var(--ease);
}
.sheet-opt:hover { border-color: color-mix(in oklab, var(--c) 70%, transparent); border-left-color: var(--c); }
.sheet-title { font-size: 19px; font-weight: 500; }
.sheet-text { color: var(--ink-soft); font-size: 15px; line-height: 1.5; }
.sheet-wa { color: var(--saffron); font-weight: 500; font-size: 15px; margin-top: 4px; }
.sheet-sub { display: inline-flex; align-items: center; min-height: 44px; padding-left: 18px; font-size: 15px; color: var(--ink-soft); }
.sheet-foot { font-size: 15px; color: var(--ink-muted); }
.sheet-foot a { color: var(--ink); }
@media (min-width: 768px) {
  .sheet { width: calc(100% - 48px); max-width: 560px; margin: auto; border-radius: 20px; border: 1px solid var(--line-strong); }
  .sheet-inner { padding: 28px; }
}
@media (prefers-reduced-motion: no-preference) {
  .sheet[open] { animation: sheet-in .5s var(--ease); }
  .menu[open] { animation: fade-in .35s var(--ease); }
}
@keyframes sheet-in { from { transform: translateY(24px); opacity: .6; } }
@keyframes fade-in { from { opacity: .4; } }

/* ---------- prototype-only type switcher ---------- */
.typeswitch {
  position: fixed; right: 12px; bottom: 12px; z-index: 60;
  display: grid; justify-items: end; gap: 8px;
  font-family: "Geist", system-ui, sans-serif;      /* fixed, so it never changes with the system under test */
}
.ts-toggle {
  display: inline-flex; align-items: center; gap: 10px;
  min-height: 44px; padding: 0 16px 0 6px;
  background: var(--cream); color: var(--espresso);
  border: 0; border-radius: 999px; cursor: pointer;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .35);
  font: 500 14px/1 "Geist", system-ui, sans-serif;
}
.ts-aa {
  display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%;
  background: var(--espresso); color: var(--saffron);
  font: 500 15px/1 "Geist", system-ui, sans-serif; letter-spacing: -.02em;
}
.ts-panel {
  width: min(320px, calc(100vw - 24px));
  background: var(--cream); color: var(--espresso);
  border-radius: 16px; padding: 16px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, .4);
}
.ts-panel .label { color: #6B5644; font-family: "Geist Mono", monospace; letter-spacing: .1em; margin-bottom: 8px; }
.ts-panel fieldset { border: 0; margin: 0; padding: 0; display: grid; gap: 4px; }
.ts-opt {
  display: grid; grid-template-columns: 20px 1fr; gap: 10px; align-items: start;
  padding: 10px; border-radius: 10px; cursor: pointer; font-size: 15px; line-height: 1.35;
}
.ts-opt:hover { background: rgba(24, 12, 4, .06); }
.ts-opt input { margin: 3px 0 0; accent-color: var(--espresso); width: 18px; height: 18px; }
.ts-opt b { font-weight: 600; }
.ts-opt em { font-style: normal; font-size: 14px; color: #6B5644; margin-left: 4px; }
.ts-opt small { font-size: 14px; color: #6B5644; }
.ts-note { font-size: 14px; color: #6B5644; margin-top: 8px; padding-top: 10px; border-top: 1px solid rgba(24, 12, 4, .12); }

/* ==========================================================================
   Old-site pieces that still render on the new theme (17 Oct 2026):
   the cookie banner (snippet #51) and the free-guide form (snippet #262, /coffee-certification-guide/).
   Restyled here so they match the new design; their markup and behaviour are unchanged.
   ========================================================================== */
html body #mct-cookie {
  right: 24px; bottom: 24px; width: 400px; max-width: calc(100vw - 32px);
  padding: 24px; border: 1px solid var(--line-strong); border-radius: var(--radius, 18px);
  background: var(--espresso-2); box-shadow: 0 24px 64px rgba(0, 0, 0, .55);
  font-family: var(--f-sans);
}
html body #mct-cookie h3 { font: 500 20px/1.25 var(--f-sans); font-style: normal; letter-spacing: -.01em; color: var(--cream); margin: 0 0 8px; }
html body #mct-cookie p { font-size: 15px; font-weight: 400; line-height: 1.55; color: var(--ink-soft); margin: 0 0 18px; }
html body #mct-cookie p a { color: var(--saffron-lt); border-bottom-color: currentColor; }
html body #mct-cookie .mct-actions { gap: 10px; }
html body #mct-accept, html body #mct-decline {
  min-height: 48px; padding: 0 18px; border-radius: 999px;
  font: 500 15px/1 var(--f-sans); letter-spacing: 0; text-transform: none;
}
html body #mct-accept { background: var(--saffron); color: var(--espresso); border: 0; }
html body #mct-accept:hover { background: var(--saffron-lt); }
html body #mct-decline { background: transparent; color: var(--cream); border: 1px solid var(--line-strong); }
html body #mct-decline:hover { border-color: var(--cream); }
html body #mct-accept:focus-visible, html body #mct-decline:focus-visible { outline: 2px solid var(--saffron); outline-offset: 3px; }
@media (max-width: 599px) {
  html body #mct-cookie { left: 12px; right: 12px; bottom: 12px; width: auto; max-width: none; padding: 20px; }
  html body #mct-accept, html body #mct-decline { white-space: nowrap; padding: 0 14px; flex: 1 1 0; }
  html body #mct-accept { flex-grow: 1.5; }
}

.ja-body .lm-wrap { max-width: 640px; margin: 8px 0 0; padding: 0; font-family: var(--f-sans); font-weight: 400; }
.ja-body .lm-card { border-radius: var(--radius, 18px); padding: clamp(24px, 4vw, 44px); text-align: left; }
.ja-body .lm-eyebrow { font-size: 14px; letter-spacing: .08em; opacity: .75; }
.ja-body .lm-title { font: 500 clamp(26px, 2vw + 16px, 34px)/1.15 var(--f-sans); font-style: normal; letter-spacing: -.01em; color: #180C04; margin: 0 0 12px; }
.ja-body .lm-dek { font-size: 16px; line-height: 1.55; opacity: .8; color: #180C04; }
.ja-body .lm-row input { min-height: 48px; font-size: 16px; border-radius: 10px; }
.ja-body .lm-btn, .ja-body .lm-download-btn { min-height: 48px; padding: 0 24px; border-radius: 999px; font-size: 15px; letter-spacing: 0; text-transform: none; }
.ja-body .lm-error, .ja-body .lm-success p { font-size: 15px; }
