:root {
  color-scheme: dark;
  --bg: #07111d;
  --bg-soft: #0d1a2b;
  --panel: rgba(10, 20, 34, 0.78);
  --panel-strong: rgba(10, 20, 34, 0.92);
  --line: rgba(255, 255, 255, 0.1);
  --line-strong: rgba(255, 255, 255, 0.18);
  --text: #f4f7fb;
  --muted: #a8b6ca;
  --muted-strong: #cad3df;
  --accent: #7ce2d8;
  --accent-2: #f5c25d;
  --accent-3: #79a8ff;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.32);
  --radius-xl: 32px;
  --radius-lg: 24px;
  --radius-md: 18px;
  --mono: "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;
  --sans: "Space Grotesk", "Segoe UI", sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  background:
    radial-gradient(circle at top left, rgba(121, 168, 255, 0.16), transparent 28%),
    radial-gradient(circle at top right, rgba(124, 226, 216, 0.12), transparent 24%),
    radial-gradient(circle at 20% 80%, rgba(245, 194, 93, 0.14), transparent 26%),
    linear-gradient(180deg, #07111d 0%, #0b1524 46%, #07111d 100%);
  color: var(--text);
  font-family: var(--sans);
  line-height: 1.5;
  text-rendering: optimizeLegibility;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.018) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: linear-gradient(180deg, rgba(255, 255, 255, 0.5), transparent 80%);
}

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

img,
canvas {
  display: block;
  max-width: 100%;
}

button,
input,
textarea,
select {
  font: inherit;
}

::selection {
  background: rgba(121, 168, 255, 0.4);
  color: #ffffff;
}

.page-shell {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 20px 0 56px;
}

.site-header {
  position: sticky;
  top: 16px;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 20px;
  padding: 14px 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(7, 17, 29, 0.66);
  backdrop-filter: blur(16px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.18);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 14px;
  background:
    linear-gradient(135deg, rgba(124, 226, 216, 0.95), rgba(121, 168, 255, 0.85));
  color: #07111d;
  font-size: 1.15rem;
  font-weight: 700;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45);
}

.brand-copy {
  display: flex;
  flex-direction: column;
  gap: 1px;
  line-height: 1.05;
}

.brand-copy strong {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.brand-copy span {
  color: var(--muted);
  font-size: 0.82rem;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  color: var(--muted-strong);
  font-size: 0.95rem;
}

.site-nav a {
  transition: color 160ms ease, opacity 160ms ease;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  color: var(--text);
}

.hero,
.section {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: linear-gradient(180deg, rgba(9, 20, 35, 0.72), rgba(9, 18, 31, 0.86));
  box-shadow: var(--shadow);
}

.hero {
  min-height: min(840px, calc(100vh - 88px));
  padding: clamp(28px, 4vw, 48px);
}

.hero-stage,
.effect-stage {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.hero-stage {
  background:
    radial-gradient(circle at 18% 22%, rgba(121, 168, 255, 0.38), transparent 22%),
    radial-gradient(circle at 82% 18%, rgba(245, 194, 93, 0.34), transparent 22%),
    linear-gradient(135deg, #0b1730 0%, #0a1324 55%, #07111d 100%);
}

.hero-scrim {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(7, 17, 29, 0.88) 0%, rgba(7, 17, 29, 0.52) 48%, rgba(7, 17, 29, 0.68) 100%),
    linear-gradient(180deg, rgba(7, 17, 29, 0) 0%, rgba(7, 17, 29, 0.1) 40%, rgba(7, 17, 29, 0.55) 100%);
  pointer-events: none;
}

.hero-grid,
.install-grid {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 28px;
}

.hero-grid {
  grid-template-columns: minmax(0, 1.45fr) minmax(320px, 0.8fr);
  align-items: end;
  min-height: calc(min(840px, 100vh - 88px) - clamp(56px, 8vw, 96px));
}

.hero-copy {
  min-width: 0;
  max-width: 720px;
}

.eyebrow,
.panel-kicker,
.effect-meta,
.switcher-label {
  color: var(--muted-strong);
  font-family: var(--mono);
  font-size: 0.74rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  background: rgba(7, 17, 29, 0.38);
}

.hero h1,
.section h2 {
  margin: 18px 0 0;
  letter-spacing: -0.05em;
  line-height: 0.94;
}

.hero h1 {
  max-width: 9ch;
  font-size: clamp(3.6rem, 8vw, 7rem);
}

.section h2 {
  max-width: 15ch;
  font-size: clamp(2.3rem, 4vw, 3.4rem);
}

.hero-lead,
.section-heading p,
.panel-card p,
.effect-content p,
.principle-card p,
.text-card,
.site-footer p {
  color: var(--muted);
}

.hero-lead {
  max-width: 60ch;
  margin: 18px 0 0;
  font-size: clamp(1rem, 1.7vw, 1.18rem);
}

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

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 0 20px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 500;
  transition:
    transform 180ms ease,
    background 180ms ease,
    border-color 180ms ease,
    color 180ms ease;
}

.button:hover,
.button:focus-visible {
  transform: translateY(-1px);
}

.button-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-3));
  color: #07111d;
  box-shadow: 0 14px 40px rgba(121, 168, 255, 0.26);
}

.button-secondary {
  border-color: var(--line-strong);
  background: rgba(7, 17, 29, 0.42);
  color: var(--text);
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin: 32px 0 0;
  padding: 0;
  list-style: none;
}

.hero-stats li,
.panel-card,
.text-card,
.code-card,
.principle-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--panel);
  backdrop-filter: blur(12px);
}

.hero-stats li {
  padding: 16px 18px;
}

.hero-stats strong {
  display: block;
  font-size: 1.1rem;
  letter-spacing: -0.03em;
}

.hero-stats span {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.94rem;
}

.hero-switcher {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 28px;
}

.switcher-label {
  margin-right: 4px;
}

.effect-pill {
  padding: 9px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(7, 17, 29, 0.46);
  color: var(--muted-strong);
  cursor: pointer;
  transition:
    border-color 180ms ease,
    background 180ms ease,
    color 180ms ease,
    transform 180ms ease;
}

.effect-pill:hover,
.effect-pill:focus-visible {
  border-color: rgba(255, 255, 255, 0.24);
  color: var(--text);
  transform: translateY(-1px);
}

.effect-pill.is-active {
  border-color: transparent;
  background: linear-gradient(135deg, rgba(124, 226, 216, 0.22), rgba(121, 168, 255, 0.22));
  color: var(--text);
}

.hero-panel {
  display: grid;
  gap: 18px;
  align-self: stretch;
  min-width: 0;
}

.panel-card,
.text-card,
.code-card,
.principle-card {
  padding: 22px;
  min-width: 0;
}

.panel-card h2,
.text-card h3,
.principle-card h3 {
  margin: 10px 0 0;
  letter-spacing: -0.04em;
}

.panel-card h2 {
  font-size: clamp(1.9rem, 3vw, 2.5rem);
  line-height: 1;
}

.panel-card p {
  margin: 10px 0 0;
}

pre {
  margin: 0;
  overflow-x: auto;
  font-family: var(--mono);
  font-size: 0.85rem;
  line-height: 1.65;
}

code {
  font-family: inherit;
}

.panel-code pre,
.code-card pre {
  margin-top: 14px;
  padding: 18px;
  border-radius: 16px;
  background: rgba(3, 9, 18, 0.9);
  color: #d9ebff;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.section {
  margin-top: 22px;
  padding: clamp(28px, 4vw, 44px);
}

.section-heading {
  max-width: 760px;
}

.section-heading p {
  margin: 12px 0 0;
  font-size: 1rem;
}

.effect-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 18px;
  margin-top: 28px;
}

.effect-card {
  position: relative;
  grid-column: span 4;
  min-height: 260px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(circle at top left, rgba(124, 226, 216, 0.16), transparent 32%),
    linear-gradient(180deg, rgba(11, 20, 36, 0.84), rgba(8, 15, 28, 0.94));
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.26);
}

.effect-card-wide {
  grid-column: span 6;
  min-height: 320px;
}

.effect-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(7, 17, 29, 0.04) 0%, rgba(7, 17, 29, 0.24) 40%, rgba(7, 17, 29, 0.82) 100%),
    radial-gradient(circle at top, transparent 0, rgba(7, 17, 29, 0.14) 48%, rgba(7, 17, 29, 0.54) 100%);
  pointer-events: none;
}

.effect-stage {
  background-size: cover;
  background-position: center;
}

.effect-stage-waves {
  background:
    radial-gradient(circle at 15% 20%, rgba(124, 226, 216, 0.18), transparent 28%),
    linear-gradient(140deg, #10243d 0%, #0d4c57 55%, #07111d 100%);
}

.effect-stage-halo {
  background:
    radial-gradient(circle at 50% 78%, rgba(245, 140, 202, 0.45), transparent 20%),
    radial-gradient(circle at 54% 74%, rgba(245, 140, 202, 0.18), transparent 28%),
    linear-gradient(140deg, #111a30 0%, #0b1224 100%);
}

.effect-stage-globe {
  background:
    radial-gradient(circle at center, rgba(121, 168, 255, 0.22), transparent 28%),
    linear-gradient(145deg, #101f3d 0%, #111a2c 100%);
}

.effect-stage-net {
  background:
    radial-gradient(circle at 20% 16%, rgba(124, 226, 216, 0.14), transparent 24%),
    linear-gradient(180deg, rgba(124, 226, 216, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(124, 226, 216, 0.08) 1px, transparent 1px),
    linear-gradient(145deg, #0c1728 0%, #08111d 100%);
  background-size: auto, 26px 26px, 26px 26px, auto;
}

.effect-stage-fog {
  background:
    radial-gradient(circle at 25% 25%, rgba(255, 195, 0, 0.18), transparent 30%),
    radial-gradient(circle at 75% 70%, rgba(45, 0, 255, 0.22), transparent 34%),
    linear-gradient(135deg, #25103d 0%, #150c25 100%);
}

.effect-stage-cells {
  background:
    radial-gradient(circle at 26% 26%, rgba(242, 231, 53, 0.42), transparent 16%),
    radial-gradient(circle at 68% 54%, rgba(12, 90, 90, 0.3), transparent 22%),
    linear-gradient(135deg, #9ccc67 0%, #d7ff8f 100%);
}

.effect-stage-dots {
  background:
    radial-gradient(circle at top, rgba(245, 194, 93, 0.18), transparent 30%),
    linear-gradient(180deg, #1f1f26 0%, #10121a 100%);
}

.effect-stage-rings {
  background:
    radial-gradient(circle at 24% 20%, rgba(136, 255, 0, 0.18), transparent 24%),
    radial-gradient(circle at 76% 80%, rgba(255, 34, 85, 0.18), transparent 26%),
    linear-gradient(135deg, #151d21 0%, #0e1115 100%);
}

.effect-stage-clouds {
  background:
    radial-gradient(circle at 18% 20%, rgba(255, 255, 255, 0.24), transparent 22%),
    linear-gradient(135deg, #6fa9da 0%, #9dc2de 52%, #d7e4f0 100%);
}

.effect-stage-clouds2 {
  background:
    radial-gradient(circle at 72% 24%, rgba(255, 255, 255, 0.18), transparent 18%),
    radial-gradient(circle at 32% 56%, rgba(92, 166, 202, 0.3), transparent 24%),
    linear-gradient(135deg, #0d1624 0%, #21395f 46%, #05070b 100%);
}

.effect-stage-ripple {
  background:
    radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.7), transparent 12%),
    radial-gradient(circle at 50% 50%, rgba(31, 117, 255, 0.36), transparent 24%),
    linear-gradient(135deg, #f3f6fa 0%, #d7e0eb 100%);
}

.effect-stage-birds {
  background:
    radial-gradient(circle at 24% 36%, rgba(255, 102, 125, 0.18), transparent 20%),
    radial-gradient(circle at 74% 28%, rgba(0, 209, 255, 0.2), transparent 22%),
    linear-gradient(145deg, #0d1732 0%, #07192f 100%);
}

.effect-stage-topology {
  background:
    radial-gradient(circle at center, rgba(144, 169, 101, 0.16), transparent 24%),
    linear-gradient(145deg, #071920 0%, #031117 100%);
}

.effect-stage-trunk {
  background:
    radial-gradient(circle at 50% 50%, rgba(200, 107, 139, 0.24), transparent 18%),
    linear-gradient(145deg, #2a2d31 0%, #1d1f22 100%);
}

.effect-content {
  position: absolute;
  inset: auto 0 0 0;
  z-index: 1;
  padding: 22px;
}

.effect-content h3 {
  margin: 8px 0 0;
  font-size: clamp(1.7rem, 3vw, 2.2rem);
  letter-spacing: -0.05em;
}

.effect-content p {
  margin: 10px 0 0;
  max-width: 34ch;
}

.section-install .install-grid {
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  align-items: start;
  margin-top: 28px;
}

.feature-list {
  margin: 16px 0 0;
  padding-left: 1.1rem;
  color: var(--muted);
}

.feature-list li + li {
  margin-top: 10px;
}

.code-stack {
  display: grid;
  gap: 18px;
}

.principle-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 28px;
}

.principle-card {
  min-height: 220px;
  background:
    linear-gradient(180deg, rgba(10, 20, 34, 0.76), rgba(8, 14, 24, 0.96));
}

.principle-card h3 {
  font-size: 1.4rem;
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 22px;
  padding: 24px 8px 0;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  color: var(--muted-strong);
}

.footer-links a {
  transition: color 160ms ease;
}

.footer-links a:hover,
.footer-links a:focus-visible {
  color: var(--text);
}

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 700ms ease, transform 700ms ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay-1 {
  transition-delay: 80ms;
}

.reveal-delay-2 {
  transition-delay: 160ms;
}

.effects-disabled .effect-stage::before,
.effects-disabled .hero-stage::before {
  content: "Animation paused for this device setting";
  position: absolute;
  left: 16px;
  bottom: 16px;
  z-index: 1;
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(7, 17, 29, 0.72);
  color: var(--muted-strong);
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

@media (max-width: 1080px) {
  .hero-grid,
  .section-install .install-grid,
  .principle-grid {
    grid-template-columns: 1fr;
  }

  .hero-grid {
    min-height: auto;
  }

  .hero-copy {
    max-width: none;
  }

  .hero h1 {
    max-width: 10.5ch;
  }

  .effect-card,
  .effect-card-wide {
    grid-column: span 6;
  }
}

@media (max-width: 840px) {
  .page-shell {
    width: min(100%, calc(100% - 20px));
    padding-top: 12px;
  }

  .site-header {
    top: 8px;
    border-radius: 24px;
  }

  .site-nav {
    gap: 12px;
    font-size: 0.9rem;
  }

  .hero {
    min-height: auto;
  }

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

  .effect-card,
  .effect-card-wide {
    grid-column: span 12;
    min-height: 260px;
  }

  .site-footer {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 640px) {
  .site-header {
    flex-direction: column;
    align-items: flex-start;
    padding: 16px;
    border-radius: 20px;
  }

  .site-nav {
    flex-wrap: wrap;
  }

  .hero,
  .section {
    border-radius: 24px;
    padding: 22px;
  }

  .hero h1 {
    max-width: 8ch;
    font-size: clamp(2.8rem, 13vw, 3.7rem);
  }

  .section h2 {
    font-size: clamp(2rem, 10vw, 2.7rem);
  }

  .eyebrow {
    display: block;
    max-width: 100%;
    font-size: 0.67rem;
    letter-spacing: 0.08em;
    line-height: 1.45;
    white-space: normal;
  }

  .hero-actions,
  .hero-switcher {
    flex-direction: column;
    align-items: stretch;
  }

  .switcher-label {
    margin-right: 0;
  }

  .button,
  .effect-pill {
    width: 100%;
    justify-content: center;
  }

  .panel-card,
  .text-card,
  .code-card,
  .principle-card,
  .effect-content {
    padding: 18px;
  }
}

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

  .reveal,
  .reveal.is-visible {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .button,
  .effect-pill,
  .site-nav a {
    transition: none;
  }
}
