:root {
  --bg: #f7f4ef;
  --ink: #111318;
  --muted: #626774;
  --line: rgba(17, 19, 24, 0.14);
  --panel: rgba(255, 255, 255, 0.72);
  --panel-solid: #ffffff;
  --accent: #2558d8;
  --accent-2: #0f8b7a;
  --accent-3: #c24f5a;
  --max: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
  letter-spacing: 0;
  overflow-x: hidden;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -3;
  background:
    linear-gradient(120deg, rgba(255,255,255,0.92), rgba(255,255,255,0.38)),
    repeating-linear-gradient(90deg, rgba(17,19,24,0.045) 0 1px, transparent 1px 96px),
    repeating-linear-gradient(0deg, rgba(17,19,24,0.04) 0 1px, transparent 1px 96px);
}
a { color: inherit; text-decoration: none; }
button { font: inherit; }

.static-fallback {
  width: min(var(--max), calc(100vw - 48px));
  min-height: 100vh;
  margin: 0 auto;
  padding: 120px 0 72px;
  display: grid;
  align-content: center;
  gap: 20px;
}
.static-fallback h1 {
  max-width: 820px;
  margin: 0;
  font-size: clamp(42px, 8vw, 96px);
  line-height: 0.92;
}
.static-fallback p {
  max-width: 680px;
  margin: 0;
  color: var(--muted);
  font-size: 20px;
}
.static-fallback a {
  display: inline-flex;
  width: max-content;
  min-height: 52px;
  align-items: center;
  border-radius: 999px;
  padding: 0 18px;
  color: #fff;
  background: var(--ink);
  font-weight: 900;
}

.world {
  position: absolute;
  inset: -9% -8%;
  z-index: 0;
  pointer-events: none;
  opacity: 0.58;
  mask-image: radial-gradient(circle at 56% 42%, #000 0 54%, transparent 76%);
}
.world canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 40;
  border-bottom: 1px solid var(--line);
  background: rgba(247, 244, 239, 0.78);
  backdrop-filter: blur(18px) saturate(150%);
}
.nav-inner {
  width: min(var(--max), calc(100vw - 48px));
  min-height: 68px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font-weight: 900;
}
.mark {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: inline-grid;
  place-items: center;
  color: white;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 12px 28px rgba(17, 19, 24, 0.18);
  font-size: 14px;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 18px;
  color: var(--muted);
  font-size: 14px;
}
.nav-links a:hover { color: var(--ink); }
.nav-pill {
  color: white;
  background: var(--ink);
  border-radius: 999px;
  padding: 10px 15px;
  font-weight: 800;
}
.progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  background: rgba(17, 19, 24, 0.08);
}
.progress span {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--accent), var(--accent-2), var(--accent-3));
}

.section {
  position: relative;
  width: min(var(--max), calc(100vw - 48px));
  margin: 0 auto;
}
.hero {
  min-height: 100vh;
  display: grid;
  align-items: center;
  padding: 118px 0 72px;
}
.hero-grid {
  display: grid;
  grid-template-columns: minmax(300px, 0.9fr) minmax(360px, 1.1fr);
  align-items: center;
  gap: 44px;
}
.hero-copy { min-width: 0; }
.hero-visual {
  min-height: 620px;
  position: relative;
  display: grid;
  align-items: center;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 12px;
  border: 1px solid color-mix(in srgb, var(--accent) 42%, transparent);
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 12%, white);
  color: var(--accent);
  font-size: 13px;
  font-weight: 900;
}
h1 {
  margin: 20px 0 18px;
  max-width: 10ch;
  font-size: 76px;
  line-height: 0.95;
  letter-spacing: 0;
}
.lede {
  margin: 0;
  max-width: 620px;
  color: var(--muted);
  font-size: 20px;
}
.download-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(150px, 1fr));
  gap: 10px;
  margin-top: 30px;
  max-width: 690px;
}
.download-card {
  min-height: 76px;
  padding: 14px 15px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--panel-solid);
  box-shadow: 0 20px 54px rgba(17, 19, 24, 0.11);
  font-weight: 900;
  transform: translateZ(0);
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}
.download-card:hover {
  transform: translateY(-4px);
  border-color: rgba(17,19,24,0.28);
  box-shadow: 0 26px 66px rgba(17, 19, 24, 0.16);
}
.download-card.primary {
  color: white;
  border-color: transparent;
  background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 68%, var(--accent-2)));
}
.download-card small {
  color: currentColor;
  opacity: 0.72;
  font-size: 12px;
  font-weight: 800;
}
.secondary-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}
.button {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 15px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.74);
  font-weight: 900;
}

.product-stage {
  min-height: 560px;
  position: relative;
  z-index: 1;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.64);
  box-shadow: 0 34px 92px rgba(17, 19, 24, 0.16);
  overflow: hidden;
  backdrop-filter: blur(14px);
}
.stage-top {
  min-height: 48px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 0 16px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}
.stage-body {
  min-height: 512px;
  display: grid;
  grid-template-columns: 190px 1fr;
}
.stage-rail {
  padding: 16px;
  border-right: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.5);
}
.rail-item {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 8px;
  color: var(--muted);
  font-size: 13px;
}
.rail-item.active {
  color: var(--ink);
  background: white;
  font-weight: 900;
}
.mock-surface {
  padding: 20px;
  position: relative;
  overflow: hidden;
}
.surface-title {
  margin: 0 0 14px;
  font-size: 15px;
  color: var(--muted);
  font-weight: 900;
  text-transform: uppercase;
}
.surface-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.surface-tile {
  position: relative;
  overflow: hidden;
  min-height: 88px;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 78%, white), color-mix(in srgb, var(--accent-2) 55%, white));
  transition: transform 220ms ease, border-color 220ms ease, box-shadow 220ms ease;
}
.surface-tile span {
  position: absolute;
  left: 10px;
  bottom: 9px;
  max-width: calc(100% - 20px);
  color: rgba(255,255,255,0.86);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.surface-tile.active {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--accent) 66%, white);
  box-shadow: 0 18px 36px rgba(17, 19, 24, 0.18);
}
.surface-note {
  margin-top: 16px;
  border-left: 4px solid var(--accent);
  padding: 10px 0 10px 14px;
  color: var(--muted);
}

.story {
  padding: 92px 0;
}
.story-head {
  max-width: 720px;
  margin-bottom: 26px;
}
.story-head h2,
.download-section h2,
.setup-section h2 {
  margin: 0 0 12px;
  font-size: 44px;
  line-height: 1.04;
  letter-spacing: 0;
}
.story-head p,
.download-section p,
.setup-section p {
  margin: 0;
  color: var(--muted);
  font-size: 18px;
}
.chapters {
  display: grid;
  gap: 22px;
}
.story-flow {
  display: grid;
  grid-template-columns: minmax(420px, 0.95fr) minmax(330px, 0.75fr);
  gap: 44px;
  align-items: start;
}
.story-demo {
  position: sticky;
  top: 98px;
  min-height: calc(100vh - 126px);
  display: grid;
  align-content: center;
}
.demo-shell {
  min-height: 560px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 30px 88px rgba(17, 19, 24, 0.15);
  backdrop-filter: blur(18px);
}
.demo-toolbar,
.demo-footer {
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 0 16px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}
.demo-toolbar strong {
  color: var(--ink);
}
.demo-screen {
  flex: 1;
  display: grid;
  grid-template-rows: 1fr auto;
  gap: 18px;
  padding: 22px;
  background:
    linear-gradient(135deg, rgba(255,255,255,0.88), rgba(255,255,255,0.5)),
    repeating-linear-gradient(90deg, rgba(17,19,24,0.04) 0 1px, transparent 1px 54px),
    repeating-linear-gradient(0deg, rgba(17,19,24,0.035) 0 1px, transparent 1px 54px);
}
.demo-visual {
  min-height: 290px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(180px, 0.72fr);
  gap: 14px;
  align-items: stretch;
}
.demo-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.demo-cell {
  min-height: 76px;
  display: flex;
  align-items: flex-end;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: color-mix(in srgb, var(--accent) 10%, white);
  color: color-mix(in srgb, var(--ink) 74%, var(--accent));
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  transform: translateY(10px);
  opacity: 0.64;
  animation: demo-cell-in 420ms ease forwards;
  animation-delay: var(--delay);
}
.demo-cell.active {
  opacity: 1;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 18px 38px rgba(17, 19, 24, 0.18);
  transform: translateY(0);
}
.demo-result {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 16px;
  background: rgba(255,255,255,0.88);
}
.demo-result > span {
  color: var(--accent);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}
.demo-result strong {
  font-size: 28px;
  line-height: 1;
}
.demo-lines {
  display: grid;
  gap: 8px;
}
.demo-lines span {
  width: var(--w);
  height: 8px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 22%, white);
}
.demo-copy {
  border-left: 4px solid var(--accent);
  padding-left: 16px;
}
.demo-copy span {
  color: var(--accent);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}
.demo-copy h3 {
  margin: 6px 0 6px;
  font-size: 28px;
  line-height: 1.05;
}
.demo-copy p {
  margin: 0;
  color: var(--muted);
}
.demo-footer {
  border-top: 1px solid var(--line);
  border-bottom: 0;
}
.demo-meter {
  flex: 1;
  height: 8px;
  border-radius: 999px;
  background: rgba(17, 19, 24, 0.08);
  overflow: hidden;
}
.demo-meter span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--accent-2), var(--accent-3));
  transition: width 300ms ease;
}
.demo-dots {
  display: flex;
  gap: 7px;
}
.demo-dots span {
  width: 22px;
  height: 8px;
  border-radius: 999px;
  background: rgba(17, 19, 24, 0.14);
  transition: width 200ms ease, background 200ms ease;
}
.demo-dots span.active {
  width: 34px;
  background: var(--accent);
}
.chapter {
  min-height: 72vh;
  display: grid;
  align-items: center;
}
.chapter:nth-child(odd) .chapter-card { margin-left: auto; }
.chapter-card {
  width: min(520px, 100%);
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  padding: 28px;
  box-shadow: 0 24px 70px rgba(17, 19, 24, 0.13);
  backdrop-filter: blur(18px);
  opacity: 0.62;
  transition: transform 260ms ease, opacity 260ms ease, border-color 260ms ease, background 260ms ease;
}
.chapter-card.active {
  opacity: 1;
  transform: translateY(-4px);
  border-color: color-mix(in srgb, var(--accent) 44%, var(--line));
  background: rgba(255, 255, 255, 0.9);
}
.chapter-index {
  color: var(--accent);
  font-weight: 900;
  font-size: 13px;
}
.chapter-card h3 {
  margin: 10px 0 8px;
  font-size: 30px;
  line-height: 1.08;
}
.chapter-card p {
  margin: 0;
  color: var(--muted);
  font-size: 17px;
}

.download-section,
.setup-section {
  padding: 90px 0;
}
.panel-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 28px;
}
.info-panel {
  min-height: 180px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 22px;
  background: rgba(255, 255, 255, 0.74);
  box-shadow: 0 18px 46px rgba(17, 19, 24, 0.1);
}
.info-panel h3 {
  margin: 0 0 8px;
  font-size: 19px;
}
.info-panel p {
  margin: 0;
  color: var(--muted);
}
.setup-steps {
  counter-reset: step;
  display: grid;
  gap: 10px;
  margin-top: 28px;
}
.setup-step {
  counter-increment: step;
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 14px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.78);
}
.setup-step::before {
  content: counter(step);
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: white;
  background: var(--ink);
  font-weight: 900;
}
.setup-step strong { display: block; }
.setup-step span { color: var(--muted); }

.footer {
  width: min(var(--max), calc(100vw - 48px));
  margin: 0 auto;
  padding: 54px 0;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
  border-top: 1px solid var(--line);
}

@keyframes demo-cell-in {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 940px) {
  .hero-grid,
  .stage-body,
  .story-flow,
  .panel-grid {
    grid-template-columns: 1fr;
  }
  h1 { font-size: 56px; }
  .hero-visual { min-height: 540px; }
  .product-stage { min-height: auto; }
  .stage-rail { display: none; }
  .stage-body { min-height: 420px; }
  .download-grid { grid-template-columns: 1fr; }
  .story-demo {
    top: 82px;
    z-index: 8;
    min-height: auto;
  }
  .demo-shell { min-height: auto; }
}

@media (max-width: 620px) {
  .world {
    inset: -4% -18%;
    opacity: 0.22;
  }
  .nav-inner,
  .section,
  .footer {
    width: auto;
    max-width: none;
    margin-left: 18px;
    margin-right: 18px;
  }
  .hero-grid,
  .hero-copy,
  .lede,
  .download-grid,
  .secondary-actions {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }
  .nav-links a:not(.nav-pill) { display: none; }
  .nav-pill { display: none; }
  .hero { padding-top: 98px; }
  .hero-visual { min-height: 430px; }
  h1 { font-size: 42px; }
  .lede {
    max-width: 36ch;
    font-size: 17px;
  }
  .product-stage { border-radius: 10px; }
  .stage-top { align-items: flex-start; flex-direction: column; padding: 12px; }
  .mock-surface { padding: 14px; }
  .surface-grid { grid-template-columns: repeat(2, 1fr); }
  .surface-tile { min-height: 74px; }
  .story-flow { gap: 24px; }
  .story-demo { top: 69px; }
  .demo-shell { min-height: auto; border-radius: 10px; box-shadow: 0 16px 44px rgba(17, 19, 24, 0.12); }
  .demo-toolbar { min-height: 40px; padding: 0 12px; }
  .demo-screen { display: block; padding: 14px 16px; }
  .demo-visual { display: none; }
  .demo-cell { min-height: 58px; }
  .demo-result strong { font-size: 22px; }
  .demo-copy {
    border-left-width: 3px;
    padding-left: 12px;
  }
  .demo-copy h3 { font-size: 23px; }
  .demo-copy p { display: none; }
  .demo-footer { min-height: 28px; padding: 0 12px; }
  .demo-dots { display: none; }
  .story-head h2,
  .download-section h2,
  .setup-section h2 { font-size: 34px; }
  .chapter { min-height: auto; }
  .chapter-card { padding: 22px; }
}
