/* ==========================================================================
   Colour Funds Insurance Broking — stylesheet
   Mobile-first. Single theme. No build step.
   Order: tokens > reset > primitives > layout > components > sections > utils
   ========================================================================== */

/* ---------- 1. Tokens ---------------------------------------------------- */
:root {
  /* Brand */
  --navy:        #004880;
  --navy-700:    #003862;
  --navy-900:    #20395c;
  --orange:      #cc6036;
  --orange-700:  #b0501f;
  --rust:        #b8562c;

  /* Text */
  --ink:         #23324a;
  --body:        #4a5c76;
  --muted:       #586a83;
  --slate:       #33425c;

  /* Lines & surfaces */
  --line:        #e3ebf4;
  --line-soft:   #eef3f8;
  --line-input:  #d8e3f0;
  --line-btn:    #d2dfec;
  --tint:        #eff4fa;
  --warm:        #fdf2ea;
  --warm-line:   #f2ddcc;
  --surface:     #f8fbfe;
  --white:       #ffffff;

  /* On dark */
  --on-navy:     #c2d5ea;
  --on-navy-dim: #a8c3e0;
  --peach:       #f0b48c;

  /* Type */
  --ff-head: 'Plus Jakarta Sans', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --ff-body: 'Manrope', 'Segoe UI', system-ui, -apple-system, sans-serif;

  --fs-h1:    clamp(31px, 6.6vw, 50px);
  --fs-h2:    clamp(26px, 5.4vw, 44px);
  --fs-h2-sm: clamp(24px, 4.8vw, 38px);
  --fs-h3:    clamp(17px, 2.1vw, 18px);
  --fs-lede:  clamp(16px, 1.7vw, 16.5px);
  --fs-body:  16px;
  --fs-sm:    14.5px;   /* design used 13.5px — raised for mobile legibility */
  --fs-xs:    13px;
  --fs-eyebrow: 12px;

  /* Space */
  --container: 1240px;
  --gutter:    clamp(16px, 4.6vw, 24px);
  --section-y: clamp(48px, 9vw, 76px);
  --section-y-sm: clamp(40px, 7vw, 60px);

  /* Shape */
  --r-sm: 9px;
  --r:    14px;
  --r-lg: 18px;
  --r-pill: 999px;

  /* Elevation */
  --sh-card:  0 14px 32px rgba(0, 72, 128, .11);
  --sh-media: 0 18px 44px rgba(0, 72, 128, .14);
  --sh-cta:   0 8px 20px rgba(204, 96, 54, .26);
  --sh-panel: 0 14px 40px rgba(0, 72, 128, .07);

  /* Chrome */
  --header-h: 62px;
  --tap: 44px;
  --actionbar-h: 0px;
}
@media (min-width: 900px) { :root { --header-h: 78px; } }

/* ---------- 2. Reset ----------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

body {
  margin: 0;
  font-family: var(--ff-body);
  font-size: var(--fs-body);
  line-height: 1.6;
  color: var(--ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  /* room for the mobile action bar */
  padding-bottom: var(--actionbar-h);
}

h1, h2, h3, h4 {
  font-family: var(--ff-head);
  margin: 0;
  letter-spacing: -.02em;
  text-wrap: balance;
  color: var(--navy);
}
p { margin: 0; text-wrap: pretty; }
ul { margin: 0; padding: 0; list-style: none; }

img, svg { display: block; max-width: 100%; }
img { height: auto; }

a { color: var(--rust); text-decoration: none; }
a:hover { color: var(--navy); }

button, input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; }
button { -webkit-tap-highlight-color: transparent; }

::selection { background: var(--orange); color: #fff; }

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

.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 8px; top: -60px; z-index: 200;
  background: var(--navy); color: #fff; padding: 12px 18px;
  border-radius: var(--r-sm); font-weight: 700; transition: top .16s;
}
.skip-link:focus { top: 8px; color: #fff; }

/* ---------- 3. Layout primitives ---------------------------------------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.container--narrow { max-width: 900px; }
.container--prose  { max-width: 860px; }
.container--mid    { max-width: 1000px; }

.section { padding-block: var(--section-y); }
.section--sm { padding-block: var(--section-y-sm); }
.section--tint {
  background: var(--surface);
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
}
.section--navy { background: var(--navy); }
.section--warm { background: var(--warm); border-top: 1px solid var(--warm-line); }
.section--ruled { border-top: 1px solid #e6eef7; border-bottom: 1px solid #e6eef7; }

/* anchor targets clear the sticky header */
[id] { scroll-margin-top: calc(var(--header-h) + 16px); }

/* Auto-fit grids. `--min` is the per-card floor; it never exceeds 100%
   so a 320px phone can never produce a horizontal scrollbar. */
.grid {
  display: grid;
  gap: var(--grid-gap, 18px);
  grid-template-columns: repeat(auto-fit, minmax(min(var(--min, 260px), 100%), 1fr));
}
.split {
  display: grid;
  gap: clamp(32px, 6vw, 56px);
  grid-template-columns: 1fr;
  align-items: center;
}
.split--top { align-items: start; }
@media (min-width: 860px) {
  .split { grid-template-columns: 1fr 1fr; }
  /* image first in source, text second — flip on desktop where the design wants it */
  .split--flip > :first-child { order: 2; }
}

.stack { display: flex; flex-direction: column; gap: var(--stack-gap, 16px); }
.cluster { display: flex; flex-wrap: wrap; gap: var(--cluster-gap, 12px); align-items: center; }

/* ---------- 4. Type primitives ------------------------------------------ */
.eyebrow {
  font-size: var(--fs-eyebrow);
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--rust);
}
.eyebrow--light { color: var(--peach); }
.eyebrow--navy { color: var(--navy); }

.h1 { font-size: var(--fs-h1); line-height: 1.08; font-weight: 800; }
.h2 { font-size: var(--fs-h2); line-height: 1.12; font-weight: 800; }
.h2--sm { font-size: var(--fs-h2-sm); line-height: 1.16; }
.h3 { font-size: var(--fs-h3); font-weight: 700; line-height: 1.35; }

.rule {
  width: 56px; height: 3px; border-radius: 2px;
  background: var(--orange);
  margin-top: 18px;
}
.rule--center { margin-inline: auto; }

.lede { font-size: var(--fs-lede); line-height: 1.7; color: var(--body); }
.small { font-size: var(--fs-sm); line-height: 1.65; color: var(--muted); }
.on-dark { color: var(--on-navy); }
.on-dark .h1, .on-dark .h2, .on-dark h1, .on-dark h2, .on-dark h3 { color: #fff; }

/* Centered section intro */
.section-head { text-align: center; max-width: 660px; margin-inline: auto; }
.section-head .rule { margin-inline: auto; }
.section-head .lede { margin-top: 18px; }
.section-head .h2, .section-head .h2--sm { margin-top: 12px; }

/* ---------- 5. Buttons --------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: var(--tap);
  padding: 14px 24px;
  border: 0;
  border-radius: 10px;
  font-family: var(--ff-body);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  cursor: pointer;
  transition: background-color .16s, border-color .16s, color .16s, transform .16s;
}
.btn:active { transform: translateY(1px); }
.btn svg { flex: 0 0 auto; }

.btn--primary { background: var(--orange); color: #fff; box-shadow: var(--sh-cta); }
.btn--primary:hover { background: var(--orange-700); color: #fff; }

.btn--navy { background: var(--navy); color: #fff; }
.btn--navy:hover { background: var(--navy-700); color: #fff; }

.btn--outline {
  background: var(--white);
  color: var(--navy);
  border: 1.5px solid var(--navy);
}
.btn--outline:hover { background: var(--navy); color: #fff; }

.btn--soft {
  background: var(--white);
  color: var(--navy);
  border: 1.5px solid var(--line-btn);
}
.btn--soft:hover { border-color: var(--navy); color: var(--navy); }

.btn--on-navy {
  background: transparent;
  color: #fff;
  border: 1.5px solid rgba(255, 255, 255, .42);
}
.btn--on-navy:hover { background: #fff; color: var(--navy); }

/* Full-width buttons on small phones — thumb-friendly */
@media (max-width: 420px) {
  .btn--stack { width: 100%; }
}

.link-arrow {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: var(--fs-sm); font-weight: 700; color: var(--rust);
}

/* ---------- 6. Icon medallions ------------------------------------------ */
.ic {
  display: flex; align-items: center; justify-content: center;
  flex: 0 0 auto;
  border-radius: 50%;
  width: var(--ic-size, 54px);
  height: var(--ic-size, 54px);
}
.ic--warm { background: var(--warm); border: 1px solid var(--warm-line); color: var(--orange); }
.ic--cool { background: var(--tint); border: 1px solid #dbe6f2; color: var(--navy); }
.ic--white { background: #fff; border: 1px solid var(--warm-line); color: var(--orange); }
.ic--white-cool { background: #fff; border: 1px solid #dbe6f2; color: var(--orange); }
.ic--glass { background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.24); color: var(--peach); }
.ic--sm { --ic-size: 38px; }
.ic--md { --ic-size: 52px; }
.ic--lg { --ic-size: 64px; }
.ic svg { width: 50%; height: 50%; }

/* ---------- 7. Cards ----------------------------------------------------- */
.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: clamp(20px, 4vw, 26px);
}
.card--lg { border-radius: 16px; padding: clamp(22px, 4.4vw, 30px); }

/* Category tile: a real link, whole tile tappable */
.tile {
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: clamp(20px, 4vw, 24px);
  text-align: left;
  color: inherit;
  transition: box-shadow .18s, border-color .18s, transform .18s;
}
.tile:hover { box-shadow: var(--sh-card); border-color: #c3d6ea; color: inherit; }
@media (hover: hover) { .tile:hover { transform: translateY(-3px); } }
.tile p { flex: 1; }
.tile[hidden] { display: none; }

/* ---------- 8. Media / photo slots -------------------------------------- */
.media {
  position: relative;
  width: 100%;
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--tint);
  box-shadow: var(--sh-media);
}
.media--flat { box-shadow: none; }
.media--4x3 { aspect-ratio: 4 / 3; }
.media--4x5 { aspect-ratio: 4 / 5; }
.media--5x4 { aspect-ratio: 5 / 4; }
.media--16x9 { aspect-ratio: 16 / 9; }
.media > img,
.media > iframe {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  border: 0;
}
/* Placeholder shown until a real photo replaces it (see README) */
.media__placeholder {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 10px; padding: 20px; text-align: center;
  background:
    linear-gradient(135deg, rgba(0,72,128,.05), rgba(204,96,54,.06)),
    var(--tint);
  color: #7f93ad;
  font-size: var(--fs-xs);
  font-weight: 600;
  line-height: 1.5;
}
.media__placeholder svg { width: 30px; height: 30px; opacity: .55; }
/* On 4x5 / tall slots on mobile, cap the height so a photo hole never
   pushes the CTA below two screens */
@media (max-width: 599px) {
  .media--4x5 { aspect-ratio: 4 / 3.4; }
}

/* ---------- 9. Header ---------------------------------------------------- */
.header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(255, 255, 255, .97);
  border-bottom: 1px solid var(--line);
}
@supports (backdrop-filter: blur(10px)) {
  .header { background: rgba(255, 255, 255, .9); backdrop-filter: blur(10px); }
}
.header__bar {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: var(--header-h);
  padding-block: 8px;
}
.header__logo { flex: 0 0 auto; margin-right: auto; }
.header__logo img { height: 38px; width: auto; }
@media (min-width: 900px) { .header__logo img { height: 50px; } }

.header__nav { display: none; }
.header__actions { display: none; }

.nav__link {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: var(--tap);
  padding: 9px 13px;
  font-size: 15.5px;
  font-weight: 600;
  color: var(--navy);
}
/* Underline indicator: slides in on hover, stays on the section in view */
.nav__link::after {
  content: '';
  position: absolute;
  left: 13px; right: 13px; bottom: 6px;
  height: 2px;
  border-radius: 1px;
  background: var(--orange);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .2s ease;
}
.nav__link:hover { color: var(--navy); }
.nav__link:hover::after,
.nav__link[aria-current="page"]::after { transform: scaleX(1); }
.nav__link:focus-visible { border-radius: 8px; }

.header__phone {
  display: inline-flex; align-items: center; gap: 8px;
  min-height: var(--tap);
  padding: 11px 16px;
  border: 1.5px solid var(--line-btn);
  border-radius: var(--r-sm);
  font-size: 14px; font-weight: 700;
  color: var(--navy); background: #fff;
  white-space: nowrap;
}
.header__phone:hover { border-color: var(--navy); color: var(--navy); }

/* Mobile: icon-only call button + hamburger */
.header__call-icon,
.nav-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: var(--tap); height: var(--tap);
  flex: 0 0 auto;
  border: 1.5px solid var(--line-btn);
  border-radius: var(--r-sm);
  background: #fff;
  color: var(--navy);
  cursor: pointer;
}
.header__call-icon svg, .nav-toggle svg { width: 21px; height: 21px; }
.nav-toggle__close { display: none; }
.nav-toggle[aria-expanded="true"] .nav-toggle__open { display: none; }
.nav-toggle[aria-expanded="true"] .nav-toggle__close { display: block; }

/* Mobile drawer */
.mobile-nav {
  display: block;
  border-top: 1px solid var(--line);
  background: #fff;
  max-height: calc(100dvh - var(--header-h));
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 8px var(--gutter) calc(20px + env(safe-area-inset-bottom));
}
.mobile-nav[hidden] { display: none; }
.mobile-nav__link {
  display: flex; align-items: center;
  min-height: 52px;
  padding: 6px 4px;
  border-bottom: 1px solid var(--line-soft);
  font-family: var(--ff-head);
  font-size: 17px; font-weight: 700;
  color: var(--navy);
}
.mobile-nav__link:last-of-type { border-bottom: 0; }
.mobile-nav .btn { width: 100%; margin-top: 14px; }

@media (min-width: 900px) {
  .header__nav { display: flex; align-items: center; gap: 4px; margin-right: auto; }
  .header__logo { margin-right: 26px; }
  .header__actions { display: flex; align-items: center; gap: 10px; }
  .header__call-icon, .nav-toggle, .mobile-nav { display: none !important; }
}

/* ---------- 10. Sticky mobile action bar -------------------------------- */
/* The single highest-leverage mobile element on a broker site: call + quote
   always one thumb-reach away. Hidden from 900px where the header has them. */
.action-bar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 70;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 10px var(--gutter) calc(10px + env(safe-area-inset-bottom));
  background: rgba(255, 255, 255, .97);
  border-top: 1px solid var(--line);
  box-shadow: 0 -6px 22px rgba(0, 72, 128, .09);
}
@supports (backdrop-filter: blur(10px)) {
  .action-bar { background: rgba(255, 255, 255, .92); backdrop-filter: blur(10px); }
}
.action-bar .btn { width: 100%; padding-inline: 12px; font-size: 14.5px; box-shadow: none; }

@media (max-width: 899px) { :root { --actionbar-h: 76px; } }
@media (min-width: 900px) { .action-bar { display: none; } }

/* ---------- 11. Hero ----------------------------------------------------- */
/* Phone: headline → photo → copy, so the image is on the first screen.
   Desktop: copy left, photo right. */
.hero {
  background: linear-gradient(180deg, var(--tint) 0%, var(--white) 100%);
  border-bottom: 1px solid #e6eef7;
  padding-block: clamp(26px, 6vw, 56px) clamp(36px, 8vw, 60px);
}
.hero__grid {
  display: grid;
  grid-template-areas: "title" "media" "body";
  gap: 22px;
}
.hero__title { grid-area: title; font-size: var(--fs-h1); line-height: 1.08; font-weight: 800; }
.hero__title span { color: var(--orange); }
.hero__media { grid-area: media; position: relative; }
.hero__body { grid-area: body; }
.hero__body .lede { max-width: 52ch; }
.hero__actions { margin-top: 22px; }
.hero__tagline {
  font-family: var(--ff-head);
  font-size: clamp(16px, 3.6vw, 20px);
  font-weight: 700;
  font-style: italic;
  color: var(--navy);
  margin-top: 22px;
}
.hero__tagline span { color: var(--orange); }

@media (max-width: 859px) {
  /* shorter photo on phones; the sticky action bar already carries the primary CTA */
  .hero .media--4x3 { aspect-ratio: 16 / 10; }
  .hero__primary { display: none; }
  .hero__actions .btn { width: 100%; }
}
@media (min-width: 860px) {
  .hero__grid {
    grid-template-columns: 1fr 1fr;
    grid-template-areas: "title media" "body media";
    grid-template-rows: auto auto;
    align-items: center;
    align-content: center;
    column-gap: clamp(32px, 6vw, 48px);
    row-gap: 18px;
  }
  .hero__title { align-self: end; }
  .hero__body { align-self: start; }
  .hero__actions { margin-top: 28px; }
  .hero__tagline { margin-top: 28px; }
}

/* ---------- 12. Stats band ---------------------------------------------- */
.stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px 16px;
  padding-block: clamp(20px, 4vw, 26px);
}
.stat { text-align: center; }
.stat__value {
  font-family: var(--ff-head);
  font-size: clamp(22px, 5vw, 30px);
  font-weight: 800; color: #fff; line-height: 1;
  font-variant-numeric: tabular-nums;
}
.stat__label { font-size: 13px; font-weight: 600; color: var(--on-navy-dim); margin-top: 6px; }
/* 5 stats: on 2-col phones the last one spans the full width so it isn't orphaned */
.stats > :last-child:nth-child(odd) { grid-column: 1 / -1; }
@media (min-width: 620px) {
  .stats { grid-template-columns: repeat(3, 1fr); }
  .stats > :last-child:nth-child(odd) { grid-column: auto; }
}
@media (min-width: 900px) { .stats { grid-template-columns: repeat(5, 1fr); } }

/* ---------- 13. Value / feature rows ------------------------------------ */
.value-card { text-align: center; }
.value-card .ic { margin-inline: auto; }
.value-card h3 { margin-top: 16px; }
.value-card p { margin-top: 10px; }

.check-row {
  display: flex; gap: 16px; align-items: center;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}
.check-row:last-child { border-bottom: 0; }
.check-row span {
  font-family: var(--ff-head);
  font-size: clamp(15.5px, 3.4vw, 17px);
  font-weight: 600; line-height: 1.45;
  color: var(--navy-900);
}

.feature-row { display: flex; gap: 18px; align-items: flex-start; }
.feature-row h3 { color: var(--navy); }
.feature-row p { margin-top: 7px; }

.service-row {
  display: flex; gap: 18px; align-items: flex-start;
  padding: 22px 0;
  border-top: 1px solid #e0e9f3;
}

.mission-row {
  display: flex; gap: 16px; align-items: baseline;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.mission-row__n {
  font-family: var(--ff-head);
  font-size: 24px; font-weight: 800; line-height: 1;
  color: var(--rust); flex: 0 0 auto;
}

.pillar__head { display: inline-flex; align-items: center; gap: 10px; }
.pillar__statement {
  font-family: var(--ff-head);
  font-size: clamp(19px, 4vw, 26px);
  line-height: 1.5; font-weight: 700; color: var(--navy);
  margin-top: 20px;
}

/* Services: 1 / 2 / 4 columns */
.services {
  display: grid;
  gap: 16px;
  grid-template-columns: 1fr;
}
@media (min-width: 600px)  { .services { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .services { grid-template-columns: repeat(4, 1fr); gap: 18px; } }
.service-card { display: flex; flex-direction: column; gap: 12px; }
.service-card .small { font-size: 14px; }
.service-card h3 { margin-top: 4px; }

/* "What sets us apart" cards */
.feature-card { display: flex; gap: 18px; align-items: flex-start; }
.feature-card p { margin-top: 6px; }
@media (max-width: 599px) { .feature-card { gap: 14px; } .feature-card .ic { --ic-size: 46px; } }

/* ---------- 14. Steps ---------------------------------------------------- */
/* Phone: vertical timeline with a connecting spine.
   Desktop: the horizontal row with arrows from the design. */
.steps { margin-top: 36px; }
.step {
  position: relative;
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 16px;
  padding-bottom: 26px;
}
.step:last-child { padding-bottom: 0; }
.step::before {
  content: '';
  position: absolute;
  left: 21px; top: 48px; bottom: 4px;
  width: 2px;
  background: #d9e5f1;
}
.step:last-child::before { display: none; }
.step__n {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--tint);
  border: 2px solid var(--navy);
  color: var(--navy);
  font-family: var(--ff-head);
  font-weight: 800; font-size: 14px;
}
.step__inner { display: contents; }
.step__body { padding-top: 3px; }
.step__body p { margin-top: 5px; }
.step__arrow { display: none; }

@media (min-width: 760px) {
  .steps {
    display: flex; flex-wrap: wrap;
    justify-content: center; align-items: flex-start;
    gap: 2px;
  }
  .step {
    display: flex; align-items: flex-start; gap: 2px;
    padding-bottom: 0;
  }
  .step::before { display: none; }
  .step__inner { display: block; width: 158px; text-align: center; }
  .step__inner .step__n { margin-inline: auto; }
  .step__inner .step__body { margin-top: 12px; }
  .step__body { padding-top: 0; }
  .step__arrow { display: block; margin-top: 12px; flex: 0 0 auto; color: #b9cbe0; }
}

/* ---------- 15. Filter tabs --------------------------------------------- */
.tabs {
  display: flex;
  gap: 6px;
  padding: 6px;
  background: var(--tint);
  border-radius: 12px;
  width: fit-content;
  max-width: 100%;
  margin: 28px auto 0;
  /* on very narrow phones let them scroll rather than wrap awkwardly */
  overflow-x: auto;
  scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }
.tab {
  flex: 0 0 auto;
  min-height: var(--tap);
  padding: 11px 18px;
  border: 0;
  border-radius: var(--r-sm);
  background: transparent;
  color: var(--navy);
  font-size: 14px; font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color .16s;
}
.tab[aria-selected="true"] { background: #fff; box-shadow: 0 1px 3px rgba(0,72,128,.1); }
@media (max-width: 400px) { .tab { padding-inline: 13px; font-size: 13.5px; } }

/* ---------- 16. Carousels (partners, testimonials) ------------------- */
/* Native scroll-snap track + arrow buttons + optional auto-advance (JS). */
.carousel { display: flex; align-items: center; gap: 12px; }
.carousel__nav {
  display: flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; flex: 0 0 auto;
  border-radius: 50%;
  border: 1.5px solid #cfdcea;
  background: #fff; color: var(--navy);
  cursor: pointer;
  transition: border-color .16s, background-color .16s;
}
.carousel__nav:hover { border-color: var(--navy); background: var(--tint); }
.carousel__nav svg { width: 17px; height: 17px; }
.carousel__track {
  flex: 1; min-width: 0;
  display: grid;
  grid-auto-flow: column;
  gap: var(--car-gap, 14px);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
  padding: 4px 2px 8px;
  list-style: none; margin: 0;
}
.carousel__track::-webkit-scrollbar { display: none; }
.carousel__track > * { scroll-snap-align: start; min-width: 0; }
/* Phones: arrows sit under the track so the cards get the full width */
@media (max-width: 699px) {
  .carousel { flex-wrap: wrap; justify-content: center; gap: 10px 12px; }
  .carousel__track { flex: 1 1 100%; order: 0; }
  .carousel__nav { order: 1; }
}
@media (min-width: 900px) {
  .carousel { gap: 18px; }
  .carousel__nav { width: 46px; height: 46px; }
  .carousel__nav svg { width: 19px; height: 19px; }
}

/* Partners: 2 / 3 / 4 logos per view */
.partners { margin-top: 32px; }
.partners__track { grid-auto-columns: calc((100% - var(--car-gap, 14px)) / 2); }
.partner {
  display: flex; align-items: center; justify-content: center;
  height: 92px; padding: 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
}
.partner img { max-height: 100%; max-width: 100%; object-fit: contain; }
.partners__hint { text-align: center; font-size: var(--fs-sm); font-weight: 700; color: var(--muted); margin-top: 18px; }
@media (min-width: 560px) { .partners__track { grid-auto-columns: calc((100% - 2 * var(--car-gap, 14px)) / 3); } }
@media (min-width: 900px) { .partners__track { grid-auto-columns: calc((100% - 3 * var(--car-gap, 14px)) / 4); } .partner { height: 100px; } }

/* Testimonials: 1 / 2 / 3 per view */
.testimonials { --car-gap: 20px; }
.testimonials__track { grid-auto-columns: 100%; align-items: stretch; }
@media (min-width: 700px)  { .testimonials__track { grid-auto-columns: calc((100% - var(--car-gap)) / 2); } }
@media (min-width: 1000px) { .testimonials__track { grid-auto-columns: calc((100% - 2 * var(--car-gap)) / 3); } }

/* ---------- 17. Testimonials -------------------------------------------- */
.quote { display: flex; flex-direction: column; height: 100%; }
.quote__mark { color: #f0d6c2; width: 30px; height: 30px; }
.quote p { margin-top: 16px; flex: 1; font-size: 15.5px; line-height: 1.75; color: #3b4a62; }
.quote__by {
  display: flex; align-items: center; gap: 14px;
  margin-top: 22px; padding-top: 20px;
  border-top: 1px solid var(--line-soft);
}
.avatar {
  position: relative;
  width: 46px; height: 46px; flex: 0 0 auto;
  border-radius: 50%; overflow: hidden;
  background: var(--navy); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--ff-head); font-weight: 800; font-size: 16px;
}
.avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.quote__name { font-family: var(--ff-head); font-size: 15px; font-weight: 700; color: var(--navy); }
.quote__meta { font-size: var(--fs-xs); color: #5c6b80; margin-top: 2px; }

/* ---------- 18. FAQ (native <details>, works with JS off) --------------- */
.faq {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  overflow: hidden;
  margin-top: 32px;
}
.faq__item { border-top: 1px solid var(--line-soft); }
.faq__item:first-child { border-top: 0; }
.faq__item summary {
  display: flex; align-items: center; gap: 16px;
  justify-content: space-between;
  padding: 18px var(--gutter);
  min-height: var(--tap);
  cursor: pointer;
  list-style: none;
  font-family: var(--ff-head);
  font-size: clamp(15.5px, 3.4vw, 16.5px);
  font-weight: 700;
  color: var(--navy);
}
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary:hover { background: var(--surface); }
.faq__sign {
  position: relative;
  width: 28px; height: 28px; flex: 0 0 auto;
  border-radius: 50%;
  background: var(--warm);
}
.faq__sign::before, .faq__sign::after {
  content: '';
  position: absolute; left: 50%; top: 50%;
  background: var(--orange);
  border-radius: 1px;
  transform: translate(-50%, -50%);
  transition: transform .18s;
}
.faq__sign::before { width: 12px; height: 2px; }
.faq__sign::after  { width: 2px; height: 12px; }
.faq__item[open] .faq__sign::after { transform: translate(-50%, -50%) scaleY(0); }
.faq__item > p {
  font-size: 15px; line-height: 1.75; color: var(--muted);
  padding: 0 var(--gutter) 22px;
}
@media (min-width: 700px) {
  .faq__item summary { padding-inline: 26px; }
  .faq__item > p { padding: 0 74px 24px 26px; }
}

/* ---------- 19. Forms ---------------------------------------------------- */
.form-panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: clamp(22px, 5vw, 32px);
  box-shadow: var(--sh-panel);
}
.field { display: block; }
.field__label {
  display: block;
  font-size: 13px; font-weight: 700; color: var(--navy);
  margin-bottom: 7px;
}
.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: var(--tap);
  padding: 13px 14px;
  border: 1.5px solid var(--line-input);
  border-radius: var(--r-sm);
  /* 16px minimum stops iOS Safari zooming the page on focus */
  font-size: 16px;
  color: var(--ink);
  background: #fff;
  transition: border-color .16s;
}
.field textarea { resize: vertical; min-height: 110px; }
.field select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%23004880' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 42px;
}
.field input:focus,
.field select:focus,
.field textarea:focus { border-color: var(--orange); outline: none; }
.field input:focus-visible,
.field select:focus-visible,
.field textarea:focus-visible { outline: 3px solid rgba(204,96,54,.35); outline-offset: 1px; }

.form-error {
  background: var(--warm);
  border: 1px solid #eecfb8;
  border-radius: var(--r-sm);
  padding: 12px 14px;
  font-size: 13.5px; font-weight: 600;
  color: #9c4718;
}
.form-note { font-size: 12.5px; line-height: 1.6; color: #7a8799; }
.form-success { text-align: center; padding: 20px 4px; }
.form-success .ic { margin-inline: auto; }
.form-success h3 { font-size: 22px; font-weight: 800; margin-top: 18px; }
.form-success p { margin-top: 12px; }

.contact-card {
  background: var(--navy);
  border-radius: var(--r-lg);
  padding: clamp(22px, 5vw, 32px);
  color: #fff;
}
.contact-card h3 { font-size: 20px; font-weight: 700; color: #fff; }
.contact-card p { color: var(--on-navy); }
.contact-card hr { height: 1px; border: 0; background: rgba(255,255,255,.14); margin: 20px 0; }
.contact-line {
  display: flex; gap: 11px; align-items: center;
  min-height: var(--tap);
  font-size: 15px; font-weight: 600; color: #fff;
  word-break: break-word;
}
.contact-line svg { flex: 0 0 auto; color: var(--peach); width: 17px; height: 17px; }
a.contact-line:hover { color: var(--peach); }

/* Pre-selected category pill on the advisor page */
.preselect {
  display: inline-flex; align-items: center; gap: 9px;
  margin-top: 20px;
  background: rgba(255,255,255,.12);
  border-radius: var(--r-pill);
  padding: 9px 16px;
  font-size: 13.5px; font-weight: 700; color: #fff;
}
.preselect[hidden] { display: none; }
.preselect__dot { width: 7px; height: 7px; border-radius: 50%; background: var(--peach); }

/* Office map (advisor page) — fills the column beside the form */
.map-card {
  flex: 1 1 auto;
  min-height: 340px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--tint);
}
.map-card iframe { display: block; width: 100%; height: 100%; min-height: 340px; border: 0; }

/* ---------- 20. Category page ------------------------------------------- */
.cat-hero { background: var(--navy); padding-block: clamp(28px, 5vw, 44px) clamp(44px, 8vw, 60px); }
.backlink {
  display: inline-flex; align-items: center; gap: 8px;
  min-height: var(--tap);
  font-size: 13.5px; font-weight: 700;
  color: var(--on-navy-dim);
}
.backlink:hover { color: #fff; }
.cat-hero .split { margin-top: 20px; }
.cat-hero__badge { display: flex; align-items: center; gap: 14px; }
.cat-hero h1 { font-size: var(--fs-h1); line-height: 1.08; font-weight: 800; color: #fff; margin-top: 18px; }
.cat-hero .lede { color: var(--on-navy); margin-top: 16px; }
.cat-hero .cluster { margin-top: 26px; }

.plan-list { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.plan {
  display: inline-flex; gap: 11px; align-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 13px 16px;
}
.plan svg { flex: 0 0 auto; color: var(--orange); }
.plan span {
  font-family: var(--ff-head);
  font-size: 15px; line-height: 1.4; font-weight: 600;
  color: #1f3557;
}
.who-for {
  font-family: var(--ff-head);
  font-size: clamp(18px, 3.6vw, 23px);
  line-height: 1.6; font-weight: 600; color: #1f3557;
  margin-top: 14px;
}
.checklist-row {
  display: flex; gap: 14px; align-items: flex-start;
  padding: 14px 0;
  border-bottom: 1px solid #eaf0f7;
}
.checklist-row svg { flex: 0 0 auto; margin-top: 4px; color: var(--orange); }
.checklist-row span { font-size: 15.5px; line-height: 1.7; color: var(--slate); }

.chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 24px; }
.chip {
  display: inline-flex; align-items: center; gap: 9px;
  min-height: var(--tap);
  background: #fff;
  border: 1px solid #dbe6f2;
  border-radius: var(--r-pill);
  padding: 10px 16px;
  font-family: var(--ff-head);
  font-size: 14.5px; font-weight: 700;
  color: var(--navy);
}
.chip svg { flex: 0 0 auto; color: var(--orange); }
.chip:hover { border-color: var(--orange); background: var(--warm); color: var(--navy); }

.cta-band {
  display: flex; flex-wrap: wrap;
  gap: 24px; align-items: center; justify-content: space-between;
}
.cta-band__text { max-width: 560px; }
.cta-band p { margin-top: 10px; }

/* ---------- 21. Legal page ---------------------------------------------- */
.legal-block h2 { font-size: clamp(20px, 4.4vw, 23px); font-weight: 800; }
.legal-block .rule { width: 44px; margin-top: 12px; }
.legal-block p { font-size: 15.5px; line-height: 1.75; color: #42506a; }
.legal-help { background: var(--tint); border-radius: 16px; padding: clamp(20px, 4.6vw, 28px); }

/* ---------- 22. Support strip & footer ---------------------------------- */
.support { padding-block: clamp(28px, 5vw, 34px); }
.support h3 { font-size: 17px; font-weight: 700; }
.support a { display: inline-flex; align-items: center; min-height: 32px; }

.footer { background: var(--navy-700); color: var(--on-navy); }
.footer a, .footer button { color: var(--on-navy); }
.footer a:hover, .footer button:hover { color: var(--peach); }
.footer__top {
  display: grid;
  gap: 32px;
  grid-template-columns: 1fr;
  padding-block: clamp(40px, 7vw, 56px) 30px;
}
@media (min-width: 620px) { .footer__top { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .footer__top { grid-template-columns: 1.3fr 1fr 1.2fr 1.3fr; } }
.footer__logo {
  background: #fff;
  border-radius: 12px;
  padding: 10px 14px;
  display: inline-flex;
  width: fit-content;
}
.footer__logo img { height: 36px; width: auto; }
.footer h4 { font-size: 14px; font-weight: 700; color: #fff; letter-spacing: .04em; }
.footer__links { display: flex; flex-direction: column; gap: 4px; margin-top: 12px; }
.footer__links a { display: flex; align-items: center; min-height: 40px; font-size: 14px; }
.footer p { font-size: 14px; line-height: 1.7; }
.footer__tagline {
  font-family: var(--ff-head);
  font-size: 15px; font-weight: 700; font-style: italic;
  color: var(--peach); margin-top: 16px;
}
.footer__bottom { border-top: 1px solid rgba(255,255,255,.11); }
.footer__bottom .container {
  display: flex; flex-wrap: wrap; gap: 10px 14px;
  justify-content: space-between;
  padding-block: 18px;
  font-size: 12.5px; color: #9db8d6;
}

/* Collapsible footer link groups on phones — a 6-item and an 11-item list
   otherwise turn the footer into a second page. */
@media (max-width: 619px) {
  .footer__group summary {
    display: flex; align-items: center; justify-content: space-between;
    min-height: var(--tap);
    cursor: pointer;
    list-style: none;
  }
  .footer__group summary::-webkit-details-marker { display: none; }
  .footer__group summary::after {
    content: ''; width: 9px; height: 9px;
    border-right: 2px solid var(--on-navy);
    border-bottom: 2px solid var(--on-navy);
    transform: rotate(45deg) translateY(-2px);
    transition: transform .18s;
  }
  .footer__group[open] summary::after { transform: rotate(-135deg) translateY(-2px); }
}
@media (min-width: 620px) {
  .footer__group summary { list-style: none; pointer-events: none; }
  .footer__group summary::-webkit-details-marker { display: none; }
}

/* ---------- 23. Utilities ----------------------------------------------- */
.mt-0  { margin-top: 0; }
.mt-8  { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mt-20 { margin-top: 20px; }
.mt-24 { margin-top: 24px; }
.mt-28 { margin-top: 28px; }
.mt-32 { margin-top: 32px; }
.mt-40 { margin-top: 40px; }
.text-center { text-align: center; }
