:root {
  --bg: #0b0f17;
  --bg-elevated: #101826;
  --card: #161f2e;
  --border: #233146;
  --text: #f1f5f9;
  --muted: #94a3b8;
  --accent: #3b82f6;
  --accent-hover: #2563eb;
  --success: #10b981;
  --danger: #f87171;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
  --radius: 16px;
  --header-h: 72px;
  --font: Inter, "Segoe UI", system-ui, -apple-system, sans-serif;
  --focus: 0 0 0 3px rgba(59, 130, 246, 0.45);
}

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

html {
  scroll-behavior: smooth;
}

html,
body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.6;
}

body.nav-open,
body.modal-open {
  overflow: hidden;
}

img {
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
}

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

.container {
  width: min(1120px, calc(100% - 40px));
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -40px;
  z-index: 1000;
  background: var(--accent);
  color: #fff;
  padding: 8px 12px;
  border-radius: 8px;
}

.skip-link:focus {
  top: 12px;
}

.visually-hidden,
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(11, 15, 23, 0.86);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(16px);
}

.site-header.is-scrolled {
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.25);
}

.nav {
  width: min(1120px, calc(100% - 40px));
  margin-inline: auto;
  min-height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
}

.brand-logo {
  height: 36px;
  width: auto;
  display: block;
}

.brand-wordmark {
  font-weight: 700;
  letter-spacing: -0.03em;
}

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

.nav-links {
  display: flex;
  gap: 22px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  text-decoration: none;
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 500;
}

.nav-links a:hover,
.footer-links a:hover,
.link-button:hover {
  color: var(--text);
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--card);
  padding: 10px;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
}

.nav-toggle-bar {
  display: block;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 11px 18px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-primary:hover {
  background: var(--accent-hover);
}

.btn-ghost {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
}

.btn-ghost:hover {
  border-color: var(--accent);
}

.btn-lg {
  padding: 14px 24px;
}

.btn:focus-visible,
.nav-links a:focus-visible,
.footer-links a:focus-visible,
.link-button:focus-visible,
.nav-toggle:focus-visible,
.modal-close:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: none;
  box-shadow: var(--focus);
}

.hero {
  padding: 72px 0 40px;
  background:
    radial-gradient(circle at 80% 0%, rgba(59, 130, 246, 0.16), transparent 36%),
    linear-gradient(180deg, #0b0f17 0%, #0e1522 100%);
}

.hero-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: 48px;
  align-items: center;
}

.badge,
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 16px;
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--accent);
  background: rgba(59, 130, 246, 0.08);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin: 0 0 16px;
}

h1 {
  font-size: clamp(2.2rem, 4vw, 3.6rem);
  font-weight: 700;
}

h2 {
  font-size: clamp(1.7rem, 3vw, 2.4rem);
}

h3 {
  font-size: 1.15rem;
}

.lede,
.lede-block,
.prose p,
.modal-intro {
  color: var(--muted);
  font-size: 1.05rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 28px 0 18px;
}

.hero-note {
  color: var(--muted);
  font-size: 0.92rem;
}

.browser-frame {
  margin: 0;
  border: 1px solid var(--border);
  border-radius: 18px;
  overflow: hidden;
  background: var(--card);
  box-shadow: var(--shadow);
}

.browser-chrome {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  background: #121a27;
}

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

.browser-dots i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #334155;
}

.browser-url {
  flex: 1;
  color: var(--muted);
  font-size: 0.78rem;
}

.browser-viz-label {
  font-size: 0.72rem;
  color: var(--accent);
  font-weight: 600;
}

.dash {
  padding: 18px;
}

.dash-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 16px;
}

.dash-kicker,
.dash-caption,
.shot-label,
.optional {
  color: var(--muted);
  font-size: 0.78rem;
}

.dash-title {
  font-size: 1.2rem;
  margin: 0;
}

.pill {
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 0.75rem;
  color: var(--success);
  white-space: nowrap;
}

.dash-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.metric-card,
.factor-card,
.feature-card,
.proof-card,
.ops-card,
.signal-node,
.arch-node {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.metric-card {
  padding: 12px;
}

.metric-card span,
.metric-card small {
  display: block;
  color: var(--muted);
  font-size: 0.75rem;
}

.metric-card strong {
  display: block;
  margin: 6px 0 4px;
  font-size: 1.05rem;
}

.dash-body {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 12px;
}

.dash-table,
.dash-side {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(11, 15, 23, 0.45);
}

.dash-row {
  display: grid;
  grid-template-columns: 1.1fr 0.8fr 0.7fr 0.9fr;
  gap: 8px;
  padding: 10px 12px;
  font-size: 0.8rem;
  border-bottom: 1px solid var(--border);
}

.dash-row:last-child {
  border-bottom: 0;
}

.dash-row-head {
  color: var(--muted);
  font-weight: 600;
}

.mono {
  font-variant-numeric: tabular-nums;
}

.tag {
  display: inline-flex;
  width: fit-content;
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 0.72rem;
  font-weight: 600;
}

.tag-high {
  color: #fecaca;
  background: rgba(248, 113, 113, 0.12);
}

.tag-medium {
  color: #fde68a;
  background: rgba(245, 158, 11, 0.12);
}

.tag-low {
  color: #6ee7b7;
  background: rgba(16, 185, 129, 0.12);
}

.dash-side {
  padding: 14px;
}

.dash-side h3 {
  font-size: 0.95rem;
  margin-bottom: 8px;
}

.dash-side ul {
  margin: 0 0 12px;
  padding-left: 18px;
  color: var(--muted);
  font-size: 0.85rem;
}

.section {
  padding: 88px 0;
}

.section-alt {
  background: var(--bg-elevated);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.prose {
  max-width: 720px;
}

.signal-path {
  list-style: none;
  margin: 40px 0 0;
  padding: 0;
  display: grid;
  gap: 12px;
}

.signal-node {
  padding: 24px;
}

.signal-node.is-accent {
  border-color: rgba(59, 130, 246, 0.45);
  box-shadow: 0 0 0 1px rgba(59, 130, 246, 0.18);
}

.signal-index,
.factor-code,
.feature-index,
.arch-label {
  display: inline-block;
  margin-bottom: 10px;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.signal-arrow {
  display: flex;
  justify-content: center;
  color: var(--muted);
  font-size: 1.2rem;
}

.arch {
  margin-top: 36px;
  display: grid;
  gap: 12px;
}

.arch-node {
  padding: 24px;
}

.arch-core {
  background: linear-gradient(180deg, rgba(59, 130, 246, 0.12), var(--card));
}

.arch-flow {
  text-align: center;
  color: var(--muted);
}

.arch-outcomes {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
}

.arch-outcomes li {
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 0.85rem;
}

.footnote-block {
  margin-top: 28px;
  color: var(--muted);
  max-width: 760px;
}

.factor-grid,
.proof-grid,
.ops-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 32px;
}

.factor-card,
.proof-card,
.ops-card {
  padding: 24px;
}

.engine-panel {
  margin-top: 28px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #121a27;
}

.engine-scale-head {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  margin-bottom: 12px;
}

.engine-bar {
  height: 8px;
  border-radius: 999px;
  background: #1e293b;
  overflow: hidden;
}

.engine-bar span {
  display: block;
  width: 72%;
  height: 100%;
  background: linear-gradient(90deg, var(--success), var(--accent), #f59e0b);
}

.engine-tiers {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.8rem;
}

.engine-emphasis {
  color: var(--text);
  font-weight: 600;
}

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

.feature-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 18px;
  padding: 24px;
}

.control-callout {
  margin: 32px 0 0;
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: linear-gradient(90deg, rgba(59, 130, 246, 0.12), rgba(16, 185, 129, 0.08));
}

.control-callout p {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: -0.03em;
}

.shot {
  min-height: 180px;
  margin-bottom: 16px;
  border: 1px dashed #31425a;
  border-radius: 12px;
  background:
    linear-gradient(180deg, rgba(59, 130, 246, 0.08), rgba(11, 15, 23, 0.4)),
    var(--bg);
  padding: 16px;
}

.shot-ui {
  display: grid;
  gap: 8px;
}

.shot-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
}

.shot-line,
.shot-map {
  display: block;
  height: 8px;
  border-radius: 999px;
  background: #233146;
}

.shot-line.short {
  width: 46%;
}

.shot-grid,
.shot-bars {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-top: 12px;
}

.shot-grid i,
.shot-bars i {
  display: block;
  height: 42px;
  border-radius: 8px;
  background: rgba(35, 49, 70, 0.9);
}

.shot-bars i:nth-child(1) { height: 28px; }
.shot-bars i:nth-child(2) { height: 48px; }
.shot-bars i:nth-child(3) { height: 36px; }
.shot-bars i:nth-child(4) { height: 22px; }

.shot-map {
  height: 70px;
  margin-top: 12px;
  border-radius: 10px;
}

.ops-card ul {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
}

.ops-card p {
  color: var(--muted);
}

.final-cta {
  padding: 40px 0 88px;
}

.final-cta-panel {
  padding: 48px;
  border: 1px solid var(--border);
  border-radius: 24px;
  background:
    radial-gradient(circle at 10% 20%, rgba(59, 130, 246, 0.16), transparent 40%),
    var(--card);
  box-shadow: var(--shadow);
}

.site-footer {
  border-top: 1px solid var(--border);
  padding: 36px 0 28px;
}

.footer-grid {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}

.footer-brand {
  margin: 0 0 8px;
  font-weight: 700;
  font-size: 1.15rem;
}

.footer-tagline,
.copyright {
  color: var(--muted);
  margin: 0;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 16px 22px;
  margin: 0;
  padding: 0;
}

.footer-links a,
.link-button {
  color: var(--muted);
  text-decoration: none;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: none;
}

.modal.is-open {
  display: block;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 6, 12, 0.72);
}

.modal-dialog {
  position: relative;
  z-index: 1;
  width: min(640px, calc(100% - 24px));
  max-height: calc(100vh - 40px);
  overflow: auto;
  margin: 20px auto;
  padding: 28px 28px 24px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: #121a27;
  box-shadow: var(--shadow);
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 40px;
  height: 40px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--card);
  color: var(--text);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
}

.modal-progress {
  height: 4px;
  margin: 8px 40px 16px 0;
  border-radius: 999px;
  background: #1e293b;
}

.modal-progress-bar {
  width: 25%;
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
  transition: width 0.25s ease;
}

.step-dots {
  display: flex;
  gap: 12px;
  list-style: none;
  margin: 0 0 20px;
  padding: 0;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 600;
}

.step-dots li.is-active,
.step-dots li.is-complete {
  color: var(--text);
}

.demo-step[hidden] {
  display: none;
}

.field {
  margin-bottom: 16px;
}

.field label,
.field legend {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #0b0f17;
  color: var(--text);
  padding: 11px 12px;
}

.choice {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 400;
  margin-bottom: 8px;
}

.choice input {
  width: auto;
}

.field-error {
  color: var(--danger);
  font-size: 0.85rem;
  margin: 6px 0 0;
}

.field.has-error input,
.field.has-error select,
.field.has-error textarea {
  border-color: var(--danger);
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 8px;
}

.conversation-block p {
  color: var(--muted);
}

.video-placeholder {
  display: grid;
  place-items: center;
  text-align: center;
  min-height: 240px;
  margin: 8px 0 20px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background:
    radial-gradient(circle at 50% 40%, rgba(59, 130, 246, 0.16), transparent 42%),
    #0b0f17;
}

.play-mark {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: rgba(59, 130, 246, 0.18);
  position: relative;
  margin-bottom: 8px;
}

.play-mark::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 54%;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 10px 0 10px 16px;
  border-color: transparent transparent transparent #fff;
  transform: translate(-50%, -50%);
}

.video-kicker,
.video-meta {
  color: var(--muted);
  margin: 4px 0;
}

.video-title {
  margin: 0;
  font-weight: 700;
}

.calendar-placeholder {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px;
  background: #0b0f17;
}

.cal-head {
  display: flex;
  justify-content: space-between;
  margin-bottom: 12px;
  color: var(--muted);
}

.cal-week,
.cal-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
}

.cal-week {
  color: var(--muted);
  font-size: 0.75rem;
  margin-bottom: 8px;
}

.cal-grid span {
  display: grid;
  place-items: center;
  min-height: 36px;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--muted);
}

.cal-grid span.muted {
  opacity: 0.4;
}

.cal-note {
  color: var(--muted);
  font-size: 0.88rem;
  margin: 14px 0 0;
}

@media (max-width: 980px) {
  .hero-layout,
  .dash-body,
  .engine-panel,
  .factor-grid,
  .proof-grid,
  .ops-grid {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 800px) {
  .nav-toggle {
    display: flex;
  }

  .nav-panel {
    position: fixed;
    inset: var(--header-h) 0 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 20px;
    padding: 24px;
    background: #0b0f17;
    border-top: 1px solid var(--border);
  }

  .nav-panel.is-open {
    display: flex;
  }

  .nav-links {
    flex-direction: column;
  }

  .hero,
  .section,
  .final-cta {
    padding-top: 56px;
    padding-bottom: 56px;
  }

  .final-cta-panel,
  .modal-dialog {
    padding: 22px;
  }

  .footer-grid {
    flex-direction: column;
  }

  .dash-row {
    grid-template-columns: 1fr 1fr;
  }
}

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

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
