:root {
  --navy: #112a46;
  --navy-dark: #0d2035;
  --blue: #115496;
  --black: #121212;
  --muted: #55595c;
  --line: rgba(17, 42, 70, 0.12);
  --white: #ffffff;
  --fg70: rgba(18, 18, 18, 0.7);
  --fg65: rgba(18, 18, 18, 0.65);
  --fg55: rgba(18, 18, 18, 0.55);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Inter, system-ui, sans-serif;
  color: var(--black);
  background: var(--white);
  line-height: 1.5;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
.wrap { width: min(1400px, calc(100% - 2rem)); margin-inline: auto; }

.noise-overlay { position: relative; }
.noise-overlay::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  opacity: 0.03;
  pointer-events: none;
  z-index: 1;
}
@media (max-width: 768px) {
  .noise-overlay::after { display: none; }
}

/* Nav */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  transition: all .5s;
}
.nav.scrolled {
  top: 1rem;
  left: 1rem;
  right: 1rem;
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 5rem;
  transition: all .5s;
}
.nav.scrolled .nav-inner {
  max-width: 1200px;
  height: 3.5rem;
  border-radius: 1rem;
  border: 1px solid rgba(0,0,0,.1);
  background: rgba(255,255,255,.8);
  backdrop-filter: blur(16px);
  box-shadow: 0 10px 30px rgba(0,0,0,.08);
  padding-inline: 1.5rem;
}
.logo { display: inline-grid; line-height: 1; }
.logo-axiom {
  font-weight: 800;
  letter-spacing: .14em;
  font-size: .95rem;
  color: var(--navy);
}
.logo-clearing {
  display: flex;
  justify-content: space-between;
  width: 100%;
  margin-top: 3px;
  font-size: .52rem;
  font-weight: 600;
  color: var(--muted);
}
.nav-links {
  display: none;
  gap: 3rem;
  font-size: .875rem;
  color: var(--fg70);
}
.nav-links a { position: relative; }
.nav-links a::after {
  content: '';
  position: absolute;
  left: 0; bottom: -.25rem;
  width: 0; height: 1px;
  background: var(--blue);
  transition: width .3s;
}
.nav-links a:hover::after { width: 100%; }
.nav-actions { display: none; align-items: center; gap: 1rem; }
.nav-login { font-size: .875rem; color: var(--fg70); }
.nav-burger {
  display: inline-flex;
  flex-direction: column;
  gap: 5px;
  border: 0;
  background: transparent;
  padding: .5rem;
  cursor: pointer;
}
.nav-burger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--black);
}
.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1.5rem;
  padding: 6rem 2rem 2rem;
  background: #fff;
}
.mobile-menu[hidden] { display: none !important; }
.mobile-menu a {
  font-size: 2.5rem;
  font-weight: 600;
  letter-spacing: -.03em;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  border-radius: 999px;
  font-weight: 500;
  border: 1px solid transparent;
}
.btn.sm { min-height: 2rem; padding: 0 1rem; font-size: .75rem; }
.btn.lg { min-height: 3.5rem; padding: 0 2rem; font-size: 1rem; }
.btn.primary { background: var(--navy); color: #fff; }
.btn.primary:hover { background: var(--navy-dark); }
.nav-actions .btn.primary { background: var(--blue); }
.nav-actions .btn.primary:hover { background: #0f4c81; }
.btn.outline {
  border-color: rgba(17,42,70,.35);
  background: #fff;
}
.btn.outline:hover {
  border-color: var(--navy);
  background: rgba(17,42,70,.04);
}

/* Hero */
.hero {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  min-height: 90svh;
  overflow: hidden;
  padding-bottom: 7rem;
}
.grid-bg {
  position: absolute;
  inset: 0;
  opacity: .12;
  background-image:
    linear-gradient(rgba(17,42,70,.12) 1px, transparent 1px),
    linear-gradient(90deg, rgba(17,42,70,.12) 1px, transparent 1px);
  background-size: 100% 14%, 11% 100%;
  pointer-events: none;
}
.sphere-wrap {
  position: absolute;
  right: 0;
  top: 50%;
  width: min(420px, 80vw);
  height: min(420px, 80vw);
  transform: translateY(-50%);
  opacity: .25;
  pointer-events: none;
  z-index: 0;
}
.sphere-wrap canvas { display: block; width: 100%; height: 100%; }
.hero-inner {
  position: relative;
  z-index: 2;
  width: min(1400px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 9rem 0 4rem;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .65rem;
  margin: 0 0 1.5rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: .875rem;
  font-weight: 500;
  color: rgba(18,18,18,.8);
}
.dot {
  width: .5rem;
  height: .5rem;
  border-radius: 999px;
  background: var(--navy);
}
h1 {
  margin: 0 0 1.75rem;
  max-width: 64rem;
  font-size: clamp(.85rem, 5.5vw, 3.65rem);
  line-height: 1.12;
  letter-spacing: -.03em;
  font-weight: 600;
}
h1 .line { display: block; white-space: nowrap; }
h1 .accent { color: var(--navy); }
.hero-grid {
  display: grid;
  gap: 2.5rem;
  align-items: end;
}
.lead {
  max-width: 34rem;
  margin: 0;
  color: var(--fg65);
  font-size: .875rem;
  line-height: 1.7;
}
.actions { display: flex; flex-wrap: wrap; gap: 1rem; }

.marquee-wrap {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 2.5rem;
  z-index: 2;
  overflow: hidden;
}
.marquee {
  display: flex;
  width: max-content;
  animation: marquee 30s linear infinite;
}
.marquee-track {
  display: flex;
  align-items: center;
  gap: 4rem;
  padding-right: 4rem;
}
.marquee-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  height: 2.75rem;
  white-space: nowrap;
}
.marquee-item strong {
  font-size: 1.875rem;
  font-weight: 600;
  letter-spacing: -.03em;
  line-height: 1;
}
.marquee-item span {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
  font-size: .875rem;
  line-height: 1.2;
  color: var(--fg70);
}
.marquee-item small {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: .75rem;
  color: var(--fg55);
}
@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* Sections */
.section { padding: 6rem 0; position: relative; z-index: 2; background: #fff; }
.section-label {
  display: inline-flex;
  align-items: center;
  gap: .75rem;
  margin: 0 0 1.5rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: .875rem;
  color: var(--muted);
}
.section-label::before {
  content: '';
  width: 2rem;
  height: 1px;
  background: rgba(18,18,18,.3);
}
h2 {
  margin: 0;
  font-size: clamp(1.75rem, 4vw, 3.75rem);
  line-height: 1.1;
  letter-spacing: -.03em;
  font-weight: 600;
}
h2 .muted { color: var(--muted); }
.section-lead {
  max-width: 40rem;
  margin: 2rem 0 3rem;
  font-size: 1.25rem;
  line-height: 1.6;
  color: var(--muted);
}

#features > .wrap > h2 {
  margin-bottom: 0;
  opacity: 0;
  transform: translateY(1rem);
  transition: opacity .7s, transform .7s;
}
#features > .wrap > h2.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.feature-row {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  padding: 3rem 0;
  border-bottom: 1px solid var(--line);
  opacity: 0;
  transform: translateY(3rem);
  transition: opacity .7s, transform .7s;
}
.feature-row.is-visible {
  opacity: 1;
  transform: translateY(0);
}
.feature-row:hover h3 {
  transform: translateX(.5rem);
}
.feature-body h3 {
  transition: transform .5s;
}
.feature-num {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: .875rem;
  color: var(--muted);
}
.feature-body {
  display: grid;
  gap: 2rem;
  align-items: center;
}
.feature-body h3 {
  margin: 0 0 1rem;
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  font-weight: 600;
  letter-spacing: -.02em;
}
.feature-body p {
  margin: 0;
  font-size: 1.125rem;
  line-height: 1.65;
  color: var(--muted);
}
.feature-visual {
  width: 12rem;
  height: 10rem;
  color: var(--black);
  margin-inline: auto;
}
.feature-visual svg { width: 100%; height: 100%; }

.pool-grid {
  display: grid;
  gap: 4rem;
  align-items: center;
}
.pool-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}
.pool-stats strong {
  display: block;
  font-size: clamp(1.75rem, 3vw, 3rem);
  font-weight: 600;
  letter-spacing: -.03em;
  margin-bottom: .5rem;
}
.pool-stats span { font-size: .875rem; color: var(--muted); }

.catalog { border: 1px solid var(--line); }
.catalog-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--line);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: .875rem;
  color: var(--muted);
}
.catalog-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid rgba(18,18,18,.05);
  transition: background .3s;
}
.catalog-row:last-child { border-bottom: 0; }
.catalog-row.active { background: rgba(18,18,18,.02); }
.catalog-row > div { display: flex; align-items: center; gap: 1rem; }
.catalog-row i {
  width: .5rem;
  height: .5rem;
  border-radius: 999px;
  background: rgba(18,18,18,.2);
  display: inline-block;
}
.catalog-row.active i { background: var(--black); }
.catalog-row b { display: block; font-weight: 500; }
.catalog-row small { display: block; color: var(--muted); font-size: .875rem; }
.catalog-row > span {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: .875rem;
  color: var(--muted);
}

.live {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: .75rem;
  color: var(--blue);
}
.live i {
  width: .5rem;
  height: .5rem;
  border-radius: 999px;
  background: var(--blue);
  animation: pulse 1.5s ease infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .35; }
}

.metrics-section { border-block: 1px solid var(--line); }
.metrics-head {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  margin-bottom: 4rem;
}
.metrics-live {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: .875rem;
  color: var(--muted);
}
.metrics-live .sep { color: rgba(18,18,18,.3); }
.metrics-grid {
  display: grid;
  gap: 1px;
  background: var(--line);
}
.metric {
  background: #fff;
  padding: 2rem;
}
.metric-value {
  font-size: clamp(3rem, 8vw, 6rem);
  font-weight: 600;
  letter-spacing: -.04em;
  line-height: 1;
}
.metric-label {
  margin-top: 1rem;
  font-size: 1.125rem;
  color: var(--muted);
}

/* Footer */
.footer {
  position: relative;
  border-top: 1px solid var(--line);
  z-index: 2;
  background: #fff;
}
.wave-wrap {
  position: absolute;
  inset: 0 0 auto 0;
  height: 16rem;
  overflow: hidden;
  opacity: .2;
  pointer-events: none;
}
.wave-wrap canvas { width: 100%; height: 100%; display: block; }
.footer-top {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  padding: 4rem 0;
}
.footer-brand { grid-column: 1 / -1; }
.footer-brand p {
  max-width: 20rem;
  margin: 1.5rem 0 2rem;
  color: var(--muted);
  line-height: 1.65;
}
.social { display: flex; gap: 1.5rem; }
.social a { font-size: .875rem; color: var(--muted); }
.social a:hover { color: var(--black); }
.footer h3 {
  margin: 0 0 1.5rem;
  font-size: .875rem;
  font-weight: 500;
}
.footer ul { list-style: none; margin: 0; padding: 0; }
.footer li + li { margin-top: 1rem; }
.footer li a { font-size: .875rem; color: var(--muted); }
.footer li a:hover { color: var(--black); }
.footer-bottom {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  padding: 2rem 0;
  border-top: 1px solid var(--line);
  font-size: .875rem;
  color: var(--muted);
}

.reveal { opacity: 1; }

@media (min-width: 768px) {
  .nav-links, .nav-actions { display: flex; }
  .nav-burger { display: none; }
  .hero { justify-content: center; }
  .hero-inner { padding-top: 10rem; padding-bottom: 5rem; }
  .lead { font-size: .9375rem; }
  .sphere-wrap { width: 520px; height: 520px; opacity: .28; }
  .marquee-item strong { font-size: 2.25rem; }
  .feature-row { flex-direction: row; gap: 4rem; padding: 5rem 0; }
  .feature-body { grid-template-columns: 1fr 1fr; }
  .feature-visual { margin-inline: 0 0; margin-left: auto; }
  .pool-grid { grid-template-columns: 1fr 1fr; gap: 6rem; }
  .metrics-head { flex-direction: row; justify-content: space-between; align-items: end; }
  .metrics-grid { grid-template-columns: 1fr 1fr; }
  .metric { padding: 3rem; }
  .footer-top { grid-template-columns: 2fr 1fr 1fr 1fr; }
  .footer-brand { grid-column: auto; }
  .footer-bottom { flex-direction: row; justify-content: space-between; }
}

@media (min-width: 1024px) {
  .hero-grid { grid-template-columns: 1fr 1fr; gap: 6rem; }
  .lead { font-size: 1rem; line-height: 1.75; }
  .sphere-wrap { width: 640px; height: 640px; opacity: .3; }
  .section { padding: 8rem 0; }
  .section-lead { font-size: 1.25rem; }
}

@media (max-width: 768px) {
  .marquee { animation-duration: 40s; }
}

@media (prefers-reduced-motion: reduce) {
  .marquee { animation: none; }
  .feature-row,
  #features > .wrap > h2 {
    opacity: 1 !important;
    transform: none !important;
  }
}

/* PIN gate — same look as edoc PinGate */
.pin-gate {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: linear-gradient(160deg, #0A1628 0%, #0F2744 60%, #0F4C81 100%);
}
.pin-gate[hidden] { display: none !important; }
.pin-dots {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: radial-gradient(circle, rgba(255,255,255,0.04) 1px, transparent 1px);
  background-size: 32px 32px;
}
.pin-line {
  position: absolute;
  inset: 0 0 auto 0;
  height: 2px;
  pointer-events: none;
  background: linear-gradient(90deg, transparent, #4A9EDB, transparent);
}
.pin-box {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2.5rem;
  padding: 0 1.5rem;
  text-align: center;
}
.logo-white .logo-axiom { color: #fff; }
.logo-white .logo-clearing { color: rgba(255,255,255,.7); }
.pin-copy { display: grid; gap: .5rem; }
.pin-eyebrow {
  margin: 0;
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: rgba(147, 197, 253, .7);
}
.pin-title {
  margin: 0;
  font-size: clamp(1.5rem, 4vw, 1.875rem);
  font-weight: 700;
  color: #fff;
  white-space: normal;
  letter-spacing: 0;
}
.pin-hint {
  margin: 0;
  font-size: .875rem;
  color: #94a3b8;
}
.pin-inputs {
  display: flex;
  gap: .75rem;
}
.pin-inputs input {
  width: 3rem;
  height: 3.5rem;
  border-radius: .75rem;
  border: 2px solid rgba(255,255,255,.2);
  background: rgba(255,255,255,.1);
  color: #fff;
  text-align: center;
  font-size: 1.25rem;
  font-weight: 700;
  outline: none;
  backdrop-filter: blur(4px);
  transition: border-color .15s;
}
.pin-inputs input.filled { border-color: #4A9EDB; }
.pin-inputs input.err { border-color: #f87171; }
.pin-error {
  margin: 0;
  min-height: 1.25rem;
  font-size: .875rem;
  font-weight: 500;
  color: #f87171;
  opacity: 0;
  transition: opacity .3s;
}
.pin-error.show { opacity: 1; }
#site-root[hidden] { display: none !important; }
