/* ClearPath public site — tokens mirror apps/web/src/lib/designSystem.js.
   60% warm neutrals · 30% cornflower blue · 10% accents.
   Contrast notes (WCAG AA, computed against these exact hexes):
   - #374151 on #FAF8F5 = 9.7:1 · #6B7280 on #FAF8F5 = 4.54:1 (body/secondary text)
   - #4F5FA8 on #FFFFFF = 5.9:1 (links, outline buttons — normal-text safe)
   - #FFFFFF on #6272B8 = 4.45:1 — under 4.5, so solid-cornflower buttons render
     their label at >=18.7px bold (WCAG "large text", threshold 3:1)
   - #374151 on #E8927C = 4.34:1 — coral CTAs use charcoal text at large-bold size
   - check icons use #3D9E6F (3.3:1 on white — meets the 3:1 non-text minimum),
     never #10B981 (2.5:1, decorative only) */

:root {
  --bg: #FAF8F5;
  --card: #FFFFFF;
  --card-alt: #F5F3F0;
  --border: #E5E7EB;
  --border-light: #F0F1F3;

  --primary: #6272B8;
  --primary-mid: #4F5FA8;
  --primary-light: #EBEEF8;
  --primary-glow: rgba(98, 114, 184, 0.12);
  --primary-glow-strong: rgba(98, 114, 184, 0.22);

  --accent: #E8927C;
  --accent-hover: #DD8068;
  --accent-light: #FCE7E0;
  --accent-fade: #FEF5F2;

  --success-deep: #3D9E6F;   /* STATUS green — the AA-safe green for icons */
  --success-light: #D1FAE5;

  --text: #374151;
  --text-sec: #6B7280;

  --font: 'Nunito', 'Plus Jakarta Sans', system-ui, sans-serif;
  --mono: 'IBM Plex Mono', monospace;

  --radius: 16px;
  --shell: 1080px;
}

/* ── Reset-lite ── */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; }
h1, h2, h3, p, ul, ol, blockquote { margin: 0; }
ul, ol { padding: 0; }

a { color: var(--primary-mid); }
a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--primary-mid);
  outline-offset: 2px;
  border-radius: 4px;
}

.shell { max-width: var(--shell); margin: 0 auto; padding: 0 24px; }
.shell-narrow { max-width: 720px; }

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--card);
  color: var(--primary-mid);
  padding: 10px 18px;
  border-radius: 0 0 8px 0;
  font-weight: 700;
  z-index: 100;
}
.skip-link:focus { left: 0; }

/* ── Header ── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(250, 248, 245, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border-light);
}
.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 68px;
}
.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--primary-mid);
  text-decoration: none;
  letter-spacing: -0.01em;
}
.mark { display: block; border-radius: 7px; }

.nav-menu {
  display: flex;
  align-items: center;
  gap: 26px;
  list-style: none;
}
.nav-menu a:not(.btn) {
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
  font-size: 0.98rem;
}
.nav-menu a:not(.btn):hover { color: var(--primary-mid); }
.nav-toggle { display: none; }

/* ── Buttons ── */
.btn {
  display: inline-block;
  padding: 13px 26px;
  border-radius: 999px;
  font-family: var(--font);
  font-size: 1.17rem;      /* 18.7px bold = WCAG large text; see contrast notes */
  font-weight: 800;
  line-height: 1.25;
  text-decoration: none;
  border: 2px solid transparent;
  transition: background-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-coral {
  background: var(--accent);
  color: var(--text);
  box-shadow: 0 4px 14px rgba(232, 146, 124, 0.35);
}
.btn-coral:hover { background: var(--accent-hover); }

.btn-primary {
  background: var(--primary);
  color: #FFFFFF;
  box-shadow: 0 4px 14px var(--primary-glow-strong);
}
.btn-primary:hover { background: var(--primary-mid); }

.btn-outline {
  background: var(--card);
  color: var(--primary-mid);
  border-color: var(--primary-mid);
}
.btn-outline:hover { background: var(--primary-light); }

.btn-small { font-size: 1.02rem; padding: 9px 18px; }
/* The compact nav pill is below WCAG large-text size, where charcoal-on-coral
   (4.34:1) misses AA's 4.5 — so it renders as coral border + charcoal on white
   (9.05:1), same family, passing contrast. */
.nav-cta .btn-coral {
  background: var(--card);
  color: var(--text);
  border-color: var(--accent);
  box-shadow: none;
}
.nav-cta .btn-coral:hover { background: var(--accent-fade); }

/* ── Hero ── */
.hero {
  padding: 88px 0 72px;
  background:
    radial-gradient(900px 420px at 85% -10%, var(--primary-glow), transparent 70%),
    radial-gradient(700px 380px at -10% 110%, rgba(232, 146, 124, 0.10), transparent 70%),
    var(--bg);
}
.hero-inner { max-width: 780px; }
h1 {
  font-size: clamp(2.1rem, 5vw, 3.3rem);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.015em;
  color: var(--primary-mid);
}
.hero-sub {
  margin-top: 22px;
  font-size: 1.16rem;
  max-width: 62ch;
}
.status-line {
  margin-top: 26px;
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.84rem;
  color: var(--text);
  background: var(--card);
  border: 1px solid var(--border);
  border-left: 4px solid var(--success-deep);
  border-radius: 10px;
  padding: 10px 16px;
}
.hero-ctas {
  margin-top: 30px;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

/* ── Sections ── */
.section { padding: 84px 0; }
.section-alt { background: var(--card-alt); }
h2 {
  font-size: clamp(1.6rem, 3.4vw, 2.2rem);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: var(--primary-mid);
  max-width: 26ch;
}
.section-lead {
  margin-top: 14px;
  font-size: 1.1rem;
  color: var(--text-sec);
  max-width: 62ch;
}
h3 { font-size: 1.08rem; font-weight: 800; color: var(--text); }

/* ── The cycle ── */
.cycle {
  position: relative;
  margin: 56px auto 0;
  max-width: 940px;
  height: 560px;
}
.cycle-ring {
  position: absolute;
  inset: 40px 90px;
  width: calc(100% - 180px);
  height: calc(100% - 80px);
}
.cycle-center {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  font-weight: 800;
  font-size: 1.3rem;
  color: var(--primary);
  line-height: 1.3;
}
.cycle-steps { list-style: none; }
/* Station positions on the ring — percentages of the .cycle box, matching the
   SVG ellipse (rx 45% / ry 42%) at angles -90°, -18°, 54°, 126°, 198°. */
.cycle-step:nth-child(1) { --cx: 50%; --cy: 8%; }
.cycle-step:nth-child(2) { --cx: 93%; --cy: 37%; }
.cycle-step:nth-child(3) { --cx: 76%; --cy: 84%; }
.cycle-step:nth-child(4) { --cx: 24%; --cy: 84%; }
.cycle-step:nth-child(5) { --cx: 7%; --cy: 37%; }
.cycle-step {
  position: absolute;
  left: var(--cx);
  top: var(--cy);
  transform: translate(-50%, -50%);
  width: 218px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 6px 20px var(--primary-glow);
  padding: 16px 18px 14px;
  text-align: center;
}
.cycle-step p { font-size: 0.92rem; color: var(--text-sec); margin-top: 4px; line-height: 1.45; }
.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--primary);
  color: #FFFFFF;
  font-weight: 800;
  font-size: 0.9rem;
  margin-bottom: 8px;
}
.cycle-loop-note {
  margin-top: 34px;
  text-align: center;
  font-weight: 700;
  color: var(--primary-mid);
}
.loop-glyph { font-size: 1.25em; margin-right: 4px; }
.cycle-expand {
  margin: 26px auto 0;
  max-width: 66ch;
  color: var(--text-sec);
}
.cycle-close {
  margin: 30px auto 0;
  max-width: 56ch;
  text-align: center;
  font-size: 1.28rem;
  font-weight: 800;
  color: var(--text);
}

/* ── Mission band ── */
.mission {
  background: var(--primary-light);
  padding: 76px 0;
}
.mission-text {
  max-width: 46ch;
  margin: 0 auto;
  text-align: center;
  font-size: clamp(1.25rem, 2.6vw, 1.6rem);
  font-weight: 700;
  line-height: 1.5;
  color: var(--primary-mid);
}

/* ── Feature grid ── */
.feature-grid {
  margin-top: 44px;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
.feature-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px 24px;
  box-shadow: 0 4px 16px var(--primary-glow);
}
.feature-icon {
  display: inline-flex;
  width: 46px;
  height: 46px;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: var(--primary-light);
  color: var(--primary-mid);
  margin-bottom: 14px;
}
.feature-icon svg { width: 26px; height: 26px; }
.feature-card p { margin-top: 8px; font-size: 0.97rem; color: var(--text-sec); }

/* ── Security ── */
.security-list {
  margin-top: 36px;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px 32px;
  max-width: 880px;
}
.security-list li {
  position: relative;
  padding: 14px 18px 14px 46px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  font-weight: 600;
}
.security-list li::before {
  content: "\2713";
  position: absolute;
  left: 17px;
  top: 13px;
  color: var(--success-deep);
  font-weight: 800;
  font-size: 1.05rem;
}
.security-close {
  margin-top: 30px;
  font-style: italic;
  color: var(--text-sec);
}

/* ── Pilot ── */
.section-pilot {
  background:
    radial-gradient(720px 340px at 100% 0%, rgba(232, 146, 124, 0.12), transparent 70%),
    var(--bg);
}
.pilot-cols {
  margin-top: 40px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  max-width: 880px;
}
.pilot-col {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px 24px;
}
.pilot-col p { margin-top: 8px; color: var(--text-sec); }
.pilot-cta { margin-top: 40px; }
.pilot-cta-note {
  margin-top: 12px;
  font-size: 0.92rem;
  color: var(--text-sec);
}

/* ── About ── */
.founder-story {
  margin-top: 32px;
  background: var(--card);
  border: 1px solid var(--border);
  border-left: 5px solid var(--primary);
  border-radius: var(--radius);
  padding: 30px 32px;
  font-size: 1.08rem;
}
.founder-sign {
  margin-top: 20px;
  color: var(--text-sec);
  font-size: 0.98rem;
}
.founder-sign strong { color: var(--text); }
.about-tagline {
  margin-top: 30px;
  text-align: center;
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--primary-mid);
}

/* ── Footer ── */
.site-footer {
  background: var(--card-alt);
  border-top: 1px solid var(--border-light);
  padding: 36px 0;
  font-size: 0.95rem;
}
.footer-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px 28px;
}
.footer-promise { font-weight: 700; }
.footer-nav {
  list-style: none;
  display: flex;
  gap: 22px;
}
.footer-nav a { color: var(--text-sec); }
.soon { color: var(--text-sec); font-size: 0.85em; }

/* ══════════════ Responsive ══════════════ */

/* Cycle collapses to a vertical flow before the circle gets cramped */
@media (max-width: 1000px) {
  .cycle { height: auto; margin-top: 40px; }
  .cycle-ring, .cycle-center { display: none; }
  .cycle-steps {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
  }
  .cycle-step {
    position: static;
    transform: none;
    width: min(100%, 420px);
  }
  .cycle-step:not(:last-child)::after {
    content: "\2193";
    display: block;
    margin: 10px auto -2px;
    color: var(--primary);
    font-size: 1.4rem;
    font-weight: 800;
  }
  .cycle-step:not(:last-child) { margin-bottom: 12px; }
  .cycle-loop-note { margin-top: 22px; }
}

@media (max-width: 900px) {
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
}

/* Mobile nav */
@media (max-width: 820px) {
  .nav-toggle {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 8px 14px;
    font-family: var(--font);
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--text);
    cursor: pointer;
  }
  .nav-toggle-bars {
    display: inline-flex;
    flex-direction: column;
    gap: 3.5px;
  }
  .nav-toggle-bars span {
    display: block;
    width: 16px;
    height: 2px;
    border-radius: 2px;
    background: var(--primary-mid);
  }
  .nav-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--card);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 14px 30px var(--primary-glow-strong);
    padding: 8px 0 14px;
  }
  .site-nav { position: static; }
  .nav-menu.open { display: flex; }
  .nav-menu li { text-align: center; }
  .nav-menu a:not(.btn) {
    display: block;
    padding: 13px 24px;
    font-size: 1.05rem;
  }
  .nav-cta { padding: 10px 24px 4px; }
  .nav-cta .btn { display: block; text-align: center; }
}

@media (max-width: 640px) {
  .section { padding: 64px 0; }
  .hero { padding: 64px 0 56px; }
  .feature-grid { grid-template-columns: 1fr; }
  .security-list { grid-template-columns: 1fr; }
  .pilot-cols { grid-template-columns: 1fr; }
  .footer-row { flex-direction: column; align-items: flex-start; }
  .status-line { font-size: 0.78rem; }
  .founder-story { padding: 24px 20px; }
}

/* ── Motion respect ── */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    transition-duration: 0.001s !important;
    animation-duration: 0.001s !important;
  }
}
