/* Adwisely marketing site (Batch 133).
   Monochrome: white ground, near-black ink, one dark band per page.
   Motion: transform, opacity and clip-path only; strong ease-out; no
   scroll-triggered reveals; everything stops under reduced motion. */

@font-face { font-family: 'Geist'; src: url('fonts/geist.woff2') format('woff2'); font-weight: 100 900; font-display: swap; }
@font-face { font-family: 'Geist Mono'; src: url('fonts/geist-mono.woff2') format('woff2'); font-weight: 100 900; font-display: swap; }
@font-face { font-family: 'Instrument Serif'; src: url('fonts/instrument-serif.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Instrument Serif'; src: url('fonts/instrument-serif-italic.woff2') format('woff2'); font-weight: 400; font-style: italic; font-display: swap; }

:root {
  --paper: #ffffff;
  --paper-2: #f6f6f4;
  --paper-3: #eeeeeb;
  --ink: #0b0b0c;
  --ink-2: #3b3b3e;
  --muted: #6b6b70;
  --line: #e4e4e0;
  --line-2: #d3d3ce;
  --night: #0b0b0c;
  --night-2: #151517;
  --night-3: #1f1f22;
  --night-ink: #f3f3f0;
  --night-muted: #9a9aa0;
  --night-line: #2a2a2e;
  --ok: #1d7a4e;
  --warn: #9a5b00;

  --serif: 'Instrument Serif', 'Times New Roman', serif;
  --sans: 'Geist', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'Geist Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;

  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-enter: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);

  --gutter: clamp(16px, 4vw, 40px);
  --max: 1200px;
  --radius: 14px;
  --radius-s: 8px;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scrollbar-color: var(--line-2) var(--paper); }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 400 16px/1.6 var(--sans); font-feature-settings: 'ss01', 'cv11';
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
::selection { background: var(--ink); color: var(--paper); }
.band-dark ::selection { background: var(--night-ink); color: var(--night); }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 4px; }
.band-dark :focus-visible { outline-color: var(--night-ink); }
img, svg { display: block; max-width: 100%; }
[hidden] { display: none !important; }
a { color: inherit; }
h1, h2, h3, h4 { margin: 0; font-weight: 400; }
p { margin: 0; }
.num, table, .tab { font-variant-numeric: tabular-nums; }
.skip { position: absolute; left: -9999px; top: 8px; background: var(--ink); color: var(--paper); padding: 8px 12px; border-radius: 6px; z-index: 100; }
.skip:focus { left: 8px; }

.wrap { width: 100%; max-width: calc(var(--max) + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter); }

/* ---------- Type ---------- */
.display {
  font-family: var(--serif); font-weight: 400; letter-spacing: -0.02em; line-height: 0.98;
  font-size: clamp(44px, 7.4vw, 96px); text-wrap: balance;
}
.display em, .h2 em { font-style: italic; }
.h2 { font-family: var(--serif); font-size: clamp(34px, 4.6vw, 60px); line-height: 1.02; letter-spacing: -0.015em; text-wrap: balance; }
.h3 { font: 500 19px/1.35 var(--sans); letter-spacing: -0.01em; }
.lead { font-size: clamp(17px, 1.5vw, 20px); line-height: 1.55; color: var(--ink-2); max-width: 60ch; text-wrap: pretty; }
.band-dark .lead { color: var(--night-muted); }
.body { color: var(--ink-2); max-width: 62ch; text-wrap: pretty; }
.band-dark .body { color: var(--night-muted); }
.small { font-size: 14px; color: var(--muted); }
.band-dark .small { color: var(--night-muted); }
.mono { font-family: var(--mono); font-size: 13px; letter-spacing: -0.01em; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--paper) 86%, transparent);
  backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid transparent; transition: border-color 200ms var(--ease-out);
}
.site-header.scrolled { border-bottom-color: var(--line); }
.nav { display: flex; align-items: center; gap: 28px; height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font: 600 17px/1 var(--sans); letter-spacing: -0.02em; }
.brand-mark { width: 22px; height: 22px; }
.nav-links { display: flex; gap: 4px; margin-left: 8px; }
.nav-links a {
  position: relative; text-decoration: none; font-size: 14.5px; color: var(--ink-2);
  padding: 8px 10px; border-radius: 8px; transition: color 160ms var(--ease-out), background-color 160ms var(--ease-out);
}
.nav-links a[aria-current='page'] { color: var(--ink); }
.nav-links a[aria-current='page']::after { content: ''; position: absolute; left: 10px; right: 10px; bottom: 2px; height: 1px; background: var(--ink); }
.nav-cta { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.menu-btn { display: none; margin-left: auto; background: none; border: 1px solid var(--line); border-radius: 10px; width: 42px; height: 38px; cursor: pointer; }
.menu-btn span { display: block; width: 16px; height: 1.5px; background: var(--ink); margin: 4px auto; transition: transform 240ms var(--ease-out); }
.menu-btn[aria-expanded='true'] span:first-child { transform: translateY(2.75px) rotate(45deg); }
.menu-btn[aria-expanded='true'] span:last-child { transform: translateY(-2.75px) rotate(-45deg); }
.mobile-nav { display: none; }

@media (max-width: 920px) {
  .nav-links, .nav-cta { display: none; }
  .menu-btn { display: block; }
  .mobile-nav {
    display: block; position: fixed; inset: 64px 0 auto 0; background: var(--paper); border-bottom: 1px solid var(--line);
    padding: 8px var(--gutter) 20px; transform-origin: top; clip-path: inset(0 0 100% 0);
    transition: clip-path 320ms var(--ease-out); pointer-events: none;
  }
  .mobile-nav.open { clip-path: inset(0 0 0 0); pointer-events: auto; }
  .mobile-nav a { display: block; padding: 14px 0; border-bottom: 1px solid var(--line); text-decoration: none; font-size: 17px; }
  .mobile-nav .btn { margin-top: 16px; width: 100%; justify-content: center; }
}

/* ---------- Buttons and links ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 18px; border-radius: 999px;
  font: 500 15px/1 var(--sans); letter-spacing: -0.01em; text-decoration: none; cursor: pointer; white-space: nowrap;
  border: 1px solid var(--ink); background: var(--ink); color: var(--paper);
  transition: transform 160ms var(--ease-out), background-color 160ms var(--ease-out), color 160ms var(--ease-out), border-color 160ms var(--ease-out);
}
.btn-s { height: 36px; padding: 0 14px; font-size: 14px; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line-2); }
.btn .arrow { transition: transform 200ms var(--ease-out); }
.btn:active { transform: scale(0.985); }
.band-dark .btn { background: var(--night-ink); color: var(--night); border-color: var(--night-ink); }
.band-dark .btn-ghost { background: transparent; color: var(--night-ink); border-color: #3a3a3f; }
.link { text-decoration: none; background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat; transition: background-size 280ms var(--ease-out); padding-bottom: 1px; }
.link-u { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; text-decoration-color: var(--line-2); }

@media (hover: hover) and (pointer: fine) {
  .nav-links a:hover { color: var(--ink); background: var(--paper-2); }
  .btn:hover { transform: translateY(-1px); }
  .btn:hover .arrow { transform: translateX(3px); }
  .btn:active { transform: translateY(0) scale(0.985); }
  .btn-ghost:hover { border-color: var(--ink); }
  .band-dark .btn-ghost:hover { border-color: var(--night-ink); }
  .link:hover { background-size: 100% 1px; }
  .link-u:hover { text-decoration-color: currentColor; }
  .card-hover:hover { transform: translateY(-2px); border-color: var(--line-2); }
}

/* ---------- Sections ---------- */
.section { padding: clamp(72px, 10vw, 128px) 0; }
.section-tight { padding: clamp(56px, 7vw, 88px) 0; }
.section + .section:not(.band-dark):not(.band-soft) { border-top: 1px solid var(--line); }
.band-dark { background: var(--night); color: var(--night-ink); }
.band-soft { background: var(--paper-2); }
.section-head { display: grid; gap: 18px; max-width: 760px; margin-bottom: clamp(36px, 5vw, 56px); }
.split { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 6vw, 88px); align-items: start; }
.split-even { grid-template-columns: 1fr 1fr; }
@media (max-width: 920px) { .split, .split-even { grid-template-columns: 1fr; } }
.stack { display: grid; gap: 16px; }
.row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }

/* ---------- Hero ---------- */
.hero { padding: clamp(56px, 9vw, 112px) 0 clamp(64px, 8vw, 104px); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 6fr); gap: clamp(32px, 5vw, 72px); align-items: center; }
.hero-copy { display: grid; gap: 28px; }
.hero .display { font-size: clamp(44px, 5.6vw, 80px); }
.hero-fact { display: flex; gap: 20px; flex-wrap: wrap; font-size: 14px; color: var(--muted); }
.hero-fact b { color: var(--ink); font-weight: 500; }
.page-hero { padding: clamp(56px, 8vw, 104px) 0 clamp(48px, 6vw, 80px); }
.page-hero .display { font-size: clamp(42px, 6.4vw, 84px); max-width: 15ch; }
.page-hero .hero-copy { max-width: 820px; }
@media (max-width: 1020px) { .hero-grid { grid-template-columns: 1fr; } }

/* Entrance: headline lines rise from masks, the rest fades up. */
.rise { display: block; overflow: hidden; padding-bottom: 0.08em; margin-bottom: -0.08em; }
.rise > span { display: inline-block; transform: translateY(105%); }
.fade-up { opacity: 0; transform: translateY(12px); }
.ready .rise > span { transform: none; transition: transform 760ms var(--ease-enter); }
.ready .rise:nth-child(2) > span { transition-delay: 70ms; }
.ready .rise:nth-child(3) > span { transition-delay: 140ms; }
.ready .fade-up { opacity: 1; transform: none; transition: opacity 600ms var(--ease-enter), transform 600ms var(--ease-enter); transition-delay: 260ms; }
.ready .fade-up.d2 { transition-delay: 340ms; }
.ready .fade-up.d3 { transition-delay: 420ms; }
.ready .fade-up.d4 { transition-delay: 520ms; }
.no-js .rise > span, .no-js .fade-up { transform: none; opacity: 1; }

/* ---------- App frame (live product UI, never a picture) ---------- */
.frame {
  position: relative; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper);
  box-shadow: 0 1px 0 rgba(0,0,0,0.02), 0 24px 60px -28px rgba(11, 11, 12, 0.22), 0 2px 8px -4px rgba(11, 11, 12, 0.06);
  overflow: hidden; font-size: 14px;
}
.frame-bar { display: flex; align-items: center; gap: 10px; height: 40px; padding: 0 14px; border-bottom: 1px solid var(--line); background: var(--paper-2); }
.dots { display: flex; gap: 6px; }
.dots i { width: 9px; height: 9px; border-radius: 50%; background: var(--line-2); }
.frame-title { font-size: 12.5px; color: var(--muted); margin-left: 6px; }
.frame-body { padding: 20px; min-height: 360px; }
.band-dark .frame { background: var(--night-2); border-color: var(--night-line); box-shadow: 0 30px 80px -30px rgba(0,0,0,0.8); }
.band-dark .frame-bar { background: var(--night-3); border-color: var(--night-line); }
.band-dark .dots i { background: #3a3a3f; }

.ask-box { display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; background: var(--paper); }
.ask-box .q { flex: 1; min-height: 1.6em; color: var(--ink); }
.caret { display: inline-block; width: 1.5px; height: 1.05em; background: var(--ink); vertical-align: -0.15em; margin-left: 1px; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.who { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.avatar { width: 22px; height: 22px; border-radius: 50%; background: var(--ink); color: var(--paper); display: grid; place-items: center; font-size: 10.5px; font-weight: 600; }
.steps { display: grid; gap: 8px; margin: 16px 2px; }
.step { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--muted); opacity: 0; transform: translateY(6px); transition: opacity 300ms var(--ease-out), transform 300ms var(--ease-out); }
.step.on { opacity: 1; transform: none; }
.step .tick { width: 14px; height: 14px; border-radius: 50%; border: 1.5px solid var(--line-2); position: relative; flex: none; }
.step.done .tick { border-color: var(--ink); background: var(--ink); }
.step.done .tick::after { content: ''; position: absolute; left: 3.5px; top: 1.5px; width: 3px; height: 6px; border: solid var(--paper); border-width: 0 1.5px 1.5px 0; transform: rotate(45deg); }
.step:not(.done).on .tick { animation: spin 900ms linear infinite; border-top-color: var(--ink); }
@keyframes spin { to { transform: rotate(360deg); } }
.answer { border-top: 1px solid var(--line); padding-top: 16px; min-height: 120px; line-height: 1.65; color: var(--ink); }
.answer .w { opacity: 0; transition: opacity 260ms var(--ease-out); }
.answer .w.on { opacity: 1; }
.cite {
  display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; margin: 0 1px; border-radius: 5px;
  background: var(--ink); color: var(--paper); font: 600 10.5px/1 var(--sans); vertical-align: 0.15em;
  transform: scale(0.6); opacity: 0; transition: transform 320ms var(--ease-out), opacity 200ms var(--ease-out);
}
.cite.on { transform: none; opacity: 1; }
.sources { display: grid; gap: 8px; margin-top: 16px; }
.src {
  display: grid; grid-template-columns: 22px 1fr auto; gap: 10px; align-items: center; padding: 9px 12px;
  border: 1px solid var(--line); border-radius: 10px; font-size: 13px; background: var(--paper);
  opacity: 0; transform: translateY(8px); transition: opacity 360ms var(--ease-out), transform 360ms var(--ease-out);
}
.src.on { opacity: 1; transform: none; }
.src .n { width: 20px; height: 20px; border-radius: 6px; display: grid; place-items: center; background: var(--paper-3); font-weight: 600; font-size: 11px; }
.src .meta { color: var(--muted); font-size: 12px; }
.src.withheld { border-style: dashed; color: var(--muted); background: transparent; }
.src.withheld .n { background: transparent; border: 1px dashed var(--line-2); }

/* ---------- Interactive demo ---------- */
.demo { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: clamp(24px, 4vw, 56px); align-items: start; }
@media (max-width: 920px) { .demo { grid-template-columns: 1fr; } }
.qlist { display: grid; gap: 8px; }
.qbtn {
  text-align: left; font: inherit; font-size: 15px; color: var(--night-ink); background: transparent; cursor: pointer;
  border: 1px solid var(--night-line); border-radius: 12px; padding: 14px 16px; position: relative; overflow: hidden;
  transition: border-color 200ms var(--ease-out), background-color 200ms var(--ease-out), transform 160ms var(--ease-out);
}
.qbtn[aria-pressed='true'] { border-color: var(--night-ink); background: var(--night-2); }
.qbtn:active { transform: scale(0.985); }
.qbtn .small { display: block; margin-top: 4px; font-size: 12.5px; }
.persona { display: inline-flex; padding: 4px; border: 1px solid var(--night-line); border-radius: 999px; gap: 4px; position: relative; }
.persona button {
  position: relative; z-index: 1; font: 500 13.5px/1 var(--sans); color: var(--night-muted); background: none; border: 0; cursor: pointer;
  height: 34px; padding: 0 14px; border-radius: 999px; transition: color 240ms var(--ease-out);
}
.persona button[aria-pressed='true'] { color: var(--night); }
.persona .pill { position: absolute; z-index: 0; top: 4px; left: 4px; height: 34px; border-radius: 999px; background: var(--night-ink); transition: transform 360ms var(--ease-out), width 360ms var(--ease-out); }
.band-dark .ask-box { background: var(--night-3); border-color: var(--night-line); }
.band-dark .ask-box .q, .band-dark .answer { color: var(--night-ink); }
.band-dark .caret { background: var(--night-ink); }
.band-dark .answer { border-color: var(--night-line); }
.band-dark .src { background: var(--night-3); border-color: var(--night-line); }
.band-dark .src .n { background: #2c2c30; }
.band-dark .src.withheld { background: transparent; }
.band-dark .cite { background: var(--night-ink); color: var(--night); }
.band-dark .step.done .tick { border-color: var(--night-ink); background: var(--night-ink); }
.band-dark .step.done .tick::after { border-color: var(--night); }
.band-dark .step:not(.done).on .tick { border-top-color: var(--night-ink); border-color: #3a3a3f; border-top-color: var(--night-ink); }
.band-dark .avatar { background: var(--night-ink); color: var(--night); }
.note-line { display: flex; gap: 10px; align-items: baseline; margin-top: 18px; font-size: 13px; color: var(--night-muted); }
@media (hover: hover) and (pointer: fine) { .qbtn:hover { border-color: #4a4a50; } .persona button:hover { color: var(--night-ink); } .persona button[aria-pressed='true']:hover { color: var(--night); } }

/* ---------- Feature list (not a card grid) ---------- */
.features { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 1px solid var(--line); }
.feature { padding: 28px 28px 32px 0; border-bottom: 1px solid var(--line); display: grid; gap: 10px; align-content: start; }
.feature:nth-child(even) { padding-left: 28px; padding-right: 0; border-left: 1px solid var(--line); }
.feature p { color: var(--ink-2); font-size: 15.5px; max-width: 52ch; }
.band-dark .features, .band-dark .feature { border-color: var(--night-line); }
.band-dark .feature p { color: var(--night-muted); }
@media (max-width: 720px) { .features { grid-template-columns: 1fr; } .feature, .feature:nth-child(even) { padding: 24px 0; border-left: 0; } }

/* Product chapters: text beside a live panel */
.chapter { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 5vw, 72px); align-items: center; }
.chapter + .chapter { margin-top: clamp(72px, 9vw, 120px); }
.chapter.flip > :first-child { order: 2; }
@media (max-width: 920px) { .chapter { grid-template-columns: 1fr; } .chapter.flip > :first-child { order: 0; } }
.bullets { list-style: none; padding: 0; margin: 4px 0 0; display: grid; gap: 10px; }
.bullets li { position: relative; padding-left: 20px; color: var(--ink-2); font-size: 15.5px; }
.bullets li::before { content: ''; position: absolute; left: 2px; top: 0.72em; width: 8px; height: 1px; background: var(--ink); }
.band-dark .bullets li { color: var(--night-muted); }
.band-dark .bullets li::before { background: var(--night-ink); }

.panel { border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); padding: 20px; transition: transform 240ms var(--ease-out), border-color 240ms var(--ease-out); }
.panel-soft { background: var(--paper-2); }

/* Mini UI pieces used inside panels */
.ui-row { display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.ui-row:last-child { border-bottom: 0; }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 9px; border-radius: 999px; border: 1px solid var(--line); font-size: 12px; color: var(--ink-2); background: var(--paper); white-space: nowrap; }
.chip-dark { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.dot { width: 6px; height: 6px; border-radius: 50%; background: var(--ink); }
.dot-ok { background: var(--ok); }
.pulse { animation: pulse 2.6s var(--ease-out) infinite; }
@keyframes pulse { 0% { transform: scale(1); opacity: 1; } 60% { transform: scale(2.4); opacity: 0; } 100% { transform: scale(2.4); opacity: 0; } }
.pulse-wrap { position: relative; display: inline-grid; place-items: center; width: 6px; height: 6px; }
.pulse-wrap .dot { position: absolute; }
.bar { height: 6px; border-radius: 999px; background: var(--paper-3); overflow: hidden; }
.bar > i { display: block; height: 100%; background: var(--ink); border-radius: inherit; transform-origin: left; }

/* Rotating ticker of items (agents, signals) */
.ticker { position: relative; height: 196px; overflow: hidden; mask-image: linear-gradient(transparent, #000 18%, #000 82%, transparent); }
.ticker ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; animation: tick 16s var(--ease-in-out) infinite; }
@keyframes tick { 0%, 20% { transform: translateY(0); } 25%, 45% { transform: translateY(-58px); } 50%, 70% { transform: translateY(-116px); } 75%, 95% { transform: translateY(-174px); } 100% { transform: translateY(-232px); } }
.ticker li { height: 48px; display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; padding: 0 14px; border: 1px solid var(--line); border-radius: 10px; font-size: 14px; background: var(--paper); }

/* ---------- Connector marquee ---------- */
.marquee { position: relative; overflow: hidden; mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); }
.marquee + .marquee { margin-top: 12px; }
.marquee-track { display: flex; gap: 12px; width: max-content; animation: marquee 60s linear infinite; }
.marquee.rev .marquee-track { animation-direction: reverse; animation-duration: 72s; }
.marquee:hover .marquee-track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-50%); } }
.logo-chip { display: inline-flex; align-items: center; gap: 10px; height: 52px; padding: 0 20px; border: 1px solid var(--line); border-radius: 12px; font-size: 15px; font-weight: 500; letter-spacing: -0.01em; background: var(--paper); white-space: nowrap; }
.logo-chip .glyph { width: 22px; height: 22px; border-radius: 6px; background: var(--ink); color: var(--paper); display: grid; place-items: center; font-size: 11px; font-weight: 600; }

/* ---------- Integrations directory ---------- */
.filter { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin-bottom: 28px; }
.input {
  font: inherit; font-size: 15px; height: 44px; padding: 0 14px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--paper); color: var(--ink);
  transition: border-color 160ms var(--ease-out), box-shadow 160ms var(--ease-out); width: 100%;
}
.input:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(11, 11, 12, 0.08); }
textarea.input { height: auto; min-height: 120px; padding: 12px 14px; resize: vertical; line-height: 1.5; }
select.input { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--ink) 50%), linear-gradient(135deg, var(--ink) 50%, transparent 50%); background-position: calc(100% - 18px) 19px, calc(100% - 13px) 19px; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 36px; }
.seg { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.seg button { font: 500 13.5px/1 var(--sans); height: 34px; padding: 0 13px; border-radius: 999px; border: 1px solid var(--line); background: var(--paper); color: var(--ink-2); cursor: pointer; transition: background-color 160ms var(--ease-out), color 160ms var(--ease-out), border-color 160ms var(--ease-out); }
.seg button[aria-pressed='true'] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.dir { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.conn { border: 1px solid var(--line); border-radius: 12px; padding: 16px; display: grid; gap: 8px; align-content: start; background: var(--paper); transition: transform 220ms var(--ease-out), border-color 220ms var(--ease-out), opacity 220ms var(--ease-out); }
.conn[hidden] { display: none; }
.conn .top { display: flex; align-items: center; gap: 10px; }
.conn .glyph { width: 28px; height: 28px; border-radius: 8px; background: var(--ink); color: var(--paper); display: grid; place-items: center; font-size: 12px; font-weight: 600; flex: none; }
.conn b { font-weight: 500; }
.conn p { font-size: 13.5px; color: var(--muted); line-height: 1.5; }
.empty { padding: 32px 0; color: var(--muted); }

/* ---------- Diagrams ---------- */
.path { position: relative; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0; margin-top: 8px; }
.path::before { content: ''; position: absolute; left: 10%; right: 10%; top: 27px; height: 1px; background: var(--night-line); }
.packet-lane { position: absolute; left: 10%; width: 80%; top: 23px; height: 9px; overflow: visible; }
.packet-run { position: absolute; inset: 0; transform: translateX(-100%); animation: packet 7s var(--ease-in-out) infinite; }
.packet { position: absolute; right: -4.5px; top: 0; width: 9px; height: 9px; border-radius: 50%; background: var(--night-ink); box-shadow: 0 0 0 6px rgba(243, 243, 240, 0.08); }
@keyframes packet { 0% { transform: translateX(-100%); opacity: 0; } 4% { opacity: 1; } 18%, 22% { transform: translateX(-75%); } 38%, 42% { transform: translateX(-50%); } 58%, 62% { transform: translateX(-25%); } 78%, 92% { transform: translateX(0); opacity: 1; } 100% { transform: translateX(0); opacity: 0; } }
.stage { position: relative; text-align: center; display: grid; gap: 10px; justify-items: center; padding: 0 8px; }
.stage .node { width: 56px; height: 56px; border-radius: 14px; border: 1px solid var(--night-line); background: var(--night-2); display: grid; place-items: center; position: relative; z-index: 1; }
.stage .node svg { width: 22px; height: 22px; stroke: var(--night-ink); fill: none; stroke-width: 1.5; }
.stage b { font-weight: 500; font-size: 14.5px; }
.stage span { font-size: 13px; color: var(--night-muted); line-height: 1.45; max-width: 22ch; }
.stage .node::after { content: ''; position: absolute; inset: -1px; border-radius: inherit; border: 1px solid var(--night-ink); opacity: 0; animation: stage-on 7s var(--ease-out) infinite; }
.stage:nth-child(3) .node::after { animation-delay: 1.4s; } .stage:nth-child(4) .node::after { animation-delay: 2.8s; } .stage:nth-child(5) .node::after { animation-delay: 4.2s; } .stage:nth-child(6) .node::after { animation-delay: 5.6s; }
@keyframes stage-on { 0% { opacity: 0; } 3% { opacity: 1; } 16% { opacity: 0; } 100% { opacity: 0; } }
@media (max-width: 820px) {
  .path { grid-template-columns: 1fr; gap: 22px; }
  .path::before { left: 27px; right: auto; top: 28px; bottom: 28px; width: 1px; height: auto; }
  .packet-lane { display: none; }
  .stage { grid-template-columns: 56px 1fr; text-align: left; justify-items: start; align-items: center; column-gap: 16px; }
  .stage .node { grid-row: span 2; }
  .stage span { max-width: none; }
}

.graph svg { width: 100%; height: auto; overflow: visible; }
.graph .edge { stroke: var(--line-2); stroke-width: 1.2; fill: none; }
.graph .flow { stroke: var(--ink); stroke-width: 1.4; fill: none; stroke-dasharray: 3 9; animation: flow 2.8s linear infinite; }
@keyframes flow { to { stroke-dashoffset: -48; } }
.graph .gnode rect { fill: var(--paper); stroke: var(--line-2); }
.graph .gnode.hub rect { fill: var(--ink); stroke: var(--ink); }
.graph .gnode text { font: 500 12px var(--sans); fill: var(--ink); }
.graph .gnode.hub text { fill: var(--paper); }
.graph .gnode .kind { font: 400 10.5px var(--sans); fill: var(--muted); }
.graph .gnode { transform-box: fill-box; transform-origin: center; animation: breathe 4s var(--ease-in-out) infinite; }
.graph .gnode:nth-of-type(2n) { animation-delay: -1.3s; } .graph .gnode:nth-of-type(3n) { animation-delay: -2.6s; }
.graph .flow:nth-of-type(2n) { animation-direction: reverse; }
@keyframes breathe { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-3px); } }

/* ---------- Facts row (real numbers only) ---------- */
.facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--line); }
.fact { padding: 24px 20px 0 0; display: grid; gap: 6px; }
.fact + .fact { padding-left: 20px; border-left: 1px solid var(--line); }
.fact .big { font-family: var(--serif); font-size: clamp(38px, 4.4vw, 56px); line-height: 1; letter-spacing: -0.02em; }
.fact .small { max-width: 26ch; }
.band-dark .facts, .band-dark .fact + .fact { border-color: var(--night-line); }
@media (max-width: 820px) { .facts { grid-template-columns: 1fr 1fr; } .fact:nth-child(3) { padding-left: 0; border-left: 0; } .fact { padding-bottom: 20px; } }

/* ---------- Pricing ---------- */
.plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 980px) { .plans { grid-template-columns: 1fr; } }
.plan { border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; display: grid; gap: 22px; align-content: start; background: var(--paper); transition: transform 240ms var(--ease-out), border-color 240ms var(--ease-out); }
.plan.dark { background: var(--night); color: var(--night-ink); border-color: var(--night); }
.plan .h2 { font-size: 40px; }
.plan .who-for { color: var(--ink-2); font-size: 15px; min-height: 3.2em; }
.plan.dark .who-for, .plan.dark .small { color: var(--night-muted); }
.plan dl { margin: 0; display: grid; grid-template-columns: 1fr auto; border-top: 1px solid var(--line); }
.plan.dark dl, .plan.dark dl > * { border-color: var(--night-line); }
.plan dt, .plan dd { margin: 0; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.plan dt { color: var(--muted); }
.plan.dark dt { color: var(--night-muted); }
.plan dd { text-align: right; font-weight: 500; font-variant-numeric: tabular-nums; }
.plan ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 9px; font-size: 14.5px; }
.plan li { display: grid; grid-template-columns: 16px 1fr; gap: 10px; }
.plan li svg { width: 14px; height: 14px; margin-top: 4px; stroke: currentColor; fill: none; stroke-width: 2; }
.plan .btn { justify-content: center; }
.plan.dark .btn { background: var(--night-ink); color: var(--night); border-color: var(--night-ink); }
.selfhost { margin-top: 16px; display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: center; border: 1px dashed var(--line-2); border-radius: var(--radius); padding: 24px 28px; }
@media (max-width: 720px) { .selfhost { grid-template-columns: 1fr; } }

.compare { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.compare th, .compare td { padding: 14px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.compare thead th { font-weight: 500; position: sticky; top: 64px; background: var(--paper); }
.compare td:not(:first-child), .compare th:not(:first-child) { text-align: center; width: 18%; }
.compare tbody th { font-weight: 400; color: var(--ink-2); }
.compare .grp th { font-weight: 500; color: var(--ink); padding-top: 28px; }
.yes { display: inline-block; width: 14px; height: 14px; }
.yes svg { width: 14px; height: 14px; stroke: var(--ink); fill: none; stroke-width: 2.2; }
.no { color: var(--line-2); }
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table-scroll .compare { min-width: 640px; }

/* FAQ: always open */
.faq { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 clamp(32px, 5vw, 64px); border-top: 1px solid var(--line); }
.faq > div { padding: 24px 0; border-bottom: 1px solid var(--line); display: grid; gap: 8px; }
.faq h3 { font: 500 17px/1.4 var(--sans); letter-spacing: -0.01em; }
.faq p { color: var(--ink-2); font-size: 15.5px; }
@media (max-width: 820px) { .faq { grid-template-columns: 1fr; } }

/* ---------- Industries ---------- */
.ind-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 28px; }
.ind { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 5vw, 64px); align-items: start; }
.ind[hidden] { display: none; }
@media (max-width: 920px) { .ind { grid-template-columns: 1fr; } }
.swap-in { animation: swap 420ms var(--ease-out) both; }
@keyframes swap { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---------- Forms ---------- */
.form { display: grid; gap: 18px; }
.form .two { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: start; }
@media (max-width: 620px) { .form .two { grid-template-columns: 1fr; } }
.field { display: grid; gap: 7px; }
.field label { font-size: 14px; font-weight: 500; }
.field .hint { font-size: 12.5px; color: var(--muted); }
.field .err { font-size: 13px; color: #a3261b; min-height: 0; }
.field.invalid .input { border-color: #a3261b; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.check { display: grid; grid-template-columns: 18px 1fr; gap: 10px; font-size: 14px; color: var(--ink-2); align-items: start; }
.check input { width: 16px; height: 16px; margin: 3px 0 0; accent-color: var(--ink); }
.form-done { display: none; border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; gap: 10px; }
.form-done.on { display: grid; animation: swap 420ms var(--ease-out) both; }
.form-error { color: #a3261b; font-size: 14px; }

/* ---------- Article / legal ---------- */
.prose { max-width: 70ch; display: grid; gap: 16px; color: var(--ink-2); }
.prose h2 { font: 500 22px/1.3 var(--sans); color: var(--ink); letter-spacing: -0.015em; margin-top: 24px; }
.prose ul { margin: 0; padding-left: 20px; display: grid; gap: 6px; }
.toc { position: sticky; top: 96px; display: grid; gap: 8px; font-size: 14px; }
.toc a { text-decoration: none; color: var(--muted); }
.toc a:hover { color: var(--ink); }

/* ---------- CTA band ---------- */
.cta { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 32px; align-items: end; }
@media (max-width: 820px) { .cta { grid-template-columns: 1fr; } }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 56px 0 40px; font-size: 14px; }
.foot { display: grid; grid-template-columns: minmax(0, 2fr) repeat(4, minmax(0, 1fr)); gap: 32px; }
.foot h4 { font: 500 13px/1 var(--sans); color: var(--muted); margin-bottom: 14px; }
.foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.foot a { text-decoration: none; color: var(--ink-2); }
.foot a:hover { color: var(--ink); }
.foot-base { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }
.status-dot { display: inline-flex; align-items: center; gap: 8px; }
@media (max-width: 820px) { .foot { grid-template-columns: 1fr 1fr; } .foot > :first-child { grid-column: 1 / -1; } }

/* ---------- Helpers ---------- */
.mt-s { margin-top: 12px; } .mt-m { margin-top: 24px; } .mt-l { margin-top: 48px; }
.center { text-align: center; }
.hide-s { } @media (max-width: 620px) { .hide-s { display: none !important; } }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Reduced motion: still, complete, readable ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; transition-delay: 0ms !important; }
  .rise > span, .fade-up { transform: none !important; opacity: 1 !important; }
  .marquee-track, .ticker ul, .packet-run, .graph .flow, .graph .gnode, .pulse, .stage .node::after { animation: none !important; }
  .caret { display: none; }
}

/* Signal bars breathe between two lengths, so the panel is never still. */
.bar > i.grow { animation: grow 3.6s var(--ease-in-out) infinite alternate; }
.bar > i.g1 { width: 84%; } .bar > i.g2 { width: 52%; animation-delay: -1.2s; } .bar > i.g3 { width: 24%; animation-delay: -2.4s; }
@keyframes grow { from { transform: scaleX(0.72); } to { transform: scaleX(1); } }
.ui-row + .bar { margin: -4px 0 4px; }

/* Code */
pre.mono { margin: 0; white-space: pre; overflow-x: auto; font-size: 12.5px; line-height: 1.6; color: var(--ink-2); }
@media (prefers-reduced-motion: reduce) { .bar > i.grow { animation: none !important; } }

/* The hero frame keeps one height while answers stream, so nothing beside it moves. */
[data-hero-answer] .frame-body, .demo .frame-body { min-height: 560px; }
@media (max-width: 620px) { [data-hero-answer] .frame-body, .demo .frame-body { min-height: 640px; } }
