@font-face {
  font-family: "Saira";
  src: url("/fonts/saira.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 50% 125%;
  font-display: swap;
}

:root {
  --void: #07070a;
  --approach: #e6f1ff;
  --disk-blue: #4a79bb;
  --recession: #ff3e1f;
  --photon: #ffc857;
  --shadow-blue: #1a1f33;
  --horizon: #2b2f3d;
  --text-dim: #9aa8c2;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);

  /* rim geometry, overwritten by main.js to match the rendered disk */
  --cx: 68vw;
  --cy: 50vh;
  --R: min(34vw, 42vh);

  color-scheme: dark;
}

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

.sprite { position: absolute; }

html { background: var(--void); }

body {
  margin: 0;
  min-height: 100dvh;
  background: var(--void);
  color: var(--approach);
  font-family: "Saira", ui-sans-serif, system-ui, sans-serif;
  font-weight: 300;
  font-stretch: 100%;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

::selection { background: var(--photon); color: var(--void); }

/* ---------- stage: disk + rim ---------- */

.stage {
  position: fixed;
  inset: 0;
  pointer-events: none;
  /* fallback when WebGL is unavailable: a still photon ring */
  background:
    radial-gradient(circle at var(--cx) var(--cy),
      var(--void) 0 calc(var(--R) * 0.3),
      rgb(255 200 87 / 0.55) calc(var(--R) * 0.32),
      rgb(255 62 31 / 0.18) calc(var(--R) * 0.38),
      transparent calc(var(--R) * 0.7));
}

.stage.gl { background: none; }

#disk {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  opacity: 0;
  transition: opacity 1.6s var(--ease-out);
}

#disk.on { opacity: 1; }

.rim {
  position: absolute;
  left: calc(var(--cx) - var(--R));
  top: calc(var(--cy) - var(--R));
  width: calc(var(--R) * 2);
  height: calc(var(--R) * 2);
  overflow: visible;
}

.rim-line {
  fill: none;
  stroke: rgb(154 168 194 / 0.22);
  stroke-width: 0.25;
  vector-effect: non-scaling-stroke;
}

.rim-inner {
  stroke: rgb(154 168 194 / 0.1);
  stroke-dasharray: 1 3;
}

.rim-labels text {
  font-family: "Saira", sans-serif;
  font-size: 4.2px;
  font-weight: 300;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  fill: rgb(154 168 194 / 0.85);
  transition: fill 0.5s var(--ease-out);
}

.rim-labels text.lit { fill: var(--photon); }

.rim-ticks line {
  stroke: rgb(154 168 194 / 0.6);
  stroke-width: 0.4;
  transition: stroke 0.5s var(--ease-out);
}

.rim-ticks line.lit { stroke: var(--photon); }

.marker-halo { fill: rgb(255 200 87 / 0.16); }
.marker-core { fill: var(--photon); }

/* ---------- content ---------- */

.content {
  position: relative;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: clamp(2.5rem, 7vh, 4.5rem);
  padding: clamp(2rem, 6vh, 4rem) 0 clamp(2rem, 6vh, 4rem) clamp(1.5rem, 6.5vw, 7rem);
  max-width: 44rem;
}

.wordmark {
  margin: 0;
  font-size: clamp(3.25rem, 8.4vw, 6rem);
  font-weight: 200;
  font-stretch: 112%;
  letter-spacing: 0.06em;
  line-height: 1.05;
  color: var(--approach);
}

.handle {
  margin: 0.9rem 0 0;
  padding-left: 0.2em;
  font-size: 0.9375rem;
  font-weight: 400;
  letter-spacing: 0.42em;
  color: #7c9fd3;
}

.channels ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.875rem;
  width: min(100%, 22rem);
}

.channel {
  --stroke: linear-gradient(100deg, rgb(74 121 187 / 0.75), rgb(154 168 194 / 0.25) 55%, rgb(255 62 31 / 0.65));
  position: relative;
  display: grid;
  grid-template-columns: 1.25rem 1fr 1rem;
  align-items: center;
  gap: 1.1rem;
  min-height: 3.5rem;
  padding: 0 1.4rem 0 1.5rem;
  border-radius: 999px;
  color: var(--approach);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 300;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  background: rgb(7 7 10 / 0.55);
  transition:
    color 0.4s var(--ease-out),
    box-shadow 0.5s var(--ease-out),
    transform 0.4s var(--ease-out);
}

/* two-tone hairline stroke: approach blue into recession ember */
.channel::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: var(--stroke);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  transition: opacity 0.4s var(--ease-out);
  pointer-events: none;
}

.channel::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  border: 1px solid var(--photon);
  opacity: 0;
  transition: opacity 0.4s var(--ease-out);
  pointer-events: none;
}

.channel .ic,
.channel .go {
  width: 1.25rem;
  height: 1.25rem;
  fill: currentColor;
}

.channel .ic { color: var(--text-dim); transition: color 0.4s var(--ease-out); }

.channel .go {
  width: 0.95rem;
  height: 0.95rem;
  color: var(--text-dim);
  opacity: 0.6;
  transition: transform 0.45s var(--ease-out), opacity 0.4s var(--ease-out), color 0.4s var(--ease-out);
}

.channel:hover,
.channel:focus-visible,
.channel.lit {
  color: #fff4dc;
  box-shadow: 0 6px 28px -6px rgb(255 200 87 / 0.28), inset 0 0 18px rgb(255 200 87 / 0.05);
}

.channel:hover::before,
.channel:focus-visible::before,
.channel.lit::before { opacity: 0; }

.channel:hover::after,
.channel:focus-visible::after,
.channel.lit::after { opacity: 1; }

.channel:hover .ic,
.channel:focus-visible .ic,
.channel.lit .ic,
.channel:hover .go,
.channel:focus-visible .go,
.channel.lit .go { color: var(--photon); opacity: 1; }

.channel:hover .go,
.channel:focus-visible .go { transform: translate(2px, -2px); }

.channel:active { transform: scale(0.98); }

.channel:focus-visible {
  outline: 2px solid var(--photon);
  outline-offset: 4px;
}

/* ---------- small screens: disk above, content below ---------- */

@media (max-width: 767px) {
  :root {
    --cx: 50vw;
    --cy: 24svh;
    --R: min(40vw, 19svh);
  }

  .content {
    justify-content: flex-start;
    padding: 46svh 1.5rem 2.5rem;
    gap: 1.75rem;
    max-width: none;
    align-items: center;
    text-align: center;
  }

  .wordmark { font-size: clamp(2.75rem, 14vw, 4rem); }
  .handle { padding-left: 0.42em; }
  .channels { width: 100%; display: flex; justify-content: center; }
  .channels ul { width: min(100%, 22rem); text-align: left; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
  }
}

.lost {
  margin: 1.25rem 0 0;
  font-size: 1rem;
  font-weight: 300;
  letter-spacing: 0.04em;
  color: var(--text-dim);
}

.back { color: var(--photon); text-underline-offset: 0.3em; }
