/* ==========================================================================
   Financial Superhero — site.css
   Modern rebuild (2026). Design system in custom properties; every value
   below references a token. Palette is anchored to the brand blue #0088cc
   with the site's existing gold (#f5a623) as the action accent.

   CONTENTS
     1. Tokens
     2. Fonts
     3. Base / reset
     4. Utilities (container, buttons, kicker, section, reveal)
     5. Top bar + sticky header + mobile nav
     6. Hero (video banner)
     7. Feature cards
     8. Statement band
     9. Service flip cards
    10. Quiz
    11. Video (explainer) section
    12. About + booking (Calendly)
    13. CTA band
    14. Footer
    15. Back-to-top
    16. Motion & accessibility
   ========================================================================== */

/* 1. Tokens ------------------------------------------------------------- */
:root {
  /* brand blues (anchored to #0088cc) */
  --blue-50:  #eff7fc;
  --blue-100: #d8ecf8;
  --blue-200: #aedaf1;
  --blue-300: #79c1e7;
  --blue-400: #39a3da;
  --blue-500: #0088cc;
  --blue-600: #0074ae;
  --blue-700: #005e8e;
  --blue-800: #094b6e;
  --blue-900: #0c3a55;
  --navy-900: #0d3049;
  --navy-950: #0a2536;

  /* action accent — the site's existing gold */
  --amber-400: #ffbe4d;
  --amber-500: #f5a623;
  --amber-600: #dd8c0d;
  --amber-700: #a5670a;

  /* neutrals (blue-tinted) */
  --ink:    #10293b;
  --body:   #3b586d;
  --muted:  #5f7689;
  --line:   #d9e5ee;
  --line-strong: #7789a0;
  --wash:   #f2f7fb;
  --white:  #ffffff;

  /* type */
  --font-display: "Sora", "Segoe UI", system-ui, sans-serif;
  --font-body: "Inter", "Segoe UI", system-ui, sans-serif;
  --text-xs:   0.8125rem;
  --text-sm:   0.9375rem;
  --text-base: 1.0625rem;
  --text-lg:   1.1875rem;
  --text-xl:   clamp(1.25rem, 1.1rem + 0.6vw, 1.5rem);
  --text-2xl:  clamp(1.5rem, 1.24rem + 1vw, 2rem);
  --text-3xl:  clamp(1.9rem, 1.5rem + 1.6vw, 2.75rem);
  --text-4xl:  clamp(2.35rem, 1.55rem + 3.2vw, 3.9rem);
  --leading-body: 1.65;
  --leading-tight: 1.12;
  --measure: 65ch;

  /* space */
  --sp-1: 0.25rem;
  --sp-2: 0.5rem;
  --sp-3: 0.75rem;
  --sp-4: 1rem;
  --sp-5: 1.5rem;
  --sp-6: 2rem;
  --sp-7: 3rem;
  --sp-8: 4rem;
  --section-pad: clamp(4rem, 3rem + 4.5vw, 6.75rem);

  /* shape & elevation */
  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 22px;
  --r-full: 999px;
  --shadow-sm: 0 1px 2px rgba(9, 75, 110, 0.06), 0 2px 8px rgba(9, 75, 110, 0.06);
  --shadow-md: 0 2px 6px rgba(9, 75, 110, 0.07), 0 10px 28px rgba(9, 75, 110, 0.12);
  --shadow-lg: 0 4px 10px rgba(9, 75, 110, 0.08), 0 24px 56px rgba(9, 75, 110, 0.16);

  /* layout */
  --container: 72rem;
  --gutter: clamp(20px, 4vw, 40px);   /* px: page gutter must not text-scale */
  --header-h: 4.5rem;
}

/* 2. Fonts (self-hosted, variable, latin subset) ------------------------ */
@font-face {
  font-family: "Sora";
  font-style: normal;
  font-weight: 600 700;
  font-display: swap;
  src: url("../fonts/site/sora-latin-600-700.woff2") format("woff2");
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("../fonts/site/inter-latin-400-700.woff2") format("woff2");
}

/* 3. Base ---------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  overflow-x: clip;                 /* NOT overflow:hidden — sticky must work */
  overflow-anchor: none;            /* avoid anchor/header-shrink feedback loops */
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 1rem);
  -webkit-text-size-adjust: 100%;
}

html.nav-open { overflow: hidden; } /* scroll lock: html is the scroller (body
                                       overflow doesn't propagate past clip) */

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: var(--leading-body);
  color: var(--body);
  background: var(--white);
  overflow-x: clip;
  /* Inherited by everything. On very narrow screens (Galaxy Fold cover screen
     ~280-344px) a single long token — "Kitchener/Waterloo", an email address —
     would otherwise set a min-content width wider than the viewport and get
     clipped away by the overflow-x above. anywhere, not break-word: only
     anywhere also lowers the intrinsic minimum, which is what actually lets a
     flex/grid track shrink. Line breaking is identical when there is room. */
  overflow-wrap: anywhere;
}


h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: var(--leading-tight);
  color: var(--ink);
  margin: 0 0 var(--sp-4);
  text-wrap: balance;
}

p { margin: 0 0 var(--sp-4); max-width: var(--measure); }
ul, ol { margin: 0 0 var(--sp-4); padding-left: 1.25rem; }
img, svg, video { max-width: 100%; height: auto; display: block; }

a { color: var(--blue-600); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--blue-700); }

:focus-visible {
  outline: 3px solid var(--blue-700);   /* ≥3:1 on white, wash, and amber */
  outline-offset: 2px;
  border-radius: var(--r-sm);
}
/* on dark surfaces a light ring is needed for 3:1 */
.topbar :focus-visible,
.site-footer :focus-visible,
.band :focus-visible,
.cta-band :focus-visible,
.hero :focus-visible,
.service-back :focus-visible {
  outline-color: var(--white);
}
/* programmatic focus targets — no ring on script-driven focus */
main:focus,
.quiz-question:focus,
.quiz-result-title:focus { outline: none; }

.skip-link {
  position: absolute;
  left: var(--sp-4);
  top: -100%;
  z-index: 10000;
  padding: var(--sp-2) var(--sp-4);
  background: var(--blue-700);
  color: var(--white);
  border-radius: 0 0 var(--r-sm) var(--r-sm);
  text-decoration: none;
  transition: top 0.15s ease;
}
.skip-link:focus { top: 0; color: var(--white); }

/* 4. Utilities ------------------------------------------------------------ */
.container {
  width: min(100% - 2 * var(--gutter), var(--container));
  margin-inline: auto;
}

.section { padding-block: var(--section-pad); }
.section-wash { background: var(--wash); }

.section-head { max-width: 44rem; margin-bottom: var(--sp-7); }
.section-head.centered { margin-inline: auto; text-align: center; }
.section-head.centered p { margin-inline: auto; }
.section-head h2 { font-size: var(--text-3xl); margin-bottom: var(--sp-3); }

.kicker {
  display: block;
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--blue-600);
  margin-bottom: var(--sp-3);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  white-space: nowrap;
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 0.875rem 1.75rem;
  border-radius: var(--r-full);
  border: 2px solid transparent;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease,
              color 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
}
.btn:active { transform: translateY(1px); }

.btn-cta {
  background: var(--amber-500);
  color: var(--navy-950);
  box-shadow: var(--shadow-sm);
}
.btn-cta:hover { background: var(--amber-400); color: var(--navy-950); box-shadow: var(--shadow-md); }

.btn-solid { background: var(--blue-600); color: var(--white); }
.btn-solid:hover { background: var(--blue-700); color: var(--white); }

.btn-ghost-light { border-color: rgba(255, 255, 255, 0.7); color: var(--white); background: rgba(255, 255, 255, 0.06); }
.btn-ghost-light:hover { border-color: var(--white); background: rgba(255, 255, 255, 0.14); color: var(--white); }

.btn-ghost { border-color: var(--line); color: var(--blue-700); background: transparent; }
.btn-ghost:hover { border-color: var(--blue-400); background: var(--blue-50); color: var(--blue-700); }

.btn-lg { font-size: var(--text-base); padding: 1.05rem 2.25rem; }

/* scroll reveal — the hidden state is armed by the reveal module in site.js
   itself (html.reveal-armed), in the same code path that reveals, so a failed
   or errored script can never leave content invisible */
.reveal-armed .reveal { opacity: 0; transform: translateY(24px); }
.reveal-armed .reveal.is-visible {
  opacity: 1;
  transform: none;
  transition: opacity 0.6s ease, transform 0.6s ease;
}

/* 5. Top bar + header ------------------------------------------------------ */
.topbar {
  background: var(--navy-950);
  color: var(--blue-100);
  font-size: var(--text-xs);
}
.topbar-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--sp-4);
  min-height: 2.5rem;
  padding-block: var(--sp-1);
  flex-wrap: wrap;
}
.topbar ul { list-style: none; margin: 0; padding: 0; display: flex; gap: var(--sp-5); flex-wrap: wrap; }
.topbar-row > ul,
.topbar li { min-width: 0; }               /* let the long email wrap, not push */
.topbar a { color: var(--white); text-decoration: none; font-weight: 600; }
.topbar a:hover { color: var(--amber-400); }
.topbar .icon {
  width: min(0.875rem, 5vw);
  height: min(0.875rem, 5vw);
  vertical-align: -0.125em;
  margin-right: 0.375em;
}
.topbar-label { letter-spacing: 0.08em; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 1050;                    /* above slick-free content, below skip link */
  background: var(--white);
  border-bottom: 1px solid var(--line);
  transition: box-shadow 0.25s ease;
}
.site-header.is-scrolled { box-shadow: var(--shadow-md); border-bottom-color: transparent; }

.header-row {
  display: flex;
  align-items: center;
  gap: 24px;                        /* px: header chrome must not text-scale */
  min-height: var(--header-h);
  transition: min-height 0.25s ease;
}
.site-header.is-scrolled .header-row { min-height: 3.75rem; }

.brand { display: inline-flex; align-items: center; flex-shrink: 0; min-width: 0; }
/* 147px is the design size; below ~432px viewport it scales down so the row
   (logo + CTA + menu button) always fits. height:auto keeps the 147x38 ratio,
   and the width/height attributes on the <img> still reserve space (no CLS). */
.brand img { width: min(147px, 34vw); height: auto; }

.site-nav { margin-left: auto; }
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: clamp(0.25rem, 1.2vw, 1rem); }
.site-nav a {
  display: block;
  padding: min(var(--sp-2), 0.715vw) min(var(--sp-3), 1.072vw);
  font-size: min(var(--text-sm), 1.34vw);
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--ink);
  text-decoration: none;
  border-radius: var(--r-sm);
}
/* nav labels are short and must not break mid-word — opt them out of the
   body-level overflow-wrap:anywhere */
.site-nav a, .header-tel, .topbar-label { overflow-wrap: normal; }
.site-nav a:hover { color: var(--blue-600); background: var(--blue-50); }
.site-nav a[aria-current="page"] { color: var(--blue-600); }

.header-actions { display: flex; align-items: center; gap: 16px; min-width: 0; }
.header-tel {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  font-weight: 700;
  font-size: var(--text-sm);
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
}
.header-tel:hover { color: var(--blue-600); }
.header-tel .icon { width: 16.8px; height: 16.8px; color: var(--blue-500); }

.nav-toggle {
  display: none;
  flex: 0 0 auto;                   /* never squeezed — it is the only way in */
  background: none;
  border: 0;
  padding: 10px;                    /* px, not rem: fixed chrome, ≥44px target */
  cursor: pointer;
  color: var(--ink);
  border-radius: var(--r-sm);
}
.nav-toggle .icon { width: 25.6px; height: 25.6px; display: block; flex: none; }
.nav-toggle .icon-close { display: none; }
.nav-open .nav-toggle .icon-menu { display: none; }
.nav-open .nav-toggle .icon-close { display: block; }

/* The inline nav (6 links) + phone + CTA needs ~1105px to fit beside the logo;
   below that the CTA used to be pushed past the viewport and clipped away by
   overflow-x:clip. Switch to the menu button at 1120px — ~15px of headroom in
   case the fallback font stack renders the links wider than Inter/Sora. */
@media (max-width: 1120px) {
  .topbar-label { display: none; }
  /* icon-only phone link: number stays in the accessible name (sr-only),
     padding keeps the hit target ≥24px */
  .header-tel { padding: 8px; }
  .header-tel span {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
  }
  .nav-toggle { display: inline-flex; }

  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin: 0;
    background: var(--white);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-lg);
    padding: var(--sp-4) var(--gutter) var(--sp-6);
    display: none;
    max-height: calc(100dvh - var(--header-h));
    overflow-y: auto;
  }
  .nav-open .site-nav { display: block; }
  .site-nav ul { flex-direction: column; gap: var(--sp-1); }
  .site-nav a { font-size: var(--text-lg); padding: var(--sp-3); }

  /* .btn is white-space:nowrap by design; a long label ("START THE
     CONVERSATION") outgrows a narrow screen, more so with text scaled up.
     normal only wraps when it must. The header pill stays on one line. */
  .btn { white-space: normal; max-width: 100%; text-align: center; }
  .header-cta { white-space: nowrap; }
}

@media (max-width: 560px) {
  .topbar .topbar-links { display: none; }   /* phone + email remain */
  .header-cta { padding: 11.2px 17.6px; font-size: 13px; }
}

/* Very narrow screens — Galaxy Fold cover screen (~280-344px CSS px) and
   similar. The header row is logo + phone + CTA + menu button, none of which
   could shrink, giving it a hard 389px floor; below that the row overflowed and
   html/body's overflow-x:clip chopped the menu button off entirely, leaving no
   way to reach the navigation. Tighten the row so everything stays on screen. */
@media (max-width: 400px) {
  :root { --gutter: 14px; }
  .header-row { gap: 8px; }
  .header-actions { gap: 8px; }
  .header-tel { display: none; }             /* same number is in the topbar above */
  .header-cta {
    padding: 9.6px 12.8px;
    font-size: 11px;
    letter-spacing: 0.01em;
  }
  .nav-toggle { padding: 8px; min-width: 44px; min-height: 44px; }

}

/* 6. Hero (video banner) --------------------------------------------------- */
.hero {
  position: relative;
  display: flex;
  align-items: center;
  min-height: clamp(31rem, 76vh, 46rem);
  background: var(--navy-950);
  overflow: hidden;                 /* not clip: Safari 15.x drops clip */
}

.hero-pause {
  position: absolute;
  right: var(--sp-5);
  bottom: var(--sp-5);
  z-index: 2;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: var(--r-full);
  border: 1px solid rgba(255, 255, 255, 0.45);
  background: rgba(7, 32, 48, 0.55);
  color: var(--white);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}
.hero-pause:hover { background: rgba(7, 32, 48, 0.8); border-color: var(--white); }
.hero-pause .icon { width: 1.05rem; height: 1.05rem; }
.hero-pause .icon-play-sm { display: none; }
.hero-pause.is-paused .icon-pause { display: none; }
.hero-pause.is-paused .icon-play-sm { display: block; }
.hero-pause[hidden] { display: none; }

.hero-media, .hero-media picture { position: absolute; inset: 0; }
.hero-media img,
.hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero-video { opacity: 0; transition: opacity 0.8s ease; }
.hero-video.is-playing { opacity: 1; }

.hero-scrim {
  position: absolute;
  inset: 0;
  /* alpha ≥ .84 under the whole copy column so AA holds over any footage */
  background:
    linear-gradient(to right,
      rgba(7, 32, 48, 0.92) 0%,
      rgba(7, 32, 48, 0.86) 45%,
      rgba(7, 32, 48, 0.84) 60%,
      rgba(7, 32, 48, 0.50) 85%,
      rgba(7, 32, 48, 0.38) 100%),
    linear-gradient(to top, rgba(7, 32, 48, 0.85) 0%, rgba(7, 32, 48, 0) 30%);
}

.hero .container { position: relative; z-index: 1; }

.hero-copy { max-width: 40rem; padding-block: var(--sp-8); }
.hero-copy h1 {
  color: var(--white);
  font-size: var(--text-4xl);
  margin-bottom: var(--sp-4);
}
.hero-copy h1 span {
  display: block;
  font-size: 0.45em;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--amber-400);
  margin-bottom: var(--sp-3);
}
.hero-tagline {
  color: var(--blue-100);
  font-size: var(--text-lg);
  margin-bottom: var(--sp-6);
}
.hero-buttons { display: flex; gap: var(--sp-4); flex-wrap: wrap; }

.plan-strip {
  list-style: none;
  margin: var(--sp-7) 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, auto);
  justify-content: start;
  gap: var(--sp-3);
}
.plan-strip li {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-2) var(--sp-4);
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: var(--r-full);
  background: rgba(255, 255, 255, 0.08);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  color: var(--white);
  font-size: var(--text-sm);
  font-weight: 600;
  white-space: nowrap;
}
.plan-strip .icon { width: 1.05rem; height: 1.05rem; color: var(--amber-400); flex-shrink: 0; }

@media (max-width: 900px) {
  .plan-strip { grid-template-columns: repeat(2, auto); }
}
@media (max-width: 560px) {
  .hero { min-height: 34rem; }
  .plan-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); width: 100%; }
  .plan-strip li { white-space: normal; font-size: var(--text-xs); padding-inline: var(--sp-3); }
}

/* 7. Feature cards ---------------------------------------------------------- */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(16rem, 100%), 1fr));
  gap: var(--sp-6);
}
.feature-card { padding: var(--sp-2); }
.feature-card h2 { font-size: var(--text-xl); margin-bottom: var(--sp-2); }
.feature-card p { margin-bottom: 0; }
.feature-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3.25rem;
  height: 3.25rem;
  border-radius: var(--r-md);
  background: var(--blue-50);
  color: var(--blue-600);
  margin-bottom: var(--sp-4);
}
.feature-icon .icon { width: 1.6rem; height: 1.6rem; }

/* 8. Statement band ----------------------------------------------------------- */
.band {
  /* gradient capped at blue-600 so white body text holds ≥5:1 everywhere */
  background: linear-gradient(115deg, var(--blue-800) 0%, var(--blue-600) 100%);
  color: var(--white);
  padding-block: clamp(3.5rem, 3rem + 3vw, 5.5rem);
}
.band h2 {
  color: var(--white);
  font-size: var(--text-3xl);
  margin-bottom: var(--sp-3);
  max-width: 24ch;
}
.band p { color: var(--white); font-size: var(--text-lg); margin: 0; }

/* 9. Service flip cards ---------------------------------------------------------- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(15.5rem, 100%), 1fr));
  gap: var(--sp-5);
}

.service-card { perspective: 1000px; }
.service-card-inner {
  display: grid;                    /* faces stacked in one cell: the card is
                                       always as tall as its tallest face, so
                                       content/zoom can never overflow it */
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 0.65s cubic-bezier(0.35, 0.1, 0.25, 1);
}

.service-front, .service-back {
  grid-area: 1 / 1;
  min-width: 0;
  min-height: 16rem;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  border-radius: var(--r-lg);
  padding: min(var(--sp-6), 11.4vw);   /* capped so text scaling can't eat the card */
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
/* align-items:flex-start sizes children to their own content, so a long word
   could exceed the card instead of wrapping inside it. */
.service-front > *, .service-back > * { max-width: 100%; }
.service-front {
  background: var(--white);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
}
.service-front h3 { font-size: var(--text-lg); margin-bottom: var(--sp-2); }
.service-front h3 a { color: var(--ink); text-decoration: none; }
.service-front h3 a:hover { color: var(--blue-600); }
.service-front p { font-size: var(--text-sm); margin-bottom: 0; }
.service-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  border-radius: var(--r-full);
  background: var(--blue-500);
  background: linear-gradient(135deg, var(--blue-500), var(--blue-700));
  color: var(--white);
  margin-bottom: var(--sp-4);
}
.service-icon .icon { width: 1.4rem; height: 1.4rem; }

.service-back {
  background: linear-gradient(150deg, var(--blue-700), var(--blue-900));
  color: var(--white);
  transform: rotateY(180deg);
  justify-content: center;
  gap: var(--sp-4);
}
.service-back .flip-quote { color: var(--blue-100); font-size: var(--text-sm); margin: 0; }
.service-back .icon { width: 1.75rem; height: 1.75rem; color: var(--amber-400); }
.service-back .btn { font-size: var(--text-xs); padding: 0.6rem 1.2rem; }

@media (hover: hover) {
  /* flip on hover, or when focus is on the BACK link — never while the
     focused element sits on the hidden front face */
  .service-card:hover .service-card-inner,
  .service-card:has(.service-back :focus) .service-card-inner { transform: rotateY(180deg); }
}
@media (hover: none) {
  /* touch: static card, front content + its title link do the work */
  .service-back { display: none; }
  .service-card-inner { transform: none !important; }
}

/* 10. Quiz ------------------------------------------------------------------------ */
.quiz-card {
  max-width: 42rem;
  margin-inline: auto;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg);
  padding: clamp(1.5rem, 1rem + 2.5vw, 3rem);
}

.quiz-step { display: none; }
.quiz-step.active { display: block; }

.quiz-progress {
  height: 0.5rem;
  border-radius: var(--r-full);
  background: var(--blue-100);
  overflow: hidden;
  margin-bottom: var(--sp-4);
}
.quiz-progress-bar {
  height: 100%;
  border-radius: var(--r-full);
  background: linear-gradient(90deg, var(--blue-500), var(--blue-400));
  transition: width 0.4s ease;
}

.quiz-step-label {
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: var(--sp-2);
}
.quiz-question { font-size: var(--text-2xl); margin-bottom: var(--sp-5); }

.quiz-options { display: grid; gap: var(--sp-3); }
.quiz-option {
  font-family: var(--font-body);
  font-size: var(--text-base);
  text-align: left;
  color: var(--ink);
  background: var(--white);
  border: 2px solid var(--line-strong);
  border-radius: var(--r-md);
  padding: var(--sp-4) var(--sp-5);
  cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease, transform 0.15s ease;
}
.quiz-option:hover { border-color: var(--blue-400); background: var(--blue-50); }
.quiz-option.selected { border-color: var(--blue-600); background: var(--blue-50); }

.quiz-result { text-align: center; }
.quiz-result-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 5rem;
  height: 5rem;
  border-radius: var(--r-full);
  background: var(--blue-50);
  color: var(--blue-600);
  margin-bottom: var(--sp-4);
}
.quiz-result-icon .icon { width: 2.4rem; height: 2.4rem; }
.quiz-result-title { font-size: var(--text-2xl); }
.quiz-result-text { margin-inline: auto; margin-bottom: var(--sp-6); }
.quiz-retake {
  display: block;
  margin: var(--sp-4) auto 0;
  background: none;
  border: 0;
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.quiz-retake:hover { color: var(--blue-600); }

/* 11. Video (explainer) section ------------------------------------------------------ */
.video-figure {
  position: relative;
  max-width: 54rem;
  margin-inline: auto;
  border-radius: var(--r-lg);
  overflow: hidden;                 /* not clip: Safari 15.x drops clip */
  background: #000;
  box-shadow: var(--shadow-lg);
}
.video-figure video { width: 100%; height: auto; }

.video-play-btn {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 5.5rem;
  height: 5.5rem;
  border-radius: var(--r-full);
  border: 0;
  background: var(--amber-500);
  color: var(--navy-950);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-lg);
  transition: transform 0.2s ease, background-color 0.2s ease;
}
.video-play-btn:hover { background: var(--amber-400); transform: scale(1.06); }
.video-play-btn .icon { width: 2rem; height: 2rem; margin-left: 0.2rem; }
.video-play-btn.is-hidden { display: none; }

/* 12. About + booking --------------------------------------------------------------- */
.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: clamp(2rem, 1.5rem + 3vw, 4.5rem);
  align-items: start;
}
@media (max-width: 900px) {
  .about-grid { grid-template-columns: minmax(0, 1fr); }
}

.about-copy h2 { font-size: var(--text-3xl); }
.about-lead {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--text-xl);
  color: var(--blue-700);
  line-height: 1.35;
  margin-bottom: var(--sp-5);
}

.checklist { list-style: none; padding: 0; margin: 0 0 var(--sp-6); display: grid; gap: var(--sp-3); }
.checklist li { display: flex; gap: var(--sp-3); align-items: flex-start; min-width: 0; }
.checklist .icon {
  width: 1.4rem;
  height: 1.4rem;
  color: var(--blue-500);
  flex-shrink: 0;
  margin-top: 0.15rem;
}

.booking-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg);
  padding: var(--sp-5) var(--sp-5) var(--sp-2);
}
.booking-card h3 { font-size: var(--text-xl); margin: var(--sp-2) 0 var(--sp-2); text-align: center; }

/* Calendly inline embed responsiveness. The embed ships an inline
   style="min-width:320px;height:630px" — override it so the widget fills the
   card instead of a fixed 320px box, and give the taller stacked mobile layout
   the height it needs (the desktop two-column view fits in 630px). */
.calendly-inline-widget {
  min-width: 0 !important;
  width: 100%;
}
@media (max-width: 640px) {
  .calendly-inline-widget { height: 1000px !important; }
}

/* 13. CTA band ------------------------------------------------------------------------- */
.cta-band {
  position: relative;
  background:
    linear-gradient(rgba(8, 38, 56, 0.88), rgba(8, 38, 56, 0.88)),
    url("../images/bg/background-image-1.jpg") center / cover no-repeat;
  color: var(--white);
  text-align: center;
  padding-block: var(--section-pad);
}
.cta-band .kicker { color: var(--amber-400); }
.cta-band h2 { color: var(--white); font-size: var(--text-3xl); letter-spacing: 0.02em; }
.cta-band p { margin-inline: auto; color: var(--blue-100); font-size: var(--text-lg); }
.cta-band .btn { margin-top: var(--sp-4); }

.trust-line {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  margin: var(--sp-6) auto 0;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--blue-100);
}
.trust-line .icon { width: 1.2rem; height: 1.2rem; color: var(--amber-400); }

/* 14. Footer ------------------------------------------------------------------------------ */
.site-footer { background: var(--navy-950); color: var(--blue-100); font-size: var(--text-sm); }
.site-footer a { color: var(--white); text-decoration: none; }
.site-footer a:hover { color: var(--amber-400); }
.site-footer p { max-width: none; }

.footer-contact {
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}
.footer-contact-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(14rem, 100%), 1fr));
  gap: var(--sp-5);
  padding-block: var(--sp-6);
}
.footer-contact-block { display: flex; align-items: center; gap: var(--sp-3); }
.footer-contact-block p { margin: 0; font-weight: 600; min-width: 0; }
.footer-contact-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;                      /* px: badge is chrome, must not text-scale */
  height: 44px;
  border-radius: var(--r-full);
  background: rgba(255, 255, 255, 0.08);
  color: var(--amber-400);
  flex-shrink: 0;
}
.footer-contact-icon .icon { width: 1.2rem; height: 1.2rem; }

.footer-cols {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(15rem, 100%), 1fr));
  gap: var(--sp-7);
  padding-block: var(--sp-8);
}
.footer-col .widget-title {
  color: var(--white);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--text-base);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: var(--sp-4);
}
.footer-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--sp-2); }
.footer-brand img { margin-bottom: var(--sp-4); }

.footer-social { display: flex; gap: var(--sp-3); margin-top: var(--sp-4); }
.footer-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: var(--r-full);
  background: rgba(255, 255, 255, 0.08);
  transition: background-color 0.2s ease;
}
.footer-social a:hover { background: var(--blue-600); color: var(--white); }
.footer-social .icon { width: 1.1rem; height: 1.1rem; }

.footer-shield { display: flex; align-items: center; gap: var(--sp-2); font-weight: 600; color: var(--white); }
.footer-shield .icon { width: 1.1rem; height: 1.1rem; color: var(--amber-400); }

.footer-bottom { border-top: 1px solid rgba(255, 255, 255, 0.12); }
.footer-bottom-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--sp-4);
  flex-wrap: wrap;
  padding-block: var(--sp-5);
  font-size: var(--text-xs);
}
.footer-bottom p { margin: 0; }
.footer-bottom ul { list-style: none; margin: 0; padding: 0; display: flex; gap: var(--sp-5); }

/* 15. Back-to-top ---------------------------------------------------------------------------- */
.to-top {
  position: fixed;
  right: var(--sp-5);
  bottom: var(--sp-5);
  z-index: 1040;
  width: 2.9rem;
  height: 2.9rem;
  border-radius: var(--r-full);
  border: 1px solid var(--line);
  background: var(--white);
  color: var(--blue-700);
  box-shadow: var(--shadow-md);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s;
}
.to-top.is-visible { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { color: var(--blue-500); }
.to-top .icon { width: 1.2rem; height: 1.2rem; }

/* 16. Motion & accessibility ------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .reveal-armed .reveal { opacity: 1 !important; transform: none !important; }
  .hero-video { display: none; }   /* poster only; JS never loads it either */
  .hero-pause { display: none; }   /* nothing to pause */
  @media (hover: hover) {
    /* crossfade instead of 3D flip */
    .service-card-inner { transform: none !important; transition: none; }
    .service-back { opacity: 0; pointer-events: none; transform: none; transition: opacity 0.2s ease; }
    .service-card:hover .service-back,
    .service-card:has(.service-back :focus) .service-back { opacity: 1; pointer-events: auto; }
    .service-card:hover .service-front,
    .service-card:has(.service-back :focus) .service-front { visibility: hidden; }
  }
}

/* ==========================================================================
   17. Inner-page components (design rollout)
   ========================================================================== */

/* ---- Page banner (breadcrumb band) — pure gradient, no photo ---- */
.page-banner {
  background: linear-gradient(115deg, var(--navy-950) 0%, var(--blue-800) 70%, var(--blue-700) 100%);
  color: var(--white);
  padding-block: clamp(2.75rem, 2.2rem + 2.5vw, 4.25rem);
}
.crumbs {
  list-style: none;
  margin: 0 0 var(--sp-3);
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
  font-size: var(--text-sm);
  color: var(--blue-100);
}
.crumbs a { color: var(--white); text-decoration: none; font-weight: 600; }
.crumbs a:hover { color: var(--amber-400); }
.crumbs li + li::before { content: "/"; margin-right: var(--sp-2); opacity: 0.5; }
.page-banner-title {
  display: block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--text-3xl);
  line-height: var(--leading-tight);
  color: var(--white);
}

/* ---- Page banner with looping video background (careers) ----
   Reuses the hero's media stack (.hero-media / .hero-video / .hero-scrim /
   .hero-pause), so site.js lazy-loading and the reduced-motion fallback
   apply here too. The gradient .page-banner background stays underneath
   as the fallback while the poster/video load. */
.page-banner-video {
  position: relative;
  overflow: hidden;
  padding-block: clamp(4.5rem, 3.5rem + 5vw, 8rem);
}
.page-banner-video .container { position: relative; z-index: 1; }

/* ---- Two-column prose split (about) ---- */
.split-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(2rem, 1.5rem + 3vw, 4.5rem);
}
@media (max-width: 900px) { .split-grid { grid-template-columns: minmax(0, 1fr); } }

/* Grid/flex children default to min-width:auto; that floor is what turns a
   long word or text-scaled padding into overflow. Let them shrink — the
   overflow-wrap on body then wraps the text inside. */
.services-grid > *,
.features-grid > *,
.topic-grid > *,
.footer-cols > *,
.footer-contact-row > *,
.quiz-options > * { min-width: 0; }

/* ---- Buttons in a row ---- */
.btn-row { display: flex; gap: var(--sp-4); flex-wrap: wrap; }
.btn-row.centered { justify-content: center; }

/* ---- Accordion (FAQ) ---- */
.accordion {
  max-width: 50rem;
  margin-inline: auto;
  display: grid;
  gap: var(--sp-3);
}
.accordion-item {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.accordion-trigger {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--sp-4);
  padding: min(var(--sp-4), 5.7vw) min(var(--sp-5), 8.6vw);
  /* anywhere (not break-word) — only this one also lowers the intrinsic
     minimum, so the question can shrink instead of pushing the row wide */
  overflow-wrap: anywhere;
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--ink);
  text-align: left;
  background: none;
  border: 0;
  cursor: pointer;
}
.accordion-trigger:hover { color: var(--blue-600); }
.accordion-trigger .icon {
  width: 20px;                      /* px: chevron is chrome, not text */
  height: 20px;
  flex-shrink: 0;
  color: var(--blue-500);
  transform: rotate(180deg);       /* sprite is chevron-up; closed points down */
  transition: transform 0.3s ease;
}
.accordion-item.is-open .accordion-trigger .icon { transform: rotate(0deg); }
/* collapsed state is armed by the accordion module in site.js (html.accordion-armed)
   — with JS unavailable every answer stays visible, like the old page */
.accordion-panel { overflow: hidden; transition: height 0.3s ease; }
.accordion-armed .accordion-panel { height: 0; }
.accordion-item.is-open .accordion-panel { height: auto; }
.accordion-body { padding: 0 var(--sp-5) var(--sp-5); }
.accordion-body p:last-child { margin-bottom: 0; }

/* ---- Article + sidebar layout (services) ---- */
.with-sidebar {
  display: grid;
  grid-template-columns: minmax(0, 2.3fr) minmax(15rem, 1fr);
  gap: clamp(2rem, 1.5rem + 2.5vw, 4rem);
  align-items: start;
}
@media (max-width: 900px) { .with-sidebar { grid-template-columns: minmax(0, 1fr); } }

.side-card {
  position: sticky;
  top: calc(var(--header-h) + 1.5rem);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
  padding: var(--sp-5);
}
@media (max-width: 900px) { .side-card { position: static; } }
.side-card .widget-title {
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--text-base);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: var(--sp-3);
}
.side-nav ul { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--sp-1); }
.side-nav a {
  display: block;
  padding: var(--sp-2) var(--sp-3);
  border-radius: var(--r-sm);
  color: var(--body);
  font-weight: 600;
  font-size: var(--text-sm);
  text-decoration: none;
}
.side-nav a:hover { background: var(--blue-50); color: var(--blue-700); }

/* ---- Topic cards (service blocks with accent borders + anchor ids) ---- */
.topic-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(14rem, 100%), 1fr));
  gap: var(--sp-5);
}
.topic-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-top: 4px solid var(--blue-500);
  border-radius: var(--r-md);
  padding: var(--sp-5);
  box-shadow: var(--shadow-sm);
}
.topic-grid > :nth-child(3n+2) { border-top-color: var(--amber-500); }
.topic-grid > :nth-child(3n) { border-top-color: var(--blue-800); }
.topic-card h3 { font-size: var(--text-lg); margin-bottom: var(--sp-2); scroll-margin-top: calc(var(--header-h) + 1.5rem); }
.topic-card p { font-size: var(--text-sm); margin-bottom: 0; }
.topic-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: var(--r-md);
  background: var(--blue-50);
  color: var(--blue-600);
  margin-bottom: var(--sp-3);
}
.topic-icon .icon { width: 1.3rem; height: 1.3rem; }

/* ---- Pull quote ---- */
.pull-quote {
  border-left: 4px solid var(--amber-500);
  background: var(--blue-50);
  border-radius: 0 var(--r-md) var(--r-md) 0;
  padding: var(--sp-5) var(--sp-6);
  margin: var(--sp-6) 0;
}
.pull-quote p {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--text-xl);
  line-height: 1.4;
  color: var(--blue-800);
  margin: 0;
}

/* ---- Contact info cards ---- */
.info-card {
  display: flex;
  gap: var(--sp-4);
  align-items: flex-start;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
  padding: var(--sp-5);
}
.info-card + .info-card { margin-top: var(--sp-4); }
.info-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;                      /* px: badge is chrome, must not text-scale */
  height: 44px;
  border-radius: var(--r-full);
  background: var(--blue-50);
  color: var(--blue-600);
  flex-shrink: 0;
}
.info-icon .icon { width: 1.2rem; height: 1.2rem; }
/* text column of the card — min-width:0 lets a long address wrap rather than
   forcing the card wider than the viewport (some cards hold a bare <p>) */
.info-card > * { min-width: 0; }
.info-card h3 { font-size: var(--text-base); margin-bottom: var(--sp-1); }
.info-card p { margin: 0; font-weight: 600; }

/* ---- Prose page (privacy policy) ---- */
.prose { max-width: 70ch; margin-inline: auto; }
.prose h1 { font-size: var(--text-3xl); }
.prose h2 { font-size: var(--text-2xl); margin-top: var(--sp-7); }
.prose ul { display: grid; gap: var(--sp-2); }
.prose a { color: var(--blue-700); }
.effective-date {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--muted);
  margin-bottom: var(--sp-6);
}

/* ---- Error page (404) ---- */
.error-band { text-align: center; padding-block: clamp(5rem, 4rem + 6vw, 9rem); }
.error-band .kicker { color: var(--amber-700); }
.error-band h1 { font-size: var(--text-3xl); }
.error-band p { margin-inline: auto; margin-bottom: var(--sp-6); }
