/* ============================================================
   NOVA CLASH: FLEET COMMAND — marketing site
   Palette + type tokens from the game UI (see build brief §7).
   ============================================================ */

:root {
  /* Surfaces */
  --bg:        #0A0E1A;
  --panel:     #1C2642;
  --panel-lt:  #2B3859;

  /* Accents */
  --nova:      #52A8FF; /* primary */
  --energy:    #8CCCFF; /* secondary glow */
  --gold:      #FFE666; /* premium highlight */
  --attack:    #FFB84D; /* stat / energy */
  --hull:      #73E68C; /* positive / free */
  --target:    #FF6666; /* warning / excluded */

  /* Faction accents */
  --f-nova:     #52A8FF;
  --f-vexari:   #8CD959;
  --f-mechron:  #FF9940;
  --f-corsairs: #D966D9;
  --f-solari:   #FFD14D;
  --f-hollow:   #9E59F2;

  /* Text */
  --ink:       #FFFFFF;
  --ink-dim:   rgba(255,255,255,0.70);
  --ink-faint: rgba(255,255,255,0.45);
  --line:      rgba(255,255,255,0.10);

  /* Type */
  --head: "SF Pro Display", "Helvetica Neue", "Segoe UI", system-ui, -apple-system, sans-serif;
  --body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --maxw: 1180px;
  --radius: 16px;
  --nav-h: 66px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 10px); }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation: none !important; transition: none !important; }
}

img { max-width: 100%; display: block; }
a { color: var(--nova); text-decoration: none; }
a:hover { color: var(--energy); }

/* ---------- Typography ---------- */
h1, h2, h3, .eyebrow, .wordmark {
  font-family: var(--head);
  font-weight: 800;
  letter-spacing: 0.04em;
  line-height: 1.08;
  margin: 0;
}
h2 { font-size: clamp(1.7rem, 4vw, 2.6rem); text-transform: uppercase; letter-spacing: 0.06em; }
h3 { font-size: 1.25rem; text-transform: uppercase; letter-spacing: 0.05em; }
p  { margin: 0 0 1rem; color: var(--ink-dim); }
.lead { font-size: 1.15rem; color: var(--ink-dim); }

.eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--nova);
  margin-bottom: 0.8rem;
}

/* ---------- Layout ---------- */
.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
section { padding: clamp(64px, 9vw, 120px) 0; position: relative; }
.section-head { max-width: 720px; margin: 0 auto clamp(36px, 5vw, 60px); text-align: center; }
.section-head p { margin-top: 0.5rem; }

.divider { border: 0; height: 1px; background: var(--line); margin: 0; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 0.55rem;
  font-family: var(--head); font-weight: 700; letter-spacing: 0.06em;
  text-transform: uppercase; font-size: 0.9rem;
  padding: 0.85rem 1.5rem; border-radius: 999px;
  border: 1px solid transparent; cursor: pointer;
  transition: transform .15s ease, box-shadow .2s ease, background .2s ease;
}
.btn-primary {
  background: linear-gradient(180deg, var(--nova), #2E7BD6);
  color: #05101f;
  box-shadow: 0 6px 22px rgba(82,168,255,0.35), inset 0 1px 0 rgba(255,255,255,0.25);
}
.btn-primary:hover { transform: translateY(-2px); color: #05101f; box-shadow: 0 10px 30px rgba(82,168,255,0.5); }
.btn-ghost { border-color: var(--line); color: var(--ink); background: rgba(255,255,255,0.03); }
.btn-ghost:hover { border-color: var(--nova); color: var(--ink); background: rgba(82,168,255,0.10); }

/* App Store badge (self-contained CSS badge — swap for Apple's official badge asset when live) */
.appstore {
  display: inline-flex; align-items: center; gap: 0.7rem;
  background: #000; border: 1px solid rgba(255,255,255,0.28);
  border-radius: 12px; padding: 0.55rem 1.15rem; color: #fff;
  transition: transform .15s ease, border-color .2s ease;
}
.appstore:hover { transform: translateY(-2px); border-color: rgba(255,255,255,0.6); color: #fff; }
.appstore svg { width: 26px; height: 26px; flex: none; }
.appstore .small { font-size: 0.66rem; line-height: 1; color: var(--ink-dim); text-transform: uppercase; letter-spacing: 0.08em; }
.appstore .big { font-family: var(--head); font-size: 1.2rem; font-weight: 700; line-height: 1.15; }
.appstore[aria-disabled="true"] { opacity: 0.85; }

/* ---------- Nav ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; height: var(--nav-h); z-index: 100;
  display: flex; align-items: center;
  background: rgba(10,14,26,0.55); backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent; transition: background .25s ease, border-color .25s ease;
}
.nav.scrolled { background: rgba(10,14,26,0.9); border-bottom-color: var(--line); }
.nav .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.brand { display: flex; align-items: center; gap: 0.6rem; }
.brand img { width: 34px; height: 34px; border-radius: 8px; }
.brand b { font-family: var(--head); font-weight: 800; letter-spacing: 0.14em; font-size: 0.95rem; text-transform: uppercase; }
.brand b span { color: var(--nova); }
.nav-links { display: flex; align-items: center; gap: 1.6rem; }
.nav-links a { color: var(--ink-dim); font-size: 0.9rem; font-weight: 500; letter-spacing: 0.02em; }
.nav-links a:hover { color: var(--ink); }
.nav-cta { display: flex; align-items: center; gap: 0.8rem; }
.nav-toggle { display: none; background: none; border: 0; color: var(--ink); cursor: pointer; padding: 6px; }
.nav-toggle svg { width: 26px; height: 26px; }

@media (max-width: 900px) {
  .nav-links {
    position: fixed; inset: var(--nav-h) 0 auto 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: rgba(10,14,26,0.97); border-bottom: 1px solid var(--line);
    padding: 8px 0; transform: translateY(-120%); transition: transform .28s ease;
  }
  .nav-links.open { transform: translateY(0); }
  .nav-links a { padding: 14px 24px; border-top: 1px solid var(--line); }
  .nav-toggle { display: inline-flex; }
  .nav .nav-cta .btn, .nav .nav-cta .appstore { display: none; }
}

/* ---------- Hero ---------- */
.hero {
  min-height: 100svh; display: flex; align-items: center;
  padding-top: calc(var(--nav-h) + 40px); padding-bottom: 60px;
  position: relative; overflow: hidden; text-align: center;
}
.hero::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(10,14,26,0.55) 0%, rgba(10,14,26,0.8) 55%, var(--bg) 100%),
              image-set(url("assets/bg/hero.jpg")) center/cover no-repeat;
  background: linear-gradient(180deg, rgba(10,14,26,0.55) 0%, rgba(10,14,26,0.8) 55%, var(--bg) 100%),
              url("assets/bg/hero.jpg") center/cover no-repeat;
  z-index: -2;
}
.hero::after { /* vignette + top glow */
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: radial-gradient(80% 55% at 50% 30%, rgba(82,168,255,0.14), transparent 70%);
}
.hero .wordmark { font-size: clamp(2.6rem, 9vw, 6rem); font-weight: 900; letter-spacing: 0.06em; text-transform: uppercase; }
.hero .wordmark span { color: var(--nova); text-shadow: 0 0 34px rgba(82,168,255,0.55); }
.hero .sub {
  font-family: var(--head); font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.42em; font-size: clamp(0.75rem, 2vw, 1rem);
  color: var(--energy); margin-top: 0.6rem;
}
.hero .tagline { font-size: clamp(1.3rem, 3.4vw, 2rem); font-weight: 700; margin: 1.6rem 0 0.6rem; color: #fff; font-family: var(--head); letter-spacing: 0.02em; }
.hero .elevator { max-width: 620px; margin: 0 auto 1.8rem; color: var(--ink-dim); }
.hero-cta { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; align-items: center; }
.trustline {
  margin-top: 1.6rem; font-size: 0.85rem; color: var(--ink-faint);
  letter-spacing: 0.04em; display: inline-flex; gap: 0.6rem; flex-wrap: wrap; justify-content: center;
}
.trustline b { color: var(--hull); font-weight: 600; }

/* ---------- Feature blocks ---------- */
.feature {
  display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 80px);
  align-items: center; margin: 0 auto clamp(56px, 8vw, 96px); max-width: 1040px;
}
.feature:last-child { margin-bottom: 0; }
.feature:nth-child(even) .feature-media { order: -1; }
.feature-media { position: relative; }
.feature-media img { border-radius: var(--radius); border: 1px solid var(--line); width: 100%; }
.feature h3 { color: #fff; margin-bottom: 0.8rem; }
.feature .eyebrow { color: var(--energy); }

/* Device frame for gameplay shots */
.device {
  border-radius: 22px; padding: 10px;
  background: linear-gradient(160deg, #2B3859, #10182c);
  box-shadow: 0 24px 60px rgba(0,0,0,0.5), inset 0 1px 0 rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.08);
}
.device .screen {
  border-radius: 14px; overflow: hidden; aspect-ratio: 4/3;
  background: #05101f; position: relative;
  display: flex; align-items: flex-end;
}
.device .screen > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.device .screen .cap {
  position: relative; width: 100%; padding: 14px 16px; z-index: 1;
  background: linear-gradient(0deg, rgba(5,10,20,0.94) 20%, transparent);
  font-size: 0.82rem; color: var(--ink); letter-spacing: 0.02em;
}

@media (max-width: 760px) {
  .feature { grid-template-columns: 1fr; }
  .feature:nth-child(even) .feature-media { order: 0; }
}

/* ---------- Factions ---------- */
.factions-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; max-width: 1040px; margin: 0 auto;
}
.faction {
  --accent: var(--nova);
  position: relative; overflow: hidden;
  background: linear-gradient(180deg, var(--panel), rgba(28,38,66,0.4));
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px 24px; text-align: center;
  transition: transform .2s ease, border-color .2s ease, box-shadow .3s ease;
}
.faction::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 3px;
  background: var(--accent); opacity: 0.85;
}
.faction:hover {
  transform: translateY(-4px);
  border-color: color-mix(in srgb, var(--accent) 60%, transparent);
  box-shadow: 0 16px 40px color-mix(in srgb, var(--accent) 22%, transparent);
}
.faction img { width: 92px; height: 92px; margin: 4px auto 14px; filter: drop-shadow(0 0 18px color-mix(in srgb, var(--accent) 50%, transparent)); }
.faction h3 { color: #fff; font-size: 1.05rem; margin-bottom: 0.5rem; }
.faction h3 { color: var(--accent); }
.faction p { font-size: 0.92rem; margin: 0; color: var(--ink-dim); }
.faction .villain { position: absolute; top: 12px; right: 12px; font-size: 0.6rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent); border: 1px solid color-mix(in srgb, var(--accent) 50%, transparent); border-radius: 6px; padding: 2px 6px; }

@media (max-width: 820px) { .factions-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 500px) { .factions-grid { grid-template-columns: 1fr; } }

/* ---------- Stats strip ---------- */
.stats { background: var(--panel); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; text-align: center; }
.stat .num { font-family: var(--head); font-weight: 900; font-size: clamp(2rem, 5vw, 3rem); color: var(--nova); text-shadow: 0 0 24px rgba(82,168,255,0.3); }
.stat .lbl { font-size: 0.82rem; color: var(--ink-dim); letter-spacing: 0.04em; text-transform: uppercase; }
@media (max-width: 720px) { .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 30px; } }

/* ---------- Card showcase ---------- */
.cards-row {
  display: flex; justify-content: center; align-items: flex-end; gap: 0; flex-wrap: wrap;
  perspective: 1200px; padding: 20px 0;
}
.gcard {
  --accent: var(--nova);
  width: 190px; margin: 0 -14px; border-radius: 14px; position: relative;
  background: linear-gradient(180deg, var(--panel-lt), var(--panel));
  border: 1px solid color-mix(in srgb, var(--accent) 45%, var(--line));
  padding: 10px; box-shadow: 0 18px 40px rgba(0,0,0,0.5);
  transition: transform .25s ease, box-shadow .25s ease, z-index .1s;
}
.gcard:nth-child(odd)  { transform: rotate(-5deg) translateY(8px); }
.gcard:nth-child(even) { transform: rotate(4deg); }
.gcard:hover { transform: rotate(0deg) translateY(-16px) scale(1.05); z-index: 5; box-shadow: 0 26px 60px color-mix(in srgb, var(--accent) 30%, rgba(0,0,0,0.5)); }
.gcard .art {
  border-radius: 9px; aspect-ratio: 3/4; overflow: hidden; position: relative;
  background: radial-gradient(120% 90% at 50% 20%, color-mix(in srgb, var(--accent) 30%, #0a1226), #05101f);
  display: flex; align-items: center; justify-content: center;
}
.gcard .art img { width: 88%; filter: drop-shadow(0 6px 14px rgba(0,0,0,0.6)); }
.gcard .name { font-family: var(--head); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.06em; margin-top: 8px; text-align: center; color: #fff; }
.gcard .gem {
  position: absolute; width: 30px; height: 30px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--head); font-weight: 800; font-size: 0.9rem; color: #05101f;
  border: 2px solid rgba(255,255,255,0.7); box-shadow: 0 2px 6px rgba(0,0,0,0.5);
}
.gem.cost { top: 4px; left: 4px; background: var(--nova); }
.gem.atk  { top: 4px; right: 4px; background: var(--attack); }
.gem.hull { bottom: 40px; right: 4px; background: var(--hull); }
@media (max-width: 560px) { .gcard { width: 140px; } }

/* ---------- Screenshots gallery ---------- */
.gallery { display: grid; gap: 18px; max-width: 1040px; margin: 0 auto; grid-template-columns: 1fr 1fr 1fr; }
.shot {
  border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line);
  box-shadow: 0 18px 44px rgba(0,0,0,0.45); background: var(--panel); margin: 0;
  position: relative; transition: transform .2s ease, box-shadow .3s ease, border-color .2s ease;
}
.shot:hover { transform: translateY(-4px); border-color: color-mix(in srgb, var(--nova) 45%, transparent); box-shadow: 0 24px 56px rgba(82,168,255,0.22); }
.shot img { width: 100%; height: auto; display: block; aspect-ratio: 4/3; object-fit: cover; }
.shot figcaption {
  position: absolute; inset: auto 0 0 0; padding: 26px 16px 12px;
  background: linear-gradient(0deg, rgba(5,10,20,0.9), transparent);
  font-family: var(--head); text-transform: uppercase; letter-spacing: 0.06em;
  font-size: 0.72rem; color: #fff;
}
.shot.wide { grid-column: span 2; }
@media (max-width: 860px) { .gallery { grid-template-columns: 1fr 1fr; } .shot.wide { grid-column: span 2; } }
@media (max-width: 560px) { .gallery { grid-template-columns: 1fr; } .shot.wide { grid-column: span 1; } }

/* ---------- Pricing ---------- */
.pricing-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; max-width: 900px; margin: 0 auto; }
.price {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 32px 28px;
  position: relative;
}
.price.featured { border-color: color-mix(in srgb, var(--gold) 55%, transparent); box-shadow: 0 0 0 1px color-mix(in srgb, var(--gold) 30%, transparent), 0 20px 50px rgba(0,0,0,0.4); }
.price .tier { font-family: var(--head); text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.85rem; color: var(--ink-dim); }
.price .amt { font-family: var(--head); font-weight: 900; font-size: 2.4rem; margin: 6px 0 4px; }
.price.featured .amt { color: var(--gold); }
.price .amt small { font-size: 0.9rem; color: var(--ink-faint); font-weight: 500; letter-spacing: 0; }
.price ul { list-style: none; padding: 0; margin: 18px 0 0; }
.price li { display: flex; gap: 0.6rem; align-items: flex-start; padding: 7px 0; font-size: 0.95rem; color: var(--ink-dim); border-top: 1px solid var(--line); }
.price li:first-child { border-top: 0; }
.price li svg { width: 18px; height: 18px; flex: none; margin-top: 3px; }
.chk { color: var(--hull); } .no { color: var(--target); }
.ribbon { position: absolute; top: -12px; right: 22px; background: var(--gold); color: #05101f; font-family: var(--head); font-weight: 800; font-size: 0.7rem; letter-spacing: 0.08em; text-transform: uppercase; padding: 4px 12px; border-radius: 999px; }
@media (max-width: 720px) { .pricing-grid { grid-template-columns: 1fr; } }

/* Honesty callout */
.honesty {
  max-width: 900px; margin: 40px auto 0; text-align: center;
  background: linear-gradient(180deg, rgba(115,230,140,0.08), rgba(28,38,66,0.4));
  border: 1px solid color-mix(in srgb, var(--hull) 35%, transparent); border-radius: var(--radius);
  padding: 32px 28px;
}
.honesty h3 { color: var(--hull); margin-bottom: 0.6rem; }
.honesty p { color: var(--ink); font-size: 1.05rem; margin: 0; }

/* ---------- CTA ---------- */
.final-cta { text-align: center; position: relative; overflow: hidden; }
.final-cta::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgba(10,14,26,0.75), rgba(10,14,26,0.92)), url("assets/bg/cta.jpg") center/cover no-repeat;
}
.final-cta .wordmark { font-size: clamp(2rem, 6vw, 3.4rem); text-transform: uppercase; }
.final-cta .wordmark span { color: var(--nova); }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--line); padding: 56px 0 40px; background: #070a12; }
.footer-grid { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 30px; }
.footer .brand b { font-size: 1.05rem; }
.footer .tag { color: var(--ink-faint); font-size: 0.85rem; margin-top: 0.6rem; max-width: 320px; }
.footer nav { display: flex; gap: 40px; flex-wrap: wrap; }
.footer nav div h4 { font-family: var(--head); text-transform: uppercase; letter-spacing: 0.1em; font-size: 0.75rem; color: var(--ink-faint); margin: 0 0 12px; }
.footer nav a { display: block; color: var(--ink-dim); font-size: 0.9rem; padding: 4px 0; }
.footer nav a:hover { color: var(--nova); }
.footer .legal { margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--line); font-size: 0.8rem; color: var(--ink-faint); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; }

/* ---------- Content pages (legal/support/press) ---------- */
.page { padding-top: calc(var(--nav-h) + 60px); }
.doc { max-width: 780px; margin: 0 auto; }
.doc h1 { font-size: clamp(2rem, 5vw, 3rem); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 0.4rem; }
.doc .updated { color: var(--ink-faint); font-size: 0.85rem; margin-bottom: 2.4rem; }
.doc h2 { font-size: 1.3rem; text-transform: none; letter-spacing: 0.01em; margin: 2.2rem 0 0.6rem; color: #fff; }
.doc p, .doc li { color: var(--ink-dim); }
.doc ul { padding-left: 1.2rem; }
.doc li { margin-bottom: 0.5rem; }
.doc a { text-decoration: underline; text-underline-offset: 3px; }
.doc .callout { background: var(--panel); border: 1px solid var(--line); border-left: 3px solid var(--nova); border-radius: 10px; padding: 16px 20px; margin: 1.4rem 0; }

.faq details {
  background: var(--panel); border: 1px solid var(--line); border-radius: 12px;
  padding: 4px 20px; margin-bottom: 12px;
}
.faq summary { cursor: pointer; font-family: var(--head); font-size: 1rem; letter-spacing: 0.02em; padding: 14px 0; list-style: none; color: #fff; display: flex; justify-content: space-between; align-items: center; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--nova); font-size: 1.4rem; font-weight: 400; }
.faq details[open] summary::after { content: "\2212"; }
.faq details p { padding-bottom: 16px; margin: 0; }

/* Press kit */
.press-facts { display: grid; grid-template-columns: repeat(2,1fr); gap: 12px; margin: 1.5rem 0; }
.press-facts div { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; }
.press-facts dt { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--ink-faint); }
.press-facts dd { margin: 4px 0 0; color: #fff; font-weight: 600; }
.asset-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px,1fr)); gap: 14px; margin-top: 1rem; }
.asset-grid a { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 14px; text-align: center; font-size: 0.8rem; text-decoration: none; color: var(--ink-dim); transition: border-color .2s ease; }
.asset-grid a:hover { border-color: var(--nova); }
.asset-grid img { border-radius: 8px; margin-bottom: 10px; height: 90px; object-fit: contain; width: 100%; }
@media (max-width: 620px) { .press-facts { grid-template-columns: 1fr; } }

/* ---------- Scroll reveal ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ---------- Skip link ---------- */
.skip { position: absolute; left: -999px; top: 8px; background: var(--nova); color: #05101f; padding: 8px 16px; border-radius: 8px; z-index: 200; }
.skip:focus { left: 8px; }
:focus-visible { outline: 2px solid var(--energy); outline-offset: 3px; }
