/* Northquill — site styles. Built on the brand kit tokens.
   Dark-mode-primary per design-system/northquill/MASTER.md (validated
   visual thesis): teal accent and Space Grotesk/Inter pairing kept
   unchanged from the original brand; --ink-900/--teal/--teal-700 stay
   theme-independent (always-dark elements like the footer/CTA band, and
   the accent, don't shift with the theme). --bg/--surface/--text/
   --text-muted/--border are the new theme-aware roles: dark values here
   in :root are the default, overridden for light under
   [data-theme="light"] and prefers-color-scheme:light. */

:root{
  --ink-800:#2E3766; --ink-900:#12182B;
  --teal:#2FD3C0; --teal-700:#1FA99A; --teal-050:#123832;
  --font-display:'Space Grotesk','Inter',system-ui,sans-serif;
  --font-body:'Inter',system-ui,-apple-system,'Segoe UI',sans-serif;
  --radius:6px; --radius-lg:10px; --radius-xl:16px;
  --container:1120px;
  --shadow:0 1px 2px rgba(0,0,0,.2),0 8px 30px rgba(0,0,0,.28);

  /* Theme-aware roles -- dark (default) */
  --bg:#0A0E1A; --bg-alt:#0F1424; --surface:#1C2440; --header-bg:rgba(10,14,26,.86);
  --ink:#F4F6FB; --slate:#9AA3C0; --line:#232B4E66; --white:#12182B;
  --callout-border:#1D5C52; --callout-fg:#7FE0D0; --callout-fg-strong:#B4F1E6;
}
@media (prefers-color-scheme:light){
  :root:not([data-theme="dark"]){
    --teal-050:#E7FAF7; --shadow:0 1px 2px rgba(18,24,43,.04),0 8px 30px rgba(18,24,43,.06);
    --bg:#fff; --bg-alt:#F4F6FB; --surface:#fff; --header-bg:rgba(255,255,255,.86);
    --ink:#232B4E; --slate:#5B6178; --line:#E3E7F0; --white:#fff;
    --callout-border:#BEEDE6; --callout-fg:#155E56; --callout-fg-strong:#0F4A44;
  }
}
:root[data-theme="light"]{
  --teal-050:#E7FAF7; --shadow:0 1px 2px rgba(18,24,43,.04),0 8px 30px rgba(18,24,43,.06);
  --bg:#fff; --bg-alt:#F4F6FB; --surface:#fff; --header-bg:rgba(255,255,255,.86);
  --ink:#232B4E; --slate:#5B6178; --line:#E3E7F0; --white:#fff;
  --callout-border:#BEEDE6; --callout-fg:#155E56; --callout-fg-strong:#0F4A44;
}

*,*::before,*::after{box-sizing:border-box}
html{scroll-behavior:smooth}
@media (prefers-reduced-motion:reduce){html{scroll-behavior:auto}}
body{
  margin:0;font-family:var(--font-body);color:var(--ink);
  background:var(--bg);line-height:1.65;font-size:17px;
  -webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;
  transition:background .2s ease,color .2s ease;
}
img,svg{display:block;max-width:100%}
a{color:var(--teal-700);text-decoration:none;transition:color .15s ease}
a:hover{text-decoration:underline}
h1,h2,h3,h4{font-family:var(--font-display);font-weight:600;letter-spacing:-.02em;color:var(--ink);line-height:1.12;margin:0 0 .5em}
h1{font-size:clamp(2.4rem,5.5vw,3.9rem)}
h2{font-size:clamp(1.85rem,3.8vw,2.55rem)}
h3{font-size:1.25rem;letter-spacing:-.01em}
p{margin:0 0 1rem}
:focus-visible{outline:3px solid var(--teal);outline-offset:2px;border-radius:4px}

.container{width:100%;max-width:var(--container);margin-inline:auto;padding-inline:24px}
.section{padding-block:clamp(56px,9vw,104px)}
.section--tight{padding-block:clamp(40px,6vw,64px)}
.section--paper{background:var(--bg-alt)}
.section--ink{background:var(--ink-900);color:#D7DCEC}
.section--ink h2,.section--ink h3{color:#fff}
.eyebrow{font-family:var(--font-display);font-weight:500;font-size:.82rem;letter-spacing:.14em;text-transform:uppercase;color:var(--teal-700);margin:0 0 .8rem}
.section--ink .eyebrow{color:var(--teal)}
.lede{font-size:1.15rem;color:var(--slate);max-width:60ch}
.section--ink .lede{color:#AFB7D0}
.center{text-align:center}
.center .lede{margin-inline:auto}

/* Feather-spine divider — the signature motif (echoes the logo barbs) */
.spine{display:flex;align-items:center;gap:0;height:14px;margin:0}
.spine svg{width:100%;height:14px;overflow:visible}

/* Buttons */
.btn{display:inline-flex;align-items:center;gap:.5rem;font-family:var(--font-body);font-weight:600;font-size:1rem;line-height:1;padding:.85rem 1.4rem;border-radius:var(--radius);border:1.5px solid transparent;cursor:pointer;transition:transform .12s ease,background .15s ease,border-color .15s ease;text-decoration:none}
.btn:hover{text-decoration:none;transform:translateY(-1px)}
.btn:active{transform:translateY(0)}
.btn--primary{background:var(--ink-900);color:#fff}
.btn--primary:hover{background:var(--ink-800)}
.btn--accent{background:var(--teal);color:var(--ink-900)}
.btn--accent:hover{background:#3ADFCC}
.btn--ghost{background:transparent;color:var(--ink);border-color:var(--line)}
.btn--ghost:hover{border-color:var(--slate)}
.section--ink .btn--ghost{color:#fff;border-color:rgba(255,255,255,.24)}
.btn-row{display:flex;flex-wrap:wrap;gap:.75rem}
.center .btn-row{justify-content:center}

/* Header */
.site-header{position:sticky;top:0;z-index:50;background:var(--header-bg);backdrop-filter:saturate(140%) blur(10px);border-bottom:1px solid var(--line)}
.nav{display:flex;align-items:center;justify-content:space-between;height:68px}
.brand{display:inline-flex;align-items:center;gap:10px;font-family:var(--font-display);font-weight:600;letter-spacing:-.02em;font-size:1.35rem;color:var(--ink)}
.brand:hover{text-decoration:none}
.brand svg{width:30px;height:30px}
.nav-links{display:flex;align-items:center;gap:1.6rem;list-style:none;margin:0;padding:0}
.nav-links a{color:var(--ink);font-weight:500;font-size:.98rem}
.nav-links a:hover{color:var(--teal-700);text-decoration:none}
.nav-cta{display:flex;align-items:center;gap:.6rem}
.nav-toggle{display:none;background:none;border:1.5px solid var(--line);border-radius:8px;padding:.4rem .5rem;cursor:pointer;color:var(--ink)}
.nav-toggle svg{width:22px;height:22px}

/* Theme toggle -- destination-icon convention: shows the theme a click
   switches TO, so a sun invites you toward light, a moon toward dark. */
.theme-toggle{display:inline-flex;align-items:center;justify-content:center;width:40px;height:40px;flex:none;background:none;border:1.5px solid var(--line);border-radius:8px;cursor:pointer;color:var(--ink);transition:border-color .15s ease}
.theme-toggle:hover{border-color:var(--slate)}
.theme-toggle svg{width:18px;height:18px}
.theme-toggle .icon-sun{display:block}
.theme-toggle .icon-moon{display:none}
@media (prefers-color-scheme:light){
  :root:not([data-theme="dark"]) .theme-toggle .icon-sun{display:none}
  :root:not([data-theme="dark"]) .theme-toggle .icon-moon{display:block}
}
:root[data-theme="light"] .theme-toggle .icon-sun{display:none}
:root[data-theme="light"] .theme-toggle .icon-moon{display:block}
:root[data-theme="dark"] .theme-toggle .icon-sun{display:block}
:root[data-theme="dark"] .theme-toggle .icon-moon{display:none}
@media (max-width:860px){
  .nav-links,.nav-cta .btn--ghost{display:none}
  .nav-toggle{display:inline-flex}
  .mobile-menu[hidden]{display:none}
  .mobile-menu{border-bottom:1px solid var(--line);background:var(--surface)}
  .mobile-menu ul{list-style:none;margin:0;padding:12px 24px 20px;display:flex;flex-direction:column;gap:.2rem}
  .mobile-menu a{display:block;padding:.7rem 0;color:var(--ink);font-weight:500;border-bottom:1px solid var(--line)}
}

/* Hero */
.hero{position:relative;overflow:hidden}
.hero-grid{display:grid;grid-template-columns:1.05fr .95fr;gap:48px;align-items:center}
.hero h1{margin-bottom:.35em}
.hero .lede{font-size:1.28rem}
.hero-note{margin-top:1.2rem;color:var(--slate);font-size:.95rem;display:flex;align-items:center;gap:.5rem}
.hero-note svg{width:18px;height:18px;color:var(--teal-700);flex:none}
@media (max-width:860px){.hero-grid{grid-template-columns:1fr;gap:36px}}

/* Deck -> video hero visual — the homepage's one authored motion moment
   (see design-system/northquill/MASTER.md interaction thesis). Slides
   assemble, a narration waveform draws in beneath them, both dissolve into
   a synced video-frame preview. Depicts the product literally. Plays once
   (no infinite loop) and holds on the resolved frame -- animates only
   transform/opacity (never width, unlike the .scrub bar this replaces),
   and is entirely inert under reduced motion, resting directly on the
   resolved state rather than snapping through the sequence. */
.hero-reveal{position:relative;aspect-ratio:16/10;border-radius:var(--radius-lg);border:1px solid var(--line);background:var(--surface);box-shadow:var(--shadow);overflow:hidden}
.hr-video{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;background:var(--ink-900);opacity:0}
/* Deck and wave occupy clearly separate bands (top ~62%, bottom ~38%) so
   the wave's growth never visually collides with the slide stack above it
   during their real overlap window (roughly 20%-60% of the sequence). */
.hr-deck{position:absolute;top:0;left:0;right:0;height:62%;display:flex;flex-direction:column;justify-content:center;gap:8px;padding:20px 20px 0}
/* Deliberately hardcoded, not theme-aware -- these depict a literal
   PowerPoint slide (conventionally light-background regardless of the
   site's own theme), not a themed UI surface. */
.hr-slide{background:#fff;border:1px solid #E3E7F0;border-radius:8px;padding:9px 14px;display:flex;flex-direction:column;gap:6px;box-shadow:0 1px 2px rgba(18,24,43,.04),0 8px 30px rgba(18,24,43,.06)}
.hr-slide-title{height:10px;width:55%;border-radius:5px;background:#232B4E;opacity:.85}
.hr-slide-bar{height:6px;width:var(--w);border-radius:4px;background:#E7EAF3}
.hr-wave{position:absolute;left:0;right:0;bottom:0;height:38%;display:flex;align-items:flex-end;justify-content:center;gap:3px;padding:0 24px 16px}
.hr-wave span{display:block;width:5px;height:var(--h);border-radius:3px;background:var(--teal);transform:scaleY(0);transform-origin:bottom}
.hr-play{width:56px;height:56px;border-radius:50%;background:var(--teal);display:flex;align-items:center;justify-content:center}
.hr-play svg{width:22px;height:22px;color:var(--ink-900);margin-left:3px}
.hr-scrub{position:absolute;left:14px;right:14px;bottom:14px;height:5px;border-radius:3px;background:rgba(255,255,255,.18);overflow:hidden}
.hr-scrub-fill{position:absolute;left:0;top:0;bottom:0;width:38%;background:var(--teal);border-radius:3px}
@media (prefers-reduced-motion:no-preference){
  .hr-slide{animation:hr-slide-seq 2.8s cubic-bezier(.16,1,.3,1) both;animation-delay:calc(var(--i) * 100ms)}
  .hr-wave span{animation:hr-wave-seq 2.8s cubic-bezier(.16,1,.3,1) both;animation-delay:calc(400ms + var(--i) * 18ms)}
  .hr-video{animation:hr-video-seq 2.8s cubic-bezier(.16,1,.3,1) both}
}
/* The comment above claims this whole sequence is "entirely inert under
   reduced motion, resting directly on the resolved state" -- without this
   block that was false: .hr-video's base opacity:0 and .hr-wave span's base
   scaleY(0) only ever get overridden by the (no-preference) animations
   above, so a reduced-motion visitor saw just the 3 slide cards, forever,
   with no wave and no video frame ever appearing. This sets the actual
   100%-keyframe end state directly, matching what "resolved" was supposed
   to mean. */
@media (prefers-reduced-motion:reduce){
  .hr-deck,.hr-wave{display:none}
  .hr-video{opacity:1}
}
@keyframes hr-slide-seq{
  0%{opacity:0;transform:translateY(16px) scale(.98)}
  15%,60%{opacity:1;transform:translateY(0) scale(1)}
  75%,100%{opacity:0;transform:translateY(-6px) scale(.98)}
}
@keyframes hr-wave-seq{
  0%{transform:scaleY(0)}
  20%,65%{transform:scaleY(1)}
  80%,100%{transform:scaleY(0)}
}
@keyframes hr-video-seq{
  0%,68%{opacity:0;transform:scale(.96)}
  85%,100%{opacity:1;transform:scale(1)}
}
@media (max-width:520px){.hero-reveal{aspect-ratio:4/5}}

/* Logo / trust strip */
.trust{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:14px 34px}
.trust span{color:var(--slate);font-weight:500;font-size:.95rem}

/* Cards + grids */
.grid{display:grid;gap:22px}
.grid-3{grid-template-columns:repeat(3,1fr)}
.grid-2{grid-template-columns:repeat(2,1fr)}
@media (max-width:860px){.grid-3{grid-template-columns:1fr 1fr}}
@media (max-width:620px){.grid-3,.grid-2{grid-template-columns:1fr}}
.card{background:var(--surface);border:1px solid var(--line);border-radius:var(--radius-lg);padding:26px}
.card .ic{width:42px;height:42px;border-radius:11px;background:var(--teal-050);color:var(--teal-700);display:flex;align-items:center;justify-content:center;margin-bottom:14px}
.card .ic svg{width:22px;height:22px}
.card h3{margin-bottom:.35em}
.card p{color:var(--slate);margin:0}

/* Steps (a real sequence — numbering earns its place) */
.steps{display:grid;grid-template-columns:repeat(3,1fr);gap:24px;counter-reset:step}
@media (max-width:760px){.steps{grid-template-columns:1fr}}
/* flex column so .step-rule (via margin-top:auto below) sits on one shared
   baseline across all 3 steps, regardless of how many lines each step's own
   copy wraps to -- previously the rule just followed its own paragraph in
   flow, so a step with 3 lines of copy (vs. 2 for its neighbors) put its
   rule visibly lower than the others. */
.step{position:relative;padding-top:20px;display:flex;flex-direction:column}
.step::before{counter-increment:step;content:"0" counter(step);font-family:var(--font-display);font-weight:600;font-size:.95rem;letter-spacing:.1em;color:var(--teal-700)}
.step h3{margin:.4rem 0 .3rem}
.step p{color:var(--slate);margin:0 0 14px}
.step-rule{height:2px;background:var(--line);margin-top:auto;position:relative}
.step-rule::after{content:"";position:absolute;left:0;top:-1px;width:26px;height:4px;border-radius:3px;background:var(--teal)}

/* Use-case list */
.uses{display:grid;grid-template-columns:repeat(2,1fr);gap:14px}
@media (max-width:620px){.uses{grid-template-columns:1fr}}
.use{display:flex;gap:14px;align-items:flex-start;background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);padding:18px}
.use .ic{color:var(--teal-700);flex:none;margin-top:2px}
.use .ic svg{width:20px;height:20px}
.use b{display:block;font-family:var(--font-display);font-weight:600}
.use span{color:var(--slate);font-size:.96rem}

/* Pricing */
.tiers{display:grid;grid-template-columns:repeat(3,1fr);gap:22px;align-items:stretch}
@media (max-width:860px){.tiers{grid-template-columns:1fr}}
.tier{background:var(--surface);border:1px solid var(--line);border-radius:var(--radius-lg);padding:28px;display:flex;flex-direction:column}
.tier--featured{border-color:var(--teal);box-shadow:0 0 0 1px var(--teal)}
.tier .badge{align-self:flex-start;background:var(--teal-050);color:var(--teal-700);font-weight:600;font-size:.78rem;letter-spacing:.04em;padding:.25rem .6rem;border-radius:999px;margin-bottom:12px}
.tier .price{font-family:var(--font-display);font-weight:600;font-size:2.4rem;color:var(--ink);letter-spacing:-.02em;margin:.2rem 0 .1rem}
.tier .price small{font-size:1rem;font-weight:500;color:var(--slate)}
.tier ul{list-style:none;margin:16px 0 22px;padding:0;display:flex;flex-direction:column;gap:.6rem}
.tier li{display:flex;gap:.6rem;color:var(--slate)}
.tier li svg{width:18px;height:18px;color:var(--teal-700);flex:none;margin-top:3px}
.tier .btn{margin-top:auto;justify-content:center}

/* FAQ / accordion */
.faq{max-width:780px;margin-inline:auto}
.qa{border-bottom:1px solid var(--line)}
.qa button{width:100%;text-align:left;background:none;border:none;cursor:pointer;font-family:var(--font-display);font-weight:600;font-size:1.08rem;color:var(--ink);padding:20px 40px 20px 0;position:relative}
.qa button::after{content:"";position:absolute;right:6px;top:50%;width:12px;height:12px;border-right:2px solid var(--slate);border-bottom:2px solid var(--slate);transform:translateY(-70%) rotate(45deg);transition:transform .2s ease}
.qa button[aria-expanded="true"]::after{transform:translateY(-30%) rotate(-135deg)}
.qa .a{color:var(--slate);padding:0 0 20px;margin:0;max-width:70ch}
.qa .a[hidden]{display:none}

/* CTA band */
.cta-band{background:var(--ink-900);color:#fff;border-radius:var(--radius-xl);padding:clamp(36px,6vw,64px);text-align:center}
.cta-band h2{color:#fff}
.cta-band p{color:#AFB7D0;max-width:52ch;margin-inline:auto}

/* Prose (legal + content pages) */
.prose{max-width:760px;margin-inline:auto}
.prose h2{font-size:1.5rem;margin-top:2.2rem}
.prose h3{font-size:1.15rem;margin-top:1.6rem}
.prose p,.prose li{color:var(--ink)}
.prose ul,.prose ol{padding-left:1.3rem;margin:0 0 1rem}
.prose li{margin-bottom:.4rem}
.prose a{color:var(--teal-700);text-decoration:underline}
.prose table{width:100%;border-collapse:collapse;margin:1rem 0;font-size:.95rem}
.prose th,.prose td{border:1px solid var(--line);padding:.6rem .8rem;text-align:left;vertical-align:top}
.prose th{background:var(--bg-alt);font-family:var(--font-display)}
.legal-meta{color:var(--slate);font-size:.95rem;margin-bottom:1.5rem}
.callout{background:var(--teal-050);border:1px solid var(--callout-border);border-radius:var(--radius);padding:16px 18px;color:var(--callout-fg);font-size:.96rem;margin:1.4rem 0}
.callout b{color:var(--callout-fg-strong)}
.toc{background:var(--bg-alt);border:1px solid var(--line);border-radius:var(--radius);padding:18px 22px;margin-bottom:2rem}
.toc p{font-family:var(--font-display);font-weight:600;margin:0 0 .5rem}
.toc ol{margin:0;padding-left:1.2rem;columns:2;gap:2rem}
.toc a{color:var(--ink)}
@media (max-width:620px){.toc ol{columns:1}}

/* Page hero (interior pages) */
.page-hero{padding-block:clamp(48px,7vw,84px) clamp(24px,4vw,40px)}
.page-hero .eyebrow{margin-bottom:.6rem}
.breadcrumb{font-size:.9rem;color:var(--slate);margin-bottom:1rem}
.breadcrumb a{color:var(--slate)}
.breadcrumb span{color:var(--line);margin:0 .4rem}

/* Footer */
.site-footer{background:var(--ink-900);color:#AEB6D2;padding-block:56px 32px}
.foot-grid{display:grid;grid-template-columns:1.6fr 1fr 1fr 1fr;gap:32px}
@media (max-width:760px){.foot-grid{grid-template-columns:1fr 1fr}}
@media (max-width:460px){.foot-grid{grid-template-columns:1fr}}
.foot-grid h4{color:#fff;font-size:.82rem;letter-spacing:.12em;text-transform:uppercase;font-family:var(--font-display);font-weight:500;margin:0 0 1rem}
.foot-grid ul{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:.55rem}
.foot-grid a{color:#AEB6D2;font-size:.96rem}
.foot-grid a:hover{color:#fff;text-decoration:none}
.foot-brand svg{width:30px;height:30px}
.foot-brand .brand{color:#fff;margin-bottom:.8rem}
.foot-brand p{color:#8A93B4;max-width:34ch;font-size:.96rem}
.foot-bottom{border-top:1px solid rgba(255,255,255,.1);margin-top:40px;padding-top:22px;display:flex;flex-wrap:wrap;justify-content:space-between;gap:12px;color:#8A93B4;font-size:.9rem}
.foot-bottom a{color:#8A93B4}

.visually-hidden{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
/* transform, not top -- animating top triggers layout reflow every frame;
   translateY is compositor-only (design-audit Phase 5 finding). */
.skip-link{position:absolute;left:12px;top:12px;transform:translateY(-72px);background:var(--ink-900);color:#fff;padding:.6rem 1rem;border-radius:8px;z-index:100;transition:transform .15s}
.skip-link:focus{transform:translateY(0);text-decoration:none}

/* Chat widget -- floating FAQ bot, bottom-right, marketing pages only.
   Vanilla JS/CSS (see assets/js/chat-widget.js), no framework -- matches
   this site's "no build toolchain" constraint. */
.nq-chat-bubble{position:fixed;right:20px;bottom:20px;width:56px;height:56px;border-radius:50%;background:var(--teal);color:var(--ink-900);border:none;box-shadow:var(--shadow);cursor:pointer;display:flex;align-items:center;justify-content:center;z-index:80}
.nq-chat-bubble svg{width:26px;height:26px}
.nq-chat-panel{position:fixed;right:20px;bottom:88px;width:min(340px,calc(100vw - 40px));max-height:min(480px,calc(100vh - 140px));background:var(--surface);border:1px solid var(--line);border-radius:var(--radius-lg);box-shadow:var(--shadow);display:flex;flex-direction:column;overflow:hidden;z-index:80}
.nq-chat-panel[hidden]{display:none}
.nq-chat-head{padding:.85rem 1rem;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;font-family:var(--font-display);font-weight:600;color:var(--ink)}
.nq-chat-close{background:none;border:none;color:var(--slate);cursor:pointer;font-size:1.1rem;line-height:1;padding:.2rem}
.nq-chat-messages{flex:1;overflow-y:auto;padding:.85rem 1rem;display:flex;flex-direction:column;gap:.6rem;font-size:.92rem}
.nq-chat-msg{max-width:85%;padding:.5rem .7rem;border-radius:10px;line-height:1.4;white-space:pre-wrap}
.nq-chat-msg--user{align-self:flex-end;background:var(--teal);color:var(--ink-900)}
.nq-chat-msg--bot{align-self:flex-start;background:var(--bg-alt);color:var(--ink);border:1px solid var(--line)}
.nq-chat-msg--pending{color:var(--slate);font-style:italic}
.nq-chat-form{display:flex;gap:.5rem;padding:.75rem;border-top:1px solid var(--line)}
.nq-chat-input{flex:1;border:1px solid var(--line);border-radius:8px;padding:.5rem .6rem;font:inherit;background:var(--bg);color:var(--ink)}
.nq-chat-send{background:var(--teal);color:var(--ink-900);border:none;border-radius:8px;padding:.5rem .9rem;font-weight:600;cursor:pointer}
.nq-chat-send:disabled{opacity:.6;cursor:default}
@media (max-width:520px){.nq-chat-panel{right:12px;left:12px;width:auto;bottom:80px}.nq-chat-bubble{right:16px;bottom:16px}}
