/* Carabel marketing site — shared design system.
 *
 * One stylesheet, no build step. Tokens follow DESIGN.md's warm-gray light
 * palette plus two AA-driven additions (#0F766E teal-text, #1D4ED8 blue-hover)
 * and the marketing radii set (10px controls / 16px cards) — both logged in
 * DESIGN.md's Decisions Log (2026-07-09). Light-only by decision (scope G-6).
 *
 * The specialty avatar colors (.av.*) duplicate apps/agents/specialty_palette.py
 * deliberately: this static site cannot read Python. That file is the source
 * of truth; if the palette changes, update the hexes here.
 */

:root {
  --gray-50:  #FAFAF9;
  --gray-100: #F5F5F4;
  --gray-200: #E7E5E4;
  --gray-300: #D6D3D1;
  --ink:      #1C1917;
  --body:     #44403C;
  --muted:    #78716C;        /* AA only on gray-50/white */
  --muted-strong: #57534E;    /* secondary text on tinted surfaces */
  --blue:       #2563EB;
  --blue-hover: #1D4ED8;
  --teal:       #0D9488;      /* large text / fills only */
  --teal-text:  #0F766E;      /* AA-safe small teal text */
  --surface:    #FFFFFF;
  --r-control: 10px;
  --r-card:    16px;
  --shadow-card: 0 1px 2px rgba(28, 25, 23, 0.05), 0 10px 28px -14px rgba(28, 25, 23, 0.14);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
/* The `hidden` attribute must win over component `display` rules (e.g. the
   contact form's `display: flex`), or toggling `.hidden` on the form leaves it
   visible. `!important` keeps the attribute authoritative regardless of
   specificity. */
[hidden] { display: none !important; }
html { color-scheme: light; }
body {
  font-family: "Satoshi", system-ui, -apple-system, sans-serif;
  background: var(--gray-50);
  color: var(--body);
  font-size: 18px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
}

h1, h2, h3 { color: var(--ink); font-weight: 600; letter-spacing: -0.02em; line-height: 1.15; text-wrap: balance; }
.amp { font-family: Baskerville, "Baskerville Old Face", "Hoefler Text", "Palatino", Georgia, serif; font-style: italic; font-weight: 400; font-size: 1.06em; line-height: 1; }
a { color: var(--blue); text-underline-offset: 3px; }
a:hover { color: var(--blue-hover); }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; border-radius: 2px; }

.container { max-width: 72rem; margin-inline: auto; padding-inline: clamp(1.25rem, 5vw, 3rem); }

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--surface); color: var(--blue); font-weight: 600;
  padding: 0.75rem 1.25rem; border-radius: 0 0 var(--r-control) 0;
}
.skip-link:focus { left: 0; }

/* ── Gradient wash ──
   The .wash is a viewport-sized, overflow-clipped fixed container; the oversized
   gradient lives on ::before (inset: -25% + drift scale). This clips the bloom
   inside the viewport so it can never trigger a horizontal scrollbar on narrow
   screens, while keeping the gradient's size, position, and drift identical. */
.wash { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.wash::before {
  content: ""; position: absolute; inset: -25%; opacity: 0.75;
  background:
    radial-gradient(36vw 36vw at 88% 4%, rgba(13, 148, 136, 0.11), transparent 62%),
    radial-gradient(40vw 40vw at 100% 0%, rgba(37, 99, 235, 0.09), transparent 60%);
  will-change: transform;
}
body.home .wash::before {
  background:
    radial-gradient(40vw 40vw at 88% 38%, rgba(13, 148, 136, 0.20), transparent 62%),
    radial-gradient(44vw 44vw at 100% 62%, rgba(37, 99, 235, 0.16), transparent 60%),
    radial-gradient(36vw 36vw at 76% 88%, rgba(13, 148, 136, 0.10), transparent 66%);
  animation: drift 26s ease-in-out infinite alternate;
}
@keyframes drift {
  0%   { transform: translate3d(0, 0, 0) scale(1); }
  100% { transform: translate3d(-3%, -2%, 0) scale(1.09); }
}
@media (prefers-reduced-motion: reduce) {
  body.home .wash::before { animation: none; }
  .reveal { transition: none !important; opacity: 1 !important; transform: none !important; }
}

.page { position: relative; z-index: 1; }

/* ── Header ── */
header.site { padding-block: clamp(1.1rem, 2.5vw, 1.6rem); }
.nav-row { display: flex; align-items: center; flex-wrap: wrap; gap: 0.6rem 1.75rem; }
.brand { font-weight: 700; font-size: 1.3rem; letter-spacing: -0.02em; color: var(--teal); text-decoration: none; margin-right: auto; }
.brand:hover { color: var(--teal); }
nav.main { display: flex; align-items: center; flex-wrap: wrap; gap: 0.4rem 1.6rem; }
nav.main a.navlink { color: var(--body); text-decoration: none; font-size: 1rem; font-weight: 500; padding: 0.35rem 0.1rem; }
nav.main a.navlink:hover { color: var(--blue); }
nav.main a.navlink[aria-current="page"] { color: var(--ink); font-weight: 600; }

/* ── Buttons ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  background: var(--blue); color: #fff; border: 0; cursor: pointer;
  font-family: inherit; font-size: 1rem; font-weight: 600; text-decoration: none;
  min-height: 48px; padding: 0.65rem 1.5rem; border-radius: var(--r-control);
  transition: background 150ms ease-out, transform 150ms ease-out, box-shadow 150ms ease-out;
}
.btn:hover { background: var(--blue-hover); color: #fff; transform: translateY(-1px); box-shadow: 0 6px 16px -8px rgba(37, 99, 235, 0.5); }
.btn:disabled { background: var(--gray-300); color: var(--muted-strong); transform: none; box-shadow: none; cursor: default; }
.btn-ghost { background: transparent; color: var(--ink); border: 1px solid var(--gray-300); }
.btn-ghost:hover { background: var(--surface); color: var(--ink); border-color: var(--muted); box-shadow: 0 4px 12px -8px rgba(28, 25, 23, 0.25); }
.btn-pill { border-radius: 999px; min-height: 44px; padding: 0.5rem 1.25rem; font-size: 1rem; }

/* ── Hero (home) ── */
.hero { padding-block: clamp(3rem, 7vw, 6rem) clamp(3.5rem, 8vw, 6.5rem); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 3.5rem; align-items: center; }
@media (min-width: 1024px) {
  .hero-grid { grid-template-columns: minmax(0, 42rem) minmax(20rem, 30rem); gap: clamp(3rem, 6vw, 6rem); }
}
.eyebrow {
  font-size: 0.875rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em;
  color: var(--teal-text); margin-bottom: 1.5rem;
}
.hero h1 { font-size: clamp(2.25rem, 4.5vw, 3rem); max-width: 17ch; }
.hero h1 .line-2 { display: block; color: var(--teal); }
.hero .sub { margin-top: 1.5rem; max-width: 36rem; font-size: clamp(1.0625rem, 1.4vw, 1.1875rem); color: var(--muted-strong); }
.cta-row { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 2.25rem; }
@media (max-width: 560px) {
  .cta-row { flex-direction: column; align-items: stretch; }
  .cta-row .btn { width: 100%; }
}

/* ── Sections ── */
section { position: relative; }
.section-pad { padding-block: clamp(3rem, 7vw, 5.5rem); }
.on-white { background: var(--surface); }
.on-tint  { background: var(--gray-100); }
.prose { max-width: 68ch; }
.prose h2 { font-size: clamp(1.6rem, 2.6vw, 2rem); margin-bottom: 1rem; }
.prose p + p { margin-top: 1rem; }
.prose.centered { margin-inline: auto; }
.centered-block { max-width: 52rem; margin-inline: auto; }
.h2-std { font-size: clamp(1.6rem, 2.6vw, 2rem); }

/* ── Conversation vignette ── */
.vignette { max-width: 34rem; }
.vignette .stamp { font-size: 0.875rem; font-weight: 600; letter-spacing: 0.05em; color: var(--muted); text-transform: uppercase; margin-bottom: 1.1rem; }
.msg { border-radius: var(--r-card); padding: 1.15rem 1.4rem; font-size: 1rem; line-height: 1.55; }
.msg + .msg { margin-top: 0.9rem; }
.msg.patient { background: var(--surface); border: 1px solid var(--gray-200); color: var(--ink); max-width: 88%; box-shadow: 0 1px 2px rgba(28, 25, 23, 0.04); }
.msg.carabel { background: var(--surface); border: 1px solid var(--gray-200); box-shadow: var(--shadow-card); color: var(--body); margin-left: 8%; border-top: 3px solid var(--teal); }
.msg .who { display: block; font-size: 0.8125rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); margin-bottom: 0.4rem; }
.msg.carabel .who { color: var(--teal-text); }
@media (max-width: 560px) {
  .msg.carabel { margin-left: 0; }
  .msg.patient { max-width: 100%; }
}
.reveal { opacity: 0; transform: translateY(10px); transition: opacity 400ms ease-out, transform 400ms ease-out; }
.reveal.in { opacity: 1; transform: none; }
.vig-note { margin-top: 1.25rem; font-size: 1rem; color: var(--muted); max-width: 60ch; }

/* Specialty byline (colors: apps/agents/specialty_palette.py, duplicated by design) */
.consulted { display: flex; align-items: center; flex-wrap: wrap; gap: 0.6rem; margin-top: 1.1rem; padding-top: 0.9rem; border-top: 1px solid var(--gray-200); }
.consulted .lbl { font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); }
.avatars { display: flex; }
.av {
  width: 26px; height: 26px; border-radius: 50%; background: var(--surface);
  border: 2px solid; display: inline-flex; align-items: center; justify-content: center;
  font-size: 0.625rem; font-weight: 700; letter-spacing: 0;
}
.av + .av { margin-left: -7px; }
.av.c   { border-color: #3F8A7D; color: #3F8A7D; }
.av.nu  { border-color: #A07A42; color: #A07A42; z-index: 1; }
.av.pt  { border-color: #4B8A60; color: #4B8A60; z-index: 2; }
.av.rn  { border-color: #0F766E; color: #0F766E; }
.av.fam { border-style: dashed; border-color: #0F766E; color: #0F766E; }
.consulted .names { font-size: 0.875rem; color: var(--muted-strong); }
.nurse-note { display: flex; align-items: center; gap: 0.5rem; margin-top: 0.9rem; font-size: 0.875rem; color: var(--muted-strong); }
.nurse-note .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--teal); flex: none; }

/* ── Overnight timeline ("While Ruth slept") ── */
.tl-lede { color: var(--muted-strong); font-size: 1.125rem; margin-top: 0.25rem; }
.timeline { position: relative; display: grid; gap: 2.25rem; margin-top: 2.75rem; }
.timeline::before { content: ""; position: absolute; left: 5px; top: 8px; bottom: 8px; width: 2px; border-radius: 2px; background: var(--gray-200); }
.tl-item { position: relative; padding-left: 2rem; }
.tl-item::before {
  content: ""; position: absolute; left: 0; top: 4px; width: 12px; height: 12px;
  border-radius: 50%; background: var(--teal); border: 2px solid var(--gray-100);
}
.tl-time { font-size: 0.875rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; color: var(--teal-text); font-variant-numeric: tabular-nums; }
.tl-item h3 { font-size: 1.125rem; margin: 0.4rem 0 0.5rem; }
.tl-item p:not(.tl-time) { font-size: 0.9375rem; color: var(--muted-strong); }
.tl-avs { display: flex; margin-top: 0.85rem; }
.tl-avs .av + .av { margin-left: -7px; }
@media (min-width: 640px) and (max-width: 1099px) {
  .timeline { grid-template-columns: repeat(2, 1fr); column-gap: 3rem; }
  .timeline::before { display: none; }
}
@media (min-width: 1100px) {
  .timeline { grid-template-columns: repeat(6, 1fr); gap: 1.5rem; }
  .timeline::before { left: 6px; right: 6px; top: 5px; bottom: auto; width: auto; height: 2px; }
  .tl-item { padding-left: 0; padding-top: 2rem; }
  .tl-item::before { top: 0; left: 0; }
}

/* ── Closing section: morning-after + health-systems ── */
.close-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 3.5rem; align-items: center; }
@media (min-width: 1024px) {
  .close-grid { grid-template-columns: minmax(20rem, 32rem) minmax(0, 1fr); gap: clamp(3rem, 6vw, 5.5rem); }
}
.close-grid h2 { font-size: clamp(1.6rem, 2.6vw, 2rem); margin-bottom: 1rem; }
.close-vig { position: relative; }
.close-vig::before {
  /* Vertical-only bleed: a horizontal negative inset here sticks ~12px past the
     viewport on mobile (where the vignette fills the container) and causes a
     horizontal scrollbar. The soft radial reads the same without it. */
  content: ""; position: absolute; inset: -2.5rem 0; z-index: -1; border-radius: 32px;
  background: radial-gradient(70% 65% at 45% 45%, rgba(13, 148, 136, 0.08), transparent 72%);
}
.mini-msg {
  display: inline-block; background: var(--surface); border: 1px solid var(--gray-200);
  border-radius: 12px; padding: 0.6rem 1rem; font-size: 0.9375rem; color: var(--muted-strong);
  box-shadow: 0 1px 2px rgba(28, 25, 23, 0.04);
}
.mini-msg .mini-stamp {
  display: block; font-size: 0.75rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.05em; color: var(--muted); margin-bottom: 0.2rem;
}
.thread-line {
  width: 2px; height: 2.25rem; margin: 0.6rem 0 0.6rem 1.4rem; border-radius: 2px;
  background: linear-gradient(var(--gray-200), var(--teal));
}

/* Editorial stat */
.stat { display: flex; align-items: center; gap: 1.25rem; margin: 1.5rem 0 1.25rem; }
.stat .fig { font-size: clamp(2.5rem, 5vw, 3.25rem); font-weight: 600; letter-spacing: -0.02em; color: var(--ink); line-height: 1; font-variant-numeric: tabular-nums; }
.stat .cap { font-size: 1rem; color: var(--muted-strong); line-height: 1.4; }

/* ── Interior page hero ── */
.page-hero { padding-block: clamp(3rem, 7vw, 5.5rem) clamp(2rem, 4vw, 3rem); }
.page-hero h1 { font-size: clamp(2rem, 4vw, 2.5rem); max-width: 18ch; }
.page-hero .sub { margin-top: 1.25rem; max-width: 36rem; color: var(--muted-strong); }

/* ── About: hero grid + care-team constellation ── */
.about-hero-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 3rem; align-items: center; }
@media (min-width: 900px) {
  .about-hero-grid { grid-template-columns: minmax(0, 34rem) minmax(18rem, 26rem); gap: clamp(2.5rem, 6vw, 6rem); }
}
.dek { margin-top: 1.25rem; font-size: 1.125rem; color: var(--muted-strong); max-width: 32rem; }
.constellation { position: relative; width: 100%; max-width: 29rem; aspect-ratio: 1.02; margin-inline: auto; }
.constellation .wires { position: absolute; inset: 0; width: 100%; height: 100%; }
.node { position: absolute; width: 52px; height: 52px; transform: translate(-50%, -50%); }
.node .chip {
  position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  height: 52px; display: flex; align-items: center;
  background: var(--surface); border: 2.5px solid var(--sp); border-radius: 999px;
  transition: box-shadow 450ms ease-out;
}
.node .tok { width: 47px; flex: none; text-align: center; font-weight: 700; font-size: 13px; color: var(--sp); }
.node .label {
  display: flex; flex-direction: column; justify-content: center;
  white-space: nowrap; overflow: hidden; line-height: 1.3;
  max-width: 0; padding-right: 0; opacity: 0;
  transition: max-width 450ms ease-out, padding 450ms ease-out, opacity 250ms ease-out;
}
.node .label .nm { font-size: 13px; font-weight: 700; color: var(--sp); }
.node .label .ds { font-size: 13px; font-weight: 500; color: var(--muted-strong); }
.node.open { z-index: 6; }
.node.open .chip { box-shadow: var(--shadow-card); }
.node.open .label { max-width: min(215px, 52vw); padding-right: 16px; opacity: 1; transition-delay: 0ms, 0ms, 120ms; }
.node.fam .chip { border-style: dashed; }
.node.center { width: 76px; height: 76px; z-index: 2; }
.node.center .core {
  width: 76px; height: 76px; border-radius: 50%; background: var(--teal); color: #fff;
  display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 16px;
  animation: bob 6s ease-in-out infinite alternate;
}
@keyframes bob { from { transform: translateY(-2px); } to { transform: translateY(2px); } }
@media (prefers-reduced-motion: reduce) {
  .node.center .core { animation: none; }
  .node .chip, .node .label { transition: none; }
}

/* ── Founders ── */
.founders { display: grid; grid-template-columns: repeat(auto-fit, minmax(19rem, 1fr)); gap: 1.25rem; max-width: 52rem; margin-top: 2.5rem; }
.founder { background: var(--surface); border: 1px solid var(--gray-200); border-radius: var(--r-card); padding: 1.75rem; box-shadow: var(--shadow-card); }
.founder .head { display: flex; align-items: center; gap: 1rem; margin-bottom: 1rem; }
.founder .photo {
  width: 64px; height: 64px; border-radius: 50%; flex: none;
  background: var(--gray-100); border: 1px solid var(--gray-200);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 1.1rem; color: var(--muted-strong); letter-spacing: 0;
  object-fit: cover;
}
.founder h3 { font-size: 1.3rem; }
.founder .role { font-size: 0.875rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; color: var(--teal-text); margin-top: 0.25rem; }
.founder p { font-size: 1rem; color: var(--muted-strong); }

/* ── Contact form ── */
.callout {
  background: var(--gray-100); border-left: 3px solid var(--teal); border-radius: var(--r-card);
  padding: 1rem 1.25rem; font-size: 1rem; color: var(--muted-strong); margin-top: 1.75rem; max-width: 34rem;
}
.contact-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2.5rem; max-width: 34rem; }
form.contact { margin-top: 2.5rem; display: flex; flex-direction: column; gap: 1.25rem; }
.field label { display: block; font-size: 0.9375rem; font-weight: 500; color: var(--body); margin-bottom: 0.5rem; }
.field label .req { color: #DC2626; }
.field label .opt { color: var(--muted); font-weight: 400; }
.field input, .field textarea {
  width: 100%; font-family: inherit; font-size: 1rem; color: var(--ink);
  background: var(--surface); border: 1px solid var(--gray-300); border-radius: var(--r-control);
  min-height: 48px; padding: 0.7rem 1rem;
  transition: border-color 150ms ease-out, box-shadow 150ms ease-out;
}
.field textarea { min-height: 8rem; resize: vertical; line-height: 1.5; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15); }
.field input::placeholder, .field textarea::placeholder { color: #A8A29E; }
.field .err { display: none; font-size: 0.9375rem; color: #DC2626; margin-top: 0.4rem; }
.field.invalid input, .field.invalid textarea { border-color: #DC2626; }
.field.invalid .err { display: block; }
.hp-wrap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-status { font-size: 1rem; }
.form-status.fail { color: var(--body); background: #FEF3C7; border: 1px solid #FDE68A; border-radius: var(--r-control); padding: 0.9rem 1.1rem; }
.success-panel { background: var(--surface); border: 1px solid var(--gray-200); border-radius: var(--r-card); box-shadow: var(--shadow-card); padding: 2rem; max-width: 34rem; margin-top: 2.5rem; }
.success-panel h2 { font-size: 1.6rem; margin-bottom: 0.6rem; }
.success-panel p { color: var(--muted-strong); }
.success-panel a.home { display: inline-block; margin-top: 1.25rem; font-weight: 500; }
.spinner { width: 16px; height: 16px; border: 2px solid rgba(255, 255, 255, 0.4); border-top-color: #fff; border-radius: 50%; animation: spin 700ms linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation: none; } }

/* ── Small centered card pages (sign-in, 404) ── */
.card-page { min-height: 62vh; display: flex; align-items: center; justify-content: center; padding-block: 3rem; }
.mini-card { background: var(--surface); border: 1px solid var(--gray-200); border-radius: var(--r-card); box-shadow: var(--shadow-card); padding: clamp(1.75rem, 4vw, 2.5rem); max-width: 28rem; width: 100%; }
.mini-card h1 { font-size: 1.75rem; margin-bottom: 0.75rem; }
.mini-card p { color: var(--muted-strong); font-size: 1rem; }
.mini-card .actions { display: flex; flex-direction: column; gap: 0.75rem; margin-top: 1.75rem; }
.mini-card .back { display: inline-block; margin-top: 1.25rem; font-size: 1rem; color: var(--muted-strong); }

/* ── Legal / long-form prose (privacy, terms) ── */
.legal { max-width: 760px; margin-inline: auto; padding-block: clamp(1rem, 3vw, 2rem) clamp(3rem, 6vw, 4rem); line-height: 1.7; }
.legal h1 { font-size: clamp(1.9rem, 4vw, 2.75rem); margin-bottom: 0.5rem; max-width: 18ch; }
.legal .meta { color: var(--muted); font-size: 1rem; margin-bottom: 2.5rem; }
.legal h2 {
  font-size: clamp(1.2rem, 2.4vw, 1.45rem); letter-spacing: -0.015em;
  margin: 2.75rem 0 0.85rem; padding-top: 1.5rem; border-top: 1px solid var(--gray-200);
}
.legal h2:first-of-type { border-top: none; padding-top: 0; }
.legal p { margin: 0 0 1.1rem; max-width: 68ch; }
.legal strong { color: var(--ink); font-weight: 600; }
.legal ul { margin: 0 0 1.2rem 1.25rem; max-width: 68ch; }
.legal li { margin-bottom: 0.5rem; }
.legal .callout { margin: 1.5rem 0; max-width: none; }
.legal .callout p { margin: 0; }

/* ── Footer ── */
footer.site { border-top: 1px solid var(--gray-200); padding-block: 2.5rem 2.75rem; background: var(--gray-50); position: relative; z-index: 1; }
.foot-grid { display: flex; align-items: center; justify-content: space-between; gap: 1.25rem 2.5rem; flex-wrap: wrap; margin-bottom: 1.5rem; }
.foot-grid .foot-links { margin-bottom: 0; }
.foot-links { display: flex; flex-wrap: wrap; gap: 0.5rem 1.75rem; margin-bottom: 1.5rem; }
.foot-links a { color: var(--muted-strong); text-decoration: none; font-size: 0.9375rem; font-weight: 500; }
.foot-links a:hover { color: var(--ink); }
.badge-link { display: block; flex: none; }
.badge-link img { display: block; width: 160px; height: 48px; }
.addr { font-size: 0.875rem; color: var(--muted); }
.addr .sep { margin-inline: 0.5rem; color: var(--gray-300); }
