:root {
  --bg: #09111a;
  --bg-deep: #05090e;
  --panel: rgba(8, 12, 17, 0.58);
  --panel-strong: rgba(10, 14, 19, 0.74);
  --line: rgba(228, 236, 245, 0.14);
  --text: #f4f7fb;
  --muted: rgba(244, 247, 251, 0.62);
  --accent: #dbe8f5;
  --accent-warm: rgba(244, 247, 251, 0.52);
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.22);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background: linear-gradient(180deg, #0e1723 0%, var(--bg) 42%, var(--bg-deep) 100%);
  color: var(--text);
  font-family: "SF Pro Display", "Helvetica Neue", "Arial", sans-serif;
}

a {
  color: inherit;
}

code {
  font-family: "SF Mono", "Menlo", monospace;
}

.page-shell {
  position: relative;
  overflow-x: hidden;
  z-index: 1;
}

.viewer-stage {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  background: #020508;
}

.viewer-stage__canvas,
.viewer-stage__veil {
  position: absolute;
  inset: 0;
}

.viewer-stage__canvas canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.viewer-stage__veil {
  background:
    linear-gradient(90deg, rgba(4, 7, 10, 0.54) 0%, rgba(4, 7, 10, 0.18) 14%, rgba(4, 7, 10, 0) 30%, rgba(4, 7, 10, 0) 70%, rgba(4, 7, 10, 0.18) 86%, rgba(4, 7, 10, 0.54) 100%),
    linear-gradient(180deg, rgba(4, 9, 14, 0.5) 0%, rgba(4, 9, 14, 0.16) 14%, rgba(4, 9, 14, 0) 32%, rgba(4, 9, 14, 0) 68%, rgba(4, 9, 14, 0.18) 84%, rgba(4, 7, 10, 0.5) 100%),
    radial-gradient(circle at 20% 18%, rgba(82, 132, 190, 0.14), transparent 32%),
    radial-gradient(circle at 78% 24%, rgba(255, 171, 117, 0.1), transparent 28%),
    radial-gradient(circle at 50% 45%, rgba(8, 13, 20, 0), rgba(4, 8, 12, 0.12) 62%, rgba(3, 6, 9, 0.4) 100%);
  pointer-events: none;
}

.viewer-stage__status {
  position: fixed;
  left: 50%;
  bottom: 1.25rem;
  transform: translateX(-50%);
  display: flex;
  justify-content: center;
  width: auto;
  min-width: 8rem;
  padding: 0.65rem 0.8rem;
  border: 1px solid var(--line);
  border-radius: 0.4rem;
  background: rgba(6, 11, 18, 0.54);
  color: var(--muted);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  pointer-events: none;
  transition: opacity 220ms ease;
}

.viewer-stage__status.is-hidden {
  opacity: 0;
}

.hero {
  position: relative;
  min-height: 100vh;
  padding: 2rem;
  isolation: isolate;
}

.hero__backdrop {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 50%, rgba(94, 179, 255, 0.08), transparent 32%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent 40%);
  pointer-events: none;
}

.masthead {
  position: absolute;
  top: clamp(1.4rem, 2vw, 2.4rem);
  left: clamp(1.4rem, 2vw, 2.4rem);
  max-width: min(28rem, calc(100vw - 3rem));
  z-index: 3;
}

.masthead__eyebrow,
.section-label {
  margin: 0 0 0.75rem;
  color: var(--accent-warm);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 0.68rem;
}

.masthead__title,
.content-band h2 {
  margin: 0;
  font-family: inherit;
  font-weight: 500;
  letter-spacing: -0.045em;
}

.masthead__title {
  font-size: clamp(3.4rem, 10vw, 7.2rem);
  line-height: 0.92;
}

.masthead__lede,
.content-copy,
.content-card p {
  margin: 1rem 0 0;
  max-width: 28rem;
  color: var(--muted);
  line-height: 1.55;
  font-size: 0.96rem;
}

.edge-nav {
  position: absolute;
  display: flex;
  gap: 0.75rem;
  z-index: 3;
}

.edge-nav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  padding: 0.35rem 0;
  border: 1px solid var(--line);
  border-width: 0 0 1px;
  border-radius: 0;
  background: transparent;
  text-decoration: none;
  color: var(--text);
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    color 180ms ease;
}

.edge-nav a:hover,
.edge-nav a:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(244, 247, 251, 0.52);
  color: rgba(244, 247, 251, 0.78);
  outline: none;
}

.edge-nav--top {
  top: 2rem;
  left: 50%;
  transform: translateX(-50%);
}

.edge-nav--left,
.edge-nav--right {
  top: 50%;
  flex-direction: column;
  transform: translateY(-50%);
}

.edge-nav--left {
  left: 2rem;
}

.edge-nav--right {
  right: 2rem;
}

.scroll-cue {
  position: absolute;
  left: 50%;
  bottom: 2rem;
  z-index: 3;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  transform: translateX(-50%);
  color: var(--muted);
  text-decoration: none;
  transition:
    opacity 260ms ease,
    transform 260ms ease;
}

.scroll-cue.is-hidden {
  opacity: 0;
  transform: translateX(-50%) translateY(0.6rem);
  pointer-events: none;
}

.scroll-cue__line {
  width: 1px;
  height: 2.75rem;
  background: linear-gradient(180deg, rgba(244, 247, 251, 0), rgba(244, 247, 251, 0.62));
}

.scroll-cue__arrow {
  width: 0.7rem;
  height: 0.7rem;
  border-right: 1px solid currentColor;
  border-bottom: 1px solid currentColor;
  transform: rotate(45deg);
}

.content-band {
  position: relative;
  padding: clamp(4rem, 9vw, 7rem) clamp(1.4rem, 4vw, 4rem);
  background: linear-gradient(180deg, rgba(6, 10, 15, 0.06), rgba(6, 10, 15, 0.18));
}

.content-band::before {
  content: "";
  position: absolute;
  inset: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  pointer-events: none;
}

.edge-columns {
  display: grid;
  grid-template-columns: minmax(16rem, 26rem) minmax(0, 1fr) minmax(16rem, 26rem);
  gap: clamp(1rem, 3vw, 3rem);
  align-items: start;
}

.edge-stack {
  display: grid;
  gap: 1rem;
}

.edge-stack--left {
  grid-column: 1;
}

.edge-stack--right {
  grid-column: 3;
}

.content-card {
  min-height: 0;
  padding: 1rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: transparent;
  box-shadow: none;
}

.content-card h2,
.content-band h2 {
  font-size: clamp(1.55rem, 3.2vw, 2.4rem);
}

@media (max-width: 1100px) {
  .hero {
    padding-top: 8rem;
    padding-bottom: 8rem;
  }

  .edge-nav {
    position: static;
    transform: none;
    flex-direction: row;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 1rem;
  }

  .edge-nav--top,
  .edge-nav--left,
  .edge-nav--right {
    position: static;
    transform: none;
  }

  .hero {
    display: flex;
    flex-direction: column;
    gap: 1rem;
  }

  .masthead {
    position: static;
    max-width: none;
    width: 100%;
    text-align: center;
  }

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

  .edge-stack--left,
  .edge-stack--right {
    grid-column: auto;
  }
}

@media (max-width: 640px) {
  .hero {
    padding: 1rem 1rem 4rem;
  }

  .viewer-stage__status {
    flex-direction: column;
    border-radius: 1.2rem;
  }

  .edge-nav a {
    min-width: 0;
    width: auto;
  }
}
