/* =====================================================================
   LOVEBUG — scenes.css
   Lifecycle (pinned morph), Seasons (horizontal scrub), Highway,
   Finale (coupled flight), responsive + print.
   ===================================================================== */

/* =====================================================================
   LIFECYCLE — the pinned morph
   ===================================================================== */
.cycle { --z: 3; }
.cycle__pin {
  background: var(--night);
  color: var(--cream);
  --horizon: 15%;
  --sky: 0;
}

/* Sky (above horizon) */
.cycle__sky { position: absolute; inset: 0; background: linear-gradient(180deg, #1c1613 0%, #0b0a09 55%); }
.cycle__sky-bright {
  position: absolute; inset: 0;
  background:
    radial-gradient(90% 70% at 50% 100%, rgba(242,85,44,.28) 0%, rgba(242,85,44,0) 60%),
    linear-gradient(180deg, #f6c8a2 0%, #f3ece2 68%);
  opacity: var(--sky);
}
/* Soil (below horizon) */
.cycle__soil {
  position: absolute; left: 0; right: 0; bottom: -10%;
  top: var(--horizon);
  background: linear-gradient(180deg, #2a1f16 0%, #1a130e 26%, #0d0b09 100%);
  box-shadow: 0 -40px 90px rgba(0,0,0,.45);
}
.cycle__soil::before {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(28% 18% at 18% 30%, rgba(201,138,69,.10), transparent 70%),
    radial-gradient(22% 14% at 74% 52%, rgba(155,132,103,.10), transparent 70%),
    radial-gradient(34% 22% at 58% 86%, rgba(242,85,44,.06), transparent 70%),
    radial-gradient(16% 10% at 32% 72%, rgba(239,226,182,.05), transparent 70%);
  filter: blur(6px);
}
.cycle__soil::after {
  /* leaf-litter line right at the surface */
  content: ""; position: absolute; left: 0; right: 0; top: -1px; height: 22px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='260' height='22' viewBox='0 0 260 22'%3E%3Cg fill='%23000' fill-opacity='.55'%3E%3Cellipse cx='22' cy='14' rx='24' ry='5' transform='rotate(-9 22 14)'/%3E%3Cellipse cx='78' cy='12' rx='30' ry='4' transform='rotate(6 78 12)'/%3E%3Cellipse cx='142' cy='15' rx='22' ry='5' transform='rotate(-4 142 15)'/%3E%3Cellipse cx='206' cy='11' rx='34' ry='4' transform='rotate(8 206 11)'/%3E%3Cellipse cx='250' cy='15' rx='20' ry='5' transform='rotate(-12 250 15)'/%3E%3C/g%3E%3C/svg%3E");
  background-repeat: repeat-x;
  background-size: 260px 22px;
}
.cycle__horizon {
  position: absolute; left: 0; right: 0; top: var(--horizon); height: 1px;
  background: linear-gradient(90deg, transparent, rgba(243,236,226,.28) 30%, rgba(243,236,226,.28) 70%, transparent);
}

/* Stage grid */
.cycle__stage {
  position: absolute; inset: 0;
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  align-items: center;
  padding: var(--nav-h) var(--gutter) 96px;
  gap: 4vw;
}
.cycle__view { position: relative; height: 100%; display: grid; place-items: center; }

/* Specimen */
.specimen {
  position: relative;
  width: min(66vmin, 620px);
  aspect-ratio: 1;
  will-change: transform;
}
.specimen__float { width: 100%; height: 100%; animation: float 7s ease-in-out infinite; }
.specimen svg { width: 100%; height: 100%; overflow: visible; }
.specimen__glow {
  position: absolute; left: 50%; top: 50%; width: 120%; height: 120%;
  transform: translate(-50%, -50%);
  background: radial-gradient(closest-side, var(--glow, rgba(239,226,182,.18)), transparent 70%);
  filter: blur(12px);
  pointer-events: none;
}
.specimen__cap {
  position: absolute; left: 50%; bottom: 3%; transform: translateX(-50%);
  white-space: nowrap; color: var(--cream-3);
  display: flex; align-items: center; gap: 10px;
}
.specimen__cap i { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
@keyframes float { 0%, 100% { transform: translateY(-1.2%) rotate(-.6deg); } 50% { transform: translateY(1.2%) rotate(.6deg); } }

/* Egg-cluster ghost eggs */
.cluster { position: absolute; inset: 0; pointer-events: none; opacity: var(--cluster, 0); transition: opacity .5s; }
.cluster i {
  position: absolute; width: 4.2%; height: 7.5%; border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
  background: radial-gradient(60% 60% at 35% 30%, #f8efcf, #d9c58e 70%, #b39c66);
  opacity: .55; transform: rotate(var(--r)); box-shadow: 0 6px 14px rgba(0,0,0,.35);
}

/* Copy */
.cycle__copy { position: relative; height: 100%; }
.stage {
  position: absolute; inset: 0;
  display: grid; align-content: center; gap: 18px;
  visibility: hidden; pointer-events: none;
}
.stage.is-active { visibility: visible; pointer-events: auto; }
.stage > * {
  opacity: 0; transform: translateY(26px); filter: blur(6px);
  transition: opacity .55s var(--ease-out), transform .55s var(--ease-out), filter .55s var(--ease-out);
}
.stage.is-active > * {
  opacity: 1; transform: none; filter: none;
  transition-duration: .9s;
  transition-delay: calc(var(--i, 0) * 80ms + .08s);
}
.stage__num { display: flex; align-items: center; gap: 14px; color: var(--cream-3); }
.stage__num i { display: inline-block; width: 34px; height: 1px; background: currentColor; }
.stage__title {
  font-family: var(--font-display); font-weight: 400;
  font-size: clamp(52px, 6.6vw, 112px); line-height: .92; letter-spacing: -.03em;
}
.stage__title em { color: var(--stage-accent, var(--accent)); }
.stage__text { max-width: 44ch; font-size: clamp(15px, 1.15vw, 18px); line-height: 1.6; color: var(--cream-2); }
.stage__facts { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 6px; }
.fact {
  display: inline-flex; align-items: baseline; gap: 10px;
  padding: 10px 14px; border: 1px solid rgba(243,236,226,.16); border-radius: 999px;
  color: var(--cream-2); background: rgba(243,236,226,.03);
}
.fact b { font-family: var(--font-display); font-weight: 400; font-size: 22px; line-height: 1; color: var(--cream); letter-spacing: -.01em; }

/* HUD */
.cycle__hud {
  position: absolute; left: var(--gutter); right: var(--gutter); top: calc(var(--nav-h) + 4px);
  display: flex; justify-content: space-between; align-items: flex-start;
  color: var(--cream-3); pointer-events: none;
}
.hud__day { display: grid; gap: 4px; }
.hud__day b { font-family: var(--font-display); font-weight: 400; font-size: 40px; line-height: 1; color: var(--cream); font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.hud__day b small { font-size: 14px; font-family: var(--font-mono); letter-spacing: .12em; margin-left: 10px; color: var(--cream-3); }
.hud__act { display: flex; align-items: center; gap: 14px; text-align: right; }
.hud__ring { width: 46px; height: 46px; }
.hud__ring circle { fill: none; stroke-width: 1.5; }
.hud__ring .bg { stroke: rgba(243,236,226,.16); }
.hud__ring .fg { stroke: var(--cream); stroke-linecap: round; transform: rotate(-90deg); transform-origin: 50% 50%; }

/* Bottom stage strip (mobile-friendly stage index) */
.cycle__strip {
  position: absolute; left: var(--gutter); right: var(--gutter); bottom: 28px;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; color: var(--cream-3);
}
.strip__i { display: grid; gap: 10px; }
.strip__i span { display: flex; justify-content: space-between; }
.strip__bar { height: 1px; background: rgba(243,236,226,.16); position: relative; overflow: hidden; }
.strip__bar i { position: absolute; left: 0; top: 0; bottom: 0; width: 100%; background: var(--cream); transform: scaleX(var(--f, 0)); transform-origin: left; }
.strip__i.is-active { color: var(--cream); }

/* Light-phase (adult stage) — colors flip when the sky brightens */
.cycle__pin.is-light { color: var(--ink); }
.cycle__pin.is-light .stage__text, .cycle__pin.is-light .fact { color: var(--ink-2); }
.cycle__pin.is-light .fact { border-color: rgba(18,16,14,.18); background: rgba(18,16,14,.03); }
.cycle__pin.is-light .fact b, .cycle__pin.is-light .hud__day b { color: var(--ink); }
.cycle__pin.is-light .stage__num, .cycle__pin.is-light .cycle__hud, .cycle__pin.is-light .specimen__cap { color: var(--ink-3); }
.cycle__pin.is-light .hud__ring .bg { stroke: rgba(18,16,14,.16); }
.cycle__pin.is-light .hud__ring .fg { stroke: var(--ink); }
.cycle__pin.is-light .cycle__horizon { background: linear-gradient(90deg, transparent, rgba(18,16,14,.25) 30%, rgba(18,16,14,.25) 70%, transparent); }
.cycle__pin .stage__text, .cycle__pin .fact, .cycle__pin .stage__num, .cycle__pin .cycle__hud, .cycle__pin .cycle__strip, .cycle__pin .fact b, .cycle__pin .hud__day b, .cycle__pin .specimen__cap { transition: color .7s, border-color .7s, background-color .7s; }

/* =====================================================================
   SEASONS — horizontal scrub
   ===================================================================== */
.seasons { --z: 4; }
.seasons__pin { background: var(--ivory); color: var(--ink); }
.seasons__pin::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(70% 60% at 50% 110%, rgba(246,200,162,.9), rgba(246,200,162,0) 70%);
  opacity: var(--bloom, 0);
  transition: opacity .3s;
}
.seasons__head {
  position: absolute; left: var(--gutter); right: var(--gutter); top: calc(var(--nav-h) + 1vh);
  display: flex; justify-content: space-between; align-items: flex-end; gap: 40px; z-index: 3;
}
.seasons__head h2 { font-family: var(--font-display); font-weight: 400; font-size: clamp(40px, 6vw, 96px); line-height: .94; letter-spacing: -.03em; max-width: 11ch; }
.seasons__head h2 em { color: var(--accent); }
.seasons__head p { max-width: 42ch; color: var(--ink-2); font-size: clamp(15px, 1.1vw, 17px); line-height: 1.55; }

.seasons__track {
  position: absolute; left: 0; top: 58%;
  display: flex; align-items: flex-end;
  transform: translate3d(var(--x, 0px), -50%, 0);
  will-change: transform;
  padding-left: var(--gutter);
}
.seasons__curve { position: absolute; left: 0; top: 0; height: 100%; pointer-events: none; overflow: visible; }
.seasons__curve path { fill: none; stroke: var(--accent); stroke-width: 1.5; }
.seasons__curve .fill { fill: url(#seasonsFill); stroke: none; }
.month {
  position: relative; flex: 0 0 auto;
  width: clamp(230px, 27vw, 420px); height: 46vh;
  border-left: 1px solid rgba(18,16,14,.14);
  padding: 20px 26px 0;
  display: flex; flex-direction: column; justify-content: space-between;
}
.month__l { color: var(--ink-3); display: flex; justify-content: space-between; }
.month__n { font-family: var(--font-display); font-size: clamp(88px, 12vw, 200px); line-height: .82; letter-spacing: -.045em; color: rgba(18,16,14,.86); transform: scale(var(--s, 1)); transform-origin: left bottom; }
.month--flight .month__n { color: var(--accent); }
.month--flight .month__l span:last-child { background: var(--ink); color: var(--ivory); padding: 6px 10px; border-radius: 999px; margin: -6px -10px 0 0; }
.month__note { position: absolute; left: 26px; bottom: -56px; color: var(--ink-2); font-size: 14px; max-width: 30ch; line-height: 1.45; }

.seasons__playhead {
  position: absolute; left: 50%; top: 0; bottom: 0; width: 1px; z-index: 2; pointer-events: none;
  background: linear-gradient(180deg, transparent, rgba(18,16,14,.35) 30%, rgba(18,16,14,.35) 70%, transparent);
}
.seasons__playhead i {
  position: absolute; left: 50%; top: var(--y, 60%); width: 14px; height: 14px;
  transform: translate(-50%, -50%); border-radius: 50%; background: var(--accent);
  box-shadow: 0 0 0 6px rgba(242,85,44,.18), 0 0 30px rgba(242,85,44,.5);
}
.seasons__playhead b {
  position: absolute; left: 14px; top: calc(var(--y, 60%) - 10px);
  font-family: var(--font-mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; white-space: nowrap; color: var(--ink-2);
}
.seasons__foot {
  position: absolute; left: var(--gutter); right: var(--gutter); bottom: 28px;
  display: flex; justify-content: space-between; color: var(--ink-3);
}

/* =====================================================================
   HIGHWAY
   ===================================================================== */
.highway { --z: 5; background: #0e0d0c; color: var(--cream); padding: 16vh var(--gutter) 16vh; overflow: hidden; }
.highway::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 60vh; pointer-events: none;
  background: radial-gradient(60% 50% at 80% 0%, rgba(242,85,44,.16), transparent 70%);
}
.highway__head { position: relative; display: grid; grid-template-columns: 1.2fr 1fr; gap: 4vw; align-items: end; margin-bottom: 8vh; }
.highway__head h2 { font-family: var(--font-display); font-weight: 400; font-size: clamp(46px, 7.4vw, 124px); line-height: .9; letter-spacing: -.035em; }
.highway__head h2 em { color: var(--accent); }
.highway__head p { color: var(--cream-2); font-size: clamp(15px, 1.15vw, 18px); line-height: 1.6; max-width: 46ch; }

.cards { position: relative; display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; align-items: start; }
.card {
  position: relative; overflow: hidden;
  display: flex; flex-direction: column; gap: 20px; min-height: 420px;
  padding: 28px 28px 32px; border-radius: 22px;
  border: 1px solid rgba(243,236,226,.12);
  background: linear-gradient(180deg, rgba(255,255,255,.045), rgba(255,255,255,.015));
  translate: 0 var(--py, 0px);
  transition: border-color .5s;
}
.card::before {
  content: ""; position: absolute; inset: -40% -20% auto; height: 80%; pointer-events: none;
  background: radial-gradient(50% 60% at 30% 40%, rgba(242,85,44,.35), transparent 70%);
  opacity: 0; transition: opacity .8s var(--ease-out);
}
.card:hover { border-color: rgba(243,236,226,.28); }
.card:hover::before { opacity: 1; }
.card__i { color: var(--accent); display: flex; justify-content: space-between; }
.card__big { font-family: var(--font-display); font-size: clamp(64px, 6.4vw, 104px); line-height: .9; letter-spacing: -.035em; color: var(--cream); }
.card__big small { font-size: .38em; letter-spacing: 0; color: var(--cream-3); font-style: italic; margin-left: .15em; }
.card__t { font-family: var(--font-display); font-weight: 400; font-size: clamp(28px, 2.5vw, 40px); line-height: 1; letter-spacing: -.02em; }
.card__p { margin-top: auto; color: var(--cream-2); font-size: 15.5px; line-height: 1.6; }

.notes { position: relative; margin-top: 8vh; display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.note { padding: 34px 32px 36px; border-radius: 22px; display: grid; gap: 16px; align-content: start; }
.note--light { background: var(--ivory); color: var(--ink); }
.note--dark { background: #17130f; color: var(--cream); border: 1px solid rgba(243,236,226,.1); }
.note .mono { opacity: .6; }
.note h3 { font-family: var(--font-display); font-weight: 400; font-size: clamp(28px, 2.8vw, 44px); line-height: 1; letter-spacing: -.02em; }
.note p { opacity: .82; font-size: 15.5px; line-height: 1.6; max-width: 52ch; }
.ph { display: flex; align-items: baseline; gap: 18px; font-family: var(--font-display); font-size: clamp(44px, 4.6vw, 72px); line-height: 1; letter-spacing: -.02em; }
.ph .arrow { font-family: var(--font-body); font-size: .5em; opacity: .5; }
.ph i { font-style: normal; font-family: var(--font-mono); font-size: 11px; letter-spacing: .16em; text-transform: uppercase; opacity: .6; }

/* =====================================================================
   FINALE — coupled flight
   ===================================================================== */
.finale { --z: 6; }
.finale__pin { background: var(--night); color: var(--ink); }
.finale__day {
  position: absolute; inset: 0;
  background:
    radial-gradient(80% 60% at 50% 100%, rgba(242,85,44,.35), transparent 65%),
    linear-gradient(180deg, #f3ece2 0%, #f6c8a2 100%);
  opacity: var(--day, 1);
}
.finale__night {
  position: absolute; inset: 0;
  background: radial-gradient(70% 50% at 50% 60%, #2a1712 0%, #0b0a09 70%);
  opacity: calc(1 - var(--day, 1));
}
.pair { position: absolute; left: 50%; top: 40%; width: 0; height: 0; }
.bug { position: absolute; left: 0; top: 0; width: min(30vmin, 260px); height: min(30vmin, 260px); margin: calc(min(30vmin, 260px) / -2) 0 0 calc(min(30vmin, 260px) / -2); will-change: transform; }
.bug svg { width: 100%; height: 100%; overflow: visible; }
.finale__lines {
  position: absolute; left: var(--gutter); right: var(--gutter); top: 70%;
  transform: translateY(-50%); text-align: center; display: grid; gap: 10px; pointer-events: none;
}
.line {
  font-family: var(--font-display); font-weight: 400;
  font-size: clamp(30px, 4.4vw, 74px); line-height: 1.04; letter-spacing: -.025em;
  opacity: 0; transform: translateY(22px); filter: blur(6px);
  transition: opacity .9s var(--ease-out), transform .9s var(--ease-out), filter .9s var(--ease-out);
}
.line.is-on { opacity: 1; transform: none; filter: none; }
.line em { color: var(--accent); }
.finale__end {
  position: absolute; inset: 0; display: grid; place-items: center; text-align: center; gap: 0;
  color: var(--cream); opacity: 0; transform: scale(.96);
  transition: opacity 1s var(--ease-out), transform 1.2s var(--ease-out);
}
.finale__end.is-on { opacity: 1; transform: none; }
.finale__end > div { display: grid; gap: 34px; justify-items: center; }
.finale__end h2 { font-family: var(--font-display); font-weight: 400; font-size: clamp(56px, 10vw, 168px); line-height: .9; letter-spacing: -.035em; }
.finale__end h2 em { color: var(--accent); }
.finale__end p { color: var(--cream-2); font-size: clamp(15px, 1.2vw, 18px); max-width: 44ch; line-height: 1.6; }
.again {
  position: relative; width: 148px; height: 148px; border-radius: 50%;
  display: grid; place-items: center; color: var(--cream);
  transition: transform .6s var(--ease-out);
}
.again svg { position: absolute; inset: 0; width: 100%; height: 100%; animation: spin 16s linear infinite; }
.again text { font-family: var(--font-mono); font-size: 11px; letter-spacing: .3em; text-transform: uppercase; fill: currentColor; }
.again__dot { width: 62px; height: 62px; border-radius: 50%; border: 1px solid rgba(243,236,226,.45); display: grid; place-items: center; font-size: 22px; transition: background .5s, color .5s, border-color .5s; }
.again:hover { transform: scale(1.04); }
.again:hover .again__dot { background: var(--cream); color: var(--ink); border-color: var(--cream); }

/* =====================================================================
   RESPONSIVE
   ===================================================================== */
@media (max-width: 1100px) {
  .cycle__stage { grid-template-columns: 1fr 1fr; }
  .specimen { width: min(56vmin, 520px); }
}
@media (max-width: 900px) {
  :root { --nav-h: 64px; }
  .nav__links { display: none; }
  .nav__wipe-label { display: none; }
  .nav__wipe { padding: 9px 12px 9px 11px; }
  .nav__hint { position: fixed; right: var(--gutter); top: calc(var(--nav-h) + 2px); white-space: normal; max-width: calc(100vw - 2 * var(--gutter)); text-align: right; line-height: 1.5; }
  .nav__right { gap: 8px; }
  .rail { display: none; }
  .hero__title { max-width: none; font-size: clamp(50px, 14vw, 120px); }
  .hero__mark { display: none; }
  .hero__foot { align-items: flex-end; }
  .intro__grid { grid-template-columns: 1fr; gap: 28px; }
  .intro__label { position: static; }
  .stats { grid-template-columns: 1fr 1fr; }
  .stat { padding-right: 20px; margin-right: 20px; border-bottom: 1px solid rgba(18,16,14,.14); }
  .stat:nth-child(2n) { border-right: 0; margin-right: 0; }
  .stat:nth-child(n+3) { border-bottom: 0; }

  .cycle__stage { grid-template-columns: 1fr; grid-template-rows: 46% 54%; gap: 0; padding: calc(var(--nav-h) + 60px) var(--gutter) 90px; align-items: stretch; }
  .cycle__view { align-items: center; }
  .specimen { width: min(56vw, 320px); }
  .specimen__cap { display: none; }
  .stage { align-content: end; gap: 12px; padding-bottom: 8px; }
  .stage__title { font-size: clamp(40px, 12vw, 64px); }
  .stage__text { font-size: 14.5px; max-width: none; }
  .fact { padding: 8px 12px; }
  .fact b { font-size: 18px; }
  .hud__day b { font-size: 28px; }
  .hud__day b small { display: none; }
  .hud__act > div { white-space: nowrap; }
  .cycle__strip { bottom: 18px; gap: 6px; }
  .strip__i span em { display: none; }

  .seasons__head { flex-direction: column; align-items: flex-start; gap: 12px; }
  .seasons__head h2 { font-size: clamp(34px, 9vw, 56px); }
  .seasons__head p { max-width: none; font-size: 14px; }
  .seasons__track { top: 64%; }
  .month { width: 60vw; height: 34vh; }
  .month__note { display: none; }
  .seasons__playhead b { display: none; }

  .highway__head { grid-template-columns: 1fr; }
  .cards { grid-template-columns: 1fr; }
  .card { min-height: 0; --py: 0px !important; }
  .notes { grid-template-columns: 1fr; }

  .line { font-size: clamp(26px, 7.4vw, 40px); }
  .cue { width: 92px; height: 92px; }
  .hero__meta { font-size: 10px; gap: 6px; }
  .bug { width: 24vw; height: 24vw; margin: -12vw 0 0 -12vw; }
  .finale__end h2 { font-size: clamp(50px, 16vw, 96px); }
  .footer__grid { grid-template-columns: 1fr; gap: 40px; }
  .footer__end { flex-direction: column; }
}
@media (max-height: 640px) and (min-width: 901px) {
  .stage__title { font-size: clamp(40px, 5vw, 70px); }
  .specimen { width: min(58vmin, 520px); }
}
@media (prefers-reduced-motion: reduce) {
  .specimen__float, .again svg { animation: none; }
  .stage > *, .stage.is-active > *, .line, .finale__end { transition: none; }
}
