/* ═══ G3M Home Experience — "The Institution" ═══
   This file is the canonical implementation (it has grown beyond the
   original mockup in design-exploration/05-homepage-immersive-experience.html).
   Loaded on the front page only. */
:root {
  --dim:   #475569;
  --deep:  #1e3a5f;
  --green: #34d399;
  --syne:  'Syne', sans-serif;
  --inter: 'Inter', sans-serif;
  --mono:  'Space Mono', monospace;
}
body.home { overflow-x: hidden; }

/* Scene links inherit their scene's colour, as in the approved mockup.
   :where() keeps zero specificity so .btn-c/.btn-g and any class-level
   colour still win; source order beats WP's a:where() global link rule. */
:where(#threshold, #index-strip, #statement, #atlas, #wings, #command, #ledger, #membership, #directory, #finale) a {
  color: inherit;
  text-decoration: none;
}

/* Keyboard focus — visible on a dark ground */
:where(#threshold, #index-strip, #wings, #command, #ledger, #membership, #directory, #finale) a:focus-visible,
.atlas-tip-go:focus-visible {
  outline: 1px solid var(--cyan); outline-offset: 3px; border-radius: 2px;
}

/* Generic reveal */
.rv { opacity: 0; transform: translateY(26px); transition: opacity .8s ease, transform .8s ease; }
.rv.on { opacity: 1; transform: none; }
.rv.d1 { transition-delay: .1s; } .rv.d2 { transition-delay: .22s; }
.rv.d3 { transition-delay: .34s; } .rv.d4 { transition-delay: .46s; }

/* Shared type helpers */
.eyebrow {
  font-family: var(--mono); font-size: 10px; letter-spacing: 3px;
  text-transform: uppercase; color: var(--deep);
}
#hx-progress { position: fixed; top: 64px; left: 0; height: 1px; width: 0; z-index: 901; background: linear-gradient(90deg, var(--cyan), var(--gold)); box-shadow: 0 0 8px rgba(0,255,247,.6); }
body.admin-bar #hx-progress { top: 96px; } /* nav shifts down 32px under the WP admin bar */
@media (max-width: 782px) { body.admin-bar #hx-progress { top: 110px; } } /* admin bar grows to 46px */

/* ── SCENE 1 · THE THRESHOLD ─────────────────────────────────── */
#threshold { position: relative; min-height: 100vh; min-height: 100svh; display: flex; align-items: center; overflow: hidden; }
#hero-canvas { position: absolute; top: 0; right: 0; bottom: 0; left: 0; width: 100%; height: 100%; }
.th-rings { position: absolute; right: 4%; top: 50%; width: 560px; height: 560px; transform: translateY(-50%); pointer-events: none; perspective: 900px; }
.th-ring { position: absolute; inset: 0; border-radius: 50%; border: 1px solid rgba(0,255,247,.10); animation: ringSpin 34s linear infinite; }
.th-ring:nth-child(2) { inset: 12%; border-color: rgba(201,185,122,.12); animation-duration: 26s; animation-direction: reverse; }
.th-ring:nth-child(3) { inset: 26%; border-color: rgba(0,255,247,.07); animation-duration: 44s; }
@keyframes ringSpin { from { transform: rotateX(66deg) rotateZ(0deg); } to { transform: rotateX(66deg) rotateZ(360deg); } }
.th-content { position: relative; z-index: 2; padding: 120px 7vw 80px; max-width: 860px; }
.th-ol { display: flex; align-items: center; gap: 14px; margin-bottom: 30px; opacity: 0; animation: fadeUp .9s .2s ease forwards; }
.th-ol-bar { width: 44px; height: 1px; background: var(--cyan); box-shadow: 0 0 10px rgba(0,255,247,.8); }
.th-ol-txt { font-family: var(--mono); font-size: 10px; letter-spacing: 3.5px; text-transform: uppercase; color: var(--muted); }
.th-title { margin: 0; }
.th-h1 { display: block; font-family: var(--syne); font-weight: 800; font-size: clamp(46px, 6.4vw, 88px); line-height: .93; letter-spacing: -2.5px; text-transform: uppercase; opacity: 0; transform: translateY(28px); animation: fadeUp .9s .45s ease forwards; }
.th-h1.cy { color: var(--cyan); text-shadow: 0 0 60px rgba(0,255,247,.35); animation-delay: .6s; }
.th-h1.dm { color: rgba(255,255,255,.09); animation-delay: .75s; margin-bottom: 30px; }
.th-body { max-width: 480px; color: var(--muted); font-size: 15px; line-height: 1.85; font-weight: 300; margin-bottom: 38px; opacity: 0; animation: fadeUp .9s .95s ease forwards; }
.th-cta { display: flex; gap: 18px; flex-wrap: wrap; opacity: 0; animation: fadeUp .9s 1.15s ease forwards; }
@keyframes fadeUp { to { opacity: 1; transform: none; } }
.th-cue { position: absolute; bottom: 34px; left: 7vw; display: flex; align-items: center; gap: 12px; z-index: 2; opacity: 0; animation: fadeUp 1s 1.7s ease forwards; }
.th-cue-line { width: 1px; height: 42px; background: linear-gradient(to bottom, transparent, var(--cyan)); animation: cuePulse 2s ease-in-out infinite; }
@keyframes cuePulse { 0%,100% { opacity: .3; } 50% { opacity: 1; } }
.th-cue-txt { font-family: var(--mono); font-size: 9px; letter-spacing: 3px; text-transform: uppercase; color: var(--dim); }
@media (max-width: 820px) {
  .th-rings { width: 320px; height: 320px; right: -25%; opacity: .6; }
  .th-content { padding: 110px 24px 70px; min-width: 0; width: 100%; }
  .th-h1 { font-size: clamp(34px, 9.6vw, 88px); letter-spacing: -1.5px; }
}

/* ── SCENE 2 · THE INDEX STRIP ───────────────────────────────── */
#index-strip { border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); background: var(--navy); overflow: hidden; position: relative; z-index: 2; }
.strip-row { display: flex; white-space: nowrap; padding: 14px 0; }
.strip-row.r1 { animation: mq 30s linear infinite; }
.strip-row.r2 { animation: mq 46s linear infinite reverse; border-top: 1px solid var(--border); }
.strip-row:hover { animation-play-state: paused; }
@keyframes mq { to { transform: translateX(-50%); } }
.strip-item { font-family: var(--syne); font-weight: 700; font-size: 15px; letter-spacing: 1px; text-transform: uppercase; color: var(--muted); padding: 0 26px; display: flex; align-items: center; gap: 26px; transition: color .2s; }
a.strip-item:hover { color: var(--cyan); }
.strip-dot { width: 4px; height: 4px; border-radius: 50%; background: var(--deep); }
.strip-data { font-family: var(--mono); font-size: 10px; letter-spacing: 2px; text-transform: uppercase; color: var(--deep); padding: 0 22px; display: flex; align-items: center; gap: 22px; }
.strip-data b { color: var(--cyan); font-weight: 400; }
.strip-data .gld { color: var(--gold); }

/* ── SCENE 3 · THE STATEMENT ─────────────────────────────────── */
#statement { position: relative; height: 320vh; }
.stmt-sticky { position: sticky; top: 0; height: 100vh; height: 100dvh; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.stmt-lines { padding: 0 7vw; max-width: 1100px; min-width: 0; }
@media (max-width: 380px) { .stmt-line { font-size: clamp(24px, 8.8vw, 34px); } }
.stmt-tag { font-family: var(--mono); font-size: 10px; letter-spacing: 3px; text-transform: uppercase; color: var(--deep); margin-bottom: 34px; }
.stmt-line { font-family: var(--syne); font-weight: 800; font-size: clamp(34px, 5vw, 68px); line-height: 1.08; letter-spacing: -1.5px; color: rgba(255,255,255,.07); transition: color .5s ease, text-shadow .5s ease; }
.stmt-line.lit { color: var(--white); }
.stmt-line.lit em { color: var(--cyan); font-style: normal; text-shadow: 0 0 44px rgba(0,255,247,.4); }
.stmt-line.lit .gld { color: var(--gold); }
.stmt-line em { font-style: normal; }

/* ── SCENE 9 · THE DIRECTORY ─────────────────────────────────── */
#directory { padding: 140px 7vw 120px; border-top: 1px solid var(--border); }
.dir-head { margin-bottom: 64px; max-width: 640px; }
.dir-title { font-family: var(--syne); font-weight: 800; font-size: clamp(30px, 4vw, 52px); letter-spacing: -1.5px; margin-top: 14px; }
.dir-title span { color: var(--cyan); }
.dir-sub { color: var(--muted); font-size: 14px; line-height: 1.8; margin-top: 14px; }
.dir-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 0 48px; max-width: 1200px; }
.dir-item { display: flex; align-items: baseline; gap: 16px; padding: 13px 4px; border-bottom: 1px solid var(--border); font-family: var(--mono); transition: background .2s, padding-left .2s; position: relative; }
.dir-item:hover { background: rgba(0,255,247,.025); padding-left: 12px; }
.dir-num { font-size: 9px; color: var(--deep); letter-spacing: 1px; min-width: 20px; }
.dir-name { font-family: var(--syne); font-weight: 700; font-size: 14px; color: #cbd5e1; }
.dir-cat { font-size: 8.5px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--deep); margin-left: auto; }
.dir-item:hover .dir-name { color: var(--cyan); }
.dir-foot { margin-top: 56px; font-family: var(--mono); font-size: 10.5px; letter-spacing: 2px; text-transform: uppercase; color: var(--dim); }
.dir-foot b { color: var(--gold); font-weight: 400; }
@media (max-width: 820px) { #directory { padding: 90px 24px 80px; } }

/* ── SCENE 10 · THE FINALE — Into the Mind ─────────────────────
   Pinned scroll journey; canvas drawn by home-mind.js.
   Reference: design-exploration/06-finale-into-the-mind.html */
#finale { position: relative; height: 340vh; }
/* entry/exit fade bands: melt the scene into the neighbouring sections
   instead of a hard edge (they replace the old border-top separator) */
#finale::before, #finale::after { content: ''; position: absolute; left: 0; right: 0; height: 22vh; z-index: 2; pointer-events: none; }
#finale::before { top: 0; background: linear-gradient(to bottom, var(--bg, #060a10), transparent); }
#finale::after { bottom: 0; background: linear-gradient(to top, var(--bg, #060a10), transparent); }
.mind-sticky { position: sticky; top: 0; height: 100vh; height: 100dvh; overflow: hidden;
  background: radial-gradient(120% 90% at 50% 115%, #0b2136 0%, #081422 38%, var(--bg, #060a10) 72%); }
.mind-sticky::before, .mind-sticky::after { content: ''; position: absolute; border-radius: 50%;
  filter: blur(100px); pointer-events: none; }
.mind-sticky::before { width: 55vw; height: 55vw; top: -18%; left: -12%; opacity: .11;
  background: radial-gradient(circle, var(--cyan), transparent 62%); animation: mindNeb1 30s ease-in-out infinite alternate; }
.mind-sticky::after { width: 46vw; height: 46vw; bottom: -14%; right: -10%; opacity: .10;
  background: radial-gradient(circle, var(--rose), transparent 62%); animation: mindNeb2 36s ease-in-out infinite alternate; }
@keyframes mindNeb1 { to { transform: translate(8vw, 5vh) scale(1.12); } }
@keyframes mindNeb2 { to { transform: translate(-7vw, -4vh) scale(.94); } }
#mind-canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.mind-cue { position: absolute; bottom: 4vh; left: 50%; transform: translateX(-50%); z-index: 6;
  font-family: var(--mono); font-size: 10px; letter-spacing: 2.5px; text-transform: uppercase;
  color: var(--muted); transition: opacity .5s; }
.mind-cue span { display: block; text-align: center; margin-top: 6px; animation: mindNudge 1.6s ease-in-out infinite; }
@keyframes mindNudge { 50% { transform: translateY(5px); } }
.mind-fin { position: absolute; inset: 0; z-index: 5; display: flex; align-items: center;
  justify-content: center; pointer-events: none; opacity: 0; }
.mind-glass { position: relative; overflow: hidden; text-align: center; padding: 44px 54px 40px;
  border-radius: 20px; max-width: min(860px, 92vw);
  background: linear-gradient(160deg, rgba(16,26,46,.34), rgba(16,26,46,.14));
  border: 1px solid rgba(255,255,255,.13);
  backdrop-filter: blur(6px) saturate(1.25); -webkit-backdrop-filter: blur(6px) saturate(1.25);
  box-shadow: 0 40px 110px rgba(0,0,0,.55), inset 0 1px 0 rgba(255,255,255,.16); }
.mind-glass::before { content: ''; position: absolute; inset: 0;
  background: linear-gradient(115deg, transparent 35%, rgba(255,255,255,.09) 48%, transparent 62%);
  background-size: 260% 100%; animation: mindSheen 9s ease-in-out infinite; }
@keyframes mindSheen { 0%, 55% { background-position: 120% 0; } 85%, 100% { background-position: -60% 0; } }
.mind-fin .fin-line { max-width: 720px; }
.mind-fin .btn-c { pointer-events: auto; }
.fin-line { font-family: var(--syne); font-weight: 800; font-size: clamp(26px, 3.6vw, 46px); letter-spacing: -1px; line-height: 1.25; max-width: 760px; }
.fin-line span { color: var(--cyan); }
.fin-sub { font-family: var(--mono); font-size: 11px; letter-spacing: 2.5px; text-transform: uppercase; color: var(--dim); margin: 26px 0 40px; }
@media (max-width: 820px) {
  #finale { height: 220vh; }
  .mind-glass { padding: 34px 22px 30px; }
}

/* ── SCENE 4 · THE ATLAS ─────────────────────────────────────── */
#atlas { position: relative; height: 170vh; background: radial-gradient(ellipse 70% 55% at 50% 42%, rgba(0,30,40,.45) 0%, transparent 70%); }
.atlas-sticky { position: sticky; top: 0; height: 100vh; height: 100dvh; overflow: hidden; }
#atlas-canvas { position: absolute; top: 0; right: 0; bottom: 0; left: 0; width: 100%; height: 100%; cursor: crosshair; }
.atlas-head { position: absolute; top: 96px; left: 0; right: 0; text-align: center; pointer-events: none; z-index: 2; }
.atlas-head .eyebrow { margin-bottom: 12px; color: var(--dim); }
.atlas-title { font-family: var(--syne); font-weight: 800; font-size: clamp(26px, 3.4vw, 44px); letter-spacing: -1px; }
.atlas-title span { color: var(--cyan); }
.atlas-sub { font-family: var(--mono); font-size: 10px; letter-spacing: 2px; text-transform: uppercase; color: var(--deep); margin-top: 10px; }
.atlas-tip {
  position: absolute; z-index: 3;
  background: rgba(8,12,20,.92); border: 1px solid rgba(0,255,247,.25);
  border-radius: 4px; padding: 14px 18px; min-width: 210px;
  opacity: 0; transform: translateY(6px); transition: opacity .2s, transform .2s;
  backdrop-filter: blur(12px);
}
.atlas-tip { pointer-events: none; } /* invisible tip must not block map hovers */
.atlas-tip.show { opacity: 1; transform: none; pointer-events: auto; }
.atlas-tip-name { font-family: var(--syne); font-weight: 700; font-size: 15px; margin-bottom: 4px; }
.atlas-tip-desc { font-family: var(--inter); font-size: 11px; color: var(--muted); line-height: 1.6; margin-bottom: 8px; }
.atlas-tip-go { font-family: var(--mono); font-size: 9px; letter-spacing: 2px; text-transform: uppercase; color: var(--cyan); }
.atlas-legend { position: absolute; bottom: 40px; left: 0; right: 0; text-align: center; z-index: 2; pointer-events: none; }
.atlas-legend p { font-family: var(--mono); font-size: 10px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--dim); }
.atlas-legend b { color: var(--gold); font-weight: 400; }
@media (max-width: 820px) {
  #atlas { height: 150vh; }
  .atlas-head { top: 84px; padding: 0 20px; }
}


/* ── SCENE 5 · THE WINGS (horizontal corridor) ───────────────── */
#wings { position: relative; height: 400vh; }
.wings-sticky { position: sticky; top: 0; height: 100vh; height: 100dvh; overflow: hidden; }
.wings-track { display: flex; height: 100%; will-change: transform; }
.wing { flex: 0 0 100vw; height: 100%; display: flex; align-items: center; padding: 100px 7vw 60px; position: relative; border-right: 1px solid var(--border); overflow: hidden; }
.wing-num { position: absolute; top: 96px; left: 7vw; font-family: var(--mono); font-size: 11px; letter-spacing: 3px; color: var(--deep); }
.wing-ghost { position: absolute; right: -2%; bottom: -4%; font-family: var(--syne); font-weight: 800; font-size: clamp(120px, 22vw, 300px); letter-spacing: -8px; color: rgba(255,255,255,.022); pointer-events: none; text-transform: uppercase; line-height: 1; }
.wing-inner { display: grid; grid-template-columns: 1fr 1.1fr; gap: 6vw; align-items: center; width: 100%; }
.wing-eyebrow { font-family: var(--mono); font-size: 10px; letter-spacing: 3px; text-transform: uppercase; margin-bottom: 18px; }
.wing-title { font-family: var(--syne); font-weight: 800; font-size: clamp(38px, 4.6vw, 64px); letter-spacing: -2px; line-height: 1; text-transform: uppercase; margin-bottom: 20px; }
.wing-desc { color: var(--muted); font-size: 14px; line-height: 1.9; max-width: 400px; margin-bottom: 28px; }
.wing-link { font-family: var(--mono); font-size: 11px; letter-spacing: 2px; text-transform: uppercase; }
.wing-doors { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.door {
  background: rgba(11,17,32,.6); border: 1px solid var(--border); border-radius: 6px;
  padding: 22px 24px; position: relative; overflow: hidden;
  transition: transform .3s ease, border-color .3s ease, background .3s ease;
}
.door:hover { transform: translateY(-4px); background: rgba(11,17,32,.95); }
.door-icon { font-size: 20px; margin-bottom: 12px; display: block; }
.door-name { font-family: var(--syne); font-weight: 700; font-size: 15px; margin-bottom: 5px; }
.door-desc { font-size: 11px; color: var(--dim); line-height: 1.65; }
.door-tag { position: absolute; top: 16px; right: 16px; font-family: var(--mono); font-size: 8px; letter-spacing: 1.5px; text-transform: uppercase; padding: 3px 8px; border-radius: 2px; }
/* wing accents */
.wing[data-w="commerce"] .wing-eyebrow, .wing[data-w="commerce"] .wing-link { color: var(--gold); }
.wing[data-w="commerce"] .door:hover { border-color: rgba(201,185,122,.45); }
.wing[data-w="play"] .wing-eyebrow, .wing[data-w="play"] .wing-link { color: var(--rose); }
.wing[data-w="play"] .door:hover { border-color: rgba(244,114,182,.45); }
.wing[data-w="work"] .wing-eyebrow, .wing[data-w="work"] .wing-link { color: var(--cyan); }
.wing[data-w="work"] .door:hover { border-color: rgba(0,255,247,.4); }
.wing[data-w="knowledge"] .wing-eyebrow, .wing[data-w="knowledge"] .wing-link { color: var(--green); }
.wing[data-w="knowledge"] .door:hover { border-color: rgba(52,211,153,.4); }
.door--soon { opacity: .75; }
.door--soon .door-tag { color: var(--gold); border: 1px solid rgba(201,185,122,.4); animation: soonPulse 2.4s ease-in-out infinite; }
@keyframes soonPulse { 0%,100% { opacity: .5; } 50% { opacity: 1; } }
.wings-progress { position: absolute; bottom: 34px; left: 50%; transform: translateX(-50%); display: flex; gap: 10px; z-index: 3; }
.wp-dot { width: 26px; height: 2px; background: var(--border); transition: background .3s; }
.wp-dot.on { background: var(--cyan); box-shadow: 0 0 8px rgba(0,255,247,.7); }
/* Mobile: corridor becomes a vertical journey with scroll-snap */
@media (max-width: 820px) {
  #wings { height: auto; }
  .wings-sticky { position: static; height: auto; overflow: visible; }
  .wings-track { display: block; transform: none !important; }
  .wing { flex: none; min-height: 100vh; min-height: 100svh; height: auto; padding: 90px 24px 60px; border-right: 0; border-bottom: 1px solid var(--border); }
  .wing-num { top: 76px; left: 24px; }
  .wing-inner { grid-template-columns: 1fr; gap: 34px; }
  .wing-inner > div { min-width: 0; } /* long titles must shrink the column, not blow it open */
  .wing-title { font-size: clamp(32px, 10vw, 56px); }
  .wing-doors { grid-template-columns: 1fr; }
  .wings-progress { display: none; }
}


@media (min-width: 821px) and (max-width: 1100px) {
  .wing-inner { gap: 4vw; }
  .wing-doors { gap: 10px; }
  .door { padding: 16px 18px; }
  .wing-title { font-size: clamp(32px, 4vw, 48px); }
}

/* ── SCENE 6 · THE COMMAND CENTRE ────────────────────────────── */
#command { position: relative; height: 300vh; }
.cmd-sticky { position: sticky; top: 0; height: 100vh; height: 100dvh; display: flex; align-items: center; overflow: hidden; }
.cmd-inner { display: grid; grid-template-columns: .8fr 1.2fr; gap: 5vw; width: 100%; padding: 90px 6vw 40px; align-items: center; }
.cmd-copy .eyebrow { color: var(--cyan); margin-bottom: 16px; }
.cmd-title { font-family: var(--syne); font-weight: 800; font-size: clamp(30px, 3.6vw, 50px); letter-spacing: -1.5px; line-height: 1.04; margin-bottom: 18px; }
.cmd-title span { color: var(--cyan); }
.cmd-desc { color: var(--muted); font-size: 14px; line-height: 1.9; max-width: 380px; margin-bottom: 24px; }
.cmd-steps { list-style: none; }
.cmd-steps li { font-family: var(--mono); font-size: 11px; letter-spacing: 1px; text-transform: uppercase; color: var(--deep); padding: 9px 0; border-bottom: 1px solid var(--border); transition: color .4s; }
.cmd-steps li.lit { color: var(--white); }
.cmd-steps li.lit::before { content: '● '; color: var(--cyan); }
/* dashboard frame */
.cmd-frame {
  background: rgba(8,12,20,.85); border: 1px solid var(--border); border-radius: 10px;
  overflow: hidden; box-shadow: 0 40px 90px rgba(0,0,0,.55);
}
.cmd-bar { display: flex; align-items: center; gap: 8px; padding: 12px 16px; border-bottom: 1px solid var(--border); background: rgba(11,17,32,.6); }
.cmd-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--border); }
.cmd-bar-title { font-family: var(--mono); font-size: 9px; letter-spacing: 2px; text-transform: uppercase; color: var(--dim); margin-left: 10px; }
.cmd-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; padding: 16px; }
.cmd-w {
  background: var(--card); border: 1px solid var(--border); border-radius: 6px; padding: 16px;
  opacity: 0; transform: translateY(18px) scale(.97); transition: opacity .55s ease, transform .55s ease;
}
.cmd-w.on { opacity: 1; transform: none; }
.cmd-w-label { font-family: var(--mono); font-size: 8px; letter-spacing: 2px; text-transform: uppercase; color: var(--deep); margin-bottom: 10px; }
.cmd-w-big { font-family: var(--syne); font-weight: 800; font-size: 26px; letter-spacing: -.5px; }
.cmd-w-big.cy { color: var(--cyan); } .cmd-w-big.gd { color: var(--gold); } .cmd-w-big.rs { color: var(--rose); }
.cmd-w-sub { font-family: var(--mono); font-size: 9px; color: var(--dim); margin-top: 5px; letter-spacing: 1px; }
.cmd-w--wide { grid-column: span 2; }
.cmd-w--full { grid-column: span 3; }
#cmd-spark { width: 100%; height: 56px; display: block; }
.cmd-ai-line { font-family: var(--mono); font-size: 10.5px; color: var(--muted); line-height: 1.8; min-height: 3.6em; }
.cmd-ai-line .cursor { display: inline-block; width: 7px; height: 12px; background: var(--cyan); vertical-align: -1px; animation: cuePulse 1s steps(2) infinite; }
.cmd-badges { display: flex; gap: 8px; flex-wrap: wrap; }
.cmd-badge { font-size: 15px; width: 34px; height: 34px; display: flex; align-items: center; justify-content: center; background: rgba(201,185,122,.08); border: 1px solid rgba(201,185,122,.25); border-radius: 6px; }

/* ── living dashboard ambience ── */
.cmd-w { position: relative; }
.cmd-tick {
  position: absolute; top: 10px; right: 12px; font-family: var(--mono); font-size: 10px;
  letter-spacing: 1px; opacity: 0; pointer-events: none;
  animation: cmdTick 1.6s ease-out forwards;
}
@keyframes cmdTick { 0% { opacity: 0; transform: translateY(6px); } 25% { opacity: .95; } 100% { opacity: 0; transform: translateY(-14px); } }
.cmd-frame { transition: transform .35s ease, box-shadow .35s ease; will-change: transform; }
.cmd-frame.live { animation: cmdBreath 6s ease-in-out infinite; }
@keyframes cmdBreath {
  0%, 100% { box-shadow: 0 40px 90px rgba(0,0,0,.55); }
  50%      { box-shadow: 0 40px 90px rgba(0,0,0,.55), 0 0 34px rgba(0,255,247,.10); }
}
.cmd-inner { perspective: 1200px; }
@media (prefers-reduced-motion: reduce) {
  .cmd-frame.live { animation: none; }
  .cmd-tick { animation: none; opacity: 0; }
}

@media (max-width: 820px) {
  #command { height: auto; }
  .cmd-sticky { position: static; height: auto; overflow: visible; }
  .cmd-inner { grid-template-columns: 1fr; gap: 30px; padding: 84px 20px 60px; align-content: center; }
  .cmd-desc { font-size: 13px; }
  .cmd-grid { grid-template-columns: repeat(2, 1fr); padding: 12px; gap: 10px; }
  .cmd-w--wide, .cmd-w--full { grid-column: span 2; }
  /* visual order: Loyalty·Chips / M3G·Achievements / Markets / AI — kills the
     stranded cells next to M3G and Achievements (mobile only; desktop order untouched) */
  .cmd-w[data-cw="0"] { order: 1; }
  .cmd-w[data-cw="1"] { order: 2; }
  .cmd-w[data-cw="2"] { order: 3; }
  .cmd-w[data-cw="4"] { order: 4; }
  .cmd-w[data-cw="3"] { order: 5; }
  .cmd-w[data-cw="5"] { order: 6; }
  .cmd-steps { display: none; }
}


/* ── SCENE 7 · THE LEDGER (three currencies) ─────────────────── */
#ledger { padding: 160px 7vw; border-top: 1px solid var(--border); position: relative; overflow: hidden; }
.ledger-head { text-align: center; margin-bottom: 80px; }
.ledger-title { font-family: var(--syne); font-weight: 800; font-size: clamp(28px, 3.6vw, 48px); letter-spacing: -1.5px; margin-top: 14px; }
.ledger-title span { color: var(--gold); }
.ledger-sub { color: var(--muted); font-size: 14px; margin-top: 14px; max-width: 460px; margin-inline: auto; line-height: 1.8; }
.coins { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; max-width: 1000px; margin: 0 auto; position: relative; }
.coins::before { content: ''; position: absolute; top: 70px; left: 15%; right: 15%; height: 1px; background: linear-gradient(90deg, transparent, var(--deep), transparent); }
.coin-col { text-align: center; position: relative; }
.coin { width: 140px; height: 140px; margin: 0 auto 26px; perspective: 700px; }
.coin-face {
  width: 100%; height: 100%; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-family: var(--syne); font-weight: 800; font-size: 44px;
  transform-style: preserve-3d; animation: coinSpin 7s ease-in-out infinite;
  border: 1px solid; position: relative;
}
@keyframes coinSpin { 0%, 100% { transform: rotateY(-16deg) rotateX(6deg); } 50% { transform: rotateY(16deg) rotateX(-6deg); } }
.coin-col:nth-child(2) .coin-face { animation-delay: 1.2s; }
.coin-col:nth-child(3) .coin-face { animation-delay: 2.4s; }
.coin-face::after { content: ''; position: absolute; inset: 10px; border-radius: 50%; border: 1px dashed; opacity: .3; }
.coin--lp .coin-face { color: var(--gold); border-color: rgba(201,185,122,.5); background: radial-gradient(circle at 35% 30%, rgba(201,185,122,.16), rgba(201,185,122,.02)); box-shadow: 0 0 60px rgba(201,185,122,.13); }
.coin--chip .coin-face { color: var(--cyan); border-color: rgba(0,255,247,.4); background: radial-gradient(circle at 35% 30%, rgba(0,255,247,.13), rgba(0,255,247,.02)); box-shadow: 0 0 60px rgba(0,255,247,.10); }
.coin--m3g .coin-face { color: var(--rose); border-color: rgba(244,114,182,.4); background: radial-gradient(circle at 35% 30%, rgba(244,114,182,.13), rgba(244,114,182,.02)); box-shadow: 0 0 60px rgba(244,114,182,.10); }
.coin-name { font-family: var(--syne); font-weight: 700; font-size: 17px; margin-bottom: 8px; }
.coin-how { font-family: var(--mono); font-size: 10px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--dim); line-height: 2; }
.coin-how b { font-weight: 400; }
.coin--lp .coin-how b { color: var(--gold); } .coin--chip .coin-how b { color: var(--cyan); } .coin--m3g .coin-how b { color: var(--rose); }
@media (max-width: 820px) {
  #ledger { padding: 100px 24px; }
  .coins { grid-template-columns: 1fr; gap: 56px; }
  .coins::before { display: none; }
}


/* ── SCENE 8 · THE MEMBERSHIP ────────────────────────────────── */
#membership { padding: 160px 7vw; border-top: 1px solid var(--border); display: grid; grid-template-columns: 1fr 1fr; gap: 6vw; align-items: center; position: relative; overflow: hidden; }
.mb-copy .eyebrow { color: var(--gold); margin-bottom: 16px; }
.mb-title { font-family: var(--syne); font-weight: 800; font-size: clamp(34px, 4.4vw, 60px); letter-spacing: -2px; line-height: 1; margin-bottom: 22px; }
.mb-title span { color: var(--gold); }
.mb-desc { color: var(--muted); font-size: 14.5px; line-height: 1.9; max-width: 430px; margin-bottom: 26px; }
.mb-count { font-family: var(--mono); font-size: 11px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--dim); margin-bottom: 34px; }
.mb-count b { color: var(--white); font-weight: 400; }
.mb-cta { display: flex; gap: 16px; flex-wrap: wrap; }
/* the card — Hero Moment 5 */
.mb-card-zone { perspective: 1200px; display: flex; justify-content: center; }
.mb-card {
  width: min(430px, 88vw); aspect-ratio: 1.586; border-radius: 16px; position: relative;
  background: linear-gradient(135deg, #0d1424 0%, #080c14 55%, #0e1626 100%);
  border: 1px solid rgba(201,185,122,.35);
  box-shadow: 0 50px 100px rgba(0,0,0,.6), 0 0 80px rgba(201,185,122,.06);
  transform: rotateY(-12deg) rotateX(6deg);
  transition: transform .5s ease;
  overflow: hidden;
}
.mb-card:hover { transform: rotateY(0deg) rotateX(0deg); }
.mb-card::before { /* holographic sheen */
  content: ''; position: absolute; inset: -60%;
  background: linear-gradient(115deg, transparent 42%, rgba(0,255,247,.10) 48%, rgba(201,185,122,.16) 52%, transparent 58%);
  animation: sheen 5.5s ease-in-out infinite;
}
@keyframes sheen { 0%, 100% { transform: translateX(-38%); } 50% { transform: translateX(38%); } }
.mb-card-mu { position: absolute; right: 22px; bottom: 4px; font-family: var(--syne); font-weight: 800; font-size: 110px; color: transparent; -webkit-text-stroke: 1px rgba(201,185,122,.3); line-height: 1; }
.mb-card-top { position: absolute; top: 26px; left: 28px; }
.mb-card-brand { font-family: var(--syne); font-weight: 800; font-size: 18px; letter-spacing: 1px; }
.mb-card-brand span { color: var(--cyan); }
.mb-card-tier { font-family: var(--mono); font-size: 9px; letter-spacing: 3px; text-transform: uppercase; color: var(--gold); margin-top: 5px; }
.mb-card-no { position: absolute; left: 28px; bottom: 56px; font-family: var(--mono); font-size: 14px; letter-spacing: 4px; color: rgba(255,255,255,.7); }
.mb-card-holder { position: absolute; left: 28px; bottom: 26px; font-family: var(--mono); font-size: 9px; letter-spacing: 2px; text-transform: uppercase; color: var(--dim); }
@supports not (aspect-ratio: 1) { .mb-card { height: 270px; } }
.mb-perks { margin-top: 30px; display: grid; gap: 10px; }
.mb-perk { display: flex; gap: 12px; align-items: baseline; font-size: 12.5px; color: var(--muted); }
.mb-perk::before { content: '—'; color: var(--gold); }
@media (max-width: 820px) {
  #membership { grid-template-columns: 1fr; padding: 100px 24px; gap: 60px; }
  .mb-card { transform: rotateY(-6deg) rotateX(3deg); }
}


/* ── SHORT VIEWPORTS (landscape phones etc.) ─────────────────── */
@media (max-height: 520px) {
  .th-content { padding-top: 88px; }
  .th-h1 { font-size: clamp(28px, 7vh, 56px); }
  .th-cue { display: none; }
  .atlas-head { top: 70px; }
  .stmt-line { font-size: clamp(20px, 7vh, 40px); }
  .wing { padding-top: 84px; }
  .wing-num { top: 72px; }
  .cmd-inner { padding-top: 76px; }
}

/* ── REDUCED MOTION ──────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .strip-row { animation: none; }
  #hero-canvas, #atlas-canvas { display: none; }
  .rv, .cmd-w { opacity: 1; transform: none; }
  .stmt-line { color: var(--white); }
  #statement, #atlas, #wings, #command, #finale { height: auto; }
  .stmt-sticky, .atlas-sticky, .wings-sticky, .cmd-sticky { position: static; height: auto; }
  .mind-sticky { position: static; height: 100vh; }
  .wings-track { display: block; transform: none !important; }
  .wing { flex: none; min-height: auto; padding: 70px 7vw; }
  /* static layout for elements the animated scenes position absolutely */
  .atlas-sticky { padding: 90px 24px 40px; }
  .atlas-head, .atlas-legend { position: static; margin: 0 auto 20px; }
  .atlas-sub, .atlas-tip, .wings-progress { display: none; }
  .wing-num { position: static; display: block; margin-bottom: 18px; }
  .th-cue { display: none; }
  .mind-cue { display: none; }
  .mind-fin { opacity: 1; }
  .mind-sticky::before, .mind-sticky::after { animation: none; }
  .mind-glass::before { animation: none; }
}

