:root {
  --ink: #070708;
  --ink-2: #0e0e11;
  --amber: #e8a84a;
  --amber-dim: rgba(232, 168, 74, 0.45);
  --phosphor: #7dffb3;
  --phosphor-dim: rgba(125, 255, 179, 0.35);
  --text: #e8e4dc;
  --text-dim: rgba(232, 228, 220, 0.58);
  --line: rgba(232, 168, 74, 0.22);
  --serif: 'Libre Baskerville', 'Times New Roman', serif;
  --mono: 'IBM Plex Mono', ui-monospace, monospace;
  color-scheme: dark;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100%;
  background: var(--ink);
  color: var(--text);
  font-family: var(--serif);
  font-size: 17px;
  line-height: 1.55;
  overflow-x: hidden;
}

#sky {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

.rail {
  position: fixed;
  top: 50%;
  right: max(12px, env(safe-area-inset-right));
  transform: translateY(-50%);
  z-index: 20;
  display: flex;
  flex-direction: column;
  gap: 10px;
  writing-mode: vertical-rl;
  text-orientation: mixed;
}

.rail a {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--text-dim);
  transition: color 0.2s ease;
}

.rail a:hover,
.rail a:focus-visible {
  color: var(--amber);
}

main {
  position: relative;
  z-index: 1;
}

.stage {
  position: relative;
  padding: clamp(48px, 10vh, 96px) clamp(20px, 6vw, 72px);
  max-width: 1100px;
  margin: 0 auto;
}

.acquire {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  gap: 12px;
  padding-top: 12vh;
}

.reticle {
  position: absolute;
  right: clamp(8%, 12vw, 18%);
  top: 42%;
  width: min(220px, 40vw);
  aspect-ratio: 1;
  transform: translateY(-50%);
  pointer-events: none;
}

.reticle-ring {
  position: absolute;
  inset: 0;
  border: 1px solid var(--amber-dim);
  border-radius: 50%;
  animation: ring-breathe 4.5s ease-in-out infinite;
}

.reticle-cross::before,
.reticle-cross::after {
  content: '';
  position: absolute;
  background: var(--amber-dim);
}

.reticle-cross::before {
  left: 50%;
  top: 8%;
  bottom: 8%;
  width: 1px;
  transform: translateX(-50%);
}

.reticle-cross::after {
  top: 50%;
  left: 8%;
  right: 8%;
  height: 1px;
  transform: translateY(-50%);
}

.reticle-dot {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 18px var(--amber), 0 0 40px var(--amber-dim);
  transform: translate(-50%, -50%);
  animation: pulse 2.4s ease-in-out infinite;
}

.coords {
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--phosphor);
  margin: 0 0 24px;
  min-height: 1.4em;
}

.eyebrow {
  margin: 0;
  font-size: 11px;
  letter-spacing: 0.28em;
  color: var(--amber);
}

.wordmark {
  margin: 0;
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(56px, 14vw, 120px);
  letter-spacing: 0.08em;
  line-height: 0.95;
  color: var(--text);
}

.wordmark.small {
  font-size: 28px;
  letter-spacing: 0.16em;
}

.tagline {
  margin: 8px 0 0;
  font-size: 12px;
  letter-spacing: 0.2em;
  color: var(--text-dim);
}

.lede {
  max-width: 34ch;
  margin: 16px 0 0;
  color: var(--text-dim);
  font-size: 18px;
}

.scroll-cue {
  margin-top: 40px;
  font-size: 11px;
  letter-spacing: 0.24em;
  color: var(--amber);
  text-decoration: none;
  border-bottom: 1px solid var(--amber-dim);
  padding-bottom: 4px;
}

.scroll-cue:hover {
  color: var(--phosphor);
  border-color: var(--phosphor-dim);
}

.mono {
  font-family: var(--mono);
  font-weight: 400;
}

.dim {
  color: var(--text-dim);
}

.section-head {
  margin-bottom: 40px;
  max-width: 36rem;
}

.section-head h2 {
  margin: 8px 0 12px;
  font-size: clamp(28px, 5vw, 42px);
  font-weight: 400;
  line-height: 1.2;
}

.starfield-map {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px 28px;
  position: relative;
  min-height: 420px;
}

.star-card {
  position: relative;
  min-height: 180px;
  border: 1px solid transparent;
  border-radius: 4px;
  padding: 16px 16px 20px;
  transition:
    border-color 0.35s ease,
    background 0.35s ease,
    opacity 0.35s ease,
    filter 0.35s ease;
}

.star-card[data-star='astrum'] {
  grid-column: 1;
  grid-row: 1;
}

.star-card[data-star='anima'] {
  grid-column: 2;
  grid-row: 1;
  margin-top: 48px;
}

.star-card[data-star='nocturne'] {
  grid-column: 1;
  grid-row: 2;
  margin-left: 8%;
}

.star-card[data-star='kairos'] {
  grid-column: 2;
  grid-row: 2;
  margin-top: -24px;
}

.starfield-map.is-locked .star-card:not(.is-active) {
  opacity: 0.28;
  filter: saturate(0.4);
}

.star-card.is-active {
  border-color: var(--line);
  background: rgba(14, 14, 17, 0.72);
  opacity: 1;
  filter: none;
}

.star-node {
  appearance: none;
  border: none;
  background: transparent;
  padding: 0;
  cursor: pointer;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
}

.star-core {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 12px var(--amber-dim);
  transition:
    transform 0.3s ease,
    background 0.3s ease,
    box-shadow 0.3s ease;
}

.star-card.is-active .star-core {
  background: var(--phosphor);
  box-shadow: 0 0 18px var(--phosphor-dim), 0 0 36px var(--amber-dim);
  transform: scale(1.35);
}

.star-panel {
  margin-top: 12px;
}

.star-panel h3 {
  margin: 4px 0 8px;
  font-size: 28px;
  letter-spacing: 0.06em;
}

.star-panel p {
  margin: 0 0 14px;
  color: var(--text-dim);
  max-width: 32ch;
  font-size: 15px;
}

.meta {
  font-size: 10px;
  letter-spacing: 0.2em;
  color: var(--text-dim);
  margin: 0;
}

.live {
  color: var(--phosphor);
}

.soon {
  color: var(--amber);
}

.cta {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink);
  background: var(--amber);
  padding: 10px 16px;
  border-radius: 999px;
}

.cta:hover {
  background: var(--phosphor);
}

.cta.ghost {
  background: transparent;
  color: var(--text-dim);
  border: 1px solid var(--line);
  cursor: default;
}

.instrument-stack {
  list-style: none;
  margin: 0;
  padding: 0;
  border-left: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 0;
}

.instrument-stack li {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 16px;
  padding: 28px 0 28px 24px;
  position: relative;
}

.instrument-stack li::before {
  content: '';
  position: absolute;
  left: -5px;
  top: 36px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 10px var(--amber-dim);
}

.instrument-stack .index {
  color: var(--phosphor);
  font-size: 12px;
  letter-spacing: 0.16em;
  padding-top: 6px;
}

.instrument-stack h3 {
  margin: 0 0 6px;
  font-size: 24px;
}

.instrument-stack p {
  margin: 0;
  color: var(--text-dim);
  max-width: 40ch;
}

.log-list {
  list-style: none;
  margin: 0 0 36px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
  font-size: 13px;
  letter-spacing: 0.04em;
  color: var(--text-dim);
}

.log-list .stamp {
  color: var(--phosphor);
  margin-right: 12px;
}

.freq-form label {
  display: block;
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--amber);
  margin-bottom: 10px;
}

.freq-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.freq-row input {
  flex: 1 1 220px;
  min-height: 44px;
  background: var(--ink-2);
  border: 1px solid var(--line);
  color: var(--text);
  font-family: var(--mono);
  font-size: 13px;
  padding: 10px 14px;
  border-radius: 4px;
}

.freq-row input:focus {
  outline: 1px solid var(--phosphor);
  border-color: var(--phosphor-dim);
}

.freq-row button {
  min-height: 44px;
  min-width: 88px;
  border: none;
  border-radius: 4px;
  background: var(--phosphor);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.2em;
  cursor: pointer;
}

.freq-row button:hover {
  background: var(--amber);
}

.freq-status {
  min-height: 1.4em;
  margin: 10px 0 0;
  font-size: 12px;
  letter-spacing: 0.12em;
  color: var(--phosphor);
}

.close {
  text-align: left;
  padding-bottom: 64px;
  border-top: 1px solid var(--line);
  margin-top: 24px;
}

.disclaimer {
  max-width: 42ch;
  color: var(--text-dim);
  font-size: 14px;
}

.foot-meta {
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--text-dim);
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
  50% {
    opacity: 0.7;
    transform: translate(-50%, -50%) scale(1.15);
  }
}

@keyframes ring-breathe {
  0%,
  100% {
    transform: scale(1);
    opacity: 0.7;
  }
  50% {
    transform: scale(1.04);
    opacity: 1;
  }
}

@media (max-width: 720px) {
  .rail {
    writing-mode: horizontal-tb;
    top: auto;
    bottom: max(12px, env(safe-area-inset-bottom));
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    flex-direction: row;
    gap: 14px;
    background: rgba(7, 7, 8, 0.72);
    padding: 8px 12px;
    border-radius: 999px;
    border: 1px solid var(--line);
  }

  .reticle {
    opacity: 0.45;
    right: 4%;
    top: 28%;
  }

  .starfield-map {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .star-card[data-star],
  .star-card[data-star='anima'],
  .star-card[data-star='nocturne'],
  .star-card[data-star='kairos'] {
    grid-column: auto;
    grid-row: auto;
    margin: 0;
  }

  .acquire {
    padding-bottom: 96px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .reticle-ring,
  .reticle-dot {
    animation: none;
  }

  .star-card,
  .star-core {
    transition: none;
  }
}
