/* ---------- Stage: fixed 1920×1080 canvas scaled to the screen ---------- */
html, body { background: #000; overflow: hidden; cursor: none; }
body.show-cursor { cursor: default; }

.viewport { position: fixed; inset: 0; display: grid; place-items: center; overflow: hidden; }
.stage {
  position: absolute; left: 50%; top: 50%;
  width: 1920px; height: 1080px;
  transform-origin: 0 0;
  overflow: hidden;
  background: var(--forest-900);
  color: var(--ink);
  --accent: var(--brass);
  --accent-ink: #6b5022;
}
.layer { position: absolute; inset: 0; width: 100%; height: 100%; }

/* Backdrop crossfade */
.backdrop .bd { position: absolute; inset: 0; opacity: 0; transition: opacity 1.6s var(--ease-io), transform 30s linear; transform: scale(1.06); }
.backdrop .bd.on { opacity: 1; transform: scale(1); }
.backdrop .bd svg { width: 100%; height: 100%; }

.tint { background: var(--forest-900); opacity: 1; transition: opacity 1.2s var(--ease-io), background-color 1.2s var(--ease-io); pointer-events: none; }
.stage[data-tone="light"] .tint { opacity: 0; }
.stage[data-tone="veil"] .tint { opacity: .18; }

.contours { opacity: 0; transition: opacity 1.4s var(--ease-io); }
.stage[data-tone="dark"] .contours { opacity: 1; }

.gl { pointer-events: none; z-index: 4; }

/* ---------- Brand chrome ---------- */
.wordmark { display: inline-flex; flex-direction: column; line-height: .92; font-family: var(--font-display); letter-spacing: -.01em; }
.wordmark .wm-1 { font-weight: 800; font-size: 1em; }
.wordmark .wm-2 { font-weight: 400; font-size: .62em; letter-spacing: .02em; margin-top: .12em; }
.wordmark .wm-rule { display: block; width: 1.4em; height: .09em; border-radius: .05em; background: var(--sun); margin-bottom: .28em; }
.wordmark img { height: 1.6em; width: auto; }

.brand-tab {
  position: absolute; top: 0; right: 0; z-index: 6;
  padding: 34px 52px 34px 56px;
  background: var(--forest-800);
  color: #fff; font-size: 40px;
  border-bottom-left-radius: 56px;
  transition: transform .9s var(--ease-out), opacity .6s;
}
.stage[data-scene="home"] .brand-tab,
.stage[data-scene="video"] .brand-tab { transform: translateY(-110%); opacity: 0; }

.session-badge {
  position: absolute; left: 40px; bottom: 34px; z-index: 6;
  display: flex; align-items: center; gap: 12px;
  padding: 10px 18px 10px 14px; border-radius: 999px;
  font: 500 20px/1 var(--font-text);
  color: rgba(255,255,255,.82);
  background: rgba(6, 28, 20, .55);
  backdrop-filter: blur(10px);
  transition: opacity .6s;
}
.session-badge b { font: 700 22px/1 var(--font-display); letter-spacing: .08em; color: #fff; }
.session-badge .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--sage); box-shadow: 0 0 0 4px rgba(169,191,175,.18); }
.session-badge.paired .dot { background: #6fd39b; box-shadow: 0 0 0 4px rgba(111,211,155,.2); }
.session-badge[hidden] { display: flex; opacity: 0; }
.stage[data-scene="video"] .session-badge { opacity: .0; }

.toast {
  position: absolute; left: 50%; bottom: 40px; z-index: 8; transform: translate(-50%, 30px);
  padding: 16px 28px; border-radius: 14px; background: rgba(6,28,20,.86); color: #fff;
  font: 500 24px/1.2 var(--font-text); opacity: 0; transition: opacity .4s, transform .6s var(--ease-out);
  pointer-events: none;
}
.toast.on { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Scenes ---------- */
.scenes { z-index: 3; }
.scene { position: absolute; inset: 0; padding: 120px 150px 120px; opacity: 0; transition: opacity .9s var(--ease-io); }
.scene.on { opacity: 1; }
.scene.leaving { opacity: 0; }

.reveal > * { opacity: 0; transform: translateY(28px); transition: opacity .9s var(--ease-out), transform 1.1s var(--ease-out); }
.scene.on .reveal > * { opacity: 1; transform: none; }
.scene.on .reveal > *:nth-child(2) { transition-delay: .12s; }
.scene.on .reveal > *:nth-child(3) { transition-delay: .24s; }
.scene.on .reveal > *:nth-child(4) { transition-delay: .36s; }
.scene.on .reveal > *:nth-child(5) { transition-delay: .48s; }
.scene.on .reveal > *:nth-child(6) { transition-delay: .6s; }

.crumbs { font: 600 24px/1 var(--font-text); color: var(--accent-ink); display: flex; gap: 14px; align-items: center; margin: 0 0 26px; }
.crumbs i { width: 34px; height: 2px; background: var(--accent); display: inline-block; }

.title { font: 800 92px/1.0 var(--font-display); letter-spacing: -.025em; color: var(--forest-900); margin: 0; max-width: 1100px; text-wrap: balance; }
.lead { font: 500 36px/1.32 var(--font-text); color: #2b4236; margin: 30px 0 0; max-width: 900px; text-wrap: pretty; }
.body { font: 400 27px/1.5 var(--font-text); color: #3c5247; margin: 22px 0 0; max-width: 820px; text-wrap: pretty; }

/* Home */
.scene-home { color: #fff; display: grid; align-content: center; padding-left: 170px; }
.scene-home .wordmark { font-size: 132px; color: #fff; }
.scene-home .home-tagline { font: 400 40px/1.3 var(--font-text); color: var(--sage); margin: 46px 0 0; max-width: 760px; }
.scene-home .home-foot { position: absolute; left: 170px; bottom: 110px; display: flex; gap: 70px; color: rgba(255,255,255,.75); font: 500 24px/1.3 var(--font-text); }
.scene-home .home-foot b { display: block; font: 800 54px/1 var(--font-display); color: var(--brass-hi); margin-bottom: 8px; letter-spacing: -.01em; }

/* Intro: title moment */
.scene-intro { display: grid; place-items: center; text-align: center; padding: 0 120px; }
.intro-title { font: 900 200px/.92 var(--font-display); letter-spacing: -.035em; color: var(--accent-ink); margin: 0; text-wrap: balance; }
.intro-title .w { display: inline-block; overflow: hidden; vertical-align: top; padding: 0 .04em .06em; }
.intro-title .w > span { display: inline-block; transform: translateY(105%); transition: transform 1.3s var(--ease-out); }
.scene-intro.on .intro-title .w > span { transform: none; }
.intro-sub { font: 500 34px/1.3 var(--font-text); color: #3c5247; margin-top: 34px; opacity: 0; transition: opacity 1s .9s; }
.scene-intro.on .intro-sub { opacity: 1; }

/* Feature: text left, sphere right */
.scene-feature .copy { position: absolute; left: 150px; top: 150px; width: 960px; }
.stats { display: flex; gap: 0; margin-top: 64px; }
.stat { padding: 0 54px 0 0; margin-right: 54px; border-right: 1px solid rgba(15,34,25,.16); }
.stat:last-child { border-right: 0; margin-right: 0; }
.stat b { display: block; font: 800 72px/1 var(--font-display); letter-spacing: -.03em; color: var(--forest-800); font-variant-numeric: tabular-nums; }
.stat span { display: block; font: 500 22px/1.3 var(--font-text); color: #4b6156; margin-top: 12px; max-width: 260px; }

/* Stats: copy left, figures right */
.split { display: grid; grid-template-columns: 640px 1fr; gap: 110px; align-items: center; height: 100%; padding-right: 60px; }
.split .title { font-size: 80px; }
.split .lead { font-size: 32px; }
.stat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 46px 64px; }
.stat-grid .stat { border: 0; margin: 0; padding: 24px 0 0; border-top: 2px solid var(--accent); }
.stat-grid .stat b { font-size: 76px; white-space: nowrap; }
.stat-grid .stat span { max-width: 380px; font-size: 23px; }

/* People */
.people { display: grid; grid-template-columns: repeat(4, 1fr); gap: 40px 36px; margin-top: 70px; max-width: 1560px; }
.person { display: flex; gap: 22px; align-items: center; }
.person .mono { flex: none; width: 96px; height: 96px; border-radius: 50%; display: grid; place-items: center; font: 700 34px/1 var(--font-display); color: #fff; background: var(--forest-700); box-shadow: inset 0 0 0 3px var(--accent); }
.person b { display: block; font: 700 26px/1.2 var(--font-display); color: var(--forest-900); }
.person span { display: block; font: 400 21px/1.3 var(--font-text); color: #4b6156; margin-top: 6px; }
.people.featured { grid-template-columns: repeat(2, 1fr); max-width: 1200px; }
.people.featured .mono { width: 130px; height: 130px; font-size: 44px; }
.people.featured b { font-size: 34px; }
.people.featured span { font-size: 24px; }

/* Timeline */
.timeline { position: relative; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 28px; margin-top: 110px; padding-top: 52px; max-width: 1620px; }
.timeline::before { content: ''; position: absolute; left: 0; right: 0; top: 13px; height: 2px; background: linear-gradient(90deg, var(--accent), rgba(201,162,91,.15)); }
.tl-item { position: relative; }
.tl-item::before { content: ''; position: absolute; top: -48px; left: 0; width: 22px; height: 22px; border-radius: 50%; background: var(--paper); border: 3px solid var(--accent); }
.tl-item b { display: block; font: 800 46px/1 var(--font-display); color: var(--forest-800); }
.tl-item span { display: block; font: 400 22px/1.4 var(--font-text); color: #3c5247; margin-top: 14px; }

/* Pillars & cards */
.pillars { display: grid; grid-template-columns: repeat(var(--n, 3), 1fr); gap: 44px; margin-top: 80px; max-width: 1620px; }
.pillar { padding-top: 26px; border-top: 2px solid var(--accent); }
.pillar b { display: block; font: 700 34px/1.15 var(--font-display); color: var(--forest-900); }
.pillar .fig { display: block; font: 800 60px/1 var(--font-display); color: var(--accent-ink); margin-bottom: 18px; letter-spacing: -.02em; }
.pillar span { display: block; font: 400 23px/1.45 var(--font-text); color: #3c5247; margin-top: 14px; }

.cards { display: grid; grid-template-columns: repeat(var(--n, 3), 1fr); gap: 30px; margin-top: 70px; max-width: 1620px; }
.card { background: rgba(255,255,255,.62); backdrop-filter: blur(14px); border-radius: 28px; padding: 36px 36px 40px; box-shadow: 0 30px 60px -40px rgba(8,38,27,.45); }
.card .meta { font: 600 20px/1.2 var(--font-text); color: var(--accent-ink); }
.card b { display: block; font: 800 40px/1.08 var(--font-display); color: var(--forest-900); margin-top: 14px; letter-spacing: -.01em; }
.card span { display: block; font: 400 22px/1.45 var(--font-text); color: #3c5247; margin-top: 14px; }
.card .fig { display: block; font: 800 34px/1 var(--font-display); color: var(--forest-700); margin-top: 22px; }

/* Map */
.scene-map .copy { position: absolute; left: 150px; top: 150px; width: 620px; }
.map-wrap { position: absolute; right: 90px; top: 170px; width: 1060px; height: 860px; }
.map-wrap svg { width: 100%; height: 100%; overflow: visible; }
.map-land { fill: #f6f8f3; stroke: rgba(13,53,39,.35); stroke-width: 2; }
.map-pin circle.core { fill: var(--forest-800); }
.map-pin circle.halo { fill: var(--accent); opacity: .35; transform-box: fill-box; transform-origin: center; animation: halo 3.2s var(--ease-out) infinite; }
.map-pin text { font: 600 19px var(--font-text); fill: var(--forest-900); paint-order: stroke; stroke: rgba(246,248,245,.9); stroke-width: 6px; }
@keyframes halo { 0% { transform: scale(.6); opacity: .5; } 100% { transform: scale(2.4); opacity: 0; } }
.legend { display: flex; flex-wrap: wrap; gap: 14px 28px; margin-top: 44px; font: 500 22px/1.2 var(--font-text); color: #3c5247; }
.legend i { display: inline-block; width: 14px; height: 14px; border-radius: 50%; margin-right: 10px; vertical-align: -1px; }

/* Township */
.scene-township .copy { position: absolute; left: 150px; top: 150px; width: 900px; }
.facts { display: grid; grid-template-columns: repeat(3, auto); justify-content: start; gap: 0 60px; margin-top: 56px; }
.facts div { border-left: 2px solid var(--accent); padding-left: 22px; }
.facts b { display: block; font: 800 52px/1 var(--font-display); color: var(--forest-800); }
.facts span { display: block; font: 500 21px/1.3 var(--font-text); color: #4b6156; margin-top: 10px; }
.plan { position: absolute; right: 130px; top: 200px; width: 720px; height: 720px; border-radius: 50%; overflow: hidden; background: #f3f6f2; box-shadow: 0 0 0 14px rgba(255,255,255,.55), 0 60px 90px -50px rgba(8,38,27,.5); }
.plan canvas { width: 100%; height: 100%; }
.plan .plan-label { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); text-align: center; font: 700 26px/1.2 var(--font-display); color: var(--forest-800); background: rgba(246,248,245,.9); padding: 12px 22px; border-radius: 999px; }

/* Library scene (video section idle) */
.scene-library { color: #fff; }
.scene-library .title { color: #fff; }
.scene-library .lead { color: var(--sage); }
.poster-wall { display: grid; grid-template-columns: repeat(4, 1fr); gap: 26px; margin-top: 64px; max-width: 1620px; }
.poster-wall figure { margin: 0; }
.poster-wall .thumb { aspect-ratio: 16/9; border-radius: 18px; background: var(--forest-700) center/cover; box-shadow: 0 0 0 1px rgba(255,255,255,.08); }
.poster-wall figcaption { font: 600 21px/1.3 var(--font-text); color: rgba(255,255,255,.86); margin-top: 12px; }

/* Video */
.video { z-index: 5; background: #000; opacity: 0; transition: opacity .8s var(--ease-io); }
.video.on { opacity: 1; }
.video video { width: 100%; height: 100%; object-fit: contain; background: #000; }

/* ---------- Standby / pairing ---------- */
.pairing {
  position: absolute; inset: 0; z-index: 10; color: #fff;
  background: radial-gradient(120% 90% at 78% 30%, #134a37 0%, #0a2a1f 45%, #051a12 100%);
  opacity: 0; visibility: hidden; transition: opacity 1s var(--ease-io), visibility 0s 1s;
}
.pairing.on { opacity: 1; visibility: visible; transition: opacity 1s var(--ease-io), visibility 0s; }
.pairing-contours { position: absolute; inset: 0; width: 100%; height: 100%; opacity: .9; }
.pairing-inner { position: relative; height: 100%; padding: 90px 140px 100px; display: flex; flex-direction: column; }
.pairing-head { display: flex; align-items: center; justify-content: space-between; }
.pairing-logo { font-size: 44px; }
.pairing-product { font: 500 24px/1 var(--font-text); color: var(--sage); }
.pairing-body { flex: 1; display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 120px; }
.pairing h1 { font: 700 64px/1.08 var(--font-display); letter-spacing: -.02em; margin: 0; max-width: 900px; text-wrap: balance; }
.pairing-steps { margin: 36px 0 0; padding: 0 0 0 1.3em; font: 400 30px/1.55 var(--font-text); color: rgba(255,255,255,.8); }
.pairing-steps b { color: #fff; font-weight: 600; }
.pairing-code-label { margin: 64px 0 18px; font: 500 24px/1 var(--font-text); color: var(--sage); }
.pairing-code { display: flex; gap: 14px; align-items: center; }
.pairing-code .ch {
  width: 118px; height: 150px; display: grid; place-items: center;
  font: 800 104px/1 var(--font-display); color: #fff;
  border-radius: 22px; background: rgba(255,255,255,.06); box-shadow: inset 0 0 0 2px rgba(252,175,23,.4);
}
.pairing-code .dash { width: 34px; height: 6px; border-radius: 3px; background: var(--sun); margin: 0 10px; }
.pairing-meta { margin: 34px 0 0; font: 400 24px/1.3 var(--font-text); color: rgba(255,255,255,.66); display: flex; align-items: center; gap: 18px; }
.pairing-meta .sep { width: 6px; height: 6px; border-radius: 50%; background: rgba(255,255,255,.35); }
.pairing-qr { margin: 0; text-align: center; }
.qr-frame { width: 400px; height: 400px; padding: 34px; border-radius: 36px; background: #f6f8f5; box-shadow: 0 50px 90px -40px rgba(0,0,0,.7); }
.qr-frame img { width: 100%; height: 100%; }
.pairing-qr figcaption { margin-top: 26px; font: 500 24px/1.3 var(--font-text); color: rgba(255,255,255,.72); }

/* Audio unlock hint */
.audio-hint { position: absolute; right: 40px; bottom: 34px; z-index: 11; font: 500 20px/1 var(--font-text); color: rgba(255,255,255,.7); padding: 12px 18px; border-radius: 999px; background: rgba(255,255,255,.08); }

/* Legibility wash between backdrop and copy */
.scenes::before { content: ''; position: absolute; inset: 0; opacity: 0; transition: opacity 1.2s var(--ease-io); pointer-events: none;
  background: linear-gradient(90deg, rgba(246,248,245,.94) 0%, rgba(246,248,245,.82) 38%, rgba(246,248,245,0) 68%); }
.stage[data-scene="feature"] .scenes::before,
.stage[data-scene="township"] .scenes::before,
.stage[data-scene="map"] .scenes::before { opacity: 1; }
.stage[data-scene="stats"] .scenes::before,
.stage[data-scene="people"] .scenes::before,
.stage[data-scene="timeline"] .scenes::before,
.stage[data-scene="pillars"] .scenes::before,
.stage[data-scene="cards"] .scenes::before { opacity: 1; background: linear-gradient(180deg, rgba(246,248,245,.9) 0%, rgba(246,248,245,.8) 55%, rgba(246,248,245,.62) 100%); }

/* Hero: the sphere over the section landscape */
.scene-hero .hero-cap { position: absolute; left: 150px; bottom: 120px; max-width: 760px; }
.scene-hero .hero-line { font: 700 52px/1.12 var(--font-display); letter-spacing: -.015em; color: var(--forest-900); margin: 0; text-wrap: balance; }
.stage[data-scene="hero"] .scenes::before { opacity: 1; background: linear-gradient(0deg, rgba(246,248,245,.92) 0%, rgba(246,248,245,.55) 28%, rgba(246,248,245,0) 50%); }
.stage[data-scene="hero"] .gl { z-index: 2; }
.stage[data-scene="hero"] .scenes::before { background: linear-gradient(0deg, rgba(246,248,245,.96) 0%, rgba(246,248,245,.7) 16%, rgba(246,248,245,0) 34%); }

/* ---------- Real photography ---------- */
.backdrop .bd .ph { position: absolute; inset: 0; background: center/cover no-repeat; }
.stage[data-photo="1"][data-tone="dark"] .tint { opacity: .8; background: linear-gradient(90deg, rgba(6,28,20,.96) 0%, rgba(8,38,27,.86) 45%, rgba(8,38,27,.55) 100%); }
.stage[data-photo="1"][data-scene="intro"] .scenes::before { opacity: 1; background: radial-gradient(70% 60% at 50% 50%, rgba(246,248,245,.86) 0%, rgba(246,248,245,.62) 55%, rgba(246,248,245,.25) 100%); }
.stage[data-photo="1"][data-scene="hero"] .scenes::before { background: linear-gradient(0deg, rgba(246,248,245,.95) 0%, rgba(246,248,245,.7) 18%, rgba(246,248,245,.08) 40%, rgba(246,248,245,0) 100%); }
.stage[data-photo="1"][data-scene="feature"] .scenes::before,
.stage[data-photo="1"][data-scene="map"] .scenes::before { background: linear-gradient(90deg, rgba(246,248,245,.96) 0%, rgba(246,248,245,.9) 40%, rgba(246,248,245,.2) 70%, rgba(246,248,245,0) 100%); }
.stage[data-photo="1"][data-scene="stats"] .scenes::before,
.stage[data-photo="1"][data-scene="people"] .scenes::before,
.stage[data-photo="1"][data-scene="timeline"] .scenes::before,
.stage[data-photo="1"][data-scene="pillars"] .scenes::before,
.stage[data-photo="1"][data-scene="cards"] .scenes::before,
.stage[data-photo="1"][data-scene="township"] .scenes::before { background: linear-gradient(90deg, rgba(246,248,245,.95) 0%, rgba(246,248,245,.9) 50%, rgba(246,248,245,.78) 100%); }

.person img.mono.photo { object-fit: cover; object-position: 50% 18%; background: #e6ebe7; padding: 0; }
.people .person img.mono.photo { width: 112px; height: 112px; }
.people.featured { grid-template-columns: repeat(2, 1fr); gap: 60px; margin-top: 90px; }
.people.featured .person { gap: 34px; }
.people.featured .person img.mono.photo { width: 260px; height: 260px; box-shadow: inset 0 0 0 4px var(--accent), 0 40px 60px -40px rgba(8,38,27,.6); }
.people.featured b { font-size: 40px; }
.people.featured span { font-size: 26px; max-width: 380px; }

.card.has-img { padding: 0 0 34px; overflow: hidden; }
.card.has-img > :not(.card-img) { margin-left: 32px; margin-right: 32px; }
.card .card-img { display: block; aspect-ratio: 16/9; background: center/cover no-repeat var(--forest-700); margin-bottom: 22px; }
.cards:has(.has-img) { gap: 26px; }

.plan.photo { border-radius: 40px; width: 820px; height: 640px; top: 210px; right: 110px; background: center/cover no-repeat; box-shadow: 0 60px 90px -50px rgba(8,38,27,.55); }
.plan.photo .plan-label { left: 32px; top: auto; bottom: 30px; transform: none; }
.plan.photo .plan-label:empty { display: none; }

.yt-host { position: absolute; inset: 0; }
.yt-host iframe { width: 100% !important; height: 100% !important; border: 0; pointer-events: none; }
.poster-wall .thumb { position: relative; }
.yt-tag { position: absolute; right: 10px; top: 10px; font: 700 15px/1 var(--font-text); color: #fff; background: #d71920; padding: 6px 9px; border-radius: 6px; }

.wordmark img { height: 1.6em; width: auto; }
.brand-tab .wordmark img { height: 92px; }
.pairing-logo .wordmark img { height: 96px; }
.scene-home .wordmark img { height: 230px; }

.brand-tab:has(img) { background: #fff; padding: 22px 44px 22px 48px; box-shadow: 0 20px 40px -24px rgba(0,0,0,.4); }

/* Image cards: one row, sized to the number of items */
.cards.with-img { grid-template-columns: repeat(var(--n), 1fr); gap: 22px; max-width: 1640px; margin-top: 60px; }
.cards.with-img .card { border-radius: 22px; padding-bottom: 26px; }
.cards.with-img .card > :not(.card-img) { margin-left: 22px; margin-right: 22px; }
.cards.with-img .card-img { aspect-ratio: var(--ar, 4/3); margin-bottom: 18px; }
.cards.with-img .card .meta { font-size: 17px; }
.cards.with-img .card b { font-size: 30px; margin-top: 8px; }
.cards.with-img .card span:not(.meta):not(.fig):not(.card-img) { font-size: 18px; margin-top: 8px; }
.cards.with-img .card .fig { font-size: 28px; margin-top: 14px; }
