:root {
  color-scheme: dark;
  --bg: #07090d;
  --panel: #111820;
  --panel-2: #18212b;
  --ink: #f7fbff;
  --muted: #9fb0bf;
  --line: rgba(255, 255, 255, 0.14);
  --teal: #3dd8c5;
  --amber: #ffb75d;
  --coral: #ff6f59;
  --green: #95df72;
  --violet: #9b8cff;
  --shadow: rgba(0, 0, 0, 0.38);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  padding-bottom: 8rem;
  background:
    radial-gradient(circle at 20% 0%, rgba(61, 216, 197, 0.14), transparent 32rem),
    linear-gradient(180deg, #07090d 0%, #0b0e12 38%, #10100c 100%);
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select {
  font: inherit;
}

.site-hero {
  position: relative;
  min-height: 92vh;
  overflow: clip;
  display: grid;
  grid-template-rows: auto 1fr;
  border-bottom: 1px solid var(--line);
}

.hero-media,
.hero-media img,
.hero-shade {
  position: absolute;
  inset: 0;
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.08) contrast(1.03);
}

.hero-shade {
  background:
    linear-gradient(90deg, rgba(7, 9, 13, 0.92) 0%, rgba(7, 9, 13, 0.58) 42%, rgba(7, 9, 13, 0.08) 100%),
    linear-gradient(180deg, rgba(7, 9, 13, 0.42) 0%, rgba(7, 9, 13, 0.12) 45%, rgba(7, 9, 13, 0.88) 100%);
}

.topbar {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.15rem clamp(1rem, 4vw, 4rem);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  min-width: 0;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 5.8rem;
  height: 3.05rem;
  border: 1px solid rgba(255, 255, 255, 0.32);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.08);
  padding: 0.35rem;
  backdrop-filter: blur(12px);
}

.brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: 0.98rem;
}

.brand small {
  color: var(--muted);
  margin-top: 0.1rem;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: #dbe8f2;
  font-size: 0.92rem;
}

.topbar-actions a {
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  padding: 0.62rem 0.9rem;
  background: rgba(8, 12, 16, 0.42);
  backdrop-filter: blur(14px);
}

.hero-content {
  position: relative;
  z-index: 1;
  align-self: center;
  width: min(46rem, calc(100% - 2rem));
  margin-left: clamp(1rem, 7vw, 6rem);
  padding: 7rem 0 9rem;
}

.eyebrow {
  margin: 0 0 0.85rem;
  color: var(--teal);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1 {
  margin: 0;
  font-size: 6.4rem;
  line-height: 0.92;
  max-width: 11ch;
}

h2 {
  margin: 0;
  font-size: 3.4rem;
  line-height: 0.98;
}

h3 {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.16;
}

.hero-copy {
  max-width: 42rem;
  margin: 1.2rem 0 0;
  color: #d9e5ee;
  font-size: 1.12rem;
  line-height: 1.65;
}

.hero-actions,
.manifest-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.7rem;
}

.primary-action,
.ghost-action {
  min-height: 2.85rem;
  border: 0;
  border-radius: 999px;
  padding: 0.8rem 1.1rem;
  color: #061011;
  background: var(--teal);
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 0.75rem 2rem rgba(61, 216, 197, 0.2);
}

.primary-action.compact {
  min-height: 2.55rem;
  padding-inline: 0.95rem;
}

.ghost-action {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.22);
  box-shadow: none;
}

.ghost-action.compact {
  min-height: 2.55rem;
  padding-inline: 0.95rem;
}

.mission-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
  border-bottom: 1px solid var(--line);
}

.mission-strip article {
  display: grid;
  gap: 0.2rem;
  padding: clamp(1rem, 3vw, 2rem);
  background: rgba(13, 18, 24, 0.94);
  color: var(--muted);
}

.metric {
  color: var(--ink);
  font-size: 4.2rem;
  font-weight: 900;
  line-height: 0.9;
}

.control-band,
.timeline-band,
.manifest-band {
  padding: clamp(3rem, 7vw, 6rem) clamp(1rem, 4vw, 4rem) 1.25rem;
}

.section-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 1rem;
  max-width: 88rem;
  margin: 0 auto 1.3rem;
}

.controls {
  max-width: 88rem;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(16rem, 24rem) 1fr;
  gap: 1rem;
  align-items: center;
}

.search-shell {
  display: grid;
  gap: 0.45rem;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 800;
}

.search-shell input,
.manifest-panel input,
.manifest-panel select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.06);
  color: var(--ink);
  outline: none;
}

.search-shell input,
.manifest-panel input,
.manifest-panel select {
  height: 3rem;
  padding: 0 1rem;
}

.search-shell input:focus,
.manifest-panel input:focus,
.manifest-panel select:focus {
  border-color: rgba(61, 216, 197, 0.72);
  box-shadow: 0 0 0 4px rgba(61, 216, 197, 0.12);
}

.filter-tabs {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.55rem;
}

.filter-tabs button {
  min-height: 2.55rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.55rem 0.85rem;
  color: #dfeaf2;
  background: rgba(255, 255, 255, 0.06);
  cursor: pointer;
}

.filter-tabs button[aria-selected="true"] {
  color: #061011;
  border-color: var(--amber);
  background: var(--amber);
  font-weight: 900;
}

.video-grid-band {
  padding: 1rem clamp(1rem, 4vw, 4rem) clamp(3rem, 7vw, 6rem);
}

.video-grid {
  max-width: 88rem;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 1rem;
}

.video-card {
  grid-column: span 4;
  display: grid;
  grid-template-rows: auto 1fr;
  min-height: 25rem;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.035));
  box-shadow: 0 1rem 3rem var(--shadow);
}

.video-card.is-selected {
  border-color: rgba(255, 183, 93, 0.72);
  box-shadow:
    0 1rem 3rem var(--shadow),
    0 0 0 3px rgba(255, 183, 93, 0.16);
}

.video-card.featured {
  grid-column: span 6;
}

.thumb {
  position: relative;
  min-height: 12.5rem;
  overflow: hidden;
  background: var(--thumb-bg);
}

.thumb img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.06) contrast(1.03);
}

.thumb::before,
.thumb::after {
  content: "";
  position: absolute;
  inset: 0;
}

.thumb::before {
  background:
    linear-gradient(115deg, transparent 0 36%, rgba(255, 255, 255, 0.22) 37% 38%, transparent 39% 100%),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.09) 0 1px, transparent 1px 2.45rem),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.08) 0 1px, transparent 1px 2.45rem);
  z-index: 1;
  opacity: 0.42;
}

.thumb::after {
  z-index: 1;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.08) 10%, rgba(0, 0, 0, 0.58));
}

.orbit-ring {
  position: absolute;
  z-index: 2;
  right: -3.5rem;
  bottom: -4.5rem;
  width: 12rem;
  aspect-ratio: 1;
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 50%;
  transform: rotate(-22deg);
}

.play-chip {
  position: absolute;
  left: 1rem;
  bottom: 1rem;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  border-radius: 999px;
  padding: 0.58rem 0.78rem;
  background: rgba(7, 9, 13, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: var(--ink);
  font-weight: 900;
  backdrop-filter: blur(12px);
}

.play-icon {
  width: 1.75rem;
  height: 1.75rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #071014;
  background: var(--teal);
}

.play-icon::before {
  content: "";
  width: 0;
  height: 0;
  margin-left: 0.16rem;
  border-top: 0.38rem solid transparent;
  border-bottom: 0.38rem solid transparent;
  border-left: 0.56rem solid #071014;
}

.card-body {
  display: grid;
  grid-template-rows: auto auto auto 1fr auto;
  gap: 0.85rem;
  padding: 1rem;
}

.station-owner {
  color: #d9e6ef;
  font-size: 0.85rem;
  font-weight: 800;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tag {
  border: 1px solid rgba(255, 255, 255, 0.17);
  border-radius: 999px;
  padding: 0.35rem 0.58rem;
  color: #d9e6ef;
  background: rgba(255, 255, 255, 0.06);
  font-size: 0.74rem;
  font-weight: 800;
}

.status-live {
  border-color: rgba(149, 223, 114, 0.54);
  color: #dfffd1;
}

.card-body p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.selection-row {
  align-self: end;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
}

.select-station {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: 2.65rem;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--radius);
  color: var(--ink);
  background: rgba(255, 255, 255, 0.055);
  font-weight: 900;
  cursor: pointer;
}

.select-station input {
  width: 1.05rem;
  height: 1.05rem;
  accent-color: var(--amber);
}

.card-button {
  align-self: end;
  min-height: 2.65rem;
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--radius);
  color: var(--ink);
  background: rgba(255, 255, 255, 0.08);
  font-weight: 900;
  cursor: pointer;
}

.card-button:hover,
.filter-tabs button:hover,
.topbar-actions a:hover,
.ghost-action:hover,
.select-station:hover {
  border-color: rgba(61, 216, 197, 0.64);
}

.timeline {
  max-width: 88rem;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: rgba(255, 255, 255, 0.04);
}

.timeline-step {
  min-height: 11rem;
  padding: 1rem;
  border-right: 1px solid var(--line);
}

.timeline-step:last-child {
  border-right: 0;
}

.timeline-step span {
  display: inline-grid;
  place-items: center;
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 50%;
  color: #071014;
  background: var(--accent);
  font-weight: 900;
}

.timeline-step h3 {
  margin-top: 1.1rem;
}

.timeline-step p {
  color: var(--muted);
  line-height: 1.5;
}

.manifest-band {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(18rem, 1fr);
  gap: 2rem;
  align-items: start;
  max-width: 96rem;
  margin: 0 auto;
  padding-bottom: clamp(3rem, 7vw, 6rem);
}

.manifest-copy p:not(.eyebrow) {
  color: var(--muted);
  line-height: 1.6;
}

code {
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 0.15rem 0.32rem;
  color: #fff3d8;
  background: rgba(255, 183, 93, 0.12);
}

.manifest-panel {
  display: grid;
  gap: 0.8rem;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.055);
}

.manifest-panel label {
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 800;
}

.manifest-panel select {
  appearance: none;
  background:
    linear-gradient(45deg, transparent 50%, var(--teal) 50%) right 1rem center / 0.45rem 0.45rem no-repeat,
    rgba(255, 255, 255, 0.06);
}

.video-modal {
  width: min(64rem, calc(100% - 2rem));
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  background: #0b1016;
  box-shadow: 0 2rem 8rem rgba(0, 0, 0, 0.65);
}

.video-modal::backdrop {
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(7px);
}

.modal-shell {
  position: relative;
}

.close-button {
  position: absolute;
  top: 0.65rem;
  right: 0.65rem;
  z-index: 2;
  width: 2.4rem;
  height: 2.4rem;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 50%;
  color: var(--ink);
  background: rgba(0, 0, 0, 0.5);
  font-size: 1.2rem;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
}

.player-shell {
  position: relative;
  aspect-ratio: 16 / 9;
  display: grid;
  place-items: center;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(61, 216, 197, 0.16), transparent 34%),
    linear-gradient(315deg, rgba(255, 183, 93, 0.18), transparent 38%),
    #090d12;
}

.player-shell iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

.player-shell .modal-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.48;
}

.placeholder-player {
  position: relative;
  z-index: 1;
  width: min(28rem, calc(100% - 2rem));
  text-align: center;
}

.placeholder-player strong {
  display: block;
  font-size: 2.8rem;
  line-height: 1;
}

.placeholder-player p {
  color: var(--muted);
  line-height: 1.55;
}

.modal-copy {
  padding: 1.25rem;
}

.modal-copy p:last-child {
  color: var(--muted);
  line-height: 1.6;
}

.modal-actions {
  display: flex;
  margin-top: 1rem;
}

.queue-dock {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 5;
  width: min(24rem, calc(100% - 2rem));
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--radius);
  background: rgba(10, 14, 19, 0.88);
  box-shadow: 0 1.25rem 4rem rgba(0, 0, 0, 0.46);
  backdrop-filter: blur(16px);
}

.queue-dock.is-collapsed .queue-list,
.queue-dock.is-collapsed .queue-actions {
  display: none;
}

.queue-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem;
  border-bottom: 1px solid var(--line);
}

.queue-head .eyebrow {
  margin-bottom: 0.25rem;
}

.queue-head h2 {
  font-size: 1.3rem;
  line-height: 1.1;
}

.dock-toggle {
  width: 2.25rem;
  height: 2.25rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.08);
  font-weight: 900;
  cursor: pointer;
}

.queue-list {
  max-height: 15rem;
  overflow: auto;
  margin: 0;
  padding: 0.55rem 0.9rem 0.2rem 2rem;
}

.queue-list li {
  padding: 0.45rem 0;
  color: #d9e6ef;
}

.queue-list small {
  display: block;
  color: var(--muted);
  margin-top: 0.1rem;
}

.queue-empty {
  list-style: none;
  margin-left: -1.1rem;
  color: var(--muted);
}

.queue-actions {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.6rem;
  padding: 0.9rem;
}

.empty-state {
  grid-column: 1 / -1;
  min-height: 16rem;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--muted);
  background: rgba(255, 255, 255, 0.04);
}

@media (max-width: 980px) {
  h1 {
    font-size: 4.6rem;
  }

  h2 {
    font-size: 2.7rem;
  }

  .metric {
    font-size: 3.2rem;
  }

  .video-card,
  .video-card.featured {
    grid-column: span 6;
  }

  .controls,
  .manifest-band {
    grid-template-columns: 1fr;
  }

  .filter-tabs {
    justify-content: flex-start;
  }

  .timeline {
    grid-template-columns: 1fr;
  }

  .timeline-step {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .timeline-step:last-child {
    border-bottom: 0;
  }
}

@media (max-width: 680px) {
  .site-hero {
    min-height: 88vh;
  }

  .hero-shade {
    background:
      linear-gradient(180deg, rgba(7, 9, 13, 0.36) 0%, rgba(7, 9, 13, 0.78) 42%, rgba(7, 9, 13, 0.94) 100%);
  }

  .topbar {
    align-items: flex-start;
  }

  .topbar-actions {
    display: none;
  }

  .hero-content {
    width: calc(100% - 2rem);
    margin: 0 auto;
    align-self: end;
    padding-bottom: 5rem;
  }

  h1 {
    font-size: 3.35rem;
    max-width: 9ch;
  }

  h2 {
    font-size: 2.15rem;
  }

  .metric {
    font-size: 2.6rem;
  }

  .hero-copy {
    font-size: 1rem;
  }

  .mission-strip {
    grid-template-columns: 1fr;
  }

  .section-heading {
    grid-template-columns: 1fr;
  }

  .video-card,
  .video-card.featured {
    grid-column: 1 / -1;
  }

  .selection-row,
  .queue-actions {
    grid-template-columns: 1fr;
  }

  .queue-dock {
    right: 0.6rem;
    bottom: 0.6rem;
    width: calc(100% - 1.2rem);
  }
}

@media (prefers-reduced-motion: no-preference) {
  .thumb::before {
    animation: scan 8s linear infinite;
  }

  @keyframes scan {
    from {
      transform: translateY(-8%);
    }

    to {
      transform: translateY(8%);
    }
  }
}
