:root {
  color-scheme: dark;
  --bg: #080b12;
  --panel: #101622;
  --panel-2: #151d2b;
  --text: #f7f9fc;
  --muted: #9aa6b8;
  --line: rgba(255, 255, 255, 0.1);
  --accent: #7c5cff;
  --accent-2: #30d6c7;
  --accent-soft: rgba(124, 92, 255, 0.14);
  --shell: min(1180px, calc(100vw - 40px));
  --radius: 26px;
  --shadow: 0 28px 80px rgba(0, 0, 0, 0.38);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background: var(--bg);
}

body {
  margin: 0;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 80% 10%, rgba(124, 92, 255, 0.16), transparent 30rem),
    radial-gradient(circle at 15% 28%, rgba(48, 214, 199, 0.07), transparent 28rem),
    var(--bg);
  color: var(--text);
  line-height: 1.6;
}

a {
  color: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

::selection {
  background: rgba(124, 92, 255, 0.45);
  color: white;
}

.scroll-progress {
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  box-shadow: 0 0 22px rgba(124, 92, 255, 0.65);
}

.section-shell {
  width: var(--shell);
  margin-inline: auto;
}

.site-header {
  position: fixed;
  inset: 18px 0 auto;
  z-index: 1000;
  width: min(1220px, calc(100vw - 28px));
  margin-inline: auto;
  padding: 10px 12px 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(8, 11, 18, 0.76);
  backdrop-filter: blur(18px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
}

.brand-mark {
  width: 38px;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: linear-gradient(135deg, var(--accent), #5942c8);
  font-weight: 800;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  box-shadow: 0 10px 30px rgba(124, 92, 255, 0.28);
}

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

.brand strong {
  font-size: 0.9rem;
  line-height: 1.2;
}

.brand small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.7rem;
}

.nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav a {
  padding: 10px 12px;
  border-radius: 10px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 650;
  text-decoration: none;
  transition: color 180ms ease, background 180ms ease;
}

.nav a:hover,
.nav a:focus-visible {
  color: white;
  background: rgba(255, 255, 255, 0.06);
}

.nav .nav-github {
  margin-left: 5px;
  color: white;
  background: rgba(255, 255, 255, 0.08);
}

.hero {
  min-height: 100svh;
  padding-top: 150px;
  padding-bottom: 60px;
  display: grid;
  align-items: center;
  position: relative;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.04fr) minmax(420px, 0.96fr);
  align-items: center;
  gap: clamp(50px, 7vw, 100px);
}

.eyebrow {
  margin: 0 0 18px;
  color: var(--accent-2);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  text-wrap: pretty;
}

h1,
h2 {
  margin: 0;
  line-height: 0.98;
  letter-spacing: -0.055em;
}

h1 {
  max-width: 820px;
  font-size: clamp(3.6rem, 7vw, 7.4rem);
}

h2 {
  font-size: clamp(2.7rem, 5vw, 5rem);
}

h3 {
  margin: 0;
  line-height: 1.08;
  letter-spacing: -0.035em;
}

.hero-lead {
  max-width: 680px;
  margin: 30px 0 0;
  color: var(--muted);
  font-size: clamp(1rem, 1.5vw, 1.25rem);
}

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

.button {
  min-height: 52px;
  padding: 0 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 14px;
  font-weight: 750;
  text-decoration: none;
}

.button-primary {
  border-color: transparent;
  background: linear-gradient(135deg, var(--accent), #6545ed);
  box-shadow: 0 16px 36px rgba(124, 92, 255, 0.26);
}

.button-secondary {
  background: rgba(255, 255, 255, 0.04);
}

.hero-meta {
  margin-top: 34px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-meta span {
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #c8d0dc;
  background: rgba(255, 255, 255, 0.025);
  font-size: 0.72rem;
  font-weight: 700;
}

.hero-visual {
  position: relative;
  min-height: 500px;
  display: grid;
  place-items: center;
}

.browser-card {
  position: relative;
  z-index: 2;
  width: min(100%, 560px);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent 40%),
    rgba(14, 20, 31, 0.94);
  box-shadow: var(--shadow);
  transform: rotate(1.8deg);
}

.browser-bar {
  min-height: 52px;
  padding: 0 18px;
  display: flex;
  align-items: center;
  gap: 18px;
  border-bottom: 1px solid var(--line);
  color: #8590a2;
  font: 600 0.72rem/1 ui-monospace, SFMono-Regular, Menlo, monospace;
}

.browser-dots {
  display: flex;
  gap: 6px;
}

.browser-dots i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.22);
}

.browser-dots i:first-child { background: #ff6b65; }
.browser-dots i:nth-child(2) { background: #f4c34f; }
.browser-dots i:last-child { background: #54d578; }

.code-window {
  min-height: 290px;
  padding: 34px 26px;
  display: grid;
  align-content: center;
  gap: 12px;
  color: #dfe5ef;
  font: 600 clamp(0.75rem, 1.2vw, 0.9rem)/1.5 ui-monospace, SFMono-Regular, Menlo, monospace;
}

.code-window div {
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: 12px;
}

.code-dim { color: #586273; }
.code-purple { color: #bd9cff; }
.code-green { color: #6fe7c3; }
.code-blue { color: #69b7ff; }

.visual-metrics {
  padding: 18px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.025);
}

.visual-metrics div {
  padding: 10px 14px;
  border-right: 1px solid var(--line);
}

.visual-metrics div:last-child {
  border-right: 0;
}

.visual-metrics strong,
.visual-metrics span {
  display: block;
}

.visual-metrics strong {
  font-size: 1.4rem;
}

.visual-metrics span {
  color: var(--muted);
  font-size: 0.68rem;
}

.orbit {
  position: absolute;
  border: 1px solid rgba(124, 92, 255, 0.2);
  border-radius: 50%;
}

.orbit-a {
  width: 430px;
  height: 430px;
}

.orbit-b {
  width: 560px;
  height: 560px;
  border-color: rgba(48, 214, 199, 0.08);
}

.scroll-cue {
  position: absolute;
  bottom: 28px;
  left: 0;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  text-decoration: none;
}

.scroll-cue i {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  font-style: normal;
}

.proof-strip {
  padding: 36px 0 100px;
}

.proof-strip > div {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.018);
}

.proof-strip article {
  padding: 25px;
  border-right: 1px solid var(--line);
}

.proof-strip article:last-child {
  border-right: 0;
}

.proof-strip span {
  color: var(--accent);
  font: 800 0.68rem/1 ui-monospace, monospace;
}

.proof-strip strong {
  margin-top: 14px;
  display: block;
  font-size: 0.95rem;
}

.proof-strip p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.8rem;
}

.proof-strip code,
.component-card code {
  color: #bbaeff;
  font: 650 0.72rem/1.4 ui-monospace, SFMono-Regular, Menlo, monospace;
}

.component-section {
  padding: 110px 0 150px;
}

.section-heading {
  max-width: 800px;
  margin-bottom: 60px;
}

.section-heading > p:last-child {
  max-width: 650px;
  margin: 24px 0 0;
  color: var(--muted);
}

.component-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.component-card {
  min-height: 350px;
  padding: 26px;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: 22px;
  background:
    linear-gradient(150deg, rgba(255, 255, 255, 0.035), transparent 55%),
    var(--panel);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.12);
}

.component-card.featured {
  grid-column: span 2;
}

.card-index {
  width: 38px;
  height: 32px;
  margin-bottom: 46px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--muted);
  font: 700 0.68rem/1 ui-monospace, monospace;
}

.component-card h3 {
  font-size: 1.5rem;
}

.component-card > p,
.component-card > div > p {
  max-width: 520px;
  color: var(--muted);
}

.component-card > code {
  margin-top: auto;
  padding-top: 20px;
}

.mini-preview {
  margin-top: 34px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(124, 92, 255, 0.08);
}

.reveal-preview span {
  display: block;
  font-size: clamp(1.3rem, 2.5vw, 2.1rem);
  font-weight: 750;
  letter-spacing: -0.04em;
}

.dot-grid {
  margin-top: auto;
  padding-top: 26px;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
}

.dot-grid i {
  height: 34px;
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(124, 92, 255, 0.95), rgba(48, 214, 199, 0.35));
}

.mini-button {
  width: fit-content;
  margin-top: auto;
  padding: 12px 15px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  font-size: 0.82rem;
  font-weight: 750;
  text-decoration: none;
}

.mini-headline {
  margin-top: auto !important;
  color: white !important;
  font-size: 1.45rem;
  font-weight: 750;
  line-height: 1.08;
  letter-spacing: -0.035em;
}

.progress-demo {
  height: 4px;
  margin-top: auto;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.progress-demo span {
  width: 68%;
  height: 100%;
  display: block;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
}

.story-wrap {
  min-height: 1280px;
  background:
    radial-gradient(circle at 30% 30%, rgba(124, 92, 255, 0.13), transparent 25rem),
    #0b0f18;
}

.story-panel {
  min-height: 100svh;
  display: grid;
  align-items: center;
}

.story-grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: clamp(60px, 8vw, 120px);
  align-items: center;
}

.story-grid h2 {
  max-width: 520px;
}

.story-grid > div:first-child > p:not(.eyebrow) {
  max-width: 560px;
  margin-top: 26px;
  color: var(--muted);
}

.motion-state {
  width: fit-content;
  margin-top: 30px;
  padding: 10px 13px;
  border: 1px solid rgba(48, 214, 199, 0.22);
  border-radius: 12px;
  color: #a7e9df;
  background: rgba(48, 214, 199, 0.06);
  font-size: 0.76rem;
  font-weight: 650;
}

.story-stack {
  display: grid;
  gap: 14px;
}

.story-stack article {
  min-height: 150px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.03);
}

.story-stack span {
  color: var(--accent-2);
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.story-stack strong {
  max-width: 460px;
  font-size: clamp(1.25rem, 2vw, 1.8rem);
  letter-spacing: -0.035em;
}

.horizontal-section {
  min-height: 100svh;
  padding-top: 80px;
  background: #090d15;
}

.horizontal-heading {
  margin-bottom: 46px;
}

.horizontal-heading h2 {
  max-width: 760px;
}

.horizontal-heading > p:last-child {
  max-width: 650px;
  color: var(--muted);
}

.horizontal-track {
  gap: 18px;
  padding: 0 max(20px, calc((100vw - 1180px) / 2)) 80px;
}

.showcase-card {
  width: min(72vw, 760px);
  min-height: 430px;
  padding: 38px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  border: 1px solid var(--line);
  border-radius: 28px;
  background:
    radial-gradient(circle at 85% 10%, rgba(124, 92, 255, 0.2), transparent 15rem),
    var(--panel);
}

.showcase-card:nth-child(even) {
  background:
    radial-gradient(circle at 85% 10%, rgba(48, 214, 199, 0.12), transparent 15rem),
    var(--panel-2);
}

.showcase-card > span {
  margin-bottom: auto;
  color: var(--accent-2);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.showcase-card h3 {
  max-width: 560px;
  font-size: clamp(2rem, 4vw, 3.9rem);
}

.showcase-card p {
  max-width: 520px;
  margin: 20px 0 0;
  color: var(--muted);
}

.showcase-card a {
  width: fit-content;
  margin-top: 24px;
  font-weight: 800;
  text-decoration: none;
}

.final-section {
  padding: 150px 0 80px;
}

.final-card-large {
  min-height: 460px;
  padding: clamp(34px, 6vw, 72px);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 60px;
  align-items: end;
  border: 1px solid rgba(124, 92, 255, 0.24);
  border-radius: 30px;
  background:
    radial-gradient(circle at 90% 10%, rgba(124, 92, 255, 0.22), transparent 24rem),
    linear-gradient(145deg, rgba(255, 255, 255, 0.04), transparent),
    var(--panel);
  box-shadow: var(--shadow);
}

.final-card-large h2 {
  max-width: 820px;
}

.final-card-large > div:first-child > p:last-child {
  max-width: 680px;
  margin: 26px 0 0;
  color: var(--muted);
}

.final-actions {
  display: grid;
  justify-items: end;
  gap: 18px;
}

.text-link {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 700;
  text-decoration: none;
}

.site-footer {
  min-height: 120px;
  padding-bottom: 40px;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 30px;
  color: var(--muted);
  font-size: 0.76rem;
}

.site-footer a {
  color: #d9deea;
  text-decoration: none;
}

.demo-library-error::before {
  content: "Demo bundle failed to initialize.";
  position: fixed;
  inset: auto 16px 16px;
  z-index: 99999;
  padding: 12px 16px;
  border: 1px solid rgba(255, 96, 96, 0.4);
  border-radius: 12px;
  background: #2a1014;
  color: #ffd9dc;
  font: 700 0.8rem/1.3 system-ui, sans-serif;
}

@media (max-width: 980px) {
  .nav a:not(.nav-github) {
    display: none;
  }

  .hero {
    padding-top: 130px;
  }

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

  .hero-visual {
    min-height: 410px;
  }

  .proof-strip > div {
    grid-template-columns: repeat(2, 1fr);
  }

  .proof-strip article:nth-child(2) {
    border-right: 0;
  }

  .proof-strip article:nth-child(-n+2) {
    border-bottom: 1px solid var(--line);
  }

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

  .component-card.featured {
    grid-column: span 2;
  }

  .story-wrap {
    min-height: 1500px;
  }

  .final-card-large {
    grid-template-columns: 1fr;
  }

  .final-actions {
    justify-items: start;
  }
}

@media (max-width: 680px) {
  :root {
    --shell: min(100% - 28px, 1180px);
  }

  .site-header {
    inset: 10px 0 auto;
  }

  .brand small {
    display: none;
  }

  .hero {
    min-height: auto;
    padding-top: 130px;
    padding-bottom: 100px;
  }

  h1 {
    font-size: clamp(3rem, 14vw, 4.8rem);
  }

  h2 {
    font-size: clamp(2.5rem, 11vw, 4rem);
  }

  .hero-actions .button {
    width: 100%;
  }

  .hero-visual {
    min-height: 340px;
  }

  .browser-card {
    transform: none;
  }

  .code-window {
    min-height: 230px;
    padding: 24px 18px;
  }

  .orbit-a {
    width: 300px;
    height: 300px;
  }

  .orbit-b {
    width: 360px;
    height: 360px;
  }

  .scroll-cue {
    display: none;
  }

  .proof-strip > div,
  .component-grid {
    grid-template-columns: 1fr;
  }

  .proof-strip article,
  .proof-strip article:nth-child(2) {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .proof-strip article:last-child {
    border-bottom: 0;
  }

  .component-card.featured {
    grid-column: auto;
  }

  .component-card {
    min-height: 310px;
  }

  .story-wrap {
    min-height: 1650px;
  }

  .showcase-card {
    width: calc(100vw - 36px);
    min-height: 390px;
    padding: 28px;
  }

  .final-section {
    padding-top: 100px;
  }

  .final-card-large {
    padding: 30px 24px;
  }

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

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

  .browser-card {
    transform: none;
  }
}
