/* satgambit.com — shared styles.
   Tokens mirror the app (satgambit_app/lib/core/theme/app_colors.dart,
   THEME_DESIGN.md). The game is dark-only, so the site is too. */

@font-face { font-family: "Exo 2"; src: url("../fonts/Exo2-VariableFont_wght.woff") format("woff"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Space Mono"; src: url("../fonts/SpaceMono-Regular.woff") format("woff"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Space Mono"; src: url("../fonts/SpaceMono-Bold.woff") format("woff"); font-weight: 700; font-display: swap; }

:root {
  --space-black: #070A14;
  --deep-navy: #0D1526;
  --dark-panel: #111827;
  --grid-line: #1E293B;
  --cyan: #00E5FF;
  --soft-cyan: #38BDF8;
  --purple: #A855F7;
  --green: #22C55E;
  --blue: #3B82F6;
  --gold: #F59E0B;
  --orange: #F97316;
  --text: #E2E8F0;
  --text-2: #94A3B8;
  --text-3: #64748B;
  --glass: rgba(13, 21, 38, 0.72);
  --line: rgba(0, 229, 255, 0.16);
  --line-strong: rgba(0, 229, 255, 0.42);
  --brand-grad: linear-gradient(92deg, #ffffff 0%, var(--cyan) 38%, var(--soft-cyan) 62%, var(--purple) 100%);
  --mono: "Space Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
  --sans: "Exo 2", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --gutter: clamp(16px, 4vw, 40px);
  --maxw: 1180px;
  --nav-h: 60px;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 12px); -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--space-black);
  color: var(--text);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img, video, svg { display: block; max-width: 100%; }
a { color: var(--cyan); text-decoration-thickness: 1px; text-underline-offset: 3px; }
::selection { background: rgba(0, 229, 255, 0.3); color: #fff; }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; border-radius: 4px; }

/* Fixed starfield behind everything (drawn once by site.js). */
#stars { position: fixed; inset: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none; }

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); }
.mono { font-family: var(--mono); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Telemetry label: the house "kicker" ---------- */
.kicker {
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--cyan);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 14px;
}
.kicker::before {
  content: "";
  width: 8px; height: 8px;
  border: 1.5px solid currentColor;
  border-radius: 50%;
  box-shadow: 0 0 10px currentColor;
}
.kicker.orange { color: var(--orange); }
.kicker.purple { color: var(--purple); }
.kicker.gold { color: var(--gold); }

h1, h2, h3 { font-family: var(--sans); margin: 0; line-height: 1.05; letter-spacing: -0.01em; }
h2 { font-size: clamp(2rem, 5.2vw, 3.6rem); font-weight: 800; }
h3 { font-size: 1.3rem; font-weight: 700; line-height: 1.2; }
.grad { background: var(--brand-grad); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 0 18px rgba(0, 229, 255, 0.25)); }
.grad-orange { background: linear-gradient(92deg, #FDBA74, var(--orange) 55%, #F43F5E); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 0 18px rgba(249, 115, 22, 0.3)); }
.lede { color: var(--text-2); font-size: clamp(1.02rem, 1.6vw, 1.15rem); max-width: 60ch; }

/* ---------- Section frame: index + tick ruler ---------- */
.section { position: relative; padding: clamp(80px, 12vw, 150px) 0; }
.section-head { display: grid; gap: 18px; margin-bottom: clamp(36px, 6vw, 64px); }
.ruler {
  display: flex; align-items: center; gap: 14px;
  font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.2em; color: var(--text-3);
  text-transform: uppercase; margin-bottom: 26px;
}
.ruler .idx { color: var(--text); }
.ruler::after {
  content: ""; flex: 1; height: 9px;
  background:
    linear-gradient(var(--line-strong), var(--line-strong)) left center / 100% 1px no-repeat,
    repeating-linear-gradient(90deg, var(--line) 0 1px, transparent 1px 12px) left bottom / 100% 5px no-repeat,
    repeating-linear-gradient(90deg, var(--line-strong) 0 1px, transparent 1px 96px) left bottom / 100% 9px no-repeat;
}

/* ---------- Glass panel with HUD corner brackets ---------- */
.panel {
  position: relative;
  background: var(--glass);
  border: 1px solid var(--line);
  border-radius: 14px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.brackets::before, .brackets::after {
  content: ""; position: absolute; width: 14px; height: 14px; pointer-events: none;
  border-color: var(--cyan); border-style: solid; opacity: 0.85;
}
.brackets::before { top: -1px; left: -1px; border-width: 2px 0 0 2px; border-top-left-radius: 14px; }
.brackets::after { bottom: -1px; right: -1px; border-width: 0 2px 2px 0; border-bottom-right-radius: 14px; }

/* ---------- Buttons ---------- */
.play-badge { display: inline-block; line-height: 0; border-radius: 10px; transition: transform .2s, filter .2s; }
/* The official badge PNG carries Google's clear space (41/250 px each side);
   scale it up and pull that margin back in so the visible badge is ~52 px. */
.play-badge img { height: 78px; width: auto; margin: -13px; }
.play-badge:hover { transform: translateY(-2px); filter: drop-shadow(0 8px 24px rgba(0, 229, 255, 0.28)); }
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--mono); font-size: 0.8rem; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase;
  text-decoration: none; color: var(--cyan);
  padding: 14px 20px; border-radius: 10px;
  border: 1px solid var(--line-strong);
  background: rgba(0, 229, 255, 0.06);
  cursor: pointer;
  transition: background .2s, border-color .2s, transform .2s;
}
.btn:hover { background: rgba(0, 229, 255, 0.13); border-color: var(--cyan); transform: translateY(-1px); }
.btn.orange { color: var(--orange); border-color: rgba(249, 115, 22, 0.45); background: rgba(249, 115, 22, 0.07); }
.btn.orange:hover { background: rgba(249, 115, 22, 0.15); border-color: var(--orange); }
.btn svg { width: 16px; height: 16px; }

/* ---------- Nav ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  height: var(--nav-h);
  display: flex; align-items: center;
  background: linear-gradient(to bottom, rgba(7, 10, 20, 0.92), rgba(7, 10, 20, 0.6));
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s, background .3s;
}
.nav.scrolled { border-bottom-color: var(--line); background: rgba(7, 10, 20, 0.88); }
.nav .wrap { display: flex; align-items: center; gap: 28px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); flex-shrink: 0; }
.brand img { width: 30px; height: 30px; border-radius: 7px; }
.brand span { font-weight: 800; letter-spacing: 0.06em; font-size: 1.02rem; }
.brand span b { font-weight: 800; background: var(--brand-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.nav-links { display: flex; gap: 22px; margin: 0; padding: 0; list-style: none; }
.nav-links a {
  font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--text-2); text-decoration: none; transition: color .2s;
}
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--cyan); }
/* Flight log: the one nav item that should catch a returning player's eye. */
.nav-log {
  margin-left: auto;
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--gold); text-decoration: none; white-space: nowrap;
  padding: 7px 12px 7px 10px; border-radius: 999px;
  border: 1px solid rgba(245, 158, 11, 0.45);
  background: rgba(245, 158, 11, 0.08);
  transition: background .2s, border-color .2s, box-shadow .2s;
}
.nav-log:hover, .nav-log[aria-current="page"] { background: rgba(245, 158, 11, 0.16); border-color: var(--gold); box-shadow: 0 0 18px rgba(245, 158, 11, 0.25); }
.nav-log i { width: 7px; height: 7px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.7); animation: logPulse 2.4s ease-out infinite; }
.nav-log b { font-weight: 700; color: var(--space-black); background: var(--gold); border-radius: 999px; padding: 1px 7px; letter-spacing: 0.04em; }
.nav-log b:empty { display: none; }
@keyframes logPulse { 0% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.7); } 70%, 100% { box-shadow: 0 0 0 8px rgba(245, 158, 11, 0); } }
@media (prefers-reduced-motion: reduce) { .nav-log i { animation: none; } }

/* Language picker */
.lang { position: relative; }
.lang-btn {
  display: inline-flex; align-items: center; gap: 6px; cursor: pointer;
  font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.1em; color: var(--text-2);
  background: transparent; border: 1px solid rgba(148, 163, 184, 0.22); border-radius: 8px; padding: 7px 9px;
  transition: color .2s, border-color .2s;
}
.lang-btn svg { width: 15px; height: 15px; }
.lang-btn:hover, .lang.open .lang-btn { color: var(--cyan); border-color: var(--line-strong); }
.lang-menu {
  position: absolute; right: 0; top: calc(100% + 8px); min-width: 170px; z-index: 60;
  list-style: none; margin: 0; padding: 6px;
  background: rgba(13, 21, 38, 0.97); border: 1px solid var(--line-strong); border-radius: 12px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.55);
  opacity: 0; transform: translateY(-4px); pointer-events: none; transition: opacity .15s, transform .15s;
}
.lang.open .lang-menu { opacity: 1; transform: none; pointer-events: auto; }
.lang-menu button {
  width: 100%; display: flex; align-items: center; gap: 10px; cursor: pointer;
  background: transparent; border: 0; border-radius: 8px; padding: 9px 10px;
  color: var(--text); font: inherit; font-size: 0.95rem; text-align: left;
}
.lang-menu button b { font-family: var(--mono); font-size: 0.7rem; color: var(--text-3); width: 22px; }
.lang-menu button:hover { background: rgba(0, 229, 255, 0.08); }
.lang-menu button[aria-checked="true"] { color: var(--cyan); }
.lang-menu button[aria-checked="true"] b { color: var(--cyan); }

/* Hide the page until a non-English dictionary is applied (max 2.5 s). */
.i18n-pending body { visibility: hidden; }

.nav-cta {
  font-family: var(--mono); font-size: 0.72rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase;
  text-decoration: none; color: var(--space-black);
  background: var(--cyan); padding: 9px 14px; border-radius: 8px; white-space: nowrap;
  box-shadow: 0 0 22px rgba(0, 229, 255, 0.35);
  transition: box-shadow .2s, transform .2s;
}
.nav-cta:hover { box-shadow: 0 0 34px rgba(0, 229, 255, 0.6); transform: translateY(-1px); }
.nav .wrap { gap: 14px; }
.nav-links { margin-right: 6px; }
@media (max-width: 1060px) { .nav-links { display: none; } }
@media (max-width: 560px) {
  .brand span { display: none; }
  .nav-cta { display: none; }
  .nav-log { letter-spacing: 0.06em; padding: 6px 9px 6px 8px; gap: 6px; }
  .lang-btn svg { flex-shrink: 0; }
}

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--line); padding: 56px 0 44px; color: var(--text-3); font-size: 0.9rem; }
.footer .wrap { display: grid; gap: 28px; grid-template-columns: 1.4fr 1fr 1fr; }
.footer h4 { font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--text-2); margin: 0 0 14px; font-weight: 400; }
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.footer a { color: var(--text-2); text-decoration: none; }
.footer a:hover { color: var(--cyan); }
.footer .legal { grid-column: 1 / -1; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; padding-top: 24px; border-top: 1px solid rgba(30, 41, 59, 0.7); font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.06em; }
.footer p { margin: 10px 0 0; max-width: 40ch; }
@media (max-width: 760px) { .footer .wrap { grid-template-columns: 1fr 1fr; } .footer .about { grid-column: 1 / -1; } }

/* ---------- Social icon row ---------- */
/* Big, brand-coloured follow buttons: they should be impossible to miss. */
.socials { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.social {
  display: flex; align-items: center; gap: 16px;
  padding: 18px 22px; border-radius: 14px;
  color: #fff; text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.4);
  transition: transform .2s, box-shadow .2s, filter .2s;
}
.social svg { width: 34px; height: 34px; fill: currentColor; flex-shrink: 0; }
.social span { display: grid; font-weight: 800; font-size: 1.3rem; line-height: 1.1; }
.social small { font-family: var(--mono); font-weight: 400; font-size: 0.66rem; letter-spacing: 0.16em; text-transform: uppercase; opacity: 0.85; margin-bottom: 4px; }
.social:hover { transform: translateY(-3px); filter: brightness(1.08); }
.social.yt { background: linear-gradient(135deg, #FF3B30, #C4121A); }
.social.yt:hover { box-shadow: 0 18px 40px rgba(255, 0, 0, 0.3); }
.social.ig { background: linear-gradient(135deg, #FEDA75 0%, #FA7E1E 25%, #D62976 55%, #962FBF 80%, #4F5BD5 100%); }
.social.ig:hover { box-shadow: 0 18px 40px rgba(214, 41, 118, 0.35); }
.social.tt { background: #000; border-color: rgba(255, 255, 255, 0.22); }
.social.tt svg { filter: drop-shadow(-2px -1px 0 #25F4EE) drop-shadow(2px 1px 0 #FE2C55); }
.social.tt:hover { box-shadow: 0 18px 40px rgba(37, 244, 238, 0.2); }
.social[hidden] { display: none; }

/* ---------- Scroll reveal ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .8s cubic-bezier(.2, .7, .2, 1), transform .8s cubic-bezier(.2, .7, .2, 1); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } }
