/* sections.css — Section-specific styles */

/* ==========================================================================
   1. THE SIGNAL (Hero)
   ========================================================================== */

#signal {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.signal__poster {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

.signal__video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  transition: opacity 500ms var(--ease-in-out);
}

.signal__video.is-faded {
  opacity: 0;
}

/* Duality gradient: warm left, cool right, transparent center */
.signal__overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  background:
    linear-gradient(to right,
      rgba(139, 26, 26, 0.3) 0%,
      transparent 30%,
      transparent 70%,
      rgba(13, 27, 62, 0.3) 100%
    ),
    linear-gradient(to top,
      var(--void-deep) 0%,
      transparent 20%,
      transparent 80%,
      rgba(8, 8, 15, 0.6) 100%
    );
  pointer-events: none;
}

.signal__content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: var(--space-xl);
  width: 100%;
}

.signal__title {
  font-family: var(--font-display);
  font-size: var(--text-4xl);
  font-weight: 700;
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-wider);
  color: var(--singularity-bright);
  text-transform: uppercase;
  margin-bottom: var(--space-lg);
}

.signal__subtitle {
  font-family: var(--font-body);
  font-size: var(--text-xl);
  font-weight: 400;
  font-style: italic;
  color: var(--text-secondary);
  letter-spacing: var(--tracking-wide);
  margin-bottom: var(--space-2xl);
}

.signal__stats {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  color: var(--text-secondary);
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
}

.signal__stat {
  color: var(--singularity-glow);
  font-weight: 700;
}

.signal__dot {
  margin-left: var(--space-sm);
  margin-right: var(--space-sm);
  color: var(--text-muted);
}

/* Scroll indicator */
.signal__scroll {
  position: absolute;
  bottom: var(--space-2xl);
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-sm);
}

.signal__scroll-text {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--text-muted);
  letter-spacing: var(--tracking-widest);
  text-transform: uppercase;
}

.signal__scroll-chevron {
  display: block;
  width: 1.5rem;
  height: 1.5rem;
  border-right: 2px solid var(--text-muted);
  border-bottom: 2px solid var(--text-muted);
  transform: rotate(45deg);
}

/* Hero responsive */
@media (min-width: 640px) {
  .signal__title {
    font-size: var(--text-5xl);
  }

  .signal__subtitle {
    font-size: var(--text-2xl);
  }

  .signal__stats {
    font-size: var(--text-base);
  }
}

@media (max-width: 639px) {
  .signal__title {
    font-size: var(--text-3xl);
    letter-spacing: var(--tracking-wide);
  }

  .signal__subtitle {
    font-size: var(--text-lg);
  }

  .signal__stats {
    font-size: var(--text-xs);
  }

  .signal__dot {
    margin-left: var(--space-xs);
    margin-right: var(--space-xs);
  }
}

/* ==========================================================================
   2. THE MAP (Galaxy Showcase)
   ========================================================================== */

#map {
  background-color: var(--scrim-deep);
}

.map__figure {
  margin-bottom: var(--space-3xl);
}

.map__container {
  position: relative;
  display: flex;
  justify-content: center;
}

.map__image {
  width: 100%;
  max-width: 56rem; /* 896px */
  height: auto;
  margin: 0 auto;
  border: 1px solid var(--schematic-dim);
  animation: map-breathe 20s var(--ease-in-out) infinite;
}

/* Radial glow at Singularity position (approximate center) */
.map__glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 40%;
  height: 40%;
  background: radial-gradient(
    circle,
    rgba(245, 230, 200, 0.15) 0%,
    rgba(245, 230, 200, 0.05) 40%,
    transparent 70%
  );
  pointer-events: none;
}

.map__callouts {
  margin-top: var(--space-2xl);
}

.map__card {
  padding: var(--space-lg);
  border: 1px solid var(--schematic-dim);
  background-color: var(--void-surface);
}

.map__card-title {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--singularity-glow);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  margin-bottom: var(--space-sm);
}

.map__card-desc {
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: var(--text-secondary);
  line-height: var(--leading-normal);
}

/* On mobile, the whole galaxy fits the viewport — never cropped or side-scrolled.
   It previously forced a 36rem min-width so the map could be panned for detail,
   but on phones that clipped the chart and hid its edges. The map reads best as
   one complete image, and the callout cards below carry the detail. */
@media (max-width: 639px) {
  .map__container {
    overflow-x: hidden;
  }

  .map__image {
    min-width: 0;
  }
}

/* ==========================================================================
   3. THE ENGINE (Platform Features)
   ========================================================================== */

#engine {
  background-color: var(--scrim-surface);
}

.engine__card {
  position: relative;
  padding: var(--space-xl);
  border: 1px solid var(--schematic-dim);
  background-color: var(--void-elevated);
}

/* Top accent bar */
.engine__card:nth-child(1) { border-top: 2px solid var(--cool-mid); }
.engine__card:nth-child(2) { border-top: 2px solid var(--warm-mid); }
.engine__card:nth-child(3) { border-top: 2px solid var(--cool-glow); }
.engine__card:nth-child(4) { border-top: 2px solid var(--warm-glow); }

/* Schematic corner accents via pseudo-elements */
.engine__card::before,
.engine__card::after {
  content: '';
  position: absolute;
  width: 12px;
  height: 12px;
  border-color: var(--schematic-line);
  border-style: solid;
}

.engine__card::before {
  top: -1px;
  left: -1px;
  border-width: 1px 0 0 1px;
}

.engine__card::after {
  bottom: -1px;
  right: -1px;
  border-width: 0 1px 1px 0;
}

.engine__card-title {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  margin-bottom: var(--space-md);
}

.engine__card-desc {
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: var(--text-secondary);
  line-height: var(--leading-normal);
  max-width: 65ch;
}

/* ==========================================================================
   4. THE CIVILIZATIONS (Species Showcase)
   ========================================================================== */

#civilizations {
  background-color: var(--scrim-deep);
}

.civ__scroll-wrapper {
  position: relative;
}

/* Horizontal scroll on desktop */
.civ__scroll {
  display: flex;
  gap: var(--space-lg);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  padding-bottom: var(--space-lg);
  -webkit-overflow-scrolling: touch;
}

/* Hide scrollbar but keep functionality */
.civ__scroll::-webkit-scrollbar {
  height: 4px;
}

.civ__scroll::-webkit-scrollbar-track {
  background: var(--void-surface);
}

.civ__scroll::-webkit-scrollbar-thumb {
  background: var(--schematic-dim);
}

.civ__card {
  flex: 0 0 16rem;
  min-width: 16rem;
  scroll-snap-align: start;
  padding: var(--space-xl) var(--space-lg);
  background-color: var(--void-surface);
  border: 1px solid var(--schematic-dim);
  border-left: 3px solid var(--schematic-dim);
  transition: border-color var(--duration-normal) var(--ease-out);
}

/* Faction color accents */
.civ__card[data-faction="antuari"] { border-left-color: var(--faction-antuari); }
.civ__card[data-faction="azzek"]   { border-left-color: var(--faction-azzek); }
.civ__card[data-faction="ceevar"]  { border-left-color: var(--faction-ceevar); }
.civ__card[data-faction="human"]   { border-left-color: var(--faction-human); }
.civ__card[data-faction="maesuu"]  { border-left-color: var(--faction-maesuu); }
.civ__card[data-faction="seklex"]  { border-left-color: var(--faction-seklex); }
.civ__card[data-faction="varkatt"] { border-left-color: var(--faction-varkatt); }
.civ__card[data-faction="velkaan"] { border-left-color: var(--faction-velkaan); }

.civ__portrait {
  display: block;
  width: 100%;
  height: auto; /* beats the height="" attribute so aspect-ratio can govern */
  aspect-ratio: 3 / 4;
  object-fit: cover;
  object-position: top center;
  margin-bottom: var(--space-md);
  border: 1px solid var(--schematic-dim);
}

.civ__name {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  margin-bottom: var(--space-sm);
}

.civ__philosophy {
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-style: italic;
  color: var(--text-secondary);
  line-height: var(--leading-normal);
  margin-bottom: var(--space-md);
}

.civ__expand {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  padding: var(--space-xs) var(--space-sm);
  background: none;
  border: 1px solid var(--schematic-dim);
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: var(--tracking-wide);
  cursor: pointer;
  transition: color var(--duration-fast) var(--ease-out),
              border-color var(--duration-fast) var(--ease-out);
}

.civ__expand:hover,
.civ__expand:focus-visible {
  color: var(--text-secondary);
  border-color: var(--schematic-line);
  outline: none;
}

.civ__expand:focus-visible {
  outline: 2px solid var(--singularity-glow);
  outline-offset: 2px;
}

.civ__expand-icon {
  font-size: var(--text-sm);
  transition: transform var(--duration-fast) var(--ease-out);
}

.civ__expand[aria-expanded="true"] .civ__expand-icon {
  transform: rotate(45deg);
}

.civ__mechanics {
  margin-top: var(--space-md);
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  color: var(--text-muted);
  line-height: var(--leading-normal);
  letter-spacing: var(--tracking-wide);
}

/* Carousel arrows (desktop; born hidden, revealed by cards.js) */
.civ__nav {
  position: absolute;
  top: 42%;
  transform: translateY(-50%);
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  background-color: var(--void-elevated);
  border: 1px solid var(--schematic-dim);
  color: var(--text-secondary);
  cursor: pointer;
  transition: color var(--duration-fast) var(--ease-out),
              border-color var(--duration-fast) var(--ease-out),
              opacity var(--duration-fast) var(--ease-out);
}

.civ__nav--prev { left: -0.75rem; }
.civ__nav--next { right: -0.75rem; }

.civ__nav:hover:not(:disabled),
.civ__nav:focus-visible {
  color: var(--singularity-glow);
  border-color: var(--schematic-line);
}

.civ__nav:focus-visible {
  outline: 2px solid var(--singularity-glow);
  outline-offset: 2px;
}

.civ__nav:disabled {
  opacity: 0.3;
  cursor: default;
}

/* Scroll progress dots */
.civ__progress {
  display: flex;
  justify-content: center;
  gap: var(--space-sm);
  margin-top: var(--space-lg);
}

.civ__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: var(--schematic-dim);
  transition: background-color var(--duration-fast) var(--ease-out);
}

.civ__dot.is-active {
  background-color: var(--singularity-glow);
}

/* Mobile: vertical stack of compact media-object cards — portrait beside the
   text instead of a screen-filling image per species */
@media (max-width: 639px) {
  .civ__scroll {
    flex-direction: column;
    overflow-x: visible;
    scroll-snap-type: none;
  }

  .civ__card {
    flex: none;
    min-width: 0;
    width: 100%;
    display: grid;
    grid-template-columns: 8.5rem minmax(0, 1fr);
    column-gap: var(--space-md);
    align-items: start;
    padding: var(--space-md);
  }

  .civ__portrait {
    grid-column: 1;
    grid-row: 1 / span 3;
    margin-bottom: 0;
  }

  .civ__name,
  .civ__philosophy,
  .civ__expand {
    grid-column: 2;
  }

  .civ__expand {
    justify-self: start;
  }

  .civ__mechanics {
    grid-column: 1 / -1;
  }

  .civ__nav,
  .civ__progress {
    display: none;
  }
}

/* Wide desktop: slightly larger cards */
@media (min-width: 1024px) {
  .civ__card {
    flex: 0 0 18rem;
    min-width: 18rem;
  }
}

/* ==========================================================================
   5. THE ARCHITECT (Solo Builder Story)
   ========================================================================== */

#architect {
  background-color: var(--scrim-surface);
}

.architect__narrative {
  max-width: 50rem;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: var(--space-3xl);
  font-family: var(--font-body);
  font-size: var(--text-lg);
  color: var(--text-primary);
  line-height: var(--leading-loose);
  text-align: center;
  border: none;
  padding: 0;
}

.architect__stats {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-2xl);
  margin-bottom: var(--space-3xl);
}

.architect__stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-xs);
}

.architect__stat-number {
  font-family: var(--font-mono);
  font-size: var(--text-3xl);
  font-weight: 700;
  color: var(--singularity-glow);
  letter-spacing: var(--tracking-tight);
  line-height: var(--leading-tight);
}

.architect__stat-label {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--text-muted);
  letter-spacing: var(--tracking-widest);
  text-transform: uppercase;
}

.architect__credit {
  text-align: center;
}

.architect__name {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 700;
  margin-bottom: var(--space-xs);
}

.architect__name a {
  color: var(--singularity-glow);
  transition: color var(--duration-fast) var(--ease-out);
}

.architect__name a:hover,
.architect__name a:focus-visible {
  color: var(--singularity-bright);
}

.architect__name a:focus-visible {
  outline: 2px solid var(--singularity-glow);
  outline-offset: 4px;
}

.architect__studio {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  color: var(--text-muted);
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
}

/* Responsive stat layout */
@media (max-width: 639px) {
  .architect__stats {
    gap: var(--space-xl);
  }

  .architect__stat-number {
    font-size: var(--text-2xl);
  }

  .architect__narrative {
    font-size: var(--text-base);
  }
}

/* ==========================================================================
   6. THE HORIZON (CTA / Tiers / Launch)
   ========================================================================== */

#horizon {
  background-color: var(--scrim-deep);
}

/* Tier cards */
.horizon__tier {
  padding: var(--space-xl);
  border: 1px solid var(--schematic-dim);
  background-color: var(--void-surface);
  text-align: center;
  transition: border-color var(--duration-normal) var(--ease-out),
              background-color var(--duration-normal) var(--ease-out);
}

.horizon__tier-name {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  margin-bottom: var(--space-sm);
}

.horizon__tier-price {
  font-family: var(--font-mono);
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--singularity-glow);
  margin-bottom: var(--space-lg);
}

.horizon__tier-features {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: var(--leading-loose);
}

.horizon__tier-features li {
  padding: var(--space-xs) 0;
  border-bottom: 1px solid var(--void-elevated);
}

.horizon__tier-features li:last-child {
  border-bottom: none;
}

/* Email signup */
.horizon__signup {
  max-width: 32rem;
  margin: var(--space-3xl) auto;
  text-align: center;
}

.horizon__form-label {
  display: block;
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: var(--text-secondary);
  margin-bottom: var(--space-md);
}

.horizon__form-row {
  display: flex;
  gap: var(--space-sm);
}

.horizon__input {
  flex: 1;
  padding: var(--space-sm) var(--space-md);
  background-color: var(--void-elevated);
  border: 1px solid var(--schematic-dim);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: var(--text-base);
  transition: border-color var(--duration-fast) var(--ease-out);
}

.horizon__input::placeholder {
  color: var(--text-muted);
}

.horizon__input:focus {
  border-color: var(--singularity-glow);
  outline: none;
}

.horizon__input:focus-visible {
  outline: 2px solid var(--singularity-glow);
  outline-offset: 2px;
}

/* Honeypot — invisible to humans */
.horizon__honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
}

.horizon__submit {
  padding: var(--space-sm) var(--space-lg);
  background-color: var(--void-elevated);
  border: 1px solid var(--singularity-glow);
  color: var(--singularity-glow);
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color var(--duration-fast) var(--ease-out),
              color var(--duration-fast) var(--ease-out);
}

.horizon__submit:hover,
.horizon__submit:focus-visible {
  background-color: var(--singularity-glow);
  color: var(--void-deep);
}

.horizon__submit:focus-visible {
  outline: 2px solid var(--singularity-bright);
  outline-offset: 2px;
}

.horizon__submit.is-loading {
  opacity: 0.6;
  cursor: wait;
}

.horizon__form-status {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  margin-top: var(--space-sm);
  min-height: 1.5em;
}

.horizon__form-status.is-success {
  color: var(--faction-antuari);
}

.horizon__form-status.is-error {
  color: var(--warm-mid);
}

.horizon__privacy {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  color: var(--text-muted);
  margin-top: var(--space-sm);
}

/* Launch status */
.horizon__status {
  max-width: 24rem;
  margin: var(--space-3xl) auto;
  padding: var(--space-lg);
  border: 1px solid var(--schematic-dim);
  background-color: var(--void-surface);
}

.horizon__status-line {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  color: var(--text-muted);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  line-height: var(--leading-loose);
}

.horizon__status-line span {
  color: var(--text-secondary);
}

.horizon__cursor {
  display: inline-block;
  width: 0.5em;
  height: 1em;
  background-color: var(--singularity-glow);
  vertical-align: text-bottom;
  margin-left: var(--space-xs);
  animation: cursor-blink 1s step-end infinite;
}

/* Social links */
.horizon__social {
  display: flex;
  justify-content: center;
  gap: var(--space-lg);
  margin-top: var(--space-2xl);
}

.horizon__social-link {
  color: var(--text-muted);
  transition: color var(--duration-fast) var(--ease-out);
}

.horizon__social-link:hover,
.horizon__social-link:focus-visible {
  color: var(--text-primary);
}

.horizon__social-link:focus-visible {
  outline: 2px solid var(--singularity-glow);
  outline-offset: 4px;
}

.horizon__social-link svg {
  width: 1.5rem;
  height: 1.5rem;
}

/* Framework link */
.horizon__framework-link {
  text-align: center;
  margin-top: var(--space-xl);
}

.horizon__framework-link a {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  color: var(--text-secondary);
  letter-spacing: var(--tracking-wide);
  transition: color var(--duration-fast) var(--ease-out);
}

.horizon__framework-link a:hover,
.horizon__framework-link a:focus-visible {
  color: var(--singularity-glow);
}

/* Responsive: form stacks on mobile */
@media (max-width: 639px) {
  .horizon__form-row {
    flex-direction: column;
  }

  .horizon__submit {
    width: 100%;
  }
}

/* ==========================================================================
   FOOTER
   ========================================================================== */

.site-footer {
  padding: var(--space-2xl) 0;
  border-top: 1px solid var(--schematic-dim);
  text-align: center;
}

.site-footer__copy {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--text-muted);
  letter-spacing: var(--tracking-wide);
  margin-bottom: var(--space-xs);
}

.site-footer__built {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  color: var(--text-muted);
}

.site-footer__built a {
  color: var(--text-secondary);
  transition: color var(--duration-fast) var(--ease-out);
}

.site-footer__built a:hover,
.site-footer__built a:focus-visible {
  color: var(--singularity-glow);
}

/* ==========================================================================
   OST — floating soundtrack pill + expanding Spotify player
   ========================================================================== */

.ost {
  position: fixed;
  right: var(--space-lg);
  bottom: calc(var(--space-lg) + env(safe-area-inset-bottom, 0px));
  z-index: 40;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: var(--space-sm);
}

.ost__pill {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-xs) var(--space-md) var(--space-xs) var(--space-xs);
  border-radius: 999px;
  background-color: var(--void-elevated);
  border: 1px solid var(--schematic-dim);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
  text-decoration: none;
  transition: border-color var(--duration-fast) var(--ease-out),
              transform var(--duration-fast) var(--ease-out);
}

.ost__pill:hover,
.ost__pill:focus-visible {
  border-color: var(--schematic-line);
  transform: translateY(-2px);
}

.ost__pill:focus-visible {
  outline: 2px solid var(--singularity-glow);
  outline-offset: 2px;
}

.ost__cover {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  border: 1px solid var(--schematic-dim);
  object-fit: cover;
}

.ost__label {
  display: flex;
  flex-direction: column;
  font-family: var(--font-display);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: var(--tracking-wide);
  line-height: var(--leading-snug);
}

.ost__label-sub {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 400;
  color: var(--text-secondary);
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
}

.ost__panel {
  width: min(380px, calc(100vw - 2rem));
  padding: var(--space-md);
  border-radius: 12px;
  background-color: var(--void-elevated);
  border: 1px solid var(--schematic-dim);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.55);
}

.ost__panel-head {
  position: relative;
  padding-right: var(--space-xl);
  margin-bottom: var(--space-md);
}

.ost__panel-title {
  font-family: var(--font-display);
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--singularity-glow);
  letter-spacing: var(--tracking-wide);
}

.ost__panel-sub {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  color: var(--text-secondary);
  line-height: var(--leading-normal);
  margin-top: var(--space-xs);
}

.ost__close {
  position: absolute;
  top: 0;
  right: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 50%;
  background-color: transparent;
  border: 1px solid var(--schematic-dim);
  color: var(--text-secondary);
  font-size: var(--text-base);
  line-height: 1;
  cursor: pointer;
  transition: color var(--duration-fast) var(--ease-out),
              border-color var(--duration-fast) var(--ease-out);
}

.ost__close:hover,
.ost__close:focus-visible {
  color: var(--singularity-glow);
  border-color: var(--schematic-line);
}

.ost__close:focus-visible {
  outline: 2px solid var(--singularity-glow);
  outline-offset: 2px;
}

/* The Spotify embed is 352px tall; reserve the space so opening doesn't
   reflow while the iframe loads. */
.ost__embed {
  min-height: 352px;
}

/* Small screens: hug the safe area a little tighter */
@media (max-width: 479px) {
  .ost {
    right: var(--space-md);
    bottom: calc(var(--space-md) + env(safe-area-inset-bottom, 0px));
  }
}

/* ==========================================================================
   Legal pages (terms.html, privacy.html)
   ========================================================================== */

.legal__main {
  padding-top: var(--space-3xl);
  padding-bottom: var(--space-4xl);
}

.legal__home {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  margin-bottom: var(--space-2xl);
}

.legal__home a {
  color: var(--text-secondary);
  text-decoration: none;
}

.legal__home a:hover,
.legal__home a:focus-visible {
  color: var(--singularity-glow);
}

.legal__title {
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  font-weight: 700;
  letter-spacing: var(--tracking-wide);
  color: var(--text-primary);
  margin-bottom: var(--space-sm);
}

.legal__updated {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  color: var(--text-muted);
  margin-bottom: var(--space-2xl);
}

.legal__intro {
  font-size: var(--text-lg);
  color: var(--text-secondary);
  line-height: var(--leading-normal);
  margin-bottom: var(--space-2xl);
  max-width: 65ch;
}

.legal h2 {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 600;
  letter-spacing: var(--tracking-wide);
  color: var(--singularity-glow);
  margin: var(--space-2xl) 0 var(--space-md);
}

.legal p,
.legal li {
  color: var(--text-secondary);
  line-height: var(--leading-normal);
  margin-bottom: var(--space-md);
  max-width: 65ch;
}

.legal ul {
  list-style: disc;
  padding-left: 1.25rem;
  margin-bottom: var(--space-md);
}

.legal main a {
  color: var(--cool-glow);
}

.legal main a:hover,
.legal main a:focus-visible {
  color: var(--singularity-glow);
}

.legal__cross {
  margin-top: var(--space-2xl);
  font-style: italic;
}

/* Footer legal nav (all pages) */
.site-footer__legal {
  margin-top: var(--space-sm);
  font-size: var(--text-sm);
}

.site-footer__legal a {
  color: var(--text-muted);
  text-decoration: none;
}

.site-footer__legal a:hover,
.site-footer__legal a:focus-visible {
  color: var(--singularity-glow);
}
