/* Landing page (index.html). Shared tokens live in site.css. */

/* ================= HERO ================= */
.hero {
  position: relative;
  min-height: max(680px, 100svh);
  display: flex; flex-direction: column;
  overflow: hidden;
  isolation: isolate;
}
#orrery {
  position: absolute; inset: 0; width: 100%; height: 100%;
  z-index: -2; cursor: grab; touch-action: pan-y;
}
#orrery.dragging { cursor: grabbing; }
.hero-shade {
  position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    linear-gradient(90deg, rgba(7, 10, 20, 0.92) 0%, rgba(7, 10, 20, 0.66) 34%, rgba(7, 10, 20, 0) 62%),
    linear-gradient(0deg, var(--space-black) 0%, rgba(7, 10, 20, 0) 26%);
}
.hero-inner { flex: 1; display: flex; align-items: center; padding-top: calc(var(--nav-h) + 40px); padding-bottom: 40px; pointer-events: none; }
.hero-copy { max-width: 640px; pointer-events: auto; }
.hero h1 { font-size: clamp(2.6rem, 6.4vw, 5.2rem); white-space: nowrap; font-weight: 800; line-height: 0.98; letter-spacing: -0.02em; margin-bottom: 22px; }
.hero .lede { margin: 0 0 30px; color: #B6C2D3; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-bottom: 30px; }
.hero-facts { display: flex; flex-wrap: wrap; gap: 8px 22px; list-style: none; padding: 0; margin: 0; font-family: var(--mono); font-size: 0.74rem; letter-spacing: 0.08em; color: var(--text-2); text-transform: uppercase; }
.hero-facts li { display: inline-flex; align-items: center; gap: 8px; }
.hero-facts li::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 8px var(--cyan); }

.hero-foot { position: relative; z-index: 1; }
.hero-foot-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 24px; padding-bottom: 16px; }
.legend { display: flex; flex-wrap: wrap; gap: 6px; }
.legend button {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--mono); font-size: 0.66rem; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--text-2); background: rgba(13, 21, 38, 0.66);
  border: 1px solid rgba(148, 163, 184, 0.16); border-radius: 999px;
  padding: 6px 11px 6px 9px; cursor: pointer;
  transition: border-color .2s, color .2s, background .2s;
}
.legend button i { width: 8px; height: 8px; border-radius: 50%; background: var(--c); box-shadow: 0 0 8px var(--c); }
.legend button:hover { color: var(--text); border-color: var(--c); }
.legend button[aria-pressed="true"] { color: var(--text); border-color: var(--c); background: color-mix(in srgb, var(--c) 14%, rgba(13, 21, 38, 0.8)); }
.orrery-note { margin: 0; font-size: 0.66rem; letter-spacing: 0.1em; color: var(--text-3); text-transform: uppercase; }

.ticker { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: rgba(7, 10, 20, 0.7); overflow: hidden; white-space: nowrap; }
.ticker-track { display: inline-flex; gap: 42px; padding: 10px 0; animation: tick 400s linear infinite; font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.1em; color: var(--text-3); }
.ticker-track span b { color: var(--c, var(--text-2)); font-weight: 700; margin-right: 8px; }
@keyframes tick { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .ticker-track { animation: none; } }

/* Locked-target HUD tag that follows a satellite in the orrery */
.target-tag {
  position: absolute; z-index: 2; left: 0; top: 0;
  min-width: 210px; padding: 12px 14px 11px 16px;
  border-color: rgba(0, 229, 255, 0.35);
  border-left: 3px solid var(--gold);
  border-radius: 10px;
  font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.06em;
  pointer-events: none;
  transition: opacity .35s;
  will-change: transform;
}
.target-tag.fade { opacity: 0; }
.tt-head { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.tt-name { font-family: var(--sans); font-weight: 800; font-size: 1.25rem; letter-spacing: 0; color: #fff; }
.tt-chip { font-size: 0.6rem; letter-spacing: 0.12em; text-transform: uppercase; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--c, var(--text-2)); color: var(--c, var(--text-2)); }
.tt-row { display: flex; gap: 8px; color: var(--text-3); }
.tt-row b { color: var(--cyan); font-weight: 400; margin-right: 10px; }
.tt-row.dim { color: var(--text-2); margin-top: 2px; }

@media (max-width: 820px) {
  .hero-shade { background: linear-gradient(0deg, var(--space-black) 0%, rgba(7, 10, 20, 0.86) 40%, rgba(7, 10, 20, 0.25) 75%, rgba(7, 10, 20, 0.5) 100%); }
  .hero-inner { align-items: flex-end; padding-top: 46vh; }
  .hero h1 { white-space: normal; }
  .target-tag { min-width: 0; padding: 9px 11px; }
  .tt-name { font-size: 1.02rem; }
  .orrery-note { display: none; }
}

/* ================= PHONES ================= */
.phone {
  position: relative;
  aspect-ratio: 9 / 16;
  border-radius: 26px;
  padding: 6px;
  background: linear-gradient(160deg, #1b2740, #0a101d 60%);
  border: 1px solid rgba(0, 229, 255, 0.28);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.6) inset, 0 30px 70px rgba(0, 0, 0, 0.55), 0 0 60px rgba(0, 229, 255, 0.08);
}
.phone video { position: absolute; inset: 6px; width: calc(100% - 12px); height: calc(100% - 12px); object-fit: cover; object-position: top; border-radius: 21px; background: #050810; }
.phone-sm { width: min(230px, 62vw); }

/* ================= HOW IT PLAYS (scrollytelling) ================= */
.loop { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 0.9fr); gap: clamp(30px, 6vw, 90px); }
.steps { list-style: none; margin: 0; padding: 0; }
.step { min-height: 72vh; display: flex; flex-direction: column; justify-content: center; padding: 30px 0 30px 28px; border-left: 1px solid var(--grid-line); position: relative; opacity: 0.38; transition: opacity .5s; }
.step::before { content: ""; position: absolute; left: -5px; top: 50%; width: 9px; height: 9px; border-radius: 50%; background: var(--space-black); border: 1.5px solid var(--text-3); transition: border-color .4s, box-shadow .4s, background .4s; }
.step.active { opacity: 1; }
.step.active::before { border-color: var(--cyan); background: var(--cyan); box-shadow: 0 0 14px var(--cyan); }
.step-n { font-size: 0.74rem; letter-spacing: 0.22em; color: var(--cyan); margin-bottom: 12px; text-transform: uppercase; }
.step h3 { font-size: clamp(1.7rem, 3.4vw, 2.6rem); font-weight: 800; margin-bottom: 14px; }
.step p { color: var(--text-2); margin: 0; max-width: 48ch; font-size: 1.05rem; }
.phone-inline { display: none; }
.loop-stage { position: sticky; top: calc(var(--nav-h) + 4vh); height: calc(100vh - var(--nav-h) - 8vh); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; }
.phone-stage { height: min(78vh, 680px); width: auto; aspect-ratio: 9 / 16; }
.phone-stage video { transition: opacity .3s; }
.phone-stage video.swap { opacity: 0; }
.stage-caption { font-size: 0.7rem; letter-spacing: 0.22em; color: var(--text-3); text-transform: uppercase; }
.loop-stage::before {
  content: ""; position: absolute; width: 120%; aspect-ratio: 1; z-index: -1; border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 229, 255, 0.12), rgba(168, 85, 247, 0.06) 40%, transparent 68%);
}
@media (max-width: 900px) {
  .loop { grid-template-columns: 1fr; }
  .loop-stage { display: none; }
  .step { min-height: 0; opacity: 1; padding: 34px 0 34px 24px; }
  .phone-inline { display: block; width: min(250px, 66vw); margin-top: 26px; }
}

/* ================= GAMBIT ================= */
.gambit { overflow: hidden; }
.gambit-glow { position: absolute; inset: 0; pointer-events: none; z-index: -1;
  background: radial-gradient(60% 50% at 80% 20%, rgba(249, 115, 22, 0.12), transparent 70%), radial-gradient(50% 40% at 10% 80%, rgba(244, 63, 94, 0.08), transparent 70%); }
.gambit .ruler .idx { color: var(--orange); }
.phases { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.phase { display: flex; flex-direction: column; gap: 10px; }
.phase-time { display: flex; align-items: center; gap: 10px; font-size: 0.72rem; letter-spacing: 0.16em; color: var(--orange); text-transform: uppercase; margin-bottom: 8px; }
.phase-time i { flex: 1; height: 1px; background: linear-gradient(90deg, rgba(249, 115, 22, 0.6), rgba(249, 115, 22, 0.05)); position: relative; }
.phase-time i::after { content: ""; position: absolute; right: 0; top: -3px; width: 7px; height: 7px; border-top: 1px solid rgba(249, 115, 22, 0.6); border-right: 1px solid rgba(249, 115, 22, 0.6); transform: rotate(45deg); }
.phase h3 { font-size: 2rem; font-weight: 800; }
.phase p { color: var(--text-2); margin: 0 0 14px; flex: 1; }
.phase .phone { border-color: rgba(249, 115, 22, 0.3); box-shadow: 0 30px 70px rgba(0, 0, 0, 0.55), 0 0 60px rgba(249, 115, 22, 0.08); }
@media (max-width: 900px) { .phases { grid-template-columns: 1fr; gap: 54px; } .phase .phone { margin: 0 auto; } }

/* ================= A LIVING SKY ================= */
.living-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.living-card { padding: 28px 26px 26px; display: flex; flex-direction: column; gap: 10px; }
.living-art { width: 88px; height: 88px; margin-bottom: 8px; filter: drop-shadow(0 8px 24px rgba(0, 229, 255, 0.18)); }
.living-art img { width: 100%; height: 100%; }
.living-card h3 { font-size: 1.3rem; }
.living-card p { color: var(--text-2); margin: 0; }
@media (max-width: 900px) { .living-grid { grid-template-columns: 1fr; } }

/* ================= LEARN ================= */
.learn .ruler .idx { color: var(--purple); }
.learn-grid { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: clamp(30px, 5vw, 70px); align-items: center; margin-bottom: 60px; }
.codex-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.codex { margin: 0; border-radius: 14px; overflow: hidden; border: 1px solid var(--line); box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45); transition: transform .4s cubic-bezier(.2, .7, .2, 1), border-color .3s; }
.codex:nth-child(2) { transform: translateY(28px); }
.codex:hover { transform: translateY(-6px); border-color: var(--line-strong); }
.codex:nth-child(2):hover { transform: translateY(20px); }
.codex img { width: 100%; height: auto; }
@media (max-width: 900px) {
  .learn-grid { grid-template-columns: 1fr; }
  .codex-cards { grid-template-columns: repeat(3, 72%); overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 12px; margin: 0 calc(-1 * var(--gutter)); padding-left: var(--gutter); padding-right: var(--gutter); }
  .codex { scroll-snap-align: center; }
  .codex:nth-child(2), .codex:nth-child(2):hover { transform: none; }
}

.npcs { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(20px, 4vw, 50px); padding: clamp(22px, 4vw, 40px); border-color: rgba(245, 158, 11, 0.22); }
.npcs.brackets::before, .npcs.brackets::after { border-color: var(--gold); }
.npcs h3 { font-size: clamp(1.5rem, 2.6vw, 2rem); font-weight: 800; margin-bottom: 12px; }
.npcs p { color: var(--text-2); margin: 0; }
.npc-names { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 7px; align-content: center; }
.npc-names li { font-size: 0.74rem; letter-spacing: 0.04em; color: #B4BCCB; padding: 6px 10px; border-radius: 7px; border: 1px solid rgba(139, 149, 167, 0.32); background: rgba(139, 149, 167, 0.06); }
.npc-names li.more { color: var(--gold); border-color: rgba(245, 158, 11, 0.35); background: transparent; }
@media (max-width: 900px) { .npcs { grid-template-columns: 1fr; } }

/* ================= ALLIANCES / KESSLER (full-width feature splits) ================= */
.alliances, .kessler { overflow: hidden; }
.alliance-glow, .kessler-glow { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.alliance-glow { background: radial-gradient(50% 60% at 78% 50%, rgba(59, 130, 246, 0.14), transparent 70%), radial-gradient(40% 50% at 10% 20%, rgba(0, 229, 255, 0.06), transparent 70%); }
.kessler-glow { background: radial-gradient(50% 60% at 22% 50%, rgba(249, 115, 22, 0.13), transparent 70%), radial-gradient(40% 50% at 90% 80%, rgba(244, 63, 94, 0.07), transparent 70%); }
.alliances .ruler .idx { color: var(--blue); }
.kessler .ruler .idx { color: var(--orange); }
.feature-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 0.9fr); gap: clamp(30px, 6vw, 90px); align-items: center; }
.feature-split.flip { grid-template-columns: minmax(0, 0.9fr) minmax(0, 1fr); }
.feature-copy .section-head { margin-bottom: 30px; }
.feature-copy .lede + .lede { margin-top: -6px; }
.feature-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.feature-list li { display: grid; grid-template-columns: 46px minmax(0, 1fr); gap: 16px; align-items: start; padding: 16px 18px; border-radius: 14px; background: rgba(13, 21, 38, 0.6); border: 1px solid rgba(59, 130, 246, 0.2); }
.feature-list i { width: 46px; height: 46px; border-radius: 12px; position: relative; background: rgba(59, 130, 246, 0.12); border: 1px solid rgba(59, 130, 246, 0.35); }
.feature-list i::after { content: ""; position: absolute; inset: 11px; background: #7FB0FF; -webkit-mask: var(--m) center / contain no-repeat; mask: var(--m) center / contain no-repeat; }
.feature-list b { display: block; font-size: 1.08rem; margin-bottom: 2px; }
.feature-list span { color: var(--text-2); font-size: 0.97rem; }
.feature-phones { position: relative; height: clamp(460px, 52vw, 620px); }
.feature-phones .phone { position: absolute; height: 88%; width: auto; }
.feature-phones .phone-a { left: 6%; top: 0; z-index: 2; }
.feature-phones .phone-b { right: 6%; bottom: 0; transform: rotate(4deg); opacity: 0.92; }
.alliances .phone { border-color: rgba(59, 130, 246, 0.4); box-shadow: 0 30px 70px rgba(0, 0, 0, 0.55), 0 0 70px rgba(59, 130, 246, 0.14); }
.kessler .phone { border-color: rgba(249, 115, 22, 0.35); box-shadow: 0 30px 70px rgba(0, 0, 0, 0.55), 0 0 70px rgba(249, 115, 22, 0.12); }
.kessler .phone-b { transform: rotate(-4deg); }
@media (max-width: 900px) {
  .feature-split, .feature-split.flip { grid-template-columns: 1fr; }
  .feature-split.flip .feature-phones { order: 2; }
  .feature-phones { height: clamp(380px, 110vw, 520px); }
}

/* ================= VIDEOS ================= */
.watch .socials { margin-bottom: 26px; }
.reels { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.reel {
  position: relative; display: block; padding: 0; margin: 0; cursor: pointer;
  aspect-ratio: 9 / 16; border-radius: 16px; overflow: hidden;
  border: 1px solid var(--line); background: #050810; color: inherit; font: inherit; text-align: left;
  transition: transform .35s cubic-bezier(.2, .7, .2, 1), border-color .3s;
}
.reel:hover { transform: translateY(-4px); border-color: var(--line-strong); }
.reel img, .reel video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.reel-play { position: absolute; top: 50%; left: 50%; width: 62px; height: 62px; margin: -31px 0 0 -31px; border-radius: 50%; border: 1.5px solid rgba(255, 255, 255, 0.7); background: rgba(7, 10, 20, 0.45); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); transition: transform .3s, opacity .3s; }
.reel-play::after { content: ""; position: absolute; left: 25px; top: 20px; border-left: 16px solid #fff; border-top: 11px solid transparent; border-bottom: 11px solid transparent; }
.reel:hover .reel-play { transform: scale(1.08); }
.reel.playing .reel-play { opacity: 0; }
.reels-note { margin: 14px 0 0; font-size: 0.66rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-3); }
@media (max-width: 900px) {
  .reels { grid-template-columns: repeat(4, 64%); overflow-x: auto; scroll-snap-type: x mandatory; margin: 0 calc(-1 * var(--gutter)); padding: 0 var(--gutter) 12px; }
  .reel { scroll-snap-align: center; }
}

/* ================= FLIGHT LOG + DOWNLOAD ================= */
.launch { padding-top: 40px; }
.log-teaser {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: clamp(16px, 3vw, 30px);
  padding: clamp(20px, 3vw, 28px) clamp(20px, 3.4vw, 34px); text-decoration: none; color: inherit;
  border-color: rgba(245, 158, 11, 0.28); margin-bottom: clamp(90px, 12vw, 150px);
  transition: border-color .3s, transform .3s;
}
.log-teaser:hover { border-color: rgba(245, 158, 11, 0.65); transform: translateY(-2px); }
.log-mark { width: 52px; height: 52px; border-radius: 14px; position: relative; background: rgba(245, 158, 11, 0.1); border: 1px solid rgba(245, 158, 11, 0.4); }
.log-mark::after { content: ""; position: absolute; inset: 12px; background: var(--gold); -webkit-mask: url(/assets/icons/history.svg) center / contain no-repeat; mask: url(/assets/icons/history.svg) center / contain no-repeat; }
.log-body { display: grid; gap: 4px; }
.log-body .kicker { margin: 0 0 4px; }
.log-body b { font-size: 1.3rem; }
.log-body > span:last-child { color: var(--text-2); }
.log-arrow { font-size: 1.8rem; color: var(--gold); transition: transform .3s; }
.log-teaser:hover .log-arrow { transform: translateX(6px); }
@media (max-width: 640px) { .log-teaser { grid-template-columns: auto 1fr; } .log-arrow { display: none; } }

.final { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 40px; align-items: center; }
.final h2 { font-size: clamp(2.6rem, 7vw, 5rem); margin-bottom: 18px; }
.final .lede { margin: 0 0 28px; }
.qr { padding: 22px; text-align: center; }
.qr-code { background: #E2E8F0; padding: 14px; border-radius: 10px; }
.qr-code img { width: 168px; height: 168px; }
.qr p { margin: 14px 0 0; font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-2); }
.qr p .url { color: var(--cyan); }
@media (max-width: 760px) { .final { grid-template-columns: 1fr; } .qr { display: none; } }
@media (hover: none) and (pointer: coarse) { .qr { display: none; } .final { grid-template-columns: 1fr; } }
