/* ── Self-hosted fonts ─────────────────────── */
@font-face {
  font-family: 'Outfit';
  font-style: normal;
  font-weight: 200;
  font-display: swap;
  src: url(/fonts/outfit-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-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Outfit';
  font-style: normal;
  font-weight: 200;
  font-display: swap;
  src: url(/fonts/outfit-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: 'Outfit';
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url(/fonts/outfit-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-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Outfit';
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url(/fonts/outfit-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: 'Outfit';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/fonts/outfit-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-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Outfit';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/fonts/outfit-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: 'Outfit';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(/fonts/outfit-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-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Outfit';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(/fonts/outfit-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: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/fonts/jetbrains-mono-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-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/fonts/jetbrains-mono-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;
}

/* ── Reset & base ───────────────────────────── */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  /* Backgrounds */
  --bg-deep: #0b1221;
  --bg-mid: #111b2e;
  --bg-light: #1a2740;

  /* Text */
  --text-primary: #dce4ed;
  --text-secondary: #8a9bb5;
  --text-dim: #4a5d7a;

  /* Accents */
  --accent-blue: #3d8ec9;
  --accent-blue-hover: #4fa3de;
  --accent-gold: #c49a3c;

  /* Borders & structure */
  --border: #1e3150;

  /* Typography */
  --font-body: 'Outfit', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', 'Courier New', monospace;

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-normal: 300ms ease;
}

/* ── Selection ─────────────────────────────── */
::selection {
  background: rgba(61, 142, 201, 0.3);
  color: var(--text-primary);
}

/* ── Focus indicator ────────────────────────── */
:focus-visible {
  outline: 2px solid var(--accent-blue);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ── Atmospheric background ─────────────────── */
body {
  font-family: var(--font-body);
  font-weight: 300;
  background: var(--bg-deep);
  color: var(--text-primary);
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

/* CSS-only starfield fallback (sub-pages without script.js) */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    radial-gradient(1.5px 1.5px at 7% 18%, rgba(255,255,255,0.55) 50%, transparent 100%),
    radial-gradient(1.5px 1.5px at 15% 62%, rgba(255,255,255,0.45) 50%, transparent 100%),
    radial-gradient(1px 1px at 23% 85%, rgba(255,255,255,0.35) 50%, transparent 100%),
    radial-gradient(1px 1px at 32% 38%, rgba(255,255,255,0.40) 50%, transparent 100%),
    radial-gradient(1px 1px at 41% 9%, rgba(255,255,255,0.35) 50%, transparent 100%),
    radial-gradient(1.5px 1.5px at 48% 55%, rgba(255,255,255,0.60) 50%, transparent 100%),
    radial-gradient(1px 1px at 56% 72%, rgba(255,255,255,0.35) 50%, transparent 100%),
    radial-gradient(1px 1px at 63% 22%, rgba(255,255,255,0.45) 50%, transparent 100%),
    radial-gradient(1px 1px at 71% 47%, rgba(255,255,255,0.30) 50%, transparent 100%),
    radial-gradient(1.5px 1.5px at 78% 81%, rgba(255,255,255,0.50) 50%, transparent 100%),
    radial-gradient(1px 1px at 84% 12%, rgba(255,255,255,0.45) 50%, transparent 100%),
    radial-gradient(1px 1px at 91% 66%, rgba(255,255,255,0.35) 50%, transparent 100%),
    radial-gradient(1px 1px at 5% 45%, rgba(255,255,255,0.25) 50%, transparent 100%),
    radial-gradient(1px 1px at 18% 30%, rgba(255,255,255,0.20) 50%, transparent 100%),
    radial-gradient(1px 1px at 35% 78%, rgba(255,255,255,0.28) 50%, transparent 100%),
    radial-gradient(1px 1px at 52% 15%, rgba(255,255,255,0.22) 50%, transparent 100%),
    radial-gradient(1px 1px at 67% 58%, rgba(255,255,255,0.25) 50%, transparent 100%),
    radial-gradient(1px 1px at 88% 35%, rgba(255,255,255,0.20) 50%, transparent 100%),
    radial-gradient(2px 2px at 25% 50%, rgba(255,255,255,0.65) 50%, transparent 100%),
    radial-gradient(2px 2px at 72% 30%, rgba(255,255,255,0.55) 50%, transparent 100%);
  pointer-events: none;
  z-index: 0;
}

/* Hide CSS fallback when canvas starfield is present */
body:has(.starfield)::before {
  display: none;
}

/* Starfield canvas (injected by script.js) */
.starfield {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

/* Twinkle stars — a few bright dots with slow pulse */
.twinkle-star {
  position: fixed;
  width: 2px;
  height: 2px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.6);
  pointer-events: none;
  z-index: 0;
  animation: twinkle 5s ease-in-out infinite;
}

.twinkle-star:nth-child(2) { animation-delay: -2s; animation-duration: 7s; }
.twinkle-star:nth-child(3) { animation-delay: -4s; animation-duration: 6s; }

@keyframes twinkle {
  0%, 100% { opacity: 0.2; }
  50% { opacity: 0.7; }
}

@media (prefers-reduced-motion: reduce) {
  .twinkle-star { animation: none; opacity: 0.4; }
}

/* Subtle radial glow behind title area */
body::after {
  content: "";
  position: fixed;
  top: 30%;
  left: 50%;
  translate: -50% -50%;
  width: 600px;
  height: 400px;
  background: radial-gradient(
    ellipse at center,
    rgba(61, 142, 201, 0.06) 0%,
    rgba(196, 154, 60, 0.03) 40%,
    transparent 70%
  );
  pointer-events: none;
  z-index: 0;
}

/* ── Layout ─────────────────────────────────── */
main {
  position: relative;
  z-index: 1;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.5rem;
  text-align: center;
}

/* ── Establishment line ─────────────────────── */
.establishment {
  font-size: clamp(0.75rem, 1.2vw, 0.85rem);
  font-weight: 400;
  color: var(--text-secondary);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
}

/* ── Title ──────────────────────────────────── */
h1 {
  font-size: clamp(2.4rem, 7vw, 4.5rem);
  font-weight: 200;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin-bottom: 1rem;
}

h1 .long {
  font-weight: 700;
  background: linear-gradient(135deg, var(--accent-blue), var(--accent-gold));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ── Subtitle ───────────────────────────────── */
.subtitle {
  font-size: clamp(0.95rem, 2vw, 1.2rem);
  font-weight: 300;
  color: var(--text-secondary);
  margin-bottom: 2.5rem;
}

/* ── Slogan rotation ────────────────────────── */
#slogan {
  font-size: clamp(1rem, 2.2vw, 1.3rem);
  font-weight: 300;
  line-height: 1.5;
  min-height: 4em;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity var(--transition-normal);
  margin-bottom: 2.5rem;
  max-width: 42ch;
}

#slogan.fade-out {
  opacity: 0;
}

@media (prefers-reduced-motion: reduce) {
  #slogan {
    transition: none;
  }
}

#slogan b {
  font-weight: 400;
  color: var(--accent-gold);
}

/* ── Horizon line ───────────────────────────── */
.horizon-line {
  width: min(80%, 400px);
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    var(--accent-blue) 30%,
    var(--accent-gold) 70%,
    transparent
  );
  opacity: 0.3;
  margin-bottom: 2.5rem;
}

/* ── Contact ────────────────────────────────── */
.contact {
  font-family: var(--font-mono);
  font-size: clamp(0.8rem, 1.4vw, 0.9rem);
  color: var(--accent-blue);
  text-decoration: none;
  letter-spacing: 0.05em;
  transition: color var(--transition-fast);
  margin-bottom: 3rem;
  overflow-wrap: break-word;
}

.contact:hover {
  color: var(--accent-blue-hover);
}

/* ── Footer ─────────────────────────────────── */
footer {
  position: relative;
  z-index: 1;
  font-size: clamp(0.75rem, 1.2vw, 0.85rem);
  color: var(--text-secondary);
  line-height: 1.6;
  max-width: 38ch;
  margin: 0 auto;
  text-align: center;
  padding-bottom: 2rem;
}

footer .org-name {
  margin-top: 0.5rem;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.75em;
}

footer .org-nr {
  font-family: var(--font-mono);
  color: var(--text-secondary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

footer .org-nr:hover {
  color: var(--accent-blue);
}

/* ── Footer navigation ─────────────────────── */
.footer-nav {
  font-family: var(--font-mono);
  font-size: clamp(0.75rem, 1.2vw, 0.85rem);
  margin-top: 1rem;
}

.footer-nav a {
  color: var(--accent-blue);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.footer-nav a:hover {
  color: var(--accent-blue-hover);
}

.footer-nav .nav-sep {
  margin: 0 0.5em;
  color: var(--text-dim);
}

/* ── Sub-page layout ───────────────────────── */
.back-link {
  font-family: var(--font-mono);
  font-size: clamp(0.75rem, 1.2vw, 0.8rem);
  color: var(--text-secondary);
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  transition: color var(--transition-fast);
  margin-bottom: 2rem;
}

.back-link:hover {
  color: var(--accent-blue);
}

.page-content {
  max-width: 42ch;
  line-height: 1.7;
  text-align: left;
  margin-bottom: 3rem;
}

.page-content h1 {
  font-size: clamp(1.8rem, 5vw, 2.8rem);
  font-weight: 200;
  margin-bottom: 1rem;
}

.page-content p + p {
  margin-top: 1.2em;
}

.page-content h2 {
  font-size: clamp(1.1rem, 2.5vw, 1.4rem);
  font-weight: 300;
  color: var(--text-secondary);
  margin-top: 2em;
  margin-bottom: 0.6em;
}

.page-content a {
  color: var(--accent-blue);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.page-content a:hover {
  color: var(--accent-blue-hover);
}

.page-content b {
  font-weight: 400;
  color: var(--accent-gold);
}

.coming-soon {
  color: var(--text-secondary);
}

/* ── Touch targets (coarse pointers) ─────────── */
@media (pointer: coarse) {
  .contact,
  .back-link,
  .footer-nav a,
  .org-nr,
  .page-content a {
    padding: 0.5rem 0.25rem;
  }
}

/* ── Narrow-screen footer nav ────────────────── */
@media (max-width: 480px) {
  .footer-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.25rem 0;
  }
  .footer-nav .nav-sep {
    margin: 0 0.4em;
  }
}

/* ── Print ───────────────────────────────────── */
@media print {
  body { background: #fff; color: #1a2740; }
  body::before, body::after { display: none; }
  a { color: #2d7ab5; }
  b, strong { color: #a67f2e; }
  .horizon-line { display: none; }
}
