/* SOMVAD website: design system implementation of website/DESIGN.md
   "Bright blueprint on frosted glass": pure white canvas, hairline-bordered flat cards,
   one rationed violet for action, mint for status, editorial serif headlines.
   Fonts: Inter (grotesk UI/body), Cormorant Garamond 300 (editorial display),
   IBM Plex Mono (code artefacts only, a functional layer for the developer surface). */

:root {
  /* Colors */
  --violet: #5f79ff;          /* decorative: dots, borders, focus, display accent */
  --violet-action: #4d68f5;   /* button fills + white-on-violet (AA 4.55:1) */
  --violet-text: #3f57e0;     /* small violet text/links (AA on white + fog) */
  --violet-ink: #ffffff;
  --mint: #01fe93;
  --amber: #f5a623;      /* caution / recording: capital-markets signal vocabulary */
  --white: #ffffff;
  --black: #000000;
  --fog: #f5f5f5;
  --mist: #a6a6a6;
  --ash: #4d4d4d;
  --slate: #707070;
  --tint: #d9defc;       /* violet-tinted accent surface */

  /* Type */
  --font-ui: 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-display: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

  /* Scale */
  --t-caption: 0.75rem;     /* 12 */
  --t-body: 0.9375rem;      /* 15 */
  --t-body-lg: 1.0625rem;   /* 17 */
  --t-subhead: 1.25rem;     /* 20 */
  --t-h-sm: 1.5rem;         /* 24 */
  --t-h: 1.875rem;          /* 30 */
  --t-h-lg: 2.5rem;         /* 40 */
  --t-display: 4.5rem;      /* 72 */

  /* Spacing */
  --s-4: 4px; --s-8: 8px; --s-12: 12px; --s-16: 16px; --s-20: 20px;
  --s-24: 24px; --s-32: 32px; --s-40: 40px; --s-48: 48px; --s-60: 60px;
  --s-64: 64px; --s-80: 80px; --s-120: 120px;

  /* Layout */
  --max: 1200px;
  --gap-section: 80px;

  /* Radii */
  --r-card: 16px;
  --r-input: 12px;
  --r-pill: 100px;

  /* The only shadow in the system: the floating nav halo */
  --shadow-nav: 0 0 48px rgba(0, 0, 0, 0.1);
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-ui);
  font-size: var(--t-body);
  line-height: 1.6;
  color: var(--black);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

.skip-link {
  position: absolute; left: -9999px; top: 8px;
  background: var(--black); color: var(--white); padding: 8px 14px;
  border-radius: var(--r-pill); z-index: 1000;
}
.skip-link:focus { left: 16px; }

:focus-visible { outline: 2px solid var(--violet); outline-offset: 2px; border-radius: 4px; }

.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 24px; }

/* ---------- Typography ---------- */
.display {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(2.75rem, 6vw + 0.5rem, var(--t-display));
  line-height: 0.98;
  letter-spacing: -0.02em;
  color: var(--black);
  margin: 0;
}
.display em { font-style: italic; color: var(--violet); }
/* own line + reserved height + nowrap so the rotating word never reflows the headline */
.rotator { display: block; white-space: nowrap; min-height: 1em; }
.rotator em { display: inline-block; transition: opacity 0.3s ease, transform 0.3s ease; }
.rotator.rotating em { opacity: 0; transform: translateY(-0.12em); }

h1, h2, h3, h4 { color: var(--black); margin: 0 0 var(--s-16); font-weight: 600; letter-spacing: -0.017em; }

.section-title {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(2rem, 3.5vw + 0.5rem, var(--t-h-lg));
  line-height: 1.05;
  letter-spacing: -0.02em;
}
.section-lead {
  font-size: var(--t-body-lg);
  color: var(--ash);
  max-width: 60ch;
  margin: var(--s-16) 0 0;
}

.eyebrow {
  font-size: var(--t-caption);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--violet-text);
  font-weight: 600;
  margin: 0 0 var(--s-12);
}

/* inline prose links: distinguishable + accessible (excludes styled nav/footer/card links) */
main a:not(.pill):not(.nav-link):not(.brand):not(.card):not(.card-arrow):not(.devnav-link) { color: var(--violet-text); }
main a:not(.pill):not(.nav-link):not(.brand):not(.card):not(.card-arrow):not(.devnav-link):hover { text-decoration: underline; }

p { margin: 0 0 var(--s-16); }
.muted { color: var(--ash); }
.fine { color: var(--slate); font-size: var(--t-caption); }

/* ---------- Floating nav ---------- */
.site-nav-wrap { position: sticky; top: 0; z-index: 100; padding: 18px 16px 0; }
.site-nav {
  max-width: var(--max);
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: var(--s-20);
  background: rgba(255, 255, 255, 0.92);
  -webkit-backdrop-filter: saturate(150%) blur(10px);
  backdrop-filter: saturate(150%) blur(10px);
  border-radius: var(--r-card);
  box-shadow: var(--shadow-nav);
  padding: 10px 12px 10px 18px;
}
.brand { display: inline-flex; align-items: center; gap: 9px; color: var(--black); }
.brand-word { font-size: 1.05rem; font-weight: 700; letter-spacing: -0.03em; }
.brand-mark { display: block; flex: none; }
.nav-links { display: flex; align-items: center; gap: 2px; margin-left: var(--s-12); }
.nav-link {
  color: var(--black); font-size: var(--t-body); padding: 8px 12px; border-radius: var(--r-pill);
  transition: color 0.15s ease, background 0.15s ease;
}
.nav-link:hover { color: var(--violet-text); }
.nav-link.is-active { color: var(--violet-text); background: var(--fog); }
.nav-cta { margin-left: auto; }
.nav-toggle { display: none; margin-left: auto; background: none; border: 0; padding: 8px; color: var(--black); cursor: pointer; }

/* ---------- Buttons / pills ---------- */
.pill {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-ui); font-size: var(--t-body); font-weight: 500;
  padding: 11px 20px; border-radius: var(--r-pill); border: 1px solid transparent;
  cursor: pointer; transition: transform 0.12s ease, background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
  white-space: nowrap;
}
.pill:active { transform: translateY(1px); }
.pill-primary { background: var(--violet-action); color: var(--violet-ink); }
.pill-primary:hover { background: var(--violet-text); }
.pill-ghost { background: var(--white); color: var(--black); border-color: var(--mist); }
.pill-ghost:hover { border-color: var(--black); }
.pill-ink { background: var(--black); color: var(--white); }
.pill-ink:hover { background: #1a1a1a; }

/* ---------- Badges ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: var(--t-caption); font-weight: 500; letter-spacing: 0.02em;
  padding: 4px 11px; border-radius: var(--r-pill); border: 1px solid var(--mist); color: var(--ash);
  background: var(--white);
}
.badge .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--mint); }
.badge.badge-amber .dot { background: var(--amber); }
.badge.badge-violet { border-color: var(--tint); color: var(--violet-text); }
.badge.badge-violet .dot { background: var(--violet); }
/* on dark panels the light-surface violet is too dark; use the brighter token (5.28:1 on #0a0c10) */
.panel-dark .badge.badge-violet { color: var(--violet); border-color: #2a3142; background: transparent; }

/* ---------- Sections ---------- */
section { padding: var(--gap-section) 0; }
.section-tight { padding: calc(var(--gap-section) / 2) 0; }
.section-head { max-width: 64ch; }
.section-head.center { margin: 0 auto; text-align: center; }

/* ---------- Hero ---------- */
.hero { padding: clamp(56px, 8vw, 100px) 0 var(--gap-section); position: relative; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: clamp(32px, 5vw, 72px); align-items: center; }
.hero-copy { max-width: 34rem; }
.hero h1 { margin-bottom: var(--s-20); }
.hero-sub { font-size: var(--t-body-lg); color: var(--ash); margin-bottom: var(--s-32); max-width: 46ch; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: var(--s-12); align-items: center; }
.hero-trust { margin-top: var(--s-24); color: var(--slate); font-size: var(--t-caption); max-width: 44ch; }
.sparkle { position: absolute; color: var(--tint); pointer-events: none; opacity: 0.55; }

/* ---------- Hero visual (three-layer command surface) ---------- */
.hero-visual { display: flex; flex-direction: column; gap: 8px; }
.layer { border: 1px solid var(--mist); border-radius: var(--r-card); padding: 16px; background: var(--white); }
.layer-tag { font-size: var(--t-caption); letter-spacing: 0.06em; text-transform: uppercase; color: var(--slate); margin-bottom: 12px; }
.layer-surface { background: var(--white); }
.layer-api { background: var(--tint); border-color: var(--tint); }
.layer-core { background: #0a0c10; border-color: #1b2030; }
.layer-core .layer-tag { color: #8b93a7; }

.keygrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.key { display: flex; align-items: center; gap: 7px; font-size: var(--t-caption); color: var(--ash); border: 1px solid var(--fog); border-radius: 9px; padding: 8px 10px; background: var(--white); }
.key i { width: 7px; height: 7px; border-radius: 50%; background: var(--mist); flex: none; }
.key.live i { background: var(--mint); box-shadow: 0 0 0 3px rgba(1,254,147,0.18); }
.key.talk { border-color: var(--tint); color: var(--violet-text); } .key.talk i { background: var(--violet); }
.key.rec i { background: var(--amber); } .key.rec { color: var(--amber); }

.route { display: flex; align-items: center; justify-content: center; gap: 10px; font-family: var(--font-mono); font-size: 11px; color: var(--slate); padding: 2px 0; }
.route .r-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--violet); animation: pulse 2.4s ease-in-out infinite; }
@keyframes pulse { 0%,100% { opacity: 0.35; } 50% { opacity: 1; } }

.api-rows { display: flex; flex-direction: column; gap: 8px; }
.api-rows span { font-size: var(--t-body); color: var(--ash); }
.api-rows code { background: rgba(255,255,255,0.85); border: 1px solid rgba(63,87,224,0.3); color: var(--violet-text); }

.core-row { display: flex; align-items: center; gap: 8px; }
.core-row .node { font-family: var(--font-mono); font-size: 11px; color: #d7dbe7; border: 1px solid #2a3142; border-radius: 8px; padding: 7px 11px; background: #11151d; }
.core-row .node.gw { border-color: rgba(95,121,255,0.5); color: #aeb9ff; }
.core-row .link { flex: 1; height: 1px; background: linear-gradient(90deg, #2a3142, #5f79ff, #2a3142); background-size: 200% 100%; animation: flow 2.6s linear infinite; }
@keyframes flow { 0% { background-position: 0 0; } 100% { background-position: -200% 0; } }

/* reusable equalizer waveform (dark panels) */
.eqwave { display: inline-flex; gap: 2px; align-items: flex-end; height: 12px; margin-left: auto; }
.eqwave i { width: 2px; height: 3px; background: var(--mint); border-radius: 1px; display: block; animation: eq 0.9s ease-in-out infinite; }
.eqwave i:nth-child(2) { animation-delay: 0.15s; }
.eqwave i:nth-child(3) { animation-delay: 0.3s; }
.eqwave i:nth-child(4) { animation-delay: 0.45s; }
/* a packet travelling a route line */
.flowline { position: relative; flex: 1; height: 2px; background: #2a3142; border-radius: 2px; overflow: hidden; }
.flowline::after { content: ''; position: absolute; top: 0; left: -30%; width: 30%; height: 100%; background: linear-gradient(90deg, transparent, var(--violet), transparent); animation: packet 1.8s linear infinite; }
@keyframes packet { to { left: 100%; } }

/* ---------- Animated code -> console demo ---------- */
.demo { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--mist); border-radius: var(--r-card); overflow: hidden; background: var(--white); box-shadow: 0 1px 0 rgba(0,0,0,0.02); }
.demo-code { background: #0a0c10; display: flex; flex-direction: column; min-width: 0; position: relative; }
.demo-code-head { display: flex; align-items: center; gap: 10px; padding: 11px 16px; border-bottom: 1px solid #1b2030; color: #8b93a7; font-family: var(--font-mono); font-size: 12px; }
.demo-loop { margin-left: auto; font-size: 11px; color: #6b7488; letter-spacing: 0.04em; display: inline-flex; align-items: center; gap: 5px; }
.demo-loop::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--mint); animation: pulse 1.6s ease-in-out infinite; }
.demo-replay { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 8px; color: var(--violet); font-family: var(--font-mono); font-size: 14px; letter-spacing: 0.08em; background: rgba(10,12,16,0.72); opacity: 0; pointer-events: none; transition: opacity 0.35s ease; z-index: 3; }
.demo.replaying .demo-replay { opacity: 1; }
.demo.replaying .demo-code-body { opacity: 0.15; transition: opacity 0.35s ease; }
.demo-progress { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: #1b2030; z-index: 2; }
.demo-progress i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--violet), var(--mint)); transition: width 0.4s linear; }
.demo-code-head .dots { display: flex; gap: 6px; }
.demo-code-head .dots i { width: 9px; height: 9px; border-radius: 50%; background: #2a3142; display: block; }
.demo-code-body { margin: 0; padding: 16px 18px; overflow: auto; flex: 1; min-height: 300px; max-height: 360px; font-family: var(--font-mono); font-size: 12.5px; line-height: 1.75; color: #d7dbe7; white-space: pre-wrap; word-break: break-word; }
.demo-code-body code { display: block; }
.demo-code-body code::after { content: '▋'; color: var(--violet); margin-left: 1px; animation: blink 1.05s step-end infinite; }
.demo-code-body .ln { display: inline; }
.demo-code-body .ln.cm { color: #6b7488; }
.demo-code-body .ln.kw { color: #c792ea; }
.demo-code-body .ln.fn { color: #82aaff; }
.demo-code-body .ln.code { color: #d7dbe7; }
@keyframes blink { 0%, 50% { opacity: 1; } 50.01%, 100% { opacity: 0; } }

.demo-ui { padding: 16px; display: flex; flex-direction: column; gap: 12px; position: relative; background: var(--white); min-width: 0; }
.demo-ui-head { display: flex; align-items: center; justify-content: space-between; font-size: 11px; color: var(--slate); text-transform: uppercase; letter-spacing: 0.07em; }
.demo-status { font-size: 11px; padding: 3px 10px; border-radius: var(--r-pill); border: 1px solid var(--mist); color: var(--ash); font-family: var(--font-ui); letter-spacing: 0; text-transform: none; transition: all 0.3s ease; }
.demo-status.warn { color: #9a6a00; border-color: #f3d9a8; background: #fff9ee; }
.demo-status.ok { color: #0a7c50; border-color: #a8e6c8; background: #f0fdf6; }

.demo-tiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.demo-tile { border: 1px solid var(--fog); border-radius: 10px; padding: 10px 12px; font-size: 13px; color: var(--ash); display: flex; align-items: center; gap: 8px; transition: border-color 0.3s ease, background 0.3s ease, color 0.3s ease; }
.demo-tile .lamp { width: 8px; height: 8px; border-radius: 50%; background: var(--mist); flex: none; transition: all 0.3s ease; }
.demo-tile.connecting { border-color: #f3d9a8; background: #fff9ee; }
.demo-tile.connecting .lamp { background: var(--amber); animation: pulse 1s infinite; }
.demo-tile.live { border-color: #a8e6c8; background: #f0fdf6; color: #0a6b46; }
.demo-tile.live .lamp { background: var(--mint); box-shadow: 0 0 0 3px rgba(1,254,147,0.22); }
.demo-tile .wave { margin-left: auto; display: flex; gap: 2px; align-items: flex-end; height: 14px; opacity: 0; transition: opacity 0.3s ease; }
.demo-tile.live .wave { opacity: 1; }
.demo-tile .wave i { width: 2px; height: 3px; background: var(--mint); border-radius: 1px; display: block; }
.demo-tile.live .wave i { animation: eq 0.9s ease-in-out infinite; }
.demo-tile .wave i:nth-child(2) { animation-delay: 0.15s; }
.demo-tile .wave i:nth-child(3) { animation-delay: 0.3s; }
.demo-tile .wave i:nth-child(4) { animation-delay: 0.45s; }
@keyframes eq { 0%, 100% { height: 3px; } 50% { height: 14px; } }

.demo-people { display: flex; flex-direction: column; gap: 6px; margin-top: auto; }
.demo-person { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ash); border: 1px solid var(--fog); border-radius: 10px; padding: 9px 12px; transition: all 0.3s ease; }
.demo-person .pdot { width: 8px; height: 8px; border-radius: 50%; background: var(--mist); flex: none; transition: all 0.3s ease; }
.demo-person .ptag { margin-left: auto; font-size: 11px; color: var(--slate); }
.demo-person.ringing { border-color: var(--tint); }
.demo-person.ringing .pdot { background: var(--violet); animation: pulse 0.8s infinite; }
.demo-person.ringing .ptag::after { content: 'ringing…'; color: var(--violet-text); }
.demo-person.connected .pdot { background: var(--mint); }
.demo-person.connected .ptag::after { content: 'connected · 00:03'; color: #0a7c50; }

.demo-ring { position: absolute; left: 16px; right: 16px; bottom: 16px; background: var(--violet-action); color: #fff; border-radius: 12px; padding: 11px 14px; display: flex; align-items: center; gap: 10px; transform: translateY(150%); opacity: 0; transition: transform 0.4s cubic-bezier(0.2,0.8,0.2,1), opacity 0.3s ease; box-shadow: 0 14px 34px rgba(63,87,224,0.4); z-index: 2; }
.demo-ring.show { transform: translateY(0); opacity: 1; }
.demo-ring .ring-ic { width: 26px; height: 26px; border-radius: 50%; background: rgba(255,255,255,0.18); display: inline-flex; align-items: center; justify-content: center; flex: none; }
.demo-ring.show .ring-ic { animation: shake 0.7s ease-in-out infinite; }
.demo-ring .ring-name { font-size: 13px; font-weight: 500; }
.demo-ring .ring-sub { font-size: 11px; opacity: 0.8; }
.demo-ring .ring-acts { margin-left: auto; display: flex; gap: 6px; }
.demo-ring .ring-acts span { width: 26px; height: 26px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 13px; }
.demo-ring .ring-acts .acc { background: var(--mint); color: #042a1a; }
.demo-ring .ring-acts .dec { background: rgba(255,255,255,0.22); }
@keyframes shake { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-12deg); } 75% { transform: rotate(12deg); } }

@media (max-width: 760px) { .demo { grid-template-columns: 1fr; } .demo-code-body { min-height: 220px; max-height: 280px; } }

/* ---------- Cards ---------- */
.card-grid { display: grid; gap: 20px; }
.cols-2 { grid-template-columns: repeat(2, 1fr); }
.cols-3 { grid-template-columns: repeat(3, 1fr); }
.cols-4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: var(--white); border: 1px solid var(--fog); border-radius: var(--r-card);
  padding: var(--s-24); display: flex; flex-direction: column; gap: var(--s-12);
  transition: border-color 0.15s ease;
}
.card.bordered { border-color: var(--mist); }
.card.linkable:hover { border-color: var(--violet); }
.card h3 { font-size: var(--t-subhead); margin: 0; font-weight: 600; }
.card p { color: var(--ash); margin: 0; }
.card .eyebrow { margin-bottom: 0; }
.card-foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: var(--s-12); padding-top: var(--s-8); }
.card-arrow { color: var(--violet-text); font-weight: 500; font-size: var(--t-body); }

/* dark "command surface" panel: engineering artefact imagery, not AI art */
.panel-dark {
  background: #0a0c10; color: #e6e9f2; border: 1px solid #1b2030; border-radius: var(--r-card);
  padding: var(--s-24); overflow: hidden;
}
.panel-dark .panel-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--s-16); }
.panel-dark .panel-head .t { font-size: var(--t-caption); letter-spacing: 0.08em; text-transform: uppercase; color: #8b93a7; }

/* ---------- Code ---------- */
code { font-family: var(--font-mono); font-size: 0.85em; }
:not(pre) > code { background: var(--fog); border: 1px solid #ececec; border-radius: 6px; padding: 1px 6px; color: #2b2f45; }
pre {
  font-family: var(--font-mono); font-size: 0.82rem; line-height: 1.65;
  background: #0a0c10; color: #d7dbe7; border: 1px solid #1b2030; border-radius: var(--r-card);
  padding: var(--s-20); overflow-x: auto; margin: 0;
  tab-size: 2;
}
pre .cm { color: #6b7488; } /* comment */
pre .k { color: #c792ea; }  /* keyword */
pre .s { color: #c3e88d; }  /* string */
pre .fn { color: #82aaff; } /* fn/method */
pre .n { color: #f78c6c; }  /* number/literal */
pre .p { color: #89ddff; }  /* punctuation/url */
.codeblock { position: relative; }
.codeblock .lang { position: absolute; top: 10px; right: 12px; font-family: var(--font-mono); font-size: 11px; color: #8b93a7; letter-spacing: 0.04em; }
.code-label { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--slate); margin: 0 0 8px; }

/* ---------- Tables ---------- */
.table-wrap { border: 1px solid var(--fog); border-radius: var(--r-card); overflow: hidden; }
table { width: 100%; border-collapse: collapse; font-size: var(--t-body); }
th, td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--fog); vertical-align: top; }
th { font-weight: 600; color: var(--black); background: var(--fog); font-size: var(--t-caption); letter-spacing: 0.04em; text-transform: uppercase; }
tr:last-child td { border-bottom: 0; }
td code { white-space: nowrap; }

/* ---------- Stripe divider ---------- */
.stripe { display: flex; height: 3px; width: 100%; }
.stripe span { flex: 1; }
.stripe span:nth-child(1) { background: var(--mint); }
.stripe span:nth-child(2) { background: var(--violet); }
.stripe span:nth-child(3) { background: var(--black); }

/* ---------- Tinted band ---------- */
.band-tint { background: var(--tint); }
.band-fog { background: var(--fog); }
.band-ink { background: var(--black); color: var(--white); }
.band-ink .section-title, .band-ink h1, .band-ink h2, .band-ink h3 { color: var(--white); }
.band-ink .muted, .band-ink p { color: #bcc2d4; }
.band-ink .eyebrow { color: var(--mint); }

/* ---------- Persona / feature lists ---------- */
.feature { display: flex; flex-direction: column; gap: 8px; }
.feature h3 { font-size: var(--t-subhead); margin: 0; }
.feature p { color: var(--ash); margin: 0; }
.icon-chip { width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--mist); display: inline-flex; align-items: center; justify-content: center; color: var(--violet); }

.lede { font-size: clamp(1.25rem, 2.2vw, 1.75rem); font-family: var(--font-display); font-weight: 300; line-height: 1.3; letter-spacing: -0.01em; color: var(--black); max-width: 26ch; }

/* ---------- Developer subnav ---------- */
.devnav {
  position: sticky; top: 86px; z-index: 40;
  display: flex; gap: 4px; flex-wrap: wrap;
  max-width: var(--max); margin: 24px auto 0; padding: 8px;
  background: var(--white); border: 1px solid var(--fog); border-radius: var(--r-pill);
  overflow-x: auto;
}
.devnav-link { font-size: var(--t-body); color: var(--ash); padding: 6px 14px; border-radius: var(--r-pill); white-space: nowrap; }
.devnav-link:hover { color: var(--black); }
.devnav-link.is-active { background: var(--violet-action); color: var(--white); }

/* doc page layout */
.doc { padding: 48px 0 var(--gap-section); }
.doc h2 { font-family: var(--font-display); font-weight: 300; font-size: clamp(1.75rem, 3vw, 2.25rem); letter-spacing: -0.02em; margin: 48px 0 16px; }
.doc h2:first-of-type { margin-top: 8px; }
.doc h3 { font-size: var(--t-subhead); margin: 32px 0 12px; }
.doc p, .doc li { color: var(--ash); }
.doc strong { color: var(--black); font-weight: 600; }
.doc ul, .doc ol { padding-left: 20px; }
.doc li { margin-bottom: 6px; }
.doc .codeblock { margin: 16px 0; }
.doc-narrow { max-width: 820px; }

/* ---------- Components explorer ---------- */
.comp-toolbar { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; margin: 28px 0 8px; }
.comp-search { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 260px; border: 1px solid var(--mist); border-radius: var(--r-pill); padding: 9px 16px; color: var(--slate); background: var(--white); }
.comp-search:focus-within { border-color: var(--violet); }
.comp-search input { border: 0; outline: 0; flex: 1; font: inherit; font-size: var(--t-body); color: var(--black); background: transparent; }
.comp-pills { display: flex; gap: 6px; flex-wrap: wrap; }
.comp-pill { font: inherit; font-size: var(--t-caption); color: var(--ash); background: var(--white); border: 1px solid var(--fog); border-radius: var(--r-pill); padding: 7px 13px; cursor: pointer; transition: all 0.15s ease; }
.comp-pill:hover { border-color: var(--mist); color: var(--black); }
.comp-pill.is-active { background: var(--violet-action); color: #fff; border-color: var(--violet-action); }
.comp-count { color: var(--slate); font-size: var(--t-caption); margin: 0 0 20px; }

.comp-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.comp-card { border: 1px solid var(--fog); border-radius: var(--r-card); padding: 20px; background: var(--white); cursor: pointer; transition: border-color 0.15s ease, box-shadow 0.15s ease; display: flex; flex-direction: column; gap: 10px; position: relative; }
.comp-card:hover { border-color: var(--mist); }
.comp-card.open { border-color: var(--violet); }
.comp-card:focus-visible { outline: 2px solid var(--violet); outline-offset: 2px; }
.comp-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.comp-card h3 { font-size: var(--t-body-lg); margin: 0; font-weight: 600; }
.comp-group { font-size: 10px; letter-spacing: 0.05em; text-transform: uppercase; color: var(--violet-text); border: 1px solid var(--tint); border-radius: var(--r-pill); padding: 3px 8px; white-space: nowrap; flex: none; }
.comp-what { color: var(--ash); font-size: var(--t-body); margin: 0; line-height: 1.55; }
.comp-apis { display: flex; flex-wrap: wrap; gap: 5px; }
.comp-apis code { font-family: var(--font-mono); font-size: 11px; background: var(--fog); border: 1px solid #ececec; border-radius: 6px; padding: 3px 7px; color: #2b2f45; white-space: nowrap; }
.comp-more { font-size: 11px; color: var(--slate); align-self: center; }
.comp-detail { display: none; flex-direction: column; gap: 10px; border-top: 1px solid var(--fog); padding-top: 12px; margin-top: 2px; }
.comp-card.open .comp-detail { display: flex; }
.comp-card.open .comp-more { display: none; }
.comp-sdk { font-size: var(--t-body); color: var(--ash); }
.comp-sdk code { font-family: var(--font-mono); font-size: 12px; background: #0a0c10; color: #d7dbe7; border-radius: 6px; padding: 3px 8px; }
.comp-lbl { font-size: 10px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--slate); margin-right: 4px; }
.comp-links { display: flex; gap: 16px; flex-wrap: wrap; }
.comp-links a { color: var(--violet-text); font-size: var(--t-body); font-weight: 500; }
.comp-links a:hover { text-decoration: underline; }
.comp-toggle { font-size: 11px; color: var(--slate); margin-top: auto; align-self: flex-start; }
.comp-card.open .comp-toggle { color: var(--violet-text); }
.comp-empty { color: var(--ash); margin-top: 24px; }
.linkish { background: none; border: 0; color: var(--violet-text); font: inherit; cursor: pointer; text-decoration: underline; padding: 0; }
@media (max-width: 920px) { .comp-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .comp-grid { grid-template-columns: 1fr; } .comp-toolbar { flex-direction: column; align-items: stretch; } }

/* AI-native callout box */
.ai-box {
  border: 1px solid var(--tint); background: #f6f7ff;
  border-radius: var(--r-card); padding: var(--s-24); margin: 24px 0;
}
.ai-box .eyebrow { color: var(--violet); }
.ai-box h4 { margin: 0 0 12px; font-size: var(--t-body-lg); }
.ai-box pre { background: #0a0c10; }

/* stat row */
.stat-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.stat { border-left: 2px solid var(--violet); padding-left: 16px; }
.stat .num { font-family: var(--font-display); font-weight: 300; font-size: clamp(2rem, 4vw, 3rem); line-height: 1; letter-spacing: -0.02em; }
.stat .lbl { color: var(--ash); font-size: var(--t-body); margin-top: 6px; }

/* CTA band */
.cta-band { text-align: center; }
.cta-band .display { margin-bottom: var(--s-16); }
.cta-band .hero-ctas { justify-content: center; }
.email-link { font-family: var(--font-mono); color: var(--violet-text); font-size: var(--t-body-lg); }

/* ---------- Deploy-anywhere / cloud ---------- */
.cloud-row { display: flex; flex-wrap: wrap; gap: 10px; }
.cloud-chip { display: inline-flex; align-items: center; gap: 9px; border: 1px solid var(--mist); border-radius: 12px; padding: 10px 16px; font-size: var(--t-body); color: var(--black); background: var(--white); }
.cloud-chip svg { color: var(--violet-text); flex: none; }
.cloud-chip.onprem svg { color: var(--ash); }
.cloud-chip .sub { color: var(--slate); font-size: var(--t-caption); }
.deploy-fan { display: grid; grid-template-columns: 1fr; gap: 10px; }
.deploy-pipe { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; font-family: var(--font-mono); font-size: var(--t-caption); color: var(--slate); }
.deploy-pipe .step { border: 1px solid var(--mist); border-radius: var(--r-pill); padding: 6px 13px; color: var(--black); background: var(--white); }
.deploy-pipe .arr { color: var(--violet); }

/* ---------- Embedded UCaaS app mockups ---------- */
.app-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; align-items: start; }
.appframe { border: 1px solid var(--line, var(--mist)); border-radius: 22px; overflow: hidden; background: var(--white); box-shadow: 0 1px 0 rgba(0,0,0,0.03); }
.appframe .app-bar { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; font-size: var(--t-caption); font-weight: 600; }
.appframe .app-body { padding: 0 16px 16px; display: flex; flex-direction: column; gap: 10px; }
.app-row { border: 1px solid var(--fog); border-radius: 12px; padding: 12px; display: flex; align-items: center; gap: 10px; font-size: var(--t-body); }
.app-thumb { width: 38px; height: 38px; border-radius: 9px; flex: none; }
.app-actions { display: flex; gap: 8px; margin-left: auto; }
.app-btn { width: 34px; height: 34px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; border: 0; flex: none; }
.app-btn.call { background: var(--mint); color: #042a1a; }
.app-btn.chat { background: var(--violet-action); color: #fff; }
.app-btn.lg { width: auto; height: auto; border-radius: var(--r-pill); padding: 9px 16px; gap: 7px; font-size: var(--t-body); font-weight: 500; }
.app-powered { font-size: 10px; color: var(--slate); letter-spacing: 0.04em; }
/* delivery (light), igaming (dark), dispatch (light-tech) variants */
.appframe.delivery .app-bar { background: #fff7ed; color: #b45309; }
.appframe.igaming { background: #0a0c14; border-color: #1b2030; }
.appframe.igaming .app-bar { background: #11131f; color: #e6e9f2; }
.appframe.igaming .app-row { border-color: #20243a; color: #cfd4e8; background: #11131f; }
.appframe.igaming .app-powered { color: #6b7488; }
.appframe.dispatch .app-bar { background: #eef4ff; color: var(--violet-text); }

/* ---------- Commercial / pricing ---------- */
.path-card { border: 1px solid var(--mist); border-radius: var(--r-card); padding: 28px; display: flex; flex-direction: column; gap: 14px; background: var(--white); }
.path-card.featured { border-color: var(--violet); box-shadow: 0 0 0 1px var(--violet); }
.path-card .path-tag { font-size: var(--t-caption); font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--violet-text); }
.path-card h3 { font-size: var(--t-subhead); margin: 0; }
.path-card .path-meter { font-family: var(--font-mono); font-size: var(--t-caption); color: var(--ash); }
.path-card ul { margin: 0; padding-left: 18px; }
.path-card li { color: var(--ash); margin-bottom: 6px; font-size: var(--t-body); }
.meter-strip { display: flex; flex-wrap: wrap; gap: 8px; }
.meter-chip { border: 1px solid var(--fog); border-radius: var(--r-pill); padding: 8px 14px; font-size: var(--t-body); color: var(--ash); background: var(--white); }
.meter-chip b { color: var(--black); font-weight: 600; }

@media (max-width: 920px) { .app-grid { grid-template-columns: 1fr; max-width: 420px; margin-inline: auto; } }
@media (max-width: 760px) { .deploy-pipe { font-size: 11px; } }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--fog); padding: var(--s-64) 0 var(--s-40); }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: var(--s-40); }
.footer-brand .footer-tagline { color: var(--ash); margin-top: var(--s-12); max-width: 30ch; }
.footer-col h4 { font-size: var(--t-caption); letter-spacing: 0.06em; text-transform: uppercase; color: var(--slate); margin: 0 0 var(--s-16); }
.footer-col a { display: block; color: var(--ash); padding: 4px 0; font-size: var(--t-body); }
.footer-col a:hover { color: var(--violet); }
.footer-base { display: flex; justify-content: space-between; gap: var(--s-16); margin-top: var(--s-48); padding-top: var(--s-24); border-top: 1px solid var(--fog); color: var(--slate); font-size: var(--t-caption); flex-wrap: wrap; }

/* ---------- Utilities ---------- */
.grid { display: grid; }
.flow > * + * { margin-top: var(--s-16); }
.center { text-align: center; }
.mt-0 { margin-top: 0; } .mb-0 { margin-bottom: 0; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 5vw, 64px); align-items: center; }
.hide-mobile { display: revert; }

/* ---------- Responsive ---------- */
@media (max-width: 920px) {
  .hero-grid { grid-template-columns: 1fr; }
  .cols-3, .cols-4 { grid-template-columns: repeat(2, 1fr); }
  .stat-row { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .split { grid-template-columns: 1fr; }
  .nav-links, .nav-cta { display: none; }
  .nav-toggle { display: inline-flex; }
  .site-nav.open { flex-wrap: wrap; }
  .site-nav.open .nav-links { display: flex; flex-direction: column; width: 100%; order: 3; gap: 2px; }
  .site-nav.open .nav-link { padding: 12px 14px; }   /* >=44px tap target */
  .site-nav.open .nav-cta { display: inline-flex; order: 4; margin: 6px 0 4px; }
  .devnav { top: 80px; }
}
@media (max-width: 560px) {
  .cols-2, .cols-3, .cols-4 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .stat-row { grid-template-columns: 1fr 1fr; }
  section { padding: 56px 0; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto; animation: none !important; transition: none !important; }
}
