/* =========================================================
   WILDWOOD PRUE — "The Living Forest"
   ========================================================= */

:root {
  --forest: #14291F;
  --midnight: #101C1A;
  --moss: #52694B;
  --fern: #81946C;
  --parchment: #F2E8D4;
  --gold: #E8BB75;
  --copper: #B9784F;
  --blue: #244D75;
  --scarf: #A94732;

  --ink: #1c2a21;
  --ink-soft: #3c4a3a;
  --deep: #0b1412;
  --parchment-dim: rgba(242, 232, 212, .74);

  --font-display: "Cormorant Garamond", "Iowan Old Style", Georgia, serif;
  --font-body: "EB Garamond", "Iowan Old Style", Georgia, serif;
  --font-label: "IM Fell English SC", "Cormorant Garamond", Georgia, serif;

  --nav-h: clamp(64px, 5.4vw, 88px);
  --gutter: clamp(16px, 4.4vw, 96px);
  --section-y: clamp(96px, 13vh, 190px);
  --ease: cubic-bezier(.22, .61, .24, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);

  --wood:
    repeating-linear-gradient(92deg, rgba(255, 230, 190, .045) 0 2px, transparent 2px 7px),
    repeating-linear-gradient(87deg, rgba(0, 0, 0, .09) 0 1px, transparent 1px 12px),
    linear-gradient(180deg, #9c6743 0%, #7b4b2f 52%, #5c3620 100%);
  --wood-dark:
    repeating-linear-gradient(91deg, rgba(255, 220, 170, .03) 0 2px, transparent 2px 8px),
    repeating-linear-gradient(88deg, rgba(0, 0, 0, .12) 0 1px, transparent 1px 13px),
    linear-gradient(180deg, #4a3322 0%, #35241a 55%, #241811 100%);
}

/* ---------- Base ---------- */

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--midnight);
  color: var(--parchment);
  font-family: var(--font-body);
  font-size: clamp(1.06rem, .98rem + .3vw, 1.32rem);
  line-height: 1.6;
  overflow-x: hidden;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }
a { color: inherit; }
p { margin: 0; }
h1, h2, h3 { margin: 0; font-weight: 600; }
button { font: inherit; color: inherit; }

section[id] { scroll-margin-top: calc(var(--nav-h) - 1px); }

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: 4px;
}

.container {
  width: min(100% - 2 * var(--gutter), 1640px);
  margin-inline: auto;
}

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  top: 12px; left: 12px;
  z-index: 200;
  padding: .6em 1em;
  background: var(--parchment);
  color: var(--forest);
  font-family: var(--font-label);
  border-radius: 6px;
  transform: translateY(-160%);
  transition: transform .3s var(--ease);
}
.skip-link:focus { transform: none; }

/* ---------- Typography ---------- */

.eyebrow {
  font-family: var(--font-label);
  font-size: clamp(.92rem, .84rem + .3vw, 1.18rem);
  letter-spacing: .22em;
  color: var(--gold);
  margin-bottom: clamp(16px, 2vh, 28px);
  display: flex;
  align-items: center;
  gap: .9em;
}
.eyebrow::before {
  content: "";
  width: 2.6em;
  height: 1px;
  background: currentColor;
  opacity: .6;
}
.eyebrow--ink { color: var(--copper); }

.display {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(2.7rem, 1.1rem + 5vw, 7rem);
  line-height: .94;
  letter-spacing: .005em;
  text-transform: uppercase;
  color: var(--parchment);
  text-wrap: balance;
}
.display--md { font-size: clamp(2.3rem, 1.1rem + 3.6vw, 5.2rem); }
.display--ink { color: var(--forest); }

.line { display: block; overflow: hidden; padding-bottom: .07em; margin-bottom: -.07em; }
.line > span { display: inline-block; }

/* ---------- Ornaments (pure CSS botanicals) ---------- */

.ornament {
  --c: var(--fern);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: min(100%, 340px);
  margin-inline: auto;
  color: var(--c);
}
.ornament::before,
.ornament::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, currentColor);
  opacity: .7;
}
.ornament::after { background: linear-gradient(270deg, transparent, currentColor); }
.ornament i {
  width: 15px;
  height: 7px;
  background: currentColor;
  border-radius: 0 100% 0 100%;
  opacity: .85;
}
.ornament i:nth-of-type(1) { transform: rotate(-18deg); opacity: .55; }
.ornament i:nth-of-type(2) { transform: rotate(14deg); }
.ornament i:nth-of-type(3) { transform: scaleX(-1) rotate(14deg); }
.ornament i:nth-of-type(4) { transform: scaleX(-1) rotate(-18deg); opacity: .55; }
.ornament b {
  width: 8px; height: 8px;
  border: 1px solid var(--gold);
  transform: rotate(45deg);
  margin: 0 4px;
}
.ornament--start { margin-inline: 0; width: min(100%, 300px); }
.ornament--start::before { display: none; }
.ornament--ink { --c: var(--moss); }
.ornament--ink b { border-color: var(--copper); }

/* ---------- Buttons ---------- */

.btn {
  --lift: 0px;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .6em;
  min-height: 52px;
  padding: .78em 1.7em .86em;
  font-family: var(--font-label);
  font-size: clamp(1.02rem, .94rem + .3vw, 1.24rem);
  letter-spacing: .1em;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  border: 0;
  border-radius: 13px 5px 12px 6px / 6px 12px 5px 13px;
  cursor: pointer;
  isolation: isolate;
  transform: translateY(var(--lift));
  transition: transform .45s var(--ease-out), box-shadow .45s var(--ease), background-color .35s, color .35s;
}
.btn:hover { --lift: -2px; }
.btn:active { --lift: 0px; transition-duration: .1s; }

.btn--wood {
  color: var(--parchment);
  background: var(--wood);
  text-shadow: 0 1px 0 rgba(30, 14, 6, .55);
  box-shadow:
    inset 0 1px 0 rgba(255, 222, 176, .38),
    inset 0 -2px 0 rgba(30, 14, 6, .32),
    0 0 0 1px rgba(46, 24, 12, .7),
    0 8px 22px rgba(0, 0, 0, .38);
}
/* little tuft of moss on the plank */
.btn--wood::before {
  content: "";
  position: absolute;
  top: -4px;
  left: 12%;
  width: 34px;
  height: 9px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 25% 60%, #7d9a5a 0 3px, transparent 3.5px),
    radial-gradient(circle at 55% 45%, #5f7c45 0 4px, transparent 4.5px),
    radial-gradient(circle at 80% 65%, #8aa564 0 2.5px, transparent 3px);
  opacity: .95;
  z-index: 1;
  pointer-events: none;
}
.btn--wood:hover {
  box-shadow:
    inset 0 1px 0 rgba(255, 222, 176, .45),
    inset 0 -2px 0 rgba(30, 14, 6, .32),
    0 0 0 1px rgba(46, 24, 12, .7),
    0 12px 28px rgba(0, 0, 0, .42),
    0 0 34px rgba(232, 187, 117, .28);
}

.btn--parchment {
  color: var(--forest);
  background:
    radial-gradient(120% 160% at 28% 18%, #fdf7ea 0%, #efe2c6 58%, #dcc79f 100%);
  box-shadow:
    inset 0 0 0 1px rgba(82, 105, 75, .5),
    inset 0 0 14px rgba(185, 120, 79, .28),
    0 8px 22px rgba(0, 0, 0, .32);
}
.btn--parchment:hover {
  box-shadow:
    inset 0 0 0 1px rgba(82, 105, 75, .7),
    inset 0 0 18px rgba(185, 120, 79, .35),
    0 12px 28px rgba(0, 0, 0, .38),
    0 0 30px rgba(242, 232, 212, .2);
}

.btn--ghost {
  color: var(--parchment);
  background: rgba(242, 232, 212, .03);
  box-shadow: inset 0 0 0 1px rgba(242, 232, 212, .38);
}
.btn--ghost:hover {
  background: rgba(242, 232, 212, .09);
  box-shadow: inset 0 0 0 1px rgba(232, 187, 117, .7);
}

.btn--sm {
  min-height: 42px;
  padding: .62em 1.2em .7em;
  font-size: clamp(.92rem, .86rem + .2vw, 1.04rem);
}
.btn--sm::before { width: 24px; height: 7px; top: -3px; }

.btn__arrow { display: inline-block; transition: transform .45s var(--ease-out); }
.btn:hover .btn__arrow { transform: translateY(3px); }
.btn__icon { width: 1em; height: 1em; fill: currentColor; }

.text-link {
  position: relative;
  font-family: var(--font-label);
  font-size: clamp(1rem, .92rem + .3vw, 1.18rem);
  letter-spacing: .12em;
  color: var(--parchment);
  text-decoration: none;
  padding: .5em .2em;
}
.text-link::after {
  content: "";
  position: absolute;
  left: .2em; right: .2em; bottom: .3em;
  height: 1px;
  background: linear-gradient(90deg, var(--gold), transparent);
  transform-origin: left;
  transition: transform .5s var(--ease-out);
}
.text-link span { display: inline-block; transition: transform .45s var(--ease-out); }
.text-link:hover span { transform: translateX(4px); }
.text-link:hover::after { transform: scaleX(1.15); }

/* =========================================================
   NAVIGATION
   ========================================================= */

.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  height: var(--nav-h);
  transition: height .5s var(--ease), background-color .5s var(--ease), box-shadow .5s var(--ease);
}
.nav::before {
  /* soft top shade so links stay legible over the sky */
  content: "";
  position: absolute;
  inset: 0 0 -40px 0;
  background: linear-gradient(180deg, rgba(10, 18, 16, .55), transparent);
  pointer-events: none;
  transition: opacity .5s var(--ease);
}
.nav.is-scrolled {
  --nav-h: clamp(58px, 4.2vw, 70px);
  background: rgba(16, 28, 26, .9);
  box-shadow: 0 1px 0 rgba(232, 187, 117, .14), 0 10px 30px rgba(0, 0, 0, .3);
}
.nav.is-scrolled::before { opacity: 0; }

.nav__inner {
  position: relative;
  height: 100%;
  width: min(100% - 2 * var(--gutter), 1760px);
  margin-inline: auto;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
}

.nav__brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  justify-self: start;
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.15rem, 1rem + .45vw, 1.5rem);
  letter-spacing: .04em;
}
.nav__brand img {
  width: clamp(36px, 2.6vw, 46px);
  height: auto;
  border-radius: 50%;
  box-shadow: 0 0 0 1.5px rgba(232, 187, 117, .65), 0 4px 12px rgba(0, 0, 0, .4);
}

.nav__menu {
  display: flex;
  gap: clamp(18px, 2.4vw, 44px);
}
.nav__menu a {
  position: relative;
  font-family: var(--font-label);
  font-size: clamp(1rem, .9rem + .3vw, 1.2rem);
  letter-spacing: .1em;
  text-decoration: none;
  color: var(--parchment);
  padding: .4em 0;
  opacity: .88;
  transition: opacity .3s, color .3s;
}
.nav__menu a::after {
  content: "";
  position: absolute;
  left: 50%; bottom: .1em;
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--gold);
  transform: translateX(-50%) scale(0);
  transition: transform .4s var(--ease-out);
}
.nav__menu a:hover,
.nav__menu a.is-active { opacity: 1; color: var(--gold); }
.nav__menu a:hover::after,
.nav__menu a.is-active::after { transform: translateX(-50%) scale(1); }

.nav__actions {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: clamp(10px, 1vw, 18px);
}

.nav__x {
  display: grid;
  place-items: center;
  width: 42px; height: 42px;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1px rgba(242, 232, 212, .35);
  transition: box-shadow .3s, background-color .3s;
}
.nav__x svg { width: 17px; height: 17px; fill: var(--parchment); }
.nav__x:hover { background: rgba(242, 232, 212, .08); box-shadow: inset 0 0 0 1px var(--gold); }

.nav__toggle {
  display: none;
  width: 44px; height: 44px;
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: rgba(16, 28, 26, .6);
  box-shadow: inset 0 0 0 1px rgba(242, 232, 212, .3);
  cursor: pointer;
  position: relative;
}
.nav__toggle span {
  position: absolute;
  left: 12px; right: 12px;
  height: 1.5px;
  background: var(--parchment);
  border-radius: 2px;
  transition: transform .4s var(--ease), opacity .3s;
}
.nav__toggle span:nth-child(1) { top: 15px; }
.nav__toggle span:nth-child(2) { top: 21px; right: 16px; }
.nav__toggle span:nth-child(3) { top: 27px; }
.nav__toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav__toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav__toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* =========================================================
   HERO
   ========================================================= */

.hero {
  --fw: max(100vw, 177.69vh);
  position: relative;
  height: 100vh;
  height: 100svh;
  min-height: 640px;
  overflow: hidden;
  isolation: isolate;
  background: var(--midnight);
  container-type: size;
}
@supports (width: 1cqw) {
  .hero { --fw: max(100cqw, 177.69cqh); }
}

.hero__stage,
.hero__sky,
.hero__rays { position: absolute; inset: 0; }
.hero__stage { z-index: 0; }

.hero__sky {
  background:
    radial-gradient(55% 42% at 57% 43%, rgba(255, 220, 160, .9) 0%, rgba(232, 187, 117, .5) 30%, rgba(185, 120, 79, 0) 64%),
    radial-gradient(70% 40% at 20% 20%, rgba(36, 77, 117, .35), transparent 70%),
    linear-gradient(180deg, #273746 0%, #4f5f68 16%, #9d8f7c 33%, #dcae78 46%, #d39d68 55%, #7d7a58 66%, #3e5640 78%, #1a3026 90%, #14291f 100%);
}

.hero__sun {
  position: absolute;
  left: 57%; top: 42%;
  width: 70vmax; aspect-ratio: 1;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(255, 236, 196, .55) 0%, rgba(255, 214, 150, .22) 22%, transparent 55%);
  animation: sunBreathe 11s ease-in-out infinite alternate;
  will-change: transform, opacity;
}

.hero__rays {
  inset: -30%;
  background: repeating-conic-gradient(from 196deg at 57% 42%, rgba(255, 228, 176, .085) 0deg 2.6deg, transparent 2.6deg 8.5deg);
  -webkit-mask-image: radial-gradient(circle at 57% 42%, #000 0%, rgba(0, 0, 0, .5) 22%, transparent 48%);
  mask-image: radial-gradient(circle at 57% 42%, #000 0%, rgba(0, 0, 0, .5) 22%, transparent 48%);
  animation: raysTurn 90s ease-in-out infinite alternate;
  transform-origin: 57% 42%;
}

/* parallax layers: JS writes transform here, children own their entrance */
.layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  will-change: transform;
}
.layer--house { z-index: 3; }
.layer--forest { z-index: 5; }
.layer--cast { z-index: 10; }

/* A box matching forest.png's aspect, shared by house + forest */
.scene-box {
  position: absolute;
  left: 50%;
  bottom: 0;
  width: var(--fw);
  aspect-ratio: 1672 / 941;
  transform: translateX(-50%);
}

.hero__forest {
  position: absolute;
  left: 0; bottom: -2%;
  width: 100%;
  height: auto;
}

.hero__house {
  position: absolute;
  left: 47.5%;
  bottom: 37%;
  width: 18%;
  height: auto;
  opacity: .93;
}

.hero__mist {
  position: absolute;
  left: -50%;
  width: 200%;
  pointer-events: none;
  will-change: transform;
}
.hero__mist--back {
  z-index: 4;
  bottom: 26%;
  height: 34%;
  background:
    radial-gradient(22% 46% at 28% 62%, rgba(206, 218, 216, .5), transparent 72%),
    radial-gradient(26% 40% at 50% 58%, rgba(196, 210, 212, .42), transparent 72%),
    radial-gradient(20% 44% at 74% 66%, rgba(214, 222, 220, .44), transparent 72%);
  animation: mistDrift 70s ease-in-out infinite alternate;
}
.hero__mist--front {
  z-index: 7;
  bottom: -4%;
  height: 30%;
  background:
    radial-gradient(26% 50% at 30% 70%, rgba(186, 202, 204, .2), transparent 72%),
    radial-gradient(30% 46% at 70% 64%, rgba(196, 210, 210, .17), transparent 72%);
  animation: mistDrift 52s ease-in-out -20s infinite alternate-reverse;
}

.hero__shade {
  position: absolute;
  inset: 0;
  z-index: 6;
  pointer-events: none;
  background:
    radial-gradient(42% 52% at 25% 47%, rgba(10, 18, 16, .55), transparent 72%),
    linear-gradient(90deg, rgba(11, 20, 18, .66) 0%, rgba(11, 20, 18, .42) 26%, rgba(11, 20, 18, .1) 46%, transparent 58%),
    linear-gradient(180deg, rgba(10, 18, 16, .5) 0%, transparent 16%);
}

.hero__cast {
  position: absolute;
  right: 2.6vw;
  bottom: -1.5vh;
  height: min(86vh, 60vw);
  width: auto;
  max-width: none;
}
@supports (width: 1cqw) {
  .hero__cast { right: 2.6cqw; bottom: -1.5cqh; height: min(86cqh, 60cqw); }
}

.hero__floor {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 15%;
  z-index: 12;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(16, 28, 26, 0) 0%, rgba(16, 28, 26, .78) 60%, var(--midnight) 100%);
}

.hero__content {
  position: absolute;
  z-index: 11;
  left: 5vw;
  top: 0; bottom: 0;
  width: min(42vw, 84vh);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding-top: var(--nav-h);
  padding-bottom: 9vh;
}
@supports (width: 1cqw) {
  .hero__content { left: 5cqw; width: min(42cqw, 84cqh); padding-bottom: 9cqh; }
}

.hero__title {
  width: 100%;
  margin: 0 0 clamp(12px, 2.2vh, 30px);
  line-height: 0;
}
.hero__title img {
  width: 100%;
  height: auto;
  filter: drop-shadow(0 10px 18px rgba(6, 12, 10, .55));
}

.hero__tagline {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(1.3rem, .8rem + 1.25vw, 2.35rem);
  line-height: 1.22;
  max-width: 26ch;
  color: var(--parchment);
  text-shadow: 0 2px 14px rgba(6, 12, 10, .7);
  text-wrap: balance;
}

.hero__sub {
  margin-top: clamp(10px, 1.6vh, 20px);
  font-family: var(--font-label);
  font-size: clamp(.95rem, .82rem + .35vw, 1.22rem);
  letter-spacing: .16em;
  color: var(--gold);
  text-shadow: 0 2px 10px rgba(6, 12, 10, .8);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 14px 18px;
  margin-top: clamp(22px, 3.6vh, 46px);
}

.scroll-cue {
  position: absolute;
  z-index: 13;
  left: 50%;
  bottom: clamp(16px, 3.2vh, 36px);
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  font-family: var(--font-label);
  font-size: clamp(.78rem, .72rem + .2vw, .95rem);
  letter-spacing: .3em;
  color: var(--parchment-dim);
  transition: color .3s;
}
.scroll-cue:hover { color: var(--gold); }
.scroll-cue i {
  position: relative;
  width: 1px;
  height: 46px;
  background: linear-gradient(180deg, rgba(242, 232, 212, .5), rgba(242, 232, 212, 0));
  overflow: hidden;
}
.scroll-cue i::after {
  content: "";
  position: absolute;
  left: -2px; top: 0;
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--gold);
  animation: cueDrop 2.4s var(--ease) infinite;
}

/* ---------- Hero entrance (only when JS runs) ---------- */

.js .hero__forest {
  opacity: 0;
  transform: scale(1.045) translateY(1.5%);
  transform-origin: 50% 100%;
  transition: opacity 1.6s ease, transform 2.8s var(--ease-out);
}
.js .hero__house {
  opacity: 0;
  transform: translateY(5%);
  transition: opacity 2.4s ease .35s, transform 3s var(--ease-out) .35s;
}
.js .hero__cast {
  opacity: 0;
  transform: translateY(7%);
  transition: opacity 1.5s ease .75s, transform 2s var(--ease-out) .75s;
}
.js .hero__title img {
  opacity: 0;
  transform: translateY(14px) scale(.975);
  clip-path: inset(0 100% 0 0);
  transition: opacity .9s ease .3s, transform 2s var(--ease-out) .3s, clip-path 2s var(--ease) .3s;
}
.js .hero__reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 1s ease var(--d, 0s), transform 1.2s var(--ease-out) var(--d, 0s);
}
.js .scroll-cue.hero__reveal { transform: translate(-50%, 16px); }
.js .bird--far, .js .bird--near { opacity: 0; transition: opacity 2s ease 1.2s; }

.is-loaded .hero__forest,
.is-loaded .hero__cast { opacity: 1; transform: none; }
.is-loaded .hero__house { opacity: .93; transform: none; }
.is-loaded .hero__title img { opacity: 1; transform: none; clip-path: inset(0 0 0 0); }
.is-loaded .hero__reveal { opacity: 1; transform: none; }
.is-loaded .scroll-cue.hero__reveal { transform: translateX(-50%); }
.is-loaded .bird--far, .is-loaded .bird--near { opacity: 1; }

/* =========================================================
   CROWS
   ========================================================= */

.bird {
  position: absolute;
  top: var(--y);
  left: 0;
  width: var(--size);
  pointer-events: none;
  will-change: transform;
}
.bird--far { z-index: 2; }
.bird--far .bird__img { opacity: .62; }
.bird--near { z-index: 9; }

.bird__flight {
  animation: fly var(--dur) linear var(--delay) infinite;
  will-change: transform;
}
.bird__img {
  width: 100%;
  height: auto;
  transform-origin: 50% 60%;
  animation: glide var(--flap) ease-in-out infinite;
}

/* =========================================================
   SECTION: STORY
   ========================================================= */

.story {
  position: relative;
  overflow: hidden;
  padding: var(--section-y) 0 calc(var(--section-y) + 40px);
  background:
    radial-gradient(60% 50% at 78% 38%, rgba(82, 105, 75, .28), transparent 70%),
    radial-gradient(50% 45% at 8% 85%, rgba(36, 77, 117, .2), transparent 70%),
    linear-gradient(180deg, var(--midnight) 0%, var(--forest) 52%, #12231c 100%);
}

.story__shafts {
  position: absolute;
  inset: -10% -20%;
  background:
    linear-gradient(104deg, transparent 38%, rgba(232, 187, 117, .065) 44%, transparent 50%),
    linear-gradient(108deg, transparent 55%, rgba(232, 187, 117, .05) 59%, transparent 64%),
    linear-gradient(101deg, transparent 70%, rgba(242, 232, 212, .035) 73%, transparent 77%);
  animation: shafts 16s ease-in-out infinite alternate;
  pointer-events: none;
}

.story__grid {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr);
  align-items: center;
  gap: clamp(40px, 6vw, 140px);
}

.story__heading { margin-bottom: clamp(26px, 4vh, 48px); }

.story__lead {
  margin-top: clamp(26px, 4vh, 44px);
  font-size: clamp(1.25rem, 1rem + .75vw, 1.85rem);
  line-height: 1.5;
  max-width: 34ch;
  color: var(--parchment);
}
.dropcap::first-letter {
  float: left;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 3.6em;
  line-height: .82;
  padding: .06em .12em 0 0;
  color: var(--gold);
}

.story__body {
  margin-top: 1.2em;
  max-width: 40ch;
  font-size: clamp(1.1rem, .98rem + .4vw, 1.45rem);
  color: var(--parchment-dim);
}

.story__final {
  margin: clamp(36px, 6vh, 64px) 0 0;
  padding-left: clamp(18px, 2vw, 30px);
  border-left: 2px solid var(--scarf);
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.6rem, 1rem + 1.7vw, 3rem);
  line-height: 1.15;
  color: var(--parchment);
}
.story__final em { color: var(--gold); font-weight: 600; }

.story__art {
  position: relative;
  margin: 0;
  justify-self: center;
  width: min(100%, 640px);
}
.story__art::before {
  content: "";
  position: absolute;
  inset: 8% -8% 4%;
  background: radial-gradient(50% 50% at 52% 46%, rgba(232, 187, 117, .3), rgba(185, 120, 79, .1) 45%, transparent 70%);
  z-index: -1;
}
.story__art img {
  width: 100%;
  height: auto;
  filter: drop-shadow(0 30px 40px rgba(0, 0, 0, .45));
  animation: floaty 9s ease-in-out infinite alternate;
}

/* CSS ferns */
.frond {
  position: absolute;
  width: 2px;
  height: clamp(220px, 34vh, 420px);
  background: linear-gradient(180deg, transparent, rgba(129, 148, 108, .55));
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  align-items: center;
  opacity: .45;
  transform-origin: 50% 100%;
  animation: sway 9s ease-in-out infinite alternate;
  pointer-events: none;
}
.frond i { position: relative; width: 0; height: 0; }
.frond i::before,
.frond i::after {
  content: "";
  position: absolute;
  top: -6px; left: 0;
  width: var(--l, 40px);
  height: 11px;
  border-radius: 0 100% 0 100%;
  background: linear-gradient(90deg, rgba(129, 148, 108, .8), rgba(82, 105, 75, .15));
  transform-origin: 0 50%;
  transform: rotate(-38deg);
}
.frond i::after { transform: scaleX(-1) rotate(-38deg); }
.frond i:nth-child(1) { --l: 14px; }
.frond i:nth-child(2) { --l: 22px; }
.frond i:nth-child(3) { --l: 30px; }
.frond i:nth-child(4) { --l: 38px; }
.frond i:nth-child(5) { --l: 44px; }
.frond i:nth-child(6) { --l: 50px; }
.frond i:nth-child(7) { --l: 54px; }
.frond i:nth-child(8) { --l: 56px; }
.frond i:nth-child(9) { --l: 56px; }
.frond--left { left: clamp(16px, 2.4vw, 60px); bottom: -20px; transform: rotate(8deg); }
.frond--right { right: clamp(20px, 3vw, 80px); top: 8%; height: clamp(160px, 24vh, 300px); transform: rotate(-168deg); animation-delay: -4s; }

/* =========================================================
   SECTION: THE HANDCRAFTED WORLD
   ========================================================= */

.world {
  position: relative;
  padding: calc(var(--section-y) - 20px) 0 var(--section-y);
  color: var(--ink);
  background-color: var(--parchment);
  background-image:
    radial-gradient(60% 40% at 15% 30%, rgba(129, 148, 108, .14), transparent 70%),
    radial-gradient(50% 40% at 88% 72%, rgba(185, 120, 79, .14), transparent 70%),
    radial-gradient(120% 70% at 50% 50%, transparent 62%, rgba(150, 110, 70, .16) 100%),
    repeating-radial-gradient(circle at 30% 40%, rgba(70, 48, 24, .022) 0 1px, transparent 1px 3px);
  z-index: 1;
}

.torn {
  position: absolute;
  left: 0; right: 0;
  height: clamp(22px, 3vw, 44px);
  background: var(--parchment);
  clip-path: polygon(0 100%, 0 46%, 2% 58%, 4% 40%, 6.5% 55%, 9% 35%, 11% 52%, 13.5% 44%, 16% 62%, 18% 38%, 21% 50%, 23% 30%, 26% 54%, 28.5% 42%, 31% 60%, 33% 36%, 36% 48%, 38.5% 28%, 41% 52%, 43% 40%, 46% 58%, 48% 34%, 51% 50%, 53.5% 38%, 56% 56%, 58% 32%, 61% 46%, 63.5% 30%, 66% 54%, 68% 42%, 71% 60%, 73% 36%, 76% 50%, 78.5% 34%, 81% 56%, 83% 40%, 86% 52%, 88.5% 30%, 91% 48%, 93% 38%, 96% 58%, 98% 42%, 100% 52%, 100% 100%);
}
.torn--top { top: 1px; transform: translateY(-100%); }
.torn--bottom { bottom: 1px; transform: translateY(100%) scale(-1, -1); }

.world__head { text-align: center; }
.world__head .eyebrow { justify-content: center; }
.world__head .eyebrow::after {
  content: "";
  width: 2.6em; height: 1px;
  background: currentColor;
  opacity: .6;
}
.world__head .display { font-size: clamp(2.5rem, 1rem + 4.8vw, 6.8rem); }

.world__lead {
  margin: clamp(24px, 3.5vh, 40px) auto 0;
  max-width: 44ch;
  font-size: clamp(1.18rem, 1rem + .6vw, 1.7rem);
  line-height: 1.55;
  color: var(--ink-soft);
}

.world__type {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: clamp(28px, 5vw, 110px);
  margin-top: clamp(56px, 9vh, 120px);
}

.years {
  display: flex;
  align-items: center;
  gap: clamp(8px, 1.2vw, 24px);
}
.years__num {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(8rem, 3rem + 17vw, 24rem);
  line-height: .78;
  letter-spacing: -.04em;
  color: var(--copper);
  background:
    repeating-linear-gradient(94deg, rgba(255, 235, 200, .22) 0 2px, transparent 2px 9px),
    linear-gradient(180deg, #b9784f 0%, #8c5434 60%, #5f3a22 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.years__word {
  writing-mode: vertical-rl;
  font-family: var(--font-label);
  font-size: clamp(1.1rem, .7rem + 1.2vw, 2.3rem);
  letter-spacing: .5em;
  color: var(--moss);
}

.frame-words { display: grid; gap: clamp(14px, 2vh, 24px); }
.frame-words__rule {
  height: 1px;
  background: linear-gradient(90deg, rgba(82, 105, 75, .6), rgba(82, 105, 75, 0));
}
.frame-words p {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(2.4rem, 1rem + 4.4vw, 6.4rem);
  line-height: .98;
  text-transform: uppercase;
  color: var(--forest);
}
.frame-words em {
  display: block;
  font-style: italic;
  font-weight: 500;
  text-transform: none;
  color: var(--scarf);
}

.filmstrip {
  position: relative;
  margin: clamp(64px, 10vh, 130px) -3vw 0;
  padding: clamp(18px, 1.8vw, 30px) 0;
  background: #19130e;
  transform: rotate(-1.6deg);
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(40, 26, 14, .25);
}
.filmstrip::before,
.filmstrip::after {
  content: "";
  position: absolute;
  left: 0; right: 0;
  height: clamp(7px, .6vw, 11px);
  background-image: linear-gradient(90deg, transparent 0 30%, rgba(242, 232, 212, .82) 30% 70%, transparent 70%);
  background-size: clamp(22px, 1.8vw, 34px) 100%;
  z-index: 2;
}
.filmstrip::before { top: clamp(5px, .5vw, 9px); }
.filmstrip::after { bottom: clamp(5px, .5vw, 9px); }

.filmstrip__track {
  display: flex;
  width: max-content;
  animation: reel 80s linear infinite;
}
.frame {
  flex: none;
  width: clamp(220px, 21vw, 420px);
  aspect-ratio: 4 / 3;
  margin-right: clamp(10px, .9vw, 16px);
  border-radius: 3px;
  overflow: hidden;
  position: relative;
}
.frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: var(--pos) 50%;
}
.frame::after {
  content: "";
  position: absolute;
  inset: 0;
  box-shadow: inset 0 0 40px rgba(20, 12, 6, .55);
  background: linear-gradient(180deg, rgba(232, 187, 117, .06), rgba(20, 12, 6, .1));
}

.world__close {
  margin-top: clamp(64px, 10vh, 130px);
  text-align: center;
}
.world__close p {
  margin-top: 22px;
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(1.8rem, 1rem + 2.4vw, 3.6rem);
  line-height: 1.1;
  color: var(--forest);
}

/* =========================================================
   SECTION: CONTRACT / HOW TO ENTER
   ========================================================= */

.enter {
  position: relative;
  padding: calc(var(--section-y) + 30px) 0 var(--section-y);
  background:
    radial-gradient(60% 40% at 50% 0%, rgba(82, 105, 75, .3), transparent 70%),
    linear-gradient(180deg, #1b3027 0%, var(--forest) 45%, var(--midnight) 100%);
}

.section-head { text-align: center; margin-bottom: clamp(44px, 7vh, 84px); }
.section-head .eyebrow { justify-content: center; }
.section-head .eyebrow::after {
  content: "";
  width: 2.6em; height: 1px;
  background: currentColor;
  opacity: .6;
}
.section-head__sub {
  margin-top: 18px;
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(1.3rem, 1rem + .9vw, 2rem);
  color: var(--parchment-dim);
}

.ledger-frame {
  position: relative;
  max-width: 960px;
  margin-inline: auto;
  padding: clamp(10px, 1vw, 16px);
  border-radius: 16px 9px 15px 10px;
  background: var(--wood-dark);
  box-shadow:
    inset 0 1px 0 rgba(255, 220, 170, .18),
    0 0 0 1px rgba(0, 0, 0, .5),
    0 34px 70px rgba(0, 0, 0, .45);
}
/* brass nails in the frame corners */
.ledger-frame::before {
  content: "";
  position: absolute;
  inset: 5px;
  pointer-events: none;
  background:
    radial-gradient(circle at 0 0, #d7b47a 0 2.5px, #6b4b2a 3px, transparent 3.5px) top left / 10px 10px no-repeat,
    radial-gradient(circle at 100% 0, #d7b47a 0 2.5px, #6b4b2a 3px, transparent 3.5px) top right / 10px 10px no-repeat,
    radial-gradient(circle at 0 100%, #d7b47a 0 2.5px, #6b4b2a 3px, transparent 3.5px) bottom left / 10px 10px no-repeat,
    radial-gradient(circle at 100% 100%, #d7b47a 0 2.5px, #6b4b2a 3px, transparent 3.5px) bottom right / 10px 10px no-repeat;
}

.ledger {
  padding: clamp(22px, 3.4vw, 56px) clamp(18px, 3.6vw, 60px);
  border-radius: 8px 12px 9px 11px;
  color: var(--ink);
  background-color: var(--parchment);
  background-image:
    radial-gradient(120% 90% at 50% 50%, transparent 55%, rgba(150, 105, 60, .22) 100%),
    repeating-radial-gradient(circle at 70% 30%, rgba(70, 48, 24, .025) 0 1px, transparent 1px 3px);
}

.ledger__rows { margin: 0; display: grid; gap: clamp(14px, 2vh, 22px); }

.ledger__row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: baseline;
  gap: 16px;
}
.ledger__row::after {
  /* dotted leader between label and value */
  content: "";
  grid-column: 2;
  grid-row: 1;
  border-bottom: 2px dotted rgba(82, 105, 75, .45);
  transform: translateY(-.3em);
}
.ledger__row dt {
  grid-column: 1;
  font-family: var(--font-label);
  font-size: clamp(1rem, .9rem + .35vw, 1.3rem);
  letter-spacing: .2em;
  color: var(--moss);
}
.ledger__row dd {
  grid-column: 3;
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.4rem, 1.1rem + 1vw, 2.2rem);
  letter-spacing: .04em;
  color: var(--forest);
  text-align: right;
}
.ledger__row--ca dd {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 10px 14px;
  min-width: 0;
}

.ca {
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-weight: 600;
  font-size: clamp(1.05rem, .95rem + .4vw, 1.4rem);
  letter-spacing: .02em;
  padding: .3em .6em;
  border-radius: 6px;
  background: rgba(20, 41, 31, .07);
  box-shadow: inset 0 0 0 1px rgba(82, 105, 75, .3);
  word-break: break-all;
}

.copy-btn {
  display: inline-flex;
  align-items: center;
  gap: .5em;
  min-height: 42px;
  padding: .5em 1.05em .55em;
  border: 0;
  border-radius: 9px 4px 9px 5px;
  background: var(--forest);
  color: var(--parchment);
  font-family: var(--font-label);
  font-size: 1rem;
  letter-spacing: .12em;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(20, 41, 31, .3);
  transition: background-color .3s, transform .35s var(--ease-out);
}
.copy-btn svg {
  width: 16px; height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.copy-btn:hover { background: var(--moss); transform: translateY(-1px); }
.copy-btn.is-copied { background: var(--copper); }

.ledger__note {
  margin-top: clamp(20px, 3vh, 30px);
  padding-top: clamp(16px, 2.4vh, 22px);
  border-top: 1px solid rgba(82, 105, 75, .25);
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 14px;
  font-size: clamp(.98rem, .92rem + .2vw, 1.12rem);
  font-style: italic;
  color: var(--ink-soft);
}
.ledger__note code { font-style: normal; font-size: .92em; }
.tag {
  flex: none;
  font-family: var(--font-label);
  font-style: normal;
  font-size: .88rem;
  letter-spacing: .14em;
  color: var(--parchment);
  background: var(--scarf);
  padding: .2em .7em .3em;
  border-radius: 4px 2px 4px 2px;
}

.trail {
  list-style: none;
  margin: clamp(64px, 10vh, 110px) auto 0;
  padding: 0;
  max-width: 1240px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(24px, 3vw, 56px);
  position: relative;
  counter-reset: none;
}
.trail::before {
  content: "";
  position: absolute;
  top: 34px;
  left: 16%;
  right: 16%;
  border-top: 2px dashed rgba(232, 187, 117, .3);
}
.trail__step { position: relative; text-align: center; }
.stone {
  position: relative;
  display: grid;
  place-items: center;
  width: 68px; height: 68px;
  margin: 0 auto 22px;
  border-radius: 46% 54% 50% 50% / 52% 46% 54% 48%;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.6rem;
  color: var(--gold);
  background: radial-gradient(circle at 35% 30%, #4a5d48 0%, #2c3d30 55%, #1c2a22 100%);
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, .08), inset 0 -3px 6px rgba(0, 0, 0, .35), 0 8px 18px rgba(0, 0, 0, .35);
}
.stone::after {
  /* moss on the stone */
  content: "";
  position: absolute;
  top: -3px; left: 18%;
  width: 60%; height: 9px;
  border-radius: 50%;
  background: radial-gradient(ellipse at 50% 70%, rgba(129, 148, 108, .9), rgba(82, 105, 75, 0) 70%);
}
.trail__step h3 {
  font-family: var(--font-label);
  font-weight: 400;
  font-size: clamp(1.2rem, 1rem + .6vw, 1.6rem);
  letter-spacing: .1em;
  color: var(--parchment);
}
.trail__step p {
  margin: 10px auto 0;
  max-width: 26ch;
  color: var(--parchment-dim);
}

.enter__actions,
.community__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px 20px;
  margin-top: clamp(48px, 7vh, 80px);
}

/* =========================================================
   SECTION: CHART
   ========================================================= */

.chart {
  position: relative;
  padding: var(--section-y) 0;
  background:
    radial-gradient(55% 35% at 50% 20%, rgba(36, 77, 117, .22), transparent 70%),
    radial-gradient(40% 30% at 10% 90%, rgba(82, 105, 75, .2), transparent 70%),
    var(--midnight);
}

.chart-frame {
  position: relative;
  max-width: 1640px;
  margin-inline: auto;
  padding: clamp(8px, .8vw, 14px);
  border-radius: 16px 9px 18px 11px;
  background: var(--wood-dark);
  box-shadow:
    inset 0 1px 0 rgba(255, 220, 170, .15),
    0 0 0 1px rgba(0, 0, 0, .55),
    0 40px 90px rgba(0, 0, 0, .5);
}
.chart-frame::before,
.chart-frame::after {
  content: "";
  position: absolute;
  width: clamp(70px, 7vw, 130px);
  height: clamp(16px, 1.4vw, 24px);
  border-radius: 50%;
  pointer-events: none;
  background:
    radial-gradient(circle at 20% 60%, #7d9a5a 0 5px, transparent 5.5px),
    radial-gradient(circle at 42% 40%, #5f7c45 0 7px, transparent 7.5px),
    radial-gradient(circle at 64% 62%, #8aa564 0 5px, transparent 5.5px),
    radial-gradient(circle at 84% 45%, #52694b 0 4px, transparent 4.5px);
}
.chart-frame::before { top: -8px; left: 6%; }
.chart-frame::after { bottom: -8px; right: 7%; transform: rotate(180deg); }

.chart-frame__inner {
  position: relative;
  height: clamp(480px, 46vw, 860px);
  border-radius: 9px 5px 10px 6px;
  overflow: hidden;
  background:
    radial-gradient(60% 60% at 50% 50%, rgba(82, 105, 75, .12), transparent 70%),
    #0c1513;
  box-shadow: inset 0 0 0 1px rgba(232, 187, 117, .12);
}
.chart-frame__inner iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.chart__foot {
  margin-top: clamp(28px, 4vh, 44px);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px 28px;
  max-width: 1640px;
  margin-inline: auto;
}
.chart__foot p {
  font-style: italic;
  color: var(--parchment-dim);
}

/* =========================================================
   SECTION: COMMUNITY
   ========================================================= */

.community {
  position: relative;
  min-height: max(100svh, 760px);
  display: grid;
  place-items: center;
  overflow: hidden;
  isolation: isolate;
  padding: calc(var(--section-y) + 20px) 16px calc(var(--section-y) + 120px);
  text-align: center;
}

.community__sky {
  position: absolute;
  inset: 0;
  z-index: -3;
  background:
    radial-gradient(50% 38% at 50% 58%, rgba(232, 187, 117, .55), rgba(185, 120, 79, .18) 45%, transparent 72%),
    linear-gradient(180deg, var(--midnight) 0%, #1d3138 22%, #4b5658 40%, #9b7c5c 56%, #6c6a4b 68%, #2c4432 82%, #14291f 100%);
}

.community__forest {
  position: absolute;
  left: 50%;
  bottom: -2%;
  z-index: -2;
  width: max(100%, 1100px);
  max-width: none;
  height: auto;
  transform: translateX(-50%);
}

.community__shade {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(38% 34% at 50% 46%, rgba(10, 18, 16, .6), transparent 75%),
    linear-gradient(180deg, var(--midnight) 0%, rgba(16, 28, 26, 0) 22%, rgba(16, 28, 26, 0) 70%, rgba(11, 20, 18, .9) 92%, var(--deep) 100%);
}

.community .bird--far { z-index: -2; }
.community .bird--near { z-index: 0; }

.community__content {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 1100px;
}

.medallion {
  margin: 0 0 clamp(24px, 4vh, 44px);
  width: clamp(110px, 9vw, 170px);
  aspect-ratio: 1;
  border-radius: 50%;
  padding: 6px;
  background: var(--wood);
  box-shadow: 0 0 0 1px rgba(232, 187, 117, .55), 0 18px 40px rgba(0, 0, 0, .5), 0 0 60px rgba(232, 187, 117, .25);
}
.medallion img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.community__heading {
  font-size: clamp(2.8rem, 1rem + 5.6vw, 7.6rem);
  text-shadow: 0 4px 30px rgba(6, 12, 10, .6);
}
.community__sub {
  margin-top: clamp(16px, 2.6vh, 28px);
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(1.4rem, 1rem + 1.2vw, 2.4rem);
  color: var(--gold);
  text-shadow: 0 2px 16px rgba(6, 12, 10, .8);
}

/* =========================================================
   FOOTER
   ========================================================= */

.footer {
  background: var(--deep);
  padding: clamp(56px, 8vh, 96px) 0 clamp(32px, 5vh, 52px);
  color: var(--parchment-dim);
  font-size: clamp(1rem, .95rem + .2vw, 1.12rem);
}

.footer__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) repeat(2, minmax(0, 1fr));
  gap: 40px;
}

.footer__brand { display: flex; align-items: center; gap: 16px; }
.footer__brand img {
  width: 56px; height: 56px;
  border-radius: 50%;
  box-shadow: 0 0 0 1.5px rgba(232, 187, 117, .5);
}
.footer__name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.5rem, 1.2rem + .8vw, 2rem);
  color: var(--parchment);
  line-height: 1.1;
}
.footer__meta {
  font-family: var(--font-label);
  letter-spacing: .16em;
  color: var(--gold);
}

.footer__col { display: flex; flex-direction: column; gap: 8px; }
.footer__label {
  font-family: var(--font-label);
  letter-spacing: .2em;
  color: var(--fern);
  margin-bottom: 6px;
}
.footer__col a {
  width: fit-content;
  text-decoration: none;
  transition: color .3s;
}
.footer__col a:hover { color: var(--gold); }

.footer__legal {
  margin-top: clamp(40px, 6vh, 64px);
  text-align: center;
}
.footer__legal p {
  margin: 20px auto 0;
  max-width: 62ch;
  font-size: .95em;
  font-style: italic;
  color: rgba(242, 232, 212, .55);
}

/* =========================================================
   SCROLL REVEALS
   ========================================================= */

.js .reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 1.1s ease var(--d, 0s), transform 1.3s var(--ease-out) var(--d, 0s);
}
.js .reveal.is-visible { opacity: 1; transform: none; }
.js .filmstrip.reveal { transform: rotate(-1.6deg) translateY(26px); }
.js .filmstrip.reveal.is-visible { transform: rotate(-1.6deg); }

.js .reveal-lines .line > span {
  transform: translateY(108%);
  transition: transform 1.25s var(--ease-out) calc(var(--i, 0) * 130ms);
}
.js .reveal-lines.is-visible .line > span { transform: none; }

/* Pause looping animations while a scene is off-screen */
.is-paused,
.is-paused * { animation-play-state: paused !important; }

/* =========================================================
   KEYFRAMES
   ========================================================= */

@keyframes fly {
  0%   { transform: translate3d(var(--x0), 0, 0); opacity: 0; }
  5%   { opacity: 1; }
  50%  { transform: translate3d(calc((var(--x0) + var(--x1)) / 2), var(--dy), 0); }
  95%  { opacity: 1; }
  100% { transform: translate3d(var(--x1), var(--dy2), 0); opacity: 0; }
}

@keyframes glide {
  0%, 100% { transform: translateY(0) rotate(-2.5deg) scale(1); }
  50%      { transform: translateY(-9%) rotate(2deg) scale(.97); }
}

@keyframes sunBreathe {
  from { opacity: .75; transform: translate(-50%, -50%) scale(1); }
  to   { opacity: 1;   transform: translate(-50%, -50%) scale(1.07); }
}

@keyframes raysTurn {
  from { transform: rotate(-3deg); opacity: .65; }
  to   { transform: rotate(3deg);  opacity: 1; }
}

@keyframes mistDrift {
  from { transform: translate3d(-6%, 0, 0); }
  to   { transform: translate3d(8%, -2%, 0); }
}

@keyframes cueDrop {
  0%   { transform: translateY(-6px); opacity: 0; }
  25%  { opacity: 1; }
  100% { transform: translateY(46px); opacity: 0; }
}

@keyframes shafts {
  from { opacity: .55; transform: translateX(-2%); }
  to   { opacity: 1;   transform: translateX(2%); }
}

@keyframes floaty {
  from { transform: translateY(-8px); }
  to   { transform: translateY(10px); }
}

@keyframes sway {
  from { rotate: -2deg; }
  to   { rotate: 2.5deg; }
}

@keyframes reel {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (min-width: 2200px) {
  .hero__content { width: min(40cqw, 82cqh); }
}

/* Small laptops / large tablets landscape */
@media (max-width: 1200px) {
  .nav__menu { gap: 18px; }
  .story__grid { gap: 40px; }
}

/* Collapse nav into a menu */
@media (max-width: 1024px) {
  .nav__inner { grid-template-columns: auto 1fr; }
  .nav__actions { gap: 10px; }
  .nav__toggle { display: block; }

  .nav__menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 0; right: 0;
    flex-direction: column;
    gap: 0;
    padding: 8px;
    border-radius: 14px;
    background: rgba(16, 28, 26, .97);
    box-shadow: 0 0 0 1px rgba(232, 187, 117, .18), 0 24px 50px rgba(0, 0, 0, .5);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity .3s var(--ease), transform .35s var(--ease), visibility 0s linear .35s;
  }
  .nav__menu.is-open {
    opacity: 1;
    visibility: visible;
    transform: none;
    transition: opacity .3s var(--ease), transform .35s var(--ease), visibility 0s;
  }
  .nav__menu a {
    padding: 14px 16px;
    font-size: 1.15rem;
    border-radius: 8px;
  }
  .nav__menu a + a { box-shadow: 0 -1px 0 rgba(242, 232, 212, .08); }
  .nav__menu a::after { display: none; }
  .nav__menu a:hover { background: rgba(242, 232, 212, .05); }
}

/* Stacked hero: tablets portrait + phones */
@media (max-width: 900px), (orientation: portrait) and (max-width: 1200px) {
  .hero {
    --fw: 240vw;
    height: auto;
    min-height: 100svh;
    container-type: normal;
    display: flex;
    flex-direction: column;
    padding-top: calc(var(--nav-h) + clamp(12px, 3vh, 40px));
  }

  .hero__sky {
    background:
      radial-gradient(70% 34% at 55% 46%, rgba(255, 220, 160, .85) 0%, rgba(232, 187, 117, .45) 34%, rgba(185, 120, 79, 0) 70%),
      linear-gradient(180deg, #273746 0%, #4f5f68 14%, #9d8f7c 30%, #dcae78 44%, #c99263 54%, #6e7454 66%, #304a37 80%, #14291f 100%);
  }
  .hero__sun { left: 55%; top: 46%; width: 120vmax; }
  .hero__rays { -webkit-mask-image: none; mask-image: none; opacity: .5; }

  .hero__house { left: 55%; bottom: 56%; width: 12.5%; }

  .hero__shade {
    background:
      radial-gradient(80% 30% at 50% 22%, rgba(10, 18, 16, .55), transparent 75%),
      linear-gradient(180deg, rgba(10, 18, 16, .62) 0%, rgba(10, 18, 16, .28) 36%, transparent 55%);
  }

  .hero__content {
    order: 1;
    position: relative;
    inset: auto;
    width: 100%;
    padding: 0 16px;
  }
  .hero__title { width: min(94vw, 640px); }
  .hero__tagline { font-size: clamp(1.25rem, .9rem + 2vw, 2rem); }

  .layer--cast {
    order: 2;
    position: relative;
    inset: auto;
    margin-top: auto;
    padding-top: clamp(20px, 4vh, 48px);
  }
  .hero__cast {
    position: relative;
    right: auto; bottom: auto;
    height: auto;
    width: min(90vw, 600px);
    max-width: 100%;
    margin: 0 auto -3%;
  }
  .hero__floor { height: 10%; }
  .scroll-cue { display: none; }
  .bird--opt { display: none; }
  .hero .bird { --size: clamp(40px, 12vw, 90px) !important; }

  .story__grid { grid-template-columns: 1fr; }
  .story__art { width: min(100%, 460px); }
  .frond--right { display: none; }
}

@media (max-width: 760px) {
  .world__type {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }
  .frame-words__rule { background: linear-gradient(90deg, transparent, rgba(82, 105, 75, .6), transparent); }

  .trail { grid-template-columns: 1fr; max-width: 520px; gap: 36px; }
  .trail::before {
    top: 34px; bottom: 34px;
    left: 34px; right: auto;
    border-top: 0;
    border-left: 2px dashed rgba(232, 187, 117, .3);
  }
  .trail__step {
    display: grid;
    grid-template-columns: 68px 1fr;
    column-gap: 20px;
    text-align: left;
    align-items: center;
  }
  .trail__step .stone { grid-row: span 2; margin: 0; }
  .trail__step p { margin: 4px 0 0; }

  .ledger__row { grid-template-columns: 1fr; gap: 6px; }
  .ledger__row::after { display: none; }
  .ledger__row dt, .ledger__row dd { grid-column: 1; text-align: left; }
  .ledger__row--ca dd { justify-content: flex-start; }
  .ledger__row + .ledger__row { padding-top: 14px; border-top: 1px dotted rgba(82, 105, 75, .35); }

  .chart__foot { justify-content: center; text-align: center; }

  .footer__grid { grid-template-columns: 1fr 1fr; }
  .footer__brand { grid-column: 1 / -1; }
}

@media (max-width: 520px) {
  .nav__brand span { display: none; }
  .hero__actions { width: 100%; max-width: 360px; margin-inline: auto; }
  .hero__actions .btn { flex: 1 1 100%; }
  .enter__actions .btn,
  .community__actions .btn { flex: 1 1 100%; max-width: 360px; }
  .chart__foot .btn { width: 100%; max-width: 360px; }
  .copy-btn { min-height: 44px; }
}

@media (max-width: 360px) {
  .nav__x { width: 38px; height: 38px; }
  .btn--sm { padding-inline: .9em; }
  .footer__grid { grid-template-columns: 1fr; }
}

/* Short desktop viewports */
@media (min-width: 901px) and (max-height: 700px) and (orientation: landscape) {
  .hero__sub { display: none; }
  .scroll-cue { display: none; }
}

/* Touch devices: no hover lift weirdness */
@media (hover: none) {
  .btn:hover { --lift: 0px; }
}

/* =========================================================
   REDUCED MOTION
   ========================================================= */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    transition-delay: 0s !important;
  }
  .bird__flight,
  .bird__img,
  .filmstrip__track,
  .hero__mist,
  .story__art img { animation: none !important; }
  .bird__flight { transform: translate3d(var(--xs, 40vw), 0, 0); }
  .js .reveal-lines .line > span { transform: none; }
}
