/* Tower Control — colours from the game's own UI theme (scripts/ui_theme.gd). */
:root {
  color-scheme: dark;
  --bg: #080d0e;
  --panel: rgba(8, 13, 14, .82);
  --card: rgba(255, 255, 255, .035);
  --line: rgba(115, 230, 179, .14);
  --scope: #73ebad;
  --text: #dbe3eb;
  --muted: #8f9ca6;
  --amber: #ffc247;
  --amber-hi: #ffd47a;
  --font: "Segoe UI", Inter, -apple-system, BlinkMacSystemFont, Arial, sans-serif;
  --mono: "Cascadia Mono", Consolas, "SFMono-Regular", Menlo, monospace;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font); -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
::selection { background: var(--amber); color: var(--bg); }
a:focus-visible, button:focus-visible { outline: 2px solid var(--amber); outline-offset: 4px; }
code { padding: 1px 6px; border-radius: 4px; background: rgba(255, 255, 255, .06); color: var(--text); font-family: var(--mono); font-size: .86em; overflow-wrap: anywhere; }
.muted { color: var(--muted); }
.skip-link { position: fixed; top: 12px; left: 16px; z-index: 20; padding: 12px 18px; border-radius: 6px; background: var(--amber); color: var(--bg); transform: translateY(-180%); }
.skip-link:focus { transform: none; }

/* The trailer fills the window behind everything. */
.backdrop { position: fixed; inset: 0; z-index: -1; overflow: hidden; background: var(--bg) url('./media/poster.jpg') center / cover no-repeat; }
.backdrop video { width: 100%; height: 100%; object-fit: cover; }
.backdrop-shade {
  position: absolute; inset: 0;
  background:
    linear-gradient(90deg, rgba(8, 13, 14, .92) 0%, rgba(8, 13, 14, .55) 45%, rgba(8, 13, 14, .1) 75%),
    linear-gradient(0deg, rgba(8, 13, 14, .9) 0%, rgba(8, 13, 14, 0) 35%),
    radial-gradient(ellipse at center, transparent 55%, rgba(0, 0, 0, .5) 100%);
}
.backdrop-shade::after { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(0deg, rgba(0, 0, 0, .12) 0 1px, transparent 1px 3px); mix-blend-mode: multiply; }

.topbar { position: fixed; top: 0; left: 0; right: 0; z-index: 10; display: flex; justify-content: space-between; align-items: center; padding: 18px clamp(16px, 4vw, 48px); background: linear-gradient(rgba(8, 13, 14, .7), transparent); }
.brand { display: inline-flex; align-items: baseline; gap: 10px; }
.brand-wordmark { font-size: 20px; font-weight: 700; letter-spacing: -.6px; }
.brand-name { color: var(--muted); font-size: 12px; }
.topbar-link { padding: 8px 14px; border: 1px solid rgba(255, 194, 71, .5); border-radius: 6px; color: var(--amber); font-size: 13px; font-weight: 600; transition: background 160ms ease; }
.topbar-link:hover { background: rgba(255, 194, 71, .14); }

/* Hero */
.hero { position: relative; min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column; justify-content: center; padding: 120px clamp(16px, 6vw, 96px) 96px; max-width: 900px; }
.eyebrow { display: flex; align-items: center; gap: 10px; margin: 0 0 18px; color: var(--scope); font-family: var(--mono); font-size: 12px; letter-spacing: 2px; text-transform: uppercase; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--scope); box-shadow: 0 0 0 0 rgba(115, 235, 173, .6); animation: pulse 2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 10px rgba(115, 235, 173, 0); } 100% { box-shadow: 0 0 0 0 rgba(115, 235, 173, 0); } }
.hero h1 { display: flex; align-items: center; gap: 20px; margin: 0; font-size: clamp(44px, 8vw, 96px); line-height: 1; font-weight: 800; letter-spacing: -.04em; text-shadow: 0 4px 30px rgba(0, 0, 0, .6); }
.hero h1 img { width: clamp(52px, 7vw, 84px); height: auto; filter: drop-shadow(0 0 24px rgba(115, 235, 173, .35)); }
.tagline { max-width: 560px; margin: 22px 0 32px; color: var(--text); font-size: clamp(17px, 2vw, 21px); line-height: 1.55; text-shadow: 0 2px 12px rgba(0, 0, 0, .7); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }

.btn { display: inline-flex; align-items: center; gap: 10px; min-height: 50px; padding: 12px 22px; border: 1px solid transparent; border-radius: 7px; font: inherit; font-size: 16px; font-weight: 650; cursor: pointer; transition: background 160ms ease, border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease; }
.btn-primary { background: var(--amber); color: #1a1205; box-shadow: 0 0 0 1px rgba(255, 194, 71, .4), 0 8px 30px rgba(255, 170, 40, .25); }
.btn-primary:hover { background: var(--amber-hi); box-shadow: 0 0 0 1px var(--amber-hi), 0 8px 36px rgba(255, 170, 40, .4); transform: translateY(-1px); }
.btn-meta { font-size: 12px; font-weight: 500; opacity: .75; }
.btn-ghost { border-color: rgba(219, 227, 235, .25); background: rgba(8, 13, 14, .5); color: var(--text); backdrop-filter: blur(6px); }
.btn-ghost:hover { border-color: var(--scope); color: var(--scope); }
.btn-ghost[aria-pressed="true"] { border-color: var(--scope); color: var(--scope); }
.btn-large { min-height: 58px; padding: 14px 30px; font-size: 17px; }
.sound-icon .wave, .btn-ghost[aria-pressed="true"] .sound-icon .mute { display: none; }
.btn-ghost[aria-pressed="true"] .sound-icon .wave { display: inline; }

.radio { display: flex; align-items: center; gap: 14px; max-width: 560px; margin-top: 40px; padding: 12px 16px; border: 1px solid var(--line); border-left: 3px solid var(--scope); border-radius: 6px; background: rgba(8, 13, 14, .6); backdrop-filter: blur(6px); font-family: var(--mono); font-size: 13px; }
.radio { transition: border-color 200ms ease; }
.radio-freq { flex: none; color: var(--muted); letter-spacing: 1px; transition: color 200ms ease; }
.radio-line { min-width: 0; margin: 0; color: var(--muted); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; transition: color 200ms ease; }
.radio.on-air { border-left-color: var(--amber); }
.radio.on-air .radio-freq { color: var(--scope); }
.radio.on-air .radio-line { color: var(--text); }
.radio.on-air .radio-line::after { content: "▌"; margin-left: 2px; color: var(--scope); animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.scroll-cue { position: absolute; bottom: 28px; left: clamp(16px, 6vw, 96px); display: grid; place-items: center; width: 40px; height: 40px; border: 1px solid rgba(219, 227, 235, .25); border-radius: 50%; color: var(--muted); animation: bob 2.4s ease-in-out infinite; }
.scroll-cue:hover { color: var(--scope); border-color: var(--scope); }
@keyframes bob { 50% { transform: translateY(6px); } }

/* Content panels sit on frosted glass over the trailer. */
.panel { width: min(1080px, calc(100% - 32px)); margin: 0 auto 24px; padding: clamp(24px, 4vw, 48px); border: 1px solid var(--line); border-radius: 12px; background: var(--panel); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.section-title { display: flex; align-items: baseline; gap: 14px; margin: 0 0 24px; font-size: clamp(20px, 2.4vw, 26px); font-weight: 700; letter-spacing: -.02em; }
.section-title span { color: var(--scope); font-family: var(--mono); font-size: 12px; font-weight: 500; letter-spacing: 1px; }
.panel p, .panel li { color: var(--muted); font-size: 15px; line-height: 1.7; }
.panel p { margin: 0 0 12px; }
.panel strong, .panel em { color: var(--text); }

.feature-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.feature { padding: 22px; border: 1px solid rgba(255, 255, 255, .06); border-radius: 9px; background: var(--card); transition: border-color 200ms ease, background 200ms ease; }
.feature:hover { border-color: rgba(115, 235, 173, .35); background: rgba(115, 235, 173, .045); }
.feature h3 { margin: 0 0 8px; color: var(--text); font-size: 16px; font-weight: 650; }
.feature h3::before { content: ""; display: inline-block; width: 6px; height: 6px; margin: 0 10px 2px 0; border-radius: 50%; background: var(--amber); box-shadow: 0 0 10px var(--amber); }
.feature p { margin: 0; font-size: 14px; }

.download { border-color: rgba(255, 194, 71, .3); box-shadow: 0 0 60px rgba(255, 170, 40, .06); }
.download-card { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 20px; padding: 24px; border: 1px solid rgba(255, 194, 71, .25); border-radius: 9px; background: rgba(255, 194, 71, .05); }
.download-card p { margin: 0; }
.download-version { color: var(--text) !important; font-size: 20px !important; font-weight: 650; }
.tag { display: inline-block; margin-left: 8px; padding: 2px 8px; border: 1px solid rgba(115, 235, 173, .4); border-radius: 99px; color: var(--scope); font-family: var(--mono); font-size: 11px; font-weight: 500; vertical-align: middle; }
.checksum { margin-top: 10px !important; font-size: 12px !important; overflow-wrap: anywhere; }
.checksum code { font-size: 11px; }
.source-offer { margin-top: 24px; padding: 20px 22px; border: 1px solid rgba(255, 255, 255, .08); border-radius: 9px; background: var(--card); }
.source-offer p:last-child { margin-bottom: 0; }
.text-link { color: var(--scope); text-decoration: underline; text-decoration-color: rgba(115, 235, 173, .4); text-underline-offset: 3px; overflow-wrap: anywhere; }
.text-link:hover { color: var(--text); text-decoration-color: currentColor; }

.two-col { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 56px); }
.spec-list { margin: 0; padding: 0; list-style: none; }
.spec-list li { display: grid; grid-template-columns: 84px minmax(0, 1fr); gap: 12px; padding: 12px 0; border-bottom: 1px solid rgba(255, 255, 255, .06); color: var(--text); }
.spec-list span { color: var(--scope); font-family: var(--mono); font-size: 12px; letter-spacing: 1px; text-transform: uppercase; line-height: 2.1; }
.steps { margin: 0 0 18px; padding-left: 22px; }
.steps li { margin-bottom: 8px; padding-left: 4px; }
.steps li::marker { color: var(--amber); font-family: var(--mono); }
.note { margin-top: 12px; padding: 14px 16px; border-left: 3px solid var(--amber); border-radius: 0 6px 6px 0; background: rgba(255, 194, 71, .05); }
.note p { margin: 0; font-size: 14px; }
.ticks { margin: 0; padding: 0; list-style: none; }
.ticks li { position: relative; padding: 6px 0 6px 24px; }
.ticks li::before { content: ""; position: absolute; left: 2px; top: 16px; width: 10px; height: 2px; background: var(--scope); }

.page-footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; width: min(1080px, calc(100% - 32px)); margin: 40px auto 0; padding: 0 4px 48px; font-size: 13px; }

@media (max-width: 860px) {
  .feature-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .two-col { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 600px) {
  .backdrop-shade { background: linear-gradient(0deg, rgba(8, 13, 14, .95) 10%, rgba(8, 13, 14, .45) 60%, rgba(8, 13, 14, .6) 100%); }
  .brand-name { display: none; }
  .hero { padding-top: 96px; }
  .radio { align-items: flex-start; }
  .radio-line { min-height: 3.2em; white-space: normal; }
  .hero h1 { gap: 14px; }
  .feature-grid { grid-template-columns: minmax(0, 1fr); }
  .btn { width: 100%; justify-content: center; }
  .download-card .btn { width: 100%; }
  .spec-list li { grid-template-columns: minmax(0, 1fr); gap: 2px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
