/* Realworld Solutions: institutional design system.
   Uses the founder-supplied brand kit: real palette (Realworld Brand
   Guidelines v1.0), self-hosted Geist (OFL-licensed, an approved
   alternative to Aeonik Pro in that same guideline). Quiet confidence:
   neutral surfaces, one accent, generous space, no gradients/neon.
   Plain CSS, no framework, no build step. */

@font-face {
  font-family: "Geist";
  src: url("/assets/fonts/Geist-VariableFont_wght.woff2") format("woff2-variations"),
       url("/assets/fonts/Geist-VariableFont_wght.ttf") format("truetype-variations");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #ffffff;
  --bg-subtle: #eff4f9; /* Grey 05 */
  --ink: #070f1a; /* Black */
  --ink-soft: #4e5764; /* Grey 75 */
  --ink-muted: #5c6470; /* Grey 60, darkened from brand spec for WCAG AA contrast (4.5:1 min on bg/bg-subtle) */
  --line: #d7dde6; /* Grey 15 */
  --line-strong: #bbc3ce; /* Grey 30 */
  --accent: #0042c5; /* Core */
  --accent-strong: #0059e8; /* Pulse: hover/active */
  --accent-soft: #e7edfb;
  --on-ink: #ffffff;
  --on-ink-soft: #acd9ff; /* Drift */
  --radius: 6px;
  --maxw: 1120px;
  --measure: 680px;
  --font: "Geist", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }

a { color: inherit; }
a:focus-visible, button:focus-visible, summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

h1, h2, h3, h4 { font-weight: 600; }

.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 8px;
  background: var(--ink);
  color: var(--on-ink);
  padding: 8px 14px;
  border-radius: var(--radius);
  z-index: 100;
  text-decoration: none;
  font-size: 14px;
}
.skip-link:focus { left: 16px; }

/* ---------- Nav ---------- */
.nav {
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  background: rgba(255,255,255,0.94);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 10;
}
.nav .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  gap: 24px;
}
.nav-logo {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}
.nav-logo img {
  height: 20px;
  width: auto;
  display: block;
}
footer .nav-logo img { height: 22px; }
.nav-links {
  display: flex;
  gap: 28px;
  list-style: none;
  margin: 0 auto 0 0;
  padding: 0;
}
.nav-links a {
  text-decoration: none;
  font-size: 14px;
  color: var(--ink-soft);
  transition: color 0.15s ease;
  padding: 4px 0;
  border-bottom: 1px solid transparent;
}
.nav-links a:hover { color: var(--ink); }
.nav-links a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--ink); }
.nav-cta {
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  padding: 8px 16px;
  font-size: 14px;
  text-decoration: none;
  color: var(--ink);
  white-space: nowrap;
  transition: background 0.15s ease, color 0.15s ease;
}
.nav-cta:hover { background: var(--ink); color: var(--on-ink); }

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  padding: 8px 10px;
  font: inherit;
  font-size: 13px;
  color: var(--ink);
  cursor: pointer;
}

@media (max-width: 880px) {
  .nav .wrap { flex-wrap: wrap; height: auto; min-height: 64px; padding-top: 12px; padding-bottom: 12px; }
  .nav-toggle { display: inline-block; order: 2; }
  .nav-cta { order: 3; display: none; }
  .nav-links {
    display: none;
    order: 4;
    flex-basis: 100%;
    flex-direction: column;
    gap: 4px;
    padding: 12px 0 8px;
    border-top: 1px solid var(--line);
    margin-top: 8px;
  }
  .nav-links a { display: block; padding: 10px 0; font-size: 15px; }
  .nav.is-open .nav-links { display: flex; }
  .nav.is-open .nav-cta { display: inline-block; order: 5; margin-top: 4px; text-align: center; }
}

/* ---------- Hero ---------- */
.hero {
  padding: 96px 0 72px;
  border-bottom: 1px solid var(--line);
}
.hero h1 {
  font-size: clamp(32px, 4.4vw, 52px);
  line-height: 1.12;
  letter-spacing: -0.02em;
  margin: 0 0 20px;
  max-width: 820px;
}
.hero p.lede {
  font-size: 19px;
  color: var(--ink-soft);
  max-width: 640px;
  margin: 0 0 32px;
}
.hero-eyebrow, .eyebrow {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  font-weight: 600;
  margin: 0 0 16px;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}
.hero-actions .note {
  font-size: 13px;
  color: var(--ink-muted);
  margin: 0;
  flex-basis: 100%;
}
.hero.compact { padding: 72px 0 56px; }

/* ---------- Hero: wave variant (blue, animated line background) ---------- */
.hero.wave {
  position: relative;
  overflow: hidden;
  background: var(--accent);
  border-bottom: none;
  padding: 120px 0 156px;
}
.hero-waves {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}
.hero.wave .wrap { position: relative; z-index: 1; }
.hero.wave .hero-eyebrow { color: var(--on-ink-soft); }
.hero.wave h1 { color: var(--on-ink); max-width: 760px; }
.hero.wave p.lede { color: rgba(255, 255, 255, 0.92); max-width: 620px; }
.hero.wave .btn-primary { background: var(--on-ink); color: var(--accent); border-color: var(--on-ink); }
.hero.wave .btn-primary:hover { background: var(--accent-soft); }
.hero.wave .btn-secondary { color: var(--on-ink); border-color: rgba(255, 255, 255, 0.5); background: transparent; }
.hero.wave .btn-secondary:hover { border-color: var(--on-ink); background: rgba(255, 255, 255, 0.08); }

.wave-family { transform-origin: 50% 50%; }
/* Static by default: JS enables motion (below) only once it has wired up
   a working pause control, so the animation is never running without a
   functional way to stop it. */
@keyframes hero-wave-a {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}
@keyframes hero-wave-b {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(6px); }
}
.hero.wave.motion-ready .wave-family-a { animation: hero-wave-a 11s ease-in-out infinite; }
.hero.wave.motion-ready .wave-family-b { animation: hero-wave-b 14s ease-in-out infinite; }
.hero.wave.motion-ready.motion-paused .wave-family-a,
.hero.wave.motion-ready.motion-paused .wave-family-b {
  animation-play-state: paused;
}
@media (prefers-reduced-motion: reduce) {
  .wave-family-a, .wave-family-b { animation: none !important; }
}

.hero-motion-toggle {
  display: none;
  position: absolute;
  right: 20px;
  bottom: 16px;
  z-index: 2;
  background: rgba(7, 15, 26, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.4);
  color: var(--on-ink);
  font: inherit;
  font-size: 12px;
  padding: 6px 14px;
  border-radius: 999px;
  cursor: pointer;
}
/* Only shown once hero-motion.js has actually wired it up (see .motion-ready
   below) - without JS, or before it runs, there is nothing to pause. */
.hero.wave.motion-ready .hero-motion-toggle { display: inline-block; }
.hero-motion-toggle:hover { background: rgba(7, 15, 26, 0.42); }
@media (prefers-reduced-motion: reduce) { .hero-motion-toggle { display: none !important; } }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  text-decoration: none;
  border-radius: var(--radius);
  padding: 12px 22px;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.3;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.btn-primary { background: var(--ink); color: var(--on-ink); border: 1px solid var(--ink); }
.btn-primary:hover { background: var(--accent); border-color: var(--accent); }
.btn-secondary { border: 1px solid var(--line-strong); color: var(--ink); background: transparent; }
.btn-secondary:hover { border-color: var(--ink); }
.text-link {
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  color: var(--accent);
  border-bottom: 1px solid transparent;
}
.text-link:hover { border-bottom-color: var(--accent); }

/* ---------- Sections ---------- */
section.block {
  padding: 72px 0;
  border-bottom: 1px solid var(--line);
}
section.block.subtle { background: var(--bg-subtle); }
section.block.tight { padding: 48px 0; }
section.block h2 {
  font-size: clamp(24px, 2.6vw, 32px);
  line-height: 1.2;
  letter-spacing: -0.01em;
  margin: 0 0 16px;
  max-width: 720px;
}
section.block h3 { font-size: 18px; margin: 0 0 8px; }
section.block p.body {
  font-size: 17px;
  color: var(--ink-soft);
  max-width: var(--measure);
  margin: 0 0 16px;
}
section.block p.body:last-child { margin-bottom: 0; }
section.block .actions { margin-top: 28px; display: flex; flex-wrap: wrap; gap: 12px; }

/* Ink band: closing statement / CTA */
section.block.ink {
  background: var(--ink);
  color: var(--on-ink);
  border-bottom: none;
}
section.block.ink h2 { color: var(--on-ink); }
section.block.ink p.body { color: var(--on-ink-soft); }
section.block.ink .eyebrow { color: var(--on-ink-soft); }
section.block.ink .btn-primary { background: var(--on-ink); color: var(--ink); border-color: var(--on-ink); }
section.block.ink .btn-primary:hover { background: var(--on-ink-soft); border-color: var(--on-ink-soft); }
section.block.ink .btn-secondary { color: var(--on-ink); border-color: rgba(255,255,255,0.35); }
section.block.ink .btn-secondary:hover { border-color: var(--on-ink); }
section.block.ink .note { color: var(--on-ink-soft); }

/* Two-column editorial split: heading left, prose right */
.split {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 48px;
  align-items: start;
}
.split h2 { margin-bottom: 12px; }
.split .aside {
  font-size: 15px;
  color: var(--ink-soft);
  max-width: 380px;
}
@media (max-width: 800px) {
  .split { grid-template-columns: 1fr; gap: 20px; }
}

/* Tagline strip */
.strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 32px;
}
section.block .strip h2 { font-size: 20px; font-weight: 600; letter-spacing: -0.01em; margin: 0 0 8px; max-width: none; }
.strip p { margin: 0; color: var(--ink-soft); font-size: 15px; }

/* Principle list */
.principles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 28px 24px;
  margin-top: 32px;
}
.principle {
  border-left: 2px solid var(--accent);
  padding-left: 16px;
}
.principle strong { display: block; margin-bottom: 6px; font-size: 15px; }
.principle span, .principle p { color: var(--ink-soft); font-size: 14.5px; margin: 0; }

/* Card grid */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
  margin-top: 32px;
}
.card {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  text-decoration: none;
  display: block;
  transition: background 0.15s ease, border-color 0.15s ease;
}
a.card:hover { background: var(--accent-soft); border-color: var(--line-strong); }
.card h3 { font-size: 17px; margin: 0 0 10px; }
.card p { font-size: 14.5px; color: var(--ink-soft); margin: 0; }
.card .card-link { display: inline-block; margin-top: 14px; font-size: 13.5px; color: var(--accent); font-weight: 500; }

/* Tiles: bordered panels for feature/detail grids */
.tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  margin-top: 32px;
}
.tiles.two { grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.tile {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  background: var(--bg);
}
.tile.soft { background: var(--bg-subtle); border-color: transparent; }
.tile .eyebrow { margin-bottom: 10px; font-size: 12px; }
.tile h3 { font-size: 16.5px; margin: 0 0 8px; }
.tile p { font-size: 14.5px; color: var(--ink-soft); margin: 0; }
.tile ul { margin: 8px 0 0; padding-left: 18px; font-size: 14.5px; color: var(--ink-soft); }
.tile li { margin-bottom: 6px; }
.tile li:last-child { margin-bottom: 0; }

/* Lists */
ul.list {
  list-style: none;
  padding: 0;
  margin: 24px 0 0;
  max-width: var(--measure);
}
ul.list li {
  position: relative;
  padding-left: 22px;
  margin-bottom: 12px;
  font-size: 16px;
  color: var(--ink-soft);
}
ul.list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 8px;
  height: 8px;
  background: var(--accent);
  border-radius: 1px;
}
ul.list li strong { color: var(--ink); }

/* Numbered steps */
ol.steps {
  list-style: none;
  counter-reset: step;
  padding: 0;
  margin: 32px 0 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 24px;
}
ol.steps li {
  counter-increment: step;
  border-top: 1px solid var(--line-strong);
  padding-top: 16px;
}
ol.steps li::before {
  content: counter(step, decimal-leading-zero);
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.06em;
  margin-bottom: 10px;
}
ol.steps strong { display: block; font-size: 16px; margin-bottom: 6px; }
ol.steps p { margin: 0; font-size: 14.5px; color: var(--ink-soft); }

/* Comparison: what doesn't change / what changes */
.compare {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  margin-top: 32px;
}
.compare .col { background: var(--bg); padding: 28px; }
.compare .col.accent { background: var(--accent-soft); }
.compare h3 { font-size: 15px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--accent); margin: 0 0 16px; }
.compare ul { list-style: none; margin: 0; padding: 0; }
.compare li { padding: 10px 0; border-top: 1px solid var(--line); font-size: 15px; color: var(--ink-soft); }
.compare li:first-child { border-top: none; padding-top: 0; }
.compare li strong { color: var(--ink); display: block; margin-bottom: 2px; }

/* Jump list (in-page anchors) */
.jump {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  list-style: none;
  padding: 0;
  margin: 28px 0 0;
}
.jump a {
  font-size: 14px;
  color: var(--ink-soft);
  text-decoration: none;
  border-bottom: 1px solid var(--line-strong);
  padding-bottom: 2px;
}
.jump a:hover { color: var(--ink); border-bottom-color: var(--ink); }
.jump .jump-note { flex-basis: 100%; font-size: 13px; color: var(--ink-muted); margin: 6px 0 0; }

/* Actor sections (ecosystem page) */
section.actor {
  padding: 80px 0;
  border-bottom: 1px solid var(--line);
  scroll-margin-top: 72px;
}
section.actor:nth-of-type(even) { background: var(--bg-subtle); }
.actor-head { max-width: 760px; }
.actor-head h2 {
  font-size: clamp(24px, 2.8vw, 34px);
  line-height: 1.18;
  letter-spacing: -0.015em;
  margin: 0 0 16px;
}
.actor-head p.lede { font-size: 17.5px; color: var(--ink-soft); margin: 0 0 8px; }
.actor-body {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: 40px;
  margin-top: 40px;
  max-width: 980px;
}
.actor-body h3 { font-size: 15px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--accent); margin: 0 0 10px; }
.actor-body p { font-size: 15.5px; color: var(--ink-soft); margin: 0 0 12px; }
.actor-body p:last-child { margin-bottom: 0; }
.actor-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  margin-top: 36px;
}
.actor-foot { margin-top: 32px; display: flex; flex-wrap: wrap; gap: 16px; align-items: center; }
.actor-foot .note { font-size: 13.5px; color: var(--ink-muted); margin: 0; }

/* FAQ */
.faq { margin-top: 32px; max-width: 780px; border-top: 1px solid var(--line-strong); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  cursor: pointer;
  list-style: none;
  padding: 18px 40px 18px 0;
  font-size: 16.5px;
  font-weight: 500;
  position: relative;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  position: absolute;
  right: 4px;
  top: 14px;
  font-size: 22px;
  font-weight: 300;
  color: var(--ink-muted);
}
.faq details[open] summary::after { content: "–"; }
.faq .answer { padding: 0 0 20px; max-width: 700px; }
.faq .answer p { margin: 0 0 10px; font-size: 15.5px; color: var(--ink-soft); }
.faq .answer p:last-child { margin-bottom: 0; }

/* Pull quote */
blockquote.pull {
  margin: 40px 0 0;
  padding-left: 24px;
  border-left: 3px solid var(--accent);
  max-width: 760px;
}
blockquote.pull p {
  font-size: clamp(20px, 2.2vw, 26px);
  line-height: 1.3;
  letter-spacing: -0.01em;
  margin: 0 0 12px;
  color: var(--ink);
}
blockquote.pull cite { font-style: normal; font-size: 14px; color: var(--ink-muted); }
section.block.ink blockquote.pull { border-left-color: rgba(255,255,255,0.4); }
section.block.ink blockquote.pull p { color: var(--on-ink); }

/* Status note: factual honesty callout */
.status {
  margin-top: 32px;
  padding: 20px 24px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  max-width: 780px;
  background: var(--bg);
}
.status strong { display: block; font-size: 13px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--accent); margin-bottom: 8px; }
.status p { margin: 0; font-size: 15px; color: var(--ink-soft); }

/* People */
.people {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: 32px;
  margin-top: 32px;
}
.person { border-top: 1px solid var(--line-strong); padding-top: 20px; }
.person h3 { font-size: 18px; margin: 0 0 2px; }
.person .role { font-size: 14px; color: var(--accent); font-weight: 500; margin: 0 0 12px; }
.person p { font-size: 15px; color: var(--ink-soft); margin: 0 0 10px; }
.person p:last-child { margin-bottom: 0; }

/* Hubs */
.hubs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  margin-top: 32px;
}
.hub { background: var(--bg); padding: 24px; }
.hub h3 { font-size: 16px; margin: 0 0 8px; }
.hub address { font-style: normal; font-size: 14.5px; color: var(--ink-soft); line-height: 1.5; }

/* ---------- Footer ---------- */
footer {
  padding: 56px 0 48px;
  background: var(--bg);
}
footer .foot-cols {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 24px;
}
@media (max-width: 760px) {
  footer .foot-cols { grid-template-columns: 1fr; gap: 28px; }
}
footer .foot-brand p { font-size: 14.5px; color: var(--ink-soft); margin: 12px 0 0; max-width: 360px; }
footer .foot-brand .tag { font-weight: 500; color: var(--ink); }
footer h3 {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-muted);
  margin: 0 0 12px;
  font-weight: 600;
}
footer ul { list-style: none; margin: 0; padding: 0; }
footer li { margin-bottom: 8px; font-size: 14.5px; }
footer li a { text-decoration: none; color: var(--ink-soft); }
footer li a:hover { color: var(--ink); }
footer .legal {
  font-size: 13px;
  color: var(--ink-muted);
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  margin: 0;
}

@media (max-width: 760px) {
  .hero.wave { padding: 72px 0 96px; }
  .hero-motion-toggle { right: 16px; bottom: 12px; }
}

/* ---------- Utilities ---------- */
.measure { max-width: var(--measure); }
.mt-0 { margin-top: 0 !important; }
.mt-32 { margin-top: 32px; }
.muted { color: var(--ink-muted); }
.small { font-size: 14px; }
