:root {
  color-scheme: dark;
  --font-family-primary: Inter, "Inter Variable", "Helvetica Neue", ui-sans-serif, system-ui, sans-serif;
  --font-size-base: 16px;
  --font-size-xs: 12px;
  --font-size-sm: 15px;
  --font-size-md: 18px;
  --font-size-lg: 22px;
  --font-size-xl: 42px;
  --font-size-2xl: 72px;
  --font-weight-base: 400;
  --font-weight-strong: 600;
  --font-weight-heavy: 800;
  --line-height-base: 1.6;
  --content-width: 1280px;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 16px;
  --space-4: 24px;
  --space-5: 32px;
  --space-6: 48px;
  --space-7: 72px;
  --radius-pill: 999px;
  --radius-lg: 8px;
  --radius-xl: 24px;
  --color-bg: #040404;
  --color-bg-soft: #08090b;
  --color-surface: #101114;
  --color-surface-strong: #15171b;
  --color-surface-soft: rgba(255, 255, 255, 0.03);
  --color-border: rgba(255, 255, 255, 0.08);
  --color-border-strong: rgba(255, 255, 255, 0.16);
  --color-text-primary: #f5f7fa;
  --color-text-secondary: #b7bcc4;
  --color-text-muted: #8a9098;
  --color-text-inverse: #080909;
  --color-accent: #f5f5f2;
  --shadow-shell: 0 38px 96px rgba(0, 0, 0, 0.45);
  --shadow-card: 0 24px 50px rgba(0, 0, 0, 0.32);
  --focus-ring: 0 0 0 3px rgba(255, 255, 255, 0.2);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  margin: 0;
  min-height: 100%;
  overflow-x: hidden;
  background:
    radial-gradient(circle at top center, rgba(255, 255, 255, 0.06), transparent 28%),
    radial-gradient(circle at 85% 10%, rgba(255, 255, 255, 0.04), transparent 18%),
    linear-gradient(180deg, #050505 0%, #030303 100%);
  color: var(--color-text-primary);
  font-family: var(--font-family-primary);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-base);
  line-height: var(--line-height-base);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent 18%),
    linear-gradient(90deg, rgba(255, 255, 255, 0.018) 1px, transparent 1px),
    linear-gradient(rgba(255, 255, 255, 0.018) 1px, transparent 1px);
  background-size: auto, 56px 56px, 56px 56px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.42), transparent 88%);
}

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

a {
  color: inherit;
}

.site-shell {
  width: min(calc(100% - 32px), var(--content-width));
  margin: 0 auto;
  padding: 24px 0 42px;
}

.site-header,
.section-block,
.hero-section {
  border: 1px solid var(--color-border);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent 24%),
    linear-gradient(180deg, rgba(18, 20, 24, 0.98), rgba(7, 8, 10, 0.98));
  box-shadow: var(--shadow-shell);
}

.site-header,
.hero-section,
.section-block {
  border-radius: var(--radius-xl);
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding: 16px 22px;
}

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

.brand-lockup img {
  width: 42px;
  height: 42px;
  border-radius: 10px;
}

.brand-lockup span {
  font-size: 20px;
  font-weight: var(--font-weight-heavy);
  letter-spacing: -0.05em;
}

.site-nav,
.header-actions,
.hero-actions,
.hero-points,
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.site-nav a,
.header-link,
.header-button,
.button-primary,
.button-secondary,
.docs-card {
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    background-color 180ms ease,
    color 180ms ease,
    box-shadow 180ms ease;
}

.site-nav a,
.header-link {
  color: var(--color-text-secondary);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-strong);
  text-decoration: none;
}

.site-nav a {
  position: relative;
  padding: 10px 2px;
}

.site-nav a::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 2px;
  background: rgba(255, 255, 255, 0.9);
  transform: scaleX(0);
  transform-origin: center;
}

.site-nav a.is-active,
.site-nav a:hover {
  color: var(--color-text-primary);
}

.site-nav a.is-active::after,
.site-nav a:hover::after {
  transform: scaleX(1);
}

.header-actions {
  align-items: center;
}

.header-link {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
}

.header-button,
.button-primary,
.button-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 20px;
  border-radius: 12px;
  border: 1px solid transparent;
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-strong);
  text-decoration: none;
}

.header-button,
.button-primary {
  background: var(--color-accent);
  color: var(--color-text-inverse);
}

.button-secondary {
  border-color: var(--color-border-strong);
  background: rgba(255, 255, 255, 0.02);
  color: var(--color-text-primary);
}

.hero-section {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 0.86fr) minmax(520px, 1.14fr);
  gap: 28px;
  margin-top: 18px;
  padding: 34px;
  overflow: hidden;
}

.hero-section::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 22% 18%, rgba(255, 255, 255, 0.06), transparent 18%),
    radial-gradient(circle at 80% 48%, rgba(255, 255, 255, 0.045), transparent 24%),
    linear-gradient(120deg, transparent 0%, rgba(255, 255, 255, 0.02) 100%);
  pointer-events: none;
}

.hero-copy,
.hero-visual,
.hero-stats {
  position: relative;
  z-index: 1;
}

.hero-copy {
  max-width: 620px;
  padding-top: 10px;
}

.eyebrow,
.section-label,
.card-index {
  display: inline-flex;
  align-items: center;
  min-height: auto;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--color-text-secondary);
  font-size: 11px;
  font-weight: var(--font-weight-strong);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

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

h1 {
  margin-top: 20px;
  max-width: 12.5ch;
  font-size: 72px;
  font-weight: var(--font-weight-heavy);
  line-height: 0.92;
  text-transform: uppercase;
}

h1 span {
  display: block;
}

.hero-emphasis {
  color: rgba(255, 255, 255, 0.42);
}

h2 {
  margin-top: 18px;
  font-size: 52px;
  line-height: 1;
}

h3 {
  margin-top: 18px;
  font-size: 28px;
  line-height: 1.06;
}

p,
li,
span {
  color: var(--color-text-secondary);
}

p,
li {
  margin: 0;
  font-size: var(--font-size-sm);
}

.hero-lede,
.section-heading p,
.system-copy p,
.system-card p {
  margin-top: 18px;
  max-width: 640px;
  font-size: var(--font-size-md);
  line-height: 1.65;
}

.hero-actions {
  margin-top: 30px;
}

.button-primary:hover,
.header-button:hover,
.button-secondary:hover,
.docs-card:hover {
  transform: translateY(-2px);
}

.hero-points {
  margin-top: 18px;
  gap: 10px 18px;
}

.hero-points span {
  position: relative;
  padding-left: 0;
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-strong);
}

.hero-points span + span::before {
  content: "/";
  margin-right: 18px;
  color: rgba(255, 255, 255, 0.28);
}

.hero-visual {
  position: relative;
  min-height: 548px;
  overflow: visible;
}

.mockup-stage {
  position: absolute;
  inset: 14px 0 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(10px, 1.4vw, 18px);
}

.hero-device {
  position: relative;
  display: flex;
  justify-content: center;
  flex: 0 1 29%;
  margin: 0;
  min-width: 0;
}

.hero-device-scan {
  transform: translateX(28px) translateY(24px) rotate(-5deg) scale(0.88);
  z-index: 2;
}

.hero-device-scores {
  flex-basis: 36%;
  transform: translateY(-14px) scale(1.14);
  z-index: 3;
}

.hero-device-protocol {
  transform: translateX(-26px) translateY(24px) rotate(5deg) scale(0.88);
  z-index: 1;
}

.device-shell {
  overflow: hidden;
  border-radius: 34px;
  border: 0;
  background: transparent;
  box-shadow: 0 30px 64px rgba(0, 0, 0, 0.46);
  padding: 0;
}

.device-shell img {
  width: auto;
  max-height: 448px;
  border-radius: 34px;
  aspect-ratio: auto;
  object-fit: contain;
  object-position: center top;
  background: transparent;
}

.hero-stats {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.stat-card,
.feature-card,
.system-card,
.docs-card {
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent 28%),
    var(--color-surface-soft);
  box-shadow: var(--shadow-card);
}

.stat-card {
  padding: 18px 18px;
}

.stat-card strong {
  display: block;
  color: var(--color-text-primary);
  font-size: 30px;
  font-weight: var(--font-weight-heavy);
  line-height: 0.95;
}

.stat-card span {
  display: block;
  margin-top: 8px;
  font-size: var(--font-size-xs);
}

.section-block {
  margin-top: 20px;
  padding: 30px;
}

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

.section-heading-centered {
  margin: 0 auto;
  text-align: center;
}

.feature-grid,
.docs-grid,
.system-grid {
  display: grid;
  gap: 18px;
}

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

.feature-card,
.system-card,
.docs-card {
  padding: 22px;
}

.feature-card p,
.docs-card span {
  margin-top: 14px;
}

.system-section {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  gap: 22px;
  align-items: start;
}

.step-list,
.feature-list {
  margin: 24px 0 0;
  padding-left: 20px;
}

.step-list li + li,
.feature-list li + li {
  margin-top: 12px;
}

.step-list strong,
.feature-list li {
  color: var(--color-text-primary);
}

.step-list span {
  display: block;
  margin-top: 6px;
}

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

.system-card-highlight {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), transparent 28%),
    rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.12);
}

.docs-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 28px;
}

.docs-card {
  display: block;
  min-height: 180px;
  text-decoration: none;
}

.docs-card strong {
  display: block;
  margin-top: 18px;
  color: var(--color-text-primary);
  font-size: var(--font-size-lg);
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  margin-top: 20px;
  padding: 10px 8px 0;
}

.footer-copy {
  display: grid;
  gap: 4px;
}

.footer-copy strong {
  color: var(--color-text-primary);
}

.footer-copy span,
.footer-links a {
  color: var(--color-text-muted);
  font-size: var(--font-size-xs);
  text-decoration: none;
}

a:focus-visible,
button:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

@media (max-width: 1180px) {
  .site-header {
    flex-wrap: wrap;
    justify-content: center;
  }

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

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

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

  .mockup-stage {
    inset: 14px 12px 0;
    max-width: 760px;
    margin: 0 auto;
  }

  .device-shell img {
    max-height: 432px;
  }

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

@media (max-width: 900px) {
  .site-shell {
    width: min(calc(100% - 20px), var(--content-width));
    padding-top: 12px;
  }

  .site-header,
  .hero-section,
  .section-block {
    padding: 22px;
  }

  .site-header {
    justify-content: flex-start;
  }

  .site-nav,
  .header-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .feature-grid,
  .hero-stats,
  .system-grid,
  .docs-grid {
    grid-template-columns: 1fr;
  }

  .hero-visual {
    min-height: auto;
    overflow-x: auto;
    padding: 14px 0 20px;
  }

  .mockup-stage {
    position: relative;
    inset: auto;
    width: max-content;
    max-width: none;
    display: flex;
    gap: 12px;
    margin: 0;
  }

  .hero-device-scan,
  .hero-device-scores,
  .hero-device-protocol {
    transform: none;
  }

  .hero-device {
    flex: 0 0 168px;
  }

  .hero-device-scores {
    flex-basis: 186px;
  }

  .device-shell img {
    max-height: 360px;
  }

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

@media (max-width: 640px) {
  :root {
    --font-size-md: 16px;
    --font-size-lg: 20px;
  }

  .site-shell {
    width: min(calc(100% - 12px), var(--content-width));
    padding-bottom: 28px;
  }

  .site-header,
  .hero-section,
  .section-block {
    border-radius: 18px;
    padding: 18px;
  }

  .site-header {
    gap: 14px;
    overflow: hidden;
  }

  .brand-lockup span {
    font-size: 18px;
  }

  .brand-lockup img {
    width: 36px;
    height: 36px;
    border-radius: 9px;
  }

  .site-nav {
    gap: 14px;
    flex-wrap: nowrap;
    max-width: 100%;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .site-nav::-webkit-scrollbar {
    display: none;
  }

  .site-nav a {
    padding: 4px 0;
  }

  .header-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
  }

  h1 {
    max-width: 9.5ch;
    font-size: 38px;
    line-height: 0.98;
  }

  h2 {
    font-size: 34px;
    line-height: 1.04;
  }

  h3 {
    font-size: 24px;
  }

  .hero-lede,
  .section-heading p,
  .system-copy p,
  .system-card p {
    font-size: 16px;
    line-height: 1.55;
  }

  .eyebrow,
  .section-label,
  .card-index {
    font-size: 10px;
  }

  .hero-actions,
  .hero-points {
    margin-top: 22px;
  }

  .hero-points {
    gap: 10px;
    display: grid;
  }

  .hero-points span + span::before {
    content: none;
  }

  .hero-visual {
    width: 100%;
    max-width: 100%;
    margin-inline: 0;
    overflow-x: auto;
    overflow-y: visible;
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .hero-visual::-webkit-scrollbar {
    display: none;
  }

  .mockup-stage {
    gap: 10px;
    width: max-content;
    min-width: 0;
  }

  .device-shell {
    border-radius: 20px;
    box-shadow: 0 18px 36px rgba(0, 0, 0, 0.36);
  }

  .device-shell img {
    max-height: 318px;
    border-radius: 20px;
  }

  .hero-device {
    flex-basis: 136px;
  }

  .button-primary,
  .button-secondary,
  .header-button {
    width: 100%;
    max-width: 100%;
    min-height: 44px;
    border-radius: 10px;
  }

  .header-link {
    min-height: 30px;
  }

  .stat-card,
  .feature-card,
  .system-card,
  .docs-card {
    padding: 18px;
  }

  .docs-card {
    min-height: 150px;
  }
}
