@font-face {
  font-family: "DM Sans";
  src: url("./assets/fonts/dm-sans-0.ttf") format("truetype");
  font-weight: 400 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "DM Sans";
  src: url("./assets/fonts/dm-sans-3.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Bricolage Grotesque";
  src: url("./assets/fonts/bricolage-grotesque-latin.woff2") format("woff2");
  font-weight: 600 800;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light;
  --bg: #f4f7ff;
  --surface: #ffffff;
  --surface-tint: #e8eeff;
  --ink: #0f172a;
  --muted: #475569;
  --border: #d0dcf7;
  --cobalt: #2563eb;
  --cobalt-deep: #1d4ed8;
  --lime: #84cc16;
  --lime-ink: #1a2e05;
  --orange: #f97316;
  --orange-deep: #c2410c;
  --cosmic-bg: #08131d;
  --cosmic-surface: #102232;
  --cosmic-surface-2: #173147;
  --cosmic-border: #254c6b;
  --cosmic-ink: #f0fdf4;
  --cosmic-muted: #9bc0d6;
  --cosmic-mint: #2dd4bf;
  --cosmic-amber: #f59e0b;
  --cosmic-violet: #c084fc;
  --shadow-soft: 0 18px 40px -16px rgba(15, 23, 42, 0.14);
  --shadow-elevated: 0 22px 48px -18px rgba(15, 23, 42, 0.24);
  --shadow-phone: 0 32px 64px -20px rgba(15, 23, 42, 0.32);
  --radius: 16px;
  --radius-sm: 12px;
  --font-display: "Bricolage Grotesque", sans-serif;
  --font-body: "DM Sans", sans-serif;
  accent-color: var(--cobalt);
  scrollbar-color: #93b4f5 #e8eeff;
}

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

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  margin: 0;
  background-color: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

::selection {
  background: var(--cobalt);
  color: #ffffff;
}

a {
  color: inherit;
  text-decoration: none;
  text-underline-offset: 0.2em;
}

a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--cobalt);
  outline-offset: 3px;
}

.cosmic-band a:focus-visible,
.cosmic-band button:focus-visible {
  outline-color: var(--cosmic-mint);
}

button {
  font-family: inherit;
  cursor: pointer;
  border: 0;
  background: none;
  color: inherit;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

.num {
  font-family: var(--font-display);
  font-variant-numeric: tabular-nums;
}

.container {
  width: min(1160px, 100% - 2.5rem);
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--cobalt);
  color: #ffffff;
  padding: 0.75rem 1.25rem;
  font-weight: 700;
  z-index: 100;
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
  border-radius: 10px;
}

/* ===== HEADER ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(244, 247, 255, 0.92);
  border-bottom: 1px solid var(--border);
}

@supports (backdrop-filter: blur(12px)) {
  .site-header {
    background: rgba(244, 247, 255, 0.84);
    backdrop-filter: blur(12px);
  }
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  padding-block: 0.85rem;
}

.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: -0.025em;
  color: var(--ink);
}

.brand-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  box-shadow: 0 6px 14px -4px rgba(15, 23, 42, 0.22);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.75rem;
}

.nav-links a {
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--muted);
  transition: color 0.15s ease;
}

.nav-links a:hover {
  color: var(--cobalt);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 0.82rem 1.35rem;
  border-radius: var(--radius-sm);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
  line-height: 1.1;
  transition: transform 0.14s ease, background-color 0.15s ease, box-shadow 0.15s ease;
  user-select: none;
}

.btn svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.btn-primary {
  background: var(--cobalt);
  color: #ffffff;
  box-shadow: 0 10px 22px -10px rgba(15, 23, 42, 0.32);
}

.btn-primary:hover {
  background: var(--cobalt-deep);
}

.btn-lime {
  background: var(--lime);
  color: var(--lime-ink);
  box-shadow: 0 10px 22px -10px rgba(15, 23, 42, 0.22);
}

.btn-lime:hover {
  background: #76ba11;
}

.btn-secondary {
  background: var(--surface);
  color: var(--ink);
  border: 1.5px solid var(--border);
}

.btn-secondary:hover {
  border-color: var(--cobalt);
  color: var(--cobalt-deep);
}

.btn-cosmic {
  background: var(--cosmic-mint);
  color: #062024;
  box-shadow: 0 12px 24px -10px rgba(2, 6, 14, 0.55);
}

.btn-cosmic:hover {
  background: #22c3ae;
}

@media (prefers-reduced-motion: no-preference) {
  .btn:hover {
    transform: translateY(-1px);
  }
  .btn:active {
    transform: translateY(1px);
  }
}

.btn-sm {
  padding: 0.62rem 1rem;
  font-size: 0.875rem;
}

/* ===== HERO ===== */
.hero {
  padding-block: clamp(3rem, 6vw, 5.5rem) clamp(3.5rem, 6vw, 5rem);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}

.hero-copy h1 {
  font-family: var(--font-display);
  font-size: clamp(2.55rem, 5.2vw, 4.2rem);
  line-height: 1.04;
  letter-spacing: -0.03em;
  text-wrap: balance;
  margin: 0 0 1.25rem;
  color: var(--ink);
}

.hero-lead {
  font-size: clamp(1.05rem, 1.5vw, 1.2rem);
  line-height: 1.62;
  color: var(--muted);
  max-width: 54ch;
  margin: 0 0 2rem;
}

.hero-cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  align-items: center;
  margin-bottom: 1.75rem;
}

.platform-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  align-items: center;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--muted);
}

.platform-item {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.platform-item svg {
  width: 16px;
  height: 16px;
  color: var(--cobalt);
}

/* ===== INTERACTIVE PHONE STAGE ===== */
.hero-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.stage-controls {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem;
  border-radius: 999px;
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.stage-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--muted);
  transition: background-color 0.16s ease, color 0.16s ease;
}

.stage-pill[aria-pressed="true"] {
  background: var(--cobalt);
  color: #ffffff;
}

.stage-pill[data-theme="cosmic"][aria-pressed="true"] {
  background: var(--cosmic-bg);
  color: var(--cosmic-mint);
}

.stage-pill svg {
  width: 14px;
  height: 14px;
}

.phone-bezel {
  width: min(360px, 100%);
  border-radius: 38px;
  padding: 11px;
  background: #101522;
  box-shadow: var(--shadow-phone);
}

.phone-screen {
  --p-bg: #f4f7ff;
  --p-surface: #ffffff;
  --p-surface2: #e8eeff;
  --p-border: #cbd8fa;
  --p-ink: #0f172a;
  --p-muted: #475569;
  --p-primary: #2563eb;
  --p-primary-text: #1d4ed8;
  --p-primary-ink: #ffffff;
  --p-accent: #84cc16;
  --p-accent-ink: #1a2e05;
  --p-secondary: #f97316;
  --p-secondary-bg: #c2410c;
  --p-secondary-ink: #ffffff;
  --p-mint: #dcfce7;
  --p-success: #15803d;
  --p-peach: #ffedd5;
  --p-danger: #dc2626;

  border-radius: 28px;
  background: var(--p-bg);
  color: var(--p-ink);
  padding: 0.85rem 1rem 1.1rem;
  transition: background-color 0.25s ease, color 0.25s ease;
  position: relative;
  overflow: hidden;
}

.phone-screen[data-mode="cosmic"] {
  --p-bg: #08131d;
  --p-surface: #102232;
  --p-surface2: #173147;
  --p-border: #254c6b;
  --p-ink: #f0fdf4;
  --p-muted: #9bc0d6;
  --p-primary: #2dd4bf;
  --p-primary-text: #2dd4bf;
  --p-primary-ink: #062024;
  --p-accent: #f59e0b;
  --p-accent-ink: #08131d;
  --p-secondary: #c084fc;
  --p-secondary-bg: #c084fc;
  --p-secondary-ink: #08131d;
  --p-mint: #0f3834;
  --p-success: #2dd4bf;
  --p-peach: #3b2418;
  --p-danger: #f87171;
}

.phone-island {
  width: 82px;
  height: 20px;
  border-radius: 999px;
  background: #0b0e17;
  margin: 0 auto 0.75rem;
}

.phone-boss-bar {
  background: var(--p-surface);
  border: 1.5px solid var(--p-border);
  border-radius: 16px;
  padding: 0.7rem 0.8rem;
  margin-bottom: 0.75rem;
}

.boss-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.boss-id {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.boss-badge {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--p-secondary-bg, var(--orange-deep));
  color: var(--p-secondary-ink, #ffffff);
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.85rem;
}

.boss-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.92rem;
  line-height: 1.15;
}

.boss-taunt {
  font-size: 0.74rem;
  color: var(--p-muted);
  line-height: 1.25;
}

.shields {
  display: inline-flex;
  gap: 0.2rem;
  color: var(--p-primary);
}

.shields svg {
  width: 15px;
  height: 15px;
}

.shields .broken {
  opacity: 0.22;
}

.hp-row {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.hp-track {
  flex: 1;
  height: 9px;
  border-radius: 999px;
  background: var(--p-surface2);
  overflow: hidden;
}

.hp-fill {
  height: 100%;
  border-radius: 999px;
  background: var(--p-secondary);
  transition: width 0.28s cubic-bezier(0.22, 1, 0.36, 1), background-color 0.2s ease;
}

.hp-label {
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--p-ink);
  min-width: 58px;
  text-align: right;
}

.phone-card {
  background: var(--p-surface);
  border: 2px solid var(--p-primary);
  border-radius: 20px;
  padding: 1rem 1rem 1.05rem;
  position: relative;
  text-align: center;
  transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.22s cubic-bezier(0.22, 1, 0.36, 1);
}

.phone-card.is-hit {
  background: var(--p-mint);
  border-color: var(--p-success);
}

.phone-card.is-miss {
  background: var(--p-peach);
  border-color: var(--p-danger);
}

@media (prefers-reduced-motion: no-preference) {
  .phone-card.pop {
    animation: cardPop 0.32s cubic-bezier(0.22, 1, 0.36, 1);
  }
  .phone-card.shake {
    animation: cardShake 0.34s ease;
  }
}

@keyframes cardPop {
  0% { transform: scale(0.95); }
  55% { transform: scale(1.03); }
  100% { transform: scale(1); }
}

@keyframes cardShake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-6px); }
  50% { transform: translateX(6px); }
  75% { transform: translateX(-4px); }
}

.phone-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.55rem;
}

.phone-streak {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.24rem 0.6rem;
  border-radius: 999px;
  background: var(--p-surface2);
  color: var(--p-primary-text);
  font-family: var(--font-display);
  font-size: 0.76rem;
  font-weight: 700;
}

.phone-streak.hot {
  background: var(--p-accent);
  color: var(--p-accent-ink);
}

.hint-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.26rem 0.62rem;
  border-radius: 999px;
  background: var(--p-surface2);
  color: var(--p-ink);
  font-size: 0.75rem;
  font-weight: 700;
}

.hint-toggle svg {
  width: 13px;
  height: 13px;
}

.phone-eq {
  font-family: var(--font-display);
  font-size: 2.7rem;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin: 0.35rem 0 0.45rem;
}

.phone-eq .op {
  color: var(--p-primary);
}

.phone-status {
  min-height: 1.35rem;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--p-muted);
}

.phone-status.good {
  color: var(--p-success);
}

.phone-status.bad {
  color: var(--p-danger);
}

.phone-hint-array {
  margin-top: 0.65rem;
  padding: 0.6rem;
  border-radius: 12px;
  background: var(--p-surface2);
  text-align: center;
}

.phone-hint-array[hidden] {
  display: none;
}

.dot-rows {
  display: inline-flex;
  flex-direction: column;
  gap: 3px;
  margin-bottom: 0.35rem;
}

.dot-row {
  display: flex;
  gap: 3px;
}

.dot-cell {
  width: 8px;
  height: 8px;
  border-radius: 2.5px;
  background: var(--p-primary);
}

.dot-cell.part-b {
  background: var(--p-secondary);
}

.hint-caption {
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--p-ink);
}

.choice-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.55rem;
  margin-top: 0.75rem;
}

.choice-btn {
  padding: 0.85rem 0.5rem;
  border-radius: 14px;
  background: var(--p-surface);
  border: 1.5px solid var(--p-border);
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--p-ink);
  transition: transform 0.1s ease, border-color 0.14s ease, background-color 0.14s ease;
}

.choice-btn:hover:not(:disabled) {
  border-color: var(--p-primary);
}

.choice-btn.correct {
  background: var(--p-success);
  border-color: var(--p-success);
  color: #ffffff;
}

.choice-btn.wrong {
  background: var(--p-danger);
  border-color: var(--p-danger);
  color: #ffffff;
}

.stage-caption {
  font-size: 0.84rem;
  color: var(--muted);
  text-align: center;
  margin: 0;
}

/* ===== SECTIONS ===== */
.section {
  padding: 4.5rem 1.25rem;
}

.section-header {
  max-width: 640px;
  margin-bottom: clamp(2rem, 4vw, 3rem);
}

.section-header h2 {
  font-family: var(--font-display);
  font-size: clamp(1.95rem, 3.6vw, 2.85rem);
  line-height: 1.1;
  letter-spacing: -0.025em;
  text-wrap: balance;
  margin: 0 0 0.85rem;
}

.section-header p {
  font-size: 1.05rem;
  color: var(--muted);
  margin: 0;
}

/* ===== INTERACTIVE MODE SWITCHER ===== */
.modes-shell {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: start;
}

.mode-tabs {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.mode-tab {
  display: flex;
  align-items: flex-start;
  gap: 0.95rem;
  text-align: left;
  padding: 1.1rem 1.2rem;
  border-radius: var(--radius);
  background: transparent;
  border: 1.5px solid transparent;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.mode-tab:hover {
  background: rgba(255, 255, 255, 0.7);
}

.mode-tab[aria-selected="true"] {
  background: var(--surface);
  border-color: var(--cobalt);
}

.mode-tab-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--surface-tint);
  color: var(--cobalt-deep);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.mode-tab[aria-selected="true"] .mode-tab-icon {
  background: var(--cobalt);
  color: #ffffff;
}

.mode-tab-icon svg {
  width: 20px;
  height: 20px;
}

.mode-tab-title {
  display: block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.08rem;
  color: var(--ink);
  margin-bottom: 0.2rem;
}

.mode-tab-desc {
  display: block;
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.48;
}

.mode-stage {
  background: var(--surface);
  border-radius: 22px;
  padding: 2rem;
  box-shadow: var(--shadow-soft);
}

.mode-panel[hidden] {
  display: none;
}

.mode-panel h3 {
  font-family: var(--font-display);
  font-size: 1.55rem;
  letter-spacing: -0.02em;
  margin: 0 0 0.65rem;
}

.mode-panel > p {
  color: var(--muted);
  margin: 0 0 1.4rem;
  max-width: 56ch;
}

.mode-visual {
  border-radius: var(--radius);
  background: var(--bg);
  padding: 1.25rem;
}

.world-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-bottom: 1rem;
}

.world-pill {
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--ink);
}

.world-pill.active {
  background: var(--cobalt);
  border-color: var(--cobalt);
  color: #ffffff;
}

.faceoff-mock {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
}

.fo-side {
  border-radius: 14px;
  padding: 1rem;
  background: var(--surface);
  border: 2px solid var(--cobalt);
}

.fo-side.p2 {
  border-color: var(--orange);
}

.fo-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.88rem;
  margin-bottom: 0.6rem;
}

.fo-score {
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: var(--cobalt);
  color: #ffffff;
  font-size: 0.78rem;
}

.fo-side.p2 .fo-score {
  background: var(--orange-deep);
}

.fo-eq {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  text-align: center;
  margin: 0.4rem 0 0.7rem;
}

.fo-opts {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.4rem;
}

.fo-opt {
  text-align: center;
  padding: 0.45rem;
  border-radius: 8px;
  background: var(--surface-tint);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.9rem;
}

.fo-opt.win {
  background: #16a34a;
  color: #ffffff;
}

.mode-bullets {
  list-style: none;
  padding: 0;
  margin: 1.25rem 0 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 0.65rem 1.25rem;
}

.mode-bullets li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--ink);
}

.mode-bullets svg {
  width: 16px;
  height: 16px;
  color: #16a34a;
  flex-shrink: 0;
}

/* ===== LEARNING & MASTERY SPLIT ===== */
.learning-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}

.mastery-board {
  background: var(--surface);
  border-radius: 20px;
  padding: 1.5rem;
  box-shadow: var(--shadow-soft);
}

.board-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 1rem;
  gap: 1rem;
}

.board-top h3 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  margin: 0;
}

.board-readout {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--cobalt);
}

.heatmap {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 5px;
}

.hm-cell {
  aspect-ratio: 1;
  border-radius: 7px;
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-size: 0.74rem;
  font-weight: 700;
  transition: transform 0.12s ease;
}

.hm-cell:hover {
  transform: scale(1.08);
}

.hm-crowned { background: var(--cobalt); color: #ffffff; }
.hm-solid { background: var(--lime); color: var(--lime-ink); }
.hm-warm { background: var(--orange-deep); color: #ffffff; }
.hm-new { background: var(--surface-tint); color: var(--muted); }

.hm-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1rem;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--muted);
}

.hm-legend span {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.hm-swatch {
  width: 11px;
  height: 11px;
  border-radius: 3px;
}

.principle-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.principle + .principle {
  padding-top: 1.35rem;
  border-top: 1px solid var(--border);
}

.principle h3 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  margin: 0 0 0.35rem;
}

.principle p {
  margin: 0;
  color: var(--muted);
  font-size: 0.96rem;
}

/* ===== COSMIC QUEST DARK BAND ===== */
.cosmic-band {
  background: var(--cosmic-bg);
  color: var(--cosmic-ink);
  position: relative;
  overflow: hidden;
}

.cosmic-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}

.cosmic-art {
  display: flex;
  justify-content: center;
  position: relative;
}

.cosmic-art img {
  width: min(340px, 85%);
  height: auto;
  filter: drop-shadow(0 24px 36px rgba(2, 6, 14, 0.55));
}

.cosmic-copy h2 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 3.8vw, 3rem);
  line-height: 1.08;
  letter-spacing: -0.025em;
  text-wrap: balance;
  margin: 0 0 1rem;
  color: var(--cosmic-ink);
}

.cosmic-copy p {
  color: var(--cosmic-muted);
  font-size: 1.05rem;
  max-width: 54ch;
  margin: 0 0 1.6rem;
}

.cosmic-unlock-bar {
  background: var(--cosmic-surface);
  border: 1px solid var(--cosmic-border);
  border-radius: var(--radius);
  padding: 1.15rem 1.25rem;
  margin-bottom: 1.6rem;
  max-width: 480px;
}

.unlock-meta {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.9rem;
  margin-bottom: 0.6rem;
}

.unlock-meta .mint {
  color: var(--cosmic-mint);
}

.unlock-track {
  height: 10px;
  border-radius: 999px;
  background: var(--cosmic-surface-2);
  overflow: hidden;
}

.unlock-fill {
  width: 100%;
  height: 100%;
  border-radius: 999px;
  background: var(--cosmic-mint);
}

.unlock-note {
  font-size: 0.84rem;
  color: var(--cosmic-muted);
  margin: 0.6rem 0 0;
}

/* ===== DOWNLOAD / PLATFORMS ===== */
.platforms-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
}

.platform-col {
  background: var(--surface);
  border-radius: 20px;
  padding: 1.65rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1.25rem;
  box-shadow: var(--shadow-soft);
}

.platform-col.featured {
  background: var(--cobalt-deep);
  color: #ffffff;
  box-shadow: var(--shadow-elevated);
}

.platform-col.featured p,
.platform-col.featured .plat-meta {
  color: #e8eeff;
}

.plat-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.85rem;
}

.plat-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--surface-tint);
  color: var(--cobalt-deep);
  display: grid;
  place-items: center;
}

.platform-col.featured .plat-icon {
  background: rgba(255, 255, 255, 0.16);
  color: #ffffff;
}

.plat-icon svg {
  width: 22px;
  height: 22px;
}

.plat-tag {
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
  background: var(--surface-tint);
  color: var(--cobalt-deep);
}

.platform-col.featured .plat-tag {
  background: var(--lime);
  color: var(--lime-ink);
}

.platform-col h3 {
  font-family: var(--font-display);
  font-size: 1.35rem;
  margin: 0 0 0.5rem;
}

.platform-col p {
  font-size: 0.94rem;
  color: var(--muted);
  margin: 0;
}

.plat-meta {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--muted);
  margin-top: 0.75rem;
}

.plat-actions {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.plat-help-link {
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--cobalt-deep);
  text-decoration: underline;
  text-underline-offset: 0.2em;
  padding: 0.25rem;
  align-self: center;
}

.plat-help-link:hover {
  color: var(--ink);
}

/* ===== INSTALL DIALOG ===== */
dialog.install-dialog {
  width: min(500px, calc(100% - 2rem));
  border: 0;
  border-radius: 22px;
  padding: 1.75rem;
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 28px 60px -16px rgba(15, 23, 42, 0.45);
}

dialog.install-dialog::backdrop {
  background: rgba(15, 23, 42, 0.62);
}

.dialog-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.85rem;
}

.dialog-head h3 {
  font-family: var(--font-display);
  font-size: 1.35rem;
  margin: 0;
}

.dialog-close {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--surface-tint);
  color: var(--ink);
  display: grid;
  place-items: center;
}

.dialog-steps {
  margin: 0.85rem 0 1.25rem;
  padding-left: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  color: var(--muted);
  font-size: 0.94rem;
}

.dialog-steps code {
  font-size: 0.84rem;
  background: var(--surface-tint);
  color: var(--ink);
  padding: 0.15rem 0.4rem;
  border-radius: 6px;
}

/* ===== FOOTER ===== */
.site-footer {
  border-top: 1px solid var(--border);
  padding-block: 2rem;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.875rem;
  color: var(--muted);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  font-weight: 700;
}

.footer-links a:hover {
  color: var(--cobalt);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 960px) {
  .hero-grid,
  .modes-shell,
  .learning-grid,
  .cosmic-grid,
  .platforms-grid {
    grid-template-columns: 1fr;
  }

  .nav-links {
    display: none;
  }

  .cosmic-art {
    order: -1;
  }
}

@media (max-width: 520px) {
  .container {
    width: min(1160px, 100% - 1.5rem);
  }

  .section {
    padding: 3.25rem 0.75rem;
  }

  .mode-stage {
    padding: 1.35rem;
  }

  .header-actions .btn-secondary {
    display: none;
  }

  .faceoff-mock {
    grid-template-columns: 1fr;
  }
}
