:root {
  --bg: #02040a;
  --ink: #f6fcff;
  --muted: #a6c7d2;
  --muted-strong: #d1eaf0;
  --cyan: #63e8ff;
  --blue: #6ba6ff;
  --violet: #8978ff;
  --cream: #fff8d8;
  --line: rgba(118, 225, 255, 0.2);
  --panel: rgba(6, 15, 27, 0.58);
  --panel-strong: rgba(8, 18, 32, 0.82);
  color-scheme: dark;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-padding-top: 98px;
  background: var(--bg);
}

html.lenis,
html.lenis body {
  height: auto;
}

.lenis.lenis-smooth {
  scroll-behavior: auto !important;
}

body {
  margin: 0;
  min-width: 0;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 50% 6%, rgba(99, 232, 255, 0.14), transparent 34rem),
    radial-gradient(circle at 78% 26%, rgba(137, 120, 255, 0.1), transparent 26rem),
    linear-gradient(180deg, #010207 0%, #02040a 48%, #060711 100%);
  color: var(--ink);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.028) 1px, transparent 1px);
  background-size: 84px 84px;
  mask-image: linear-gradient(to bottom, transparent, #000 12%, #000 78%, transparent);
  opacity: 0.46;
}

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

#stage-canvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.grain,
.light-sweep {
  position: fixed;
  inset: 0;
  pointer-events: none;
}

.grain {
  z-index: 2;
  opacity: 0.34;
  background-image:
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.04) 0 1px, transparent 1px 3px),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.02) 0 1px, transparent 1px 5px);
  mix-blend-mode: overlay;
}

.light-sweep {
  z-index: 3;
  background:
    linear-gradient(110deg, transparent 4%, rgba(99, 232, 255, 0.06) 34%, transparent 54%),
    radial-gradient(circle at var(--mx, 58%) var(--my, 46%), rgba(99, 232, 255, 0.09), transparent 24rem);
  mix-blend-mode: screen;
}

.topbar {
  position: fixed;
  z-index: 20;
  top: 20px;
  left: clamp(14px, 4vw, 48px);
  right: clamp(14px, 4vw, 48px);
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 24px;
  min-width: 0;
  min-height: 60px;
  padding: 10px 12px 10px 16px;
  border: 1px solid rgba(136, 231, 255, 0.18);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(7, 17, 31, 0.78), rgba(3, 7, 14, 0.52));
  box-shadow: 0 26px 90px rgba(0, 0, 0, 0.36), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(22px);
}

.brand,
.topbar nav,
.topbar-action {
  display: flex;
  align-items: center;
}

.brand {
  min-width: 0;
  gap: 12px;
  font-weight: 800;
  font-size: 19px;
}

.brand img {
  width: 46px;
  height: 34px;
  object-fit: contain;
  filter: drop-shadow(0 0 16px rgba(99, 232, 255, 0.38));
}

.topbar nav {
  justify-content: center;
  gap: clamp(10px, 3vw, 36px);
  color: rgba(230, 246, 252, 0.72);
  font-size: 14px;
  font-weight: 700;
}

.topbar nav a,
.topbar-action {
  border-radius: 8px;
  padding: 9px 12px;
  transition: color 180ms ease, background 180ms ease, border-color 180ms ease;
}

.topbar nav a:hover,
.topbar nav a.is-active {
  color: var(--cyan);
  background: rgba(99, 232, 255, 0.08);
}

.topbar-action {
  justify-content: center;
  min-width: 92px;
  border: 1px solid rgba(99, 232, 255, 0.22);
  color: var(--ink);
  font-weight: 800;
  background: rgba(7, 16, 28, 0.52);
}

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

.chapter {
  position: relative;
  min-height: 100vh;
  padding: 132px clamp(16px, 5vw, 78px) 86px;
  isolation: isolate;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 0.96fr) minmax(280px, 0.42fr);
  align-items: center;
  gap: clamp(28px, 6vw, 96px);
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(300px, 0.72fr);
  align-items: center;
  gap: clamp(28px, 6vw, 92px);
}

.chapter-copy,
.hero-copy,
.mission-panel,
.signal-list,
.fabric-grid,
.ops-console,
.contact-copy {
  min-width: 0;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  max-width: 100%;
  width: fit-content;
  margin: 0 0 18px;
  padding: 8px 12px;
  border: 1px solid rgba(99, 232, 255, 0.22);
  border-radius: 8px;
  background: rgba(5, 14, 26, 0.56);
  color: var(--cyan);
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  overflow-wrap: anywhere;
}

.eyebrow span,
.mission-head span {
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 18px rgba(99, 232, 255, 0.95);
}

h1,
h2,
h3,
p {
  letter-spacing: 0;
}

h1,
h2 {
  max-width: 100%;
  margin: 0;
  font-weight: 800;
  text-wrap: balance;
  overflow-wrap: anywhere;
}

h1 {
  max-width: 950px;
  font-size: clamp(52px, 8vw, 124px);
  line-height: 0.9;
  background: linear-gradient(92deg, var(--cream), var(--cyan) 36%, #eefaff 58%, var(--violet));
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 0 42px rgba(99, 232, 255, 0.12);
}

h2 {
  max-width: 920px;
  font-size: clamp(38px, 5.5vw, 82px);
  line-height: 0.98;
}

h3 {
  margin: 0;
  font-size: 23px;
  line-height: 1.12;
}

p {
  color: var(--muted);
}

.lede,
.chapter-copy > p:not(.eyebrow) {
  max-width: 720px;
  margin: 24px 0 0;
  font-size: 19px;
  line-height: 1.62;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 34px;
}

.hero-actions a,
.contact-copy a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  min-height: 50px;
  padding: 0 26px;
  border: 1px solid rgba(118, 225, 255, 0.24);
  border-radius: 8px;
  background: rgba(7, 16, 28, 0.54);
  color: var(--ink);
  font-weight: 800;
  box-shadow: 0 0 0 rgba(99, 232, 255, 0);
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.hero-actions a:hover,
.contact-copy a:hover {
  transform: translateY(-2px);
  border-color: rgba(99, 232, 255, 0.46);
  box-shadow: 0 18px 52px rgba(44, 199, 255, 0.16);
}

.primary-action {
  color: #06111a !important;
  border-color: transparent !important;
  background: linear-gradient(135deg, var(--cream), var(--cyan) 55%, var(--blue)) !important;
}

.mission-panel,
.signal-list article,
.fabric-grid article,
.ops-console,
.contact-copy {
  border: 1px solid rgba(118, 225, 255, 0.18);
  border-radius: 8px;
  background:
    radial-gradient(circle at var(--mx, 50%) var(--my, 50%), rgba(99, 232, 255, 0.14), transparent 18rem),
    linear-gradient(180deg, rgba(9, 20, 36, 0.78), rgba(4, 8, 15, 0.66));
  box-shadow: 0 26px 92px rgba(0, 0, 0, 0.34), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(18px);
}

.mission-panel {
  align-self: end;
  padding: 24px;
}

.mission-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 22px;
  color: var(--cyan);
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 12px;
  text-transform: uppercase;
}

dl {
  margin: 0;
}

.mission-panel dl > div {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 17px 0;
  border-bottom: 1px solid rgba(118, 225, 255, 0.12);
}

.mission-panel dl > div:last-child {
  border-bottom: 0;
}

dt {
  color: var(--muted);
}

dd {
  display: grid;
  justify-items: end;
  gap: 3px;
  margin: 0;
}

dd strong {
  color: var(--ink);
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 25px;
}

dd small {
  color: rgba(209, 234, 240, 0.62);
}

.signal-list {
  display: grid;
  gap: 16px;
}

.signal-list article {
  padding: 24px;
}

.signal-list span,
.fabric-grid span,
.console-row span {
  color: var(--cyan);
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.signal-list h3 {
  margin-top: 38px;
}

.signal-list p,
.fabric-grid p {
  margin: 13px 0 0;
  line-height: 1.56;
}

.fabric {
  display: grid;
  align-content: center;
}

.narrow {
  max-width: 960px;
}

.fabric-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 42px;
}

.fabric-grid article {
  min-height: 240px;
  padding: 24px;
}

.fabric-grid b {
  display: block;
  margin-top: 48px;
  color: var(--ink);
  font-size: 23px;
  line-height: 1.12;
}

.ops-console {
  position: relative;
  overflow: hidden;
  padding: 22px;
}

.ops-console::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(rgba(99, 232, 255, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(99, 232, 255, 0.04) 1px, transparent 1px);
  background-size: 28px 28px;
  opacity: 0.8;
}

.console-row {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 0;
  border-bottom: 1px solid rgba(118, 225, 255, 0.12);
}

.console-row b {
  color: var(--muted-strong);
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 14px;
}

.console-beam {
  position: relative;
  z-index: 1;
  height: 12px;
  margin-top: 28px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(118, 225, 255, 0.1);
}

.console-beam i {
  display: block;
  width: 38%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--violet), var(--cyan), var(--cream));
  box-shadow: 0 0 24px rgba(99, 232, 255, 0.56);
}

.contact {
  display: grid;
  place-items: center;
}

.contact-copy {
  width: min(900px, 100%);
  padding: clamp(28px, 5vw, 58px);
  text-align: center;
}

.contact-copy .eyebrow {
  margin-inline: auto;
}

.contact-copy h2 {
  margin-inline: auto;
}

.contact-copy a {
  margin-top: 30px;
}

@media (max-width: 980px) {
  .topbar {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .topbar nav {
    display: none;
  }

  .hero,
  .split {
    grid-template-columns: 1fr;
  }

  .mission-panel,
  .ops-console {
    width: min(560px, 100%);
  }

  .fabric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .topbar {
    top: 12px;
    left: 10px;
    right: 10px;
    gap: 10px;
    min-height: 56px;
    padding: 8px 8px 8px 10px;
  }

  .brand {
    gap: 8px;
    font-size: 16px;
  }

  .brand img {
    width: 38px;
    height: 30px;
  }

  .topbar-action {
    min-width: 0;
    padding-inline: 10px;
    font-size: 13px;
  }

  .chapter {
    min-height: auto;
    padding: 112px 16px 72px;
  }

  .hero {
    min-height: 100vh;
  }

  h1 {
    font-size: 44px;
  }

  h2 {
    font-size: 35px;
  }

  .lede,
  .chapter-copy > p:not(.eyebrow) {
    font-size: 16px;
  }

  .hero-actions a,
  .contact-copy a {
    width: 100%;
    padding-inline: 16px;
  }

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

  .mission-panel,
  .signal-list article,
  .fabric-grid article,
  .ops-console,
  .contact-copy {
    padding: 20px;
  }
}
