/* switch.findadvice.nz — shared styles for the hub + per-CRM spokes.
   Brand palette reused from proposals/crm-comparison.html so the switch site
   reads as one family with the comparison page it links to.
   Accessibility gate: WCAG 2.2 AA — verified contrast, 48px primary targets,
   visible :focus-visible, prefers-reduced-motion honoured. */

:root {
  --ink: #1a1f2c;
  --muted: #4f586b;          /* 6.3:1 on white — darker than the comparison's --muted for AA body text */
  --line: #e3e6ee;
  --bg: #ffffff;
  --soft: #f6f7fb;
  --soft-2: #eef1f8;
  --accent: #1f6feb;         /* white text on this = 4.63:1 — AA for the CTA */
  --accent-ink: #ffffff;
  --accent-dark: #1550b3;
  --good: #1f7a3c;
  --good-soft: rgba(31, 122, 60, .10);
  --shadow: 0 1px 2px rgba(26, 31, 44, .06), 0 8px 24px rgba(26, 31, 44, .06);
  --radius: 12px;
  --maxw: 1080px;
}

* { box-sizing: border-box; }

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

html, body {
  margin: 0; padding: 0;
  background: var(--bg); color: var(--ink);
  font: 16px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

/* ── Skip link ─────────────────────────────────────────────────── */
.skip {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 0 0 8px 0;
}
.skip:focus { left: 0; }

/* ── Layout primitives ─────────────────────────────────────────── */
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 760px; }
section { padding: 56px 0; }
section + section { border-top: 1px solid var(--line); }

a { color: var(--accent-dark); text-underline-offset: 2px; }
a:hover { color: var(--accent); }

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

/* ── Top bar ───────────────────────────────────────────────────── */
.topbar {
  position: sticky; top: 0; z-index: 20;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid var(--line);
}
.topbar .wrap { display: flex; align-items: center; justify-content: space-between; min-height: 64px; gap: 16px; }
.brand { font-weight: 700; font-size: 17px; letter-spacing: -0.01em; color: var(--ink); text-decoration: none; }
.brand span { color: var(--accent); }

/* ── Buttons ───────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-weight: 600; font-size: 16px; line-height: 1;
  padding: 15px 24px; min-height: 48px; border-radius: 10px;
  text-decoration: none; border: 1px solid transparent; cursor: pointer;
}
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: var(--accent-dark); color: #fff; }
.btn-primary:active { background: var(--accent-dark); }
.btn-ghost { background: transparent; color: var(--accent-dark); border-color: var(--line); }
.btn-ghost:hover { background: var(--soft); color: var(--accent-dark); }
.btn[aria-disabled="true"] { opacity: .6; }
@media (prefers-reduced-motion: no-preference) {
  .btn { transition: background-color .15s ease, border-color .15s ease; }
}

/* ── Hero ──────────────────────────────────────────────────────── */
.hero { padding: 64px 0 48px; }
.kicker {
  text-transform: uppercase; letter-spacing: .08em; font-size: 12px; font-weight: 700;
  color: var(--accent-dark); margin: 0 0 14px;
}
h1 { font-size: clamp(30px, 6vw, 48px); line-height: 1.12; letter-spacing: -0.02em; margin: 0 0 16px; max-width: 18ch; }
.lede { font-size: clamp(17px, 2.4vw, 20px); color: var(--muted); max-width: 60ch; margin: 0 0 28px; }
.hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 40px; align-items: start; }
@media (max-width: 880px) { .hero-grid { grid-template-columns: 1fr; gap: 28px; } }

.trust {
  display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 24px 0 0;
  font-size: 14.5px; color: var(--muted); list-style: none; padding: 0;
}
.trust li { display: flex; align-items: center; gap: 7px; }
.trust .tick { color: var(--good); font-weight: 700; flex: 0 0 auto; }

/* ── Lead form card ────────────────────────────────────────────── */
.lead-card {
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 24px;
}
.lead-card h2 { margin: 0 0 4px; font-size: 20px; letter-spacing: -0.01em; }
.lead-card .sub { margin: 0 0 18px; color: var(--muted); font-size: 14.5px; }

.field { margin: 0 0 16px; }
.field label { display: block; font-weight: 600; font-size: 14.5px; margin: 0 0 6px; }
.field .hint { font-weight: 400; color: var(--muted); }
.field input, .field select, .field textarea {
  width: 100%; font: inherit; color: var(--ink);
  padding: 12px 14px; min-height: 48px;
  border: 1px solid #c7cedd; border-radius: 9px; background: #fff;
}
.field textarea { min-height: 96px; resize: vertical; }
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible {
  outline: 3px solid var(--accent); outline-offset: 1px; border-color: var(--accent);
}
.field .err { display: none; color: #a12020; font-size: 13.5px; margin: 6px 0 0; }
.field.invalid .err { display: block; }
.field.invalid input, .field.invalid select { border-color: #a12020; }

.form-note { font-size: 13px; color: var(--muted); margin: 14px 0 0; }
.lead-card .btn-primary { width: 100%; margin-top: 4px; }

/* Error summary + success */
.summary {
  display: none; border: 1px solid #e6b3b3; background: #fdf3f3; color: #7d1a1a;
  border-radius: 9px; padding: 14px 16px; margin: 0 0 18px; font-size: 14.5px;
}
.summary.show { display: block; }
.summary ul { margin: 8px 0 0 18px; padding: 0; }
.success {
  display: none; border: 1px solid #bfe0c8; background: var(--good-soft);
  border-radius: var(--radius); padding: 22px; text-align: center;
}
.success.show { display: block; }
.success h2 { margin: 0 0 8px; color: var(--good); }
.success p { margin: 0; color: var(--ink); }

/* ── Steps (HowTo) ─────────────────────────────────────────────── */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin: 8px 0 0; padding: 0; list-style: none; }
@media (max-width: 760px) { .steps { grid-template-columns: 1fr; } }
.steps li { background: var(--soft); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.steps .n {
  width: 34px; height: 34px; border-radius: 999px; background: #fff; border: 1px solid var(--line);
  color: var(--accent-dark); font-weight: 700; display: grid; place-items: center; margin: 0 0 12px;
}
.steps h3 { margin: 0 0 6px; font-size: 17px; }
.steps p { margin: 0; color: var(--muted); font-size: 14.5px; }
.you-do { margin: 18px 0 0; font-weight: 600; color: var(--ink); }

/* ── "What comes across" list ──────────────────────────────────── */
.carry { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 8px 0 0; padding: 0; list-style: none; }
@media (max-width: 760px) { .carry { grid-template-columns: 1fr 1fr; } }
.carry li {
  display: flex; align-items: center; gap: 10px; padding: 14px 16px;
  border: 1px solid var(--line); border-radius: 10px; background: #fff; font-weight: 600; font-size: 15px;
}
.carry .tick { color: var(--good); font-weight: 800; }
.carry li.star { border-color: rgba(31,122,60,.5); background: var(--good-soft); }

/* ── Section headings ──────────────────────────────────────────── */
.eyebrow { text-transform: uppercase; letter-spacing: .07em; font-size: 12px; font-weight: 700; color: var(--accent-dark); margin: 0 0 8px; }
h2.head { font-size: clamp(24px, 4vw, 30px); letter-spacing: -0.01em; margin: 0 0 8px; }
.section-lede { color: var(--muted); max-width: 65ch; margin: 0 0 24px; font-size: 16.5px; }

/* ── Access guide ──────────────────────────────────────────────── */
.guide { background: var(--soft); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; }
.guide ol { margin: 0; padding-left: 22px; }
.guide li { margin: 0 0 12px; }
.guide code { background: #fff; border: 1px solid var(--line); border-radius: 6px; padding: 2px 7px; font-size: 14px; }
.callout { background: #fff; border-left: 3px solid var(--accent); border-radius: 6px; padding: 12px 16px; margin: 18px 0 0; font-size: 14.5px; color: var(--ink); }

/* ── FAQ ───────────────────────────────────────────────────────── */
.faq { max-width: 820px; }
.faq details { border: 1px solid var(--line); border-radius: 10px; padding: 0; margin: 0 0 12px; background: #fff; overflow: hidden; }
.faq summary {
  cursor: pointer; list-style: none; padding: 18px 20px; font-weight: 600; font-size: 16.5px;
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--accent-dark); font-size: 22px; font-weight: 400; flex: 0 0 auto; }
.faq details[open] summary::after { content: "\2212"; }
.faq summary:focus-visible { outline: 3px solid var(--accent); outline-offset: -3px; }
.faq .answer { padding: 0 20px 18px; color: var(--muted); }
.faq .answer p { margin: 0 0 10px; }
.faq .answer p:last-child { margin: 0; }

/* ── Compare strip ─────────────────────────────────────────────── */
.compare-strip {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px;
  background: var(--soft); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px 26px;
}
.compare-strip p { margin: 0; max-width: 60ch; color: var(--muted); }
.compare-strip strong { color: var(--ink); }

/* ── CTA band ──────────────────────────────────────────────────── */
.cta-band { background: var(--ink); color: #fff; text-align: center; border-radius: var(--radius); padding: 44px 26px; }
.cta-band h2 { margin: 0 0 10px; font-size: clamp(22px, 4vw, 28px); color: #fff; }
.cta-band p { margin: 0 0 22px; color: #c7cedd; }
.cta-band .btn-primary { background: var(--accent); }
.cta-band .btn-primary:hover { background: #fff; color: var(--accent-dark); }

/* ── Footer ────────────────────────────────────────────────────── */
footer.site { border-top: 1px solid var(--line); padding: 36px 0; color: var(--muted); font-size: 14px; }
footer.site .wrap { display: flex; flex-wrap: wrap; gap: 10px 24px; justify-content: space-between; }
footer.site nav { display: flex; flex-wrap: wrap; gap: 8px 18px; }

/* ── Breadcrumb ────────────────────────────────────────────────── */
.crumb { font-size: 13.5px; color: var(--muted); padding: 18px 0 0; }
.crumb a { color: var(--muted); }
.crumb a:hover { color: var(--accent-dark); }

/* visually-hidden but available to AT */
.vh { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
