/* Keystead: design tokens follow the Juno theme (warm neutrals, one deep teal accent). */
:root {
  --accent: #0f766e;
  --on-accent: #ffffff;
  --accent-soft: color-mix(in srgb, var(--accent) 14%, transparent);
  --accent-text: var(--accent);
  --bg: #f7f6f3; --surface: #ffffff; --surface-2: #faf9f7;
  --text: #1c1b19; --text-2: #5f5c56; --line: rgba(28, 27, 25, .1);
  --glass: rgba(247, 246, 243, .82);
  --shadow: 0 1px 2px rgba(28, 27, 25, .05), 0 6px 22px rgba(28, 27, 25, .06);
  --radius: 14px; --radius-control: 10px;
  --ease: cubic-bezier(.32, .72, 0, 1);
  --fast: 160ms; --med: 280ms;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #121110; --surface: #1c1b19; --surface-2: #262522;
  --text: #f2f0eb; --text-2: #a9a59e; --line: rgba(242, 240, 235, .12);
  --glass: rgba(18, 17, 16, .82);
  --accent-text: color-mix(in srgb, var(--accent) 55%, #ffffff);
  --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 8px 28px rgba(0, 0, 0, .35);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 17px/1.55 var(--font); letter-spacing: -.01em;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  overflow-wrap: break-word;
}
a { color: var(--accent-text); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--accent-text); outline-offset: 2px; border-radius: 6px; }
img { max-width: 100%; height: auto; }
.wrap { max-width: 1040px; margin: 0 auto; padding: 0 max(20px, env(safe-area-inset-right)) 0 max(20px, env(safe-area-inset-left)); }
.narrow { max-width: 720px; }

.skip { position: absolute; left: 16px; top: -100px; z-index: 20; background: var(--accent); color: var(--on-accent);
  padding: 12px 18px; border-radius: var(--radius-control); text-decoration: none; }
.skip:focus { top: 12px; }

.bar { position: sticky; top: 0; z-index: 10; background: var(--glass);
  -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--line); }
.bar .wrap { display: flex; align-items: center; flex-wrap: wrap; gap: 0 6px; min-height: 56px; }
.brand { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; margin-right: auto;
  font-weight: 650; font-size: 19px; letter-spacing: -.02em; color: var(--text); text-decoration: none; }
.brand img { width: 28px; height: 28px; }
.nav { display: flex; flex-wrap: wrap; }
.nav a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 10px; color: var(--text-2);
  font-size: 15px; text-decoration: none; border-radius: 8px; }
.nav a:hover { color: var(--text); }

h1, h2, h3 { margin: 0; line-height: 1.15; }
h1 { font-size: clamp(36px, 8vw, 72px); line-height: 1.05; letter-spacing: -.035em; font-weight: 700; }
h2 { font-size: clamp(26px, 4vw, 34px); letter-spacing: -.025em; font-weight: 650; margin-bottom: 10px; }
h3 { font-size: 19px; letter-spacing: -.015em; font-weight: 620; margin-bottom: 6px; }
p { margin: 0 0 14px; }
.muted { color: var(--text-2); }
.eyebrow { color: var(--accent-text); font-weight: 600; font-size: 15px; letter-spacing: 0; margin: 0 0 12px; }

.hero { padding: clamp(48px, 11vw, 120px) 0 clamp(36px, 7vw, 80px); text-align: center; }
.hero .lede { font-size: clamp(18px, 2.4vw, 24px); line-height: 1.4; color: var(--text-2);
  max-width: 640px; margin: 20px auto 30px; letter-spacing: -.015em; }
.hero .small { margin: 14px 0 0; font-size: 15px; }

section { padding: clamp(36px, 6vw, 64px) 0; }
.lead { color: var(--text-2); max-width: 620px; margin-bottom: 26px; }

.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 22px;
  border-radius: var(--radius-control); font: 600 16px/1 var(--font); text-decoration: none;
  background: var(--surface-2); color: var(--text); box-shadow: inset 0 0 0 1px var(--line);
  transition: transform var(--fast) var(--ease), opacity var(--fast) var(--ease); }
.btn:hover { opacity: .9; }
.btn:active { transform: scale(.97); }
.btn-primary { background: var(--accent); color: var(--on-accent); box-shadow: none; font-size: 18px; min-height: 52px; padding: 0 28px; }

.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }
.card { background: var(--surface); border-radius: 18px; box-shadow: var(--shadow); padding: 26px 24px; }
.card p { color: var(--text-2); margin: 0; }

.steps { list-style: none; counter-reset: step; margin: 0; padding: 0; display: grid; gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }
.steps li { counter-increment: step; background: var(--surface); border-radius: 18px; box-shadow: var(--shadow); padding: 24px; }
.steps li::before { content: counter(step); display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border-radius: 50%; background: var(--accent); color: var(--on-accent);
  font-weight: 650; margin-bottom: 12px; }
.steps p { color: var(--text-2); margin: 0; }

.note { background: var(--accent-soft); border-radius: var(--radius-control); padding: 14px 18px; margin: 22px 0 0; }
.emergency { font-weight: 650; }
.ticks { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.ticks li { padding-left: 30px; position: relative; }
.ticks li::before { content: ""; position: absolute; left: 4px; top: .5em; width: 12px; height: 7px;
  border-left: 2.5px solid var(--accent-text); border-bottom: 2.5px solid var(--accent-text); transform: rotate(-45deg); }

.contact-list { list-style: none; margin: 0 0 20px; padding: 0; display: grid; gap: 4px; }
.contact-list a { display: inline-flex; align-items: center; min-height: 44px; font-size: 19px; }

.doc { padding: 36px 0 64px; }
.doc h1 { font-size: clamp(32px, 6vw, 48px); margin-bottom: 8px; }
.doc h2 { font-size: 22px; margin: 34px 0 10px; }
.doc ul { padding-left: 22px; margin: 0 0 14px; }
.doc li { margin-bottom: 6px; }
.doc .callout { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px 22px; margin: 18px 0; }

.foot { border-top: 1px solid var(--line); padding: 28px 0 48px; color: var(--text-2); font-size: 14px; }
.foot .wrap { display: flex; flex-wrap: wrap; gap: 4px 20px; align-items: center; }
.foot a { display: inline-flex; align-items: center; min-height: 44px; color: var(--text-2); }
.foot p { margin: 0 auto 0 0; }

.center { text-align: center; padding: 96px 0; }
.center p { color: var(--text-2); margin: 16px 0 26px; }

@media (prefers-reduced-motion: no-preference) {
  .hero, .doc { animation: rise var(--med) var(--ease) both; }
  @keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
@media (prefers-reduced-transparency: reduce) {
  .bar { background: var(--surface); -webkit-backdrop-filter: none; backdrop-filter: none; }
}
@media (max-width: 480px) {
  body { font-size: 16px; }
  .nav a { padding: 0 8px; }
  .card, .steps li { padding: 20px; }
}
.disclaimer { margin-top: 26px; font-size: 15px; max-width: 620px; }

/* Theme toggle */
.theme-toggle { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; padding: 0;
  margin-left: 4px; border: 0; border-radius: var(--radius-control); background: transparent; color: var(--text-2);
  cursor: pointer; transition: background var(--fast) var(--ease), color var(--fast) var(--ease); }
.theme-toggle[hidden] { display: none; }
.theme-toggle:hover { color: var(--text); background: var(--surface-2); }
.theme-toggle svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.theme-toggle .i-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .i-sun { display: block; }
:root[data-theme="dark"] .theme-toggle .i-moon { display: none; }
.nav a[aria-current="page"] { color: var(--text); font-weight: 600; }

/* Audience paths */
.paths { padding-top: 0; }
.path-card p { margin: 0 0 12px; }
.path-card ul { margin: 0 0 16px; padding-left: 20px; color: var(--text-2); }
.path-card li { margin-bottom: 4px; }
.soon { margin: 12px 0 0 !important; font-size: 14px; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* Header: desktop nav, mobile no-JS Menu disclosure, Get started always visible */
.bar .wrap { position: relative; flex-wrap: nowrap; gap: 0 4px; }
.brand { flex-shrink: 0; }
.nav.desk { display: flex; flex-wrap: nowrap; }
.nav a { white-space: nowrap; }
.signin { display: inline-flex; align-items: center; min-height: 44px; padding: 0 10px; color: var(--text-2);
  font-size: 15px; text-decoration: none; border-radius: 8px; white-space: nowrap; }
.signin:hover { color: var(--text); }
.signin[aria-current="page"], .menu-panel a[aria-current="page"] { color: var(--text); font-weight: 600; }
.btn-sm { font-size: 15px; min-height: 44px; padding: 0 16px; white-space: nowrap; }
.menu { display: none; }
.menu summary { list-style: none; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 12px;
  border-radius: var(--radius-control); color: var(--text); font-size: 15px; font-weight: 600; cursor: pointer; user-select: none; }
.menu summary::-webkit-details-marker { display: none; }
.menu summary::after { content: ""; width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
  transform: translateY(-2px) rotate(45deg); transition: transform var(--fast) var(--ease); }
.menu[open] summary::after { transform: translateY(1px) rotate(-135deg); }
.menu summary:hover { background: var(--surface-2); }
.menu-panel { position: absolute; left: 12px; right: 12px; top: calc(100% + 6px); display: grid; padding: 8px;
  background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); border: 1px solid var(--line); }
.menu-panel a { display: flex; align-items: center; min-height: 44px; padding: 0 14px; color: var(--text); font-size: 17px;
  text-decoration: none; border-radius: 8px; }
.menu-panel a:hover { background: var(--surface-2); }
@media (max-width: 839px) {
  .desk { display: none !important; }
  .menu { display: block; }
  .bar .wrap { gap: 0 2px; }
  .bar .brand { margin-right: auto; }
}
@media (max-width: 400px) {
  .brand-name { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .brand { margin-right: auto; }
  .btn-sm { padding: 0 12px; }
  .menu summary { padding: 0 8px; }
}
.brand { margin-right: auto; }

/* Content pages */
.doc.page h1 { font-size: clamp(32px, 6vw, 48px); line-height: 1.1; }
.doc.page h2 { font-size: clamp(22px, 3.4vw, 28px); margin: 38px 0 10px; }
.doc.page h3 { margin: 18px 0 4px; }
.doc.page .lead { font-size: 19px; margin: 14px 0 20px; max-width: none; }
.doc ol { padding-left: 22px; margin: 0 0 14px; }
.doc ol li { margin-bottom: 10px; }
.doc .small { font-size: 15px; margin: 0 0 8px; }
.related { list-style: none; padding: 0 !important; display: grid; gap: 6px; }
.related a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; }
.cta { margin-top: 36px; }
.cta h2 { margin-top: 0 !important; }
.doc .btn { margin: 4px 8px 4px 0; }
.doc .callout .btn { text-decoration: none; }

/* FAQ disclosure */
.faq { display: grid; gap: 10px; margin-top: 16px; }
.faq details { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); }
.faq summary { list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px;
  padding: 12px 18px; font-weight: 620; cursor: pointer; border-radius: var(--radius); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; flex: none; width: 8px; height: 8px; border-right: 2px solid var(--accent-text); border-bottom: 2px solid var(--accent-text);
  transform: rotate(45deg); transition: transform var(--fast) var(--ease); }
.faq details[open] summary::after { transform: rotate(-135deg); }
.faq-a { padding: 0 18px 6px; color: var(--text-2); }

/* Lead form */
:root { --danger: #b42318; --danger-soft: rgba(180, 35, 24, .08); }
:root[data-theme="dark"] { --danger: #ff9b8f; --danger-soft: rgba(255, 155, 143, .12); }
.offer { background: var(--accent-soft); border-radius: var(--radius); padding: 14px 18px; margin: 0 0 18px; font-weight: 620; }
.lead-form { display: grid; gap: 18px; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: clamp(18px, 4vw, 28px); margin: 0 0 18px; }
.field { display: grid; gap: 6px; }
.field label { font-weight: 620; }
.field .hint { color: var(--text-2); font-size: 15px; font-weight: 400; }
.field input, .field textarea { font: 400 16px/1.3 var(--font); color: var(--text); background: var(--surface-2); min-height: 44px; width: 100%;
  padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius-control); }
.field textarea { min-height: 96px; resize: vertical; }
.field input:focus-visible, .field textarea:focus-visible, .check input:focus-visible { outline: 2px solid var(--accent-text); outline-offset: 2px; }
.check { display: grid; grid-template-columns: 24px 1fr; gap: 12px; align-items: start; }
.check input { width: 24px; height: 24px; margin: 10px 0 0; accent-color: var(--accent); }
.check label { display: block; min-height: 44px; padding: 10px 0; font-weight: 400; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.notice { border-radius: var(--radius-control); padding: 14px 18px; margin: 0 0 18px; font-weight: 620; }
.notice-ok { background: var(--accent-soft); }
.notice-err { background: var(--danger-soft); color: var(--danger); box-shadow: inset 0 0 0 1px var(--danger); }
.lead-form .btn-primary { cursor: pointer; border: 0; justify-self: start; }
