/* ==========================================================================
   Relay — site design system
   1. Fonts   2. Tokens & palettes   3. Base   4. Layout   5. Type
   6. Buttons & small parts   7. Header   8. Footer   9. Heroes
   10. Sections & components   11. Forms   12. Motion
   ========================================================================== */

/* 1. Fonts ---------------------------------------------------------------- */
@font-face {
  font-family: "Inter";
  src: url("/assets/fonts/inter-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Inter Tight";
  src: url("/assets/fonts/inter-tight-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900; font-style: normal; font-display: swap;
}

/* 2. Tokens ---------------------------------------------------------------
   Relay brand: near-black surfaces, white type, neutral greys and one
   electric blue used where it means something (actions, links, active
   states, connections). Interactive pieces carry the colour; backgrounds
   stay quiet.

   BRAND BLUE: #006EFD, sampled from the official logo
   (src/assets/img/brand/relay-original-on-black.png; the most common value
   among its opaque blue pixels). Buttons use it as-is (white text 4.52:1).
   Text and hover variants are tints and shades of the same hue, so they stay
   readable on the dark surfaces. Run `node scripts/contrast.mjs` after any
   change. See docs/BRAND-ASSETS.md. */
:root {
  color-scheme: dark;
  --font-sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-display: "Inter Tight", "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: ui-monospace, "Cascadia Mono", "SF Mono", Menlo, Consolas, monospace;

  --max: 1200px;
  --max-narrow: 760px;
  --gutter: clamp(16px, 4vw, 32px);
  --section-y: clamp(4rem, 8vw, 6.5rem);
  --header-h: 68px;

  --r-xs: 4px; --r-sm: 6px; --r: 10px; --r-lg: 14px; --r-xl: 20px;

  --ease: cubic-bezier(.2, .7, .2, 1);
  --ease-in-out: cubic-bezier(.65, 0, .35, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);       /* long, settled finish for entrances */
  --ease-snap: cubic-bezier(.3, 1.3, .5, 1);     /* tiny overshoot for small confirmations only */
  --dur-5: 1100ms;
  --dur-1: 140ms; --dur-2: 240ms; --dur-3: 420ms; --dur-4: 700ms;

  /* Surfaces and type */
  --bg: #08090B;            /* page background: near-black */
  --bg-2: #0E1014;          /* recessed areas, alternate sections */
  --surface: #121418;       /* cards and panels: graphite */
  --surface-2: #16191E;     /* raised rows inside panels: charcoal */
  --ink: #F4F6FA;
  --ink-2: #B9BFCA;
  --ink-3: #8D94A1;
  --line: #23262D;
  --line-2: #343945;
  --deco: #2C313B;          /* decorative strokes only; never text */
  --bezel: #2E323C;         /* device frames in illustrations */

  /* Brand blue (sampled from the logo, see above) */
  --accent: #006EFD;        /* logo blue: lines, rings, highlights */
  --accent-strong: #006EFD; /* primary buttons and filled states (white text) */
  --accent-hover: #005DD9;  /* button hover: a shade darker, more contrast */
  --accent-text: #66A8FE;   /* links and blue text on dark surfaces (logo blue + 40% white) */
  --accent-text-hover: #99C5FE; /* link hover (logo blue + 60% white) */
  --accent-soft: #062145;   /* tinted chips and icon wells (24% logo blue on --bg) */
  --accent-softer: #071932; /* selected rows, hover wash (16%) */
  --accent-ink: #FFFFFF;
  --accent-3: #4D9AFE;      /* lighter end of blue gradients (logo blue + 30% white) */
  --glow: 0, 110, 253;      /* rgb of --accent for soft rings */

  /* Deep panels (closing call to action, app sidebars) */
  --deep: #0A1122;
  --deep-2: #111B33;
  --on-deep: #F4F6FA;
  --on-deep-2: #AFBAD0;

  /* Status colours, tuned for AA text on their dark tints. The *-solid
     variants are fills that carry white text or icons. */
  --ok: #5DD392; --ok-soft: #0D291B; --ok-solid: #16794A;
  --warn: #F2B763; --warn-soft: #2D2110;
  --info: #6BCBF2; --info-soft: #0B2531;
  --danger: #FF8178; --danger-soft: #33130F; --danger-solid: #D3352B;
  --neutral: #A6ACB8; --neutral-soft: #1C1F25;

  --shadow-xs: 0 1px 2px rgba(0, 0, 0, .4);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4), 0 4px 12px rgba(0, 0, 0, .25);
  --shadow-md: 0 2px 4px rgba(0, 0, 0, .35), 0 12px 32px rgba(0, 0, 0, .4);
  --shadow-lg: 0 4px 10px rgba(0, 0, 0, .35), 0 28px 70px rgba(0, 0, 0, .55);
  --ring: 0 0 0 3px rgba(var(--glow), .4);
}

/* 3. Base ----------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 16px); }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-feature-settings: "cv11", "ss01";
  overflow-x: clip;
}
img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--accent-text); text-underline-offset: .2em; text-decoration-thickness: 1px; }
a:hover { color: var(--accent-text-hover); }
p { margin: 0 0 1em; }
ul, ol { margin: 0; padding: 0; }
:focus-visible { outline: 2px solid var(--accent-strong); outline-offset: 3px; border-radius: var(--r-xs); }
::selection { background: var(--accent-soft); color: var(--ink); }
main:focus { outline: none; }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--ink); color: var(--surface); padding: 10px 16px; border-radius: var(--r-sm);
  font-weight: 600; text-decoration: none; transition: top var(--dur-2) var(--ease);
}
.skip-link:focus { top: 12px; color: var(--surface); }
[hidden] { display: none !important; }

/* 4. Layout --------------------------------------------------------------- */
.container { width: 100%; max-width: calc(var(--max) + var(--gutter) * 2); margin-inline: auto; padding-inline: var(--gutter); }
.container-narrow { max-width: calc(var(--max-narrow) + var(--gutter) * 2); }
.section { padding-block: var(--section-y); position: relative; }
.section-tight { padding-block: clamp(3rem, 6vw, 4.5rem); }
.section-alt { background: linear-gradient(180deg, var(--bg) 0, var(--bg-2) 120px, var(--bg-2) calc(100% - 120px), var(--bg) 100%); }
.section-surface { background: var(--surface); border-block: 1px solid var(--line); }
.stack > * + * { margin-top: var(--stack, 1rem); }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
.grid-2.align-start { align-items: start; }
@media (max-width: 900px) { .grid-2 { grid-template-columns: 1fr; } }

/* 5. Type ----------------------------------------------------------------- */
h1, h2, h3, h4 { font-family: var(--font-display); color: var(--ink); margin: 0 0 .5em; font-weight: 680; text-wrap: balance; }
h1, .h1 { font-size: clamp(2.5rem, 6.2vw, 4.6rem); line-height: 1.04; letter-spacing: -.022em; }
h2, .h2 { font-size: clamp(2rem, 4.2vw, 3.1rem); line-height: 1.08; letter-spacing: -.018em; }
h3, .h3 { font-size: clamp(1.25rem, 2vw, 1.5rem); line-height: 1.2; letter-spacing: -.008em; }
h4 { font-size: 1.0625rem; letter-spacing: -.004em; line-height: 1.3; }
.lede { font-size: clamp(1.125rem, 1.6vw, 1.3rem); line-height: 1.55; color: var(--ink-2); max-width: 36em; text-wrap: pretty; }
.muted { color: var(--ink-3); }
.small { font-size: .9rem; }
.text-accent { color: var(--accent); }
.eyebrow {
  display: inline-flex; align-items: center; gap: .55em;
  font-size: .8125rem; font-weight: 650; letter-spacing: .08em; text-transform: uppercase;
  color: var(--accent-text); margin: 0 0 1.1rem;
}
.eyebrow::before { content: ""; width: 16px; height: 2px; border-radius: 2px; background: linear-gradient(90deg, var(--accent), var(--accent-3)); }
.section-head { max-width: 46rem; margin-bottom: clamp(2.5rem, 5vw, 3.75rem); }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head.center .lede { margin-inline: auto; }
.section-head p:last-child { margin-bottom: 0; }
.prose { max-width: 44rem; }
.prose h2 { font-size: clamp(1.5rem, 2.6vw, 1.9rem); margin-top: 2.2em; }
.prose h3 { margin-top: 1.8em; font-size: 1.2rem; }
.prose ul { padding-left: 1.2em; margin-bottom: 1em; }
.prose li { margin-bottom: .4em; }
.prose p, .prose li { color: var(--ink-2); }

/* 6. Buttons & small parts ------------------------------------------------ */
.btn {
  --btn-bg: var(--surface); --btn-fg: var(--ink); --btn-border: var(--line-2);
  display: inline-flex; align-items: center; justify-content: center; gap: .55em;
  min-height: 48px; padding: .75rem 1.3rem; border-radius: var(--r);
  font-weight: 620; font-size: 1rem; line-height: 1.2; letter-spacing: -.005em; text-decoration: none; white-space: nowrap;
  background: var(--btn-bg); color: var(--btn-fg); border: 1px solid var(--btn-border);
  box-shadow: var(--shadow-xs);
  transition: background var(--dur-1) var(--ease), border-color var(--dur-1) var(--ease), color var(--dur-1) var(--ease), box-shadow var(--dur-2) var(--ease), transform var(--dur-2) var(--ease);
}
.btn:hover { color: var(--btn-fg); border-color: var(--ink-3); box-shadow: var(--shadow-sm); }
.btn:active { transform: translateY(1px); }
.btn-primary { --btn-bg: var(--accent-strong); --btn-fg: var(--accent-ink); --btn-border: var(--accent-strong);
  box-shadow: 0 1px 0 rgba(255,255,255,.2) inset, 0 1px 2px rgba(0,0,0,.4), 0 6px 18px rgba(var(--glow), .22); }
.btn-primary:hover { --btn-bg: var(--accent-hover); border-color: var(--accent-hover); box-shadow: 0 1px 0 rgba(255,255,255,.2) inset, 0 2px 4px rgba(0,0,0,.4), 0 10px 28px rgba(var(--glow), .32); }
.btn-ghost { --btn-bg: transparent; --btn-border: transparent; box-shadow: none; }
.btn-ghost:hover { --btn-bg: var(--accent-softer); border-color: transparent; box-shadow: none; }
.btn-on-deep { --btn-bg: rgba(255,255,255,.06); --btn-fg: var(--on-deep); --btn-border: rgba(255,255,255,.22); box-shadow: none; }
.btn-on-deep:hover { --btn-bg: rgba(255,255,255,.12); border-color: rgba(255,255,255,.4); }
.btn-sm { min-height: 40px; padding: .5rem 1rem; font-size: .9375rem; border-radius: var(--r-sm); }
.btn-lg { min-height: 54px; padding: .9rem 1.6rem; font-size: 1.0625rem; }
/* Long labels may wrap on very narrow phones rather than widen the page. */
.btn { max-width: 100%; }
@media (max-width: 420px) { .btn { white-space: normal; text-align: center; } }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .55; cursor: not-allowed; }
.icon-arrow { width: 1em; height: 1em; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; transition: transform var(--dur-2) var(--ease); flex: none; }
a:hover > .icon-arrow, button:hover > .icon-arrow { transform: translateX(3px); }
.actions { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; }
.text-link { display: inline-flex; align-items: center; gap: .4em; font-weight: 620; color: var(--accent-text); text-decoration: none; }
.text-link:hover { color: var(--accent-text-hover); }

.badge {
  display: inline-flex; align-items: center; gap: .4em; padding: .2em .6em; border-radius: var(--r-xs);
  font-size: .75rem; font-weight: 650; letter-spacing: .02em; line-height: 1.4; white-space: nowrap;
  background: var(--neutral-soft); color: var(--neutral);
}
.badge-accent { background: var(--accent-soft); color: var(--accent-text); }
.badge-ok { background: var(--ok-soft); color: var(--ok); }
.badge-warn { background: var(--warn-soft); color: var(--warn); }
.badge-info { background: var(--info-soft); color: var(--info); }
.badge-danger { background: var(--danger-soft); color: var(--danger); }
.badge-dot::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.sample-tag {
  display: inline-flex; align-items: center; gap: .4em; padding: .25em .6em; border-radius: var(--r-xs);
  font-size: .6875rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  background: var(--surface); color: var(--ink-3); border: 1px dashed var(--line-2);
}
.chip-list { display: flex; flex-wrap: wrap; gap: .5rem; list-style: none; }
.chip-list li { padding: .45rem .8rem; border-radius: var(--r-sm); background: var(--surface); border: 1px solid var(--line); font-size: .9375rem; color: var(--ink-2); }

/* Official logo (src/assets/img/brand/web/, from the supplied wordmark). Only the
   height is set, so the artwork keeps its own proportions. 32px is its 1x size;
   it is never shown larger than the 3x file allows. */
.brand-logo { display: block; height: 32px; width: auto; }
@media (max-width: 600px) { .site-header .brand-logo { height: 28px; } }

/* 7. Header --------------------------------------------------------------- */
/* The blur sits on a pseudo-element: a backdrop-filter on the header itself would make
   it the containing block for the fixed mobile menu and clip the menu to the header's height. */
.site-header {
  position: sticky; top: 0; z-index: 50;
  border-bottom: 1px solid transparent;
  transition: border-color var(--dur-2) var(--ease);
}
.site-header::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  -webkit-backdrop-filter: saturate(1.6) blur(14px); backdrop-filter: saturate(1.6) blur(14px);
  transition: background var(--dur-2) var(--ease);
}
.site-header.is-scrolled { border-bottom-color: var(--line); }
.site-header.is-scrolled::before, body.nav-open .site-header::before { background: color-mix(in srgb, var(--bg) 92%, transparent); }
.header-bar { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; min-height: var(--header-h); }
.brand { display: inline-flex; align-items: center; gap: .6rem; text-decoration: none; color: var(--ink); flex: none; }
.brand:hover { color: var(--ink); }
.site-nav { display: flex; align-items: center; gap: 1.25rem; }
.nav-list { display: flex; align-items: center; gap: .15rem; list-style: none; }
.nav-item { position: relative; }
.nav-link {
  display: inline-flex; align-items: center; gap: .3rem; padding: .55rem .75rem; border-radius: var(--r-sm);
  font-size: .9375rem; font-weight: 550; color: var(--ink-2); text-decoration: none; background: none; border: 0;
  transition: color var(--dur-1) var(--ease), background var(--dur-1) var(--ease);
}
.nav-link:hover, .nav-item.is-open > .nav-link { color: var(--ink); background: color-mix(in srgb, var(--accent-soft) 55%, transparent); }
.nav-link[aria-current="page"], .nav-item[data-current] > .nav-link { color: var(--ink); }
.nav-link[aria-current="page"]::after, .nav-item[data-current] > .nav-link::after {
  content: ""; position: absolute; left: .75rem; right: .75rem; bottom: 2px; height: 2px; border-radius: 2px; background: var(--accent);
}
.nav-link { position: relative; }
.chev { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; transition: transform var(--dur-2) var(--ease); }
.nav-item.is-open .chev { transform: rotate(180deg); }
.nav-menu {
  position: absolute; top: calc(100% + 10px); left: 50%; width: min(400px, 90vw);
  translate: -50% 0; padding: .5rem; border-radius: var(--r-lg);
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-lg);
  opacity: 0; visibility: hidden; transform: translateY(-6px);
  transition: opacity var(--dur-2) var(--ease), transform var(--dur-2) var(--ease), visibility 0s linear var(--dur-2);
}
.nav-menu::before { content: ""; position: absolute; inset: -12px 0 auto; height: 12px; } /* hover bridge */
.nav-item.is-open > .nav-menu,
html:not(.js) .nav-item:focus-within > .nav-menu { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
@media (hover: hover) and (min-width: 961px) { html:not(.js) .nav-item:hover > .nav-menu { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; } }
.menu-grid { list-style: none; display: grid; gap: 2px; }
.menu-link { display: flex; gap: .85rem; align-items: flex-start; padding: .75rem; border-radius: var(--r); text-decoration: none; color: var(--ink); transition: background var(--dur-1) var(--ease); }
.menu-link:hover, .menu-link[aria-current="page"] { background: var(--accent-softer); color: var(--ink); }
.menu-link b { display: block; font-weight: 620; font-size: .9375rem; }
.menu-link small { display: block; color: var(--ink-3); font-size: .8125rem; line-height: 1.4; margin-top: 2px; }
.menu-icon { width: 36px; height: 36px; flex: none; display: grid; place-items: center; border-radius: var(--r-sm); background: var(--accent-soft); }
.menu-icon svg { width: 20px; height: 20px; fill: none; stroke: var(--accent-text); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.menu-footer { display: flex; align-items: center; justify-content: space-between; margin-top: .35rem; padding: .75rem; border-top: 1px solid var(--line); font-size: .875rem; font-weight: 600; text-decoration: none; color: var(--accent-text); }
.nav-toggle { display: none; }
.nav-contact { display: none; }

@media (max-width: 960px) {
  .nav-toggle {
    display: inline-grid; place-items: center; width: 44px; height: 44px; margin-right: -8px;
    background: none; border: 0; border-radius: var(--r-sm); color: var(--ink);
  }
  .nav-toggle-bars, .nav-toggle-bars::before, .nav-toggle-bars::after {
    display: block; width: 20px; height: 2px; border-radius: 2px; background: currentColor; content: "";
    transition: transform var(--dur-2) var(--ease), opacity var(--dur-1);
  }
  .nav-toggle-bars { position: relative; }
  .nav-toggle-bars::before { position: absolute; top: -6px; }
  .nav-toggle-bars::after { position: absolute; top: 6px; }
  .nav-toggle[aria-expanded="true"] .nav-toggle-bars { background: transparent; }
  .nav-toggle[aria-expanded="true"] .nav-toggle-bars::before { transform: translateY(6px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] .nav-toggle-bars::after { transform: translateY(-6px) rotate(-45deg); }
  html:not(.js) .nav-toggle { display: none; }
  html:not(.js) .header-bar { flex-wrap: wrap; padding-block: .5rem; }
  html:not(.js) .site-nav { flex-wrap: wrap; }

  html.js .site-nav {
    position: fixed; inset: var(--header-h) 0 0; z-index: 49;
    flex-direction: column; align-items: stretch; gap: 1rem;
    padding: 1rem var(--gutter) 2rem; overflow-y: auto; overscroll-behavior: contain;
    background: var(--bg);
    opacity: 0; visibility: hidden; transform: translateY(-8px);
    transition: opacity var(--dur-2) var(--ease), transform var(--dur-2) var(--ease), visibility 0s linear var(--dur-2);
  }
  html.js .site-nav.is-open { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
  html.js .nav-list { flex-direction: column; align-items: stretch; gap: 0; }
  html.js .nav-item { border-bottom: 1px solid var(--line); }
  html.js .nav-link { width: 100%; justify-content: space-between; padding: 1rem .25rem; font-size: 1.125rem; font-weight: 600; color: var(--ink); border-radius: 0; }
  html.js .nav-link:hover { background: none; }
  html.js .nav-link[aria-current="page"]::after, html.js .nav-item[data-current] > .nav-link::after { display: none; }
  html.js .nav-link[aria-current="page"] { color: var(--accent-text); }
  html.js .nav-menu {
    position: static; translate: none; width: auto; padding: 0 0 .75rem; border: 0; box-shadow: none; background: none;
    opacity: 1; visibility: visible; transform: none; display: none;
  }
  html.js .nav-item.is-open > .nav-menu { display: block; }
  html.js .nav-menu::before { display: none; }
  html.js .menu-link { padding: .65rem .25rem; }
  html.js .menu-footer { border-top: 0; padding: .65rem .25rem; }
  html.js .nav-cta { width: 100%; min-height: 52px; font-size: 1.0625rem; margin-top: .5rem; }
  html.js .nav-contact { display: block; padding-top: .5rem; }
  body.nav-open { overflow: hidden; }
}

/* 8. Footer --------------------------------------------------------------- */
.site-footer { background: var(--bg); border-top: 1px solid var(--line); padding-top: clamp(3rem, 6vw, 4.5rem); font-size: .9375rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.3fr; gap: 2.5rem; padding-bottom: 3rem; }
.footer-brand p { color: var(--ink-3); max-width: 22rem; margin: 1rem 0; }
/* Email and phone links (footer, About, contact page) */
.contact-links { list-style: none; display: grid; gap: .35rem; margin: 0; }
.contact-links a, .contact-method { display: inline-flex; align-items: center; gap: .6rem; min-height: 40px; color: var(--ink); text-decoration: none; font-weight: 600; overflow-wrap: anywhere; }
.contact-links svg, .contact-method svg { width: 32px; height: 32px; flex: none; padding: 7px; border-radius: 9px; background: var(--accent-softer); border: 1px solid var(--accent-soft); fill: none; stroke: var(--accent-text); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; transition: background var(--dur-2), border-color var(--dur-2), transform var(--dur-2) var(--ease-out); }
.contact-links a:hover, .contact-method:hover { color: var(--accent-text); }
.contact-links a:hover svg, .contact-method:hover svg { background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 50%, transparent); transform: translateY(-1px); }
.contact-label { font-size: .8125rem; font-weight: 650; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); margin: 1.75rem 0 .6rem; }
.footer-heading { font-family: var(--font-sans); font-size: .8125rem; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); font-weight: 650; margin-bottom: 1rem; }
.footer-col ul { list-style: none; display: grid; gap: .55rem; }
.footer-col a:not(.btn) { color: var(--ink-2); text-decoration: none; }
.footer-col a:not(.btn):hover { color: var(--accent-text); text-decoration: underline; }
.footer-cta p { color: var(--ink-3); }
.footer-base { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; align-items: center; padding-block: 1.25rem 1.75rem; border-top: 1px solid var(--line); color: var(--ink-3); font-size: .8125rem; }
.footer-base p { margin: 0; }
.footer-base .footer-note { flex: 1 1 18rem; } /* takes its own line on narrow screens */
.footer-base a { color: var(--ink-2); }
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-brand, .footer-cta { grid-column: 1 / -1; } }
@media (max-width: 420px) { .footer-grid { grid-template-columns: 1fr; } }

/* 9. Heroes --------------------------------------------------------------- */
.hero { position: relative; padding-block: clamp(3rem, 7vw, 5.5rem) clamp(4rem, 8vw, 6.5rem); isolation: isolate; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr); gap: clamp(2.5rem, 5vw, 4.5rem); align-items: center; }
.hero h1 .accent { color: var(--accent); }
.hero .lede { margin-bottom: 2rem; }
/* The hero headline fills the line on narrow screens instead of balancing into a
   narrow, left-heavy block (the cause of the empty right-hand strip on phones). */
.hero h1 { text-wrap: wrap; }
@media (max-width: 640px) {
  .hero { padding-block: 1.75rem 3rem; }
  .hero h1 { font-size: clamp(2.45rem, 11.2vw, 3.2rem); line-height: 1.02; margin-bottom: .45em; }
  .hero .lede { font-size: 1.0625rem; margin-bottom: 1.4rem; }
  .hero .eyebrow { font-size: .75rem; margin-bottom: .85rem; }
  .hero-note { margin-top: 1rem; font-size: .8125rem; gap: .3rem 1rem; }
  .hero-grid { gap: 2rem; }
}
.hero-note { margin-top: 1.5rem; font-size: .875rem; color: var(--ink-3); display: flex; flex-wrap: wrap; gap: .4rem 1.25rem; list-style: none; }
.hero-note li { display: inline-flex; align-items: center; gap: .45rem; }
.hero-note svg { width: 16px; height: 16px; fill: none; stroke: var(--accent-text); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
@media (max-width: 1100px) { .hero-grid { grid-template-columns: 1fr; } .hero-copy { max-width: 40rem; } }

.page-hero { position: relative; padding-block: clamp(3rem, 7vw, 5.5rem) clamp(2.5rem, 5vw, 4rem); isolation: isolate; }
.page-hero h1 { font-size: clamp(2.4rem, 5.4vw, 4rem); max-width: 16ch; }
.page-hero .lede { margin-bottom: 2rem; }
.page-hero.center { text-align: center; }
.page-hero.center h1, .page-hero.center .lede { margin-inline: auto; }
.page-hero.center .actions { justify-content: center; }
.breadcrumb { display: flex; gap: .5rem; list-style: none; font-size: .875rem; color: var(--ink-3); margin-bottom: 1.5rem; }
.breadcrumb a { color: var(--ink-3); text-decoration: none; }
.breadcrumb a:hover { color: var(--accent-text); text-decoration: underline; }
.breadcrumb li + li::before { content: "/"; margin-right: .5rem; color: var(--line-2); }

/* 10. Sections & components ---------------------------------------------- */
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: clamp(1.5rem, 2.5vw, 2rem); box-shadow: var(--shadow-xs);
}
.card-link { text-decoration: none; color: inherit; display: block; transition: border-color var(--dur-2) var(--ease), box-shadow var(--dur-2) var(--ease), transform var(--dur-2) var(--ease); }
.card-link:hover { color: inherit; border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); box-shadow: var(--shadow-md); transform: translateY(-2px); }

/* Mini illustrations (services overview and the homepage story on phones; pure HTML/CSS) */
.mini-browser { border: 1px solid var(--line); border-bottom: 0; border-radius: var(--r-lg) var(--r-lg) 0 0; background: var(--surface-2); box-shadow: var(--shadow-md); overflow: hidden; transform: translateY(8px); transition: transform var(--dur-4) var(--ease); }
.mini-bar { display: flex; align-items: center; gap: 5px; padding: 10px 12px; border-bottom: 1px solid var(--line); background: var(--surface); }
.mini-bar i { width: 8px; height: 8px; border-radius: 50%; background: var(--line-2); }
.mini-bar span { margin-left: 10px; flex: 1; max-width: 220px; height: 18px; border-radius: 5px; background: var(--bg-2); font-size: 10px; line-height: 18px; padding-left: 8px; color: var(--ink-3); font-style: normal; }
.mini-site { display: grid; grid-template-columns: 1.2fr 1fr; gap: 16px; padding: 22px; min-height: 230px; background: linear-gradient(135deg, #1f3b2d, #2f5a43); color: #f3efe4; }
.mini-site b { font-family: var(--font-display); font-size: 1.35rem; line-height: 1.1; letter-spacing: -.02em; display: block; margin-bottom: 10px; }
.mini-site .ln { height: 7px; border-radius: 4px; background: rgba(243,239,228,.35); margin-bottom: 7px; }
.mini-site .ln.s { width: 60%; }
.mini-site .cta { display: inline-block; margin-top: 10px; padding: 7px 12px; border-radius: 6px; background: #e9c46a; color: #1f3b2d; font-size: 11px; font-weight: 700; }
.mini-form { background: #fbf8f1; border-radius: 8px; padding: 12px; color: #1f3b2d; font-size: 10.5px; font-weight: 600; display: grid; gap: 7px; align-content: start; }
.mini-form .f { height: 20px; border-radius: 5px; border: 1px solid #ddd5c4; background: #fff; }
.mini-form .b { height: 22px; border-radius: 5px; background: #2f5a43; }
.mini-sections { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; padding: 14px 22px 22px; background: #fbf8f1; }
.mini-sections div { height: 54px; border-radius: 6px; background: #efe8d8; }

.mini-flow { display: grid; gap: 8px; padding-bottom: 1.75rem; }
.mini-step { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: var(--r); background: var(--surface-2); border: 1px solid var(--line); font-size: .875rem; font-weight: 550; transition: transform var(--dur-3) var(--ease), border-color var(--dur-3); }
.mini-step .dot { width: 26px; height: 26px; flex: none; border-radius: 7px; display: grid; place-items: center; }
.mini-step .dot svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.mini-step small { margin-left: auto; font-size: .75rem; font-weight: 600; }
.mini-step:nth-child(2) { margin-left: 18px; } .mini-step:nth-child(3) { margin-left: 36px; }
.ev { background: var(--info-soft); color: var(--info); } .ac { background: var(--accent-soft); color: var(--accent-text); } .nt { background: var(--warn-soft); color: var(--warn); } .rc { background: var(--ok-soft); color: var(--ok); }

.mini-dash { display: grid; grid-template-columns: 56px 1fr; border: 1px solid var(--line); border-bottom: 0; border-radius: var(--r-lg) var(--r-lg) 0 0; overflow: hidden; background: var(--surface-2); box-shadow: var(--shadow-md); min-height: 150px; transform: translateY(8px); transition: transform var(--dur-4) var(--ease); }
.mini-dash .side { background: var(--deep); display: grid; align-content: start; gap: 9px; padding: 14px 12px; }
.mini-dash .side i { height: 8px; border-radius: 3px; background: rgba(255,255,255,.18); }
.mini-dash .side i:first-child { background: var(--accent); }
.mini-dash .main { padding: 12px; display: grid; gap: 8px; grid-template-columns: repeat(3, 1fr); align-content: start; }
.mini-dash .kpi { border-radius: 7px; background: var(--surface); border: 1px solid var(--line); padding: 8px; font-size: 10px; color: var(--ink-3); }
.mini-dash .kpi b { display: block; font-size: 15px; color: var(--ink); font-family: var(--font-display); }
.mini-dash .row { grid-column: 1 / -1; height: 18px; border-radius: 5px; background: var(--surface); border: 1px solid var(--line); position: relative; }
.mini-dash .row::after { content: ""; position: absolute; right: 6px; top: 5px; width: 30px; height: 6px; border-radius: 3px; background: var(--ok-soft); }
.mini-dash .row:nth-of-type(5)::after { background: var(--warn-soft); }

/* Steps (process) */
.steps { list-style: none; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 1rem; counter-reset: step; position: relative; }
.steps::before { content: ""; position: absolute; top: 21px; left: 22px; right: 22px; height: 2px; background: var(--line); }
.steps::after { content: ""; position: absolute; top: 21px; left: 22px; height: 2px; width: calc((100% - 44px) * var(--progress, 0)); background: linear-gradient(90deg, var(--accent), var(--accent-3)); transition: width 1.4s var(--ease); }
.steps.is-in { --progress: 1; }
html:not(.js) .steps { --progress: 1; }
.step { position: relative; z-index: 1; }
.step-num {
  counter-increment: step; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; margin-bottom: 1.25rem;
  background: var(--surface); border: 1px solid var(--line-2); box-shadow: var(--shadow-sm);
  font-family: var(--font-display); font-weight: 700; color: var(--accent-text);
}
.step-num::before { content: counter(step); }
.step h3 { font-size: 1.125rem; margin-bottom: .35rem; }
.step p { color: var(--ink-2); font-size: .9688rem; margin: 0; }
@media (max-width: 960px) {
  .steps { grid-template-columns: 1fr; gap: 0; }
  .steps::before, .steps::after { top: 22px; bottom: 22px; left: 21px; right: auto; width: 2px; height: auto; }
  .steps::after { height: calc((100% - 44px) * var(--progress, 0)); bottom: auto; transition-property: height; }
  .step { display: grid; grid-template-columns: 44px 1fr; gap: 0 1.25rem; padding-bottom: 1.75rem; }
  .step:last-child { padding-bottom: 0; }
  .step-num { grid-row: span 2; margin: 0; }
}

/* Principles with hover focus */
.principles { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(2rem, 6vw, 5rem); align-items: start; }
.principles .section-head { position: sticky; top: calc(var(--header-h) + 2rem); margin-bottom: 0; }
.principle-list { list-style: none; display: grid; gap: .75rem; }
.principle { display: grid; grid-template-columns: 44px 1fr; gap: 1.1rem; padding: 1.4rem 1.5rem; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); transition: opacity var(--dur-3) var(--ease), border-color var(--dur-3) var(--ease), box-shadow var(--dur-3) var(--ease), transform var(--dur-3) var(--ease); }
.principle h3 { font-size: 1.125rem; margin-bottom: .3rem; }
.principle p { margin: 0; color: var(--ink-2); font-size: .9688rem; }
.principle-icon { width: 44px; height: 44px; border-radius: 11px; display: grid; place-items: center; background: var(--accent-softer); border: 1px solid var(--accent-soft); }
.principle-icon svg { width: 22px; height: 22px; fill: none; stroke: var(--accent-text); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
@media (hover: hover) {
  .principle-list.is-focusing:not(:hover) .principle.is-focus { border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); box-shadow: var(--shadow-md); transform: translateX(4px); }
  .principle-list:hover .principle { opacity: .55; }
  .principle-list:hover .principle:hover { opacity: 1; border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); box-shadow: var(--shadow-md); transform: translateX(4px); }
}
@media (max-width: 900px) { .principles { grid-template-columns: 1fr; } .principles .section-head { position: static; } }

/* Feature grid (service pages) — varied rhythm, not uniform icon cards */
.features { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: var(--r-xl); overflow: hidden; background: var(--line); gap: 1px; }
.feature { background: var(--surface); padding: clamp(1.5rem, 2.5vw, 2rem); transition: background var(--dur-2) var(--ease); }
.feature:hover { background: var(--surface-2); }
.feature h3 { font-size: 1.0625rem; margin: 1rem 0 .35rem; letter-spacing: -.01em; }
.feature p { margin: 0; color: var(--ink-2); font-size: .9375rem; }
.feature-icon { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; background: var(--accent-soft); }
.feature-icon svg { width: 20px; height: 20px; fill: none; stroke: var(--accent-text); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
@media (max-width: 900px) { .features { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .features { grid-template-columns: 1fr; } }

/* Check list */
.check-list { list-style: none; display: grid; gap: .8rem; }
.check-list li { position: relative; display: grid; grid-template-columns: 22px 1fr; gap: .75rem; color: var(--ink-2); }
.check-list li::before { content: ""; width: 22px; height: 22px; border-radius: 6px; margin-top: .1em; background: var(--accent-soft); }
.check-list li::after {
  content: ""; position: absolute; left: 4px; top: calc(.1em + 4px); width: 14px; height: 14px; background: var(--accent-text);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='m4 8.2 2.6 2.6L12 5.4' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='m4 8.2 2.6 2.6L12 5.4' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
}
.check-list b { color: var(--ink); font-weight: 620; }
.x-list li::before { background: var(--neutral-soft); }
.x-list li::after { background: var(--neutral);
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M5 5l6 6M11 5l-6 6' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
          mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M5 5l6 6M11 5l-6 6' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E"); }

/* Scope factors */
.factor-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.factor-cloud { display: flex; flex-wrap: wrap; gap: .6rem; list-style: none; }
.factor-cloud li {
  padding: .6rem 1rem; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); font-weight: 560; font-size: .9375rem; color: var(--ink-2);
  box-shadow: var(--shadow-xs); transition: transform var(--dur-2) var(--ease), border-color var(--dur-2), color var(--dur-2);
}
.factor-cloud li:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); color: var(--ink); }
@media (max-width: 900px) { .factor-grid { grid-template-columns: 1fr; } }

/* CTA band */
.cta-band { padding-block: 0 clamp(3rem, 6vw, 4.5rem); }
.cta-panel .btn-on-deep { --btn-bg: color-mix(in srgb, var(--deep-2) 92%, #fff); }
.cta-panel .btn-on-deep:hover { --btn-bg: color-mix(in srgb, var(--deep-2) 78%, #fff); }
.section-tight + .cta-band, .page-hero + .cta-band { padding-top: var(--section-y); }
.cta-panel {
  position: relative; overflow: hidden; isolation: isolate;
  border-radius: clamp(var(--r-lg), 3vw, 28px);
  padding: clamp(2.5rem, 7vw, 5rem) clamp(1.5rem, 6vw, 5rem);
  background: var(--deep); color: var(--on-deep); border: 1px solid color-mix(in srgb, var(--accent) 22%, var(--line));
  display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 2.5rem; align-items: end;
}
.cta-panel::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: radial-gradient(60% 120% at 100% 0%, rgba(var(--glow), .28), transparent 65%);
}
.cta-panel h2 { color: var(--on-deep); font-size: clamp(2rem, 4.6vw, 3.4rem); margin-bottom: .75rem; }
.cta-panel p { color: var(--on-deep-2); font-size: 1.125rem; max-width: 34rem; margin: 0; }
.cta-panel .actions { justify-content: flex-end; }
.cta-panel .eyebrow { color: var(--on-deep-2); }
.cta-panel .eyebrow::before { background: var(--accent-3); }
.cta-panel .cta-email { display: block; width: 100%; text-align: right; margin-top: .25rem; font-size: .9375rem; color: var(--on-deep-2); }
.cta-panel .cta-email a { color: var(--on-deep); }
@media (max-width: 860px) { .cta-panel { grid-template-columns: 1fr; align-items: start; } .cta-panel .actions { justify-content: flex-start; } .cta-panel .cta-email { text-align: left; } }

/* Callout */
.callout { display: grid; grid-template-columns: 40px 1fr; gap: 1rem; padding: 1.25rem 1.4rem; border-radius: var(--r-lg); background: var(--accent-softer); border: 1px solid var(--accent-soft); }
.callout p { margin: 0; color: var(--ink-2); font-size: .9688rem; }
.callout b { color: var(--ink); }
.callout-icon { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; background: var(--surface); border: 1px solid var(--accent-soft); }
.callout-icon svg { width: 20px; height: 20px; fill: none; stroke: var(--accent-text); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* Tabs (generic, used by the home preview and demo page) */
.tablist { display: inline-flex; gap: 4px; padding: 4px; border-radius: calc(var(--r) + 4px); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-xs); max-width: 100%; overflow-x: auto; scrollbar-width: none; position: relative; }
.tablist::-webkit-scrollbar { display: none; }
.tab {
  position: relative; z-index: 1; display: inline-flex; align-items: center; gap: .5rem; padding: .6rem 1rem; min-height: 42px; border-radius: var(--r);
  border: 0; background: none; color: var(--ink-2); font-weight: 600; font-size: .9375rem; white-space: nowrap;
  transition: color var(--dur-2) var(--ease), background var(--dur-2) var(--ease);
}
.tab:hover { color: var(--ink); }
.tab[aria-selected="true"] { color: var(--accent-ink); background: var(--accent-strong); box-shadow: 0 4px 12px color-mix(in srgb, var(--accent) 30%, transparent); }
.tab svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.tabpanel { animation: panel-in var(--dur-3) var(--ease); }
.tabpanel:focus-visible { outline-offset: 6px; }
@keyframes panel-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* Preview layout on home */
.preview-shell { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.6fr); gap: clamp(1.5rem, 4vw, 3.5rem); align-items: center; margin-top: 2.5rem; }
.preview-copy h3 { font-size: clamp(1.5rem, 2.6vw, 2rem); }
.preview-copy p { color: var(--ink-2); }
.preview-copy .check-list { margin: 1.25rem 0 1.75rem; font-size: .9688rem; }
@media (max-width: 1020px) { .preview-shell { grid-template-columns: 1fr; } }

/* Service row (services overview) */
.service-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: clamp(2rem, 6vw, 5rem); align-items: center; padding-block: clamp(3rem, 6vw, 5rem); border-top: 1px solid var(--line); }
.service-row:first-of-type { border-top: 0; padding-top: 0; }
.service-row.flip > :first-child { order: 2; }
.service-row h2 { font-size: clamp(1.8rem, 3.4vw, 2.5rem); }
.service-row .meta { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; margin: 1.5rem 0 2rem; }
.service-row .meta h3 { font-family: var(--font-sans); font-size: .8125rem; font-weight: 650; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); margin-bottom: .6rem; }
.service-row .meta ul { list-style: none; display: grid; gap: .4rem; font-size: .9375rem; color: var(--ink-2); }
.service-row .meta li::before { content: "—"; color: var(--accent); margin-right: .5rem; }
@media (max-width: 900px) { .service-row { grid-template-columns: 1fr; } .service-row.flip > :first-child { order: 0; } }
@media (max-width: 520px) { .service-row .meta { grid-template-columns: 1fr; } }

/* Relay progression (services) */
.relay-path { list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; position: relative; margin-top: 1rem; }
.relay-path li { position: relative; padding: 1.5rem; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-xs); }
.relay-path li:not(:last-child)::after {
  content: ""; position: absolute; top: 50%; right: -1rem; width: 1rem; height: 2px; background: linear-gradient(90deg, var(--accent), var(--accent-3));
}
.relay-path .lvl { font-size: .75rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--accent-text); }
.relay-path b { display: block; font-family: var(--font-display); font-size: 1.25rem; letter-spacing: -.02em; margin: .35rem 0 .25rem; }
.relay-path p { margin: 0; font-size: .9375rem; color: var(--ink-2); }
.relay-path a { text-decoration: none; color: inherit; }
.relay-path a::before { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.relay-path li:has(a:hover) { border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); box-shadow: var(--shadow-md); }
@media (max-width: 760px) { .relay-path { grid-template-columns: 1fr; } .relay-path li:not(:last-child)::after { top: auto; bottom: -1rem; right: auto; left: 2rem; width: 2px; height: 1rem; } }

/* Comparison table */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); }
.compare { width: 100%; border-collapse: collapse; min-width: 640px; font-size: .9375rem; }
.compare th, .compare td { padding: 1rem 1.25rem; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
.compare thead th { font-family: var(--font-display); font-size: 1rem; background: var(--surface-2); }
.compare tbody th { font-weight: 600; color: var(--ink); width: 24%; }
.compare td { color: var(--ink-2); }
.compare tr:last-child > * { border-bottom: 0; }

/* FAQ accordion */
.faq-group + .faq-group { margin-top: 3rem; }
.faq-group h2 { font-size: clamp(1.4rem, 2.4vw, 1.75rem); margin-bottom: 1rem; }
.faq-list { border-top: 1px solid var(--line); }
.faq-item { border-bottom: 1px solid var(--line); }
.faq-item summary {
  list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  padding: 1.25rem .25rem; font-family: var(--font-display); font-weight: 620; font-size: 1.125rem; letter-spacing: -.004em; color: var(--ink);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary:hover { color: var(--accent-text); }
.faq-item summary::after {
  content: ""; flex: none; width: 28px; height: 28px; border-radius: 8px; background: var(--accent-softer);
  background-image: linear-gradient(var(--accent-text), var(--accent-text)), linear-gradient(var(--accent-text), var(--accent-text));
  background-size: 12px 2px, 2px 12px; background-position: center; background-repeat: no-repeat;
  transition: transform var(--dur-2) var(--ease), background-size var(--dur-2) var(--ease);
}
.faq-item[open] summary::after { background-size: 12px 2px, 2px 0; transform: rotate(180deg); }
.faq-answer { padding: 0 .25rem 1.4rem; color: var(--ink-2); max-width: 46rem; }
.faq-answer p:last-child { margin-bottom: 0; }
.faq-item[open] .faq-answer { animation: panel-in var(--dur-3) var(--ease); }
.faq-nav { position: sticky; top: calc(var(--header-h) + 2rem); display: grid; gap: .25rem; list-style: none; }
.faq-nav a { display: block; padding: .5rem .75rem; border-radius: var(--r-sm); color: var(--ink-2); text-decoration: none; font-weight: 550; font-size: .9375rem; }
.faq-nav a:hover { background: var(--accent-softer); color: var(--ink); }
.faq-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: clamp(2rem, 5vw, 4rem); align-items: start; }
@media (max-width: 860px) { .faq-layout { grid-template-columns: 1fr; } .faq-nav { position: static; display: flex; flex-wrap: wrap; } }

/* Timeline (how it works) */
.timeline { list-style: none; position: relative; display: grid; gap: 0; }
.timeline::before { content: ""; position: absolute; left: 27px; top: 28px; bottom: 28px; width: 2px; background: var(--line); }
.timeline-fill { position: absolute; left: 27px; top: 28px; width: 2px; height: calc(var(--fill, 0) * (100% - 56px)); background: linear-gradient(var(--accent), var(--accent-3)); border-radius: 2px; }
.t-step { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 1.5rem; padding-bottom: clamp(2rem, 4vw, 3rem); position: relative; transition: opacity var(--dur-3) var(--ease); }
.t-step:last-child { padding-bottom: 0; }
.t-marker { width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; background: var(--surface); border: 1px solid var(--line-2); box-shadow: var(--shadow-sm); position: relative; z-index: 1; font-family: var(--font-display); font-weight: 700; font-size: 1.125rem; color: var(--ink-3); transition: background var(--dur-3) var(--ease), color var(--dur-3) var(--ease), border-color var(--dur-3) var(--ease), transform var(--dur-3) var(--ease); }
.t-body { padding-top: .6rem; }
.t-body h2 { font-size: clamp(1.35rem, 2.4vw, 1.75rem); margin-bottom: .4rem; }
.t-body > p { color: var(--ink-2); max-width: 38rem; }
.t-detail { display: flex; flex-wrap: wrap; gap: .5rem; list-style: none; margin-top: .75rem; }
.t-detail li { font-size: .8438rem; padding: .3rem .65rem; border-radius: var(--r-xs); background: var(--surface); border: 1px solid var(--line); color: var(--ink-2); }
.t-who { font-size: .8125rem; font-weight: 650; color: var(--ink-3); letter-spacing: .04em; text-transform: uppercase; margin-bottom: .3rem; }
html.js .timeline[data-timeline] .t-step .t-body h2 { transition: color var(--dur-3) var(--ease); }
html.js .timeline[data-timeline] .t-step.is-active .t-body h2 { color: var(--accent-text); }
.t-step.is-active .t-marker, .t-step.is-past .t-marker { background: var(--accent-strong); color: var(--accent-ink); border-color: var(--accent-strong); }
.t-step.is-active .t-marker { transform: scale(1.06); box-shadow: 0 0 0 6px var(--accent-soft); }
@media (max-width: 560px) { .timeline::before, .timeline-fill { left: 21px; top: 22px; } .t-step { grid-template-columns: 44px minmax(0, 1fr); gap: 1rem; } .t-marker { width: 44px; height: 44px; border-radius: 12px; font-size: 1rem; } .t-body { padding-top: .35rem; } }

/* Stat-free "what you get" split cards */
.split-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; }
.split-cards .card h3 { font-size: 1.2rem; }
.split-cards .card p { color: var(--ink-2); margin: 0; }
@media (max-width: 760px) { .split-cards { grid-template-columns: 1fr; } }

/* 11. Forms --------------------------------------------------------------- */
.form-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-xl); padding: clamp(1.5rem, 4vw, 2.75rem); box-shadow: var(--shadow-md); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem 1.25rem; }
.form-grid .full { grid-column: 1 / -1; }
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } }
.field { display: grid; gap: .4rem; align-content: start; }
.field label, .field legend { font-weight: 600; font-size: .9375rem; color: var(--ink); padding: 0; }
.field .opt { font-weight: 450; color: var(--ink-3); font-size: .875rem; }
.field .hint { font-size: .8438rem; color: var(--ink-3); margin: 0; }
.input, .select, .textarea {
  width: 100%; min-height: 48px; padding: .7rem .9rem; border-radius: var(--r-sm);
  border: 1px solid var(--line-2); background: var(--bg-2); color: var(--ink); font-size: 1rem;
  transition: border-color var(--dur-1) var(--ease), box-shadow var(--dur-1) var(--ease);
}
.input::placeholder, .textarea::placeholder { color: color-mix(in srgb, var(--ink-3) 75%, transparent); }
.input:hover, .select:hover, .textarea:hover { border-color: var(--ink-3); }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--accent-strong); box-shadow: var(--ring); }
.textarea { min-height: 140px; resize: vertical; line-height: 1.5; }
.select option { background: var(--surface); color: var(--ink); }
.select { appearance: none; padding-right: 2.5rem; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M3 4.5 6 7.5 9 4.5' fill='none' stroke='%238D94A1' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right .9rem center; background-size: 12px; }
.field[data-invalid] .input, .field[data-invalid] .select, .field[data-invalid] .textarea { border-color: var(--danger); }
.field[data-invalid] .input:focus, .field[data-invalid] .select:focus, .field[data-invalid] .textarea:focus { box-shadow: 0 0 0 3px color-mix(in srgb, var(--danger) 25%, transparent); }
.field-error { display: none; font-size: .8438rem; color: var(--danger); font-weight: 550; margin: 0; }
.field[data-invalid] .field-error { display: flex; gap: .35rem; align-items: center; }
.field-error::before { content: "!"; display: inline-grid; place-items: center; width: 16px; height: 16px; border-radius: 50%; background: var(--danger); color: var(--bg); font-size: 11px; font-weight: 800; flex: none; }
fieldset.field { border: 0; margin: 0; padding: 0; min-width: 0; }
.choice-group { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem; margin-top: .25rem; }
.choice-group.inline { display: flex; flex-wrap: wrap; }
@media (max-width: 480px) { .choice-group { grid-template-columns: 1fr; } }
.choice { position: relative; display: flex; align-items: flex-start; gap: .7rem; padding: .85rem 1rem; border-radius: var(--r); border: 1px solid var(--line-2); background: var(--bg-2); cursor: pointer; transition: border-color var(--dur-1), background var(--dur-1), box-shadow var(--dur-1); font-size: .9375rem; }
.choice:hover { border-color: var(--ink-3); }
.choice input { appearance: none; flex: none; width: 18px; height: 18px; margin: .15em 0 0; border-radius: 50%; border: 1.5px solid var(--ink-3); background: var(--bg); display: grid; place-items: center; transition: border-color var(--dur-1); }
.choice input::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--accent-strong); transform: scale(0); transition: transform var(--dur-2) var(--ease); }
.choice input:checked { border-color: var(--accent-strong); }
.choice input:checked::after { transform: scale(1); }
.choice input:focus-visible { outline: 2px solid var(--accent-strong); outline-offset: 2px; }
.choice:has(input:checked) { border-color: var(--accent-strong); background: var(--accent-softer); box-shadow: 0 0 0 1px var(--accent-strong) inset; }
.choice b { display: block; font-weight: 620; color: var(--ink); }
.choice small { display: block; color: var(--ink-3); font-size: .8125rem; line-height: 1.4; margin-top: 2px; }
.field[data-invalid] .choice { border-color: color-mix(in srgb, var(--danger) 60%, var(--line-2)); }
.hp-field { position: absolute !important; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.form-footer { display: flex; flex-wrap: wrap; gap: 1rem 1.5rem; align-items: center; justify-content: space-between; margin-top: 1.75rem; padding-top: 1.5rem; border-top: 1px solid var(--line); }
.form-footer p { margin: 0; font-size: .8438rem; color: var(--ink-3); max-width: 28rem; }
.form-status { margin-top: 1.25rem; border-radius: var(--r-lg); padding: 1.1rem 1.25rem; display: grid; grid-template-columns: 28px 1fr; gap: .9rem; font-size: .9688rem; }
.form-status:empty { display: none; }
.form-status .s-icon { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; color: var(--bg); font-weight: 800; font-size: 14px; }
.form-status h3 { font-family: var(--font-sans); font-size: 1rem; font-weight: 700; margin: .15rem 0 .25rem; }
.form-status p { margin: 0 0 .5rem; color: var(--ink-2); }
.form-status p:last-child { margin-bottom: 0; }
.form-status .actions { margin-top: .75rem; }
.form-status.is-success { background: var(--ok-soft); border: 1px solid color-mix(in srgb, var(--ok) 30%, transparent); }
.form-status.is-success .s-icon { background: var(--ok); }
.form-status.is-error { background: var(--danger-soft); border: 1px solid color-mix(in srgb, var(--danger) 30%, transparent); }
.form-status.is-error .s-icon { background: var(--danger); }
.form-status.is-warn { background: var(--warn-soft); border: 1px solid color-mix(in srgb, var(--warn) 30%, transparent); }
.form-status.is-warn .s-icon { background: var(--warn); }
.form-status.is-info { background: var(--info-soft); border: 1px solid color-mix(in srgb, var(--info) 30%, transparent); }
.form-status.is-info .s-icon { background: var(--info); }
.btn .spinner { width: 16px; height: 16px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.contact-layout { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: clamp(2rem, 5vw, 3.5rem); align-items: start; }
.contact-aside { display: grid; gap: 1.25rem; position: sticky; top: calc(var(--header-h) + 1.5rem); }
.contact-aside .card h2 { font-size: 1.15rem; letter-spacing: -.006em; margin-bottom: .5rem; }
.contact-aside .card p { color: var(--ink-2); font-size: .9375rem; }
.contact-aside .card p:last-child { margin-bottom: 0; }
.email-line { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; font-weight: 650; margin-bottom: .5rem; }
.email-line .contact-method { min-width: 0; }
.next-steps { list-style: none; counter-reset: ns; display: grid; gap: .9rem; font-size: .9375rem; color: var(--ink-2); }
.next-steps li { display: grid; grid-template-columns: 26px 1fr; gap: .7rem; counter-increment: ns; }
.next-steps li::before { content: counter(ns); width: 26px; height: 26px; border-radius: 7px; background: var(--accent-soft); color: var(--accent-text); display: grid; place-items: center; font-weight: 700; font-size: .8125rem; }
@media (max-width: 960px) { .contact-layout { grid-template-columns: 1fr; } .contact-aside { position: static; } }

/* 404 */
.notfound { min-height: 60vh; display: grid; place-items: center; text-align: center; padding-block: var(--section-y); }
.notfound .code { font-family: var(--font-display); font-weight: 800; font-size: clamp(5rem, 16vw, 9rem); line-height: 1; letter-spacing: -.04em; color: transparent; background: linear-gradient(180deg, var(--accent-3), var(--accent-strong) 85%); -webkit-background-clip: text; background-clip: text; margin-bottom: 1rem; }
.notfound .lede { margin-inline: auto; }
.notfound .actions { justify-content: center; margin-top: 2rem; }
.notfound-links { display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem 1.5rem; list-style: none; margin-top: 2.5rem; font-size: .9375rem; }

/* 12. Motion -------------------------------------------------------------- */
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes word-up { from { transform: translateY(105%); } }
@keyframes header-in { from { opacity: 0; transform: translateY(-100%); } }

/* Opening sequence. Homepage: header drops in, the headline rises word by word
   behind a mask, then the text, buttons and the live example follow. Inner
   pages use a shorter version of the same rhythm. */
.hero-copy > *, .page-hero .container > * { animation: rise var(--dur-4) var(--ease-out) backwards; }
.hero-copy > .split-words { animation: none; }
.split-words .w { display: inline-block; overflow: clip; overflow-clip-margin: .25em; vertical-align: top; }
.split-words .w > span { display: inline-block; animation: word-up 900ms var(--ease-out) backwards; }
.split-words .w:nth-child(1) > span { animation-delay: 90ms; }
.split-words .w:nth-child(2) > span { animation-delay: 145ms; }
.split-words .w:nth-child(3) > span { animation-delay: 200ms; }
.split-words .w:nth-child(4) > span { animation-delay: 255ms; }
.split-words .w:nth-child(5) > span { animation-delay: 310ms; }
.split-words .w:nth-child(6) > span { animation-delay: 365ms; }
.split-words .w:nth-child(7) > span { animation-delay: 420ms; }
.hero-copy > :nth-child(3) { animation-delay: 180ms; }
.hero-copy > :nth-child(4) { animation-delay: 260ms; }
.hero-copy > :nth-child(5) { animation-delay: 330ms; }
.page-hero .container > :nth-child(2) { animation-delay: 70ms; }
.page-hero .container > :nth-child(3) { animation-delay: 140ms; }
.page-hero .container > :nth-child(4) { animation-delay: 210ms; }
.page-hero .container > :nth-child(5) { animation-delay: 280ms; }
.page-home .site-header { animation: header-in 700ms var(--ease-out) backwards; }

html.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity var(--dur-4) var(--ease), transform var(--dur-4) var(--ease); transition-delay: calc(var(--i, 0) * 70ms); }
html.js .reveal.is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; animation-delay: 0ms !important; transition-duration: .01ms !important; transition-delay: 0ms !important; scroll-behavior: auto !important; }
  html.js .reveal { opacity: 1; transform: none; }
}
.reveal[data-d="1"] { --i: 1; } .reveal[data-d="2"] { --i: 2; } .reveal[data-d="3"] { --i: 3; } .reveal[data-d="4"] { --i: 4; } .reveal[data-d="5"] { --i: 5; }
.tabs-center { display: flex; justify-content: center; }
.center-note { text-align: center; margin: 3rem 0 0; }
.section-more { margin: 2.5rem 0 0; }
.factor-label { font-weight: 650; letter-spacing: .06em; text-transform: uppercase; font-size: .8125rem; margin-bottom: 1rem; }
.demo-fallback { padding: 2rem; border: 1px dashed var(--line-2); border-radius: var(--r-lg); color: var(--ink-3); text-align: center; margin: 0; }

/* 13. Page-specific components ------------------------------------------- */
.path-note { text-align: center; margin: 1.25rem 0 0; }
.row-visual { position: relative; padding: clamp(1.5rem, 4vw, 2.5rem) clamp(1.5rem, 4vw, 2.5rem) 0; border-radius: var(--r-xl); overflow: hidden; border: 1px solid var(--line);
  background: linear-gradient(180deg, var(--surface-2), var(--bg-2)); }
.row-visual .mini-browser, .row-visual .mini-dash { transform: none; }
.row-visual .mini-flow { padding-bottom: clamp(1.5rem, 4vw, 2.5rem); }
.row-visual .mini-step:nth-child(4) { margin-left: 54px; }
.service-row:hover .mini-step:nth-child(odd) { transform: translateX(4px); }

.demo-intro { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 1rem 2.5rem; margin-bottom: 1.5rem; }
.demo-intro > div { max-width: 40rem; }
.demo-intro h2 { margin-bottom: .4rem; }
.demo-intro p { color: var(--ink-2); margin: 0; }
.demo-try { list-style: none; display: flex; flex-wrap: wrap; gap: .5rem; }
.demo-try li { display: inline-flex; align-items: center; gap: .4rem; padding: .4rem .75rem; border-radius: 999px; background: var(--accent-softer); border: 1px solid var(--accent-soft); font-size: .8125rem; color: var(--ink-2); }
.demo-try li::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.demo-try b { color: var(--ink); font-weight: 650; }

.chip-list { margin-top: 1.5rem; }
.chip-note { margin-top: 1rem; }
.check-list-lg { gap: 1.1rem; margin-bottom: 1.5rem; }
.compact-list { gap: .55rem; font-size: .9375rem; }
.features-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1020px) { .features-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .features-4 { grid-template-columns: 1fr; } }
.split-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 900px) { .split-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .split-3 { grid-template-columns: 1fr; } }

/* Device pair illustration */
.device-pair { position: relative; min-height: 360px; }
.dp-desktop { width: 86%; border-radius: var(--r-lg); overflow: hidden; border: 1px solid var(--line); background: var(--surface); box-shadow: var(--shadow-lg); }
.dp-screen { padding: 18px; display: grid; gap: 14px; background: #fbf8f1; }
.dp-hero { padding: 22px; border-radius: 10px; background: linear-gradient(135deg, #1f3b2d, #2f5a43); display: grid; gap: 10px; }
.dp-hero b { display: block; height: 14px; width: 70%; border-radius: 4px; background: rgba(243,239,228,.85); }
.dp-hero b.s { width: 45%; height: 9px; background: rgba(243,239,228,.4); }
.dp-hero i { display: block; width: 90px; height: 24px; border-radius: 6px; background: #e9c46a; margin-top: 6px; }
.dp-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.dp-cols span, .dp-stack span { height: 70px; border-radius: 8px; background: #efe8d8; }
.dp-phone { position: absolute; right: 0; bottom: -10px; width: 34%; max-width: 190px; border-radius: 26px; border: 7px solid var(--bezel); overflow: hidden; box-shadow: var(--shadow-lg); background: #fbf8f1; }
.dp-phone .dp-screen { padding: 10px; gap: 10px; }
.dp-phone .dp-hero { padding: 14px; }
.dp-phone .dp-hero i { width: 100%; }
.dp-nav { display: flex; justify-content: space-between; align-items: center; }
.dp-nav span { width: 50px; height: 8px; border-radius: 3px; background: #1f3b2d; }
.dp-nav em { width: 16px; height: 10px; border-block: 2px solid #1f3b2d; }
.dp-stack { display: grid; gap: 8px; }
.dp-stack span { height: 44px; }
@media (max-width: 560px) { .device-pair { min-height: 280px; } }

/* Automation anatomy */
.anatomy { list-style: none; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; counter-reset: an; }
.anatomy-item { position: relative; padding: 1.4rem; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-xs); }
.anatomy-item:not(:last-child)::after { content: ""; position: absolute; top: 2.4rem; right: -1rem; width: 1rem; height: 2px; background: var(--line-2); }
.anatomy-kind { display: inline-flex; align-items: center; gap: .55rem; font-size: .75rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 1rem; }
.anatomy-item h3 { font-size: 1.125rem; margin-bottom: .3rem; }
.anatomy-item p { margin: 0; color: var(--ink-2); font-size: .9375rem; }
@media (max-width: 900px) { .anatomy { grid-template-columns: repeat(2, minmax(0, 1fr)); } .anatomy-item:nth-child(2)::after { display: none; } }
@media (max-width: 560px) { .anatomy { grid-template-columns: 1fr; } .anatomy-item::after { display: none; } }

/* Status explainer */
.states { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; }
.state-card { padding: 1.4rem; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); }
.state-card h3 { font-size: 1.0625rem; margin: 1rem 0 .3rem; }
.state-card p { margin: 0; color: var(--ink-2); font-size: .9375rem; }
@media (max-width: 960px) { .states { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .states { grid-template-columns: 1fr; } }

/* Roles */
.roles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; }
.role-card { padding: clamp(1.5rem, 3vw, 2rem); border-radius: var(--r-xl); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm); }
.role-head { display: flex; gap: .9rem; align-items: center; margin-bottom: 1.25rem; padding-bottom: 1.25rem; border-bottom: 1px solid var(--line); }
.role-head .avatar { width: 44px; height: 44px; border-radius: 12px; font-size: 1rem; }
.role-head h3 { margin: 0; font-size: 1.2rem; }
.role-head p { margin: 0; color: var(--ink-3); font-size: .875rem; }
@media (max-width: 720px) { .roles { grid-template-columns: 1fr; } }
.scope-card h3 { font-size: 1.2rem; }
.scope-card > p { color: var(--ink-2); }
.scope-card .check-list { margin: 1rem 0; }

/* Demos page */
.demos-section { padding-top: 0; }
.demo-picker { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .75rem; margin-bottom: 2rem; }
.demo-pick { display: flex; align-items: center; gap: .9rem; padding: 1rem 1.1rem; border-radius: var(--r-lg); border: 1px solid var(--line); background: var(--surface); text-align: left; color: var(--ink); box-shadow: var(--shadow-xs); transition: border-color var(--dur-2) var(--ease), box-shadow var(--dur-2) var(--ease), transform var(--dur-2) var(--ease), background var(--dur-2); }
.demo-pick:hover { border-color: var(--line-2); box-shadow: var(--shadow-md); transform: translateY(-2px); }
.demo-pick[aria-selected="true"] { border-color: var(--accent-strong); background: var(--accent-softer); box-shadow: 0 0 0 1px var(--accent-strong) inset, var(--shadow-md); }
.demo-pick b { display: block; font-family: var(--font-display); font-size: 1.0625rem; letter-spacing: -.006em; }
.demo-pick small { display: block; color: var(--ink-3); font-size: .8125rem; line-height: 1.4; margin-top: 2px; }
.demo-pick-icon { width: 44px; height: 44px; flex: none; border-radius: 12px; display: grid; place-items: center; background: var(--accent-soft); transition: background var(--dur-2); }
.demo-pick[aria-selected="true"] .demo-pick-icon { background: var(--accent-strong); }
.demo-pick-icon svg { width: 22px; height: 22px; fill: none; stroke: var(--accent-text); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.demo-pick[aria-selected="true"] .demo-pick-icon svg { stroke: #fff; }
@media (max-width: 860px) { .demo-picker { grid-template-columns: 1fr; } .demo-pick small { display: none; } .demo-pick { padding: .75rem 1rem; } .demo-pick-icon { width: 38px; height: 38px; } }
.demo-head { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 1.5rem 3rem; align-items: start; margin-bottom: 1.5rem; }
.demo-head h2 { margin-bottom: .4rem; }
.demo-head p { color: var(--ink-2); margin: 0; }
.demo-meta { margin: 0; display: grid; gap: .75rem; padding: 1rem 1.2rem; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); }
.demo-meta dt { font-size: .6875rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); }
.demo-meta dd { margin: 0; font-size: .9063rem; color: var(--ink); }
@media (max-width: 860px) { .demo-head { grid-template-columns: 1fr; } }
.demo-foot { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between; align-items: center; margin-top: 1.25rem; }
.demo-disclaimer { display: flex; gap: .6rem; align-items: flex-start; margin: 2.5rem 0 0; padding: 1rem 1.2rem; border-radius: var(--r-lg); background: var(--surface); border: 1px dashed var(--line-2); font-size: .875rem; color: var(--ink-3); }
.demo-disclaimer svg { width: 20px; height: 20px; flex: none; fill: none; stroke: var(--ink-3); stroke-width: 1.6; stroke-linecap: round; }

/* How it works */
.process-layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: clamp(2rem, 6vw, 5rem); align-items: start; }
.process-aside { position: sticky; top: calc(var(--header-h) + 2rem); }
.process-phases ol { list-style: none; display: grid; gap: .75rem; }
.process-phases li { padding: .9rem 1rem; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); display: grid; }
.process-phases b { font-family: var(--font-display); letter-spacing: -.01em; }
.process-phases span { font-size: .8125rem; color: var(--ink-3); }
@media (max-width: 860px) { .process-layout { grid-template-columns: 1fr; } .process-aside { position: static; } .process-phases ol { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 480px) { .process-phases ol { grid-template-columns: 1fr; } }

/* About relay visual */
.relay-visual { display: flex; align-items: center; padding: 2.5rem 1.5rem; border-radius: var(--r-xl); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm); }
.rv-node { flex: none; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--accent-strong); box-shadow: 0 0 0 6px var(--accent-soft); position: relative; }
.rv-node i { position: absolute; top: 34px; white-space: nowrap; font-style: normal; font-size: .8125rem; font-weight: 650; color: var(--ink-2); }
.rv-line { flex: 1; height: 2px; margin: 0 10px; background: linear-gradient(90deg, var(--accent), var(--accent-3)); position: relative; overflow: hidden; }
.rv-line::after { content: ""; position: absolute; inset: 0; width: 30%; background: linear-gradient(90deg, transparent, rgba(255,255,255,.9), transparent); animation: baton 2.4s var(--ease-in-out) 1s 3 both; }
@keyframes baton { from { transform: translateX(-100%); } to { transform: translateX(340%); } }
.relay-visual { padding-bottom: 3.5rem; }

/* Contact */
.form-intro { font-size: .9063rem; margin-bottom: 1.75rem; }
.req { color: var(--danger); font-weight: 700; }
.choice-sm { padding: .6rem .9rem; align-items: center; }
.choice-sm input { margin-top: 0; }
.contact-section { padding-top: 0; }

.field .choice { padding: .85rem 1rem; font-weight: 450; }
.field .choice-sm { padding: .6rem .9rem; }

/* 14. Motion language ------------------------------------------------------
   One vocabulary used across every page (timings come from the tokens):
   • Entrance   .reveal rises in; section headings also unmask line by line.
   • Cascade    .stagger children enter one after another.
   • Focus      the active item is emphasised (timeline, scroll story, demos).
   • Feedback   buttons, links, fields and toggles answer within 140–240ms.
   Everything here is inside prefers-reduced-motion: no-preference, so with
   reduced motion content is simply present and states change instantly. */
@media (prefers-reduced-motion: no-preference) {
  /* Headings unmask from below as their section head enters. */
  html.js .section-head.reveal h2, html.js .cta-panel.reveal h2 {
    clip-path: inset(0 -.2em 100% -.2em); transform: translateY(.4em);
    transition: clip-path 1000ms var(--ease-out) 90ms, transform 1000ms var(--ease-out) 90ms;
  }
  html.js .section-head.reveal.is-in h2, html.js .cta-panel.reveal.is-in h2 { clip-path: inset(-.2em -.2em -.3em -.2em); transform: none; }

  /* Cascades: lists whose items arrive in sequence. */
  html.js .stagger > * { opacity: 0; transform: translateY(12px); transition: opacity 600ms var(--ease-out), transform 600ms var(--ease-out); }
  html.js .stagger.is-in > * { opacity: 1; transform: none; }
  html.js .stagger.is-in > :nth-child(2) { transition-delay: 60ms; }
  html.js .stagger.is-in > :nth-child(3) { transition-delay: 120ms; }
  html.js .stagger.is-in > :nth-child(4) { transition-delay: 180ms; }
  html.js .stagger.is-in > :nth-child(5) { transition-delay: 240ms; }
  html.js .stagger.is-in > :nth-child(6) { transition-delay: 300ms; }
  html.js .stagger.is-in > :nth-child(7) { transition-delay: 360ms; }
  html.js .stagger.is-in > :nth-child(8) { transition-delay: 420ms; }
  html.js .stagger.is-in > :nth-child(n+9) { transition-delay: 480ms; }
  /* After the cascade, hover transitions return to their normal speed. */
  html.js .stagger.is-settled > * { transition-delay: 0s; }

  /* Larger visuals settle from a slight scale rather than sliding. */
  html.js .reveal-scale { opacity: 0; transform: scale(.965) translateY(14px); transition: opacity 900ms var(--ease-out), transform 900ms var(--ease-out); }
  html.js .reveal-scale.is-in { opacity: 1; transform: none; }

  /* Primary buttons: a soft light sweep on hover. */
  .btn-primary { overflow: hidden; isolation: isolate; }
  .btn-primary::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(105deg, transparent 30%, rgba(255,255,255,.22) 50%, transparent 70%); transform: translateX(-120%); transition: transform 700ms var(--ease-out); }
  .btn-primary:hover::before { transform: translateX(120%); }
  .btn { position: relative; }

  /* Navigation: hover underline grows from the left; the current page keeps it. */
  .nav-link::after { content: ""; position: absolute; left: .75rem; right: .75rem; bottom: 2px; height: 2px; border-radius: 2px; background: var(--accent); transform: scaleX(0); transform-origin: left; transition: transform 320ms var(--ease-out); }
  .nav-link:hover::after, .nav-link[aria-current="page"]::after, .nav-item[data-current] > .nav-link::after { transform: scaleX(1); }
  .nav-item.has-menu > .nav-link::after { right: 1.6rem; }
  /* Dropdown items cascade in. */
  .nav-item.is-open .menu-grid > li { animation: menu-in 380ms var(--ease-out) backwards; }
  .nav-item.is-open .menu-grid > li:nth-child(2) { animation-delay: 50ms; }
  .nav-item.is-open .menu-grid > li:nth-child(3) { animation-delay: 100ms; }
  .nav-item.is-open .menu-footer { animation: menu-in 380ms var(--ease-out) 150ms backwards; }
  .menu-icon { transition: transform var(--dur-2) var(--ease-out), background var(--dur-2); }
  .menu-link:hover .menu-icon { transform: translateY(-1px) rotate(-4deg); }
}
@keyframes menu-in { from { opacity: 0; transform: translateY(6px); } }
@media (prefers-reduced-motion: no-preference) and (max-width: 960px) {
  /* Mobile menu: links slide in one by one when it opens. */
  html.js .site-nav.is-open .nav-list > li, html.js .site-nav.is-open .nav-cta, html.js .site-nav.is-open .nav-contact { animation: menu-in 420ms var(--ease-out) backwards; }
  html.js .site-nav.is-open .nav-list > li:nth-child(2) { animation-delay: 40ms; }
  html.js .site-nav.is-open .nav-list > li:nth-child(3) { animation-delay: 80ms; }
  html.js .site-nav.is-open .nav-list > li:nth-child(4) { animation-delay: 120ms; }
  html.js .site-nav.is-open .nav-list > li:nth-child(5) { animation-delay: 160ms; }
  html.js .site-nav.is-open .nav-cta { animation-delay: 200ms; }
  html.js .site-nav.is-open .nav-contact { animation-delay: 240ms; }
  .nav-link::after { display: none; }
}

/* FAQ: answers open and close smoothly where the browser supports animating
   <details> (other browsers open instantly, as before). */
@media (prefers-reduced-motion: no-preference) {
  :root { interpolate-size: allow-keywords; }
  .faq-item::details-content { height: 0; overflow: clip; transition: height 360ms var(--ease-out), content-visibility 360ms allow-discrete; }
  .faq-item[open]::details-content { height: auto; }
  .faq-item summary { transition: color var(--dur-1), padding-left var(--dur-2) var(--ease-out); }
  .faq-item summary:hover { padding-left: .5rem; }
}

/* Forms: fields lift slightly on focus; errors slide in rather than appear. */
.field label { transition: color var(--dur-1); }
.field:focus-within > label { color: var(--accent-text); }
@media (prefers-reduced-motion: no-preference) {
  .input, .select, .textarea { transition: border-color var(--dur-1) var(--ease), box-shadow var(--dur-2) var(--ease), transform var(--dur-2) var(--ease-out), background var(--dur-2); }
  .input:focus, .select:focus, .textarea:focus { transform: translateY(-1px); }
  .field[data-invalid] .field-error { animation: error-in 280ms var(--ease-out); }
  .form-status:not(:empty) { animation: status-in 420ms var(--ease-out); }
  .choice { transition: border-color var(--dur-1), background var(--dur-1), box-shadow var(--dur-1), transform var(--dur-2) var(--ease-out); }
  .choice:active { transform: scale(.985); }
}
@keyframes error-in { from { opacity: 0; transform: translateY(-4px); } }
@keyframes status-in { from { opacity: 0; transform: translateY(10px) scale(.99); } }

/* How it works: markers confirm with a tick once their step has passed. */
.t-step.is-past .t-marker { color: transparent; }
.t-step.is-past .t-marker::after { content: ""; position: absolute; width: 16px; height: 8px; margin-top: -4px; border-left: 2.5px solid var(--accent-ink); border-bottom: 2.5px solid var(--accent-ink); transform: rotate(-45deg); }
@media (prefers-reduced-motion: no-preference) {
  .t-step.is-past .t-marker::after { animation: tick-in 360ms var(--ease-out); }
  .t-step.is-active .t-marker { animation: marker-pulse 2s var(--ease) infinite; }
  html.js .timeline[data-timeline] .t-step .t-body { transition: transform 500ms var(--ease-out); }
  html.js .timeline[data-timeline] .t-step.is-active .t-body { transform: translateX(6px); }
}
@keyframes tick-in { from { opacity: 0; transform: rotate(-45deg) scale(.4); } }
@keyframes marker-pulse { 0%, 100% { box-shadow: 0 0 0 6px var(--accent-soft); } 50% { box-shadow: 0 0 0 10px color-mix(in srgb, var(--accent-soft) 40%, transparent); } }

/* Footer: columns arrive together as the page ends. */
@media (prefers-reduced-motion: no-preference) {
  .footer-grid > * { transition: opacity 700ms var(--ease-out), transform 700ms var(--ease-out); }
  .footer-col a:not(.btn) { display: inline-block; transition: color var(--dur-1), transform var(--dur-2) var(--ease-out); }
  .footer-col a:not(.btn):hover { transform: translateX(3px); }
}

/* Automation anatomy: as the row enters, each stage lights up in turn and the
   connector to the next one draws, reading left to right like the workflow. */
.anatomy-item:not(:last-child)::after { transform-origin: left; }
@media (prefers-reduced-motion: no-preference) {
  html.js .anatomy.stagger > * { transition-duration: 700ms; }
  html.js .anatomy.stagger > :nth-child(2) { transition-delay: 260ms; }
  html.js .anatomy.stagger > :nth-child(3) { transition-delay: 520ms; }
  html.js .anatomy.stagger > :nth-child(4) { transition-delay: 780ms; }
  html.js .anatomy .anatomy-item:not(:last-child)::after { transform: scaleX(0); background: var(--accent); transition: transform 300ms var(--ease-out); }
  html.js .anatomy.is-in .anatomy-item:not(:last-child)::after { transform: scaleX(1); }
  html.js .anatomy.is-in .anatomy-item:nth-child(1)::after { transition-delay: 220ms; }
  html.js .anatomy.is-in .anatomy-item:nth-child(2)::after { transition-delay: 480ms; }
  html.js .anatomy.is-in .anatomy-item:nth-child(3)::after { transition-delay: 740ms; }
  html.js .anatomy.is-in .anatomy-item .wf-kind { animation: step-pop-site 480ms var(--ease-out) backwards; }
  html.js .anatomy.is-in .anatomy-item:nth-child(2) .wf-kind { animation-delay: 300ms; }
  html.js .anatomy.is-in .anatomy-item:nth-child(3) .wf-kind { animation-delay: 560ms; }
  html.js .anatomy.is-in .anatomy-item:nth-child(4) .wf-kind { animation-delay: 820ms; }
  .anatomy-item { transition: border-color var(--dur-2), box-shadow var(--dur-2), transform var(--dur-2) var(--ease-out); }
  .anatomy-item:hover { border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); box-shadow: var(--shadow-md); transform: translateY(-2px); }
}
@keyframes step-pop-site { 0% { transform: scale(.7); opacity: 0; } 60% { transform: scale(1.08); opacity: 1; } 100% { transform: none; } }

/* Services overview: the small illustrations come alive when their row enters. */
@media (prefers-reduced-motion: no-preference) {
  html.js .service-row.reveal .mini-dash .row::after { transform: scaleX(0); transform-origin: left; transition: transform 800ms var(--ease-out); }
  html.js .service-row.reveal.is-in .mini-dash .row::after { transform: none; }
  html.js .service-row.reveal.is-in .mini-dash .row:nth-of-type(2)::after { transition-delay: 150ms; }
  html.js .service-row.reveal.is-in .mini-dash .row:nth-of-type(3)::after { transition-delay: 300ms; }
  html.js .service-row.reveal .mini-step { opacity: 0; transform: translateX(-10px); transition: opacity 600ms var(--ease-out), transform 600ms var(--ease-out); }
  html.js .service-row.reveal.is-in .mini-step { opacity: 1; transform: none; }
  html.js .service-row.reveal.is-in .mini-step:nth-child(2) { transition-delay: 180ms; }
  html.js .service-row.reveal.is-in .mini-step:nth-child(3) { transition-delay: 360ms; }
  html.js .service-row.reveal .mini-sections div { transform: scaleY(.4); transform-origin: bottom; opacity: 0; transition: transform 700ms var(--ease-out), opacity 700ms; }
  html.js .service-row.reveal.is-in .mini-sections div { transform: none; opacity: 1; }
  html.js .service-row.reveal.is-in .mini-sections div:nth-child(2) { transition-delay: 120ms; }
  html.js .service-row.reveal.is-in .mini-sections div:nth-child(3) { transition-delay: 240ms; }
}

/* Homepage process: each marker fills as the progress line reaches it, and its
   text arrives just after, so the five steps read as one sequence. */
.step-num { transition: background 300ms var(--ease), color 300ms var(--ease), border-color 300ms var(--ease), transform 300ms var(--ease-out); }
.steps.is-in .step-num { background: var(--accent-strong); color: var(--accent-ink); border-color: var(--accent-strong); }
@media (prefers-reduced-motion: no-preference) {
  .steps .step:nth-child(2) .step-num { transition-delay: 280ms; }
  .steps .step:nth-child(3) .step-num { transition-delay: 560ms; }
  .steps .step:nth-child(4) .step-num { transition-delay: 840ms; }
  .steps .step:nth-child(5) .step-num { transition-delay: 1120ms; }
  html.js .steps .step h3, html.js .steps .step p { opacity: 0; transform: translateY(8px); transition: opacity 600ms var(--ease-out), transform 600ms var(--ease-out); }
  html.js .steps.is-in .step h3, html.js .steps.is-in .step p { opacity: 1; transform: none; }
  html.js .steps.is-in .step:nth-child(2) :is(h3, p) { transition-delay: 300ms; }
  html.js .steps.is-in .step:nth-child(3) :is(h3, p) { transition-delay: 580ms; }
  html.js .steps.is-in .step:nth-child(4) :is(h3, p) { transition-delay: 860ms; }
  html.js .steps.is-in .step:nth-child(5) :is(h3, p) { transition-delay: 1140ms; }
  .steps .step:hover .step-num { transform: translateY(-2px); }
}

/* Quote form: notice shown while online sending isn't connected yet. */
.form-notice { margin: 0 0 1.5rem; padding: .9rem 1.1rem; border-radius: var(--r); background: var(--info-soft); border: 1px solid color-mix(in srgb, var(--info) 30%, transparent); color: var(--ink-2); font-size: .9375rem; }
.form-notice b { color: var(--ink); }
.form-card > noscript .form-notice { display: block; }

/* Phone numbers never break across lines. */
a[href^="tel:"] { white-space: nowrap; }
