/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 88px; }
body {
  font-family: var(--font);
  font-size: var(--fs-body);
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
  caret-color: var(--brand);
  accent-color: var(--brand);
}
img, svg, video { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--brand); text-underline-offset: 0.22em; text-decoration-thickness: 1px; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; border-radius: 6px; }
::selection { background: var(--brand-soft); color: var(--brand-ink); }
html { scrollbar-color: var(--line-strong) transparent; }
.num { font-variant-numeric: tabular-nums; }

/* ---------- Layout ---------- */
.container { width: min(100% - 2 * var(--gutter), var(--container)); margin-inline: auto; }
.section { padding-block: var(--section-pad); position: relative; }
.section.soft { background: var(--bg-soft); }
.section + .section:not(.soft):not(.close) { border-block-start: 1px solid var(--line); }

/* ---------- Type ---------- */
h1, h2, h3 { font-weight: 700; color: var(--text); text-wrap: balance; letter-spacing: -0.01em; }
h1 { font-size: var(--fs-hero); line-height: 1.12; }
h2 { font-size: var(--fs-h2); line-height: 1.18; }
h3 { font-size: var(--fs-h3); line-height: 1.35; letter-spacing: 0; }
p { text-wrap: pretty; }
.lead { font-size: var(--fs-lead); line-height: 1.65; color: var(--muted); max-width: 60ch; }
.brand { color: var(--brand); }
.muted { color: var(--muted); }
.section-head { max-width: 720px; }
.section-head > * + * { margin-block-start: 0.9rem; }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head.center .lead { margin-inline: auto; }
.ti { line-height: 1; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.55em;
  min-block-size: 50px; padding: 0.8rem 1.5rem;
  border-radius: var(--radius-pill); border: 1px solid transparent;
  font-weight: 600; font-size: 1.02rem; text-decoration: none; white-space: nowrap;
  transition: transform var(--dur-press) var(--ease-out), background-color var(--dur-ui) ease, box-shadow var(--dur-ui) ease, border-color var(--dur-ui) ease;
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--brand); color: var(--on-brand); box-shadow: 0 1px 2px rgba(20, 33, 61, 0.18), 0 6px 14px -8px rgba(20, 33, 61, 0.35); }
.btn-primary[disabled], .btn-primary[aria-busy="true"] { opacity: 0.7; cursor: progress; }
.btn .ti { font-size: 1.15em; transition: transform var(--dur-ui) var(--ease-out); }
.link-quiet { color: var(--text); font-weight: 600; text-decoration: underline; text-decoration-color: var(--line-strong); }
@media (hover: hover) and (pointer: fine) {
  .btn-primary:hover { background: var(--brand-hover); }
  .btn:hover .ti-arrow-left { transform: translateX(-3px); }
  .link-quiet:hover { text-decoration-color: currentColor; }
}

/* ---------- Reveal (one entrance, used sparingly) ---------- */
.js .reveal { opacity: 0; transform: translateY(12px); transition: opacity var(--dur-reveal) var(--ease-out), transform var(--dur-reveal) var(--ease-out); transition-delay: var(--delay, 0ms); }
.js .reveal.is-in { opacity: 1; transform: none; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; inset-block-start: env(safe-area-inset-top, 0px); z-index: 20;
  background: rgba(255, 255, 255, 0.94); border-block-end: 1px solid transparent;
  transition: border-color var(--dur-ui) ease;
}
.site-header.is-scrolled { border-block-end-color: var(--line); }
.site-header .container { display: flex; align-items: center; gap: 1.5rem; min-block-size: 68px; }
.wordmark { display: inline-flex; align-items: baseline; gap: 0.5rem; text-decoration: none; color: var(--text); direction: ltr; }
.wordmark b { font-weight: 700; font-size: 1.6rem; letter-spacing: 0.04em; }
.wordmark b i { font-style: normal; color: var(--brand); }
.wordmark small { font-size: 0.75rem; font-weight: 500; color: var(--muted); }
.site-nav { display: flex; gap: 1.5rem; margin-inline-start: auto; }
.site-nav a { color: var(--muted); text-decoration: none; font-weight: 500; font-size: var(--fs-small); }
.site-nav a:hover { color: var(--text); }
.site-header .btn { min-block-size: 42px; padding: 0.5rem 1.1rem; font-size: 0.95rem; }
@media (max-width: 860px) { .site-nav { display: none; } .site-header .btn { margin-inline-start: auto; } }
@media (max-width: 767px) { .site-header .btn { display: none; } }

/* ---------- Sticky CTA (mobile thumb zone only) ---------- */
.sticky-cta { display: none; }
@media (max-width: 767px) {
  .sticky-cta {
    display: flex; justify-content: center; pointer-events: none;
    position: fixed; inset-block-end: max(14px, env(safe-area-inset-bottom)); inset-inline: 0; z-index: 30;
    transform: translateY(150%); transition: transform 360ms var(--ease-out);
  }
  .sticky-cta.is-visible { transform: none; }
  .sticky-cta .btn { pointer-events: auto; box-shadow: var(--shadow-2); }
}

/* ---------- Forms ---------- */
.lead-form { display: grid; gap: 1rem; }
.field { display: grid; gap: 0.4rem; }
.field label { font-size: var(--fs-small); font-weight: 600; }
.field label .opt { font-weight: 400; color: var(--muted); }
.field input, .field select {
  inline-size: 100%; min-block-size: 50px; padding: 0.7rem 0.95rem;
  border-radius: var(--radius-input); border: 1px solid var(--field-border);
  background: var(--bg); color: var(--text); font-size: 1rem;
  transition: border-color var(--dur-ui) ease, box-shadow var(--dur-ui) ease;
}
.field input::placeholder { color: var(--subtle); }
.field input:focus, .field select:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand), 0 0 0 4px var(--brand-soft); }
.field input[type="tel"]:placeholder-shown { text-align: right; }
.field[data-invalid] input, .field[data-invalid] select { border-color: var(--danger-text); }
.field-error { font-size: 0.875rem; color: var(--danger-text); min-block-size: 0; }
.field-error:empty { display: none; }
.field-row { display: grid; gap: 1rem; }
@media (min-width: 560px) { .field-row { grid-template-columns: 1fr 1fr; } }
.consent { display: flex; align-items: flex-start; gap: 0.6rem; font-size: var(--fs-small); color: var(--muted); cursor: pointer; padding-block: 0.25rem; }
.consent input { inline-size: 22px; block-size: 22px; margin-block-start: 0.15rem; flex: none; }
.form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 1.25rem; }
.form-note { font-size: var(--fs-small); color: var(--muted); display: inline-flex; align-items: center; gap: 0.4rem; }
.form-success { text-align: center; padding: 2rem 1rem; }
.form-success .check {
  inline-size: 56px; block-size: 56px; margin: 0 auto 1rem; border-radius: 50%;
  display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); font-size: 1.6rem;
}
.form-success h3 { margin-block-end: 0.35rem; }

/* ---------- Footer ---------- */
.site-footer { background: var(--bg-soft); border-block-start: 1px solid var(--line); padding-block: 3.5rem 1.5rem; font-size: var(--fs-small); }
.footer-grid { display: grid; gap: 2rem 1.5rem; grid-template-columns: 1fr 1fr; }
.footer-brand { grid-column: 1 / -1; }
.footer-brand p { color: var(--muted); margin-block: 0.75rem 1.25rem; line-height: 1.6; }
.footer-cta { min-block-size: 44px; padding: 0.55rem 1.2rem; font-size: 0.95rem; }
.footer-title { font-size: var(--fs-xs); font-weight: 600; letter-spacing: 0.02em; color: var(--text); margin-block-end: 0.5rem; }
.footer-list { list-style: none; padding: 0; display: grid; gap: 0.1rem; }
.footer-list a { display: inline-flex; align-items: center; gap: 0.5rem; min-block-size: 44px; color: var(--muted); text-decoration: none; }
.footer-list a .ti { font-size: 1.15em; color: var(--brand); }
.footer-list a[aria-current="page"] { color: var(--text); font-weight: 600; }
@media (hover: hover) and (pointer: fine) { .footer-list a:hover { color: var(--text); text-decoration: underline; text-decoration-color: var(--line-strong); } }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.5rem 1.5rem; margin-block-start: 2.5rem; padding-block-start: 1.25rem; border-block-start: 1px solid var(--line); color: var(--muted); font-size: var(--fs-xs); }
@media (min-width: 768px) {
  .footer-grid { grid-template-columns: 1.6fr 1fr 1fr; gap: 3rem; }
  .footer-brand { grid-column: auto; }
}
/* room for the sticky "talk to us" button on phones */
@media (max-width: 767px) { body:has(.sticky-cta) .site-footer { padding-block-end: 6.5rem; } }

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

/* ---------- Skip link ---------- */
.skip-link {
  position: absolute; inset-block-start: 0.5rem; inset-inline-start: 0.5rem; z-index: 100;
  padding: 0.7rem 1.1rem; border-radius: var(--radius-input);
  background: var(--brand); color: var(--on-brand); font-weight: 600; text-decoration: none;
  transform: translateY(-160%); transition: transform var(--dur-ui) var(--ease-out);
}
.skip-link:focus, .skip-link:focus-visible { transform: none; outline-color: var(--text); }

/* ---------- Legal pages ---------- */
.legal { max-width: 760px; }
.legal h1 { margin-block: 1rem 0.5rem; }
.legal .updated { color: var(--muted); font-size: var(--fs-small); margin-block-end: 2rem; }
.legal h2 { font-size: var(--fs-h3); margin-block: 2.25rem 0.6rem; }
.legal p, .legal li { color: var(--text); }
.legal p + p { margin-block-start: 0.75rem; }
.legal ul { padding-inline-start: 1.25rem; display: grid; gap: 0.4rem; margin-block: 0.6rem; }
.legal .callout { background: var(--bg-soft); border-radius: var(--radius-card); padding: 1.1rem 1.25rem; margin-block: 1rem; }
.legal dl { display: grid; grid-template-columns: max-content 1fr; gap: 0.35rem 1rem; margin-block: 0.75rem; }
.legal dt { font-weight: 600; }
.legal table { inline-size: 100%; border-collapse: collapse; margin-block: 0.75rem; font-size: var(--fs-small); }
.legal th, .legal td { text-align: start; padding: 0.6rem 0.5rem; border-block-end: 1px solid var(--line); vertical-align: top; }
.legal th { font-weight: 600; background: var(--bg-soft); }
.legal-back { display: inline-flex; align-items: center; gap: 0.35rem; }
@media (max-width: 560px) { .legal dl { grid-template-columns: 1fr; } .legal dd { margin-block-end: 0.5rem; } .legal table { display: block; overflow-x: auto; } }

/* ---------- Form notice (privacy notice at point of collection) ---------- */
.form-privacy { font-size: var(--fs-xs); color: var(--muted); line-height: 1.6; }
.form-error-banner { font-size: var(--fs-small); color: var(--danger-text); background: #FEF3F2; border-radius: var(--radius-input); padding: 0.75rem 1rem; }
.hp-field { position: absolute !important; inline-size: 1px; block-size: 1px; overflow: hidden; clip-path: inset(50%); }
