/* ---------- Fonts (self-hosted, SIL Open Font License) ---------- */
@font-face {
  font-family: "Orbitron";
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url("/fonts/orbitron-latin.woff2") format("woff2");
}
@font-face {
  font-family: "Roboto Condensed";
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url("/fonts/roboto-condensed-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Roboto Condensed";
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url("/fonts/roboto-condensed-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Roboto Condensed";
  font-style: italic;
  font-weight: 300 700;
  font-display: swap;
  src: url("/fonts/roboto-condensed-italic-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Roboto Condensed";
  font-style: italic;
  font-weight: 300 700;
  font-display: swap;
  src: url("/fonts/roboto-condensed-italic-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ---------- Tokens ----------
   Every text/background pair below meets WCAG AAA (7:1 or better). */
:root {
  color-scheme: dark light;

  --bg: #06080e;
  --surface: #0c111b;
  --fg: #e8eef8;
  --muted: #aab6ca;
  --accent: #5ee6ff;
  --accent-2: #c4b0ff;
  --border: #1d2636;
  --grid: rgb(94 230 255 / 0.05);
  --glow: rgb(94 230 255 / 0.18);
  --glow-2: rgb(196 176 255 / 0.14);

  --font-display: "Orbitron", "Segoe UI", system-ui, sans-serif;
  --font-body: "Roboto Condensed", "Arial Narrow", system-ui, sans-serif;

  --focus-width: 3px;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #f5f7fb;
    --surface: #ffffff;
    --fg: #0a0f1c;
    --muted: #3b4558;
    --accent: #005a73;
    --accent-2: #4a2fc0;
    --border: #c9d1df;
    --grid: rgb(0 90 115 / 0.07);
    --glow: rgb(0 90 115 / 0.12);
    --glow-2: rgb(74 47 192 / 0.10);
  }
}

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

html {
  height: 100%;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  min-height: 100%;
  margin: 0;
  display: flex;
  flex-direction: column;
  background-color: var(--bg);
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 48px 48px;
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 1.125rem;
  line-height: 1.6;
}

/* Orbitron is a display face: keep it to headings and short labels. */
h1, h2, h3 {
  font-family: var(--font-display);
  line-height: 1.2;
  letter-spacing: 0.06em;
}

a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.2em;
}
a:hover { text-decoration-thickness: 0.15em; }

:focus-visible {
  outline: var(--focus-width) solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

/* Programmatic focus target for the skip link; no ring needed. */
main:focus { outline: none; }

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- Skip link ---------- */
.skip-link {
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  z-index: 100;
  padding: 0.75rem 1rem;
  background: var(--accent);
  color: var(--bg);
  font-weight: 700;
  text-decoration: none;
  transform: translateY(-200%);
}
.skip-link:focus { transform: none; outline-color: var(--fg); }

/* ---------- Header ---------- */
.site-header {
  display: flex;
  align-items: center;
  padding: 0.5rem 1.5rem;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

.brand {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--fg);
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
}
.brand:hover { color: var(--accent); }

/* ---------- Main / hero ---------- */
.site-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4rem 1rem;
  text-align: center;
}

.hero {
  position: relative;
  display: grid;
  place-items: center;
  width: min(32rem, 100%);
  aspect-ratio: 1;
}

/* Decorative "gate" rings behind the heading. */
.gate {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.gate::before,
.gate::after {
  content: "";
  position: absolute;
  border-radius: 50%;
}
.gate::before {
  inset: 6%;
  border: 2px solid var(--accent);
  border-top-color: transparent;
  border-bottom-color: transparent;
  opacity: 0.55;
  box-shadow: 0 0 40px var(--glow), inset 0 0 40px var(--glow);
}
.gate::after {
  inset: 16%;
  border: 1px dashed var(--accent-2);
  opacity: 0.45;
  box-shadow: inset 0 0 80px var(--glow-2);
}

.hero h1 {
  position: relative;
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35em;
  font-weight: 800;
  text-transform: uppercase;
}
.hero .h1-main {
  font-size: clamp(2rem, 9vw, 4.5rem);
  letter-spacing: 0.08em;
  text-shadow: 0 0 24px var(--glow);
}
.hero .h1-sub {
  font-size: clamp(0.95rem, 3vw, 1.35rem);
  font-weight: 500;
  letter-spacing: 0.35em;
  margin-right: -0.35em; /* re-centre text that has trailing letter-spacing */
  color: var(--accent);
}

.page-message {
  max-width: 40rem;
  margin: 1.5rem 0 0;
  color: var(--muted);
}

/* ---------- Footer ---------- */
.site-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  font-size: 1rem;
  text-align: center;
}
.site-footer p { margin: 0; }

/* ---------- Motion: only for visitors who haven't asked to reduce it ---------- */
@media (prefers-reduced-motion: no-preference) {
  .gate::before { animation: gate-spin 40s linear infinite; }
  .gate::after { animation: gate-spin 60s linear infinite reverse; }
  .skip-link { transition: transform 0.15s ease-out; }
}
@keyframes gate-spin { to { transform: rotate(1turn); } }

/* ---------- Visitor asked for more contrast ---------- */
@media (prefers-contrast: more) {
  :root {
    --muted: var(--fg);
    --border: var(--fg);
    --grid: transparent;
    --glow: transparent;
    --glow-2: transparent;
  }
  .gate::before,
  .gate::after { opacity: 1; }
}

/* ---------- Windows High Contrast / forced colors ---------- */
@media (forced-colors: active) {
  .gate { display: none; }
  .skip-link { border: 2px solid CanvasText; }
  :focus-visible { outline-color: Highlight; }
}

/* ---------- Print ---------- */
@media print {
  body { background: #fff; color: #000; }
  .gate,
  .skip-link { display: none; }
  .site-header,
  .site-footer { background: none; }
}
