/* Evolving Seeds — one stylesheet, no build chain, no third-party requests.
   Aesthetic: bright medical-SaaS (white, soft blue washes, pill buttons, rounded
   cards) — adapted from a MetaWell-style reference, minus anything fake-able.
   Every asset is self-hosted; the claim on the Gate page depends on that. */

/* Display + body face: Plus Jakarta Sans (variable, latin), self-hosted. */
@font-face {
  font-family: "Plus Jakarta Sans";
  src: url("assets/fonts/plus-jakarta-sans-latin-var.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg:        #FFFFFF;
  --bg-soft:   #F4F8FF;
  --bg-wash:   #EDF3FF;
  --ink:       #0E1524;
  --ink-soft:  #45516B;
  --ink-faint: #7C8AA5;
  --line:      #E2E9F5;
  --blue:      #2563EB;
  --blue-deep: #1E4FD6;
  --blue-soft: #E8F0FF;
  --blue-glow: rgba(37, 99, 235, 0.28);
  --mint:      #0E9F7B;
  --mint-soft: #E4F7F1;
  --hl:        #C9DDFF;

  --measure: 36rem;
  --page: 64rem;
  --radius: 18px;

  --sans: "Plus Jakarta Sans", ui-sans-serif, "Segoe UI", Helvetica, Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --shadow-card: 0 1px 2px rgba(14, 21, 36, 0.04), 0 8px 24px -12px rgba(14, 21, 36, 0.12);
  --shadow-lift: 0 2px 4px rgba(14, 21, 36, 0.05), 0 16px 32px -12px rgba(37, 99, 235, 0.22);
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.7;
  text-rendering: optimizeLegibility;
}

@media (min-width: 40rem) { body { font-size: 1.0625rem; } }

/* ---------- skeleton ---------- */

.wrap {
  width: 100%;
  max-width: var(--page);
  margin: 0 auto;
  padding: 0 1.5rem;
}

main { display: block; }

section { padding: 3.25rem 0; }
section + section { border-top: 1px solid var(--line); }

@media (min-width: 40rem) { section { padding: 4.5rem 0; } }

/* ---------- skip link ---------- */

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ink);
  color: #fff;
  padding: 0.75rem 1rem;
  z-index: 10;
  border-radius: 0 0 10px 0;
}
.skip:focus { left: 0; }

/* ---------- masthead ---------- */

.masthead {
  border-bottom: 1px solid var(--line);
  padding: 1.1rem 0;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(8px);
}

.masthead .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 2rem;
  align-items: center;
  justify-content: space-between;
}

.wordmark {
  font-size: 1.0625rem;
  letter-spacing: -0.01em;
  text-decoration: none;
  color: var(--ink);
  font-weight: 800;
}

.wordmark span {
  display: block;
  font-size: 0.625rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-faint);
  font-weight: 600;
  margin-top: 0.15rem;
}

.masthead nav {
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  display: flex;
  gap: 0.35rem;
}

.masthead nav a {
  color: var(--ink-soft);
  text-decoration: none;
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  transition: color 0.18s ease, background-color 0.18s ease;
}
.masthead nav a:hover { color: var(--ink); background: var(--bg-soft); }
.masthead nav a[aria-current="page"] {
  color: var(--blue-deep);
  background: var(--blue-soft);
}

/* ---------- type ---------- */

h1, h2, h3 {
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.025em;
  margin: 0 0 1rem;
}

h1 { font-size: clamp(2.2rem, 6.4vw, 3.4rem); }
h2 { font-size: clamp(1.45rem, 3.4vw, 1.9rem); }
h3 { font-size: 1.125rem; letter-spacing: -0.015em; }

p { margin: 0 0 1.15rem; max-width: var(--measure); }
p:last-child { margin-bottom: 0; }

.lede {
  font-size: clamp(1.1rem, 2.6vw, 1.3rem);
  line-height: 1.55;
  color: var(--ink-soft);
  max-width: 34rem;
}

.eyebrow {
  display: inline-block;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--blue-deep);
  background: var(--blue-soft);
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  margin: 0 0 1.4rem;
}

.quiet { color: var(--ink-soft); }

.small {
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--ink-soft);
}

a {
  color: var(--blue-deep);
  text-underline-offset: 0.18em;
  text-decoration-thickness: 1px;
  transition: color 0.18s ease, text-decoration-thickness 0.18s ease,
              text-underline-offset 0.18s ease;
}
a:hover { color: var(--ink); text-decoration-thickness: 2px; text-underline-offset: 0.22em; }

::selection { background: var(--hl); color: var(--ink); }

/* marker-style highlight in headlines */
.hl {
  background: linear-gradient(transparent 58%, var(--hl) 58%, var(--hl) 94%, transparent 94%);
  border-radius: 4px;
  padding: 0 0.1em;
}

/* ---------- hero ---------- */

.hero {
  padding: 4.5rem 0 4rem;
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(42rem 26rem at 85% -20%, var(--bg-wash), transparent 60%),
    radial-gradient(36rem 24rem at -10% 110%, var(--mint-soft), transparent 55%),
    linear-gradient(180deg, #FFFFFF 0%, #FAFCFF 100%);
}
@media (min-width: 40rem) { .hero { padding: 6rem 0 5.25rem; } }

.hero h1 { max-width: 17ch; margin-bottom: 1.5rem; }

/* truthful claim chips (never testimonials, never numbers without n) */
.chips {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0;
  margin: 1.6rem 0 0;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--ink-soft);
}
.chips li {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.42rem 0.9rem;
  box-shadow: var(--shadow-card);
}
.chips li::before {
  content: "";
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--mint);
  flex: none;
}
.chips li:nth-child(2)::before { background: var(--blue); }
.chips li:nth-child(3)::before { background: #F59E0B; }

/* ---------- call to action ---------- */

.cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9375rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  background: var(--blue);
  color: #fff;
  text-decoration: none;
  padding: 0.9rem 1.7rem;
  border: 1px solid var(--blue);
  border-radius: 999px;
  margin-top: 2rem;
  box-shadow: 0 10px 24px -10px var(--blue-glow);
  transition: background-color 0.18s ease, border-color 0.18s ease,
              transform 0.18s ease, box-shadow 0.18s ease;
}
.cta::after { content: "→"; font-weight: 600; transition: transform 0.18s ease; }
.cta:hover {
  background: var(--blue-deep);
  border-color: var(--blue-deep);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: var(--shadow-lift);
}
.cta:hover::after { transform: translateX(3px); }
.cta:active { transform: translateY(0); box-shadow: 0 4px 12px -6px var(--blue-glow); }

.cta-note {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--ink-faint);
  margin-top: 0.85rem;
}

/* ---------- numbered steps → cards ---------- */

.steps {
  list-style: none;
  margin: 2rem 0 0;
  padding: 0;
  counter-reset: step;
  display: grid;
  gap: 1rem;
}
@media (min-width: 48rem) { .steps { grid-template-columns: repeat(3, 1fr); gap: 1.25rem; } }

.steps li {
  counter-increment: step;
  position: relative;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem 1.4rem 1.4rem;
  max-width: none;
  box-shadow: var(--shadow-card);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.steps li:hover {
  transform: translateY(-4px);
  border-color: var(--blue-soft);
  box-shadow: var(--shadow-lift);
}

.steps li::before {
  content: counter(step, decimal-leading-zero);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 50%;
  background: var(--blue-soft);
  color: var(--blue-deep);
  font-family: var(--mono);
  font-size: 0.8125rem;
  font-weight: 700;
  margin-bottom: 0.9rem;
}

.steps h3 { margin-bottom: 0.35rem; }
.steps p { margin-bottom: 0; font-size: 0.9375rem; color: var(--ink-soft); }

/* ---------- clauses (the standard) → cards ---------- */

.clause {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.75rem 1.6rem;
  margin-top: 1.25rem;
  box-shadow: var(--shadow-card);
}

.clause .num {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--blue-deep);
  background: var(--blue-soft);
  border-radius: 999px;
  padding: 0.3rem 0.8rem;
  margin-bottom: 0.9rem;
}

.clause h2 { font-size: clamp(1.25rem, 2.8vw, 1.5rem); }
.clause p:last-child { margin-bottom: 0; }
.clause p { color: var(--ink-soft); }

/* ---------- pull panel ---------- */

.panel {
  background: linear-gradient(135deg, var(--blue-soft), var(--mint-soft));
  border: 1px solid #D8E6FF;
  border-radius: var(--radius);
  padding: 1.6rem 1.75rem;
  margin: 2.25rem 0 0;
}
.panel p { max-width: 34rem; }
.panel :last-child { margin-bottom: 0; }

.footnote {
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.15rem 1.3rem;
  margin: 2rem 0 0;
  font-size: 0.8438rem;
  line-height: 1.65;
  color: var(--ink-soft);
  max-width: 36rem;
}

/* ---------- definition-style lists ---------- */

.plain { padding-left: 1.15rem; max-width: var(--measure); }
.plain li { margin-bottom: 0.5rem; }

/* ---------- colophon ---------- */

.colophon {
  border-top: 1px solid var(--line);
  margin-top: 3rem;
  padding: 2.5rem 0 4rem;
  background: var(--bg-soft);
  font-size: 0.8125rem;
  line-height: 1.7;
  color: var(--ink-faint);
}

.colophon a { color: var(--ink-soft); }
.colophon p { max-width: 44rem; }

/* ---------- focus ---------- */

a:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
  border-radius: 6px;
}

/* ---------- cross-page transitions (CSS only, no script involved) ---------- */

@view-transition { navigation: auto; }

/* The masthead holds still while page content cross-fades beneath it. */
.masthead { view-transition-name: masthead; }

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }

  ::view-transition-old(root) { animation: 180ms ease both vt-out; }
  ::view-transition-new(root) { animation: 300ms 60ms ease both vt-in; }
}

@keyframes vt-out { to { opacity: 0; } }
@keyframes vt-in { from { opacity: 0; transform: translateY(8px); } }

@media (prefers-reduced-motion: reduce) {
  ::view-transition-old(root),
  ::view-transition-new(root) { animation: none; }
  *, *::before, *::after { transition-duration: 0.01ms !important; }
}

/* ---------- print (the Gate page will be printed and forwarded) ---------- */

@media print {
  :root { --bg: #fff; --ink: #000; }
  .masthead nav, .cta, .skip, .chips { display: none; }
  body { font-size: 11pt; }
  section { padding: 1.25rem 0; break-inside: avoid; }
  .hero { background: none; }
  .clause, .steps li { box-shadow: none; }
  a { color: #000; text-decoration: underline; }
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 9pt; }

  /* The reveal script sets opacity/transform inline before elements scroll into
     view. Print must never inherit a hidden state — force everything visible. */
  main * { opacity: 1 !important; transform: none !important; }
}
