/* ==========================================================================
   Chao Pinhole® — thepinholeclinic.com
   Mobile-first stylesheet. Tokens mirror the original Elementor kit.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Tokens
   -------------------------------------------------------------------------- */
:root {
  /* Brand palette (from the original Elementor global colors) */
  --gold:        #DD9933;
  --gold-dark:   #C4842A;
  --rose:        #C04557;
  --rose-dark:   #A93748;
  --red:         #CA0000;
  --ink:         #2A2B2B;
  --ink-soft:    #252525;
  --black:       #090B0B;
  --navy:        #25303F;
  --navy-deep:   #0D1B2A;
  --cream:       #F4DEBE;
  --mist:        #E5EBF1;
  --white:       #FFFFFF;
  --muted:       #5C6570;
  --line:        rgba(42, 43, 43, .14);

  /* Type */
  --font-display: "DM Serif Display", Georgia, "Times New Roman", serif;
  --font-body:    Montserrat, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  /* Fluid type scale — mobile floor → desktop ceiling */
  --fs-hero:    clamp(1.75rem, 1.10rem + 3.2vw, 3.5rem);   /* 28 → 56 */
  --fs-h2:      clamp(1.75rem, 1.25rem + 2.4vw, 3.125rem); /* 28 → 50 */
  --fs-h3:      clamp(1.25rem, 1.05rem + 1.0vw, 1.75rem);  /* 20 → 28 */
  --fs-eyebrow: clamp(1rem,    0.93rem + 0.4vw, 1.5625rem);/* 16 → 25 */
  --fs-body:    clamp(0.9375rem, 0.90rem + 0.2vw, 1.125rem);
  --fs-small:   0.875rem;

  /* Rhythm */
  --shell:      1200px;
  --gutter:     clamp(1rem, 0.6rem + 2vw, 2.5rem);
  --section-y:  clamp(2.75rem, 1.5rem + 5vw, 5.625rem);
  --radius:     14px;
  --radius-pill: 50px;

  --shadow-sm: 0 2px 10px rgba(0, 0, 0, .08);
  --shadow-md: 0 6px 26px rgba(0, 0, 0, .12);
  --shadow-lg: 0 18px 50px rgba(0, 0, 0, .18);

  /* Height of the sticky header, kept in sync by JS for anchor offsets */
  --header-h: 76px;

  /* Height of the fixed mobile call/book bar. Also used to lift the chat
     widget clear of it — keep the two in sync. */
  --mobile-cta-h: 54px;

  /* Animated CTA outline. Symmetrical so the 0%->100% sweep loops seamlessly. */
  --glow-gradient: linear-gradient(90deg,#DD9933,#F7C765,#FFF3CF,#F7C765,#DD9933);
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 12px);
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
}

body {
  margin: 0;
  background: var(--white);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

h1, h2, h3, h4 { margin: 0 0 .5em; line-height: 1.15; text-wrap: balance; }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

a { color: inherit; }

button { font: inherit; color: inherit; }

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

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 999;
  background: var(--ink);
  color: var(--white);
  padding: .75rem 1.25rem;
  border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* --------------------------------------------------------------------------
   3. Layout primitives
   -------------------------------------------------------------------------- */
.shell {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.shell--wide { max-width: 1400px; }

.section { padding-block: var(--section-y); }
.section--flush { padding-block: 0; }
.section--mist  { background: var(--mist); }
.section--cream { background: var(--cream); }
.section--gold  { background: var(--gold); color: var(--white); }
.section--navy  { background: var(--navy-deep); color: var(--white); }
.section--black { background: var(--black); color: var(--white); }

.section--pattern {
  background-image: url("../img/pattern.png");
  background-repeat: repeat;
}

.stack > * + * { margin-top: 1rem; }
.center { text-align: center; }

/* --------------------------------------------------------------------------
   4. Typography helpers
   -------------------------------------------------------------------------- */
.eyebrow {
  font-family: var(--font-body);
  font-size: var(--fs-eyebrow);
  font-weight: 500;
  line-height: 1.2;
  text-transform: capitalize;
  color: var(--ink-soft);
  margin-bottom: .15em;
}
.section--gold .eyebrow,
.section--navy .eyebrow,
.section--black .eyebrow { color: var(--white); }

.display {
  font-family: var(--font-display);
  font-size: var(--fs-h2);
  font-weight: 700;
  line-height: 1.1;
  color: var(--gold);
}
.display--ink   { color: var(--ink); }
.display--white { color: var(--white); }

.lede { font-size: clamp(1rem, .95rem + .35vw, 1.1875rem); }

/* --------------------------------------------------------------------------
   5. Buttons
   -------------------------------------------------------------------------- */
.btn {
  --btn-bg: var(--gold);
  --btn-fg: var(--white);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .55em;
  min-height: 48px;                 /* comfortable tap target */
  padding: .7em 1.5em;
  background: var(--btn-bg);
  color: var(--btn-fg);
  border: 2px solid transparent;
  border-radius: var(--radius-pill);
  font-family: var(--font-body);
  font-size: clamp(.875rem, .82rem + .25vw, 1rem);
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .25s, color .25s, border-color .25s, transform .15s;
}
.btn:hover  { background: color-mix(in srgb, var(--btn-bg) 86%, #000); }
.btn:active { transform: translateY(1px); }

.btn--rose    { --btn-bg: var(--rose); }
.btn--rose:hover { background: var(--rose-dark); }
.btn--ghost   { --btn-bg: transparent; --btn-fg: var(--white); border-color: currentColor; }
.btn--ghost:hover { background: rgba(255, 255, 255, .14); }
.btn--outline { --btn-bg: transparent; --btn-fg: var(--gold); border-color: var(--gold); }
.btn--outline:hover { background: var(--gold); color: var(--white); }
.btn--block   { width: 100%; }

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
}
.btn-row--center { justify-content: center; }

/* ---- Animated gold CTA -----------------------------------------------------
   Two background layers: a solid fill clipped to the padding box, and the
   gradient clipped to the border box, showing through the transparent border.
   That gives a real gradient outline without a wrapper or a pseudo-element
   fighting the button's own background for stacking order.

   Border width is left at the .btn value of 2px on purpose — glow and non-glow
   buttons sit side by side in the same row, and changing it would make them
   different heights.

   The hover rule has to restate `background`, because .btn:hover sets the
   shorthand and would otherwise flatten both layers back to a single colour. */
.btn--glow,
.btn--glow:hover,
.btn--glow:focus-visible {
  --glow-fill: var(--btn-bg);
  background:
    linear-gradient(var(--glow-fill), var(--glow-fill)) padding-box,
    var(--glow-gradient) border-box;
  background-size: 100% 100%, 200% 100%;
  background-repeat: no-repeat;
  animation: btn-glow-shift 3s linear infinite,
             btn-glow-pulse 2.4s ease-in-out infinite;
}
.btn--glow:hover { --glow-fill: color-mix(in srgb, var(--btn-bg) 86%, #000); }

/* Ghost buttons have a transparent fill, so the gradient ring sits on whatever
   is behind them — keep that, just darken slightly on hover. */
.btn--ghost.btn--glow:hover { --glow-fill: rgba(255, 255, 255, .14); }

/* .btn--ghost sets border-color: currentColor, which would paint over the
   gradient border-box layer. The ring has to win. */
.btn--ghost.btn--glow { border-color: transparent; }

@keyframes btn-glow-shift {
  from { background-position: 0 0,   0% 50%; }
  to   { background-position: 0 0, 100% 50%; }
}

@keyframes btn-glow-pulse {
  0%, 100% { box-shadow: 0 0 10px rgba(221, 153, 51, .35), 0 0 0 1px rgba(221, 153, 51, .22); }
  50%      { box-shadow: 0 0 26px rgba(247, 199, 101, .62), 0 0 0 3px rgba(247, 199, 101, .30); }
}

/* --------------------------------------------------------------------------
   6. Header
   -------------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--white);
  box-shadow: 0 0 20px rgba(0, 0, 0, .2);
}

/* Mobile call strip — scrolls away, so the sticky header stays short */
.header-callbar {
  background: var(--red);
  text-align: center;
}
.header-callbar a {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  min-height: 48px;
  padding: .5rem 1rem;
  color: var(--white);
  font-size: clamp(1.125rem, 1rem + 1.4vw, 1.5rem);
  font-weight: 600;
  text-decoration: none;
}

.header-main {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 1rem;
  padding-block: .5rem;
}

.header-logo img { width: 52px; }

.header-meta { display: none; }

.header-actions {
  display: flex;
  align-items: center;
  gap: .5rem;
  justify-self: end;
}
.header-actions .btn { display: none; }

/* Hamburger */
.nav-toggle {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 48px;
  height: 48px;
  padding: 0 11px;
  background: none;
  border: 0;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform .25s, opacity .2s;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Primary nav — a popup panel at EVERY width, opened by the hamburger.
   Anchored to .site-header (position: sticky already establishes a containing
   block for the absolute panel). A click-catching backdrop sits behind it so
   tapping away closes the menu; site.js also closes on link click and Escape. */
.primary-nav {
  position: absolute;
  top: 100%;
  right: 0;
  left: 0;
  z-index: 101;
  background: var(--gold);
  box-shadow: 0 14px 30px rgba(0, 0, 0, .28);
  max-height: calc(100dvh - var(--header-h) - 1rem);
  overflow-y: auto;
  overscroll-behavior: contain;
  display: none;
}
.primary-nav[data-open="true"] { display: block; }

.primary-nav ul {
  list-style: none;
  margin: 0 auto;
  padding: .35rem 0;
  max-width: var(--shell);
}
.primary-nav a {
  display: block;
  padding: .9rem var(--gutter);
  color: var(--white);
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  text-transform: capitalize;
  border-bottom: 1px solid rgba(255, 255, 255, .22);
}
.primary-nav li:last-child a { border-bottom: 0; }
.primary-nav a:hover,
.primary-nav a[aria-current="page"] { background: rgba(0, 0, 0, .16); }

/* Backdrop — only rendered while the menu is open. */
.nav-backdrop {
  position: fixed;
  inset: 0;
  z-index: 99;
  background: rgba(9, 11, 11, .45);
  border: 0;
  padding: 0;
  cursor: default;
}

/* --------------------------------------------------------------------------
   7. Hero
   -------------------------------------------------------------------------- */
.hero {
  position: relative;
  background: var(--black) url("../img/hero-bg-mobile.webp") center / cover no-repeat;
  color: var(--white);
  padding-block: clamp(2.5rem, 1.5rem + 4vw, 4.375rem);
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, .55), rgba(0, 0, 0, .35));
}
.hero > * { position: relative; }

.hero-grid {
  display: grid;
  gap: clamp(1.5rem, 1rem + 3vw, 3rem);
}

.hero h1 {
  font-family: var(--font-body);
  font-size: clamp(1.5rem, 1.15rem + 1.7vw, 2.5rem);
  font-weight: 600;
  color: var(--white);
  margin-bottom: .6rem;
}
.hero-sub {
  font-family: var(--font-display);
  font-size: var(--fs-hero);
  font-weight: 700;
  line-height: 1.08;
  color: var(--gold);
  margin: 0 0 1.25rem;
}
.hero-sub em { font-style: normal; display: block; }

.hero-card {
  background: rgba(0, 0, 0, .38);
  border: 1px solid rgba(221, 153, 51, .35);
  border-radius: var(--radius);
  padding: 1.25rem;
  backdrop-filter: blur(2px);
}
.hero-card h2 {
  font-family: var(--font-display);
  font-size: var(--fs-h3);
  color: var(--gold);
  margin-bottom: .1em;
}
.hero-card .hero-card-note {
  font-size: var(--fs-small);
  font-style: italic;
  color: var(--cream);
  margin-bottom: 1rem;
}

/* --------------------------------------------------------------------------
   8. Check list
   -------------------------------------------------------------------------- */
.checklist {
  list-style: none;
  margin: 1rem 0 0;
  padding: 0;
  display: grid;
  gap: .5rem;
}
.checklist li {
  display: grid;
  grid-template-columns: 1.25rem 1fr;
  gap: .6rem;
  align-items: start;
  font-size: var(--fs-body);
}
.checklist svg {
  width: 1rem;
  height: 1rem;
  margin-top: .35em;
  fill: var(--gold);
  flex: none;
}
.checklist--center { justify-items: center; }
.checklist--center li { justify-content: center; }

/* --------------------------------------------------------------------------
   9. CTA band (repeating "Learn if … / Call Us / Book")
   -------------------------------------------------------------------------- */
.cta-band {
  display: grid;
  gap: 1rem;
  justify-items: center;
  text-align: center;
  padding-block: clamp(1.75rem, 1.25rem + 2vw, 2.5rem);
}
.cta-band p {
  font-family: var(--font-display);
  font-size: var(--fs-h3);
  color: var(--gold);
  margin: 0;
}
.section--gold .cta-band p,
.section--navy .cta-band p,
.section--black .cta-band p { color: var(--white); }

/* --------------------------------------------------------------------------
   10. Inventor strip
   -------------------------------------------------------------------------- */
.inventor {
  display: grid;
  gap: clamp(1.25rem, 1rem + 2vw, 2.5rem);
  align-items: center;
  padding-block: var(--section-y);
}
.inventor-photo img {
  width: 100%;
  max-width: 320px;
  margin-inline: auto;
  border-radius: var(--radius);
}
.inventor h2 {
  font-family: var(--font-display);
  font-size: var(--fs-h3);
  color: var(--gold);
  margin-bottom: .1em;
}
.inventor .inventor-role {
  font-family: var(--font-body);
  font-size: var(--fs-small);
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--ink);
  margin-bottom: 1rem;
}
.inventor-stat {
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 1.05rem + 1.1vw, 2rem);
  font-weight: 500;
  line-height: 1.45;
  color: var(--ink);
}
.inventor-stat b { color: var(--gold); font-weight: 700; }

/* --------------------------------------------------------------------------
   11. Before / After comparison slider
   -------------------------------------------------------------------------- */
.ba {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--ink);
  touch-action: pan-y;                /* let the page scroll vertically */
  user-select: none;
  -webkit-user-select: none;
}
.ba-frame { position: relative; display: block; }
.ba-frame img {
  width: 100%;
  display: block;
  pointer-events: none;
}
/* The clipped overlay. `width` with `left: 0` means this covers the LEFT half
   of the frame — so it holds the BEFORE photo, and the bare <img> underneath
   shows through on the RIGHT as the AFTER photo. The class name is about
   layering, not chronology; getting that backwards inverts the comparison. */
.ba-after {
  position: absolute;
  inset: 0;
  width: 50%;
  overflow: hidden;
}
.ba-after img {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: auto;
  max-width: none;
  object-fit: cover;
}

.ba-handle {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 3px;
  margin-left: -1.5px;
  background: var(--white);
  box-shadow: 0 0 8px rgba(0, 0, 0, .5);
  pointer-events: none;
}
.ba-handle::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 44px;
  height: 44px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: var(--white) no-repeat center;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' viewBox='0 0 24 24' fill='%232A2B2B'%3E%3Cpath d='M9.5 6 4 12l5.5 6v-4h5v4l5.5-6-5.5-6v4h-5z'/%3E%3C/svg%3E");
  box-shadow: 0 2px 10px rgba(0, 0, 0, .35);
}

/* ---- Idle sweep -----------------------------------------------------------
   Advertises that the divider is draggable. One pass left -> right takes 2s,
   so the full there-and-back cycle is 4s.

   Two keyframe sets rather than one animated custom property, so this needs no
   @property support; identical duration and easing keep them in lockstep.

   Animations outrank inline styles in the cascade, so these override the
   width/left that site.js writes on load — and `animation: none` on
   interaction hands control straight back to it. No JS involved either way.

   It stops short of 0%/100% because the 44px handle is centred on its
   position: at the exact edges half of it would be clipped by the frame. */
@keyframes ba-sweep-clip {
  0%, 100% { width: 8%; }
  50%      { width: 92%; }
}
@keyframes ba-sweep-handle {
  0%, 100% { left: 8%; }
  50%      { left: 92%; }
}

/* Opt-in, via .ba--animated. Only the hero slider sweeps: it is the one on
   screen at load, where the hint is worth spending motion on. The four below
   the fold stay parked at the 50% site.js sets — five sliders animating
   forever is noise, and they are just as draggable without it. */
.ba--animated .ba-after  { animation: ba-sweep-clip   4s ease-in-out infinite; }
.ba--animated .ba-handle { animation: ba-sweep-handle 4s ease-in-out infinite; }

/* Pause under the cursor so the comparison can actually be read... */
@media (hover: hover) {
  .ba--animated:hover .ba-after,
  .ba--animated:hover .ba-handle { animation-play-state: paused; }
}

/* ...and drop the animation entirely once the visitor takes hold of it, so
   their position sticks. Pressing the range focuses it, and that focus
   outlives the drag, so :focus-within keeps the sweep off afterwards. */
.ba--animated:active .ba-after,
.ba--animated:active .ba-handle,
.ba--animated:focus-within .ba-after,
.ba--animated:focus-within .ba-handle { animation: none; }

.ba-range {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: ew-resize;
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
}
.ba-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 48px;
  height: 100%;
  cursor: ew-resize;
}
.ba-range::-moz-range-thumb {
  width: 48px;
  height: 100%;
  border: 0;
  cursor: ew-resize;
}

.ba-label {
  position: absolute;
  top: .75rem;
  padding: .3rem .7rem;
  background: rgba(9, 11, 11, .72);
  color: var(--white);
  border-radius: var(--radius-pill);
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  pointer-events: none;
}
.ba-label--before { left: .75rem; }
.ba-label--after  { right: .75rem; }

.ba-caption {
  font-family: var(--font-display);
  font-size: var(--fs-h3);
  color: var(--gold);
  text-align: center;
  margin: .85rem 0 0;
}

.case-grid {
  display: grid;
  gap: clamp(1.25rem, 1rem + 2vw, 2rem);
}

/* --------------------------------------------------------------------------
   12. Carousel (scroll-snap; no library)
   -------------------------------------------------------------------------- */
.carousel { position: relative; }

/* Flex, not grid: `grid-auto-columns` with a percentage max lets the tracks
   collapse to fit the container instead of overflowing, so nothing scrolls. */
.carousel-track {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  padding-bottom: .75rem;
  scrollbar-width: thin;
  overscroll-behavior-x: contain;
}
.carousel-track > * {
  flex: 0 0 var(--slide-w, 78%);
  min-width: 0;            /* without this, flex-basis loses to the image's intrinsic width */
  scroll-snap-align: center;
}
.carousel-track img {
  width: 100%;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.carousel-track::-webkit-scrollbar { height: 6px; }
.carousel-track::-webkit-scrollbar-thumb {
  background: rgba(42, 43, 43, .3);
  border-radius: 3px;
}

.carousel-nav {
  display: flex;
  justify-content: center;
  gap: .75rem;
  margin-top: 1rem;
}
.carousel-btn {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  background: var(--white);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 50%;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
}
.carousel-btn:hover { background: var(--gold); color: var(--white); border-color: var(--gold); }
.carousel-btn svg { width: 18px; height: 18px; fill: currentColor; }

/* ---- Before & After gallery ------------------------------------------------
   Each source image is a 695x250 panorama with the before/after pair, dates and
   captions already baked in. The old 4-across carousel rendered them ~264px
   wide, which made that baked-in detail unreadable, and hid half the cases
   behind a horizontal scroll with no affordance.

   A two-column grid gives each one ~540px — close to native size — and puts
   every case on screen without scrolling sideways. */
.ba-gallery {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: clamp(1.25rem, 1rem + 1.5vw, 2rem);
}

.ba-gallery figure {
  margin: 0;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  height: 100%;
}

.ba-gallery img {
  width: 100%;
  height: auto;
  display: block;
}

.ba-gallery figcaption {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: .35rem 1rem;
  padding: .75rem 1rem;
  border-top: 1px solid var(--line);
  font-size: .875rem;
}
.ba-gallery figcaption b {
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--gold);
}
.ba-gallery figcaption span { color: var(--muted); font-variant-numeric: tabular-nums; }

/* --------------------------------------------------------------------------
   13. Patient spotlight card
   -------------------------------------------------------------------------- */
.spotlight {
  display: grid;
  gap: 1.5rem;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  padding: clamp(1.25rem, 1rem + 2vw, 2.5rem);
  text-align: center;
}
.spotlight-avatar img {
  width: 132px;
  height: 132px;
  margin-inline: auto;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--gold);
}
.spotlight-name {
  font-family: var(--font-display);
  font-size: var(--fs-h3);
  color: var(--ink);
  margin-top: .75rem;
}
.spotlight-title {
  font-size: var(--fs-small);
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--gold);
}
.stars { color: var(--gold); letter-spacing: .15em; font-size: 1.125rem; }
.spotlight-quote + .spotlight-quote { margin-top: 1rem; }
.spotlight-quote p { margin: 0; font-style: italic; }
.spotlight-label {
  display: inline-block;
  font-style: normal;
  font-weight: 700;
  letter-spacing: .08em;
  color: var(--gold);
  margin-right: .35em;
}

/* --------------------------------------------------------------------------
   14. Research / studies
   -------------------------------------------------------------------------- */
.study {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(1.1rem, .9rem + 1.2vw, 1.75rem);
}
.study + .study { margin-top: 1.25rem; }
.study h3 {
  font-family: var(--font-display);
  font-size: var(--fs-h3);
  color: var(--ink);
}
.study-meta {
  font-size: var(--fs-small);
  color: var(--muted);
  margin-bottom: 1rem;
}
.study-meta b { color: var(--ink); }
.study h4 {
  font-size: 1rem;
  font-weight: 700;
  margin: 1.25rem 0 .5rem;
}
.study ul { margin: 0 0 1.25rem; padding-left: 1.1rem; }
.study li { margin-bottom: .5rem; }

/* --------------------------------------------------------------------------
   15. Comparison table
   -------------------------------------------------------------------------- */
.compare {
  width: 100%;
  border-collapse: collapse;
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.compare th, .compare td {
  padding: .85rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--line);
  font-size: var(--fs-body);
  vertical-align: top;
}
.compare thead th {
  background: var(--ink);
  color: var(--white);
  font-family: var(--font-body);
  font-size: .875rem;
  font-weight: 700;
  letter-spacing: .02em;
}
.compare thead th:nth-child(2) { background: var(--gold); }
.compare tbody th { font-weight: 700; background: var(--mist); }
.compare tbody tr:last-child th,
.compare tbody tr:last-child td { border-bottom: 0; }

/* Card layout on narrow screens */
@media (max-width: 39.99em) {
  .compare, .compare tbody, .compare tr, .compare td, .compare th { display: block; }
  .compare thead { display: none; }
  .compare {
    background: transparent;
    box-shadow: none;
    border-radius: 0;
  }
  .compare tr {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    margin-bottom: 1rem;
    overflow: hidden;
  }
  .compare tbody th {
    background: var(--ink);
    color: var(--white);
    border-bottom: 0;
  }
  .compare td {
    padding-top: .35rem;
    padding-bottom: .85rem;
  }
  .compare td::before {
    content: attr(data-label);
    display: block;
    font-size: .6875rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: .2rem;
  }
  .compare td:first-of-type::before { color: var(--gold); }
}

/* --------------------------------------------------------------------------
   16. Testimonials
   -------------------------------------------------------------------------- */
.quote-grid {
  display: grid;
  gap: 1.25rem;
}
.quote-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: clamp(1.1rem, .9rem + 1.2vw, 1.75rem);
  display: grid;
  gap: .6rem;
  align-content: start;
}
.quote-card .stars { font-size: 1rem; }

/* Google review cards */
.quote-grid { list-style: none; padding: 0; }

.quote-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--mist);
}
.quote-name {
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: var(--ink);
  margin: 0;
}
.quote-card blockquote p { margin-bottom: .75rem; }
.quote-card blockquote b { color: var(--ink); font-weight: 700; }

.quote-link {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  min-height: 44px;
  margin-top: auto;
  font-size: .875rem;
  font-weight: 600;
  color: var(--gold);
  text-decoration: none;
}
.quote-link:hover { text-decoration: underline; }
.quote-link img { flex: none; }
.quote-card blockquote { margin: 0; }
.quote-card blockquote p:first-child { font-weight: 600; }
.quote-card cite {
  font-style: normal;
  font-weight: 600;
  color: var(--gold);
}

/* --------------------------------------------------------------------------
   17. Video tabs (media features)
   -------------------------------------------------------------------------- */
.tabs-list {
  display: grid;
  gap: .5rem;
  margin-bottom: 1.25rem;
  padding: 0;
}
.tab-btn {
  width: 100%;
  text-align: left;
  padding: .85rem 1rem;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: .9375rem;
  font-weight: 600;
  line-height: 1.35;
  cursor: pointer;
  transition: background-color .2s, color .2s, border-color .2s;
}
.tab-btn[aria-selected="true"] {
  background: var(--gold);
  color: var(--white);
  border-color: var(--gold);
}

.video-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  background: var(--black);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}
.video-frame iframe,
.video-frame > button {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
/* Vertical 9:16 frame for the Dr. Chao YouTube Short in the inventor strip */
.short-frame {
  position: relative;
  aspect-ratio: 9 / 16;
  width: 100%;
  max-width: 280px;
  margin-inline: auto;
  background: var(--black);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}
.short-frame iframe,
.short-frame > button {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* Click-to-load YouTube facade — no third-party request until the user asks */
.yt-facade {
  display: grid;
  place-items: center;
  background: var(--black) center / cover no-repeat;
  cursor: pointer;
  padding: 0;
}
.yt-facade::after {
  content: "";
  width: 68px;
  height: 48px;
  border-radius: 12px;
  background: rgba(202, 0, 0, .9) no-repeat center;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M8 5v14l11-7z'/%3E%3C/svg%3E");
}
.yt-facade:hover::after { background-color: #f00; }

/* --------------------------------------------------------------------------
   18. Accordion (FAQ)
   -------------------------------------------------------------------------- */
.accordion { display: grid; gap: .75rem; }

.accordion details {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
}
.accordion summary {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  min-height: 48px;
  padding: .9rem 1rem;
  font-weight: 600;
  line-height: 1.4;
  cursor: pointer;
  list-style: none;
}
.accordion summary::-webkit-details-marker { display: none; }
.accordion summary::after {
  content: "";
  flex: none;
  width: 1.25rem;
  height: 1.25rem;
  margin-top: .15em;
  background: no-repeat center / contain;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23DD9933'%3E%3Cpath d='M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6z'/%3E%3C/svg%3E");
  transition: transform .25s;
}
.accordion details[open] summary { background: var(--cream); }
.accordion details[open] summary::after {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23DD9933'%3E%3Cpath d='M19 13H5v-2h14z'/%3E%3C/svg%3E");
}
.accordion .accordion-body { padding: 1rem; border-top: 1px solid var(--line); }

/* Simple "Common Questions" list */
.qa-list { display: grid; gap: 1rem; }
.qa-list dt { font-weight: 700; color: var(--gold); }
.qa-list dd { margin: .15rem 0 0; }

/* --------------------------------------------------------------------------
   19. Booking + offer
   -------------------------------------------------------------------------- */
.booking-frame {
  background: var(--white);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 24px rgba(0, 0, 0, .10);
}
/* form_embed.js sets an inline height once the widget reports its size.
   min-height only stops the frame collapsing before that message arrives. */
.booking-frame iframe {
  width: 100%;
  min-height: 600px;
  border: 0;
}

.offer {
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(221, 153, 51, .45);
  border-radius: var(--radius);
  padding: clamp(1.25rem, 1rem + 2vw, 2rem);
  text-align: center;
  margin-top: 2rem;
}
.offer h2 {
  font-family: var(--font-display);
  font-size: var(--fs-h3);
  color: var(--gold);
}
.countdown {
  display: flex;
  justify-content: center;
  gap: .75rem;
  margin: 1.25rem 0;
}
.countdown div {
  min-width: 72px;
  padding: .6rem .5rem;
  background: var(--gold);
  color: var(--white);
  border-radius: 10px;
}
.countdown b {
  display: block;
  font-family: var(--font-display);
  font-size: 1.75rem;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
.countdown span {
  font-size: .6875rem;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.offer .fineprint {
  font-size: .75rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, .75);
  margin: 0;
}

/* --------------------------------------------------------------------------
   20. Form-note (legal links) — the site has no forms; this is the only
       survivor of the old form styles.
   -------------------------------------------------------------------------- */
.form-note {
  font-size: .75rem;
  color: var(--muted);
  margin: 0;
}
/* Inline legal links need real hit area on touch */
.form-note a,
.footer-legal a {
  display: inline-block;
  padding: .8rem .3rem;
}

/* --------------------------------------------------------------------------
   21. Contact / footer
   -------------------------------------------------------------------------- */
.contact-grid { display: grid; gap: clamp(1.5rem, 1rem + 3vw, 3rem); }

.contact-info h2 {
  font-family: var(--font-display);
  font-size: var(--fs-h2);
  color: var(--gold);
}
.contact-block + .contact-block { margin-top: 1.5rem; }
.contact-block h3 {
  font-family: var(--font-body);
  font-size: .8125rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: .35rem;
}
.contact-block a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;                  /* comfortable tap target */
  color: inherit;
  text-decoration: none;
  font-size: 1.0625rem;
}
.contact-block a:hover { text-decoration: underline; }

/* Contact CTAs — replaces the old contact form. Call / text / schedule only. */
.contact-actions h3 {
  font-family: var(--font-display);
  font-size: var(--fs-h3);
  color: var(--ink);
  margin-bottom: 1rem;
}

.action-card {
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 1rem;
  align-items: center;
  min-height: 76px;
  padding: 1rem 1.15rem;
  margin-bottom: .85rem;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  color: inherit;
  text-decoration: none;
  transition: border-color .2s, box-shadow .2s, transform .15s;
}
.action-card:hover {
  border-color: var(--gold);
  box-shadow: var(--shadow-md);
}
.action-card:active { transform: translateY(1px); }

.action-icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--mist);
}
.action-icon svg { width: 24px; height: 24px; fill: var(--gold); }

.action-body { display: grid; gap: .15rem; }
.action-body strong { font-size: 1.0625rem; line-height: 1.3; }
.action-body span { font-size: .875rem; color: var(--muted); line-height: 1.4; }

.action-card--primary {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--white);
}
.action-card--primary:hover { background: var(--gold-dark); border-color: var(--gold-dark); }
.action-card--primary .action-icon { background: rgba(255, 255, 255, .22); }
.action-card--primary .action-icon svg { fill: var(--white); }
.action-card--primary .action-body span { color: rgba(255, 255, 255, .88); }

.site-footer {
  background: var(--black);
  color: rgba(255, 255, 255, .8);
  padding-block: 2.5rem 3rem;
  text-align: center;
}
.site-footer img { width: 78px; margin-inline: auto; }
.site-footer a { color: var(--gold); }
.footer-phone {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding-inline: .5rem;
  margin-top: .5rem;
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--gold) !important;
  text-decoration: none;
}
.footer-legal {
  font-size: .8125rem;
  margin-top: 1.25rem;
}

/* Sticky mobile call bar */
.mobile-cta {
  position: fixed;
  inset: auto 0 0 0;
  z-index: 90;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: rgba(255, 255, 255, .2);
  box-shadow: 0 -4px 18px rgba(0, 0, 0, .25);
  padding-bottom: env(safe-area-inset-bottom);
}
.mobile-cta a {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .45rem;
  min-height: var(--mobile-cta-h);
  font-size: .9375rem;
  font-weight: 700;
  text-decoration: none;
  color: var(--white);
}
.mobile-cta a:first-child { background: var(--rose); }
.mobile-cta a:last-child  { background: var(--gold); }
.mobile-cta svg { width: 18px; height: 18px; fill: currentColor; }

body { padding-bottom: var(--mobile-cta-h); }   /* room for the sticky bar */

/* ---- SellWithChat / ApexChat -------------------------------------------
   The widget anchors both its invitation bubble and its chat window to
   bottom:0, which puts them straight on top of the fixed call/book bar.
   Lift both clear of it on mobile. Vendor styles are high-specificity, so
   these need !important; the max-height stops the taller chat window from
   pushing its own header off the top of the screen.
   Selectors are the vendor's element IDs — re-check them if the widget is
   ever swapped or upgraded. */
#apexchat_prechat_invitation_wrapper,
#apexchat_dompopup_chatwindow_frame {
  bottom: calc(var(--mobile-cta-h) + env(safe-area-inset-bottom)) !important;
  max-height: calc(100dvh - var(--mobile-cta-h) - env(safe-area-inset-bottom)) !important;
}

/* --------------------------------------------------------------------------
   22. Dialogs
   -------------------------------------------------------------------------- */
dialog.modal {
  width: min(560px, calc(100vw - 2rem));
  max-height: min(88dvh, 900px);
  padding: 0;
  border: 0;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
dialog.modal::backdrop { background: rgba(9, 11, 11, .65); }

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.25rem;
  background: var(--gold);
  color: var(--white);
}
.modal-head h2 {
  font-family: var(--font-display);
  font-size: 1.375rem;
  margin: 0;
}
.modal-close {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, .18);
  border: 0;
  border-radius: 50%;
  color: var(--white);
  font-size: 1.25rem;
  cursor: pointer;
}
.modal-body {
  padding: 1.25rem;
  overflow-y: auto;
  max-height: calc(88dvh - 72px);
  -webkit-overflow-scrolling: touch;
}

/* --------------------------------------------------------------------------
   23. Legal / prose pages
   -------------------------------------------------------------------------- */
.prose { max-width: 76ch; }
.prose h1 {
  font-family: var(--font-display);
  font-size: var(--fs-h2);
  color: var(--gold);
}
.prose h2, .prose h3 {
  font-family: var(--font-display);
  color: var(--ink);
  margin-top: 2rem;
}
.prose h2 { font-size: var(--fs-h3); }
.prose h3 { font-size: 1.125rem; }
.prose ul, .prose ol { padding-left: 1.25rem; }
.prose li { margin-bottom: .4rem; }
.prose a { color: var(--gold); }

/* --------------------------------------------------------------------------
   24. Breakpoints
   -------------------------------------------------------------------------- */

/* ≥ 640px — two-up grids start to make sense */
@media (min-width: 40em) {
  .carousel-track { --slide-w: 46%; }
  .quote-grid  { grid-template-columns: repeat(2, 1fr); }
  .tabs-list   { grid-template-columns: repeat(2, 1fr); }
  .checklist   { gap: .65rem; }
  .hero-sub em { display: inline; }
}

/* ≥ 900px — desktop header, side-by-side hero, no sticky call bar */
@media (min-width: 56.25em) {
  :root { --header-h: 118px; }

  body { padding-bottom: 0; }
  .mobile-cta,
  .header-callbar { display: none; }
  /* .nav-toggle stays visible — the menu is a popup at every width now. */

  /* No bar on desktop — hand the chat widget its own corner back */
  #apexchat_prechat_invitation_wrapper,
  #apexchat_dompopup_chatwindow_frame {
    bottom: 0 !important;
    max-height: none !important;
  }

  .header-main {
    grid-template-columns: auto 1fr auto;
    gap: 1.5rem;
    padding-block: .75rem;
  }
  .header-logo img { width: 62px; }

  .header-meta {
    display: flex;
    align-items: center;
    gap: .6rem;
    font-size: .875rem;
    line-height: 1.35;
    color: var(--ink);
    text-decoration: none;
  }
  .header-meta svg { width: 18px; height: 18px; fill: var(--rose); flex: none; }

  .header-actions .btn { display: inline-flex; }

  /* Panel is narrower and right-aligned on desktop rather than full-bleed. */
  .primary-nav {
    left: auto;
    width: min(340px, 92vw);
    border-radius: 0 0 var(--radius) var(--radius);
    overflow: hidden;
  }
  .primary-nav ul { padding: .25rem 0; }
  .primary-nav a { padding: .85rem 1.25rem; }

  .hero {
    background-image: url("../img/hero-bg.webp");
  }
  .hero-grid { grid-template-columns: 1.05fr .95fr; align-items: center; }

  .inventor { grid-template-columns: 320px 1fr; }
  .inventor-photo img { max-width: none; }
  .short-frame { max-width: none; margin-inline: 0; }

  .case-grid   { grid-template-columns: repeat(3, 1fr); }
  .ba-gallery  { grid-template-columns: repeat(2, 1fr); }
  .carousel-track { --slide-w: 31%; }
  .contact-grid { grid-template-columns: 1fr 1fr; align-items: start; }

  .cta-band {
    grid-auto-flow: column;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
  }

  .spotlight {
    grid-template-columns: 220px 1fr;
    text-align: left;
    align-items: center;
  }
  .spotlight-avatar img { margin-inline: 0; }
  .stars { display: block; }

  .tabs-list { grid-template-columns: repeat(3, 1fr); }
}

/* ≥ 1100px — final polish */
@media (min-width: 68.75em) {
  .quote-grid  { grid-template-columns: repeat(3, 1fr); }
  .carousel-track { --slide-w: 23.5%; }
}

/* Print */
@media print {
  .site-header, .mobile-cta, .primary-nav, .carousel-nav, dialog { display: none !important; }
  body { padding-bottom: 0; color: #000; }
}
