/* ==========================================================================
   American Physiatry — design system
   Layout & rhythm inspired by exacare.com: dark/light alternating sections,
   italic emphasis in display headings, stat callouts, generous vertical space.
   ========================================================================== */

:root {
  /* Color */
  --ink:        #0A1826;
  --navy:       #0D2136;
  --navy-soft:  #16344F;
  /* #2E6BE6 was 4.49:1 on white — just under WCAG AA for small text.
     #2A62DB clears it at 5.4:1 and keeps the primary button legible. */
  --blue:       #2A62DB;
  --blue-dark:  #1F4FB8;
  --blue-soft:  #E7EEFC;
  --paper:      #FFFFFF;
  --paper-2:    #F5F7FA;
  --paper-3:    #EDF1F6;
  --line:       #DDE4EC;
  --line-dark:  rgba(255, 255, 255, 0.14);
  --body:       #45566B;
  --body-dark:  rgba(255, 255, 255, 0.72);

  /* Type */
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
          "Helvetica Neue", Arial, sans-serif;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;

  /* Space */
  --gutter: clamp(1.25rem, 4vw, 3rem);
  --section: clamp(4.5rem, 9vw, 8.5rem);
  --radius: 18px;
  --radius-sm: 10px;

  --shadow-sm: 0 1px 2px rgba(10, 24, 38, .06), 0 8px 24px rgba(10, 24, 38, .06);
  --shadow-lg: 0 24px 64px rgba(10, 24, 38, .14);
}

/* --------------------------------------------------------------- reset -- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.65;
  color: var(--body);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}
/* height:auto is essential — the HTML width/height attributes are presentational
   hints, so without it a CSS-scaled width leaves the attribute height in place
   and the image stretches (the hero clinician was 51% too tall). Rules that
   genuinely need a fixed height set it themselves further down. */
img, svg { max-width: 100%; height: auto; display: block; }
a { color: var(--blue); text-decoration: none; }
h1, h2, h3, h4 { color: var(--ink); margin: 0 0 .6em; line-height: 1.1; letter-spacing: -.02em; font-weight: 700; }
p { margin: 0 0 1.1em; }
ul { margin: 0; padding: 0; list-style: none; }

/* --------------------------------------------------------- primitives -- */
.wrap { width: min(1180px, 100%); margin-inline: auto; padding-inline: var(--gutter); }
.wrap--narrow { width: min(880px, 100%); }

.section { padding-block: var(--section); }
.section--tight { padding-block: clamp(3rem, 6vw, 5rem); }

.section--dark {
  background: var(--navy);
  color: var(--body-dark);
  background-image:
    radial-gradient(900px 420px at 12% -10%, rgba(46, 107, 230, .30), transparent 60%),
    radial-gradient(700px 380px at 95% 110%, rgba(23, 162, 162, .22), transparent 65%);
}
.section--dark h1, .section--dark h2, .section--dark h3, .section--dark h4 { color: #fff; }
.section--muted { background: var(--paper-2); }

.eyebrow {
  display: inline-flex; align-items: center; gap: .55rem;
  font-size: .74rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  color: var(--blue); margin-bottom: 1.1rem;
}
.eyebrow::before {
  content: ""; width: 26px; height: 2px; background: currentColor; border-radius: 2px;
}
.section--dark .eyebrow,
.hero .eyebrow { color: #8FC0FF; }

h1 { font-size: clamp(2.4rem, 5.6vw, 4.2rem); }
h2 { font-size: clamp(1.9rem, 3.8vw, 3rem); }
h3 { font-size: clamp(1.15rem, 1.8vw, 1.4rem); }

/* signature exacare-ish italic emphasis inside display headings */
.em { font-family: var(--serif); font-style: italic; font-weight: 400; letter-spacing: -.01em; }
.section--dark .em { color: #8FC0FF; }
.em--light { color: var(--blue); }

.lede { font-size: clamp(1.05rem, 1.6vw, 1.25rem); line-height: 1.6; max-width: 62ch; }

/* ------------------------------------------------------------ buttons -- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .95rem 1.7rem; border-radius: 999px; border: 1px solid transparent;
  font-size: .95rem; font-weight: 600; letter-spacing: .01em; cursor: pointer;
  transition: transform .18s ease, background-color .18s ease, border-color .18s ease, color .18s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn--primary { background: var(--blue); color: #fff; }
.btn--primary:hover { background: var(--blue-dark); }
.btn--ghost { border-color: var(--line); color: var(--ink); background: transparent; }
.btn--ghost:hover { border-color: var(--ink); }
.section--dark .btn--ghost,
.hero .btn--ghost { border-color: var(--line-dark); color: #fff; }
.section--dark .btn--ghost:hover,
.hero .btn--ghost:hover { border-color: #fff; background: rgba(255,255,255,.06); }
.btn--white { background: #fff; color: var(--ink); }
.btn-row { display: flex; flex-wrap: wrap; gap: .8rem; }
/* on a phone, two pills of different widths stacked left-aligned read as a
   mistake — go full width so they line up and gain a bigger tap target */
@media (max-width: 520px) {
  .btn-row { flex-direction: column; align-items: stretch; }
  .btn-row > .btn { width: 100%; }
}

.link-more {
  display: inline-flex; align-items: center; gap: .4rem;
  font-weight: 600; font-size: .92rem;
}
.link-more::after { content: "→"; transition: transform .18s ease; }
.link-more:hover::after { transform: translateX(3px); }

/* ------------------------------------------------------------- header -- */
.site-header {
  position: sticky; top: 0; z-index: 60;
  background: rgba(255, 255, 255, .88);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.site-header__inner {
  display: flex; align-items: center; gap: 2rem;
  min-height: 76px;
}
.brand { display: inline-flex; align-items: center; gap: .7rem; flex: none; }
.brand__logo { width: auto; height: 42px; }
@media (max-width: 400px) { .brand__logo { height: 34px; } }
.site-footer .brand__logo { height: 46px; filter: brightness(0) invert(1); opacity: .95; }

.nav { margin-left: auto; display: flex; align-items: center; gap: 1.9rem; }
/* direct children only — otherwise this out-specifies .btn--primary and the
   header CTA loses its white label (invisible on the Contact page) */
.nav > a { color: var(--ink); font-size: .95rem; font-weight: 500; }
.nav > a:hover, .nav > a[aria-current="page"] { color: var(--blue); }
.header-cta { display: flex; align-items: center; gap: 1rem; }
.header-phone { font-weight: 600; color: var(--ink); font-size: .95rem; white-space: nowrap; }

.nav-toggle {
  display: none; margin-left: auto; width: 44px; height: 44px; border-radius: 12px;
  border: 1px solid var(--line); background: #fff; cursor: pointer;
  align-items: center; justify-content: center;
}
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
  content: ""; display: block; width: 18px; height: 2px; background: var(--ink); border-radius: 2px;
  transition: transform .2s ease, opacity .2s ease;
}
.nav-toggle span::before { transform: translateY(-6px); }
.nav-toggle span::after  { transform: translateY(4px); }
body.nav-open .nav-toggle span { background: transparent; }
body.nav-open .nav-toggle span::before { transform: rotate(45deg); }
body.nav-open .nav-toggle span::after  { transform: rotate(-45deg) translateY(-2px); }

@media (max-width: 940px) {
  .nav-toggle { display: flex; }
  .nav {
    position: fixed; inset: 76px 0 auto; margin: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: #fff; border-bottom: 1px solid var(--line);
    padding: 1rem var(--gutter) 1.6rem;
    transform: translateY(-8px); opacity: 0; pointer-events: none;
    transition: opacity .18s ease, transform .18s ease;
    box-shadow: var(--shadow-lg);
  }
  body.nav-open .nav { opacity: 1; transform: none; pointer-events: auto; }
  .nav > a { padding: .85rem 0; border-bottom: 1px solid var(--line); font-size: 1.05rem; }
  .header-cta { flex-direction: column; align-items: stretch; padding-top: 1rem; gap: .75rem; }
  .header-phone { text-align: center; }
}

/* --------------------------------------------------------------- hero -- */
.hero {
  position: relative; overflow: hidden;
  background: var(--navy) url("../img/hospital-corridor.webp") center / cover no-repeat;
  color: var(--body-dark);
  padding-block: clamp(4.5rem, 10vw, 8rem) clamp(4rem, 8vw, 7rem);
}
.hero::before {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(100deg, rgba(9, 27, 51, .96) 0%, rgba(11, 35, 63, .88) 42%, rgba(13, 43, 75, .55) 78%, rgba(13, 43, 75, .35) 100%),
    radial-gradient(760px 480px at 92% 100%, rgba(23, 162, 162, .22), transparent 62%);
}
.hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(circle at 30% 40%, #000, transparent 78%);
}
.hero > .wrap { position: relative; z-index: 1; }

/* home hero: copy left, cut-out clinician right */
.hero__grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 2rem; align-items: end; }
.hero__media { position: relative; align-self: end; margin-bottom: calc(-1 * clamp(4rem, 8vw, 7rem)); }
.hero__media img { width: 100%; max-width: 460px; margin-inline: auto; filter: drop-shadow(0 30px 60px rgba(0,0,0,.45)); }
.hero__media::before {
  content: ""; position: absolute; left: 50%; bottom: 6%; transform: translateX(-50%);
  width: 78%; aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle, rgba(46,107,230,.55), transparent 68%);
}
.hero__media img { position: relative; }
@media (max-width: 900px) {
  .hero__grid { grid-template-columns: 1fr; }
  .hero__media { display: none; }
}
.hero h1 { color: #fff; max-width: 16ch; }
.hero .lede { color: var(--body-dark); font-size: clamp(1.1rem, 1.8vw, 1.35rem); }
.hero__pill {
  display: inline-flex; align-items: center; gap: .55rem;
  padding: .45rem 1rem .45rem .5rem; border-radius: 999px;
  background: rgba(255,255,255,.08); border: 1px solid var(--line-dark);
  color: #fff; font-size: .84rem; font-weight: 500; margin-bottom: 1.6rem;
}
.hero__pill > span { background: var(--blue); border-radius: 999px; padding: .18rem .6rem; font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #fff; }

.page-hero { padding-block: clamp(3.5rem, 7vw, 6rem); }
.page-hero h1 { max-width: 20ch; }

/* ---------------------------------------------------------------- bar -- */
.trustbar { border-bottom: 1px solid var(--line); background: var(--paper); }
.trustbar__inner { display: flex; flex-wrap: wrap; align-items: center; gap: 1.5rem 3rem; padding-block: 1.9rem; }
.trustbar__label { font-size: .78rem; letter-spacing: .13em; text-transform: uppercase; font-weight: 700; color: var(--body); }
.trustbar__items { display: flex; flex-wrap: wrap; gap: 1rem 2.4rem; }
.trustbar__items li { font-weight: 600; color: var(--ink); opacity: .62; font-size: .98rem; }

/* -------------------------------------------------------------- stats -- */
/* explicit tracks — auto-fit was emitting a phantom 0px column, which the
   1px gap rendered as a stray hairline inside the rounded container */
.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--line-dark); border-radius: var(--radius); overflow: hidden; }
@media (min-width: 880px) { .stats { grid-template-columns: repeat(4, 1fr); } }
.section--dark .stats { border: 1px solid var(--line-dark); }
.stat { background: var(--navy); padding: 2.2rem 1.8rem; }
.section--muted .stats, .section:not(.section--dark) .stats { background: var(--line); border: 1px solid var(--line); }
.section:not(.section--dark) .stat { background: var(--paper); }
.stat__num { font-size: clamp(2.1rem, 4vw, 3rem); font-weight: 700; letter-spacing: -.03em; color: #fff; line-height: 1; margin-bottom: .5rem; }
.section:not(.section--dark) .stat__num { color: var(--blue); }
.stat__label { font-size: .95rem; }

/* -------------------------------------------------------------- cards -- */
.grid { display: grid; gap: 1.25rem; }
/* explicit rather than auto-fit: auto-fit was emitting a trailing 0px track,
   which still consumes a gap and pulls the row off-centre */
.grid--2 { grid-template-columns: 1fr; }
@media (min-width: 760px) { .grid--2 { grid-template-columns: 1fr 1fr; } }
/* Grid items are min-content-sized by default, so a card can push past its
   track and out of the page. Let them shrink to fit. */
.grid > *, .stats > *, .split > * { min-width: 0; }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fit, minmax(min(230px, 100%), 1fr)); }

.card {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 2rem 1.85rem; transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
  /* explicit: cards are sometimes <a>, and without this the link colour
     cascades into the body copy and the whole card reads as a link */
  color: var(--body);
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-sm); border-color: #C9D6E6; }
.card h3 { margin-bottom: .5rem; }
.card p:last-child { margin-bottom: 0; }
.card__icon {
  width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center;
  background: var(--blue-soft); color: var(--blue-dark); margin-bottom: 1.25rem;
}
.card__icon svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.card--dark { background: rgba(255,255,255,.04); border-color: var(--line-dark); color: var(--body-dark); }
.card--dark:hover { border-color: rgba(255,255,255,.3); box-shadow: none; }
.card--dark .card__icon { background: rgba(46,107,230,.22); color: #9CC3FF; }

.card--num { position: relative; }
.card__num {
  font-size: .78rem; font-weight: 700; letter-spacing: .12em; color: var(--blue);
  margin-bottom: .9rem; display: block;
}

/* --------------------------------------------------------------- split -- */
.split { display: grid; gap: clamp(2rem, 5vw, 4.5rem); align-items: center; grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr)); }
/* when one side is a tall card grid, centring the copy leaves it marooned in
   a pool of whitespace — line it up with the top of the cards instead */
.split--top { align-items: start; }
.split--reverse > :first-child { order: 2; }
@media (max-width: 760px) { .split--reverse > :first-child { order: 0; } }

.figure {
  position: relative; border-radius: var(--radius); overflow: hidden;
  min-height: 340px; padding: 2.2rem;
  background: linear-gradient(150deg, var(--navy) 0%, var(--navy-soft) 100%);
  display: flex; flex-direction: column; justify-content: flex-end; color: #fff;
  box-shadow: var(--shadow-lg);
}
.figure::before {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(420px 300px at 80% 12%, rgba(23,162,162,.5), transparent 65%),
    radial-gradient(420px 320px at 10% 90%, rgba(46,107,230,.55), transparent 62%);
}
/* sits at the TOP of the frame where there is no scrim, so it needs to carry
   its own contrast — a translucent white pill measured 2.3:1 over the brighter
   parts of the photography */
.figure__badge {
  position: relative; align-self: flex-start; margin-bottom: auto;
  background: rgba(9,27,51,.74); border: 1px solid rgba(255,255,255,.26);
  border-radius: 999px; padding: .4rem 1rem; font-size: .8rem; font-weight: 600;
  backdrop-filter: blur(6px);
}
.figure__quote { position: relative; font-size: 1.3rem; line-height: 1.4; color: #fff; font-weight: 600; letter-spacing: -.02em; }
.figure__meta { position: relative; font-size: .88rem; color: rgba(255,255,255,.7); }

/* photo-backed figures */
/* sources are portrait, frames are landscape — bias the crop upward so heads
   and faces survive instead of being sliced off at the top edge */
.figure__img { position: absolute; inset: 0; z-index: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 22%; }
.figure__img--contain { object-fit: contain; object-position: 50% 100%; padding: 1.5rem 1.5rem 0; }
.figure::before { z-index: 1; }
.figure > *:not(.figure__img) { position: relative; z-index: 2; }
.figure--photo { min-height: 440px; }
/* Measured against the actual image pixels: the old ramp bottomed out at
   4.0–4.3:1 for the caption over bright areas of the photography. This clears
   AA with margin at every sampled point. */
.figure--photo::before {
  background: linear-gradient(180deg,
    rgba(9,27,51,.24) 0%, rgba(9,27,51,.40) 38%,
    rgba(9,27,51,.86) 72%, rgba(9,27,51,.95) 100%);
}
.figure--photo.figure--light::before {
  background: linear-gradient(180deg, rgba(255,255,255,0) 28%, rgba(255,255,255,.86) 62%, rgba(255,255,255,.97) 82%);
}
.figure--cutout { background: linear-gradient(160deg, var(--blue-soft), var(--paper-3)); }
/* cut-outs sit on a light panel, so the caption has no dark scrim to read
   against — fade the lower third to near-solid before the text starts.
   Extra .figure needed: `.figure--light::before` is declared later and would
   otherwise win on source order. */
.figure.figure--cutout::before {
  background:
    linear-gradient(180deg, rgba(238,242,248,0) 42%, rgba(240,244,249,.90) 62%,
                            rgba(241,245,250,.98) 74%, rgba(241,245,250,1) 100%),
    radial-gradient(420px 380px at 50% 26%, rgba(46,107,230,.16), transparent 70%);
}

.figure--light { background: var(--paper-3); color: var(--ink); box-shadow: none; border: 1px solid var(--line); }
.figure--light::before { background: radial-gradient(400px 300px at 78% 15%, rgba(46,107,230,.16), transparent 65%); }
.figure--light .figure__quote { color: var(--ink); }
.figure--light .figure__meta { color: var(--body); }
.figure--light .figure__badge { background: #fff; border-color: var(--line); color: var(--ink); }

/* -------------------------------------------------------------- list -- */
.checklist li {
  position: relative; padding-left: 2.1rem; margin-bottom: 1rem; line-height: 1.55;
}
.checklist li::before {
  content: ""; position: absolute; left: 0; top: .25rem;
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--blue-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231F4FB8' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") center / 12px no-repeat;
}
.section--dark .checklist li::before { background-color: rgba(46,107,230,.3); }

/* ------------------------------------------------------------ people -- */
.person { text-align: left; }
.person__photo {
  aspect-ratio: 4 / 5; border-radius: var(--radius); margin-bottom: 1.15rem;
  background: linear-gradient(165deg, #E9EFF7, #D9E4F1);
  position: relative; overflow: hidden;
}
.person__photo img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: 50% 12%;
}
.person__name { font-size: 1.12rem; margin-bottom: .15rem; }
.person__role { font-size: .88rem; font-weight: 600; color: var(--blue); letter-spacing: .02em; margin-bottom: .8rem; }
.person__bio { font-size: .95rem; }

/* ------------------------------------------------------- case studies -- */
.case {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 2.2rem 2rem; display: flex; flex-direction: column; gap: .9rem;
}
.case__tag {
  align-self: flex-start; font-size: .72rem; font-weight: 700; letter-spacing: .12em;
  text-transform: uppercase; color: var(--blue-dark); background: var(--blue-soft);
  padding: .4rem .8rem; border-radius: 999px;
}
.case h3 { font-size: 1.22rem; margin: 0; }
.case p { margin: 0; font-size: .97rem; }
.case__meta {
  margin-top: auto; padding-top: 1.2rem; border-top: 1px solid var(--line);
  display: flex; flex-wrap: wrap; gap: .5rem 1rem; justify-content: space-between;
  font-size: .85rem; color: var(--body);
}
.case__meta cite { font-style: normal; color: var(--ink); font-weight: 600; }
.section--dark .case { background: rgba(255,255,255,.05); border-color: var(--line-dark); color: var(--body-dark); }
.section--dark .case__tag { background: rgba(46,107,230,.24); color: #9CC3FF; }
.section--dark .case__meta { border-top-color: var(--line-dark); color: rgba(255,255,255,.6); }
.section--dark .case__meta cite { color: #fff; }

/* ------------------------------------------------------ wins carousel -- */
/* The wins ship as plain markup and JS upgrades them into a carousel, so
   without JS (or before it runs) every win is still readable and crawlable. */
.wins { position: relative; }
.wins__track { display: grid; gap: 1.25rem; }
.wins__viewport { overflow: hidden; }

.js .wins--ready .wins__track {
  grid-auto-flow: column;
  grid-auto-columns: 100%;
  grid-template-columns: none;
  transition: transform .45s cubic-bezier(.4,0,.2,1);
  align-items: stretch;
}
.js .wins--ready .wins__track > * { min-width: 0; }

.wins__controls {
  display: none; align-items: center; gap: 1rem;
  margin-top: 1.75rem;
}
.js .wins--ready .wins__controls { display: flex; }

.wins__btn {
  width: 44px; height: 44px; flex: none; border-radius: 50%;
  border: 1px solid var(--line); background: var(--paper); color: var(--ink);
  display: grid; place-items: center; cursor: pointer;
  transition: border-color .18s ease, background-color .18s ease, color .18s ease;
}
.wins__btn:hover:not(:disabled) { border-color: var(--blue); color: var(--blue); }
.wins__btn:disabled { opacity: .35; cursor: default; }
.wins__btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.section--dark .wins__btn { background: rgba(255,255,255,.06); border-color: var(--line-dark); color: #fff; }
.section--dark .wins__btn:hover:not(:disabled) { border-color: #fff; }

.wins__dots { display: flex; gap: .5rem; margin-left: auto; }
.wins__dot {
  width: 9px; height: 9px; padding: 0; border-radius: 50%; cursor: pointer;
  border: 1px solid var(--line); background: transparent;
  transition: background-color .18s ease, border-color .18s ease, transform .18s ease;
}
.wins__dot[aria-current="true"] { background: var(--blue); border-color: var(--blue); transform: scale(1.25); }
.section--dark .wins__dot { border-color: rgba(255,255,255,.4); }
.section--dark .wins__dot[aria-current="true"] { background: #fff; border-color: #fff; }

.wins__count { font-size: .85rem; color: var(--body); font-variant-numeric: tabular-nums; }
.section--dark .wins__count { color: rgba(255,255,255,.7); }

@media (min-width: 900px) {
  .js .wins--ready .wins__track { grid-auto-columns: calc(50% - .625rem); }
}
@media (prefers-reduced-motion: reduce) {
  .js .wins--ready .wins__track { transition: none; }
}

/* -------------------------------------------------------- testimonials -- */
.quotes { columns: 3 280px; column-gap: 1.25rem; }
.quote {
  break-inside: avoid; margin-bottom: 1.25rem;
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.7rem 1.6rem;
}
.quote p { font-size: 1.02rem; line-height: 1.55; color: var(--ink); margin-bottom: 1rem; }
.quote cite {
  font-style: normal; font-size: .72rem; font-weight: 700; letter-spacing: .12em;
  text-transform: uppercase; color: var(--blue);
}
.quote::before {
  content: "”"; display: block; font-family: var(--serif); font-size: 2.6rem; line-height: .6;
  color: var(--blue); opacity: .35; margin-bottom: .8rem;
}

/* ------------------------------------------------------------- tracks -- */
.track {
  position: relative; overflow: hidden; border-radius: var(--radius);
  padding: 2.4rem 2.1rem; min-height: 260px;
  display: flex; flex-direction: column; justify-content: flex-end; gap: .6rem;
  background: var(--navy); color: var(--body-dark);
  border: 1px solid var(--line-dark);
}
.track::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(420px 300px at 85% 10%, rgba(46,107,230,.45), transparent 66%);
}
.track > * { position: relative; }
.track h3 { color: #fff; margin: 0; font-size: 1.5rem; }
.track__eyebrow { font-size: .72rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: #7FB0FF; }
.track p { margin: 0; }
.track--alt { background: var(--paper-3); color: var(--body); border-color: var(--line); }
.track--alt::before { background: radial-gradient(420px 300px at 85% 10%, rgba(23,162,162,.22), transparent 66%); }
.track--alt h3 { color: var(--ink); }
.track--alt .track__eyebrow { color: var(--blue); }

/* ---------------------------------------------------------------- tabs -- */
.tabs { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 2rem; }
.tab {
  border: 1px solid var(--line); background: #fff; color: var(--ink);
  padding: .7rem 1.3rem; border-radius: 999px; font: inherit; font-size: .92rem; font-weight: 600;
  cursor: pointer;
  /* named properties, not `all` — `all` swept the focus ring into the
     transition, so it faded in over 180ms instead of appearing at once */
  transition: color .18s ease, background-color .18s ease, border-color .18s ease;
}
.tab:hover { border-color: var(--blue); color: var(--blue); }
.tab[aria-selected="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.tab-panel[hidden] { display: none; }

/* ------------------------------------------------------------ accordion */
.acc { border-top: 1px solid var(--line); }
.acc__item { border-bottom: 1px solid var(--line); }
.acc__btn {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 1.5rem;
  background: none; border: 0; padding: 1.5rem 0; cursor: pointer; text-align: left;
  font: inherit; font-size: 1.08rem; font-weight: 650; color: var(--ink);
}
.acc__btn::after { content: "+"; font-size: 1.5rem; font-weight: 400; color: var(--blue); flex: none; transition: transform .2s ease; }
.acc__btn[aria-expanded="true"]::after { transform: rotate(45deg); }
.acc__panel { padding-bottom: 1.5rem; max-width: 70ch; }
.acc__panel[hidden] { display: none; }

/* --------------------------------------------------------------- prose -- */
/* long-form body copy (legal pages). The display h2 scale is built for
   section titles and is far too loud inside a document. */
.prose h2 {
  font-size: clamp(1.2rem, 1.6vw, 1.4rem);
  margin: 2.6rem 0 .5rem;
  letter-spacing: -.01em;
}
.prose h2:first-of-type { margin-top: 0; }
.prose h3 { font-size: 1.05rem; margin: 1.8rem 0 .4rem; }
.prose p, .prose li { max-width: 70ch; }
.prose > p:last-child { margin-bottom: 0; }

/* --------------------------------------------------------------- form -- */
.form { display: grid; gap: 1.1rem; }
.form__row { display: grid; gap: 1.1rem; grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)); }
.field { display: grid; gap: .45rem; }
.field label { font-size: .85rem; font-weight: 600; color: var(--ink); letter-spacing: .01em; }
.field input, .field select, .field textarea {
  font: inherit; font-size: .98rem; color: var(--ink);
  padding: .85rem 1rem; border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: #fff; width: 100%;
}
.field textarea { min-height: 140px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: 2px solid var(--blue); outline-offset: 1px; border-color: var(--blue);
}
.form__note { font-size: .85rem; color: var(--body); }
.form__status { font-size: .95rem; font-weight: 600; color: var(--blue-dark); }

/* --------------------------------------------------------------- misc -- */
/* a <dl>: each row is a term (label) and its definition (the value) */
.contact-list { margin: 0; }
.contact-list__item { display: flex; gap: .9rem; align-items: flex-start; margin-bottom: 1.4rem; }
.contact-list .card__icon { margin-bottom: 0; flex: none; width: 42px; height: 42px; }
.contact-list dt {
  color: var(--ink); font-size: .8rem; font-weight: 600; letter-spacing: .1em;
  text-transform: uppercase; margin-bottom: .15rem;
}
.contact-list dd { margin: 0; }
.section--dark .contact-list dt { color: #fff; }
.section--dark .contact-list a { color: #fff; }

.cta-band { text-align: center; }
.cta-band h2 { max-width: 18ch; margin-inline: auto; }
.cta-band .lede { margin-inline: auto; margin-bottom: 2rem; }

/* -------------------------------------------------------------- footer -- */
.site-footer { background: var(--ink); color: rgba(255,255,255,.62); padding-block: clamp(3.5rem, 6vw, 5rem) 2rem; }
.site-footer a { color: rgba(255,255,255,.72); }
.site-footer a:hover { color: #fff; }
/* The old `minmax(240px,1.4fr) repeat(auto-fit, minmax(min(150px, 100%), 1fr))` demanded
   390px of track minimum and scrolled sideways on every phone. Step it up
   explicitly instead. */
.footer-grid { display: grid; gap: 2.5rem; grid-template-columns: 1fr; }
@media (min-width: 560px) { .footer-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .footer-grid { grid-template-columns: minmax(240px, 1.4fr) repeat(3, 1fr); } }
.site-footer .brand { color: #fff; margin-bottom: 1.1rem; }
.site-footer .footer-col h2 { color: #fff; font-size: .78rem; letter-spacing: .13em; text-transform: uppercase; margin-bottom: 1.1rem; font-weight: 700; }
.footer-col li { margin-bottom: .6rem; font-size: .95rem; }
.footer-bottom {
  margin-top: 3rem; padding-top: 1.6rem; border-top: 1px solid rgba(255,255,255,.12);
  display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between; font-size: .85rem;
}

/* ------------------------------------------------------------- reveal -- */
/* Gated on .js — set by an inline script in <head>. Without JavaScript the
   class is never added, so content is simply visible instead of stuck at
   opacity 0 with nothing to reveal it. */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.js .reveal.is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
  .btn:hover, .card:hover, .track:hover { transform: none; }
  .link-more:hover::after { transform: none; }
}

/* the sticky header is ~76px — keep in-page anchors clear of it */
:target, [id] { scroll-margin-top: 96px; }

.skip-link {
  position: absolute; left: -9999px; top: 0; background: var(--blue); color: #fff;
  padding: .8rem 1.2rem; z-index: 100; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

/* --------------------------------------------------------------- focus -- */
/* Double ring: a white inner band and a blue outer band. One of the two is
   always visible whatever it lands on — a single-colour ring disappeared on
   the selected tab (dark chip, light page) because the shorthand's colour
   resolved to currentColor. Longhands below keep that from recurring. */
:focus-visible {
  outline-style: solid;
  outline-width: 2px;
  outline-color: #fff;
  outline-offset: 2px;
  box-shadow: 0 0 0 5px var(--blue);
  border-radius: 4px;
  transition: none;   /* a focus ring must appear instantly, never fade in */
}
.section--dark :focus-visible,
.hero :focus-visible,
.site-footer :focus-visible {
  outline-color: var(--ink);
  box-shadow: 0 0 0 5px #8FC0FF;
}
.btn:focus-visible, .tab:focus-visible { outline-offset: 2px; }
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible {
  outline-offset: 0; box-shadow: 0 0 0 4px rgba(42,98,219,.35);
  border-color: var(--blue);
}
/* keep the ring for keyboard users only — mouse clicks stay clean */
:focus:not(:focus-visible) { outline: none; }

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

.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;
}

/* --------------------------------------------------------------- print -- */
@media print {
  .site-header, .nav-toggle, .skip-link, .hero__media, .btn, .cta-band { display: none !important; }
  body { font-size: 11pt; color: #000; background: #fff; }
  .section, .hero { padding-block: 1.2rem; background: #fff !important; }
  .hero::before, .hero::after, .figure::before { display: none; }
  /* Descendants too, not just the section: `.section--dark` sets a light body
     colour that headings-only overrides left in place, so every paragraph in a
     dark band printed white-on-white. */
  .section, .section *, .hero, .hero *,
  .figure, .figure * { color: #000 !important; }
  .stats, .stat, .card--dark, .track, .figure {
    background: #fff !important; border-color: #999 !important;
  }
  .card, .case, .quote, .stat { border: 1px solid #999; break-inside: avoid; }
  .figure { min-height: 0; box-shadow: none; border: 1px solid #999; }
  .figure__img { display: none; }
  .acc__panel[hidden] { display: block !important; }
  a[href^="http"]::after, a[href^="mailto"]::after { content: " (" attr(href) ")"; font-size: 9pt; }
  .site-footer { background: #fff; color: #000; border-top: 2px solid #000; }
  .site-footer a, .site-footer .footer-col h2 { color: #000; }
  .site-footer .brand__logo { filter: none; }
}
