/* ==========================================================================
   Khai System — site stylesheet
   Point of view: warm, human, editorial. Paper + ink, one confident accent,
   and a per-agent colour that each product page inherits via --accent.
   ========================================================================== */

/* ---------- Tokens ---------- */
:root {
  --paper: #f4eee3;
  --paper-2: #ebe3d4;
  --card: #fffdf8;
  --ink: #1c1a17;
  --ink-2: #4a453d;
  --ink-3: #7a7366;
  --line: #dcd2c0;
  --brand: #d9512c;
  --brand-ink: #a83a1a;
  --forest: #1f3b2d;

  --accent: var(--brand);
  --accent-soft: #f6dccf;
  --accent-ink: var(--brand-ink);

  --f-display: "Instrument Serif", "Times New Roman", serif;
  --f-body: "Onest", "Helvetica Neue", sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, monospace;

  --r-sm: 10px;
  --r-md: 18px;
  --r-lg: 28px;
  --shadow-1: 0 1px 2px rgba(28, 26, 23, .06), 0 8px 24px -12px rgba(28, 26, 23, .18);
  --shadow-2: 0 2px 4px rgba(28, 26, 23, .06), 0 30px 60px -24px rgba(28, 26, 23, .35);

  --wrap: 1200px;
  --gutter: clamp(16px, 4vw, 40px);
  --ease: cubic-bezier(.2, .7, .2, 1);
}

/* Per-agent palettes */
.a-parent    { --accent: #3e7c4f; --accent-soft: #dcebd6; --accent-ink: #285636; }
.a-coach     { --accent: #e0582c; --accent-soft: #fadccd; --accent-ink: #a63a15; }
.a-companion { --accent: #d99528; --accent-soft: #f8e6c2; --accent-ink: #8a5a0c; }
.a-caregiver { --accent: #23827f; --accent-soft: #d2ebe8; --accent-ink: #175a58; }
.a-journal   { --accent: #3d4b8f; --accent-soft: #dde0f2; --accent-ink: #283266; }
.a-house     { --accent: #8f2f3c; --accent-soft: #f1d8da; --accent-ink: #651f29; }

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 17px/1.6 var(--f-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
/* Paper grain */
body::before {
  content: "";
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 100;
  opacity: .35;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.3 0 0 0 0 0.25 0 0 0 0 0.2 0 0 0 0.09 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
::selection { background: var(--accent); color: #fff; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

.wrap { width: min(100% - 2 * var(--gutter), var(--wrap)); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 16px; top: -60px; z-index: 200; background: var(--ink); color: var(--paper); padding: 10px 16px; border-radius: 8px; }
.skip:focus { top: 12px; }

/* ---------- Type ---------- */
h1, h2, h3 { font-family: var(--f-display); font-weight: 400; letter-spacing: -.01em; line-height: 1.02; margin: 0; }
h1 { font-size: clamp(3rem, 7.4vw, 6.4rem); }
h2 { font-size: clamp(2.3rem, 4.8vw, 4rem); }
h3 { font-size: clamp(1.6rem, 2.4vw, 2rem); line-height: 1.1; }
h1 em, h2 em, h3 em { font-style: italic; color: var(--accent); }
p { margin: 0 0 1em; }
.lede { font-size: clamp(1.1rem, 1.6vw, 1.3rem); line-height: 1.55; color: var(--ink-2); max-width: 36em; }
.eyebrow {
  display: inline-flex; align-items: center; gap: .6em;
  font: 500 .74rem/1 var(--f-mono);
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--ink-2);
  margin-bottom: 1.4rem;
}
.eyebrow::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }

/* ---------- Buttons ---------- */
.btn {
  --b-bg: var(--ink); --b-fg: var(--paper);
  display: inline-flex; align-items: center; justify-content: center; gap: .55em;
  padding: .95em 1.45em;
  border-radius: 999px;
  border: 1.5px solid var(--b-bg);
  background: var(--b-bg); color: var(--b-fg);
  font: 600 .98rem/1 var(--f-body);
  text-decoration: none; cursor: pointer;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), background .2s;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 10px 22px -10px rgba(28, 26, 23, .5); }
.btn svg { width: 18px; height: 18px; transition: transform .25s var(--ease); }
.btn:hover svg { transform: translateX(3px); }
.btn--accent { --b-bg: var(--accent); --b-fg: #fff; }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn--ghost:hover { background: var(--ink); color: var(--paper); }
.btn--light { --b-bg: var(--paper); --b-fg: var(--ink); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--paper) 82%, transparent);
  backdrop-filter: blur(14px) saturate(1.3);
  -webkit-backdrop-filter: blur(14px) saturate(1.3);
  border-bottom: 1px solid transparent;
  transition: border-color .3s;
}
.site-header.is-scrolled { border-bottom-color: var(--line); }
.site-header__inner { display: flex; align-items: center; gap: 24px; height: 72px; }
.logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font: 600 1.25rem/1 var(--f-body); letter-spacing: -.02em; }
.logo svg { width: 34px; height: 34px; }
.logo small { font: 500 .62rem/1 var(--f-mono); letter-spacing: .16em; text-transform: uppercase; color: var(--ink-3); margin-left: 2px; }
.nav { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.nav a { text-decoration: none; padding: 9px 14px; border-radius: 999px; font-size: .95rem; color: var(--ink-2); transition: background .2s, color .2s; }
.nav a:hover, .nav a[aria-current="page"] { background: var(--paper-2); color: var(--ink); }
.nav .btn { padding: .75em 1.2em; margin-left: 8px; color: var(--paper); }
.nav .btn, .nav .btn:hover, .nav .btn[aria-current] { background: var(--ink); color: var(--paper); }
.nav-drop { position: relative; }
.nav-drop > button {
  all: unset; cursor: pointer; display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 14px; border-radius: 999px; font-size: .95rem; color: var(--ink-2);
}
.nav-drop > button:hover, .nav-drop[data-open] > button { background: var(--paper-2); color: var(--ink); }
.nav-drop > button svg { width: 12px; transition: transform .2s; }
.nav-drop[data-open] > button svg { transform: rotate(180deg); }
.nav-drop__menu {
  position: absolute; top: calc(100% + 10px); left: 50%; translate: -50% 0;
  width: 520px; padding: 10px;
  display: grid; grid-template-columns: 1fr 1fr; gap: 4px;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r-md);
  box-shadow: var(--shadow-2);
  opacity: 0; visibility: hidden; transform: translateY(-6px);
  transition: opacity .2s, transform .2s var(--ease), visibility .2s;
}
.nav-drop[data-open] .nav-drop__menu { opacity: 1; visibility: visible; transform: none; }
.nav-drop__menu a { display: flex; gap: 12px; align-items: center; padding: 10px; border-radius: 12px; }
.nav-drop__menu img { width: 42px; height: 42px; border-radius: 50%; flex: none; }
.nav-drop__menu b { display: block; font-weight: 600; color: var(--ink); font-size: .95rem; }
.nav-drop__menu span { display: block; font-size: .8rem; color: var(--ink-3); line-height: 1.3; }
.menu-toggle { all: unset; display: none; cursor: pointer; padding: 10px; border-radius: 10px; }
.menu-toggle svg { width: 26px; height: 26px; }

@media (max-width: 900px) {
  .menu-toggle { display: block; margin-left: auto; }
  .nav {
    position: fixed; inset: 72px 0 auto 0;
    flex-direction: column; align-items: stretch; gap: 2px;
    padding: 12px var(--gutter) 24px;
    background: var(--paper); border-bottom: 1px solid var(--line);
    max-height: calc(100dvh - 72px); overflow: auto;
    transform: translateY(-8px); opacity: 0; visibility: hidden;
    transition: opacity .2s, transform .2s var(--ease), visibility .2s;
  }
  .site-header[data-menu] .nav { transform: none; opacity: 1; visibility: visible; }
  .nav a, .nav-drop > button { padding: 14px 12px; font-size: 1.05rem; }
  .nav .btn { margin: 10px 0 0; padding: 1em; }
  .nav-drop__menu { position: static; translate: none; width: auto; grid-template-columns: 1fr; box-shadow: none; display: none; opacity: 1; visibility: visible; transform: none; }
  .nav-drop[data-open] .nav-drop__menu { display: grid; }
}

/* ---------- Sections ---------- */
.section { padding: clamp(80px, 11vw, 150px) 0; position: relative; }
.section--tight { padding: clamp(56px, 7vw, 96px) 0; }
.section--ink { background: var(--ink); color: var(--paper); }
.section--ink .lede, .section--ink p { color: #cfc6b6; }
.section--ink .eyebrow { color: #cfc6b6; }
.section--soft { background: var(--paper-2); }
.section--accent { background: var(--accent-soft); }
.section-head { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: end; margin-bottom: clamp(48px, 6vw, 80px); }
.section-head .lede { margin: 0; }
@media (max-width: 820px) { .section-head { grid-template-columns: 1fr; gap: 20px; } }

/* ---------- Hero (home) ---------- */
.hero { padding: clamp(40px, 6vw, 80px) 0 clamp(80px, 9vw, 120px); position: relative; overflow: hidden; }
.hero__grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(32px, 5vw, 72px); align-items: center; }
.hero h1 { margin-bottom: 28px; }
.hero h1 .line { display: block; }
.hero .lede { margin-bottom: 36px; }
.hero__proof { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 40px; padding: 0; list-style: none; font-size: .9rem; color: var(--ink-2); }
.hero__proof li { display: inline-flex; align-items: center; gap: 8px; }
.hero__proof svg { width: 18px; height: 18px; color: var(--forest); }
.hero__stage { position: relative; display: grid; justify-items: center; }
.hero__sun {
  position: absolute; width: 120%; aspect-ratio: 1; top: 50%; left: 50%; translate: -50% -48%;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 50%, var(--accent-soft) 0 38%, transparent 38.2%),
              repeating-radial-gradient(circle at 50% 50%, transparent 0 46px, color-mix(in srgb, var(--accent) 14%, transparent) 46px 47px);
  mask-image: radial-gradient(circle, #000 40%, transparent 70%);
  transition: background .6s;
  z-index: 0;
}
.picker { position: relative; z-index: 2; display: flex; gap: 8px; margin-bottom: 18px; padding: 6px; background: var(--card); border: 1px solid var(--line); border-radius: 999px; box-shadow: var(--shadow-1); }
.picker button {
  all: unset; cursor: pointer; position: relative;
  width: 44px; height: 44px; border-radius: 50%;
  transition: transform .25s var(--ease), box-shadow .25s;
}
.picker button img { width: 100%; height: 100%; border-radius: 50%; }
.picker button:hover { transform: translateY(-3px); }
.picker button[aria-selected="true"] { box-shadow: 0 0 0 3px var(--card), 0 0 0 5px var(--accent); }
.picker button:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }
.picker__label { position: relative; z-index: 2; margin-top: 18px; font: 500 .78rem/1 var(--f-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--ink-2); text-align: center; min-height: 1em; }
.picker__label a { color: var(--accent-ink); text-underline-offset: 3px; }
@media (max-width: 960px) {
  .hero__grid { grid-template-columns: 1fr; }
  .hero__stage { margin-top: 12px; }
}

/* ---------- Phone ---------- */
.phone {
  --w: 340px;
  position: relative; z-index: 1;
  width: min(var(--w), 100%);
  aspect-ratio: 9 / 19;
  padding: 11px;
  border-radius: 54px;
  background: linear-gradient(145deg, #2b2925, #0f0e0c);
  box-shadow: var(--shadow-2), inset 0 0 0 1.5px #4a463f, inset 0 0 0 4px #121110;
  flex: none;
}
.phone::before { /* dynamic island */
  content: ""; position: absolute; top: 22px; left: 50%; translate: -50% 0;
  width: 96px; height: 28px; border-radius: 20px; background: #000; z-index: 3;
}
.phone__screen {
  position: relative; height: 100%; overflow: hidden;
  border-radius: 44px;
  background: #efe7da;
  display: flex; flex-direction: column;
  font-size: 15px;
}
.phone__status { display: flex; justify-content: space-between; align-items: center; padding: 16px 28px 6px; font: 600 13px/1 var(--f-body); color: var(--ink); }
.phone__status span:last-child { display: flex; gap: 5px; align-items: center; }
.phone__status svg { width: 16px; height: 12px; }
.phone__top { display: flex; align-items: center; gap: 10px; padding: 10px 14px 10px 10px; background: var(--card); border-bottom: 1px solid #e6dccb; }
.phone__top > svg { width: 20px; height: 20px; color: var(--accent); flex: none; }
.phone__top img { width: 40px; height: 40px; border-radius: 50%; flex: none; }
.phone__who { flex: 1; min-width: 0; line-height: 1.2; }
.phone__who b { display: block; font-size: 15.5px; }
.phone__who span { display: flex; align-items: center; gap: 5px; font-size: 11.5px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.phone__who span::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #3fb36b; flex: none; }
.phone__icons { display: flex; gap: 14px; color: var(--accent); }
.phone__icons svg { width: 20px; height: 20px; }
.phone__chat {
  flex: 1; overflow: hidden; position: relative;
  padding: 12px 12px 8px;
  background-color: #efe7da;
  background-image: radial-gradient(color-mix(in srgb, var(--accent) 16%, transparent) 1px, transparent 1.2px);
  background-size: 18px 18px;
}
.chat { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.chat__day { align-self: center; margin: 2px 0 8px; padding: 4px 10px; border-radius: 8px; background: rgba(255, 253, 248, .85); font-size: 11.5px; color: var(--ink-3); box-shadow: 0 1px 1px rgba(0, 0, 0, .05); }
.msg {
  position: relative; max-width: 84%;
  padding: 8px 11px 7px;
  border-radius: 14px;
  font-size: 14.5px; line-height: 1.38;
  box-shadow: 0 1px 1px rgba(28, 26, 23, .1);
  word-wrap: break-word;
}
.msg time { float: right; margin: 7px 0 -4px 10px; font-size: 10.5px; color: var(--ink-3); display: inline-flex; gap: 3px; align-items: center; }
.msg time svg { width: 15px; height: 10px; color: #3a9bdc; }
.msg small { display: block; font-size: 11.5px; font-weight: 600; color: var(--accent-ink); margin-bottom: 1px; }
.msg--in { align-self: flex-start; background: var(--card); border-top-left-radius: 4px; }
.msg--out { align-self: flex-end; background: color-mix(in srgb, var(--accent-soft) 85%, #fff); border-top-right-radius: 4px; }
.msg--ask::after {
  content: "Asks before acting";
  position: absolute; left: 8px; bottom: -9px;
  padding: 2px 7px; border-radius: 999px;
  background: var(--accent); color: #fff;
  font: 600 9px/1.4 var(--f-mono); letter-spacing: .06em; text-transform: uppercase;
}
.msg--ask { margin-bottom: 10px; }
.msg__card { margin: 4px 0 6px; padding: 10px; border-radius: 10px; background: var(--paper); font-size: 12.5px; }
.msg__card b { display: block; font-size: 12px; margin-bottom: 6px; }
.bars { display: flex; align-items: flex-end; gap: 5px; height: 54px; }
.bars i { flex: 1; background: var(--accent); border-radius: 3px 3px 0 0; opacity: .85; }
.bars i:last-child { opacity: 1; background: var(--accent-ink); }
.bars-x { display: flex; gap: 5px; margin-top: 4px; font-size: 9.5px; color: var(--ink-3); }
.bars-x span { flex: 1; text-align: center; }
.typing { align-self: flex-start; display: inline-flex; gap: 4px; padding: 12px 14px; background: var(--card); border-radius: 14px; border-top-left-radius: 4px; box-shadow: 0 1px 1px rgba(28, 26, 23, .1); }
.typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--ink-3); animation: blink 1.2s infinite; }
.typing i:nth-child(2) { animation-delay: .15s; }
.typing i:nth-child(3) { animation-delay: .3s; }
@keyframes blink { 0%, 60%, 100% { opacity: .25; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-3px); } }
.phone__composer { display: flex; align-items: center; gap: 8px; padding: 8px 10px; background: #f7f1e6; }
.phone__composer > svg { width: 24px; height: 24px; color: var(--ink-3); flex: none; }
.phone__input { flex: 1; padding: 9px 14px; border-radius: 999px; background: var(--card); font-size: 14px; color: var(--ink-3); border: 1px solid #e6dccb; }
.phone__mic { width: 38px; height: 38px; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; flex: none; }
.phone__mic svg { width: 18px; height: 18px; }
.phone__tabs { display: flex; justify-content: space-around; padding: 8px 10px 20px; background: var(--card); border-top: 1px solid #e6dccb; }
.phone__tabs span { display: grid; justify-items: center; gap: 3px; font-size: 10px; color: var(--ink-3); }
.phone__tabs span.is-on { color: var(--accent); font-weight: 600; }
.phone__tabs svg { width: 22px; height: 22px; }

/* message reveal (JS adds .is-hidden, then removes progressively) */
.msg, .chat__day { transition: opacity .35s var(--ease), transform .35s var(--ease); }
.msg.is-hidden, .chat__day.is-hidden { display: none; }
.msg.is-entering { opacity: 0; transform: translateY(8px) scale(.98); }

/* ---------- Principles ---------- */
.manifesto { font-family: var(--f-display); font-size: clamp(2.2rem, 5.4vw, 4.6rem); line-height: 1.08; max-width: 18em; margin: 0; }
.manifesto span { color: #77705f; transition: color .5s; }
.manifesto span.is-lit { color: var(--paper); }
.manifesto em { color: var(--brand); }
.principles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; margin-top: clamp(56px, 7vw, 96px); background: #3a3630; border: 1px solid #3a3630; border-radius: var(--r-md); overflow: hidden; }
.principle { background: var(--ink); padding: 28px 24px 32px; }
.principle svg { width: 30px; height: 30px; color: var(--brand); margin-bottom: 26px; }
.principle h3 { font-size: 1.6rem; color: var(--paper); margin-bottom: 10px; }
.principle p { font-size: .95rem; margin: 0; }
@media (max-width: 960px) { .principles { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .principles { grid-template-columns: 1fr; } }

/* ---------- Agent cards ---------- */
.agents { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.agent-card {
  position: relative; display: flex; flex-direction: column;
  padding: 28px; min-height: 360px;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg);
  text-decoration: none; overflow: hidden;
  transition: transform .35s var(--ease), box-shadow .35s var(--ease), border-color .35s;
}
.agent-card::before {
  content: ""; position: absolute; right: -60px; top: -60px; width: 220px; height: 220px; border-radius: 50%;
  background: var(--accent-soft); transition: transform .6s var(--ease);
}
.agent-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-2); border-color: transparent; }
.agent-card:hover::before { transform: scale(1.35); }
.agent-card img { position: relative; width: 92px; height: 92px; border-radius: 50%; margin-bottom: auto; box-shadow: 0 0 0 5px var(--card); }
.agent-card__name { position: relative; font: 500 .74rem/1 var(--f-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--accent-ink); margin: 40px 0 10px; }
.agent-card h3 { position: relative; margin-bottom: 12px; }
.agent-card p { position: relative; color: var(--ink-2); font-size: .97rem; margin: 0 0 22px; }
.agent-card__more { position: relative; display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: .93rem; color: var(--accent-ink); }
.agent-card__more svg { width: 18px; transition: transform .3s var(--ease); }
.agent-card:hover .agent-card__more svg { transform: translateX(4px); }
@media (max-width: 1000px) { .agents { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) { .agents { grid-template-columns: 1fr; } .agent-card { min-height: 0; } }

/* ---------- Ask-first split ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(40px, 6vw, 96px); align-items: center; }
.split--rev > :first-child { order: 2; }
@media (max-width: 900px) { .split { grid-template-columns: 1fr; } .split--rev > :first-child { order: 0; } }
.compare { display: grid; gap: 14px; }
.compare__row { display: grid; grid-template-columns: 120px 1fr; gap: 16px; align-items: start; padding: 20px 22px; border-radius: var(--r-md); background: var(--card); border: 1px solid var(--line); }
.compare__row--bad { background: transparent; border-style: dashed; color: var(--ink-3); }
.compare__row--bad p { text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--brand) 60%, transparent); }
.compare__tag { font: 500 .7rem/1.4 var(--f-mono); letter-spacing: .1em; text-transform: uppercase; padding-top: 3px; }
.compare__row p { margin: 0; font-size: 1.02rem; }
@media (max-width: 520px) { .compare__row { grid-template-columns: 1fr; gap: 6px; } }

/* ---------- Privacy ---------- */
.vault { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.vault__item { padding: 30px 26px; border-radius: var(--r-md); border: 1px solid var(--line); background: var(--card); }
.vault__item svg { width: 34px; height: 34px; color: var(--forest); margin-bottom: 24px; }
.vault__item h3 { font-size: 1.7rem; margin-bottom: 10px; }
.vault__item p { color: var(--ink-2); margin: 0; font-size: .97rem; }
@media (max-width: 860px) { .vault { grid-template-columns: 1fr; } }

/* ---------- Big stat / quote ---------- */
.pull { font-family: var(--f-display); font-size: clamp(2rem, 4.4vw, 3.6rem); line-height: 1.1; max-width: 20em; margin: 0 0 28px; }
.pull em { color: var(--accent); }

/* ---------- CTA band ---------- */
.cta-band { position: relative; overflow: hidden; border-radius: var(--r-lg); background: var(--forest); color: var(--paper); padding: clamp(48px, 7vw, 96px) clamp(28px, 6vw, 80px); display: grid; grid-template-columns: 1.3fr 1fr; gap: 40px; align-items: center; }
.cta-band::after { content: ""; position: absolute; right: -140px; bottom: -220px; width: 520px; height: 520px; border-radius: 50%; border: 1px solid rgba(244, 238, 227, .14); box-shadow: 0 0 0 60px rgba(244, 238, 227, .03), 0 0 0 120px rgba(244, 238, 227, .025); }
.cta-band h2 em { color: #f2b48f; }
.cta-band p { color: #c9d4cc; margin: 18px 0 0; max-width: 30em; }
.cta-band .btn-row { position: relative; z-index: 1; justify-content: flex-end; }
.cta-band .btn--ghost { color: var(--paper); border-color: rgba(244, 238, 227, .5); }
.cta-band .btn--ghost:hover { background: var(--paper); color: var(--ink); }
@media (max-width: 860px) { .cta-band { grid-template-columns: 1fr; } .cta-band .btn-row { justify-content: flex-start; } }

/* ---------- Footer ---------- */
.site-footer { padding: 80px 0 40px; border-top: 1px solid var(--line); margin-top: clamp(80px, 10vw, 140px); }
.site-footer__grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 40px; }
.site-footer h4 { font: 500 .72rem/1 var(--f-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); margin: 6px 0 18px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.site-footer ul a { text-decoration: none; color: var(--ink-2); font-size: .95rem; }
.site-footer ul a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.site-footer__tag { font-family: var(--f-display); font-size: 1.8rem; line-height: 1.15; margin: 22px 0 0; max-width: 12em; }
.site-footer__base { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-top: 64px; padding-top: 24px; border-top: 1px solid var(--line); font-size: .85rem; color: var(--ink-3); }
@media (max-width: 860px) { .site-footer__grid { grid-template-columns: 1fr 1fr; } .site-footer__grid > :first-child { grid-column: 1 / -1; } }

/* ---------- Agent page hero ---------- */
.ahero { position: relative; overflow: hidden; padding: clamp(40px, 6vw, 72px) 0 clamp(72px, 9vw, 120px); background: linear-gradient(180deg, var(--accent-soft), var(--paper) 92%); }
.ahero__grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(32px, 6vw, 80px); align-items: center; }
.ahero__mascot { display: flex; align-items: center; gap: 16px; margin-bottom: 30px; }
.ahero__mascot img { width: 84px; height: 84px; border-radius: 50%; box-shadow: 0 0 0 5px var(--card), var(--shadow-1); }
.ahero__mascot b { display: block; font-family: var(--f-display); font-size: 1.9rem; font-weight: 400; line-height: 1; }
.ahero__mascot span { font: 500 .72rem/1 var(--f-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--accent-ink); }
.ahero h1 { font-size: clamp(2.8rem, 6.2vw, 5.4rem); margin-bottom: 26px; }
.ahero .lede { margin-bottom: 34px; }
.ahero__stage { display: grid; justify-items: center; position: relative; }
.ahero__stage::before { content: ""; position: absolute; inset: 8% -10%; border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--accent) 22%, transparent), transparent 65%); }
.keys-inline { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 30px; padding: 0; list-style: none; }
.keys-inline li { padding: 7px 13px; border-radius: 999px; border: 1px solid color-mix(in srgb, var(--accent) 40%, transparent); font: 500 .74rem/1 var(--f-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--accent-ink); background: color-mix(in srgb, var(--card) 60%, transparent); }
@media (max-width: 960px) { .ahero__grid { grid-template-columns: 1fr; } }

/* ---------- Parent story (vertical dialogue) ---------- */
.story { display: grid; gap: clamp(56px, 8vw, 110px); }
.beat { display: grid; grid-template-columns: 1fr auto 1fr; gap: clamp(24px, 4vw, 64px); align-items: center; }
.beat__person { display: grid; justify-items: center; text-align: center; gap: 14px; }
.beat__person img { width: min(260px, 100%); height: auto; }
.beat__person figcaption { font: 500 .74rem/1.3 var(--f-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); }
.beat__person figcaption b { display: block; font: 400 1.8rem/1 var(--f-display); letter-spacing: 0; text-transform: none; color: var(--ink); margin-bottom: 6px; }
.beat__note { max-width: 18em; }
.beat__note .step { font: 500 .72rem/1 var(--f-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--accent-ink); }
.beat__note h3 { margin: 12px 0 10px; }
.beat__note p { color: var(--ink-2); margin: 0; }
.beat .phone { --w: 360px; aspect-ratio: 9 / 14.5; }
.beat .msg { font-size: 15.5px; }
.beat .phone__chat { display: flex; flex-direction: column; justify-content: flex-start; }
@media (max-width: 960px) {
  .beat { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .beat > * { order: 0 !important; }
  .beat__person img { width: 180px; }
  .beat__note { margin-inline: auto; }
}

/* ---------- Diagrams ---------- */
.diagram { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); padding: clamp(24px, 4vw, 56px); box-shadow: var(--shadow-1); }
.diagram svg { width: 100%; height: auto; overflow: visible; }
.diagram svg text { font-family: var(--f-body); }
.diagram__caption { margin: 24px 0 0; font-size: .9rem; color: var(--ink-3); text-align: center; }

/* Coach loop: SVG cycle + "over time" column; stacks on narrow screens */
.loop { display: grid; grid-template-columns: 1.15fr 1fr; gap: clamp(28px, 5vw, 64px); align-items: center; }
.loop__svg { max-width: 460px; margin-inline: auto; }
.loop__time h4 { margin: 0 0 14px; font: 500 .72rem/1 var(--f-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); }
.loop__time ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.loop__time li { padding: 16px 18px; border-radius: 14px; background: var(--paper); }
.loop__time b { display: block; font-weight: 600; font-size: 1.05rem; }
.loop__time span { color: var(--ink-2); font-size: .93rem; }
.loop__approve { margin: 14px 0 0; padding: 14px 18px; border-radius: 14px; border: 1.5px dashed var(--accent); color: var(--accent-ink); font-weight: 600; font-size: .93rem; text-align: center; }
@media (max-width: 820px) { .loop { grid-template-columns: 1fr; } }

/* Flow diagram (HTML): inputs → agent → outcomes */
.flow { display: grid; grid-template-columns: 1fr auto 1fr; gap: clamp(20px, 3vw, 48px); align-items: center; }
.flow__col { display: grid; gap: 12px; }
.flow__col h4 { margin: 0 0 6px; font: 500 .72rem/1 var(--f-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); }
.flow__node { position: relative; display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: 14px; background: var(--paper); border: 1px solid var(--line); font-size: .95rem; line-height: 1.4; }
.flow__node svg { width: 22px; height: 22px; flex: none; color: var(--accent); margin-top: 1px; }
.flow__node b { display: block; font-weight: 600; }
.flow__node span { color: var(--ink-3); font-size: .86rem; }
.flow__col--in .flow__node::after, .flow__col--out .flow__node::before {
  content: ""; position: absolute; top: 50%; width: clamp(20px, 3vw, 48px); height: 1.5px;
  background: repeating-linear-gradient(90deg, var(--accent) 0 5px, transparent 5px 9px);
  background-size: 18px 100%;
  animation: dash 1.2s linear infinite;
}
.flow__col--in .flow__node::after { left: 100%; }
.flow__col--out .flow__node::before { right: 100%; }
@keyframes dash { to { background-position: 18px 0; } }
.flow__hub { display: grid; justify-items: center; gap: 14px; text-align: center; width: 220px; padding: 28px 20px; border-radius: 120px 120px 26px 26px; background: var(--accent-soft); border: 1.5px solid color-mix(in srgb, var(--accent) 40%, transparent); }
.flow__hub img { width: 96px; height: 96px; border-radius: 50%; box-shadow: 0 0 0 6px var(--card); }
.flow__hub b { font-family: var(--f-display); font-weight: 400; font-size: 1.7rem; line-height: 1; }
.flow__hub ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: .8rem; color: var(--accent-ink); }
.flow__hub li { padding: 5px 10px; border-radius: 999px; background: var(--card); }
.flow__you { grid-column: 1 / -1; display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 22px; padding: 14px 18px; border-radius: 14px; border: 1.5px dashed color-mix(in srgb, var(--accent) 50%, transparent); font-size: .95rem; color: var(--ink-2); text-align: center; }
.flow__you svg { width: 22px; height: 22px; color: var(--accent); flex: none; }
@media (max-width: 900px) {
  .flow { grid-template-columns: 1fr; }
  .flow__hub { width: 100%; max-width: 320px; margin-inline: auto; }
  .flow__col--in .flow__node::after, .flow__col--out .flow__node::before { display: none; }
}

/* ---------- Keys grid ---------- */
.keys { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.key { padding: 26px 24px; border-radius: var(--r-md); background: var(--card); border: 1px solid var(--line); }
.key__n { font: 500 .72rem/1 var(--f-mono); color: var(--accent-ink); letter-spacing: .12em; }
.key h3 { font-size: 1.7rem; margin: 18px 0 8px; }
.key p { margin: 0; color: var(--ink-2); font-size: .95rem; }

.next-agent { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 28px 32px; border-radius: var(--r-lg); background: var(--card); border: 1px solid var(--line); text-decoration: none; transition: transform .3s var(--ease), box-shadow .3s; }
.next-agent:hover { transform: translateY(-4px); box-shadow: var(--shadow-2); }
.next-agent span { font: 500 .72rem/1 var(--f-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); }
.next-agent b { display: block; font: 400 clamp(1.6rem, 3vw, 2.4rem)/1.1 var(--f-display); margin-top: 8px; }
.next-agent img { width: 72px; height: 72px; border-radius: 50%; }

/* ---------- Forms ---------- */
.form-page { padding: clamp(40px, 6vw, 80px) 0 0; }
.form-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(40px, 6vw, 96px); align-items: start; }
.form-aside h1 { font-size: clamp(2.8rem, 5.6vw, 4.8rem); margin-bottom: 24px; }
.form-aside .lede { margin-bottom: 36px; }
.promise { list-style: none; padding: 0; margin: 0 0 36px; display: grid; gap: 16px; }
.promise li { display: grid; grid-template-columns: 28px 1fr; gap: 12px; font-size: .97rem; color: var(--ink-2); }
.promise svg { width: 22px; height: 22px; color: var(--accent); margin-top: 2px; }
.promise b { color: var(--ink); font-weight: 600; }
.aside-card { display: flex; gap: 14px; align-items: center; padding: 18px; border-radius: var(--r-md); background: var(--paper-2); font-size: .92rem; color: var(--ink-2); }
.aside-card img { width: 52px; height: 52px; border-radius: 50%; flex: none; }
.aside-card p { margin: 0; }
.form-card { position: relative; padding: clamp(24px, 4vw, 48px); background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-2); }
.form-card h2 { font-size: clamp(1.9rem, 3vw, 2.4rem); margin-bottom: 8px; }
.form-card > p { color: var(--ink-3); font-size: .95rem; margin-bottom: 30px; }
.fields { display: grid; grid-template-columns: 1fr 1fr; gap: 20px 18px; }
.field { display: grid; gap: 8px; }
.field--full { grid-column: 1 / -1; }
.field label, .field legend { font-size: .88rem; font-weight: 600; color: var(--ink); padding: 0; }
.field label .opt { font-weight: 400; color: var(--ink-3); }
.field input, .field select, .field textarea {
  width: 100%; padding: 13px 15px;
  border: 1.5px solid var(--line); border-radius: 12px;
  background: #fff; color: var(--ink);
  font: 400 1rem/1.4 var(--f-body);
  transition: border-color .2s, box-shadow .2s;
  appearance: none;
}
.field select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237a7366' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; background-size: 18px; padding-right: 40px; }
.field textarea { min-height: 130px; resize: vertical; }
.field input:hover, .field select:hover, .field textarea:hover { border-color: #c4b8a2; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.field[data-invalid] input, .field[data-invalid] select, .field[data-invalid] textarea { border-color: #c2361b; }
.field__error { display: none; font-size: .82rem; color: #b02e14; }
.field[data-invalid] .field__error { display: block; }
.field__hint { font-size: .82rem; color: var(--ink-3); }
fieldset.field { border: 0; margin: 0; padding: 0; min-width: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; inset: 0; cursor: pointer; margin: 0; }
.chip span { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px 8px 8px; border-radius: 999px; border: 1.5px solid var(--line); background: #fff; font-size: .9rem; transition: border-color .2s, background .2s; }
.chip span img { width: 26px; height: 26px; border-radius: 50%; }
.chip span.no-img { padding-left: 14px; }
.chip input:hover + span { border-color: #c4b8a2; }
.chip input:checked + span { border-color: var(--accent); background: var(--accent-soft); font-weight: 600; }
.chip input:focus-visible + span { outline: 3px solid var(--accent); outline-offset: 2px; }
.check { display: grid; grid-template-columns: 22px 1fr; gap: 12px; align-items: start; font-size: .9rem; color: var(--ink-2); cursor: pointer; }
.field label.check { font-weight: 400; color: var(--ink-2); }
.check input { appearance: none; width: 22px; height: 22px; margin: 1px 0 0; border: 1.5px solid #c4b8a2; border-radius: 6px; background: #fff; display: grid; place-items: center; cursor: pointer; }
.check input:checked { background: var(--accent); border-color: var(--accent); }
.check input:checked::after { content: ""; width: 6px; height: 11px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg) translate(-1px, -1px); }
.check input:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
.form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; margin-top: 30px; }
.form-actions small { color: var(--ink-3); font-size: .82rem; max-width: 26em; }
.btn[aria-busy="true"] { opacity: .7; pointer-events: none; }
.btn[aria-busy="true"] svg { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.form-status { margin-top: 18px; padding: 14px 16px; border-radius: 12px; font-size: .92rem; display: none; }
.form-status[data-kind="error"] { display: block; background: #fbe3dc; color: #8a2410; }
.form-success { display: none; text-align: center; padding: 30px 10px 10px; }
.form-card[data-sent] form { display: none; }
.form-card[data-sent] .form-success { display: block; animation: rise .6s var(--ease) both; }
.form-success img { width: 96px; height: 96px; border-radius: 50%; margin: 0 auto 22px; box-shadow: 0 0 0 6px var(--accent-soft); }
.form-success h2 { margin-bottom: 12px; }
.form-success p { color: var(--ink-2); max-width: 28em; margin: 0 auto 26px; }
@media (max-width: 960px) { .form-grid { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .fields { grid-template-columns: 1fr; } }

.contact-ways { display: grid; gap: 12px; margin-bottom: 36px; }
.contact-ways > a, .contact-ways > div { display: flex; gap: 14px; align-items: center; padding: 16px 18px; border-radius: var(--r-md); border: 1px solid var(--line); background: var(--card); text-decoration: none; font-size: .95rem; }
.contact-ways a > div { min-width: 0; }
.contact-ways b { overflow-wrap: anywhere; }
.contact-ways svg { width: 22px; height: 22px; color: var(--accent); flex: none; }
.contact-ways b { display: block; font-weight: 600; }
.contact-ways span { color: var(--ink-3); font-size: .88rem; }

/* ---------- Reveal on scroll ---------- */
.js [data-reveal] { opacity: 0; transform: translateY(26px); transition: opacity .9s var(--ease), transform .9s var(--ease); transition-delay: var(--d, 0s); }
.js [data-reveal].is-in { opacity: 1; transform: none; }
@keyframes rise { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }
.load-in > * { animation: rise .9s var(--ease) both; }
.load-in > :nth-child(2) { animation-delay: .08s; }
.load-in > :nth-child(3) { animation-delay: .16s; }
.load-in > :nth-child(4) { animation-delay: .24s; }
.load-in > :nth-child(5) { animation-delay: .32s; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .js [data-reveal] { opacity: 1; transform: none; }
}
