/* Shared palette. --gold is the warm accent used by .sc and the headline dot. */
:root {
  color-scheme: dark;
  --text: #f1f4f3;
  --blue: #9bcde4;
  --gold: #eab384;
}

* {
  box-sizing: border-box;
}

/* Keep JS-controlled states hidden even when another rule sets display:flex. */
[hidden] {
  display: none!important;
}

html {
  min-height: 100%;
  background: #080e16;
}

body {
  min-height: 100vh;
  margin: 0;
  background: #080e16;
  color: var(--text);
  font-family: Arial,Helvetica,sans-serif;
}

/* The hero owns a stacking context: artwork (-3), readability overlay (-2),
   atmospheric glow (-1), then page content. cover crops the art to the screen. */
.hero {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  min-height: 100svh;
  overflow: hidden;
  background: #080e16;
}

/* Selected source image. When replacing it, update its ?v= suffix here and
   the stylesheet ?v= suffix in index.html so cached pages request new assets. */
.hero::before {
  content: "";
  position: absolute;
  z-index: -3;
  inset: 0;
  background: #080e16 url('./hero-selected.png?v=c255619e') center center/cover no-repeat;
  animation: hero-drift 26s ease-in-out infinite alternate;
}

.hero::after {
  content: "";
  position: absolute;
  z-index: -2;
  inset: 0;
  background: linear-gradient(90deg,#040b15c9 0%,#071018a0 35%,transparent 57%),linear-gradient(0deg,#07101890,transparent 30%);
}

/* The blur belongs only to this faint decorative glow, never to the artwork. */
.atmosphere {
  position: absolute;
  z-index: -1;
  left: -12%;
  bottom: -24%;
  width: 95%;
  height: 53%;
  pointer-events: none;
  background: radial-gradient(ellipse at 48% 50%,#a3c8ec1c,transparent 69%);
  filter: blur(35px);
  animation: cloud-drift 20s ease-in-out infinite alternate;
}

/* Header and wordmark: full-size blue tm, warm .sc, flexible outer spacing. */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 98px;
  padding: 0 clamp(26px,5vw,90px);
}

.wordmark {
  color: var(--text);
  font-size: 27px;
  font-weight: 800;
  letter-spacing: -.075em;
  text-decoration: none;
  font-style: italic;
  line-height: 1;
  white-space: nowrap;
}

.wordmark-tm {
  color: var(--blue);
}

.wordmark-domain {
  color: var(--gold);
}

.header-note {
  color: #d1e0e2;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .21em;
  white-space: nowrap;
}

/* Main content. clamp() scales type/spacing between fixed minimum and maximum
   values; auto vertical margins center the content when space is available. */
.hero-content {
  width: min(830px,calc(100% - 52px));
  margin: auto 0 auto clamp(26px,5vw,90px);
  padding: 35px 0;
  text-shadow: 0 4px 28px #0009;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0 0 25px;
  color: #b8d2da;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .21em;
}

.eyebrow-rule {
  width: 34px;
  height: 1px;
  background: var(--blue);
}

h1 {
  max-width: 850px;
  margin: 0;
  font-size: clamp(54px,7.2vw,110px);
  line-height: .98;
  letter-spacing: -.055em;
  font-weight: 700;
}

h1 span {
  color: var(--gold);
}

.tagline {
  margin: 13px 0 0;
  color: var(--blue);
  font-size: clamp(35px,4vw,60px);
  font-weight: 400;
  letter-spacing: -.045em;
  line-height: 1.1;
}

.description {
  margin: 37px 0 0;
  color: #d4dfe0;
  font-size: 17px;
  line-height: 1.5;
}

/* Small, stable-width numbers: no digit-shift jitter as the seconds tick.
   JS uses data-unit attributes; these classes only control appearance. */
.countdown {
  display: flex;
  gap: 22px;
  margin-top: 25px;
  color: #c5d4df;
  font-variant-numeric: tabular-nums;
}

.countdown>span {
  display: flex;
  align-items: baseline;
  gap: 5px;
}

.countdown b {
  font: 400 19px/1.2 Consolas,'Courier New',monospace;
}

.countdown small {
  color: #a6b7c4;
  font-size: 9px;
  letter-spacing: .06em;
}

.countdown-arrived {
  margin: 25px 0 0;
  color: var(--blue);
  font-size: 15px;
}

/* Deliberately faint Easter egg. The mask fades the strip's edges rather than
   adding a visible box. Keyboard focus and hover pause it for inspection. */
.transmission {
  width: 248px;
  height: 24px;
  overflow: hidden;
  flex-shrink: 0;
  color: #b5ccd7;
  opacity: .28;
  mask-image: linear-gradient(90deg,transparent,#000 15%,#000 85%,transparent);
}

/* Two identical 440px SVG packets form an 880px track. Move one packet width
   per cycle to create a seamless loop; keep these values in sync with HTML. */
.signal-track {
  display: block;
  width: 880px;
  max-width: none;
  height: 24px;
  animation: signal-scroll 64s linear infinite;
}

.transmission:hover .signal-track,.transmission:focus .signal-track {
  animation-play-state: paused;
}

.transmission:focus-visible {
  outline: 1px dotted #b5ccd7;
  outline-offset: 3px;
}

@keyframes signal-scroll {
  to {
    transform: translateX(-440px);
  }
}

/* Footer labels share a row with the signal; there are no divider lines. */
.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  width: calc(100% - clamp(52px,10vw,180px));
  margin: 0 auto;
  padding: 28px 0 30px;
  color: #c4d5d5;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .19em;
}

@keyframes cloud-drift {
  from {
    transform: translateX(-5%) scale(1);
  }
  to {
    transform: translateX(10%) scale(1.16);
  }
}

/* 26 seconds in each direction, 3.5% zoom. Increasing the scale crops more
   of the station and enlarges the source pixels. Respect reduced motion below. */
@keyframes hero-drift {
  from {
    transform: scale(1);
  }
  to {
    transform: scale(1.035);
  }
}

/* Narrow layouts: keep content readable over the art and allow vertical scroll. */
@media(max-width:700px) {
  .site-header {
    min-height: 74px;
    padding-inline: 22px;
  }
  .wordmark {
    font-size: 23px;
  }
  .header-note {
    font-size: 9px;
    letter-spacing: .08em;
  }
  .hero::after {
    background: linear-gradient(0deg,#0710189e,transparent 60%);
  }
  .hero-content {
    width: calc(100% - 44px);
    margin: auto 22px 0;
    padding: 75px 0 71px;
  }
  .eyebrow {
    font-size: 9px;
    letter-spacing: .13em;
    gap: 10px;
  }
  .eyebrow-rule {
    width: 20px;
  }
  h1 {
    font-size: clamp(48px,11vw,75px);
  }
  .tagline {
    font-size: clamp(32px,8vw,50px);
  }
  .description {
    margin-top: 26px;
    font-size: 15px;
  }
  .site-footer {
    width: calc(100% - 44px);
    padding-block: 24px;
    font-size: 9px;
  }
}

@media(max-width:370px) {
  .header-note {
    font-size: 8px;
  }
  h1 {
    font-size: 46px;
  }
}

@media(max-width:700px) {
  /* On phones the timer sits over bright ice. Give it its own dark backing
     and stack labels below brighter, larger digits. Desktop stays unchanged. */
  .countdown {
    display: inline-flex;
    gap: 18px;
    max-width: 100%;
    padding: 12px 14px;
    border-radius: 4px;
    background: #040c16eb;
    color: #f1f4f3;
    text-shadow: none;
  }
  .countdown>span {
    flex-direction: column;
    align-items: center;
    gap: 4px;
    min-width: 36px;
  }
  .countdown b {
    font-size: 22px;
  }
  .countdown small {
    color: #c5d4df;
    font-size: 10px;
  }
  .site-footer {
    flex-wrap: wrap;
    row-gap: 14px;
  }
  .transmission {
    order: 1;
    flex-basis: 100%;
    mask-image: linear-gradient(90deg,transparent,#000 25%,#000 75%,transparent);
  }
}

/* Respect the operating system's motion preference for all decorative loops. */
@media(prefers-reduced-motion:reduce) {
  *,*::before,*::after {
    animation-duration: .01ms!important;
    animation-iteration-count: 1!important;
  }
}
