/* ===========================================================
   home.css — homepage-only sections, in the site's warm
   cream editorial theme: statement reveal, food band,
   pinned steps, journal card row.
   =========================================================== */

/* ======================================================
   CINEMATIC INTRO — kitchen -> the plate -> molecular zoom

   The stage is sticky for the height of .cinema, so scroll
   position drives a single continuous shot: Emma in her
   kitchen, a hold on the plate she made, then a scientific
   zoom into it with a magnification graph running alongside.
   ====================================================== */
.cinema { position: relative; height: 460vh; background: #050705; }
.cinema-stage {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
  background: #050705;
}

/* layer: kitchen scene */
.scene { position: absolute; inset: 0; will-change: transform, opacity; }
.scene img { width: 100%; height: 100%; object-fit: cover; }
.scene-kitchen .veil {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(5,8,5,.34) 0%, rgba(5,8,5,0) 28%, rgba(5,8,5,.10) 58%, rgba(5,8,5,.72) 100%);
}

/* layer: the plate and everything the zoom turns it into */
.zoom-canvas {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  opacity: 0;
  will-change: opacity;
}

/* radial emerald wash for the molecular phase */
.molecular-wash {
  position: absolute; inset: 0;
  background: radial-gradient(120% 90% at 50% 50%, rgba(20,60,38,0), rgba(4,12,8,.88) 78%);
  opacity: 0;
  pointer-events: none;
}

/* Keeps the copy, the graph and the header legible over any frame of
   the sequence — the plate is bright cream, the molecular phase is
   near-black, and white text has to survive both. */
.cinema-scrim {
  position: absolute; inset: 0;
  z-index: 3;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(4,10,7,.42) 0%, rgba(4,10,7,.08) 13%, rgba(4,10,7,0) 24%),
    linear-gradient(0deg,   rgba(4,10,7,.88) 0%, rgba(4,10,7,.60) 14%, rgba(4,10,7,.22) 28%, rgba(4,10,7,0) 44%),
    linear-gradient(90deg,  rgba(4,10,7,.46) 0%, rgba(4,10,7,.10) 12%, rgba(4,10,7,0) 24%);
}

/* ---- reticle: marks the spot we dive into ---- */
.reticle {
  position: absolute;
  left: 50%; top: 50%;
  width: 22vmin; height: 22vmin;
  transform: translate(-50%, -50%);
  opacity: 0;
  z-index: 4;
  pointer-events: none;
}
.reticle i {
  position: absolute;
  width: 18px; height: 18px;
  border: 1.5px solid rgba(154, 226, 184, .9);
}
.reticle i:nth-child(1) { top: 0; left: 0; border-right: 0; border-bottom: 0; }
.reticle i:nth-child(2) { top: 0; right: 0; border-left: 0; border-bottom: 0; }
.reticle i:nth-child(3) { bottom: 0; left: 0; border-right: 0; border-top: 0; }
.reticle i:nth-child(4) { bottom: 0; right: 0; border-left: 0; border-top: 0; }
.reticle .dot {
  position: absolute; left: 50%; top: 50%;
  width: 5px; height: 5px; margin: -2.5px 0 0 -2.5px;
  border-radius: 50%;
  background: var(--clay);
  box-shadow: 0 0 0 6px rgba(90, 217, 148, .18);
}

/* ---- the zoom graph ---- */
.zoomgraph {
  position: absolute;
  left: clamp(1rem, 3.5vw, 3.2rem);
  top: 50%;
  transform: translateY(-50%);
  z-index: 6;
  width: 172px;
  opacity: 0;
  color: rgba(244, 246, 239, .8);
  font-family: var(--font-body);
  transition: opacity .5s var(--ease);
  text-shadow: 0 1px 12px rgba(0, 0, 0, .8);
}
.zg-head {
  display: flex; align-items: center; gap: .5em;
  font-size: .62rem; letter-spacing: .22em; text-transform: uppercase;
  color: rgba(154, 226, 184, .85);
}
.zg-live {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--clay);
  animation: zgPulse 1.6s ease-in-out infinite;
}
@keyframes zgPulse { 0%, 100% { opacity: .35; } 50% { opacity: 1; } }

.zg-read b {
  display: block;
  font-family: var(--font-display);
  font-size: 2.1rem;
  line-height: 1;
  font-weight: 500;
  letter-spacing: -.02em;
  color: #F4F6EF;
  margin: .5rem 0 1rem;
  font-variant-numeric: tabular-nums;
}

.zg-body { display: flex; gap: .85rem; }
.zg-rail {
  position: relative;
  width: 2px;
  box-shadow: 0 0 10px rgba(0,0,0,.6);
  height: 190px;
  background: rgba(244, 246, 239, .16);
  border-radius: 2px;
  flex: none;
}
.zg-rail i {
  position: absolute;
  left: -4px;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--clay);
  box-shadow: 0 0 14px rgba(90, 199, 124, .7);
  top: 0;
  will-change: top;
}
.zg-ticks {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 190px;
  font-size: .66rem;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.zg-ticks li {
  color: rgba(244, 246, 239, .35);
  transition: color .35s var(--ease), transform .35s var(--ease);
  transform-origin: left center;
}
.zg-ticks li.on { color: #F4F6EF; transform: translateX(2px); }

.zg-foot {
  margin-top: .9rem;
  font-size: .62rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: rgba(244, 246, 239, .45);
  font-variant-numeric: tabular-nums;
}
.zg-foot .zg-scale::before {
  content: "";
  display: inline-block;
  width: 26px; height: 1px;
  background: rgba(244, 246, 239, .45);
  margin-right: .5em;
  vertical-align: middle;
}

/* intro text lines */
.cinema-copy {
  position: absolute;
  left: 0; right: 0;
  bottom: clamp(8%, 12vh, 16%);
  text-align: center;
  padding-inline: var(--pad-x);
  z-index: 5;
  pointer-events: none;
}
.cinema-line {
  position: absolute;
  left: 50%; transform: translateX(-50%);
  bottom: 0;
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: -.02em;
  line-height: 1.06;
  font-size: clamp(1.85rem, 5.4vw, 4.6rem);
  color: #F4F6EF;
  width: min(100%, 16ch);
  text-wrap: balance;
  opacity: 0;
  will-change: opacity, transform;
}
.cinema-line .em { color: var(--clay); font-style: italic; }

/* scroll cue */
.cinema-cue {
  position: absolute; left: 0; right: 0; bottom: 2.2rem;
  text-align: center;
  font-family: var(--font-body);
  font-size: .72rem; letter-spacing: .3em; text-transform: uppercase;
  color: rgba(244,246,239,.55);
  z-index: 6;
  animation: cuePulse 2.4s ease-in-out infinite;
}
@keyframes cuePulse { 0%,100%{opacity:.4} 50%{opacity:1} }

.cinema-tag {
  position: absolute; right: clamp(1rem,4vw,3rem); top: 50%; transform: translateY(-50%) rotate(90deg);
  transform-origin: right center;
  font-family: var(--font-body); font-size: .68rem; letter-spacing: .34em; text-transform: uppercase;
  color: rgba(244,246,239,.45); z-index: 6;
}

/* header while the dark intro is on screen */
body.cinema-view .site-header:not(.scrolled) { background: transparent; }
body.cinema-view .site-header .brand,
body.cinema-view .site-header .brand .mark { color: #F4F6EF; }
body.cinema-view .site-header .nav-links a { color: #ECEFE6; }
body.cinema-view .site-header.scrolled {
  background: rgba(8,11,8,.72);
  backdrop-filter: saturate(1.2) blur(14px);
  -webkit-backdrop-filter: saturate(1.2) blur(14px);
  box-shadow: 0 1px 0 rgba(236,239,230,.12);
}

/* the hero right after the intro needs less headroom */
.home .hero { padding-top: clamp(4rem, 8vw, 6rem); }

/* ======================================================
   STATEMENT — highlight-bar reveal + scramble
   ====================================================== */
.redact-head {
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: -.02em;
  line-height: 1.08;
  font-size: clamp(1.9rem, 5vw, 3.8rem);
  max-width: 22ch;
}
.redact {
  position: relative;
  display: inline-block;
  color: var(--ink);
}
.redact > span { position: relative; z-index: 1; transition: color .1s; }
.redact::after {
  content: "";
  position: absolute; inset: -.05em -.18em;
  background: var(--coral);
  z-index: 2;
  transform-origin: left center;
  transition: transform .7s cubic-bezier(.7,0,.2,1);
  border-radius: 3px;
}
.redact.lift::after { transform: scaleX(0); }

.classified-row {
  display: flex; gap: 1rem; align-items: center;
  font-family: var(--font-body); font-size: .72rem; letter-spacing: .26em; text-transform: uppercase;
  color: var(--coral-deep); margin-bottom: 1.4rem;
}
.classified-row::before { content: ""; width: 34px; height: 1.5px; background: var(--coral); }
.classified-row .blink { width: 7px; height: 7px; border-radius: 2px; background: var(--coral); animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { opacity: .25; } }

/* ======================================================
   FOOD BAND — full-bleed image with statement
   ====================================================== */
.band {
  position: relative;
  min-height: 72vh;
  display: grid; place-items: center;
  text-align: center;
  overflow: hidden;
}
.band-bg { position: absolute; inset: 0; }
.band-bg img { width: 100%; height: 100%; object-fit: cover; }
.band-bg::after { content:""; position:absolute; inset:0; background: linear-gradient(180deg, rgba(12,20,14,.66), rgba(12,20,14,.5)); }
.band-inner { position: relative; z-index: 2; padding: clamp(3rem,8vw,5rem) var(--pad-x); }
.band h2 { font-size: clamp(2rem,5vw,4rem); max-width: 22ch; margin-inline: auto; color: #FCF9F3; }
.band h2 em { font-style: italic; color: var(--clay); }
.band-eyebrow { color: var(--clay); }
.band-eyebrow::before, .band-eyebrow::after { background: var(--clay); }

/* ======================================================
   JOURNAL — native horizontal scroll card row
   ====================================================== */
.hscroll-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; margin-bottom: clamp(1.5rem,3vw,2.5rem); }
.hscroll-hint { font-size: .85rem; }
.hscroll-track {
  display: flex; gap: clamp(1rem,2vw,1.6rem);
  padding-inline: max(var(--pad-x), calc((100vw - var(--maxw)) / 2 + var(--pad-x)));
  padding-bottom: 1.2rem;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.hcard {
  flex: 0 0 clamp(280px, 30vw, 400px);
  scroll-snap-align: start;
  background: var(--paper);
  border: 1px solid var(--cream-line);
  border-radius: var(--r-lg);
  overflow: hidden;
  display: flex; flex-direction: column;
  transition: border-color .4s var(--ease), transform .4s var(--ease), box-shadow .4s var(--ease);
}
.hcard:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: transparent; }
.hcard .media { aspect-ratio: 16/10; overflow: hidden; position: relative; }
.hcard .media img { width: 100%; height: 100%; object-fit: cover; transition: transform 1s var(--ease); }
.hcard:hover .media img { transform: scale(1.05); }
.hcard .media.grad-a { background: linear-gradient(140deg, var(--forest-2), var(--forest)); }
.hcard .media.grad-b { background: linear-gradient(140deg, var(--clay), var(--coral)); }
.hcard .body { padding: clamp(1.2rem,2.4vw,1.8rem); display: flex; flex-direction: column; gap: .6rem; flex: 1; }
.hcard .date { font-family: var(--font-body); font-size: .76rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--coral-deep); }
.hcard h3 { font-size: clamp(1.2rem,2vw,1.5rem); }
.hcard p { font-size: .94rem; color: color-mix(in srgb, var(--ink) 66%, transparent); }
.hcard .who { margin-top: auto; padding-top: .8rem; font-size: .82rem; color: color-mix(in srgb, var(--ink) 58%, transparent); display: flex; align-items: center; gap: .5rem; }
.hcard .who .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--coral); }

/* ======================================================
   responsive
   ====================================================== */
@media (max-width: 900px) {
  .band { min-height: 56vh; }
}
/* the drawer panel is always cream — keep its links readable
   even while the dark intro is behind the header */
@media (max-width: 1040px) {
  body.cinema-view .site-header .nav-links a { color: var(--ink); }
}
@media (max-width: 720px) {
  .hcard { flex-basis: 78vw; }
  .cinema { height: 400vh; }
  .cinema-tag { display: none; }
  /* the graph shrinks to a readout and a rail on phones */
  .zoomgraph { width: 118px; left: 1rem; }
  .zg-read b { font-size: 1.5rem; }
  .zg-rail, .zg-ticks { height: 150px; }
  .zg-ticks { font-size: .58rem; letter-spacing: .1em; }
}

@media (prefers-reduced-motion: reduce) {
  .redact::after { transform: scaleX(0) !important; }
  .cinema { height: 100vh; }
  .cinema-line[data-line="1"] { opacity: 1 !important; }
  .cinema-cue, .zoomgraph, .reticle { display: none; }
}

/* the arrow buttons replace the scrollbar entirely */
.hscroll-track::-webkit-scrollbar { display: none; }
