:root {
  color-scheme: dark;
}

html[data-theme="dark"] {
  --bg: #05060a;
  --bg-alt: #0b0f1a;
  --text: #f5f8ff;
  --muted: #c2ccde;
  --card: rgba(255, 255, 255, 0.08);
  --card-border: rgba(184, 227, 255, 0.24);
  --accent: #b8e3ff;
  --accent-strong: #9fd6ff;
  --accent-deep: #7aaed4;
  --shadow: 0 24px 56px rgba(0, 0, 0, 0.42);
  --bg-node-rgb: 184, 227, 255;
}

html[data-theme="light"] {
  color-scheme: light;
  --bg: #f2f7ff;
  --bg-alt: #e4edf9;
  --text: #111d31;
  --muted: #3f5574;
  --card: rgba(255, 255, 255, 0.72);
  --card-border: rgba(72, 111, 151, 0.3);
  --accent: #1f6ea8;
  --accent-strong: #2f82c0;
  --accent-deep: #245f90;
  --shadow: 0 18px 40px rgba(25, 46, 73, 0.16);
  --bg-node-rgb: 40, 88, 130;
}

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

html,
body {
  margin: 0;
  padding: 0;
}

body.home-page {
  min-height: 100vh;
  background:
    radial-gradient(1600px 860px at 80% -18%, rgba(28, 59, 94, 0.36), transparent 62%),
    radial-gradient(1000px 560px at -20% 110%, rgba(17, 42, 72, 0.42), transparent 70%),
    linear-gradient(180deg, var(--bg) 0%, #060914 52%, var(--bg-alt) 100%);
  color: var(--text);
  font-family: "Manrope", "Segoe UI Variable", "Segoe UI", sans-serif;
  line-height: 1.5;
  position: relative;
}

html[data-theme="light"] body.home-page {
  background:
    radial-gradient(1500px 820px at 82% -16%, rgba(188, 220, 255, 0.58), transparent 62%),
    radial-gradient(940px 540px at -20% 108%, rgba(177, 203, 236, 0.54), transparent 68%),
    linear-gradient(180deg, #f5f9ff 0%, #edf4ff 56%, var(--bg-alt) 100%);
}

.neural-bg {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0.2;
  filter: blur(1px);
  z-index: -2;
}

html[data-theme="light"] .neural-bg {
  opacity: 0.16;
}

.bg-vignette {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 50% -10%, transparent, rgba(5, 8, 14, 0.24) 72%),
    linear-gradient(180deg, rgba(4, 5, 8, 0.34) 0%, transparent 30%, rgba(4, 7, 12, 0.34) 100%);
  z-index: -1;
}

html[data-theme="light"] .bg-vignette {
  background:
    radial-gradient(circle at 50% -10%, transparent, rgba(27, 57, 92, 0.1) 72%),
    linear-gradient(180deg, rgba(220, 233, 250, 0.24) 0%, transparent 32%, rgba(211, 225, 245, 0.24) 100%);
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--accent);
  color: #04101d;
  border-radius: 0 0 12px 12px;
  padding: 0.65rem 1rem;
  font-weight: 700;
}

.skip-link:focus-visible {
  left: 1rem;
  top: 1rem;
  z-index: 1000;
}

a {
  color: var(--accent);
}

a:hover {
  color: var(--accent-strong);
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 12;
  padding: 1rem clamp(0.75rem, 2vw, 1.4rem) 0;
}

.nav-shell {
  width: min(1200px, calc(100vw - 1.6rem));
  margin: 0 auto;
  border-radius: 22px;
  border: 1px solid rgba(184, 227, 255, 0.16);
  background: rgba(8, 12, 22, 0.62);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  align-items: center;
  gap: 0.8rem;
  padding: 0.55rem 0.8rem;
  transition: background-color 220ms ease, border-color 220ms ease, box-shadow 220ms ease;
}

html[data-theme="light"] .nav-shell {
  background: rgba(255, 255, 255, 0.74);
  border-color: rgba(72, 111, 151, 0.24);
}

.site-header.is-scrolled .nav-shell {
  background: rgba(8, 12, 22, 0.82);
  border-color: rgba(184, 227, 255, 0.28);
  box-shadow: 0 10px 28px rgba(2, 6, 12, 0.36);
}

html[data-theme="light"] .site-header.is-scrolled .nav-shell {
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 10px 26px rgba(44, 72, 104, 0.14);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.56rem;
  text-decoration: none;
  color: var(--text);
  white-space: nowrap;
}

.brand-mark {
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-size: 0.76rem;
  letter-spacing: 0.04em;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-deep) 100%);
  color: #031321;
  font-weight: 800;
}

.brand-text {
  font-family: "Sora", "Segoe UI Variable", "Segoe UI", sans-serif;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.site-nav {
  justify-self: center;
  display: flex;
  flex-wrap: wrap;
  gap: 0.24rem;
}

.nav-link {
  text-decoration: none;
  color: var(--muted);
  border-radius: 999px;
  padding: 0.46rem 0.76rem;
  font-size: 0.92rem;
  transition: background-color 180ms ease, color 180ms ease;
}

.nav-link:hover {
  color: var(--text);
  background: rgba(184, 227, 255, 0.14);
}

.nav-link.is-active,
.nav-link[aria-current="page"] {
  color: var(--text);
  background: rgba(184, 227, 255, 0.2);
}

.menu-toggle,
.theme-toggle {
  border: 1px solid var(--card-border);
  background: rgba(184, 227, 255, 0.12);
  color: var(--text);
  border-radius: 999px;
  font: inherit;
  padding: 0.45rem 0.78rem;
  cursor: pointer;
}

.menu-toggle {
  display: none;
}

.theme-toggle:hover,
.menu-toggle:hover {
  background: rgba(184, 227, 255, 0.24);
}

main {
  padding-bottom: 4rem;
}

.section-shell {
  width: min(1160px, 92vw);
  margin: 0 auto;
  padding-top: clamp(2.4rem, 5vw, 4.2rem);
}

.hero-section {
  padding-top: clamp(1.6rem, 3.2vw, 2.8rem);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 1rem;
}

.glass {
  border-radius: 22px;
  border: 1px solid var(--card-border);
  background: var(--card);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

html[data-theme="light"] .glass {
  box-shadow: var(--shadow);
}

.hero-copy,
.hero-proof {
  padding: clamp(1.1rem, 2.1vw, 1.7rem);
}

.eyebrow {
  margin: 0 0 0.7rem;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.11em;
  font-size: 0.75rem;
  font-weight: 700;
}

h1,
h2,
h3 {
  font-family: "Sora", "Segoe UI Variable", "Segoe UI", sans-serif;
  letter-spacing: -0.02em;
  margin: 0;
}

h1 {
  font-size: clamp(2.35rem, 7vw, 4.8rem);
  line-height: 0.98;
  max-width: 14ch;
  margin-bottom: 0.95rem;
}

.hero-subhead {
  margin: 0;
  max-width: 58ch;
  color: var(--text);
  font-size: clamp(1rem, 1.55vw, 1.2rem);
}

.clearance-line {
  margin: 0.9rem 0 0;
  color: var(--muted);
  font-weight: 600;
}

.cta-row {
  margin-top: 1.2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.62rem;
}

.btn {
  border-radius: 999px;
  padding: 0.62rem 1.05rem;
  text-decoration: none;
  font-weight: 700;
  border: 1px solid transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.6rem;
  transition: transform 190ms ease, box-shadow 190ms ease, border-color 190ms ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  color: #041426;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-strong) 100%);
  box-shadow: 0 10px 24px rgba(56, 133, 182, 0.28);
}

.btn-primary:hover {
  box-shadow: 0 12px 28px rgba(56, 133, 182, 0.36);
}

.btn-secondary {
  color: var(--text);
  border-color: var(--card-border);
  background: rgba(159, 214, 255, 0.12);
}

.btn-secondary:hover {
  border-color: rgba(184, 227, 255, 0.48);
  box-shadow: inset 0 0 0 1px rgba(184, 227, 255, 0.24);
}

.cred-bar {
  list-style: none;
  margin: 1.1rem 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.46rem;
}

.cred-bar li {
  border-radius: 999px;
  border: 1px solid var(--card-border);
  background: rgba(184, 227, 255, 0.1);
  color: var(--text);
  padding: 0.38rem 0.7rem;
  font-size: 0.85rem;
}

.hero-proof h2 {
  font-size: clamp(1.32rem, 2vw, 1.6rem);
  margin-bottom: 0.7rem;
}

.hero-proof ol {
  margin: 0;
  padding-left: 1.15rem;
  color: var(--muted);
  display: grid;
  gap: 0.48rem;
}

.hero-proof pre {
  margin: 1rem 0 0;
  padding: 0.9rem;
  border-radius: 18px;
  border: 1px solid rgba(184, 227, 255, 0.22);
  background: rgba(8, 12, 22, 0.65);
  color: #deecff;
  font-size: 0.84rem;
  overflow-x: auto;
}

html[data-theme="light"] .hero-proof pre {
  background: rgba(240, 247, 255, 0.88);
  color: #15304d;
}

.proof-links {
  margin: 0.85rem 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.proof-links a {
  font-weight: 600;
  text-decoration: none;
}

.section-head {
  margin-bottom: 1.05rem;
}

.section-head h2 {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  margin-bottom: 0.4rem;
}

.section-head p {
  margin: 0;
  color: var(--muted);
  max-width: 66ch;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0.7rem;
}

.kpi-card {
  padding: 0.95rem 0.95rem 0.86rem;
  min-height: 142px;
}

.kpi-card header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.7rem;
}

.kpi-card h3 {
  font-size: clamp(1.35rem, 2.8vw, 2rem);
}

.kpi-card p {
  margin: 0.55rem 0 0;
  color: var(--muted);
  font-size: 0.93rem;
}

.kpi-ring {
  width: 44px;
  height: 44px;
}

.kpi-ring circle {
  fill: none;
  stroke-width: 4;
}

.kpi-ring-bg {
  stroke: rgba(184, 227, 255, 0.24);
}

.kpi-ring-fill {
  stroke: var(--accent);
  stroke-linecap: round;
  stroke-dasharray: 119.38;
  stroke-dashoffset: calc(119.38 * (1 - (var(--p, 65) / 100)));
  transition: stroke-dashoffset 400ms ease;
}

.kpi-date-card header {
  justify-content: flex-start;
}

.meta-note {
  margin: 0.8rem 0 0;
  color: var(--muted);
}

.meta-note a {
  text-decoration: none;
  font-weight: 700;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.85rem;
}

.feature-card {
  padding: 1rem;
}

.feature-card h3 {
  font-size: 1.14rem;
}

.feature-card p {
  margin: 0.62rem 0 0;
  color: var(--muted);
}

.feature-card .proof-detail {
  color: var(--text);
}

.feature-card a {
  display: inline-flex;
  margin-top: 0.8rem;
  text-decoration: none;
  font-weight: 700;
}

.tag-shell {
  padding: 1rem;
  min-height: 184px;
}

.tag-loading {
  display: grid;
  gap: 0.54rem;
}

.skeleton-row {
  height: 0.82rem;
  border-radius: 999px;
  background: rgba(184, 227, 255, 0.14);
  position: relative;
  overflow: hidden;
}

.skeleton-row::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent 0%, rgba(184, 227, 255, 0.34) 50%, transparent 100%);
  transform: translateX(-100%);
  animation: shimmer 1.4s ease-in-out infinite;
}

.tag-chart {
  display: grid;
  gap: 0.66rem;
}

.tag-row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 0.6rem;
  color: var(--text);
  font-weight: 600;
}

.tag-row small {
  color: var(--muted);
  font-size: 0.84rem;
}

.tag-meter {
  grid-column: 1 / -1;
  height: 0.58rem;
  border-radius: 999px;
  background: rgba(184, 227, 255, 0.12);
  overflow: hidden;
}

.tag-meter > span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent-strong) 0%, var(--accent) 100%);
}

.tag-fallback p {
  margin: 0 0 0.72rem;
  color: var(--muted);
}

.tag-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tag-pill {
  padding: 0.36rem 0.7rem;
  border-radius: 999px;
  border: 1px solid var(--card-border);
  background: rgba(184, 227, 255, 0.1);
  color: var(--text);
  font-size: 0.86rem;
}

.tag-fallback a {
  margin-top: 0.8rem;
  display: inline-flex;
  text-decoration: none;
  font-weight: 700;
}

.workflow-shell {
  padding: 1rem;
}

.workflow-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 0.5rem;
}

.workflow-list li {
  border-radius: 999px;
  border: 1px solid var(--card-border);
  background: rgba(184, 227, 255, 0.1);
  text-align: center;
  padding: 0.48rem 0.5rem;
  font-weight: 600;
  font-size: 0.84rem;
  position: relative;
}

.workflow-list li:not(:last-child)::after {
  content: "";
  position: absolute;
  right: -0.35rem;
  top: 50%;
  width: 0.35rem;
  height: 1px;
  background: var(--card-border);
}

.verify-grid {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.78rem;
}

.verify-grid li {
  padding: 1rem;
}

.verify-grid h3 {
  font-size: 1.08rem;
}

.verify-grid p {
  margin: 0.65rem 0 0;
  color: var(--muted);
}

.site-footer {
  padding: 2.2rem 0 2rem;
}

.footer-shell {
  width: min(1160px, 92vw);
  margin: 0 auto;
  border-radius: 22px;
  border: 1px solid var(--card-border);
  background: var(--card);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 1rem;
}

.footer-shell p {
  margin: 0;
  color: var(--muted);
}

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

.footer-links {
  margin-top: 0.6rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.72rem;
}

.footer-links a {
  text-decoration: none;
  font-weight: 700;
}

.copyright {
  margin-top: 0.7rem;
  font-size: 0.88rem;
}

.glass:hover,
.kpi-card:hover,
.feature-card:hover,
.verify-grid li:hover {
  border-color: rgba(184, 227, 255, 0.46);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.18);
  transform: translateY(-2px);
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

@supports not ((backdrop-filter: blur(2px)) or (-webkit-backdrop-filter: blur(2px))) {
  .glass,
  .nav-shell,
  .footer-shell {
    background: rgba(9, 12, 22, 0.88);
  }

  html[data-theme="light"] .glass,
  html[data-theme="light"] .nav-shell,
  html[data-theme="light"] .footer-shell {
    background: rgba(255, 255, 255, 0.92);
  }
}

@media (max-width: 1439px) {
  .kpi-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 1023px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }

  .feature-grid {
    grid-template-columns: 1fr 1fr;
  }

  .workflow-list {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .workflow-list li:nth-child(4)::after,
  .workflow-list li:last-child::after {
    display: none;
  }
}

@media (max-width: 900px) {
  .nav-shell {
    grid-template-columns: auto auto auto;
    grid-template-areas:
      "brand menu theme"
      "nav nav nav";
    gap: 0.58rem;
  }

  .brand {
    grid-area: brand;
  }

  .menu-toggle {
    grid-area: menu;
    display: inline-flex;
    justify-self: end;
  }

  .theme-toggle {
    grid-area: theme;
    justify-self: end;
  }

  .site-nav {
    grid-area: nav;
    width: 100%;
    display: none;
    flex-direction: column;
    border-top: 1px solid var(--card-border);
    padding-top: 0.5rem;
  }

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

  .nav-link {
    width: 100%;
  }
}

@media (max-width: 767px) {
  .section-shell {
    width: min(1160px, 94vw);
    padding-top: 2.25rem;
  }

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

  .feature-grid,
  .verify-grid {
    grid-template-columns: 1fr;
  }

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

  .workflow-list li:nth-child(2n)::after {
    display: none;
  }
}

@media (max-width: 479px) {
  h1 {
    font-size: clamp(2rem, 12vw, 2.5rem);
  }

  .kpi-grid {
    grid-template-columns: 1fr;
  }

  .btn {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 1ms !important;
    scroll-behavior: auto !important;
  }

  .glass:hover,
  .kpi-card:hover,
  .feature-card:hover,
  .verify-grid li:hover,
  .btn:hover {
    transform: none;
  }
}

@keyframes shimmer {
  to {
    transform: translateX(100%);
  }
}
