/* ============================================================
   Aurora — Meridian Coffee
   One continuous fall: light & ethereal, deepening to roast,
   landing as a sunrise in the cup.
   ============================================================ */

:root{
  --paper:    #faf6ef;
  --paper-2:  #f2e9da;
  --ink:      #454e68;
  --ink-soft: #6c7388;
  --ink-faint:#9398a8;

  --bergamot: #d4843a;
  --honey:    #e0a52a;
  --cherry:   #d8412f;
  --roastbg:  #221811;

  --serif: "DM Serif Display", "Times New Roman", serif;
  --sans:  "Inter", system-ui, sans-serif;
  --ease:  cubic-bezier(.22,.61,.36,1);
}

*{ box-sizing:border-box; margin:0; padding:0; }

html,body{ background:var(--paper); }

body{
  font-family:var(--sans);
  color:var(--ink);
  font-weight:300;
  line-height:1.6;
  -webkit-font-smoothing:antialiased;
  overflow-x:hidden;
}

img{ display:block; }
::selection{ background:var(--bergamot); color:#fff; }

/* ---------- atmospheric overlays ---------- */
.grain{
  position:fixed; inset:0;
  pointer-events:none;
  z-index:41;
  opacity:.5;
  mix-blend-mode:soft-light;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.82' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size:200px 200px;
}

/* sunrise grade — two fixed washes scrubbed by overall progress:
   a cool pre-dawn multiply that lifts, then a golden-hour glow */
.dawn{
  position:fixed; inset:0; pointer-events:none; z-index:38;
  background:linear-gradient(180deg,
    rgba(86,104,138,.30), rgba(116,128,152,.16) 60%, rgba(116,128,152,.06));
  mix-blend-mode:multiply;
}
.gold{
  position:fixed; inset:0; pointer-events:none; z-index:39;
  background:radial-gradient(120% 95% at 50% 108%,
    rgba(224,165,42,.38), rgba(240,200,120,.16) 55%, transparent 80%);
  mix-blend-mode:soft-light;
  opacity:0;
}
.static .dawn,.static .gold{ display:none; }

/* ---------- cup-fill scroll progress ---------- */
.cupfill{
  position:fixed; right:clamp(16px,2.6vw,30px); bottom:clamp(14px,2.4vh,24px);
  z-index:55; pointer-events:none;
}
.cupfill__line{
  stroke:var(--ink-soft); stroke-width:1.5; stroke-linecap:round;
  fill:none;
}
.cupfill__liquid{ fill:#5e4128; }
.cupfill__steam{
  position:absolute; left:11px; top:-7px;
  width:7px; height:7px; border-radius:50%;
  background:radial-gradient(circle, rgba(108,115,136,.55), transparent 70%);
  filter:blur(1.5px);
  opacity:0;
  transition:opacity .6s var(--ease);
}
.cupfill__steam--2{ left:19px; top:-10px; }
.cupfill--full .cupfill__steam{
  opacity:1;
  animation:cupsteam 2.2s ease-out infinite;
}
.cupfill--full .cupfill__steam--2{ animation-delay:-1.1s; }
@keyframes cupsteam{
  0%  { transform:translateY(0)    scale(.7); opacity:.8; }
  100%{ transform:translateY(-9px) scale(1.5); opacity:0; }
}

/* ---------- top bar ---------- */
.topbar{
  position:fixed; top:0; left:0; right:0;
  z-index:50;
  display:flex; align-items:center; justify-content:space-between;
  padding:22px clamp(20px,4vw,52px);
  /* difference-blend so the mark stays readable on any background
     beneath it — light hero, dark roast moment, warm close */
  mix-blend-mode:difference;
}
.topbar__mark{
  display:flex; align-items:center; gap:9px;
  text-decoration:none; color:#fff;
  font-family:var(--serif); font-size:20px;
}
.topbar__mark svg{ transition:transform .6s var(--ease); }
.topbar__mark:hover svg{ transform:rotate(140deg); }
.topbar__edition{
  font-size:11px; letter-spacing:.22em; text-transform:uppercase;
  color:#fff;
}

/* ---------- shared type ---------- */
.eyebrow{
  font-size:12px; letter-spacing:.32em; text-transform:uppercase;
  color:var(--ink-faint); font-weight:400;
}
.display{
  font-family:var(--serif); font-weight:300;
  font-size:clamp(2.4rem,5.6vw,4.8rem);
  line-height:1.05; letter-spacing:-.018em;
}
.lede{
  font-size:clamp(1.05rem,1.55vw,1.32rem);
  color:var(--ink-soft); max-width:34ch; line-height:1.62;
}

section, header, footer{ position:relative; z-index:2; }

/* ---------- reveal mechanic ---------- */
[data-reveal]{ opacity:0; transform:translateY(28px); }
.no-motion [data-reveal]{ opacity:1 !important; transform:none !important; }

/* ============================================================
   HERO
   ============================================================ */
.hero{
  min-height:100vh;
  display:flex; flex-direction:column;
  justify-content:center;
  padding:120px clamp(24px,7vw,110px) 90px;
  overflow:hidden;
}
.hero__media{
  position:absolute; inset:-14% 0;
  z-index:-2;
}
.hero__media img{ width:100%; height:100%; object-fit:cover; }
.hero__wash{
  position:absolute; inset:0; z-index:-1;
  background:
    linear-gradient(98deg,
      rgba(250,246,239,.95) 0%,
      rgba(250,246,239,.82) 26%,
      rgba(250,246,239,.30) 52%,
      rgba(250,246,239,0) 72%),
    linear-gradient(0deg, rgba(250,246,239,.6), transparent 38%);
}
.hero__inner{ max-width:620px; }
.hero__title{
  font-family:var(--serif); font-weight:300;
  font-size:clamp(4.4rem,16vw,12rem);
  line-height:.94; letter-spacing:-.04em;
  margin:.04em 0 .2em;
}
.hero__sub{
  font-family:var(--serif); font-style:italic;
  font-size:clamp(1.1rem,2vw,1.55rem);
  color:var(--ink-soft); max-width:26ch;
}
.scrollcue{
  position:absolute; bottom:30px; left:50%;
  transform:translateX(-50%);
  display:flex; flex-direction:column; align-items:center; gap:12px;
  font-size:11px; letter-spacing:.26em; text-transform:uppercase;
  color:var(--ink-faint);
}
.scrollcue__line{
  width:1px; height:52px;
  background:linear-gradient(var(--ink-faint),transparent);
  animation:cue 2.4s var(--ease) infinite;
  transform-origin:top;
}
@keyframes cue{
  0%,100%{ transform:scaleY(.3); opacity:.3; }
  50%    { transform:scaleY(1);  opacity:1; }
}

/* ============================================================
   THE FALL — scroll-gravity bean cascade
   ============================================================ */
.fall{ min-height:560vh; }
.fall__pin{
  position:sticky; top:0;
  height:100vh;
  overflow:hidden;
}
.fall__bg{
  position:absolute; inset:0; z-index:0;
  background-color:var(--paper);
}
.fall__canvas{
  position:absolute; inset:0; z-index:1;
  width:100%; height:100%;
  pointer-events:none;
}
.fall__canvas--fore{ z-index:4; }
.fall__photo{
  position:absolute; inset:0; z-index:2;
  opacity:0;
}
.fall__photo img{ width:100%; height:100%; object-fit:cover; }
.fall__photo::after{
  content:""; position:absolute; inset:0;
  background:linear-gradient(0deg,
    rgba(20,14,9,.6), rgba(20,14,9,.22) 48%, rgba(20,14,9,.05));
}
.fall__act{
  position:absolute; z-index:3;
  top:50%; transform:translateY(-50%);
  max-width:520px;
  opacity:0;
}
.fall__act .display{ margin:.3em 0 .5em; }
.fall__act--1{ left:clamp(24px,7vw,110px); }
.fall__act--2{
  right:clamp(24px,7vw,110px);
  text-align:right;
}
.fall__act--2 .lede{ margin-left:auto; }
.fall__act--3{
  left:50%; top:46%;
  transform:translate(-50%,-50%);
  text-align:center;
  color:#f6e9d4;
}
.fall__act--3 .eyebrow{ color:rgba(240,212,168,.75); }
.fall__act--3 .lede{ color:rgba(246,233,212,.82); margin-inline:auto; }
.fall__act--4{
  left:50%; top:auto; bottom:12vh;
  transform:translateX(-50%);
  text-align:center;
  color:#fbf3e6;
}
.fall__act--4 .eyebrow{ color:rgba(251,243,230,.72); }
.fall__act--4 .lede{ color:rgba(251,243,230,.85); margin-inline:auto; }

/* ---------- pour-stream seams between sections ---------- */
.pour{
  position:relative; z-index:2;
  height:16vh;
  display:flex; justify-content:center;
}
.pour span{
  width:2px; height:100%;
  background:linear-gradient(180deg, transparent, #5e4128 22%, #5e4128 78%, transparent);
  transform:scaleY(0);
  transform-origin:top;
  border-radius:2px;
}

/* ============================================================
   THE CUP  (photo + hotspots)
   ============================================================ */
.notes{
  background:linear-gradient(180deg,var(--paper-2),var(--paper));
  min-height:320vh;
}
.notes__pin{
  position:sticky; top:0;
  min-height:100vh;
  display:flex; flex-direction:column;
  justify-content:center; align-items:center;
  padding:clamp(60px,9vh,104px) clamp(24px,6vw,96px);
}
.notes__head{ max-width:640px; margin:0 auto clamp(20px,3.4vh,40px); text-align:center; }
.notes__head .display{ margin-top:.3em; font-size:clamp(1.85rem,3.2vw,3rem); }
.notes__lede{ margin:.9em auto 0; }
.notes__stage{
  position:relative;
  width:min(84vh,1000px); max-width:100%;
  aspect-ratio:3/2;
  border-radius:6px; overflow:hidden;
  box-shadow:0 60px 100px -52px rgba(42,32,24,.75);
}
.notes__stage img{ width:100%; height:100%; object-fit:cover; }
.hotspot{
  position:absolute;
  left:var(--x); top:var(--y);
  transform:translate(-50%,-50%);
  width:0; height:0;
}
.hotspot__dot{
  position:absolute;
  left:0; top:0;
  width:16px; height:16px;
  margin:-8px 0 0 -8px;
  border-radius:50%;
  background:#fff;
  box-shadow:0 0 0 2px rgba(255,255,255,.5), 0 4px 14px rgba(0,0,0,.4);
}
.hotspot__dot::after{
  content:"";
  position:absolute; inset:-7px;
  border-radius:50%;
  border:1px solid rgba(255,255,255,.85);
  animation:ping 2.6s var(--ease) infinite;
}
@keyframes ping{
  0%  { transform:scale(.6); opacity:.9; }
  70% { transform:scale(1.7); opacity:0; }
  100%{ opacity:0; }
}
.hotspot__label{
  position:absolute;
  left:50%; top:18px;
  transform:translateX(-50%);
  width:172px;
  background:rgba(250,246,239,.94);
  backdrop-filter:blur(4px);
  border-radius:12px;
  padding:12px 15px;
  box-shadow:0 18px 38px -22px rgba(42,32,24,.7);
  display:flex; flex-direction:column; gap:3px;
  text-align:center;
}
.hotspot__label b{
  font-family:var(--serif); font-weight:400; font-size:1.15rem;
}
.hotspot__label i{
  font-style:normal; font-size:.78rem; color:var(--ink-soft);
  line-height:1.4;
}

/* drifting steam / mist — a reusable atmospheric layer.
   JS fills each .steam container with .wisp spans. */
.steam{
  position:absolute; z-index:2;
  width:180px;
  transform:translateX(-50%);
  pointer-events:none;
}
.steam--hero { left:65%; top:12%; height:40%; z-index:-1; }
.steam--close{ left:48%; top:20%; height:25%; }
.steam--close .wisp{
  mix-blend-mode:screen;
  background:radial-gradient(circle at 50% 50%,
    rgba(var(--wisp,255,255,255),.78), rgba(var(--wisp,255,255,255),0) 70%);
}
.steam--hero .wisp{
  background:radial-gradient(circle at 50% 50%,
    rgba(var(--wisp,255,255,255),.78), rgba(var(--wisp,255,255,255),0) 70%);
}
.wisp{
  position:absolute;
  bottom:0; left:50%;
  width:var(--w,52px); height:var(--w,52px);
  border-radius:50%;
  background:radial-gradient(circle at 50% 50%,
    rgba(var(--wisp,255,255,255),.6), rgba(var(--wisp,255,255,255),0) 68%);
  filter:blur(7px);
  opacity:0;
  animation:steam var(--d,8.5s) ease-out infinite;
  animation-delay:var(--delay,0s);
}
@keyframes steam{
  0%   { transform:translate(calc(-50% + var(--x,0px)), 0) scale(.45); opacity:0; }
  18%  { opacity:.5; }
  55%  { transform:translate(calc(-50% + var(--x,0px) + var(--sway,12px)), -150px) scale(1.05);
         opacity:.32; }
  100% { transform:translate(calc(-50% + var(--x,0px) - var(--drift,8px)), -320px) scale(1.95);
         opacity:0; }
}

/* ============================================================
   CLOSE — THE POUR  (golden landing)
   ============================================================ */
.close{
  min-height:100vh;
  display:flex; align-items:center; justify-content:center;
  text-align:center;
  padding:120px 24px;
  overflow:hidden;
}
.close__media{ position:absolute; inset:-14% 0; z-index:-2; }
.close__media img{ width:100%; height:100%; object-fit:cover; }
.close__wash{
  position:absolute; inset:0; z-index:-1;
  background:radial-gradient(60% 70% at 50% 50%,
    rgba(250,240,222,.82), rgba(248,238,218,.96) 78%);
}
.close__inner{ max-width:620px; }
.close__title{
  font-family:var(--serif); font-weight:300;
  font-size:clamp(4rem,13vw,9rem);
  line-height:1; letter-spacing:-.04em;
  margin:.1em 0 .26em;
}
.close__sub{
  color:var(--ink-soft); font-size:1.1rem;
  max-width:32ch; margin:0 auto 36px;
  text-shadow:0 1px 12px rgba(250,246,239,.95),0 0 26px rgba(250,246,239,.8);
}
.close__title{ text-shadow:0 2px 22px rgba(250,246,239,.7); }
.cta{
  display:inline-flex; align-items:center; gap:10px;
  background:var(--ink); color:var(--paper);
  text-decoration:none;
  font-size:14px; letter-spacing:.06em;
  padding:16px 28px; border-radius:40px;
  transition:transform .4s var(--ease), background .4s var(--ease);
}
.cta:hover{ transform:translateY(-3px); background:var(--cherry); }
.cta svg{ transition:transform .4s var(--ease); }
.cta:hover svg{ transform:translateX(4px); }
.close__fine{
  margin-top:32px; font-size:12px;
  color:var(--ink-faint);
}
.close__fine a{ color:var(--ink-soft); }

/* ============================================================
   STATIC FALLBACK  (no GSAP / reduced motion)
   The fall un-pins into stacked editorial moments.
   ============================================================ */
.static .fall{ min-height:auto; }
.static .fall__pin{ position:static; height:auto; overflow:visible; }
.static .fall__bg,.static .fall__canvas{ display:none; }
.static .fall__act{
  position:static; transform:none; opacity:1;
  max-width:640px;
  margin:0 auto;
  padding:13vh clamp(24px,6vw,96px);
  text-align:left; color:var(--ink);
}
.static .fall__act--3 .eyebrow,
.static .fall__act--4 .eyebrow{ color:var(--ink-faint); }
.static .fall__act--3 .lede,
.static .fall__act--4 .lede{ color:var(--ink-soft); }
.static .fall__photo{
  position:static; opacity:1;
  max-width:820px; margin:0 auto;
  border-radius:6px; overflow:hidden;
}
.static .fall__photo::after{ display:none; }
.static .pour{ display:none; }
.static .cupfill__steam{ display:none; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width:880px){
  .fall{ min-height:480vh; }
  .fall__act{
    left:24px !important; right:24px !important;
    max-width:none;
    text-align:center;
  }
  .fall__act .lede{ margin-inline:auto; }
  .fall__act--1,.fall__act--2{ top:auto; bottom:12vh; transform:none; }
  .fall__act--3{ top:44%; transform:translateY(-50%); }
  .fall__act--4{ bottom:10vh; transform:none; }

  .notes{ min-height:auto; }
  .notes__pin{
    position:static; min-height:auto;
    padding:14vh clamp(24px,6vw,96px);
  }
  .notes__stage{ width:100%; }
  .hotspot__label{ width:140px; padding:9px 11px; }
  .hotspot__label i{ display:none; }
  .steam--hero,.steam--close{ left:50%; }
  .topbar__edition{ display:none; }
}

@media (prefers-reduced-motion:reduce){
  .scrollcue__line, .hotspot__dot::after, .wisp, .cupfill__steam{ animation:none; }
  .wisp{ opacity:0; }
  *{ scroll-behavior:auto !important; }
}
