/* ============================================================
   3D ORTHOTICS: Global Styles
   Colors: White primary, dark blue #00549d ("3D") + light blue #00aec7 ("ORTHOTICS") from logo
   Typography: Light-weight headings (250), extra-tight tracking (zetta-joule style)
   ============================================================ */

/* Screen-reader-only utility: visually hidden, available to AT + SEO */
.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Skip-to-content link — Section 508 / WCAG 2.4.1 requirement. Visually
   hidden by default; becomes visible when focused via keyboard so users
   bypassing the nav can jump straight to the page's main content. */
.skip-to-content {
  position: absolute;
  top: 0; left: 0;
  z-index: 9999;
  padding: .85rem 1.5rem;
  background: var(--navy);
  color: var(--white);
  font-family: var(--font-body);
  font-size: .85rem;
  font-weight: 600;
  letter-spacing: .04em;
  text-decoration: none;
  border-radius: 0 0 6px 0;
  transform: translateY(-110%);
  transition: transform .2s var(--ease-out-quint);
}
.skip-to-content:focus,
.skip-to-content:focus-visible {
  transform: translateY(0);
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
}

/* ── Self-hosted fonts ─────────────────────────────────────
   Inter variable font, roman + italic, self-hosted to eliminate the
   Google Fonts supply-chain dependency (no third-party CDN can inject
   malicious CSS via @font-face if the font is served from our origin). */
@font-face {
  font-family: 'Inter';
  src: url('../Inter/InterVariable.woff2') format('woff2-variations');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Inter';
  src: url('../Inter/InterVariable-Italic.woff2') format('woff2-variations');
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: 'Ethnocentric';
  /* Single WOFF2 (20KB) instead of shipping both .ttf (63KB) + .otf (49KB).
     WOFF2 is supported by every browser this site targets (Safari 12+,
     Chrome/Edge/FF all modern). The .ttf/.otf are kept on disk as the
     master source but no longer served. */
  src: url('../Ethnocentric/ethnocentric.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* ── Design Tokens ───────────────────────────────────────── */
:root {
  /* Colors from logo: white ground, dark blue "3D" (#00549d), light blue "ORTHOTICS" (#00aec7) */
  --bg:          #ffffff;
  --surface:     #f8f9fc;
  --surface-2:   #eff2f7;
  --navy:        #00549d;
  --navy-mid:    #0068bb;
  --cyan:        #00aec7;
  --cyan-dim:    #0090a8;
  --cyan-light:  #e8f7fa;
  --accent:      #00aec7;
  --text:        #121820;
  --text-mid:    #3a4a5c;
  /* text-dim darkened slightly from #6b7d92 (4.22:1 against white, failing
     WCAG AA) to #5a6b80 (5.46:1, passing AA for normal text). Visually
     nearly identical — slight darkening of muted captions. */
  --text-dim:    #5a6b80;
  --text-faint:  rgba(33, 34, 38, 0.08);
  --white:       #ffffff;

  /* Typography */
  --font-display: 'Ethnocentric', 'Inter', sans-serif;
  --font-body:    'Inter', sans-serif;

  /* Easing: antigravity-style smooth curves */
  --ease-out-expo:  cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out-quint: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out:    cubic-bezier(0.76, 0, 0.24, 1);

  /* Layout */
  --nav-h: 64px;
  --page-margin: clamp(1.5rem, 4vw, 4.5rem);
  --section-gap: clamp(6rem, 10vw, 10rem);

  /* Fluid type: bigger, bolder, tighter like antigravity */
  --fs-display:  clamp(3.2rem, 6.5vw, 6.5rem);
  --fs-h1:       clamp(2.6rem, 5vw, 5rem);
  --fs-h2:       clamp(2rem, 3.8vw, 3.5rem);
  --fs-h3:       clamp(1.3rem, 1.8vw, 1.6rem);
  --fs-label:    .72rem;
  --fs-body:     clamp(.95rem, 1vw, 1.1rem);

  --fw-display: 400;
  --fw-heading: 400;

  /* Letter spacing: tight for headings (antigravity uses -2px on hero) */
  --ls-tight:   -.035em;
  --ls-normal:  -.01em;
  --ls-label:    .14em;
}

/* ── Reset ───────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: 1.7;
  overflow-x: hidden;
  cursor: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overscroll-behavior: none;
  font-optical-sizing: auto;
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { cursor: none; background: none; border: none; font: inherit; color: inherit; }

/* Selection */
::selection { background: var(--cyan-light); color: var(--navy); }

/* ── Keyboard focus ──────────────────────────────────────────
   The custom cursor hides the default mouse cursor (body { cursor: none }),
   so keyboard users are our primary audience for focus styling. WCAG 2.4.7
   requires a visible focus indicator on every interactive element — before
   this rule we only styled focus on form inputs. The cyan ring matches our
   brand accent; the 3px offset keeps it legible against dark backgrounds
   (nav CTA pill, section--dark buttons, modal dismiss). */
:focus { outline: none; }
:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
  border-radius: 4px;
}
.nav__cta:focus-visible,
.btn:focus-visible {
  outline-offset: 4px;
}
/* On dark sections the cyan still reads, but we add a white inner halo so
   the ring doesn't blend with navy backgrounds. */
.section--dark :focus-visible {
  box-shadow: 0 0 0 4px rgba(255,255,255,0.35);
}

/* ── Particle background canvas ──────────────────────────── */
#particles-bg {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

/* ── Custom cursor ───────────────────────────────────────── */
.cursor {
  position: fixed;
  top: 0; left: 0;
  pointer-events: none;
  z-index: 10000;
}
.cursor__dot {
  width: 7px; height: 7px;
  background: var(--cyan);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width .2s, height .2s;
  position: absolute;
}
.cursor__ring {
  width: 34px; height: 34px;
  border: 1.5px solid var(--cyan);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width .4s var(--ease-out-expo), height .4s var(--ease-out-expo), opacity .3s;
  opacity: 0.45;
  position: absolute;
}
body:has(a:hover) .cursor__ring,
body:has(button:hover) .cursor__ring { width: 52px; height: 52px; opacity: 0.7; }

/* ── Loader ──────────────────────────────────────────────── */
#loader {
  position: fixed; inset: 0;
  z-index: 9998;
  background: var(--white);
  display: grid;
  place-items: center;
  transition: opacity .6s var(--ease-in-out), visibility .6s;
}
#loader.done { opacity: 0; visibility: hidden; }
.loader__logo { width: 260px; animation: pulse-logo 1.2s ease-in-out infinite alternate; }
@keyframes pulse-logo { from { opacity:.4;transform:scale(.97); } to { opacity:1;transform:scale(1); } }

/* ── Navigation: clean & minimal ───────────────────────── */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  z-index: 1000;
  display: flex;
  align-items: center;
  padding: 0 var(--page-margin);
  transition: transform .5s var(--ease-out-expo), background .35s, box-shadow .35s;
  background: rgba(255,255,255,0);
}
.nav.scrolled {
  background: rgba(255,255,255,.88);
  backdrop-filter: blur(20px) saturate(1.4);
  box-shadow: 0 1px 0 var(--text-faint);
}
.nav.hidden { transform: translateY(-100%); }

.nav__logo { height: 40px; }
.nav__logo img { height: 100%; width: auto; }

.nav__links {
  display: flex;
  align-items: center;
  gap: clamp(1.5rem, 2.2vw, 2.2rem);
  margin-left: auto;
}
.nav__link {
  font-size: .82rem;
  font-weight: 500;
  letter-spacing: .02em;
  text-transform: none;
  color: var(--text-dim);
  position: relative;
  transition: color .25s;
}
.nav__link::after {
  content: '';
  position: absolute;
  bottom: -3px; left: 0;
  width: 100%; height: 1.5px;
  background: var(--cyan);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform .35s var(--ease-out-expo);
}
.nav__link:hover { color: var(--text); }
.nav__link:hover::after { transform: scaleX(1); transform-origin: left; }
.nav__link.active { color: var(--navy); }

.nav__dropdown { position: relative; }
.nav__dropdown-menu {
  position: absolute;
  top: calc(100% + 12px);
  left: 50%; transform: translateX(-50%) translateY(6px);
  background: var(--white);
  border: 1px solid var(--text-faint);
  border-radius: 12px;
  box-shadow: 0 12px 40px rgba(0,0,0,.08);
  padding: .5rem;
  min-width: 160px;
  opacity: 0; visibility: hidden;
  transition: opacity .25s, transform .25s var(--ease-out-expo), visibility .25s;
}
.nav__dropdown:hover .nav__dropdown-menu {
  opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0);
}
.nav__dropdown-menu a {
  display: block;
  padding: .55rem 1rem;
  font-size: .82rem;
  letter-spacing: .01em;
  text-transform: none;
  color: var(--text-dim);
  border-radius: 8px;
  transition: color .2s, background .2s;
}
.nav__dropdown-menu a:hover { color: var(--text); background: var(--surface); }

.nav__phone {
  font-size: .82rem;
  letter-spacing: .01em;
  color: var(--text-dim);
  margin-right: .5rem;
  padding-right: 1.25rem;
  border-right: 1px solid var(--text-faint);
  user-select: text;
  text-decoration: none;
  transition: color .2s;
}
.nav__phone:hover { color: var(--navy); }
.nav__cta {
  margin-left: .75rem;
  padding: .5rem 1.4rem;
  background: var(--navy);
  border: 1.5px solid var(--navy);
  border-radius: 9999px;
  color: var(--white) !important;
  font-size: .8rem;
  letter-spacing: .02em;
  text-transform: none;
  font-weight: 600;
  transition: background .3s var(--ease-out-quint), color .3s, border-color .3s, transform .3s, box-shadow .3s;
}
.nav__cta:hover { background: var(--navy-mid); border-color: var(--navy-mid); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(0,84,157,.2); color: var(--white) !important; }
.nav__cta::after { display: none !important; }

/* Hamburger — 44×44 hit area (Apple/Google touch-target guideline). Previously
   24×22.5 incl. padding, which was reliably miss-tappable on phones. */
.nav__burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  margin-left: auto;
  width: 44px;
  height: 44px;
  padding: 10px;
}
.nav__burger span {
  display: block; width: 24px; height: 1.5px;
  background: var(--navy);
  transition: transform .3s, opacity .3s;
}
.nav__burger.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav__burger.open span:nth-child(2) { opacity: 0; }
.nav__burger.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* Mobile menu */
.nav__mobile {
  display: none;
  position: fixed; inset: 0;
  top: var(--nav-h);
  background: rgba(255,255,255,.98);
  backdrop-filter: blur(16px);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.75rem;
  z-index: 999;
  opacity: 0; visibility: hidden;
  transition: opacity .4s, visibility .4s;
}
.nav__mobile.open { opacity: 1; visibility: visible; }
.nav__mobile a {
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 4vw, 1.8rem);
  font-weight: var(--fw-heading);
  letter-spacing: var(--ls-tight);
  color: var(--text-mid);
  transition: color .2s;
}
.nav__mobile a:hover { color: var(--navy); }

/* ── Typography: clean & bold like antigravity ─────────── */
.t-display {
  font-family: var(--font-display);
  font-size: var(--fs-display);
  font-weight: var(--fw-display);
  line-height: 1.0;
  letter-spacing: var(--ls-tight);
  color: var(--text);
}
.t-h1 {
  font-family: var(--font-display);
  font-size: var(--fs-h1);
  font-weight: var(--fw-heading);
  line-height: 1.0;
  letter-spacing: var(--ls-tight);
  color: var(--text);
}
.t-h2 {
  font-family: var(--font-display);
  font-size: var(--fs-h2);
  font-weight: var(--fw-heading);
  line-height: 1.08;
  letter-spacing: var(--ls-tight);
  color: var(--text);
}
.t-h3 {
  font-family: var(--font-display);
  font-size: var(--fs-h3);
  font-weight: 400;
  line-height: 1.25;
  letter-spacing: var(--ls-normal);
  color: var(--text);
}
.t-label {
  font-size: var(--fs-label);
  font-weight: 600;
  letter-spacing: var(--ls-label);
  text-transform: uppercase;
  color: var(--navy);
}
.t-body {
  font-size: var(--fs-body);
  line-height: 1.75;
  color: var(--text-dim);
  font-weight: 400;
  letter-spacing: var(--ls-normal);
}

/* Color helpers */
.accent { color: var(--navy); }

/* Inline AccuScan DP wordmark: replaces "AccuScan DP(R)" text, scaled to the
   adjacent font size and sitting on the text baseline. Carries the ® in-image. */
.brand-mark {
  display: inline-block;
  width: 8.8em;   /* 0.86em tall at the wordmark's ~10.23:1 ratio */
  height: auto;   /* keeps ratio (no distortion) if max-width ever caps it */
  max-width: 100%;
  vertical-align: baseline;
}

/* ── Layout ──────────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 var(--page-margin);
}
.section {
  padding: var(--section-gap) 0;
  position: relative;
  z-index: 1;
  background: transparent;
}
.section--light { background: rgba(248, 249, 252, 0.85); border-radius: 0; }
.section--dark { background: var(--navy); color: var(--white); }
.section--dark .t-body { color: rgba(255,255,255,.65); }
.section--dark .t-label { color: var(--cyan); }
.section--dark .t-h2, .section--dark .t-h1, .section--dark .t-h3 { color: var(--white); }
.section--dark .text-faint { color: rgba(255,255,255,.2); }

/* ── White-bg components inside dark sections: force dark text ── */
/* process-step, feature-item, and card all have white backgrounds  */
/* but would inherit white text from section--dark; override here */
.section--dark .process-step { color: var(--text); }
.section--dark .process-step .t-h3 { color: var(--navy); }
.section--dark .process-step .t-body,
.section--dark .process-step p { color: var(--text-dim); }
.section--dark .process-step:hover { background: var(--surface); }
.section--dark .process-step__num { color: var(--text-dim); }
.section--dark .process-step:hover .process-step__num { color: var(--cyan-dim); }

.section--dark .feature-item { color: var(--text); }
.section--dark .feature-item .t-h3 { color: var(--navy); }
.section--dark .feature-item .t-body,
.section--dark .feature-item p { color: var(--text-dim); }
.section--dark .feature-item:hover { background: var(--surface); }

.section--dark .card { color: var(--text); }
.section--dark .card .t-h3 { color: var(--navy); }
.section--dark .card .t-body,
.section--dark .card p { color: var(--text-dim); }
.section--dark .card .card__num { color: var(--text-faint); }

/* Inline grids with surface backgrounds inside dark sections */
.section--dark [style*="background:var(--surface)"],
.section--dark [style*="background: var(--surface)"] { color: var(--text); }

/* ── Included items grid (AccuScan section) ──────────────── */
.included-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
.included-item {
  background: var(--surface);
  border-radius: 16px;
  padding: 1.75rem;
  transition: transform .35s var(--ease-out-quint), box-shadow .35s var(--ease-out-quint);
}
.included-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(0,84,157,.06);
}
.included-item__icon {
  color: var(--cyan);
  margin-bottom: 1rem;
}
.included-item__title {
  font-weight: 600;
  font-size: 1rem;
  color: var(--text);
  margin-bottom: .4rem;
}
.included-item__desc {
  font-size: .85rem;
  color: var(--text-dim);
  line-height: 1.6;
}

/* ── Buttons: pill-shaped like antigravity ──────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  padding: .75rem 2rem;
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  border-radius: 9999px;
  transition: all .35s var(--ease-out-quint);
  position: relative;
}
.btn svg { width: 15px; height: 15px; transition: transform .3s; }
.btn:hover svg { transform: translateX(4px); }

.btn--primary {
  background: var(--navy);
  color: var(--white);
  border: 1.5px solid var(--navy);
}
.btn--primary:hover { background: var(--navy-mid); border-color: var(--navy-mid); transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,84,157,.18); }

.btn--outline {
  border: 1.5px solid var(--navy);
  color: var(--navy);
  background: transparent;
}
.btn--outline:hover { background: var(--navy); color: var(--white); transform: translateY(-2px); }

.btn--ghost {
  color: var(--text-dim);
  border: 1px solid var(--text-faint);
}
.btn--ghost:hover { color: var(--navy); border-color: var(--navy); }

/* Cyan outline pill — used where btn--ghost felt too quiet against a
   busy section (e.g. orthotics gallery on the homepage). Ties to the
   brand cyan instead of muted grey so the CTA reads at a glance. */
.btn--cyan {
  color: var(--cyan);
  border: 1.5px solid var(--cyan);
  background: transparent;
}
.btn--cyan:hover {
  background: var(--cyan);
  color: var(--white);
  border-color: var(--cyan);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,174,199,.22);
}

/* On dark sections */
.section--dark .btn--outline {
  border-color: rgba(255,255,255,.4);
  color: var(--white);
}
.section--dark .btn--outline:hover { background: var(--white); color: var(--navy); }

/* ── Cards ───────────────────────────────────────────────── */
.card {
  background: var(--white);
  border: 1px solid var(--text-faint);
  border-radius: 16px;
  padding: clamp(1.5rem, 3vw, 2.5rem);
  transition: border-color .35s var(--ease-out-quint), transform .35s var(--ease-out-quint), box-shadow .35s var(--ease-out-quint);
}
.card:hover {
  border-color: var(--cyan);
  transform: translateY(-4px);
  box-shadow: 0 16px 48px rgba(0,84,157,.08);
}
.card__num {
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 400;
  color: var(--text-dim);
  line-height: 1;
  margin-bottom: 1rem;
}
.card:hover .card__num { color: var(--cyan-light); }

/* ── Hero: clean, spacious, antigravity-inspired ────────── */
.hero {
  /* Sized to its content (not a forced 100svh) so the foot scan + text
     don't float in a screen-tall box with big empty gaps above/below —
     and so the orthotic bubble stream below peeks into the first screen.
     min-height keeps it substantial without pinning it to the viewport. */
  min-height: min(680px, calc(100svh - var(--nav-h)));
  padding-top: var(--nav-h);
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  align-items: center;
  position: relative;
  overflow: hidden;
  background: transparent;
  z-index: 1;
}
.hero__content {
  padding: clamp(1.25rem, 3vw, 2.75rem) clamp(2rem, 5vw, 5rem);
  position: relative;
  z-index: 2;
}
.hero__canvas-wrap {
  position: relative;
  height: 100%;
  min-height: 520px;
  z-index: 1;
  /* Branded fallback that shows through the transparent canvas during the
     ~1s before WebGL compiles shaders — and stays visible if WebGL is
     disabled entirely. Subtle enough not to fight the particles once they
     render. */
  background:
    radial-gradient(ellipse 60% 50% at 50% 45%, rgba(0,174,199,.09) 0%, transparent 65%),
    radial-gradient(ellipse 80% 70% at 50% 55%, rgba(0,84,157,.05) 0%, transparent 70%);
}
#foot-canvas,
.foot-canvas { width: 100%; height: 100%; display: block; position: relative; z-index: 1; }

.hero__scroll-hint {
  position: absolute;
  bottom: 2.5rem;
  left: var(--page-margin);
  display: flex;
  align-items: center;
  gap: .75rem;
  font-size: .72rem;
  letter-spacing: .08em;
  text-transform: none;
  color: var(--text-mid);
  z-index: 2;
}
.hero__scroll-line {
  width: 36px; height: 1px;
  background: var(--text-faint);
  animation: scroll-pulse 2s ease-in-out infinite;
}
@keyframes scroll-pulse {
  0%,100% { transform:scaleX(1);opacity:.5; }
  50% { transform:scaleX(1.5);opacity:1; }
}

/* Hero trust badges: minimal pills */
.hero__badges {
  display: flex;
  gap: .6rem;
  flex-wrap: wrap;
  margin-top: 3rem;
}
.hero__badge {
  font-size: .72rem;
  font-weight: 500;
  letter-spacing: .04em;
  color: var(--text-dim);
  background: var(--surface);
  padding: .35rem .85rem;
  border-radius: 9999px;
}

/* ── Stats strip: clean with generous padding ──────────── */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  border-top: 1px solid var(--text-faint);
  border-bottom: 1px solid var(--text-faint);
  max-width: 1440px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
  background: transparent;
}
.stat {
  padding: clamp(2rem, 3vw, 3rem) clamp(1.5rem, 2.5vw, 2.5rem);
  border-right: 1px solid var(--text-faint);
}
.stat:last-child { border-right: none; }
.stat__num {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 2.8vw, 2.8rem);
  font-weight: 400;
  color: var(--navy);
  line-height: 1;
  letter-spacing: var(--ls-tight);
}
.stat__label { font-size: .82rem; color: var(--text-mid); margin-top: .5rem; letter-spacing: .01em; }

/* ── Feature grid ────────────────────────────────────────── */
.included-heading { white-space: nowrap; }
.feature-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--text-faint);
  border: 1px solid var(--text-faint);
  border-radius: 4px;
  overflow: hidden;
}
.feature-item {
  background: var(--white);
  padding: clamp(2rem, 3.5vw, 3rem);
  transition: background .3s;
}
.feature-item:hover { background: var(--surface); }
.feature-item__icon {
  width: 44px; height: 44px;
  color: var(--cyan);
  margin-bottom: 1.5rem;
}
.feature-item__icon svg { width: 100%; height: 100%; }

/* ── Modern cert grid (mission section) ──────────────────── */
.cert-grid-modern {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
.cert-modern-item {
  background: var(--white);
  border: 1px solid var(--text-faint);
  border-radius: 16px;
  padding: 1.75rem;
  text-align: center;
  transition: transform .35s var(--ease-out-quint), box-shadow .35s var(--ease-out-quint);
}
.cert-modern-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(0,84,157,.06);
}
.cert-modern-item__code {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 400;
  color: var(--navy);
  letter-spacing: var(--ls-tight);
  margin-bottom: .35rem;
}
.cert-modern-item__label {
  font-size: .8rem;
  color: var(--text-dim);
  line-height: 1.5;
}

/* Mobile collapse for the cert grid: at narrow widths the 2-column layout
   was forcing a min-content width of ~230px per cell (driven by long
   unbreakable tokens like "RN#3015146490"), overflowing the viewport by
   ~100px. Below 600px (covers every phone CSS width), stack to a single
   column and tighten the card padding so it reads as a clean list. */
@media (max-width: 600px) {
  .cert-grid-modern { grid-template-columns: 1fr; }
  .cert-modern-item { padding: 1.25rem; }

  /* L-code callout on the VA Resources page: the 3-column "icon · text ·
     button" grid had unshrinkable auto columns that overflowed on mobile.
     Stack vertically with the icon and text together at the top and the
     button below. */
  .lcode-callout {
    grid-template-columns: 1fr !important;
    gap: 1.25rem !important;
    padding: 1.25rem !important;
  }
}

/* ── Split ───────────────────────────────────────────────── */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(3rem, 6vw, 8rem);
  align-items: center;
}
.split--reverse { direction: rtl; }
.split--reverse > * { direction: ltr; }

/* ── Orthotics portfolio ─────────────────────────────────── */
/* ── Category sections ───────────────────────────────────── */
.portfolio-section { margin-bottom: 3.5rem; }
.portfolio-section__header {
  display: flex; align-items: center; gap: 1.25rem;
  margin-bottom: 1.5rem;
}
.portfolio-section__title {
  font-family: var(--font-display);
  /* ~3x previous .7rem; clamps for fluid scaling. Letter-spacing tightened
     from .18em (correct for tiny labels) to ls-tight (correct for display
     headings). */
  font-size: clamp(1.6rem, 4.5vw, 2.4rem);
  letter-spacing: var(--ls-tight);
  text-transform: uppercase;
  color: var(--navy);
  white-space: nowrap;
  font-weight: 400;
  line-height: 1;
}
.portfolio-section__line {
  flex: 1; height: 1px; background: var(--text-faint);
}

/* Mobile: drop the trailing decorative line and center the title so it
   reads as a chapter heading rather than a list label. */
@media (max-width: 768px) {
  .portfolio-section__header {
    justify-content: center;
    text-align: center;
  }
  .portfolio-section__line {
    display: none;
  }
}

/* ── Portfolio grid & cards: modern rounded ─────────────── */
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}
.portfolio-card {
  cursor: pointer;
  display: flex; flex-direction: column;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--text-faint);
  transition: transform .35s var(--ease-out-quint), box-shadow .35s var(--ease-out-quint);
}
/* Hover effects gated to hover-capable pointers only. On touchscreens
   (iOS / Android), :hover gets "stuck" after a tap and stays stuck
   until another tap elsewhere — which was making tapped orthotic
   cards appear permanently zoomed in (scale 1.05 never releases). */
@media (hover: hover) {
  .portfolio-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 48px rgba(0,84,157,.08);
  }
}
.portfolio-item {
  position: relative;
  overflow: hidden;
  background: var(--surface);
  /* Square to match the 750x750 product photography (top + side views
     composed within the square frame). A 4:3 box cropped ~12% off the
     top and bottom, cutting parts of the orthotic on many shots. */
  aspect-ratio: 1/1;
}
.portfolio-item img {
  width: 100%; height: 100%;
  /* `contain` (not cover) so the entire orthotic is visible — no cropping.
     Product photos are square on a white backdrop, so letterboxing against
     the card's --surface background is invisible. */
  object-fit: contain;
  transition: transform .6s var(--ease-out-expo);
}
@media (hover: hover) {
  .portfolio-card:hover .portfolio-item img { transform: scale(1.05); }
}
.portfolio-item__overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(10,20,40,.80) 0%, transparent 55%);
  opacity: 0;
  transition: opacity .35s;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1.25rem;
}
@media (hover: hover) {
  .portfolio-card:hover .portfolio-item__overlay { opacity: 1; }
}
.portfolio-item__desc { font-size: .82rem; color: rgba(255,255,255,.88); line-height: 1.5; }
.portfolio-card__name {
  background: var(--white);
  padding: .85rem 1.25rem;
  font-size: .9rem; font-weight: 600;
  color: var(--text);
  letter-spacing: .01em;
  transition: color .25s;
}
@media (hover: hover) {
  .portfolio-card:hover .portfolio-card__name {
    color: var(--cyan);
  }
}

/* Carousel */
.portfolio-item .carousel { position:relative;width:100%;height:100%; }
.portfolio-item .carousel__track {
  display:flex;width:100%;height:100%;
  transition:transform .5s var(--ease-out-expo);
}
/* iOS Safari quirk: a flex item with only `min-width: 100%` and no
   explicit `width` / `flex-basis` can resolve to the intrinsic width of
   its <img> content (e.g. 750px) instead of 100% of the carousel
   viewport. The slide then overflows to the right and `object-fit:
   contain` centers the image inside that oversized slide — so the
   visible window (clipped by `.portfolio-item` overflow) shows mostly
   empty space with only a sliver of image off to one side.
   Pin width AND flex-basis to 100% so the slide is always exactly the
   carousel's width. */
.portfolio-item .carousel__slide {
  flex: 0 0 100%;
  width: 100%;
  min-width: 100%;
  max-width: 100%;
  height: 100%;
  flex-shrink: 0;
}
.portfolio-item .carousel__slide img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center center;
}
.carousel__dots {
  position:absolute;bottom:0.6rem;left:50%;
  transform:translateX(-50%);
  display:flex;gap:.4rem;z-index:2;
  transition: opacity .35s var(--ease-out-quint);
}
/* Hide dots while the hover overlay is showing — they collided with the
   description copy at the bottom of the card. Touch devices don't hover,
   so mobile users keep the dots visible for tapping through slides. */
@media (hover: hover) {
  .portfolio-card:hover .carousel__dots { opacity: 0; pointer-events: none; }
}
/* 36×36 hit area with an 8px visible dot via ::before — old 5×5 dots
   failed the 44px touch-target guideline and were functionally un-tappable
   on phones. Flex gap between adjacent dots brings effective spacing past 44px. */
.carousel__dot {
  width: 36px; height: 36px;
  display: inline-flex; align-items: center; justify-content: center;
  background: transparent;
  border: none;
  padding: 0;
  cursor: none;
  position: relative;
}
.carousel__dot::before {
  content: '';
  width: 8px; height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,.35);
  transition: background .2s, transform .2s;
}
.carousel__dot.active::before { background: var(--cyan); transform: scale(1.3); }

/* ── Process steps: modern cards ────────────────────────── */
.process-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}
.process-step {
  background: var(--white);
  padding: clamp(2rem, 3vw, 2.5rem);
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  border-radius: 16px;
  border: 1px solid var(--text-faint);
  transition: transform .35s var(--ease-out-quint), box-shadow .35s var(--ease-out-quint);
}
.process-step:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0,84,157,.07);
}
.process-step__num {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 400;
  color: var(--cyan);
  line-height: 1;
  letter-spacing: var(--ls-tight);
}
.process-step:hover .process-step__num { color: var(--navy); }

/* ── FAQ ─────────────────────────────────────────────────── */
.faq-item { border-bottom: 1px solid var(--text-faint); }
.faq-question {
  width: 100%; text-align: left;
  padding: 1.6rem 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
  font-family: var(--font-display);
  font-size: clamp(1rem, 1.3vw, 1.15rem);
  font-weight: 400;
  letter-spacing: var(--ls-normal);
  color: var(--text);
  transition: color .25s;
  cursor: none;
}
.faq-question:hover { color: var(--navy); }
.faq-question svg {
  flex-shrink: 0;
  width: 18px; height: 18px;
  color: var(--cyan);
  transition: transform .35s var(--ease-out-expo);
}
.faq-item.open .faq-question svg { transform: rotate(45deg); }
.faq-answer { max-height: 0; overflow: hidden; transition: max-height .45s var(--ease-out-expo); }
.faq-answer__inner { padding: 0 0 1.6rem; color: var(--text-dim); line-height: 1.75; }
.faq-item.open .faq-answer { max-height: 650px; }

/* ── Awards ──────────────────────────────────────────────── */
.awards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
}
.award-card {
  background: var(--white);
  border: 1px solid var(--text-faint);
  border-radius: 4px;
  padding: clamp(1.75rem, 3vw, 2.5rem);
  position: relative;
  overflow: hidden;
  transition: border-color .3s, transform .3s, box-shadow .3s;
}
.award-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 3px; height: 100%;
  background: var(--cyan);
  transform: scaleY(0);
  transform-origin: bottom;
  transition: transform .4s var(--ease-out-expo);
}
.award-card:hover { border-color: rgba(0,174,199,.3); transform: translateY(-4px); box-shadow: 0 16px 40px rgba(0,84,157,.08); }
.award-card:hover::before { transform: scaleY(1); }
.award-card__icon { font-size: 2rem; margin-bottom: 1rem; }
.award-card__title { font-family: var(--font-display); font-size: 1.05rem; font-weight: 400; color: var(--navy); margin-bottom: .5rem; }
.award-card__body { font-size: .85rem; color: var(--text-dim); line-height: 1.65; }

/* ── Contact ─────────────────────────────────────────────── */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: clamp(3rem, 6vw, 8rem);
  align-items: start;
}
.contact-info__item {
  display: flex; gap: 1rem;
  align-items: flex-start;
  margin-bottom: 2rem;
}
.contact-info__icon {
  width: 38px; height: 38px;
  border: 1px solid var(--text-faint);
  border-radius: 2px;
  display: grid; place-items: center;
  flex-shrink: 0;
  color: var(--cyan);
}
.contact-info__icon svg { width: 18px; height: 18px; }
.contact-info__label { font-size: .68rem; letter-spacing: .14em; text-transform: uppercase; color: var(--text-mid); margin-bottom: .2rem; }
.contact-info__value { font-weight: 500; font-size: .9rem; color: var(--navy); }

.form { display: grid; gap: 1rem; }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form__group { display: flex; flex-direction: column; gap: .35rem; }
.form__label { font-size: .68rem; letter-spacing: .12em; text-transform: uppercase; color: var(--text-mid); }
.form__input, .form__select, .form__textarea {
  width: 100%;
  background: var(--white);
  border: 1px solid var(--text-faint);
  border-radius: 2px;
  padding: .75rem 1rem;
  color: var(--text);
  font-family: var(--font-body);
  font-size: .9rem;
  outline: none;
  transition: border-color .25s;
}
.form__input:focus, .form__select:focus, .form__textarea:focus { border-color: var(--cyan); }
.form__textarea { resize: vertical; min-height: 120px; }
.form__select { appearance: none; cursor: none; }

/* ── Certifications grid ─────────────────────────────────── */
.cert-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1px;
  background: var(--text-faint);
  border: 1px solid var(--text-faint);
  border-radius: 4px;
  overflow: hidden;
  margin-top: 3rem;
}
.cert-item { background: var(--white); padding: 2rem; text-align: center; transition: background .3s; }
.cert-item:hover { background: var(--surface); }
.cert-item__code {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 400;
  color: var(--navy);
  letter-spacing: var(--ls-tight);
  margin-bottom: .4rem;
}
.cert-item__label { font-size: .76rem; color: var(--text-dim); letter-spacing: .04em; line-height: 1.4; }

/* ── Guides ──────────────────────────────────────────────── */
.guides-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.25rem;
}
.guide-card {
  background: var(--white);
  border: 1px solid var(--text-faint);
  display: flex; flex-direction: column;
  border-radius: 4px;
  overflow: hidden;
  transition: transform .3s, border-color .3s, box-shadow .3s;
}
.guide-card:hover { transform: translateY(-5px); border-color: var(--cyan); box-shadow: 0 16px 40px rgba(0,84,157,.08); }
.guide-card__header {
  padding: 1.75rem 2rem 1.5rem;
  background: var(--surface);
  display: flex; align-items: center; gap: 1rem;
  border-bottom: 1px solid var(--text-faint);
}
.guide-card__icon {
  width: 48px; height: 48px;
  background: transparent;
  border-radius: 2px;
  display: grid; place-items: center;
  color: var(--accent);
  flex-shrink: 0;
}
.guide-card__icon svg { width: 34px; height: 34px; }
.guide-card__title { font-family: var(--font-display); font-size: 1rem; font-weight: 400; color: var(--navy); }
.guide-card__body { padding: 1.5rem 2rem; color: var(--text-dim); font-size: .85rem; line-height: 1.7; flex: 1; }
.guide-card__footer { padding: 0 2rem 1.75rem; margin-top: auto; }

/* ── Footer: clean & modern ─────────────────────────────── */
.footer {
  background: rgba(248, 249, 252, 0.88);
  color: var(--text);
  border-top: 1px solid var(--text-faint);
  padding: clamp(4rem, 7vw, 6rem) 0 2.5rem;
  position: relative;
  z-index: 1;
}
.footer__grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: clamp(2rem, 4vw, 4rem);
  margin-bottom: 3.5rem;
}
.footer__logo { height: 100px; margin-bottom: 1.25rem; }
.footer__tagline { font-size: .9rem; color: var(--text-mid); line-height: 1.7; max-width: 280px; }
.footer__heading {
  font-size: .72rem; letter-spacing: .1em; text-transform: uppercase;
  color: var(--text-mid); margin-bottom: 1.2rem; font-weight: 600;
}
.footer__links { display: flex; flex-direction: column; gap: .7rem; }
.footer__link { font-size: .88rem; color: var(--text-mid); transition: color .25s; }
.footer__link:hover { color: var(--text); }
.footer__bottom {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 2rem;
  border-top: 1px solid var(--text-faint);
  font-size: .78rem; color: var(--text-mid);
  flex-wrap: wrap; gap: 1rem;
}
.footer__badges { display: flex; gap: .6rem; flex-wrap: wrap; }
.footer__badge {
  padding: .3rem .75rem;
  background: var(--white);
  border-radius: 9999px;
  font-size: .68rem;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--text-mid);
  font-weight: 500;
}

/* ── Reveal animations ───────────────────────────────────── */
.reveal { opacity: 0; transform: translateY(28px); }
.reveal.in-view { opacity:1;transform:translateY(0);transition:opacity .85s var(--ease-out-expo),transform .85s var(--ease-out-expo); }
.reveal--left { opacity:0;transform:translateX(-36px); }
.reveal--left.in-view { opacity:1;transform:translateX(0);transition:opacity .85s var(--ease-out-expo),transform .85s var(--ease-out-expo); }
.reveal--right { opacity:0;transform:translateX(36px); }
.reveal--right.in-view { opacity:1;transform:translateX(0);transition:opacity .85s var(--ease-out-expo),transform .85s var(--ease-out-expo); }
.stagger > * { opacity:0;transform:translateY(22px); }
.stagger.in-view > * { opacity:1;transform:translateY(0);transition:opacity .7s var(--ease-out-expo),transform .7s var(--ease-out-expo); }
.stagger.in-view > *:nth-child(1){transition-delay:0ms}
.stagger.in-view > *:nth-child(2){transition-delay:80ms}
.stagger.in-view > *:nth-child(3){transition-delay:160ms}
.stagger.in-view > *:nth-child(4){transition-delay:240ms}
.stagger.in-view > *:nth-child(5){transition-delay:320ms}
.stagger.in-view > *:nth-child(6){transition-delay:400ms}

/* ── Page hero (inner pages) ─────────────────────────────── */
.page-hero {
  padding-top: calc(var(--nav-h) + clamp(4rem, 8vw, 7rem));
  padding-bottom: clamp(3rem, 6vw, 5rem);
  position: relative;
  overflow: hidden;
  background: rgba(248, 249, 252, 0.82);
  border-bottom: 1px solid var(--text-faint);
}
.page-hero__bg {
  position: absolute; inset: 0;
  background: radial-gradient(ellipse 60% 70% at 100% 50%, rgba(0,174,199,.1) 0%, transparent 65%);
  pointer-events: none;
}
.page-hero__eyebrow { margin-bottom: 1rem; }

/* ── Cert row (awards page) ──────────────────────────────── */
.cert-row {
  display: flex; flex-direction: column;
  gap: 1px; background: var(--text-faint);
  border: 1px solid var(--text-faint);
  border-radius: 4px; overflow: hidden;
}
.cert-row-item {
  background: var(--white);
  padding: 1.5rem 2rem;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 1.5rem;
  transition: background .25s;
}
.cert-row-item:hover { background: var(--surface); }
.cert-badge {
  font-family: var(--font-display);
  font-size: .9rem;
  font-weight: 400;
  color: var(--navy);
  letter-spacing: var(--ls-tight);
  min-width: 80px;
}

/* Hero award block */
.hero-award {
  margin-top: clamp(2.5rem,5vw,4rem);
  padding: clamp(2.5rem,5vw,4rem);
  background: linear-gradient(135deg, var(--surface) 0%, var(--cyan-light) 100%);
  border: 1px solid rgba(0,174,199,.3);
  border-radius: 4px;
  position: relative; overflow: hidden;
}
.hero-award::before {
  content: '★';
  position: absolute; right: 2.5rem; top: 50%;
  transform: translateY(-50%);
  font-size: clamp(6rem,12vw,9rem);
  color: rgba(0,174,199,.08);
  line-height: 1; pointer-events: none;
}

/* ── Homepage bubble stream (between hero and iPad) ──────── */
.home-bubble-stream {
  /* Pulled up tight under the hero so it reads as part of the first screen. */
  padding: clamp(.4rem, 1.2vw, .9rem) 0;
  margin-top: clamp(-1rem, -1vw, -0.5rem);
}
/* Hide second row: we only want a single right-to-left pass */
.home-bubble-stream .bubble-marquee__row--left {
  display: none;
}
@media (max-width: 860px) {
  .home-bubble-stream {
    padding: clamp(.75rem, 2vw, 1.25rem) 0;
  }
  .home-bubble-stream .bubble {
    width: 62px !important;
    height: 62px !important;
  }
}

/* ── iPad Showcase ───────────────────────────────────────── */
.ipad-section { overflow: visible; padding-top: clamp(1.5rem, 3vw, 2.5rem); }

.ipad-showcase {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 820px;
  margin: 0 auto;
}

/* iPad device frame */
.ipad-device {
  width: 100%;
  max-width: 720px;
  transform: translateY(60px);
  opacity: 0;
  transition: transform 1s var(--ease-out-quint), opacity 0.8s var(--ease-out-quint);
}
.ipad-device.is-visible {
  transform: translateY(0);
  opacity: 1;
}

.ipad-bezel {
  position: relative;
  background: #1a1a1e;
  border-radius: 24px;
  padding: 18px 18px 14px;
  box-shadow:
    0 4px 12px rgba(0,0,0,.08),
    0 20px 60px rgba(0,0,0,.12),
    inset 0 1px 0 rgba(255,255,255,.06);
}
.ipad-camera {
  width: 8px;
  height: 8px;
  background: #2a2a30;
  border-radius: 50%;
  margin: 0 auto 10px;
  box-shadow: inset 0 1px 2px rgba(0,0,0,.4);
}
.ipad-screen {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  background: #000;
  aspect-ratio: 5 / 3;
}
.ipad-home-bar {
  width: 100px;
  height: 4px;
  background: rgba(255,255,255,.15);
  border-radius: 4px;
  margin: 10px auto 0;
}

/* Slides */
.ipad-slides {
  position: relative;
  width: 100%;
  height: 100%;
}
.ipad-slide {
  position: absolute;
  inset: 0;
  transform: translateX(100%);
  transition: transform 1s var(--ease-out-quint);
  display: flex;
  align-items: center;
  justify-content: center;
  will-change: transform;
}
.ipad-slide.is-active {
  transform: translateX(0);
  z-index: 1;
}
.ipad-slide.is-past {
  transform: translateX(-100%);
}
.ipad-slide img,
.ipad-slide video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Per-slide media adjustments */
/* Step 1: Stretch the scan screenshot edge-to-edge with the iPad bezel so no
   white perimeter is ever visible. `object-fit: fill` ignores aspect ratio,
   which slightly widens the foot (~12%) but guarantees zero gap. Slide also
   gets a black background as a safety net for any subpixel rounding. */
.ipad-slide[data-step="1"] {
  background: #000;
}
.ipad-slide[data-step="1"] img {
  object-fit: fill;
}
/* Step 2: Shift right & zoom to crop out white back-arrow in top-left */
.ipad-slide[data-step="2"] video {
  transform: translateX(2.5%) scale(1.04);
  transform-origin: right center;
}
/* Steps 3 & 4: Cover fills naturally at 5:3 ratio: no overrides needed */
.ipad-slide__logo {
  background: var(--white);
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ipad-slide__logo img {
  width: 40%;
  height: auto;
  object-fit: contain;
  animation: ipad-logo-pulse 2s ease-in-out infinite alternate;
}
@keyframes ipad-logo-pulse {
  from { opacity: 0.5; transform: scale(0.96); }
  to   { opacity: 1;   transform: scale(1); }
}

/* Navigation arrows */
.ipad-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--white);
  border: 1px solid var(--text-faint);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  cursor: pointer;
  transition: all .3s var(--ease-out-quint);
  box-shadow: 0 4px 16px rgba(0,0,0,.06);
}
.ipad-nav:hover {
  background: var(--surface);
  transform: translateY(-50%) scale(1.08);
  box-shadow: 0 6px 24px rgba(0,0,0,.1);
}
.ipad-nav--prev { left: -28px; }
.ipad-nav--next { right: -28px; }
.ipad-nav.is-hidden { opacity: 0; pointer-events: none; }

/* Arrow flag pipeline */
.ipad-pipeline {
  margin-top: 2.5rem;
  max-width: 660px;
  margin-left: auto;
  margin-right: auto;
}

.pipeline-track {
  display: flex;
  gap: 6px;
  --arrow: 14px;
  filter: drop-shadow(0 0 1px rgba(0,84,157,.25)) drop-shadow(0 0 .5px rgba(0,84,157,.2));
}

.pipeline-flag {
  flex: 1;
  position: relative;
  height: 48px;
  background: var(--surface-2);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 calc(var(--arrow) + 4px);
  clip-path: polygon(0 0, calc(100% - var(--arrow)) 0, 100% 50%, calc(100% - var(--arrow)) 100%, 0 100%, var(--arrow) 50%);
  transition: filter .3s;
}
.pipeline-flag:hover { filter: brightness(0.94); }
.pipeline-flag--first {
  clip-path: polygon(0 0, calc(100% - var(--arrow)) 0, 100% 50%, calc(100% - var(--arrow)) 100%, 0 100%);
  padding-left: 14px;
}
.pipeline-flag--last {
  clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%, var(--arrow) 50%);
  padding-right: 14px;
}

/* Fill overlay: revealed left-to-right via clip-path */
.pipeline-flag__fill {
  position: absolute;
  inset: 0;
  background: var(--cyan);
  z-index: 2;
  clip-path: inset(0 100% 0 0);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: inherit;
}

.pipeline-flag.is-filling .pipeline-flag__fill {
  animation: pipeline-fill var(--fill-duration, 5s) linear forwards;
}

.pipeline-flag.is-done .pipeline-flag__fill {
  clip-path: inset(0 0 0 0);
}

@keyframes pipeline-fill {
  from { clip-path: inset(0 100% 0 0); }
  to   { clip-path: inset(0 0 0 0); }
}

/* White label inside the fill: revealed as fill sweeps across */
.pipeline-flag__fill-label {
  font-family: var(--font-body);
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  /* Dark text on brand cyan for WCAG AA contrast (navy on cyan was ~2.85:1) */
  color: #05202a;
  white-space: nowrap;
}

/* Navy label underneath: visible where fill hasn't reached */
.pipeline-flag__label {
  position: relative;
  z-index: 1;
  font-family: var(--font-body);
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--navy);
  white-space: nowrap;
}

/* Description below pipeline */
.pipeline-desc {
  text-align: center;
  margin-top: 1.25rem;
  min-height: 1.5em;
  font-size: var(--fs-body);
  color: var(--text-mid);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .35s, transform .35s var(--ease-out-quint);
}
.pipeline-desc.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 1024px) {
  .nav__links { display: none; }
  .nav__burger { display: flex; }
  .nav__mobile { display: flex; }
  .hero { grid-template-columns: 1fr; }
  .hero::before { width: 100%; height: 50%; top: auto; }
  .hero__canvas-wrap { min-height: 50vh; order: -1; }
  .split { grid-template-columns: 1fr; }
  .split--reverse { direction: ltr; }
  .contact-grid { grid-template-columns: 1fr; }
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .process-steps { grid-template-columns: 1fr; }
  .included-grid { grid-template-columns: 1fr 1fr; }
  /* .cert-grid-modern stays 1fr 1fr at this breakpoint via the base rule;
     the explicit override here was redundant and was preventing the
     <600px single-column rule from winning the cascade. */
}

@media (max-width: 768px) {
  .ipad-bezel { border-radius: 16px; padding: 12px 12px 10px; }
  .ipad-nav--prev { left: -8px; }
  .ipad-nav--next { right: -8px; }
  /* 44×44 minimum tap target on phones (was 40×40) */
  .ipad-nav { width: 44px; height: 44px; }
  .pipeline-track { --arrow: 10px; gap: 4px; }
  .pipeline-flag { height: 40px; }
  .pipeline-flag__label,
  .pipeline-flag__fill-label { font-size: .65rem; }
  .form__row { grid-template-columns: 1fr; }
  .footer__grid { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr 1fr; }
  .stat { border-right: none; border-bottom: 1px solid var(--text-faint); }
  .stat:nth-child(odd) { border-right: 1px solid var(--text-faint); }
  .cert-row-item {
    grid-template-columns: auto 1fr !important;
    gap: 1rem !important;
  }
  .cert-row-item > *:last-child { grid-column: 1 / -1 !important; }

  /* Reduce hero canvas height on tablet */
  .hero__canvas-wrap { min-height: 40vh; }

  /* Prevent heading overflow on medium screens */
  .t-display, .t-h1, .t-h2 {
    overflow-wrap: break-word;
    word-break: break-word;
  }

  .included-heading { white-space: normal; }
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .included-grid { grid-template-columns: 1fr; }
  /* .cert-grid-modern collapse is handled by its own <600px rule. */

  /* Convert horizontal reveals to vertical on mobile to prevent overflow */
  .reveal--left  { transform: translateY(22px); }
  .reveal--left.in-view  { transform: translateY(0); }
  .reveal--right { transform: translateY(22px); }
  .reveal--right.in-view { transform: translateY(0); }
}

@media (max-width: 480px) {
  /* Scale down display/heading font sizes so long words don't overflow */
  :root {
    --fs-display: clamp(2rem, 8vw, 3rem);
    --fs-h1:      clamp(1.75rem, 7.5vw, 2.5rem);
    --fs-h2:      clamp(1.4rem, 6vw, 2rem);
    --fs-h3:      clamp(1.1rem, 4vw, 1.4rem);
  }

  .t-display, .t-h1, .t-h2, .t-h3 {
    overflow-wrap: break-word;
    word-break: break-word;
  }

  /* Reduce hero canvas on mobile: don't let it dominate the screen */
  .hero__canvas-wrap { min-height: 260px; }

  /* Cert row stacks fully on small mobile */
  .cert-row-item {
    grid-template-columns: 1fr !important;
    padding: 1.25rem !important;
  }
  .cert-row-item > *:last-child { grid-column: 1 !important; }


  /* Portfolio grid: single column on very small screens */
  .portfolio-grid { grid-template-columns: 1fr; }
  .awards-grid { grid-template-columns: 1fr; }
  .guides-grid { grid-template-columns: 1fr; }
  .feature-grid { grid-template-columns: 1fr; }

  /* Footer bottom: stack copyright and badges */
  .footer__bottom { flex-direction: column; align-items: flex-start; }

  /* Buttons: allow full-width stacking when in flex containers */
  .btn { white-space: nowrap; }

  /* Page hero: reduce top padding on small screens */
  .page-hero {
    padding-top: calc(var(--nav-h) + clamp(2.5rem, 6vw, 4rem));
    padding-bottom: clamp(2rem, 4vw, 3rem);
  }

  /* Stats: small text readable */
  .stat__num { font-size: clamp(1.4rem, 6vw, 2rem); }
  .stat__label { font-size: .72rem; }

  /* Hero award block: tighten on mobile */
  .hero-award { padding: 1.75rem 1.25rem; }
  .hero-award::before { display: none; }
}

/* ── Very small screens: iPhone SE (1st gen), Galaxy Fold folded ─
   Content-clipping guards at <375px. body already has overflow-x: hidden
   as a safety net, so the goal here is to prevent the elements most
   likely to push past the viewport from getting clipped in the first
   place. */
@media (max-width: 374px) {
  :root {
    --page-margin: 1rem;
  }
  .nav { padding: 0 1rem; }
  .nav__logo img { max-height: 28px; width: auto; }
  .nav__phone { display: none; } /* burger already exposes tel: links */

  /* Buttons: allow shrinking, wrap long labels instead of overflowing */
  .btn {
    white-space: normal;
    font-size: .78rem;
    padding: .65rem 1rem;
  }

  /* CTAs in stacked hero: fill width so they never sit awkwardly */
  .hero-stack__ctas .btn,
  .page-hero .btn { width: 100%; justify-content: center; }

  /* Footer badges: don't let them push a horizontal scroll */
  .footer__bottom { gap: 1rem; }
  .footer__badges { flex-wrap: wrap; }

  /* Hero canvas: further reduce so it doesn't dominate */
  .hero__canvas-wrap { min-height: 220px; }
}

/* ── Shared overlay (VA Resources, Awards) ──────────────── */
.va-overlay-backdrop {
  position: fixed; inset: 0; z-index: 10050;
  background: rgba(0,51,102,.6);
  backdrop-filter: blur(5px);
  display: flex; align-items: center; justify-content: center;
  padding: 1.5rem;
  opacity: 0; pointer-events: none;
  transition: opacity .25s ease;
}
.va-overlay-backdrop.is-open { opacity: 1; pointer-events: all; }
.va-overlay {
  background: var(--white);
  border: 1px solid var(--text-faint);
  border-top: 3px solid var(--cyan);
  border-radius: 4px;
  width: 100%; max-width: 520px;
  max-height: 90vh; overflow-y: auto;
  padding: 2.5rem;
  position: relative;
  transform: translateY(16px);
  transition: transform .28s ease;
}
.va-overlay-backdrop.is-open .va-overlay { transform: translateY(0); }
.va-overlay__close {
  position: absolute; top: 1rem; right: 1rem;
  background: none; border: none; cursor: pointer;
  color: var(--text-dim); font-size: 1.3rem; line-height: 1;
  width: 2rem; height: 2rem;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  transition: background .15s, color .15s;
}
.va-overlay__close:hover { background: var(--surface); color: var(--navy); }
.va-overlay__eyebrow {
  font-size: .62rem; letter-spacing: .16em; text-transform: uppercase;
  color: var(--navy); margin-bottom: .6rem;
}
.va-overlay__title {
  font-family: var(--font-display);
  font-size: 1.25rem; font-weight: 400;
  color: var(--navy); letter-spacing: var(--ls-tight);
  margin-bottom: 1rem;
}
.va-overlay__intro {
  font-size: .88rem; color: var(--text-dim); line-height: 1.7;
  margin-bottom: 1.5rem;
}
.va-overlay__list {
  list-style: none; padding: 0; margin: 0 0 1.75rem;
  display: flex; flex-direction: column; gap: .5rem;
}
.va-overlay__list li {
  display: flex; gap: .75rem; align-items: flex-start;
  font-size: .875rem; color: var(--text-dim); line-height: 1.55;
}
.va-overlay__list li::before {
  content: '';
  display: block; width: 6px; height: 6px; border-radius: 50%;
  background: var(--cyan); flex-shrink: 0; margin-top: .45rem;
}
.va-overlay__actions { display: flex; gap: .75rem; flex-wrap: wrap; }

/* ══════════════════════════════════════════════════════════
   PRODUCT BUBBLES: shared component (wave / marquee / fall)
   Used on AccuScan DP, Home, and Orthotics pages.
   ══════════════════════════════════════════════════════════ */

.bubble {
  flex: 0 0 auto;
  position: relative;
  display: block;
  border-radius: 50%;
  overflow: visible;
  background: #fff;
  box-shadow:
    0 10px 28px rgba(0, 84, 157, 0.10),
    0 2px 6px rgba(0, 0, 0, 0.04);
  cursor: pointer;
  text-decoration: none;
  will-change: transform;
  transition:
    box-shadow .45s var(--ease-out-quint);
  border: 1px solid rgba(255, 255, 255, 0.9);
}
.bubble::before {
  /* subtle inner rim highlight */
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  box-shadow: inset 0 2px 6px rgba(255, 255, 255, 0.8), inset 0 -6px 18px rgba(0, 84, 157, 0.06);
  pointer-events: none;
  z-index: 2;
}
.bubble img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 50%;
}
.bubble--sm { width: 76px;  height: 76px;  }
.bubble--md { width: 104px; height: 104px; }
.bubble--lg { width: 132px; height: 132px; }
@media (max-width: 860px) {
  .bubble--sm { width: 58px;  height: 58px;  }
  .bubble--md { width: 76px;  height: 76px;  }
  .bubble--lg { width: 92px;  height: 92px;  }
}

/* hover: rise + grow + deeper shadow */
.bubble:hover {
  box-shadow:
    0 24px 50px rgba(0, 84, 157, 0.22),
    0 6px 14px rgba(0, 0, 0, 0.06);
  z-index: 5;
}

/* Product name tooltip */
.bubble__name {
  position: absolute;
  top: calc(100% + .6rem);
  left: 50%;
  transform: translateX(-50%) translateY(-4px);
  font-family: var(--font-body);
  font-size: .68rem;
  font-weight: 500;
  letter-spacing: .02em;
  color: var(--text-mid);
  white-space: nowrap;
  background: rgba(255,255,255,.92);
  padding: .3rem .6rem;
  border-radius: 9999px;
  box-shadow: 0 4px 14px rgba(0,0,0,.06);
  opacity: 0;
  transition: opacity .3s var(--ease-out-quint), transform .3s var(--ease-out-quint);
  pointer-events: none;
  z-index: 10;
}
.bubble:hover .bubble__name {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ── Variant: WAVE (stationary sine-wave bob) ── */
.bubble-wave-wrap {
  padding: clamp(2rem, 4vw, 3rem) 0 clamp(3rem, 5vw, 4rem);
  overflow: visible;
}
.bubble-wave {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: clamp(.6rem, 1.2vw, 1rem);
  flex-wrap: nowrap;
  min-height: 180px;
}
.bubble-wave .bubble {
  animation: bubble-bob 3.5s ease-in-out infinite;
  transform-origin: center;
}
.bubble-wave .bubble:hover {
  animation-play-state: paused;
  transform: translateY(-22px) scale(1.12) !important;
}
@keyframes bubble-bob {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-18px); }
}
@media (max-width: 1100px) {
  .bubble-wave {
    overflow-x: auto;
    justify-content: flex-start;
    padding: 2rem clamp(1rem, 4vw, 3rem);
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .bubble-wave::-webkit-scrollbar { display: none; }
  .bubble-wave .bubble { scroll-snap-align: center; }
}

/* ── Variant: MARQUEE (dual-row infinite river) ── */
.bubble-marquee {
  display: flex;
  flex-direction: column;
  gap: clamp(1rem, 2vw, 1.75rem);
  padding: clamp(2rem, 4vw, 3rem) 0;
  overflow: hidden;
  position: relative;
}
.bubble-marquee::before,
.bubble-marquee::after {
  content: '';
  position: absolute;
  top: 0; bottom: 0;
  width: clamp(40px, 8vw, 120px);
  z-index: 3;
  pointer-events: none;
}
.bubble-marquee::before {
  left: 0;
  background: linear-gradient(to right, #fff, rgba(255,255,255,0));
}
.bubble-marquee::after {
  right: 0;
  background: linear-gradient(to left, #fff, rgba(255,255,255,0));
}
.bubble-marquee__row {
  display: flex;
  gap: clamp(.75rem, 1.5vw, 1.25rem);
  flex-wrap: nowrap;
  width: max-content;
  align-items: center;
}
.bubble-marquee__row--right {
  animation: bubble-marquee-right 48s linear infinite;
}
.bubble-marquee__row--left {
  animation: bubble-marquee-left 54s linear infinite;
}
@keyframes bubble-marquee-right {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
@keyframes bubble-marquee-left {
  from { transform: translateX(-50%); }
  to   { transform: translateX(0); }
}
/* gentle vertical wobble on top of the drift */
.bubble-marquee .bubble {
  animation: bubble-bob 4s ease-in-out infinite;
}
.bubble-marquee__row:hover {
  animation-play-state: paused;
}

/* ── Variant: FALL (scroll-linked descent) ── */
.bubble-fall-wrap {
  position: relative;
  min-height: 520px;
  padding: clamp(2rem, 4vw, 3rem) 0;
  overflow: hidden;
}
.bubble-fall {
  position: relative;
  width: 100%;
  min-height: 480px;
}
.bubble-fall .bubble {
  position: absolute;
  left: var(--col, 50%);
  top: var(--row, 0%);
  transform: translate(-50%, calc(-120% + var(--fall-progress, 0) * 100%));
  transition: transform .9s cubic-bezier(.2, .6, .2, 1);
  animation: bubble-bob 5s ease-in-out infinite;
  animation-delay: var(--bob-delay, 0s);
}
.bubble-fall.is-settled .bubble {
  transform: translate(-50%, 0);
}

/* Reduced motion: freeze everything */
@media (prefers-reduced-motion: reduce) {
  .bubble-wave .bubble,
  .bubble-marquee .bubble,
  .bubble-fall .bubble,
  .bubble-marquee__row--right,
  .bubble-marquee__row--left { animation: none !important; }
}

/* ══════════════════════════════════════════════════════════
   BUBBLE POP: click modal
   ══════════════════════════════════════════════════════════ */
.bubble-pop {
  position: fixed;
  inset: 0;
  background: rgba(255, 255, 255, 0.55);
  -webkit-backdrop-filter: blur(24px) saturate(1.2);
  backdrop-filter: blur(24px) saturate(1.2);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity .45s var(--ease-out-expo);
  padding: 1.5rem;
}
.bubble-pop.is-open {
  opacity: 1;
  pointer-events: auto;
}
.bubble-pop__card {
  background: #fff;
  border-radius: 24px;
  padding: clamp(2rem, 4vw, 3rem);
  box-shadow:
    0 40px 100px rgba(0, 84, 157, 0.18),
    0 8px 24px rgba(0, 0, 0, 0.06);
  max-width: 460px;
  width: 100%;
  text-align: center;
  transform: scale(.88) translateY(20px);
  transition: transform .55s var(--ease-out-expo);
  position: relative;
  border: 1px solid var(--text-faint);
}
.bubble-pop.is-open .bubble-pop__card {
  transform: scale(1) translateY(0);
}
.bubble-pop__img {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 1.5rem;
  display: block;
  box-shadow: 0 18px 40px rgba(0, 84, 157, 0.14);
  border: 4px solid #fff;
}
.bubble-pop__name {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 2.5vw, 1.8rem);
  font-weight: 400;
  letter-spacing: var(--ls-tight);
  color: var(--navy);
  margin: 0 0 .5rem;
}
.bubble-pop__desc {
  color: var(--text-dim);
  font-size: .92rem;
  line-height: 1.55;
  margin: 0 0 1.75rem;
}
.bubble-pop__cta {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .8rem 1.75rem;
  background: var(--navy);
  color: #fff;
  border-radius: 9999px;
  text-decoration: none;
  font-weight: 500;
  font-size: .88rem;
  transition: background .3s var(--ease-out-quint), transform .3s var(--ease-out-quint);
}
.bubble-pop__cta:hover {
  background: var(--navy-mid);
  transform: translateY(-2px);
}
.bubble-pop__close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--text-faint);
  cursor: pointer;
  color: var(--text-dim);
  display: grid;
  place-items: center;
  font-size: 1.1rem;
  transition: background .3s, color .3s;
}
.bubble-pop__close:hover {
  background: #fff;
  color: var(--navy);
}

/* Contact page: no-input options column (WCAG AA on light surfaces) */
.contact-options {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.contact-options__card {
  border: 1px solid var(--text-faint);
  padding: 1.15rem 1.25rem;
  border-radius: 4px;
  background: var(--surface);
  transition: border-color .35s var(--ease-out-quint), transform .35s var(--ease-out-quint), box-shadow .35s var(--ease-out-quint);
}
.contact-options__card:hover {
  border-color: rgba(0,174,199,.45);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,84,157,.06);
}
.contact-options__header {
  display: flex;
  align-items: center;
  gap: .65rem;
  margin-bottom: .55rem;
}
.contact-options__icon {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(0,174,199,.35);
  border-radius: 4px;
  color: var(--cyan);
  flex-shrink: 0;
}
.contact-options__icon svg { width: 16px; height: 16px; }
.contact-options__eyebrow {
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #006b7d;
  margin-bottom: 0;
}
.contact-options__lead {
  font-size: 0.88rem;
  margin: 0 0 0.8rem 0;
  color: #4b5c6e;
  line-height: 1.55;
}
.contact-options__notice {
  margin: 0;
  font-size: 0.83rem;
  border-left: 2px solid #006b7d;
  padding-left: 0.85rem;
  color: #4b5c6e;
  line-height: 1.55;
}
.contact-options .btn--ghost {
  color: #3d4d5c;
  border-color: rgba(0, 84, 157, 0.22);
}
.contact-options .btn--ghost:hover {
  color: var(--navy);
  border-color: var(--navy);
}

/* ── Testimonials (home page) ─────────────────────────────
   Pure CSS pull-quote grid. No JS dependency, no carousel —
   three static cards pre-filled with placeholder copy until
   real attributable quotes are supplied. The amber placeholder
   banner in index.html prevents accidental launch with
   unfilled copy. */
.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 3rem;
}
.testimonial-card {
  position: relative;
  padding: 2rem 1.75rem 1.75rem;
  border: 1px solid var(--text-faint);
  border-radius: 12px;
  background: var(--white);
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  transition: border-color .35s var(--ease-out-quint), transform .35s var(--ease-out-quint), box-shadow .35s var(--ease-out-quint);
}
.testimonial-card:hover {
  border-color: rgba(0,174,199,.45);
  transform: translateY(-3px);
  box-shadow: 0 16px 40px rgba(0,84,157,.08);
}
.testimonial-card__mark {
  position: absolute;
  top: .5rem;
  left: 1.25rem;
  font-family: var(--font-display);
  font-size: 3.5rem;
  line-height: 1;
  color: var(--cyan);
  opacity: .28;
  pointer-events: none;
  user-select: none;
}
.testimonial-card__quote {
  font-size: 1.02rem;
  line-height: 1.6;
  color: var(--text);
  font-style: italic;
  position: relative;
  z-index: 1;
}
.testimonial-card__attribution {
  display: flex;
  align-items: center;
  gap: .85rem;
  padding-top: 1rem;
  border-top: 1px solid var(--text-faint);
}
.testimonial-card__role-mark {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--cyan) 0%, var(--navy) 100%);
  display: grid;
  place-items: center;
  color: var(--white);
  font-family: var(--font-display);
  font-size: .9rem;
  font-weight: 500;
  flex-shrink: 0;
}
.testimonial-card__role {
  font-size: .82rem;
  color: var(--text);
  font-weight: 600;
  line-height: 1.3;
}
.testimonial-card__org {
  font-size: .72rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-top: .2rem;
}
/* Visible amber banner that flags placeholder quotes. Remove this
   block + the matching banner element in index.html once real
   quotes are wired in. */
.testimonials-placeholder-banner {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .85rem 1.1rem;
  margin-bottom: 2rem;
  background: #fff8e6;
  border: 1px solid #e8c25a;
  border-radius: 6px;
  color: #6b4e00;
  font-size: .82rem;
  line-height: 1.5;
}
.testimonials-placeholder-banner svg { width: 18px; height: 18px; flex-shrink: 0; color: #b37d00; }
.testimonial-card[data-placeholder="true"] .testimonial-card__quote::before {
  content: '[PLACEHOLDER] ';
  font-style: normal;
  font-weight: 700;
  color: #b37d00;
  letter-spacing: .06em;
  font-size: .72rem;
  display: inline-block;
  vertical-align: middle;
  margin-right: .4rem;
  padding: .15rem .45rem;
  background: #fff3cc;
  border-radius: 2px;
}

/* ── Gyroscope tilt (orthotics page, touch devices only) ──
   The .ortho-tilt-active class is added to body only when JS has
   successfully attached the deviceorientation listener, so these
   3D-context rules don't apply to desktop or reduced-motion users. */
.ortho-tilt-active .portfolio-grid { perspective: 1000px; }
.ortho-tilt-active .portfolio-item {
  transform-style: preserve-3d;
  transition: transform .08s linear;
  will-change: transform;
}

.ortho-tilt-pill {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 900;
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .65rem 1rem;
  border: 1px solid rgba(0,174,199,.6);
  border-radius: 999px;
  background: rgba(0, 84, 157, .95);
  color: var(--white);
  font-family: var(--font-body);
  font-size: .82rem;
  font-weight: 500;
  letter-spacing: .02em;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(0, 51, 102, .25);
  backdrop-filter: blur(8px);
  transition: transform .25s var(--ease-out-quint), box-shadow .25s;
  animation: ortho-tilt-pill-enter .35s var(--ease-out-quint);
}
.ortho-tilt-pill:hover,
.ortho-tilt-pill:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(0, 51, 102, .32);
}
.ortho-tilt-pill svg { width: 16px; height: 16px; color: var(--cyan); }

@keyframes ortho-tilt-pill-enter {
  from { transform: translateY(60px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}

@media (max-width: 480px) {
  .ortho-tilt-pill {
    right: .75rem;
    bottom: .75rem;
    padding: .55rem .9rem;
    font-size: .78rem;
  }
}

/* ── Legal documents (privacy.html, terms.html) ──────────────
   Shared typographic styling for long-form policy pages, plus the
   footer legal links present on every page. */
.legal-doc { max-width: 820px; }
.legal-doc__meta {
  font-size: .85rem; color: var(--text-dim);
  margin: 0 0 2.5rem; padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--text-faint);
}
.legal-doc h2 {
  font-family: var(--font-display); font-weight: 400;
  font-size: clamp(1.25rem, 2.4vw, 1.6rem);
  letter-spacing: var(--ls-tight); color: var(--navy);
  margin: 2.75rem 0 1rem; scroll-margin-top: 6rem;
}
.legal-doc h3 {
  font-size: 1.02rem; font-weight: 600; color: var(--text);
  margin: 1.75rem 0 .55rem;
}
.legal-doc p { color: var(--text-mid); line-height: 1.75; margin: 0 0 1rem; }
.legal-doc ul { margin: 0 0 1.25rem; padding-left: 1.3rem; }
.legal-doc li { color: var(--text-mid); line-height: 1.7; margin-bottom: .5rem; }
.legal-doc a { color: var(--navy); text-decoration: underline; text-underline-offset: 2px; }
.legal-doc a:hover { color: var(--navy-mid); }
.legal-doc strong { color: var(--text); }

/* Draft-review banner — REMOVE after legal counsel signs off. */
.legal-draft-banner {
  display: flex; align-items: flex-start; gap: .8rem;
  background: #fff8e6; border: 1px solid #e8c860;
  border-radius: 10px; padding: 1rem 1.25rem; margin: 0 0 2.5rem;
  color: #6f5300; font-size: .9rem; line-height: 1.6;
}
.legal-draft-banner svg {
  width: 20px; height: 20px; flex-shrink: 0;
  color: #c8920a; margin-top: .15rem;
}

/* Footer legal links (Privacy / Terms) next to the copyright line. */
.footer__legal { display: inline; }
.footer__legal a {
  color: var(--text-dim); text-decoration: none;
  margin-left: .9rem; transition: color .25s var(--ease-out-quint);
}
.footer__legal a:hover { color: var(--navy); }
@media (max-width: 600px) {
  .footer__legal { display: block; margin-top: .6rem; }
  .footer__legal a:first-child { margin-left: 0; }
}
