@import url("/fonts/fonts.css");

/* =========================================================================
   BAASAAS — E-Money Infrastructure & Operational OS
   Design system: institutional ink canvas · single restrained rose accent
   Type: Schibsted Grotesk (display/body) + Spline Sans Mono (technical voice)
   ========================================================================= */

:root {
  /* ---- Surfaces (near-black institutional ink; near-monochrome) ---- */
  --ink:        #08090b;
  --ink-1:      #0c0d10;
  --ink-2:      #101216;
  --ink-3:      #16181d;
  --ink-4:      #1d2026;

  /* ---- Hairlines ---- */
  --line:        rgba(255,255,255,0.075);
  --line-2:      rgba(255,255,255,0.12);
  --line-strong: rgba(255,255,255,0.22);

  /* ---- Ink type ramp (off-white → muted) ---- */
  --text:   #f3f4f5;
  --text-1: #c8ccd2;
  --text-2: #9198a1;
  --text-3: #7d8590;   /* mono labels, meta — AA (~4.6:1 on ink) */

  /* ---- Signature accent: deep jewel emerald — money / growth / verified (used < 8%) ---- */
  --accent:        #10b981;
  --accent-bright: #34d399;
  --accent-dim:    #0b7d5b;
  --accent-ink:    #04120d;          /* text on accent fills */
  --accent-glow:   rgba(16, 185, 129, 0.40);
  --accent-veil:   rgba(16, 185, 129, 0.10);
  --accent-hair:   rgba(16, 185, 129, 0.30);

  /* ---- Feedback ---- */
  --ok:   #4ad6a3;
  --warn: #f5b544;
  --err:  #ff6b6b;

  /* ---- Type ---- */
  --sans: "Schibsted Grotesk", "Segoe UI", system-ui, -apple-system, sans-serif;
  --mono: "Spline Sans Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --step--1: clamp(0.78rem, 0.75rem + 0.15vw, 0.86rem);
  --step-0:  clamp(0.96rem, 0.92rem + 0.2vw, 1.04rem);
  --step-1:  clamp(1.14rem, 1.05rem + 0.4vw, 1.35rem);
  --step-2:  clamp(1.4rem, 1.2rem + 0.9vw, 1.95rem);
  --step-3:  clamp(1.85rem, 1.4rem + 2vw, 2.9rem);
  --step-4:  clamp(2.4rem, 1.6rem + 3.6vw, 4.15rem);
  --step-5:  clamp(2.9rem, 1.7rem + 5.4vw, 5.4rem);

  /* ---- Space (marketing rhythm) ---- */
  --sp-1: 0.5rem;  --sp-2: 0.75rem; --sp-3: 1rem;   --sp-4: 1.5rem;
  --sp-5: 2rem;    --sp-6: 3rem;    --sp-7: 4.5rem;  --sp-8: 7rem;
  --sp-9: clamp(3.75rem, 2.5rem + 6vw, 8rem);

  --r-sm: 8px;  --r: 12px;  --r-lg: 18px;  --r-xl: 26px;  --r-pill: 999px;

  --container: 1200px;
  --gutter: clamp(1.15rem, 0.6rem + 2.6vw, 2.75rem);

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in: cubic-bezier(0.5, 0, 0.75, 0);

  /* z-index scale */
  --z-nav: 40; --z-backdrop: 90; --z-modal: 100; --z-toast: 120; --z-banner: 110;

  --shadow-lg: 0 30px 80px -30px rgba(0,0,0,0.8), 0 8px 24px -12px rgba(0,0,0,0.6);
}

/* ---------------------------------------------------------------- reset */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  font-family: var(--sans);
  font-size: var(--step-0);
  line-height: 1.6;
  color: var(--text-1);
  background: var(--ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-feature-settings: "ss01", "cv01";
  overflow-x: hidden;
}
body.no-scroll { overflow: hidden; }

img, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; background: none; border: none; }
:focus-visible { outline: 2px solid var(--accent-bright); outline-offset: 3px; border-radius: 3px; }
::selection { background: var(--accent); color: var(--accent-ink); }

/* ---------------------------------------------------------------- type */
h1, h2, h3, h4 {
  font-family: var(--sans);
  color: var(--text);
  line-height: 1.04;
  font-weight: 600;
  letter-spacing: -0.028em;
  text-wrap: balance;
}
h1 { font-size: var(--step-5); font-weight: 700; letter-spacing: -0.035em; }
h2 { font-size: var(--step-4); }
h3 { font-size: var(--step-2); letter-spacing: -0.022em; }
p { text-wrap: pretty; }

.mono {
  font-family: var(--mono);
  font-weight: 500;
  letter-spacing: 0.02em;
  font-feature-settings: normal;
}

/* kicker — one deliberate brand system (mono index label), not an eyebrow-on-every-section */
.kicker {
  display: inline-flex; align-items: center; gap: 0.6em;
  font-family: var(--mono);
  font-size: var(--step--1);
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-3);
}
.kicker::before {
  content: ""; width: 1.9em; height: 1px;
  background: linear-gradient(90deg, var(--accent), transparent);
}
.kicker[data-idx]::after {
  content: attr(data-idx);
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}

/* ---------------------------------------------------------------- layout */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
section { position: relative; }
.section-pad { padding-block: var(--sp-9); }
.eof { max-width: 62ch; }
.lead { font-size: var(--step-1); color: var(--text-1); line-height: 1.55; }
.hr { height: 1px; background: var(--line); border: 0; }

/* ---------------------------------------------------------------- buttons */
.btn {
  --bg: transparent; --fg: var(--text); --bd: var(--line-2);
  display: inline-flex; align-items: center; justify-content: center; gap: 0.6em;
  min-height: 48px; padding: 0 1.35rem;
  font-weight: 600; font-size: var(--step-0); letter-spacing: -0.01em;
  color: var(--fg); background: var(--bg);
  border: 1px solid var(--bd); border-radius: var(--r-pill);
  transition: background .28s var(--ease), color .28s var(--ease),
              border-color .28s var(--ease), transform .28s var(--ease), box-shadow .28s var(--ease);
  will-change: transform;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary {
  --bg: var(--accent); --fg: var(--accent-ink); --bd: transparent;
  box-shadow: 0 0 0 0 var(--accent-glow), 0 10px 30px -12px var(--accent-glow);
}
.btn-primary:hover { --bg: var(--accent-bright); box-shadow: 0 0 40px -6px var(--accent-glow), 0 12px 34px -12px var(--accent-glow); }
.btn-ghost { --bg: transparent; --fg: var(--text); }
.btn-ghost:hover { --bd: var(--line-strong); background: var(--ink-2); }
.btn-lg { min-height: 54px; padding: 0 1.7rem; font-size: var(--step-1); }
.btn .arw { transition: transform .3s var(--ease); }
.btn:hover .arw { transform: translateX(3px); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }

/* ---------------------------------------------------------------- nav */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: var(--z-nav);
  height: 68px; display: flex; align-items: center;
  transition: background .4s var(--ease), border-color .4s var(--ease), backdrop-filter .4s var(--ease);
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: color-mix(in srgb, var(--ink) 72%, transparent);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  backdrop-filter: blur(16px) saturate(1.4);
  border-bottom-color: var(--line);
}
.nav .container { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-4); }
.brand { display: inline-flex; align-items: center; gap: 0.65rem; font-weight: 700; letter-spacing: -0.03em; font-size: 1.16rem; color: var(--text); }
.brand .mark { width: 26px; height: 26px; }
.brand .tld { color: var(--text-3); font-weight: 500; }
.nav-links { display: flex; align-items: center; gap: 0.35rem; }
.nav-links a {
  padding: 0.5rem 0.85rem; border-radius: var(--r-sm); font-size: 0.94rem; color: var(--text-2);
  transition: color .2s var(--ease), background .2s var(--ease);
}
.nav-links a:hover { color: var(--text); background: var(--ink-2); }
.nav-right { display: flex; align-items: center; gap: 0.6rem; }
.nav-toggle { display: none; width: 44px; height: 44px; align-items: center; justify-content: center; border-radius: var(--r-sm); }
.nav-toggle svg { width: 22px; height: 22px; }

/* mobile sheet */
.mobile-menu {
  position: fixed; inset: 0; z-index: 39; display: none; flex-direction: column;
  padding: 88px var(--gutter) var(--gutter);
  background: color-mix(in srgb, var(--ink) 94%, transparent);
  -webkit-backdrop-filter: blur(22px); backdrop-filter: blur(22px);
}
.mobile-menu.open { display: flex; }
.mobile-menu a {
  padding: 1.05rem 0.25rem; font-size: 1.5rem; font-weight: 600; letter-spacing: -0.02em;
  color: var(--text); border-bottom: 1px solid var(--line);
}
.mobile-menu .btn { margin-top: var(--sp-4); }

/* ---------------------------------------------------------------- hero */
.hero { position: relative; padding-top: 68px; min-height: 100svh; display: flex; align-items: center; isolation: isolate; overflow: hidden; }
#cells { position: absolute; inset: 0; z-index: -2; opacity: 0.9; }
.hero::after { /* vignette so text stays legible over the cell field */
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(120% 90% at 20% 20%, transparent 30%, var(--ink) 78%),
    linear-gradient(180deg, color-mix(in srgb,var(--ink) 55%, transparent), var(--ink) 92%);
}
.hero-inner { padding-block: clamp(3rem, 8vh, 7rem); max-width: var(--container); }
.hero h1 { margin-top: var(--sp-4); }
.hero .accent-word { color: var(--accent); }
.hero-lower { margin-top: var(--sp-5); display: grid; gap: var(--sp-5); }
.hero-lead { min-width: 0; }
.hero-sub { max-width: 54ch; font-size: var(--step-1); color: var(--text-1); }
.hero-cta { display: flex; flex-wrap: wrap; gap: 0.85rem; margin-top: var(--sp-6); }
@media (min-width: 1024px) {
  .hero-lower { grid-template-columns: minmax(0, 1fr) minmax(300px, 380px); align-items: end; gap: clamp(2rem, 5vw, 5rem); }
}

/* developer-first orchestration panel — balances the hero's lower-right on wide screens */
.hero-panel { display: none; }
@media (min-width: 1024px) {
  .hero-panel {
    display: block; align-self: end;
    background: var(--ink-2); border: 1px solid var(--line-2); border-radius: var(--r-lg);
    box-shadow: var(--shadow-lg); overflow: hidden;
    font-family: var(--mono); font-size: 0.82rem; line-height: 1.5;
  }
}
.hp-bar { display: flex; align-items: center; gap: 0.6rem; padding: 0.65rem 0.9rem; border-bottom: 1px solid var(--line); background: var(--ink-3); }
.hp-dots { display: inline-flex; gap: 5px; }
.hp-dots i { width: 8px; height: 8px; border-radius: 50%; background: var(--line-strong); }
.hp-title { font-size: 0.74rem; letter-spacing: 0.03em; color: var(--text-2); }
.hp-body { padding: 0.9rem 1rem; display: grid; gap: 0.24rem; }
.hp-line { color: var(--text-1); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hp-dim { color: var(--text-2); }
.hp-method { color: var(--accent); font-weight: 600; }
.hp-path { color: var(--text); }
.hp-key { color: var(--text-1); }
.hp-str { color: var(--accent-bright); }
.hp-res { margin-top: 0.4rem; padding-top: 0.55rem; border-top: 1px solid var(--line); }
.hp-ok { color: var(--ok); }
.hp-foot { display: flex; flex-wrap: wrap; gap: 0.5rem 0.95rem; padding: 0.68rem 1rem; border-top: 1px solid var(--line); background: var(--ink-1); }
.hp-tag { display: inline-flex; align-items: center; gap: 0.42rem; font-size: 0.72rem; letter-spacing: 0.02em; color: var(--text-2); }
.hp-tag::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 8px var(--accent-glow); }

/* rails marquee */
.rails { margin-top: var(--sp-7); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding-block: 0.9rem; -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.rails-track { display: flex; gap: 2.75rem; width: max-content; animation: marquee 34s linear infinite; }
.rails-track span { display: inline-flex; align-items: center; gap: 0.7rem; font-family: var(--mono); font-size: var(--step--1); letter-spacing: 0.06em; color: var(--text-2); white-space: nowrap; }
.rails-track span::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 10px var(--accent-glow); }
@keyframes marquee { to { transform: translateX(-50%); } }
/* mobile: no marquee (iOS-safe) — static wrapped pills instead */
@media (max-width: 699px) {
  .rails { border: 0; padding-block: 0; margin-top: var(--sp-6); -webkit-mask-image: none; mask-image: none; }
  .rails-track { animation: none; width: auto; flex-wrap: wrap; gap: 0.55rem; }
  .rails-track span { border: 1px solid var(--line); border-radius: var(--r-pill); padding: 0.42rem 0.8rem; gap: 0.5rem; color: var(--text-1); white-space: nowrap; }
}

/* ---------------------------------------------------------------- section header */
.sec-head { max-width: 66ch; margin-bottom: var(--sp-7); }
.sec-head h2 { margin-top: var(--sp-3); }
.sec-head p { margin-top: var(--sp-4); color: var(--text-1); font-size: var(--step-1); }
/* Desktop: put the intro paragraph in the right column, bottom-aligned to the heading —
   fills the empty right gutter and gives the headers editorial balance. */
@media (min-width: 900px) {
  .sec-head:has(p) {
    max-width: none;
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    grid-template-rows: auto auto;
    column-gap: clamp(2rem, 5vw, 5.5rem);
  }
  .sec-head:has(p) .kicker { grid-area: 1 / 1; }
  .sec-head:has(p) h2 { grid-area: 2 / 1; }
  .sec-head:has(p) p { grid-area: 1 / 2 / 3 / 3; align-self: end; margin-top: 0; max-width: 46ch; }
}

/* ---------------------------------------------------------------- capabilities */
.caps { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
@media (min-width: 900px) { .caps { grid-template-columns: repeat(3, 1fr); } .cap { min-height: 420px; } }
.cap {
  position: relative; background: var(--ink-1); padding: clamp(1.5rem, 1rem + 2vw, 2.5rem);
  display: flex; flex-direction: column;
  transition: background .35s var(--ease);
}
/* stacked (below 900px): bullets sit right under the copy, no forced 420px void */
@media (max-width: 899px) { .cap ul { margin-top: var(--sp-5); } }
.cap:hover { background: var(--ink-2); }
.cap-idx { font-family: var(--mono); font-size: var(--step--1); color: var(--accent); letter-spacing: 0.1em; }
.cap-ic { width: 34px; height: 34px; margin-top: var(--sp-5); color: var(--text); stroke-width: 1.4; }
.cap h3 { margin-top: var(--sp-4); }
.cap p { margin-top: var(--sp-3); color: var(--text-2); }
.cap ul { list-style: none; padding: 0; margin-top: auto; padding-top: var(--sp-5); display: grid; gap: 0.55rem; }
.cap li { display: flex; gap: 0.65rem; align-items: baseline; font-family: var(--mono); font-size: var(--step--1); color: var(--text-1); letter-spacing: 0.01em; }
.cap li::before { content: ""; flex: none; width: 6px; height: 6px; margin-top: 0.45em; border: 1px solid var(--accent); border-radius: 1px; transform: rotate(45deg); }
.cap::after { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 2px; background: linear-gradient(90deg, var(--accent), transparent); opacity: 0; transition: opacity .35s var(--ease); }
.cap:hover::after { opacity: 1; }

/* ---------------------------------------------------------------- ecosystem framework */
.eco { background: var(--ink-1); border: 1px solid var(--line); border-radius: var(--r-xl); overflow: hidden; }
.eco-grid { display: grid; }
@media (min-width: 940px) { .eco-grid { grid-template-columns: 0.85fr 1.15fr; } }
.eco-copy { padding: clamp(1.75rem, 1rem + 3vw, 3.25rem); border-bottom: 1px solid var(--line); }
@media (min-width: 940px) { .eco-copy { border-bottom: 0; border-right: 1px solid var(--line); } }
.eco-copy h2 { margin-top: var(--sp-3); font-size: var(--step-3); }
.eco-copy p { margin-top: var(--sp-4); color: var(--text-1); }
.eco-pillars { margin-top: var(--sp-6); display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.eco-pillars div { background: var(--ink-2); padding: 0.9rem 1.05rem; }
.eco-pillars .pk { font-family: var(--mono); font-size: 0.72rem; color: var(--accent); letter-spacing: 0.08em; text-transform: uppercase; }
.eco-pillars .pv { color: var(--text-1); font-size: 0.95rem; margin-top: 0.15rem; }
.eco-diagram { padding: clamp(1.25rem, 0.5rem + 3vw, 2.5rem); display: flex; align-items: center; justify-content: center; background:
  radial-gradient(120% 120% at 70% 10%, var(--accent-veil), transparent 55%); }
.eco-diagram svg { width: 100%; height: auto; max-width: 560px; }

/* diagram element styles (driven by <svg> classes) */
.d-node { fill: var(--ink-3); stroke: var(--line-2); }
.d-core { fill: var(--ink-2); stroke: var(--accent-hair); }
.d-label { fill: var(--text-1); font-family: var(--mono); font-size: 12px; letter-spacing: 0.02em; }
.d-label-mut { fill: var(--text-3); font-family: var(--mono); font-size: 10.5px; }
.d-core-label { fill: var(--text); font-family: var(--sans); font-weight: 600; font-size: 15px; }
.d-flow { stroke: var(--line-2); stroke-width: 1.4; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.d-flow-live { stroke: var(--accent); stroke-width: 1.6; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.d-dot { fill: var(--accent); }

/* ---------------------------------------------------------------- pillars strip (how it's built) */
.pillars { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
@media (min-width: 720px) { .pillars { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1040px) { .pillars { grid-template-columns: repeat(4, 1fr); } }
.pillar { background: var(--ink-1); padding: 1.6rem 1.4rem; }
.pillar .n { font-family: var(--mono); font-size: 0.74rem; color: var(--text-3); letter-spacing: 0.08em; }
.pillar h4 { margin-top: 0.9rem; font-size: 1.12rem; font-weight: 600; color: var(--text); letter-spacing: -0.02em; }
.pillar p { margin-top: 0.5rem; font-size: 0.92rem; color: var(--text-2); }

/* ---------------------------------------------------------------- big CTA */
.cta { position: relative; overflow: hidden; border: 1px solid var(--line-2); border-radius: var(--r-xl); padding: clamp(2.5rem, 1.5rem + 5vw, 5.5rem) var(--gutter); text-align: center; background:
  radial-gradient(100% 140% at 50% 0%, color-mix(in srgb, var(--accent) 12%, transparent), transparent 60%), var(--ink-1); }
.cta h2 { font-size: var(--step-4); max-width: 18ch; margin-inline: auto; }
.cta p { margin-top: var(--sp-4); color: var(--text-1); max-width: 52ch; margin-inline: auto; }
.cta .hero-cta { justify-content: center; margin-top: var(--sp-6); }

/* ---------------------------------------------------------------- footer */
.footer { border-top: 1px solid var(--line); padding-block: var(--sp-8) var(--sp-5); background: var(--ink-1); }
.footer-top { display: grid; gap: var(--sp-6); grid-template-columns: 1fr; }
@media (min-width: 820px) { .footer-top { grid-template-columns: 1.4fr 1fr 1fr; } }
.footer .brand { font-size: 1.3rem; }
.footer-blurb { margin-top: var(--sp-4); color: var(--text-2); max-width: 42ch; font-size: 0.95rem; }
.f-col h5 { font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-3); margin-bottom: var(--sp-3); }
.f-col a, .f-col address { display: block; color: var(--text-2); font-style: normal; font-size: 0.95rem; padding: 0.3rem 0; transition: color .2s var(--ease); }
.f-col a:hover { color: var(--text); }
.f-addr { line-height: 1.5; }
.footer-bottom { margin-top: var(--sp-7); padding-top: var(--sp-4); border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: var(--sp-3) var(--sp-5); align-items: center; justify-content: space-between; }
.footer-bottom, .footer-bottom a { font-size: 0.84rem; color: var(--text-3); }
.footer-legal-links { display: flex; flex-wrap: wrap; gap: var(--sp-4); }
.footer-legal-links a:hover { color: var(--text-1); }
.disclaimer { margin-top: var(--sp-4); font-size: 0.78rem; color: var(--text-3); max-width: 90ch; line-height: 1.6; }

/* ---------------------------------------------------------------- modal */
.backdrop {
  position: fixed; inset: 0; z-index: var(--z-backdrop);
  background: rgba(4,4,6,0.72); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  opacity: 0; visibility: hidden; transition: opacity .4s var(--ease), visibility .4s var(--ease);
}
.backdrop.open { opacity: 1; visibility: visible; }
.modal {
  position: fixed; z-index: var(--z-modal); inset: auto 0 0 0; margin-inline: auto;
  width: min(560px, 100%);
  background: var(--ink-2); border: 1px solid var(--line-2);
  border-radius: var(--r-xl) var(--r-xl) 0 0;
  box-shadow: var(--shadow-lg);
  transform: translateY(102%);
  transition: transform .5s var(--ease), opacity .45s var(--ease), visibility .5s var(--ease);
  max-height: 92svh; display: flex; flex-direction: column;
  visibility: hidden; pointer-events: none;   /* closed modal must never intercept page clicks */
}
.modal.open { transform: translateY(0); visibility: visible; pointer-events: auto; }
@media (min-width: 640px) {
  .modal { inset: 50% auto auto 50%; transform: translate(-50%, calc(-50% + 16px)) scale(0.98); border-radius: var(--r-xl); opacity: 0; }
  .modal.open { transform: translate(-50%, -50%) scale(1); opacity: 1; }
}
.modal-head { padding: 1.35rem 1.5rem 0; }
.modal-head .row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.modal-title { font-size: 1.05rem; font-weight: 600; letter-spacing: -0.02em; color: var(--text); }
.modal-close { width: 40px; height: 40px; border-radius: var(--r-sm); display: grid; place-items: center; color: var(--text-2); transition: background .2s, color .2s; }
.modal-close:hover { background: var(--ink-3); color: var(--text); }
.modal-close svg { width: 18px; height: 18px; }

/* progress */
.steps { display: flex; align-items: center; gap: 0.5rem; margin-top: 1.1rem; }
.steps .seg { flex: 1; height: 3px; border-radius: 2px; background: var(--ink-4); overflow: hidden; }
.steps .seg i { display: block; height: 100%; width: 0; background: var(--accent); transition: width .5s var(--ease); }
.steps .seg.done i, .steps .seg.active i { width: 100%; }
.steps .seg.active i { box-shadow: 0 0 12px var(--accent-glow); }
.step-meta { margin-top: 0.7rem; font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.06em; color: var(--text-3); text-transform: uppercase; }

.modal-body { padding: 1.25rem 1.5rem; overflow-y: auto; }
.panel { display: none; animation: panelIn .45s var(--ease); }
.panel.active { display: block; }
@keyframes panelIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.field { margin-bottom: 1.05rem; }
.field > label { display: block; font-size: 0.86rem; font-weight: 500; color: var(--text-1); margin-bottom: 0.45rem; }
.field .req { color: var(--accent); }
.input, .select, .textarea {
  width: 100%; min-height: 48px; padding: 0.7rem 0.85rem;
  font: inherit; font-size: 0.96rem; color: var(--text);
  background: var(--ink); border: 1px solid var(--line-2); border-radius: var(--r);
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease), background .2s var(--ease);
}
.textarea { min-height: 120px; resize: vertical; line-height: 1.55; }
.input::placeholder, .textarea::placeholder { color: var(--text-3); }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--accent-hair); box-shadow: 0 0 0 3px var(--accent-veil); background: var(--ink-1); }
.field.invalid .input, .field.invalid .select, .field.invalid .textarea { border-color: var(--err); box-shadow: 0 0 0 3px rgba(255,107,107,0.14); }
.field .err-msg { display: none; margin-top: 0.4rem; font-size: 0.78rem; color: var(--err); }
.field.invalid .err-msg { display: block; }
.select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%239198a1' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 0.85rem center; padding-right: 2.5rem; }
.two-col { display: grid; gap: 0 1rem; }
@media (min-width: 480px) { .two-col { grid-template-columns: 1fr 1fr; } }

/* choice chips (capability select) */
.choices { display: grid; gap: 0.6rem; }
.choice { position: relative; display: flex; gap: 0.8rem; align-items: flex-start; padding: 0.9rem 1rem; border: 1px solid var(--line-2); border-radius: var(--r); cursor: pointer; transition: border-color .2s var(--ease), background .2s var(--ease); }
.choice:hover { border-color: var(--line-strong); background: var(--ink-1); }
.choice input { position: absolute; opacity: 0; }
.choice .box { flex: none; width: 20px; height: 20px; margin-top: 0.1rem; border: 1px solid var(--line-strong); border-radius: 6px; display: grid; place-items: center; transition: border-color .2s, background .2s; }
.choice .box svg { width: 12px; height: 12px; opacity: 0; color: var(--accent-ink); }
.choice:has(input:checked) { border-color: var(--accent-hair); background: var(--accent-veil); }
.choice:has(input:checked) .box { background: var(--accent); border-color: var(--accent); }
.choice:has(input:checked) .box svg { opacity: 1; }
.choice .ct { display: block; font-weight: 600; color: var(--text); font-size: 0.95rem; }
.choice .cd { display: block; font-size: 0.82rem; color: var(--text-2); margin-top: 0.15rem; }

/* optional markers + hints */
.field .opt { color: var(--text-3); font-weight: 400; font-size: 0.82em; }
.field-hint { margin: -0.15rem 0 0.7rem; font-size: 0.82rem; color: var(--text-2); }
.review-lead { margin-bottom: 1rem; font-size: 0.92rem; color: var(--text-2); }

/* single-select urgency chips */
.chips { display: flex; flex-wrap: wrap; gap: 0.55rem; }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.chip span { display: inline-flex; align-items: center; min-height: 42px; padding: 0 1rem; border: 1px solid var(--line-2); border-radius: var(--r-pill); font-size: 0.9rem; color: var(--text-1); transition: border-color .2s var(--ease), background .2s var(--ease), color .2s var(--ease); }
.chip span:hover { border-color: var(--line-strong); }
.chip:has(input:checked) span { border-color: var(--accent-hair); background: var(--accent-veil); color: var(--text); }
.chip input:focus-visible + span { outline: 2px solid var(--accent-bright); outline-offset: 2px; }

/* review list */
.review { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.review div { background: var(--ink); padding: 0.75rem 1rem; display: flex; justify-content: space-between; gap: 1rem; }
.review .rk { font-family: var(--mono); font-size: 0.76rem; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.05em; flex: none; }
.review .rv { color: var(--text-1); font-size: 0.9rem; text-align: right; word-break: break-word; }

.turnstile-box:not(:empty) { margin-top: 1rem; }
.consent-line { margin-top: 1rem; font-size: 0.78rem; color: var(--text-3); }
.consent-line a { color: var(--text-1); text-decoration: underline; text-underline-offset: 2px; }

.modal-foot { padding: 1.1rem 1.5rem; border-top: 1px solid var(--line); display: flex; gap: 0.75rem; align-items: center; }
.modal-foot .spacer { flex: 1; }
.btn-back { color: var(--text-2); }
.btn-back:hover { color: var(--text); }

/* success / error state */
.result { text-align: center; padding: 1.5rem 0.5rem 0.5rem; display: none; }
.result.show { display: block; animation: panelIn .5s var(--ease); }
.result .ic { width: 58px; height: 58px; margin: 0 auto 1.2rem; border-radius: 50%; display: grid; place-items: center; }
.result.ok-state .ic { background: color-mix(in srgb, var(--ok) 16%, transparent); color: var(--ok); }
.result.err-state .ic { background: rgba(255,107,107,0.14); color: var(--err); }
.result .ic svg { width: 28px; height: 28px; }
.result h3 { font-size: 1.35rem; }
.result p { margin-top: 0.6rem; color: var(--text-2); max-width: 40ch; margin-inline: auto; }
.result .btn { margin-top: 1.5rem; }

/* ---------------------------------------------------------------- cookie banner */
.cookie {
  position: fixed; z-index: var(--z-banner); left: 50%; bottom: clamp(0.75rem, 2vw, 1.5rem);
  transform: translateX(-50%) translateY(150%);
  width: min(680px, calc(100% - 1.5rem));
  background: var(--ink-2); border: 1px solid var(--line-2); border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg);
  padding: 1.2rem 1.35rem;
  transition: transform .6s var(--ease);
}
.cookie.show { transform: translateX(-50%) translateY(0); }
.cookie-row { display: flex; gap: 1.25rem; align-items: center; flex-wrap: wrap; }
.cookie-txt { flex: 1 1 300px; font-size: 0.86rem; color: var(--text-2); line-height: 1.55; }
.cookie-txt strong { color: var(--text); font-weight: 600; display: block; margin-bottom: 0.2rem; letter-spacing: -0.01em; }
.cookie-txt a { color: var(--text-1); text-decoration: underline; text-underline-offset: 2px; }
.cookie-actions { display: flex; gap: 0.6rem; flex: none; }
.cookie-actions .btn { min-height: 42px; padding: 0 1.1rem; font-size: 0.9rem; }
@media (max-width: 520px) { .cookie-actions { width: 100%; } .cookie-actions .btn { flex: 1; } }

/* ---------------------------------------------------------------- reveal motion
   Content is visible by DEFAULT. The hidden-then-animate state applies ONLY when
   JS is confirmed running (html.js, set synchronously in <head> before paint).
   No-JS, crawlers, and headless renderers always see fully-visible content. */
html.js .reveal { opacity: 0; transform: translateY(22px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
html.js .reveal.in { opacity: 1; transform: none; }
html.js .reveal[data-d="1"] { transition-delay: .08s; }
html.js .reveal[data-d="2"] { transition-delay: .16s; }
html.js .reveal[data-d="3"] { transition-delay: .24s; }

@media (prefers-reduced-motion: reduce) {
  html.js .reveal { opacity: 1 !important; transform: none !important; transition: none; }
  .rails-track { animation: none; }
  .btn:hover, .btn:active { transform: none; }
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .12s !important; }
}

/* ---------------------------------------------------------------- responsive nav */
@media (max-width: 860px) {
  .nav-links, .nav-right .btn { display: none; }
  .nav-toggle { display: inline-flex; }
}

/* ---------------------------------------------------------------- legal / prose pages */
.legal-wrap { padding-top: calc(68px + var(--sp-7)); padding-bottom: var(--sp-8); }
.legal-wrap .back { display: inline-flex; align-items: center; gap: 0.5rem; font-family: var(--mono); font-size: var(--step--1); color: var(--text-2); margin-bottom: var(--sp-5); transition: color .2s var(--ease); }
.legal-wrap .back:hover { color: var(--text); }
.prose { max-width: 74ch; }
.prose h1 { font-size: var(--step-4); margin-bottom: var(--sp-3); }
.prose .updated { font-family: var(--mono); font-size: var(--step--1); color: var(--text-3); margin-bottom: var(--sp-6); display: block; }
.prose h2 { font-size: var(--step-2); margin-top: var(--sp-6); margin-bottom: var(--sp-3); letter-spacing: -0.02em; }
.prose h3 { font-size: var(--step-1); margin-top: var(--sp-5); margin-bottom: var(--sp-2); }
.prose p, .prose li { color: var(--text-1); line-height: 1.7; }
.prose p { margin-bottom: var(--sp-3); }
.prose ul { margin: 0 0 var(--sp-3) 1.2rem; display: grid; gap: 0.5rem; }
.prose a { color: var(--accent-bright); text-decoration: underline; text-underline-offset: 2px; }
.prose strong { color: var(--text); }
.prose address { font-style: normal; color: var(--text-1); background: var(--ink-2); border: 1px solid var(--line); border-radius: var(--r); padding: 1rem 1.15rem; line-height: 1.6; }
