/* Supersei marketing site — shared page layout, chrome (nav, CTA band, footer,
   conversion modal, sticky mobile CTA), pricing/FAQ/compare blocks and reveals.
   Built on css/tokens.css + css/ds-components.css. Loaded by every page. */
html { scroll-padding-top: var(--nav-height); }
body { font-size: 17px; line-height: 28px; overflow-x: hidden; }
img { max-width: 100%; }
a { color: inherit; }
.wrap { max-width: var(--container); margin: 0 auto; padding-inline: var(--space-7); }
.sec { padding-block: var(--space-10); }
.sec--sunk { background: var(--surface-sunk); }
.sec__head { margin-bottom: var(--space-7); }
.sec__foot { margin-top: var(--space-6); display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.tnum { font-variant-numeric: tabular-nums; }
.skip { position: absolute; inset-inline-start: 16px; top: -60px; z-index: var(--z-toast); padding: 10px 16px; border-radius: var(--radius-sm); background: var(--surface-raised); color: var(--text-primary); box-shadow: var(--shadow-float); }
.skip:focus { top: 12px; }
@media (max-width: 760px) {
  .wrap { padding-inline: var(--space-4); }
  .sec { padding-block: var(--space-9); }
  .sec__head { margin-bottom: var(--space-6); }
}

/* Slate tier of the logo mark: navy on day grounds, light slate on night and on the band
   (same pair as assets/supersei-primary.svg and supersei-primary-dark.svg). */
:root { --mark-slate: #0F172A; }
html[data-theme="dark"] { --mark-slate: #94A3B8; }

/* Nav additions: real nav menu links + the shared theme toggle */
.ss-nav__logo { flex-shrink: 0; }
.ss-nav__links { justify-content: center; }
.ss-nav__drawer[hidden] { display: none; }
.ss-nav__link[aria-current="page"] { color: var(--text-primary); background: var(--surface-sunk); }
#ss-theme-toggle { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; padding: 0; border-radius: var(--radius-pill); border: 1px solid var(--line); background: transparent; color: var(--text-secondary); cursor: pointer; transition: color var(--dur-fast), border-color var(--dur-fast); }
#ss-theme-toggle:hover { color: var(--text-primary); border-color: var(--line-strong); }
html[data-theme="dark"] #ss-theme-toggle { border-color: var(--line); color: var(--text-secondary); }
#ss-theme-toggle svg { width: 17px; height: 17px; }

/* ---------- Stats ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-6); }
.stats .metric { font-size: clamp(36px, 4vw, 48px); line-height: 1.08; }
@media (max-width: 900px) { .stats { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .stats { grid-template-columns: 1fr; } }

/* ---------- Pricing (keeps js/pricing.js hooks) ---------- */
.offer { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; margin-bottom: var(--space-6); padding: 16px 20px; border-radius: var(--radius-md); background: var(--brand-tint); color: var(--text-primary); }
.offer p { margin: 0; }
.offer strong { color: var(--brand-text); }
.pr-controls { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: var(--space-6); }
.pr-toggle-btn.is-active { background: var(--surface); color: var(--text-primary); box-shadow: var(--shadow-raised); }
.stepper { display: inline-flex; align-items: center; gap: 4px; padding: 4px; border-radius: var(--radius-pill); background: var(--surface-sunk); border: 1px solid var(--line); }
.stepper__label { padding: 0 10px 0 12px; color: var(--text-secondary); font-size: 15px; }
.stepper button { width: 40px; height: 40px; border: 0; border-radius: 50%; background: var(--surface); color: var(--text-primary); font: 500 20px/1 var(--font-sans); cursor: pointer; box-shadow: var(--shadow-raised); }
.stepper button:disabled { opacity: .4; cursor: not-allowed; }
.stepper output { min-width: 40px; text-align: center; font: 600 17px/1 var(--font-sans); font-variant-numeric: tabular-nums; }
.pr-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-4); align-items: stretch; }
.ss-price .metric { font-size: clamp(36px, 3.4vw, 44px); line-height: 1; }
.ss-price .ss-btn + .ss-link { align-self: center; }
.pr-save-badge { align-self: flex-start; }
.pr-total { margin: 0; color: var(--text-tertiary); min-height: 18px; }
.ss-price__plus { margin: 0; color: var(--text-primary); font-weight: 500; font-size: 15px; }
.pr-fine { margin: var(--space-5) 0 0; color: var(--text-tertiary); text-align: center; }
@media (max-width: 1080px) { .pr-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .pr-grid { grid-template-columns: 1fr; } .pr-controls { justify-content: center; } }

/* ---------- Compare ---------- */
.cmp-links { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-4); margin-top: var(--space-6); }
.cmp-card { display: flex; flex-direction: column; gap: 6px; padding: 20px; border-radius: var(--radius-md); border: 1px solid var(--line); background: var(--surface); text-decoration: none; transition: border-color var(--dur-fast), transform var(--dur-enter) var(--ease-out); }
.cmp-card:hover { border-color: var(--line-strong); transform: translateY(-2px); }
.cmp-card p { margin: 0; }
.cmp-card .h4 { color: var(--text-primary); }
.cmp-card .body-sm { color: var(--text-secondary); }
.cmp-card .ss-link { margin-top: 6px; }
@media (max-width: 900px) { .cmp-links { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .cmp-links { grid-template-columns: 1fr; } }

/* ---------- FAQ ---------- */
.faq { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: var(--space-8); align-items: start; }
.faq .ss-faq__a a { color: var(--brand-text); }
@media (max-width: 900px) { .faq { grid-template-columns: 1fr; gap: var(--space-6); } }

/* ---------- Final CTA + footer ---------- */
.cta-sec { padding-block: 0 var(--space-10); }
.ss-ctaband__field { position: absolute; inset: 0; pointer-events: none; color: #94A3B8; opacity: .3; }
.ss-ctaband__field svg { position: absolute; inset-inline-end: 0; bottom: -150px; width: 520px; height: auto; }
.ss-footer__brand address { font-style: normal; font-size: 13px; line-height: 20px; }
.ss-footer__brand a { font-size: 13px; }
.ss-footer__social { display: flex; gap: 8px; }
.ss-footer__social a { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line-band); }
.ss-footer__social a:hover { border-color: var(--on-band); }
/* Five link columns (Product, Industries, Compare, Get started, Company) beside the brand. */
.ss-footer__inner { grid-template-columns: 1.5fr repeat(5, minmax(0, 1fr)); gap: 40px; }
@media (max-width: 1100px) { .ss-footer__inner { grid-template-columns: repeat(3, minmax(0, 1fr)); } .ss-footer__brand { grid-column: 1 / -1; } }
@media (max-width: 640px) { .ss-footer__inner { grid-template-columns: 1fr 1fr; } }
@media (max-width: 760px) { .cta-sec { padding-bottom: var(--space-9); } .ss-ctaband__inner { padding: 64px 20px; } }

/* ---------- Conversion modal (#gs-overlay, driven by js/pricing.js) ---------- */
.gs-overlay { position: fixed; inset: 0; z-index: var(--z-modal); display: none; place-items: center; padding: 16px; background: var(--scrim); overflow-y: auto; }
.gs-overlay.is-open { display: grid; animation: ss-fade var(--dur-enter) var(--ease-out); }
.gs-modal { position: relative; width: min(520px, 100%); padding: 32px; border-radius: var(--radius-lg); background: var(--surface-raised); box-shadow: var(--shadow-float); animation: ss-pop var(--dur-enter) var(--ease-out); }
.gs-close { position: absolute; top: 16px; inset-inline-end: 16px; width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center; border: 0; border-radius: 50%; background: var(--surface-sunk); color: var(--text-secondary); font-size: 22px; line-height: 1; cursor: pointer; }
.gs-close:hover { color: var(--text-primary); }
.gs-modal h3 { margin: 0 48px 8px 0; font: 600 26px/1.2 var(--font-sans); letter-spacing: -.02em; color: var(--text-primary); }
#gs-sub { margin: 0 0 24px; color: var(--text-secondary); font-size: 15px; line-height: 24px; }
.gs-form { display: flex; flex-direction: column; gap: 12px; }
.gs-form input:not(.hp-field), .gs-form select, .gs-field input { height: 48px; width: 100%; padding: 0 14px; border-radius: var(--radius-sm); border: 1px solid var(--line-strong); background: var(--surface); color: var(--text-primary); font: 400 16px/1 var(--font-sans); transition: border-color var(--dur-fast); }
.gs-form input::placeholder, .gs-field input::placeholder { color: var(--text-tertiary); }
.gs-form input:hover, .gs-form select:hover { border-color: var(--text-tertiary); }
.gs-form input:focus, .gs-form select:focus, .gs-field input:focus { outline: 2px solid var(--focus); outline-offset: 1px; border-color: transparent; }
.gs-form input.invalid { border-color: var(--err); }
.gs-trial-plan { display: flex; flex-direction: column; gap: 8px; padding: 14px; border-radius: var(--radius-md); background: var(--surface-sunk); }
.gs-row { display: grid; grid-template-columns: 1.2fr .8fr 1fr; gap: 8px; }
.gs-pick { display: flex; flex-direction: column; gap: 6px; font: 500 13px/18px var(--font-sans); color: var(--text-secondary); }
.gs-fee { margin: 0; font-size: 13px; line-height: 20px; color: var(--text-secondary); }
.gs-fee strong { color: var(--text-primary); }
.gs-fee-note { display: block; margin-top: 4px; color: var(--warn); }
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
#gs-submit { height: 56px; border-radius: var(--radius-pill); font-size: 17px; }
.gs-msg { font-size: 14px; line-height: 20px; color: var(--ok); }
.gs-msg.error { color: var(--err); }
.gs-trust { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 16px 0 0; color: var(--text-tertiary); font-size: 13px; line-height: 18px; }
.gs-existing { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line-subtle); }
.gs-existing summary { cursor: pointer; color: var(--brand-text); font-size: 15px; font-weight: 500; }
.gs-field { display: flex; align-items: center; gap: 8px; margin: 12px 0; color: var(--text-tertiary); font-family: var(--font-mono); font-size: 14px; }
.gs-existing .ss-btn { width: 100%; }
@media (max-width: 560px) {
  .gs-overlay { place-items: end center; padding: 0; }
  .gs-modal { border-end-start-radius: 0; border-end-end-radius: 0; padding: 24px 16px calc(24px + env(safe-area-inset-bottom)); }
  .gs-row { grid-template-columns: 1fr 1fr; }
  .gs-row .gs-pick:first-child { grid-column: 1 / -1; }
}

/* ---------- Sticky mobile CTA ---------- */
.mcta-bar { display: none; }
@media (max-width: 760px) {
  .mcta-bar { position: fixed; inset-inline: 8px 84px; bottom: 8px; z-index: var(--z-banner); display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 8px; border-radius: var(--radius-md); background: var(--surface-raised); border: 1px solid var(--line); box-shadow: var(--shadow-float); transform: translateY(140%); transition: transform var(--dur-enter) var(--ease-out); }
  .mcta-bar.is-shown { transform: none; }
  body.nav-open .mcta-bar { transform: translateY(140%); }
  body.has-mcta .ss-footer { padding-bottom: 112px; }
}

/* ---------- Reveal ---------- */
.js .rv { opacity: 0; transform: translateY(16px); transition: opacity var(--dur-reveal) var(--ease-out), transform var(--dur-reveal) var(--ease-out); transition-delay: var(--rv-delay, 0ms); }
.js .rv.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .js .rv { opacity: 1; transform: none; }
}

/* =====================================================================
   Page primitives for inner pages (pricing, features, compare, company,
   legal). Page stylesheets add only what is unique to that page.
   ===================================================================== */

/* ---------- Page hero (display-xl, canvas ground) ---------- */
.page-hero { position: relative; overflow: hidden; padding: var(--space-9) 0 var(--space-8); }
.page-hero--center .page-hero__copy { align-items: center; text-align: center; margin-inline: auto; }
.page-hero__field { position: absolute; inset: 0; pointer-events: none; color: var(--mark-slate); }
.page-hero__field svg { position: absolute; inset-inline-end: -40px; top: -20px; width: min(560px, 50vw); height: auto; opacity: .16; }
.page-hero__copy { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-5); max-width: 880px; }
.page-hero__eyebrow { margin: 0; color: var(--brand-text); }
.page-hero__title { margin: 0; color: var(--text-primary); text-wrap: balance; }
.page-hero__lede { margin: 0; color: var(--text-secondary); max-width: 60ch; text-wrap: pretty; }
.page-hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: var(--space-2); }
.page-hero--center .page-hero__actions { justify-content: center; }
.page-hero__note { margin: 0; color: var(--text-tertiary); }
@media (max-width: 760px) { .page-hero { padding: var(--space-8) 0 var(--space-7); } .page-hero__field svg { width: 86vw; inset-inline-end: -36vw; opacity: .1; } }

/* ---------- Breadcrumb ---------- */
.crumbs { margin: 0 0 var(--space-5); padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 8px; color: var(--text-tertiary); font: 400 14px/20px var(--font-sans); }
.crumbs li { display: inline-flex; align-items: center; gap: 8px; }
.crumbs li + li::before { content: "/"; color: var(--line-strong); }
.crumbs a { color: var(--text-secondary); text-decoration: none; }
.crumbs a:hover { color: var(--text-primary); text-decoration: underline; text-underline-offset: 4px; }
.crumbs [aria-current] { color: var(--text-primary); }

/* ---------- Card grids ---------- */
.grid { display: grid; gap: var(--space-4); }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1000px) { .grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .grid--2, .grid--3, .grid--4 { grid-template-columns: 1fr; } }
.card { display: flex; flex-direction: column; gap: 10px; padding: 24px; border-radius: var(--radius-md); border: 1px solid var(--line); background: var(--surface); color: inherit; text-decoration: none; transition: border-color var(--dur-fast), transform var(--dur-enter) var(--ease-out); }
a.card:hover { border-color: var(--line-strong); transform: translateY(-2px); }
.card > * { margin: 0; }
.card__icon { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: var(--radius-sm); background: var(--surface-sunk); color: var(--text-primary); }
.card__eyebrow { color: var(--text-tertiary); }
.card__title { color: var(--text-primary); }
.card__body { color: var(--text-secondary); }
.card .ss-link { margin-top: auto; padding-top: 6px; }
.sec--sunk .card { background: var(--surface); }
@media (hover: none) { a.card:hover { transform: none; } }

/* ---------- Two-column split (copy + list / frame) ---------- */
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--space-8); align-items: start; }
.split--wide-end { grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); }
@media (max-width: 900px) { .split, .split--wide-end { grid-template-columns: 1fr; gap: var(--space-6); } }

/* ---------- Icon list (Lucide check / x / minus, never glyphs) ---------- */
.ilist { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 12px; }
.ilist li { display: flex; gap: 12px; color: var(--text-secondary); }
.ilist .ss-icon { flex-shrink: 0; margin-top: 4px; color: var(--text-tertiary); }
.ilist--yes .ss-icon { color: var(--brand-text); }
.ilist strong { color: var(--text-primary); font-weight: 600; }

/* ---------- Tables (built on .ss-cmp) ---------- */
.ss-cmp caption { caption-side: bottom; padding: 12px 20px; text-align: start; color: var(--text-tertiary); font: 400 13px/18px var(--font-sans); }
.ss-cmp td { font-variant-numeric: tabular-nums; }
.ss-cmp tbody tr:last-child > * { border-bottom: 0; }
.ss-cmp a { color: var(--brand-text); }

/* ---------- Long-form prose (legal, blog, about) ---------- */
.prose { max-width: 72ch; color: var(--text-secondary); font-size: 17px; line-height: 28px; }
.prose > :first-child { margin-top: 0; }
.prose h2 { margin: var(--space-8) 0 var(--space-3); color: var(--text-primary); font: 600 clamp(24px, 2.4vw, 30px)/1.25 var(--font-sans); letter-spacing: -.015em; scroll-margin-top: var(--space-5); }
.prose h3 { margin: var(--space-6) 0 var(--space-2); color: var(--text-primary); font: 600 20px/28px var(--font-sans); letter-spacing: -.01em; scroll-margin-top: var(--space-5); }
.prose h4 { margin: var(--space-5) 0 var(--space-2); color: var(--text-primary); font: 600 17px/26px var(--font-sans); }
.prose p, .prose ul, .prose ol, .prose table, .prose blockquote { margin: 0 0 var(--space-4); }
.prose ul, .prose ol { padding-inline-start: 1.3em; }
.prose li { margin-bottom: 6px; }
.prose li::marker { color: var(--text-tertiary); }
.prose strong { color: var(--text-primary); font-weight: 600; }
.prose a { color: var(--brand-text); text-underline-offset: 3px; }
.prose code { font: 400 .9em/1 var(--font-mono); padding: 2px 6px; border-radius: var(--radius-xs); background: var(--surface-sunk); color: var(--text-primary); }
.prose blockquote { padding: 16px 20px; border-inline-start: 3px solid var(--line-strong); background: var(--surface-sunk); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.prose table { width: 100%; border-collapse: collapse; font-size: 15px; line-height: 22px; display: block; overflow-x: auto; }
.prose th, .prose td { padding: 10px 14px; text-align: start; border-bottom: 1px solid var(--line-subtle); vertical-align: top; }
.prose thead th { color: var(--text-primary); font-weight: 600; background: var(--surface-sunk); }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: var(--space-7) 0; }

/* ---------- Document layout: sticky contents + prose ---------- */
.doc { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: var(--space-8); align-items: start; }
.doc > * { min-width: 0; }
.doc__toc { position: sticky; top: calc(var(--nav-height) + var(--space-5)); max-height: calc(100vh - var(--nav-height) - 48px); overflow: auto; }
.doc__toc p { margin: 0 0 12px; color: var(--text-tertiary); }
.doc__toc ol { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 2px; border-inline-start: 1px solid var(--line); }
.doc__toc a { display: block; padding: 6px 0 6px 14px; margin-inline-start: -1px; border-inline-start: 2px solid transparent; color: var(--text-secondary); font-size: 14px; line-height: 20px; text-decoration: none; }
.doc__toc a:hover { color: var(--text-primary); border-inline-start-color: var(--line-strong); }
.doc__meta { display: flex; flex-wrap: wrap; gap: 8px 20px; margin: 0; color: var(--text-tertiary); }
@media (max-width: 900px) { .doc { grid-template-columns: 1fr; gap: var(--space-5); } .doc__toc { position: static; max-height: none; } }

/* ---------- Callout / note ---------- */
.note { display: flex; gap: 12px; padding: 16px 20px; border-radius: var(--radius-md); background: var(--surface-sunk); color: var(--text-secondary); }
.note > .ss-icon { flex-shrink: 0; margin-top: 3px; color: var(--info); }
.note p { margin: 0; }
.note--brand { background: var(--brand-tint); color: var(--text-primary); }
.note--brand > .ss-icon { color: var(--brand-text); }

/* ---------- Form card (contact, careers) ---------- */
.form-card { display: flex; flex-direction: column; gap: 16px; padding: 32px; border-radius: var(--radius-lg); border: 1px solid var(--line); background: var(--surface); }
.form-card .ss-field__ctl { background: var(--canvas); }
textarea.ss-field__ctl { height: auto; min-height: 120px; padding: 12px 14px; line-height: 24px; resize: vertical; }
select.ss-field__ctl { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--text-tertiary) 50%), linear-gradient(135deg, var(--text-tertiary) 50%, transparent 50%); background-position: calc(100% - 20px) 21px, calc(100% - 15px) 21px; background-size: 5px 5px; background-repeat: no-repeat; padding-inline-end: 36px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 560px) { .form-card { padding: 24px 16px; } .form-row { grid-template-columns: 1fr; } }

/* growth field reads fainter on the night canvas: lift it (still under the 0.4 cap) */
html[data-theme="dark"] .page-hero__field svg, html[data-theme="dark"] .hero__field svg { opacity: .3; }
@media (max-width: 960px) { html[data-theme="dark"] .page-hero__field svg, html[data-theme="dark"] .hero__field svg { opacity: .18; } }

/* Logo lockup (SVG viewBox cropped to the artwork): 40px in the nav, 34px on
   phones, 44px in the footer, so the "AI Growth Engine" line stays legible. */
.ss-nav__logo img { height: 40px; width: auto; }
.ss-footer__brand img { height: 44px; width: auto; }
@media (max-width: 960px) { .ss-nav__logo img { height: 34px; } }
