@import url("fonts/fonts.css");
@import url("brand/palette.css");

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

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  background: var(--void);
  color: var(--ivory);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  overflow-y: auto;
  color-scheme: dark;
}

.stage {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 100vh;
  min-height: 100svh;
  background:
    radial-gradient(ellipse at 50% 46%, rgba(201, 163, 90, 0.07) 0%, transparent 42%),
    var(--void);
}

.scene {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.brand {
  position: absolute;
  z-index: 2;
  top: clamp(20px, 4vh, 36px);
  left: clamp(20px, 4vw, 40px);
  right: clamp(20px, 4vw, 40px);
  pointer-events: none;
}

.brand a {
  display: inline-block;
  pointer-events: auto;
}

.brand img {
  display: block;
  height: 28px;
  width: auto;
}

.line {
  margin: 14px 0 0;
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(0.95rem, 1.5vw, 1.15rem);
  letter-spacing: -0.01em;
  color: var(--mist);
  line-height: 1.35;
  max-width: 22em;
}

.writing {
  margin: 18px 0 0;
  max-width: 28em;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 400;
  letter-spacing: 0.04em;
  line-height: 1.45;
  text-wrap: balance;
}

.answer {
  margin: 18px 0 0;
  max-width: 32em;
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 400;
  letter-spacing: 0;
  line-height: 1.5;
  color: var(--mist);
  pointer-events: auto;
}

.answer a {
  color: var(--mist);
  text-decoration: none;
  border-bottom: 1px solid color-mix(in srgb, var(--signal) 45%, transparent);
  padding-bottom: 1px;
}

.answer a:hover,
.answer a:focus-visible { color: var(--signal); }

.answer a:focus-visible {
  outline: 2px solid var(--signal);
  outline-offset: 3px;
}

.brand .writing a {
  display: inline;
  color: var(--mist);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  padding-bottom: 1px;
  pointer-events: auto;
}

.brand .writing a:hover,
.brand .writing a:focus-visible {
  color: var(--signal);
  border-bottom-color: var(--signal);
}

.brand .writing a:focus-visible {
  outline: 2px solid var(--signal);
  outline-offset: 3px;
}

.site-footer {
  position: absolute;
  z-index: 2;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  padding: 0 clamp(20px, 4vw, 40px) clamp(16px, 3vh, 28px);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.04em;
  color: var(--mist);
}

.site-footer a {
  color: var(--mist);
  text-decoration: none;
  border-bottom: 1px solid color-mix(in srgb, var(--signal) 45%, transparent);
  padding-bottom: 2px;
}

.site-footer a:hover { color: var(--signal); }
.site-footer a:focus-visible {
  outline: 2px solid var(--signal);
  outline-offset: 3px;
}

/* Scene geometry — strokes stay crisp when the SVG scales */
.orbit-back {
  fill: none;
  stroke: var(--line);
  stroke-width: 1;
  opacity: 0.45;
}
.orbit-front {
  fill: none;
  stroke: #4a6385;
  stroke-width: 1.25;
  opacity: 0.95;
}

.planet-atmosphere {
  fill: none;
  stroke: var(--signal);
  stroke-width: 1;
  opacity: 0.2;
}
.planet-limb {
  fill: none;
  stroke: var(--ivory);
  stroke-width: 1.1;
  opacity: 0.32;
  stroke-linecap: round;
}
.planet-grid {
  fill: none;
  stroke: var(--ivory);
  stroke-width: 0.7;
  opacity: 0.16;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.landmasses path { fill: #53664f; stroke: #849276; stroke-width: 1.2; opacity: 0.78; stroke-linejoin: round; }

.station-body { fill: var(--signal); }

.sat-body { fill: var(--signal); }
.sat.is-behind { opacity: 0.38; }
.sat.is-hidden { opacity: 0; }
.station.is-behind { opacity: 0.38; }
.station.is-hidden { opacity: 0; }

.link {
  fill: none;
  stroke: var(--signal);
  stroke-width: 1;
  opacity: 0;
  stroke-linecap: round;
}
.link.is-on { opacity: 0.38; }

.pulse {
  fill: var(--signal);
  opacity: 0.95;
}

@media (max-width: 560px) {
  .brand img { height: 24px; }
  .line { margin-top: 12px; font-size: 0.95rem; max-width: 16em; }
  .writing { margin-top: 12px; max-width: 100%; font-size: 0.62rem; }
  .answer { margin-top: 12px; max-width: 100%; font-size: 0.72rem; }
  .site-footer { font-size: 0.62rem; }
}

@media (prefers-reduced-motion: reduce) {
  .link { opacity: 0.45; }
}
