/*
  Apogee Games Website
  Static build: v1.0.8
  Refactor pass: externalized CSS, JS, and image assets for maintainability.
*/

@import url('https://fonts.googleapis.com/css2?family=Graduate&family=Montserrat:wght@500;600;700;800&family=Radley:ital@0;1&display=swap');

:root {
      --bgA: 7, 12, 20;
      --bgB: 4, 7, 12;
      --bgC: 2, 3, 7;
      --glowA: 62, 104, 150;
      --glowB: 210, 180, 96;
      --stars: .18;
      --demon: .04;
      --panel: #151b24;
      --panel-2: #1c2430;
      --text: #f5f7fb;
      --muted: #aab3c2;
      --paper: #f6f1e7;
      --ink: #050505;
      --line: rgba(255,255,255,.16);
      --line-strong: rgba(255,255,255,.32);
      --accent: #a9bfd8;
      --accent-2: #d7b56d;
      --awake-blue: #9ec7ff;
      --awake-amber: #d9ad63;
      --cc-red: #9d1c1c;
      --cc-cream: #f8f1e5;
      --success: #7fae8a;
      --shadow: 0 20px 60px rgba(0,0,0,.35);
      --radius: 18px;
      --radius-sm: 10px;
      --max: 1180px;
      --mono: Consolas, "Lucida Console", Monaco, "Courier New", monospace;
      --body-font: Consolas, "Lucida Console", Monaco, "Courier New", monospace;
      --apogee-heading: "Radley", "Palatino Linotype", Palatino, Georgia, serif;
      --awake-heading: "Montserrat", "Montserrat Classic", "Avenir Next", Avenir, "Segoe UI", Arial, sans-serif;
      --cc-heading: "Graduate", "Rockwell Extra Bold", Rockwell, "Courier New", monospace;
      --sans: var(--body-font);
    }

    * { box-sizing: border-box; }
    html { scroll-behavior: smooth; }
    body {
      margin: 0;
      color: var(--text);
      font-family: var(--body-font);
      line-height: 1.55;
      background: rgb(var(--bgC));
      min-height: 100vh;
    }
    body::before {
      content: "";
      position: fixed;
      inset: 0;
      z-index: -3;
      background:
        radial-gradient(circle at 18% 6%, rgba(var(--glowA), .54), transparent 33rem),
        radial-gradient(circle at 80% 10%, rgba(var(--glowB), .30), transparent 24rem),
        radial-gradient(circle at 60% 72%, rgba(155, 0, 16, calc(var(--demon) * .28)), transparent 34rem),
        linear-gradient(180deg, rgb(var(--bgA)), rgb(var(--bgB)) 48%, rgb(var(--bgC)) 100%);
      transition: background 220ms linear;
    }
    body::after {
      content: "";
      position: fixed;
      inset: 0;
      z-index: -2;
      opacity: var(--stars);
      pointer-events: none;
      background-image:
        radial-gradient(circle at 8% 18%, rgba(255,255,255,.92) 0 1px, transparent 1.5px),
        radial-gradient(circle at 31% 72%, rgba(255,255,255,.75) 0 1px, transparent 1.5px),
        radial-gradient(circle at 44% 24%, rgba(255,255,255,.70) 0 1px, transparent 1.5px),
        radial-gradient(circle at 74% 40%, rgba(255,255,255,.82) 0 1px, transparent 1.5px),
        radial-gradient(circle at 88% 82%, rgba(255,255,255,.75) 0 1px, transparent 1.5px),
        radial-gradient(circle at 58% 60%, rgba(255,255,255,.62) 0 1px, transparent 1.5px);
      background-size: 260px 260px, 320px 320px, 380px 380px, 420px 420px, 500px 500px, 640px 640px;
      transition: opacity 220ms linear;
    }
    a { color: inherit; text-decoration: none; }
    a:hover { color: var(--accent); }
    button, input, select { font: inherit; }
    img { max-width: 100%; display: block; }
    .container { max-width: var(--max); margin: 0 auto; padding: 0 22px; }

    .site-header {
      position: sticky;
      top: 0;
      z-index: 60;
      backdrop-filter: blur(14px);
      background: rgba(6, 9, 14, .86);
      border-bottom: 1px solid var(--line);
    }
    .nav { min-height: 78px; display: flex; align-items: center; justify-content: space-between; gap: 22px; }
    .brand { display: flex; align-items: center; gap: 14px; min-width: 220px; }
    .brand-mark {
      width: 58px;
      height: 58px;
      border: 1px solid var(--line-strong);
      border-radius: 16px;
      overflow: hidden;
      background: radial-gradient(circle at center, rgba(255,255,255,.10), rgba(255,255,255,.02));
      display: grid;
      place-items: center;
      box-shadow: 0 0 28px rgba(169,191,216,.12);
    }
    .brand-mark img { width: 92%; height: 92%; object-fit: contain; filter: drop-shadow(0 0 10px rgba(255,255,255,.18)); }
    .brand-title { display: flex; align-items: center; min-height: 58px; text-transform: uppercase; font-family: var(--apogee-heading); font-weight: 800; }
    .brand-title span { font-size: clamp(1.45rem, 2.5vw, 2.05rem); line-height: .9; letter-spacing: .08em; }
    .nav-links { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
    .nav-links a { padding: 10px 12px; border: 1px solid transparent; border-radius: 999px; color: var(--muted); font-size: .98rem; }
    .nav-links a:hover { border-color: var(--line); color: var(--text); background: rgba(255,255,255,.04); }
    .menu-toggle { display: none; }

    section { padding: 72px 0; scroll-margin-top: 86px; }
    .hero { padding: 78px 0 50px; position: relative; overflow: hidden; }
    .hero::before, .tools::before {
      content: "";
      position: absolute;
      inset: 0;
      background-image:
        linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px);
      background-size: 52px 52px;
      mask-image: linear-gradient(180deg, black, transparent 76%);
      pointer-events: none;
    }
    .hero-grid { position: relative; display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(310px, .88fr); gap: 34px; align-items: center; }
    .eyebrow { display: inline-flex; align-items: center; gap: 8px; color: var(--accent); font-family: var(--mono); text-transform: uppercase; letter-spacing: .16em; font-size: .94rem; font-weight: 700; }
    h1, h2, h3, p { margin-top: 0; }
    h1, h2, h3, .footer h4, .section-head .eyebrow, .status-kicker { font-family: var(--apogee-heading); }
    h1 { font-size: clamp(3rem, 8vw, 6.5rem); line-height: .92; letter-spacing: -.055em; margin: 16px 0 22px; max-width: 920px; }
    h2 { font-size: clamp(2rem, 4vw, 3.5rem); line-height: 1; letter-spacing: -.035em; margin-bottom: 14px; }
    h3 { font-size: 1.22rem; line-height: 1.18; margin-bottom: 10px; }
    .lead { color: #dfe6f2; font-size: clamp(1.15rem, 2vw, 1.38rem); max-width: 740px; }
    .hero-actions, .button-row, .card-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
    .hero-actions { margin-top: 28px; }
    .btn {
      border: 1px solid var(--line-strong);
      color: var(--text);
      background: rgba(255,255,255,.055);
      border-radius: 999px;
      padding: 11px 16px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      min-height: 44px;
      cursor: pointer;
      transition: transform .18s ease, border-color .18s ease, background .18s ease;
    }
    .btn:hover { transform: translateY(-1px); border-color: rgba(255,255,255,.5); background: rgba(255,255,255,.09); color: var(--text); }
    .btn.primary { background: var(--text); color: #05070b; border-color: transparent; font-weight: 800; }
    .btn.primary:hover { background: #fff; color: #05070b; }
    .btn.small { min-height: 36px; padding: 8px 12px; font-size: .86rem; }
    .btn.disabled, .btn:disabled { opacity: .48; cursor: not-allowed; transform: none; }

    .hero-side { display: grid; gap: 18px; }
    .hero-logo-panel {
      border: 1px solid var(--line);
      background: radial-gradient(circle at center, rgba(255,255,255,.105), transparent 42%), linear-gradient(180deg, rgba(21,27,36,.86), rgba(8,10,14,.96));
      border-radius: var(--radius);
      padding: 28px;
      min-height: 310px;
      display: grid;
      place-items: center;
      box-shadow: var(--shadow);
      position: relative;
      overflow: hidden;
    }
    .hero-logo-panel::before { content:""; position:absolute; inset:16px; border:1px solid rgba(255,255,255,.08); border-radius:14px; pointer-events:none; }
    .logo-img { object-fit: contain; margin: 0 auto; }
    .apogee-logo { width: min(390px, 94%); max-height: 390px; filter: drop-shadow(0 0 28px rgba(255,255,255,.14)); }
    .game-logo-band .logo-img { width: min(520px, 94%); height: 240px; object-fit: contain; }
    .card-media .logo-img { width: min(360px, 94%); height: 190px; object-fit: contain; }
    .awake-logo { filter: drop-shadow(0 0 26px rgba(120,180,255,.22)); }
    .cc-logo { filter: drop-shadow(0 0 18px rgba(255,230,210,.12)); }
    .about-logo-panel { border: 1px solid var(--line); background: radial-gradient(circle at center, rgba(255,255,255,.10), transparent 42%), linear-gradient(180deg, rgba(21,27,36,.82), rgba(8,10,14,.95)); border-radius: var(--radius); padding: 28px; display: grid; place-items: center; min-height: 300px; box-shadow: var(--shadow); }
    .about-logo-panel .apogee-logo { width: min(360px, 94%); max-height: 320px; }
    .status-panel { border: 1px solid var(--line); background: rgba(12,16,22,.74); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); }
    .status-kicker { font-family: var(--mono); text-transform: uppercase; letter-spacing: .18em; color: var(--accent); font-size: .92rem; margin-bottom: 12px; }
    .readout { display: grid; gap: 8px; }
    .readout-row { display: flex; justify-content: space-between; gap: 12px; border-bottom: 1px solid rgba(255,255,255,.08); padding-bottom: 8px; color: var(--muted); font-family: var(--mono); font-size: .98rem; }
    .readout-row span:last-child { color: var(--text); text-align: right; }

    .section-head { display: flex; justify-content: space-between; align-items: end; gap: 28px; margin-bottom: 26px; }
    .section-head p { color: var(--muted); max-width: 560px; margin: 0; }
    .grid { display: grid; gap: 20px; }
    .grid.two { grid-template-columns: repeat(2, minmax(0,1fr)); }
    .grid.three { grid-template-columns: repeat(3, minmax(0,1fr)); }
    .card {
      border: 1px solid var(--line);
      border-radius: var(--radius);
      background: rgba(18,24,33,.74);
      padding: 20px;
      box-shadow: var(--shadow);
      overflow: hidden;
    }
    .card p { color: var(--muted); }
    .card-media { min-height: 220px; display: grid; place-items: center; border-radius: 15px; margin-bottom: 18px; border: 1px solid var(--line); overflow: hidden; padding: 22px; }
    .awake-media { background: radial-gradient(circle at center, rgba(70,130,210,.18), transparent 40%), #000; }
    .cc-media { background: radial-gradient(circle at center, rgba(160,0,14,.22), transparent 42%), #090001; }
    .badges { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 12px; }
    .badge { display: inline-flex; border: 1px solid var(--line); color: var(--muted); border-radius: 999px; padding: 6px 9px; font-size: .84rem; font-family: var(--mono); text-transform: uppercase; letter-spacing: .08em; }
    .badge.current { color: #e4ffe8; border-color: rgba(127,174,138,.45); background: rgba(127,174,138,.11); }
    .badge.draft { color: #ffe7ab; border-color: rgba(217,173,99,.5); background: rgba(217,173,99,.10); }
    .badge.planned { color: #d6e9ff; border-color: rgba(133,184,255,.42); background: rgba(133,184,255,.10); }
    .badge.awake-tag { color: #d6e9ff; border-color: rgba(133,184,255,.5); }
    .badge.cc-tag { color: #ffd0d0; border-color: rgba(157,28,28,.58); }
    .meta-list { display: grid; gap: 8px; margin: 16px 0; }
    .meta-list div { display: grid; grid-template-columns: 112px 1fr; gap: 12px; border-top: 1px solid rgba(255,255,255,.08); padding-top: 8px; }
    .meta-list span { color: var(--muted); font-family: var(--mono); font-size: .88rem; text-transform: uppercase; letter-spacing: .08em; }
    .meta-list strong { font-weight: 700; color: var(--text); }

    .theme-section {
      border: 1px solid var(--line);
      border-radius: 28px;
      padding: 32px;
      box-shadow: var(--shadow);
      position: relative;
      overflow: hidden;
    }
    .awake-theme { background: linear-gradient(180deg, rgba(0,0,0,.92), rgba(0,0,0,.98)); }
    .cc-theme { background: radial-gradient(circle at 74% 8%, rgba(200,0,20,.18), transparent 26rem), linear-gradient(180deg, rgba(34,0,6,.94), rgba(5,0,1,.98)); }
    .game-logo-band { border: 1px solid var(--line); border-radius: 20px; min-height: 260px; display: grid; place-items: center; margin-bottom: 22px; background: rgba(0,0,0,.34); padding: 24px; }
    .game-title-panel { display: grid; gap: 18px; justify-items: stretch; text-align: left; margin-bottom: 28px; }
    .game-title-panel .eyebrow { justify-content: flex-start; }
    .game-section-description { color: var(--muted); max-width: 760px; margin: -4px 0 0; font-size: 1.15rem; }
    .sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
    .awake-theme h2,
    .awake-theme h3,
    .awake-theme .eyebrow,
    .awake-theme .badge,
    .awake-theme .meta-list span,
    .awake-theme .num,
    .game-card.awake h3,
    .game-card.awake .badge,
    .game-card.awake .meta-list span,
    .modal-awake h2,
    .modal-awake h3,
    .modal-awake .badge,
    .modal-awake .meta-list span {
      font-family: var(--awake-heading);
      letter-spacing: .02em;
    }
    .cc-theme h2,
    .cc-theme h3,
    .cc-theme .eyebrow,
    .cc-theme .badge,
    .cc-theme .meta-list span,
    .cc-theme .num,
    .game-card.cc h3,
    .game-card.cc .badge,
    .game-card.cc .meta-list span,
    .modal-cc h2,
    .modal-cc h3,
    .modal-cc .badge,
    .modal-cc .meta-list span {
      font-family: var(--cc-heading);
      letter-spacing: .035em;
    }
    .awake-theme .eyebrow { color: var(--awake-blue); }
    .cc-theme .eyebrow { color: #ff9b9b; }
    .game-logo-band { min-height: 280px; }
    .game-logo-band .logo-img { width: min(760px, 96%); height: 240px; object-fit: contain; }
    .card-media .logo-img { width: min(360px, 94%); height: 190px; object-fit: contain; }

    .quick-panel { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 14px; }
    .step { border: 1px solid var(--line); border-radius: 16px; padding: 16px; background: rgba(255,255,255,.045); }
    .num { font-family: var(--mono); color: var(--accent); font-weight: 800; margin-bottom: 10px; }
    .game-resource-subsection { margin-top: 30px; padding-top: 26px; border-top: 1px solid rgba(255,255,255,.13); }
    .game-resource-subsection .subhead { display: flex; justify-content: space-between; gap: 18px; align-items: end; margin-bottom: 16px; }
    .game-resource-subsection .subhead p { color: var(--muted); margin: 0; max-width: 620px; }
    .resource-list, .tool-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; align-items: stretch; }
    .resource-card, .tool-card { background: rgba(10,13,18,.72); }
    .filters { display: grid; grid-template-columns: 1.6fr repeat(3, minmax(130px, .9fr)); gap: 10px; margin-bottom: 18px; }
    input, select { width: 100%; color: var(--text); background: rgba(0,0,0,.28); border: 1px solid var(--line); border-radius: 12px; padding: 11px 12px; }
    option { background: #0b0e14; color: var(--text); }

    .tools { position: relative; }
    .store-panel { display: grid; grid-template-columns: .9fr 1.1fr; gap: 20px; }
    .update-list { display: grid; gap: 12px; }
    .update-item { display: grid; grid-template-columns: 190px 1fr; gap: 20px; border: 1px solid var(--line); background: rgba(18,24,33,.74); border-radius: var(--radius); padding: 18px; }
    .update-item time { color: var(--accent); font-family: var(--mono); font-size: .98rem; }
    .footer { border-top: 1px solid var(--line); padding: 36px 0; background: rgba(0,0,0,.24); }
    .footer-grid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 24px; }
    .footer h4 { margin: 0 0 10px; }
    .footer a { display: block; color: var(--muted); margin: 6px 0; }
    .fine-print { color: var(--muted); font-size: .96rem; margin-top: 28px; }

    .modal { position: fixed; inset: 0; z-index: 100; display: none; align-items: center; justify-content: center; padding: 22px; background: rgba(0,0,0,.7); }
    .modal.open { display: flex; }
    .modal-card { width: min(720px, 100%); max-height: 86vh; overflow: auto; border: 1px solid var(--line-strong); background: #10151e; border-radius: 22px; padding: 22px; box-shadow: var(--shadow); }
    .modal-head { display: flex; justify-content: space-between; gap: 18px; align-items: start; border-bottom: 1px solid var(--line); padding-bottom: 14px; margin-bottom: 16px; }
    .close { border: 1px solid var(--line); background: rgba(255,255,255,.06); color: var(--text); border-radius: 12px; padding: 8px 10px; cursor: pointer; }

    @media (max-width: 980px) {
      .hero-grid, .store-panel, .grid.two, .grid.three, .quick-panel, .resource-list, .tool-list, .footer-grid { grid-template-columns: 1fr; }
      .section-head, .game-resource-subsection .subhead { display: block; }
      .game-title-panel { text-align: center; }
      .section-head p, .game-resource-subsection .subhead p { margin-top: 10px; }
    }
    @media (max-width: 720px) {
      .nav { min-height: 70px; flex-wrap: wrap; align-items: center; gap: 10px; padding: 10px 0; }
      .brand { min-width: 100%; }
      .brand-mark { width: 48px; height: 48px; border-radius: 13px; }
      .brand-title { min-height: 48px; }
      .brand-title span { font-size: clamp(1.35rem, 8vw, 1.85rem); letter-spacing: .08em; }
      .nav-links { position: static; display: flex; flex-direction: row; align-items: center; justify-content: flex-start; flex-wrap: wrap; padding: 0; background: transparent; border-bottom: 0; width: 100%; gap: 6px; }
      .nav-links.open { display: flex; }
      .nav-links a { border-radius: 999px; padding: 8px 10px; font-size: .84rem; }
      .filters { grid-template-columns: 1fr; }
      .theme-section { padding: 22px; border-radius: 20px; }
      h1 { font-size: clamp(2.5rem, 14vw, 4rem); }
      .meta-list div { grid-template-columns: 1fr; gap: 2px; }
    }


/* Brand-aligned typography refinements for v1.0.1 */
.awake-theme .eyebrow,
.game-card.awake .badge,
.modal-awake .badge { font-weight: 700; }
.cc-theme .eyebrow,
.game-card.cc .badge,
.modal-cc .badge { font-weight: 400; }
.game-card.awake h3 { font-weight: 800; }
.game-card.cc h3 { font-weight: 400; }

/* Readability refinements for v1.0.2 */
.section-head p,
.game-resource-subsection .subhead p {
  font-size: clamp(1.12rem, 1.65vw, 1.32rem);
  line-height: 1.58;
  color: #d6deeb;
}

.theme-section > .section-head p {
  font-size: clamp(1.28rem, 2.05vw, 1.58rem);
  line-height: 1.5;
  color: #eef3fb;
  max-width: 700px;
}

.game-card > p,
.resource-card > p,
.tool-card > p {
  font-size: clamp(1.02rem, 1.28vw, 1.16rem);
  line-height: 1.58;
}

.step p,
.grid.three .card p {
  font-size: clamp(.98rem, 1.15vw, 1.08rem);
  line-height: 1.56;
}

#about .lead,
#contact .lead,
#legal .lead,
#store .lead {
  font-size: clamp(1.18rem, 1.85vw, 1.42rem);
  line-height: 1.55;
}

.modal-card > #modalContent p,
#modalContent p {
  font-size: clamp(1.04rem, 1.3vw, 1.18rem);
  line-height: 1.6;
}

@media (max-width: 720px) {
  .section-head p,
  .game-resource-subsection .subhead p,
  .theme-section > .section-head p {
    font-size: 1.08rem;
  }
}


/* Card action alignment refinements for v1.0.4 */
.resource-list,
.tool-list,
.grid.two,
.grid.three {
  align-items: stretch;
}

.game-card,
.resource-card,
.tool-card {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.game-card .meta-list,
.resource-card .meta-list,
.tool-card .meta-list {
  margin-bottom: 20px;
}

.game-card .card-actions,
.resource-card .card-actions,
.tool-card .card-actions {
  margin-top: auto;
  padding-top: 2px;
}

.resource-card .card-actions,
.tool-card .card-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: stretch;
}

.resource-card .card-actions .btn:first-child,
.tool-card .card-actions .btn:first-child,
.game-card .card-actions .btn {
  width: 100%;
}

.resource-card .card-actions .btn,
.tool-card .card-actions .btn,
.game-card .card-actions .btn {
  min-height: 40px;
  white-space: nowrap;
}

.game-card .card-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
}

@media (max-width: 430px) {
  .resource-card .card-actions,
  .tool-card .card-actions,
  .game-card .card-actions {
    grid-template-columns: 1fr;
  }
}


/* Visual flare refinements for v1.0.8 */
:root {
  --mission-progress: 0;
  --awake-parallax: 0px;
  --active-zone-accent: 169, 191, 216;
}

.mission-trajectory {
  position: fixed;
  left: max(18px, calc((100vw - var(--max)) / 2 - 58px));
  top: 96px;
  width: 34px;
  height: calc(100vh - 132px);
  z-index: 30;
  pointer-events: none;
  opacity: .86;
}

.trajectory-track {
  position: relative;
  width: 2px;
  height: 100%;
  margin: 0 auto;
  background: linear-gradient(180deg, rgba(255,255,255,.18), rgba(255,255,255,.05));
  box-shadow: 0 0 18px rgba(var(--active-zone-accent), .18);
}

.trajectory-fill {
  position: absolute;
  top: 0;
  left: 0;
  width: 2px;
  height: calc(var(--mission-progress) * 100%);
  background: linear-gradient(180deg, rgba(255,255,255,.95), rgba(var(--active-zone-accent), .86));
  box-shadow: 0 0 18px rgba(var(--active-zone-accent), .52);
}

.trajectory-marker {
  position: absolute;
  left: 50%;
  top: calc(var(--mission-progress) * 100%);
  width: 15px;
  height: 15px;
  border: 1px solid rgba(255,255,255,.9);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,.96), rgba(var(--active-zone-accent), .85) 42%, rgba(0,0,0,.25) 70%);
  box-shadow: 0 0 20px rgba(var(--active-zone-accent), .72);
  transform: translate(-50%, -50%);
}

.section-indicator {
  position: fixed;
  left: max(22px, calc((100vw - var(--max)) / 2 - 22px));
  bottom: 22px;
  z-index: 55;
  min-width: 210px;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 16px;
  padding: 10px 13px;
  background: rgba(4, 7, 12, .74);
  backdrop-filter: blur(12px);
  box-shadow: 0 18px 42px rgba(0,0,0,.34), 0 0 22px rgba(var(--active-zone-accent), .12);
}

.section-indicator .indicator-kicker {
  display: block;
  color: var(--muted);
  font-family: var(--mono);
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .16em;
}

.section-indicator strong {
  display: block;
  margin-top: 2px;
  color: rgb(var(--active-zone-accent));
  font-family: var(--mono);
  font-size: .88rem;
  text-transform: uppercase;
  letter-spacing: .12em;
}

.reveal-lock {
  opacity: 0;
  transform: translateY(18px);
  filter: blur(1px);
  transition: opacity .72s ease, transform .72s ease, filter .72s ease, letter-spacing .72s ease, border-color .24s ease, box-shadow .24s ease;
}

.reveal-lock.is-visible {
  opacity: 1;
  transform: translateY(0);
  filter: blur(0);
}

.section-head.reveal-lock h2,
.game-resource-subsection .subhead.reveal-lock h2 {
  letter-spacing: .06em;
  transition: letter-spacing .72s ease;
}

.section-head.reveal-lock.is-visible h2,
.game-resource-subsection .subhead.reveal-lock.is-visible h2 {
  letter-spacing: -.035em;
}

.awake-theme .section-head.reveal-lock.is-visible h2,
.awake-theme .game-resource-subsection .subhead.reveal-lock.is-visible h2 {
  letter-spacing: .02em;
}

.cc-theme .section-head.reveal-lock.is-visible h2,
.cc-theme .game-resource-subsection .subhead.reveal-lock.is-visible h2 {
  letter-spacing: .035em;
}

.hero-logo-panel::after,
.about-logo-panel::after {
  content: "";
  position: absolute;
  inset: 10%;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(255,255,255,.16), transparent 62%);
  opacity: .42;
  animation: apogeePulse 8s ease-in-out infinite;
  pointer-events: none;
}

@keyframes apogeePulse {
  0%, 100% { transform: scale(.94); opacity: .26; }
  50% { transform: scale(1.08); opacity: .52; }
}

.logo-img { transition: transform .7s ease, filter .7s ease, opacity .7s ease; }
.game-logo-band.reveal-lock .logo-img,
.card-media.reveal-lock .logo-img {
  opacity: 0;
  transform: translateY(10px) scale(.985);
}
.game-logo-band.reveal-lock.is-visible .logo-img,
.card-media.reveal-lock.is-visible .logo-img {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.btn {
  position: relative;
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.03), 0 0 0 rgba(255,255,255,0);
  transition: transform .18s ease, border-color .18s ease, background .18s ease, box-shadow .18s ease, color .18s ease;
}

.btn::after {
  content: "›";
  margin-left: .46rem;
  transform: translateX(0);
  transition: transform .18s ease, opacity .18s ease;
  opacity: .72;
}

.btn:hover::after { transform: translateX(3px); opacity: 1; }
.btn:hover { box-shadow: 0 0 22px rgba(var(--active-zone-accent), .18); }
.btn:active { transform: translateY(0) scale(.985); }

.btn.disabled,
.btn:disabled,
.btn.soon {
  opacity: .78;
  color: rgba(255,255,255,.74);
  border-style: dashed;
  background: repeating-linear-gradient(135deg, rgba(255,255,255,.035) 0 7px, rgba(255,255,255,.065) 7px 14px);
  box-shadow: none;
}

.btn.disabled::after,
.btn:disabled::after,
.btn.soon::after {
  content: " pending";
  margin-left: .35rem;
  font-size: .68em;
  text-transform: uppercase;
  letter-spacing: .12em;
  opacity: .65;
  transform: none;
}

.launch-console {
  position: relative;
  overflow: hidden;
}

.launch-console::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.09), transparent);
  transform: translateX(-130%);
  animation: consoleSweep 7s ease-in-out infinite;
  pointer-events: none;
}

@keyframes consoleSweep {
  0%, 58% { transform: translateX(-130%); opacity: 0; }
  64% { opacity: 1; }
  82%, 100% { transform: translateX(130%); opacity: 0; }
}

.card {
  position: relative;
  transition: transform .22s ease, border-color .22s ease, box-shadow .22s ease, background .22s ease;
}

.card:hover {
  transform: translateY(-2px);
  border-color: rgba(255,255,255,.28);
  box-shadow: 0 24px 70px rgba(0,0,0,.42), 0 0 24px rgba(var(--active-zone-accent), .10);
}

.awake-card:hover,
.game-card.awake:hover {
  border-color: rgba(158,199,255,.5);
  box-shadow: 0 24px 70px rgba(0,0,0,.46), 0 0 30px rgba(120,180,255,.22);
}

.cc-card:hover,
.game-card.cc:hover {
  border-color: rgba(255,120,120,.5);
  box-shadow: 0 24px 70px rgba(0,0,0,.48), 0 0 30px rgba(190,0,22,.24);
}

.resource-card::before,
.tool-card::before {
  content: attr(data-ribbon);
  position: absolute;
  top: 15px;
  right: -48px;
  z-index: 3;
  min-width: 160px;
  padding: 4px 12px;
  transform: rotate(34deg);
  text-align: center;
  font-family: var(--mono);
  font-size: .68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .09em;
  color: #05070b;
  background: rgba(245,247,251,.88);
  box-shadow: 0 6px 18px rgba(0,0,0,.2);
}

.resource-card.awake-card::before,
.tool-card.awake-card::before { background: rgba(158,199,255,.92); }
.resource-card.cc-card::before,
.tool-card.cc-card::before { background: rgba(255,210,190,.92); }

.cc-card[data-stamp]::after {
  content: attr(data-stamp);
  position: absolute;
  right: 18px;
  bottom: 78px;
  z-index: 0;
  max-width: 190px;
  border: 2px solid rgba(255,92,92,.30);
  border-radius: 10px;
  padding: 7px 10px;
  color: rgba(255,120,120,.30);
  font-family: var(--cc-heading);
  font-size: .88rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  transform: rotate(-7deg);
  pointer-events: none;
}

.cc-card > *, .awake-card > * { position: relative; z-index: 1; }

.awake-theme,
.cc-theme { isolation: isolate; }
.awake-theme > *,
.cc-theme > * { position: relative; z-index: 2; }

.awake-theme::before {
  content: "";
  position: absolute;
  inset: -10%;
  z-index: 0;
  opacity: .62;
  transform: translate3d(0, var(--awake-parallax), 0);
  background-image:
    radial-gradient(circle at 12% 18%, rgba(255,255,255,.95) 0 1px, transparent 1.4px),
    radial-gradient(circle at 38% 72%, rgba(158,199,255,.82) 0 1px, transparent 1.5px),
    radial-gradient(circle at 68% 28%, rgba(255,255,255,.76) 0 1px, transparent 1.4px),
    radial-gradient(circle at 86% 64%, rgba(255,255,255,.72) 0 1px, transparent 1.5px);
  background-size: 240px 240px, 360px 360px, 480px 480px, 620px 620px;
  pointer-events: none;
}

.awake-theme::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  opacity: .18;
  background: linear-gradient(180deg, transparent, rgba(158,199,255,.12), transparent), repeating-linear-gradient(0deg, rgba(255,255,255,.035) 0 1px, transparent 1px 6px);
  pointer-events: none;
}

.cc-theme::before {
  content: "";
  position: absolute;
  inset: -2px;
  z-index: 0;
  opacity: .78;
  background:
    radial-gradient(circle at 0% 18%, rgba(190,0,24,.34), transparent 24rem),
    radial-gradient(circle at 100% 82%, rgba(255,46,46,.25), transparent 28rem),
    linear-gradient(90deg, rgba(140,0,14,.20), transparent 20%, transparent 80%, rgba(140,0,14,.20));
  box-shadow: inset 0 0 70px rgba(200,0,22,.18), inset 0 0 18px rgba(255,80,80,.10);
  pointer-events: none;
}

.cc-theme::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  opacity: .20;
  background: repeating-linear-gradient(90deg, rgba(255,0,0,.08) 0 1px, transparent 1px 11px);
  animation: containmentFlicker 9s steps(2, end) infinite;
  pointer-events: none;
}

@keyframes containmentFlicker {
  0%, 72%, 100% { opacity: .14; }
  74% { opacity: .30; }
  76% { opacity: .09; }
  80% { opacity: .24; }
}

body[data-zone="awake"] .section-indicator { border-color: rgba(158,199,255,.32); }
body[data-zone="cultists"] .section-indicator { border-color: rgba(255,110,110,.38); }

@media (max-width: 980px) {
  .mission-trajectory { display: none; }
  .section-indicator { left: 16px; right: 16px; bottom: 14px; min-width: 0; width: auto; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .reveal-lock { opacity: 1; transform: none; filter: none; }
}

/* v1.0.8 polish corrections */
.about-logo-panel { position: relative; overflow: hidden; }
.hero-logo-panel .logo-img,
.about-logo-panel .logo-img { position: relative; z-index: 1; }
.btn.disabled::after,
.btn:disabled::after,
.btn.soon::after { content: ""; margin-left: 0; }


/* v1.1.0 art integration and publishing-readiness additions */
.link-note {
  margin-top: 10px;
  color: var(--muted);
  font-size: .88rem;
  font-family: var(--mono);
}

.start-here-panel {
  margin-top: 22px;
  display: grid;
  grid-template-columns: 1.1fr auto;
  gap: 18px;
  align-items: center;
  background: linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.03));
}
.start-here-panel h3 { margin-bottom: 8px; }
.start-here-panel p { margin-bottom: 0; }
.start-here-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}
.start-here-panel .utility-note {
  grid-column: 1 / -1;
  margin-top: -2px;
  color: var(--muted);
  font-size: .9rem;
}

.cc-feature-hero {
  margin-bottom: 22px;
  padding: 0;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(19,0,4,.96), rgba(8,0,2,.98));
}
.cc-feature-media {
  position: relative;
}
.cc-feature-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,.05), rgba(0,0,0,.12) 38%, rgba(4,0,1,.58));
  pointer-events: none;
}
.cc-hero-art {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  object-position: center 34%;
  filter: contrast(1.02) brightness(.96);
}
.cc-feature-copy {
  padding: 20px 22px 22px;
}
.cc-feature-copy p {
  max-width: 60ch;
  margin-bottom: 0;
}

.art-section-intro {
  margin-top: 28px;
  margin-bottom: 16px;
}
.art-gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.art-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: rgba(12,8,10,.78);
}
.art-card-media {
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.1);
  margin-bottom: 14px;
  background: rgba(255,255,255,.03);
}
.art-card-media img {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  filter: contrast(1.02) brightness(.985);
  transition: transform .3s ease;
}
.art-card:hover .art-card-media img { transform: scale(1.018); }
.art-card p { margin-bottom: 0; }

@media (max-width: 980px) {
  .start-here-panel { grid-template-columns: 1fr; }
  .start-here-actions { justify-content: flex-start; }
  .art-gallery { grid-template-columns: 1fr; }
}


/* v1.1.2 Awake art integration */
.awake-feature-hero,
.awake-feature-panel {
  margin-bottom: 22px;
  padding: 0;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(5,9,14,.96), rgba(3,5,10,.98));
}
.awake-feature-media,
.awake-support-media {
  position: relative;
}
.awake-feature-media::after,
.awake-support-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,.04), rgba(0,0,0,.12) 38%, rgba(3,5,10,.62));
  pointer-events: none;
}
.awake-hero-art,
.awake-support-art {
  display: block;
  width: 100%;
  object-fit: cover;
  filter: contrast(1.02) brightness(.95);
}
.awake-hero-art {
  aspect-ratio: 16 / 9;
  object-position: center 34%;
}
.awake-support-art {
  aspect-ratio: 16 / 10;
  object-position: center 22%;
}
.awake-feature-copy {
  padding: 20px 22px 22px;
}
.awake-feature-copy p {
  max-width: 66ch;
  margin-bottom: 0;
}
.awake-art-intro { margin-top: 28px; margin-bottom: 16px; }
.awake-art-gallery .art-card {
  background: rgba(7,12,18,.82);
}
.awake-art-gallery .art-card-media {
  border-color: rgba(158,199,255,.18);
  background: rgba(158,199,255,.04);
}
.awake-art-gallery .art-card-media img {
  filter: contrast(1.03) brightness(.98);
}

/* v1.1.6 collapsible utility sections */
.collapsible-section {
  scroll-margin-top: 84px;
}
.collapse-shell {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(255,255,255,.055), rgba(255,255,255,.025));
  box-shadow: var(--shadow);
  overflow: hidden;
}
.collapse-shell[open] {
  border-color: rgba(255,255,255,.22);
}
.collapse-summary {
  list-style: none;
  cursor: pointer;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 22px;
  user-select: none;
}
.collapse-summary::-webkit-details-marker {
  display: none;
}
.collapse-summary:focus-visible {
  outline: 2px solid rgba(var(--active-zone-accent), .72);
  outline-offset: -4px;
}
.collapse-mark {
  width: 34px;
  height: 34px;
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 50%;
  position: relative;
  background:
    radial-gradient(circle at 50% 50%, rgba(var(--active-zone-accent), .18), transparent 58%),
    rgba(255,255,255,.035);
  box-shadow: inset 0 0 16px rgba(255,255,255,.04), 0 0 18px rgba(var(--active-zone-accent), .08);
  transition: transform .22s ease, border-color .22s ease, box-shadow .22s ease;
}
.collapse-mark::before,
.collapse-mark::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 13px;
  height: 2px;
  border-radius: 2px;
  background: rgba(245,247,251,.92);
  transform: translate(-50%, -50%);
  transition: transform .22s ease, opacity .22s ease;
}
.collapse-mark::after {
  transform: translate(-50%, -50%) rotate(90deg);
}
.collapse-shell[open] .collapse-mark {
  transform: rotate(45deg);
  border-color: rgba(var(--active-zone-accent), .48);
  box-shadow: inset 0 0 18px rgba(255,255,255,.06), 0 0 24px rgba(var(--active-zone-accent), .18);
}
.collapse-title-group {
  min-width: 0;
}
.collapse-heading {
  display: block;
  margin-top: 4px;
  font-family: var(--apogee-heading);
  font-size: clamp(1.8rem, 3.2vw, 2.8rem);
  line-height: .95;
  color: var(--text);
  letter-spacing: -.025em;
}
.collapse-preview {
  display: block;
  margin-top: 10px;
  max-width: 72ch;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 1.02rem;
  line-height: 1.55;
}
.collapse-state {
  align-self: center;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 999px;
  padding: 8px 12px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: .84rem;
  text-transform: uppercase;
  letter-spacing: .09em;
  transition: color .22s ease, border-color .22s ease, background .22s ease;
}
.collapse-shell[open] .collapse-state {
  color: var(--text);
  border-color: rgba(var(--active-zone-accent), .42);
  background: rgba(var(--active-zone-accent), .08);
}
.collapse-shell[open] .collapse-state::before {
  content: "Collapse";
}
.collapse-shell:not([open]) .collapse-state::before {
  content: "Expand";
}
.collapse-state {
  font-size: 0;
}
.collapse-state::before {
  font-size: .84rem;
}
.collapse-content {
  border-top: 1px solid rgba(255,255,255,.10);
  padding: 0 22px 22px;
  animation: collapseReveal .22s ease both;
}
.collapse-grid {
  margin-top: 22px;
}
.store-collapse .collapse-heading,
.legal-collapse .collapse-heading,
.updates-collapse .collapse-heading {
  font-family: var(--apogee-heading);
}
.store-collapse .collapse-summary:hover .collapse-mark,
.legal-collapse .collapse-summary:hover .collapse-mark,
.updates-collapse .collapse-summary:hover .collapse-mark {
  border-color: rgba(var(--active-zone-accent), .44);
  box-shadow: inset 0 0 16px rgba(255,255,255,.05), 0 0 24px rgba(var(--active-zone-accent), .15);
}
@keyframes collapseReveal {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}
@media (max-width: 720px) {
  .collapse-summary {
    grid-template-columns: auto 1fr;
    gap: 12px;
  }
  .collapse-state {
    grid-column: 2;
    justify-self: start;
  }
  .collapse-preview {
    font-size: .95rem;
  }
}


/* v1.1.7 full section collapse system */
.main-collapsible-section .container {
  position: relative;
}
.main-collapse {
  position: relative;
  overflow: hidden;
}
.main-collapse.game-collapse {
  background: linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.022));
}
.awake-theme .main-collapse,
.awake-theme .subsection-collapse {
  border-color: rgba(158,199,255,.18);
  background: linear-gradient(180deg, rgba(8,13,20,.90), rgba(3,5,10,.78));
}
.cc-theme .main-collapse,
.cc-theme .subsection-collapse {
  border-color: rgba(255,100,100,.16);
  background: linear-gradient(180deg, rgba(22,3,6,.90), rgba(8,0,2,.82));
}
.games-collapse .collapse-heading,
.about-collapse .collapse-heading,
.contact-collapse .collapse-heading {
  font-family: var(--apogee-heading);
}
.awake-collapse .collapse-heading {
  font-family: var(--awake-heading);
  letter-spacing: .015em;
}
.cultists-collapse .collapse-heading {
  font-family: var(--cc-heading);
  letter-spacing: .015em;
}
.collapsible-subsection {
  margin-top: 24px;
  scroll-margin-top: 96px;
}
.subsection-collapse {
  box-shadow: 0 18px 50px rgba(0,0,0,.26);
}
.subsection-summary {
  padding: 18px 20px;
}
.subsection-collapse .collapse-heading {
  font-size: clamp(1.28rem, 2.25vw, 1.9rem);
  line-height: 1.05;
}
.subsection-collapse .collapse-preview {
  font-size: .94rem;
  max-width: 78ch;
}
.subsection-collapse .collapse-mark {
  width: 30px;
  height: 30px;
}
.subsection-content {
  padding-top: 18px;
}
.main-collapse[open] > .collapse-content {
  padding-top: 6px;
}
.main-collapse:not([open]) .collapse-summary,
.subsection-collapse:not([open]) .collapse-summary {
  min-height: 104px;
}
.subsection-collapse:not([open]) .collapse-summary {
  min-height: 88px;
}
.main-collapse .grid.two,
.main-collapse .grid.three,
.main-collapse .quick-panel,
.main-collapse .game-logo-band,
.main-collapse .button-row,
.main-collapse .card {
  position: relative;
}
@media (max-width: 720px) {
  .main-collapse:not([open]) .collapse-summary,
  .subsection-collapse:not([open]) .collapse-summary {
    min-height: 0;
  }
}

/* v1.1.9 collapse state indicators */
.btn[data-toggle-collapse] {
  gap: 10px;
  border-color: rgba(255,255,255,.22);
}
.btn[data-toggle-collapse]::before {
  content: "";
  width: .78rem;
  height: .78rem;
  flex: 0 0 auto;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.38);
  background: var(--toggle-dot, rgba(217,181,108,.92));
  box-shadow:
    0 0 0 3px rgba(255,255,255,.035),
    0 0 16px var(--toggle-glow, rgba(217,181,108,.24));
}
.btn[data-toggle-collapse]::after {
  content: attr(data-toggle-state);
  border-left: 1px solid rgba(255,255,255,.14);
  padding-left: 10px;
  color: var(--toggle-label, var(--muted));
  font-family: var(--mono);
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .10em;
  text-transform: uppercase;
}
.btn[data-toggle-collapse].toggle-expanded {
  --toggle-dot: rgba(102, 214, 148, .95);
  --toggle-glow: rgba(102, 214, 148, .30);
  --toggle-label: #aeecc7;
  border-color: rgba(102, 214, 148, .34);
}
.btn[data-toggle-collapse].toggle-collapsed {
  --toggle-dot: rgba(198, 61, 76, .95);
  --toggle-glow: rgba(198, 61, 76, .30);
  --toggle-label: #f0a4ad;
  border-color: rgba(198, 61, 76, .34);
}
.btn[data-toggle-collapse].toggle-mixed {
  --toggle-dot: rgba(217, 181, 108, .95);
  --toggle-glow: rgba(217, 181, 108, .28);
  --toggle-label: #ecd39c;
  border-color: rgba(217, 181, 108, .30);
}
.btn[data-toggle-collapse]:hover {
  border-color: var(--toggle-dot, rgba(255,255,255,.5));
  box-shadow: 0 0 22px var(--toggle-glow, rgba(255,255,255,.10));
}
.awake-theme .btn[data-toggle-collapse].toggle-expanded {
  --toggle-dot: rgba(118, 225, 174, .96);
  --toggle-glow: rgba(118, 225, 174, .28);
}
.awake-theme .btn[data-toggle-collapse].toggle-collapsed {
  --toggle-dot: rgba(214, 75, 92, .96);
  --toggle-glow: rgba(214, 75, 92, .28);
}
.cc-theme .btn[data-toggle-collapse].toggle-expanded {
  --toggle-dot: rgba(117, 218, 143, .96);
  --toggle-glow: rgba(117, 218, 143, .28);
}
.cc-theme .btn[data-toggle-collapse].toggle-collapsed {
  --toggle-dot: rgba(230, 58, 73, .96);
  --toggle-glow: rgba(230, 58, 73, .30);
}
@media (max-width: 620px) {
  .btn[data-toggle-collapse]::after {
    display: none;
  }
}
