:root {
  --white: #FBF8F1;
  --paper: #F4EFE3;
  --honey: #E9A81B;
  --honey-soft: #F6D27A;
  --charcoal: #1E1D1A;
  --ink-2: #4A4740;
  --green: #6B7B57;
  --line: rgba(30, 29, 26, .12);
  --serif: "Fraunces", Georgia, serif;
  --sans: "Inter", system-ui, -apple-system, sans-serif;
  --A: 1.7778;      /* desktop canvas 3328 x 1872 */
  --Am: .6359;      /* mobile canvas 1404 x 2208 */
  --ease: cubic-bezier(.2, .7, .1, 1);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; overflow-x: clip; }
.chapters { overflow-x: clip; }
body {
  margin: 0;
  background: var(--white);
  color: var(--charcoal);
  font: 400 16px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; max-width: none; user-select: none; -webkit-user-drag: none; }
a { color: inherit; }
em { font-style: italic; }

/* ---------- type ---------- */
.eyebrow {
  margin: 0 0 .9rem;
  font: 600 .72rem/1 var(--sans);
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--green);
}
.display {
  margin: 0;
  font: 300 clamp(3.4rem, 9vw, 8.5rem)/.9 var(--serif);
  letter-spacing: -.03em;
}
.tagline {
  margin: .6rem 0 2rem;
  font: 400 italic clamp(1.25rem, 2.2vw, 1.9rem)/1.2 var(--serif);
  color: var(--ink-2);
}
.h2 { margin: 0; font: 300 clamp(2.4rem, 5vw, 4.4rem)/1.02 var(--serif); letter-spacing: -.02em; }
.h2 em, .footer-line em { color: var(--honey); font-weight: 400; }
.h3 { margin: .2rem 0 .8rem; font: 400 clamp(1.9rem, 3.2vw, 2.8rem)/1.05 var(--serif); letter-spacing: -.015em; }
.lede { max-width: 34rem; color: var(--ink-2); font-size: 1.08rem; }
.caption { margin: 0; font: 400 clamp(1.15rem, 2vw, 1.6rem)/1.35 var(--serif); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .55rem;
  padding: .62rem 1.1rem; border-radius: 999px; border: 1px solid transparent;
  font: 500 .88rem/1 var(--sans); text-decoration: none; cursor: pointer;
  transition: transform .35s var(--ease), background .25s, color .25s, box-shadow .35s;
}
.btn:hover { transform: translateY(-1px); }
.btn-honey { background: var(--honey); color: var(--charcoal); }
.btn-honey:hover { box-shadow: 0 8px 24px -10px rgba(233, 168, 27, .8); }
.btn-ghost { border-color: var(--line); background: rgba(251, 248, 241, .6); }
.btn-dark { background: var(--charcoal); color: var(--white); }
.btn-dark span { transition: transform .35s var(--ease); }
.btn-dark:hover span { transform: translateX(4px); }
.btn-lg { padding: 1rem 1.6rem; font-size: .95rem; letter-spacing: .04em; }
:focus-visible { outline: 2px solid var(--honey); outline-offset: 3px; }

/* ---------- nav ---------- */
.nav {
  position: fixed; inset: 0 0 auto; z-index: 50;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 14px clamp(16px, 3vw, 36px);
  transition: background-color .4s, box-shadow .4s;
}
.nav.solid {
  background: rgba(251, 248, 241, .96);
  box-shadow: 0 1px 0 var(--line);
}
.brand { display: flex; align-items: center; gap: .55rem; text-decoration: none; font: 600 .9rem/1 var(--sans); letter-spacing: .2em; }
.brand-mark { width: 22px; height: 22px; fill: var(--honey); }
.nav-links { display: flex; gap: clamp(.8rem, 2vw, 1.8rem); }
.nav-links a { text-decoration: none; font-size: .86rem; color: var(--ink-2); position: relative; }
.nav-links a::after { content: ""; position: absolute; left: 0; right: 100%; bottom: -4px; height: 1px; background: var(--honey); transition: right .35s var(--ease); }
.nav-links a:hover::after, .nav-links a.active::after { right: 0; }
.nav-links a.active { color: var(--charcoal); }
.nav-actions { display: flex; gap: .5rem; }

.progress { position: fixed; inset: 0 0 auto; height: 2px; z-index: 60; pointer-events: none; }
.progress span { display: block; height: 100%; width: 100%; background: var(--honey); transform-origin: 0 50%; transform: scaleX(0); }

/* ---------- scenes ---------- */
.scene { position: relative; height: 100vh; height: 100svh; }
.viewport { position: relative; height: 100%; overflow: hidden; background: var(--white); contain: layout paint; }
.story-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }

/* Stage: the full layered canvas, sized to cover the viewport with room for parallax */
.stage {
  --scale: 1.16;
  position: absolute; left: 50%; top: 50%;
  transform: translate(calc(var(--fx, .5) * -100%), calc(var(--fy, .5) * -100%));
}
.stage-land { width: calc(max(100vw, 100svh * var(--A)) * var(--scale)); aspect-ratio: 3328 / 1872; }
.stage-port { width: calc(max(100vw, 100svh * var(--Am)) * var(--scale)); aspect-ratio: 1404 / 2208; display: none; }
.stage-hive { opacity: 0; visibility: hidden; }
.zoom { position: absolute; inset: 0; will-change: transform; backface-visibility: hidden; }
.layer { position: absolute; inset: 0; width: 100%; height: 100%; }
.actor { position: absolute; }
.actor-camper { left: 22.78%; top: 43.8%; width: 26.65%; }
.actor-bee { left: 66.47%; top: 42.79%; width: 11.75%; }
.actor-bee img { width: 100%; }

@media (max-aspect-ratio: 4/5) {
  .scene-nature .stage-land:not(.stage-hive) { display: none; }
  .scene-nature .stage-port { display: block; }
  .stage-hive { --fx: .64; --scale: 1.08; }
}

.scrim { position: absolute; inset: 0; pointer-events: none; }
.scrim-top { background: linear-gradient(180deg, rgba(251, 248, 241, .55) 0%, rgba(251, 248, 241, 0) 45%), radial-gradient(60% 55% at 18% 38%, rgba(251, 248, 241, .55), rgba(251, 248, 241, 0) 70%); }

.copy { position: absolute; z-index: 5; }
.copy-hero { left: clamp(20px, 7vw, 120px); top: 50%; transform: translateY(-58%); max-width: 36rem; }
.copy-caption {
  left: 50%; bottom: clamp(28px, 9vh, 90px);
  transform: translateX(-50%);
  width: min(560px, calc(100vw - 32px));
  padding: 1.2rem 1.5rem;
  border-radius: 22px;
  background: rgba(251, 248, 241, .94);
  box-shadow: 0 20px 50px -25px rgba(30, 29, 26, .45);
  opacity: 0; visibility: hidden;
}
.copy-caption .eyebrow { margin-bottom: .5rem; }
.copy-left { left: clamp(16px, 5vw, 80px); transform: none; bottom: auto; top: 22%; width: min(440px, calc(100vw - 32px)); }
.copy-right { left: auto; right: clamp(16px, 5vw, 80px); transform: none; bottom: auto; top: 22%; width: min(440px, calc(100vw - 32px)); }
@media (max-aspect-ratio: 4/5) {
  .copy-hero { top: 15%; transform: none; left: 20px; right: 20px; }
  .copy-left, .copy-right { left: 16px; right: 16px; top: auto; bottom: 96px; width: auto; }
}

.scroll-hint { position: absolute; left: 50%; bottom: 26px; transform: translateX(-50%); display: grid; justify-items: center; gap: 8px; font: 600 .66rem/1 var(--sans); letter-spacing: .24em; text-transform: uppercase; color: var(--ink-2); z-index: 5; }
.scroll-hint i { width: 1px; height: 38px; background: linear-gradient(var(--charcoal), transparent); animation: hint 2.2s var(--ease) infinite; transform-origin: top; }
@keyframes hint { 0% { transform: scaleY(0); } 50% { transform: scaleY(1); } 100% { transform: scaleY(1); opacity: 0; } }

/* ---------- chapters ---------- */
.chapters { position: relative; padding: clamp(90px, 14vh, 160px) clamp(16px, 5vw, 80px) 40px; max-width: 1280px; margin: 0 auto; }
.chapters-head { max-width: 720px; margin-bottom: clamp(60px, 10vh, 120px); }
.chapters-head .h2 { margin-bottom: 1.2rem; }

.chapter {
  display: grid; grid-template-columns: 1fr 1.15fr; align-items: center;
  gap: clamp(28px, 6vw, 96px);
  padding: clamp(40px, 8vh, 90px) 0;
  border-top: 1px solid var(--line);
}
.chapter.flip .chapter-text { order: 2; }
.chapter-num { display: flex; align-items: center; gap: .8rem; margin: 0; font: 600 .74rem/1 var(--sans); letter-spacing: .22em; text-transform: uppercase; color: var(--green); }
.chapter-num span { font: 400 1rem/1 var(--serif); letter-spacing: 0; color: var(--honey); }
.chapter-text { position: relative; }
.perch { position: absolute; right: 0; top: 0; width: 1px; height: 1px; }
.chapter-text > p:not(.chapter-num) { color: var(--ink-2); max-width: 30rem; }
.chips { display: flex; flex-wrap: wrap; gap: .45rem; padding: 0; margin: 1.2rem 0 1.6rem; list-style: none; }
.chips li { padding: .35rem .8rem; border: 1px solid var(--line); border-radius: 999px; font-size: .8rem; color: var(--ink-2); }
.link-arrow { display: inline-flex; gap: .5rem; font-weight: 500; text-decoration: none; border-bottom: 1px solid var(--honey); padding-bottom: 2px; }
.link-arrow span { transition: transform .35s var(--ease); }
.link-arrow:hover span { transform: translateX(4px); }

.chapter-art {
  position: relative; margin: 0; aspect-ratio: 4 / 3; overflow: hidden;
  border-radius: 28px; background: var(--paper);
  box-shadow: 0 40px 80px -50px rgba(30, 29, 26, .5);
  transition: transform .6s var(--ease), box-shadow .6s var(--ease);
}
.chapter-art:hover { transform: translateY(-6px); box-shadow: 0 50px 90px -45px rgba(30, 29, 26, .55); }
.card-img { position: absolute; inset: -6% 0; width: 100%; height: 112%; object-fit: cover; }

/* guide bee */
.guide { position: absolute; left: 0; top: 0; width: clamp(64px, 7vw, 96px); z-index: 10; pointer-events: none; opacity: 0; will-change: transform; }
.guide img { width: 100%; filter: drop-shadow(0 14px 12px rgba(30, 29, 26, .18)); }
.guide-flip, .guide-bob { will-change: transform; }

/* ---------- fast lane ---------- */
.fastlane { max-width: 1280px; margin: 0 auto; padding: clamp(80px, 12vh, 140px) clamp(16px, 5vw, 80px); }
.fast-head { margin-bottom: 48px; }
.fast-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.fast-card {
  position: relative; display: grid; gap: .4rem; padding: 26px 24px 64px;
  border-radius: 22px; background: var(--paper); text-decoration: none;
  transition: background .35s, transform .45s var(--ease);
}
.fast-card:hover { background: var(--honey-soft); transform: translateY(-4px); }
.fast-k { font: 600 .7rem/1 var(--sans); letter-spacing: .2em; text-transform: uppercase; color: var(--green); }
.fast-card strong { font: 400 1.5rem/1.15 var(--serif); }
.fast-go { position: absolute; right: 22px; bottom: 20px; width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%; background: var(--charcoal); color: var(--white); transition: transform .45s var(--ease); }
.fast-card:hover .fast-go { transform: rotate(-45deg); }

.footer { padding: 60px clamp(16px, 5vw, 80px) 110px; border-top: 1px solid var(--line); text-align: center; }
.footer-line { margin: 0 0 .5rem; font: 300 clamp(1.6rem, 3vw, 2.4rem)/1.2 var(--serif); }
.footer-small { margin: 0; font-size: .8rem; color: var(--ink-2); }

.quickbar { display: none; }

/* ---------- responsive ---------- */
@media (max-width: 980px) {
  .nav-links { display: none; }
  .fast-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 760px) {
  .hide-sm { display: none; }
  .chapter { grid-template-columns: 1fr; gap: 26px; }
  .chapter.flip .chapter-text { order: 0; }
  .chapter-art { order: -1; }
  .fast-grid { grid-template-columns: 1fr; }
  .quickbar {
    position: fixed; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 55;
    display: grid; grid-template-columns: repeat(3, 1fr);
    padding: 6px; border-radius: 999px;
    background: rgba(30, 29, 26, .95);
    transform: translateY(140%); transition: transform .5s var(--ease);
  }
  .quickbar.show { transform: none; }
  .quickbar a { padding: 12px 0; text-align: center; color: var(--white); text-decoration: none; font: 500 .86rem/1 var(--sans); border-radius: 999px; }
  .quickbar a:first-child { background: var(--honey); color: var(--charcoal); }
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .scroll-hint i { animation: none; }
  .copy-caption { opacity: 1; visibility: visible; position: absolute; }
  .copy-caption { display: none; }
  .guide { display: none; }
  *, *::before, *::after { transition-duration: .01ms !important; }
}
