/* ============================================================================
   BASE — reset, typography, layout primitives
   Replaces ~103KB of Webflow-generated CSS. Same rendered result.
   ========================================================================== */

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

/* The original's body is Webflow's base, verified against the captured
   stylesheet:
     body { color:#333; background:#fff; min-height:100%; margin:0;
            font-family: Arial, sans-serif; font-size:14px; line-height:20px }

   This is NOT the site's reading font — p, headings and nearly every component
   carry their own rules. Only elements with no font rule of their own inherit
   it: rich-text list items, footer links, some buttons. Setting body to
   Montserrat 1rem/#222533 silently restyled all of those, and was the largest
   single source of drift in the migration (~1700 element differences).

   `overflow-x: hidden` was also an addition — the original has it nowhere.
   Removed; the rig checks every page for horizontal overflow. */
body {
  margin: 0;
  min-height: 100%;
  background-color: var(--white);
  color: #333;
  font-family: Arial, sans-serif;
  font-size: 14px;
  line-height: 20px;
  -webkit-font-smoothing: antialiased;
}

img, picture, video, svg { max-width: 100%; display: block; }
img { height: auto; }

/* --- Headings -------------------------------------------------------------
   The original sets margin:0 on every heading and spaces them with flex gaps.
   Reproduced rather than "improved" so vertical rhythm matches exactly.     */
h1, h2, h3, h4, h5, h6 {
  margin: 0;
  color: var(--primary-color);
  font-family: var(--font-heading);
  font-weight: var(--fw-bold);
}
h1 { font-size: var(--h1-size); line-height: var(--h1-lh); }
h2 { font-size: var(--h2-size); line-height: var(--h2-lh); }
h3 { font-size: var(--h3-size); line-height: var(--h3-lh); }
h4 { font-size: var(--h4-size); line-height: var(--h4-lh); }
h5 { font-size: var(--h5-size); line-height: var(--h5-lh); }
h6 { font-size: var(--h6-size); line-height: var(--h6-lh); }

p {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--body-size);
  font-weight: var(--fw-medium);
  line-height: var(--body-lh);
}

/* APPROVED DEVIATION — kept deliberately.
   The original declares only `a { background-color: transparent }`, so any link
   without a rule of its own falls back to browser-default #0000EE underlined.
   Unstyled default-blue links are an oversight in the original build, not a
   design choice. `.rich-text a` gives blog and service copy the intended link
   colour; this keeps everything else inheriting its component colour. */
a { color: inherit; text-decoration: none; background-color: transparent; }

ul, ol { margin: 0; padding: 0; }

blockquote {
  margin: 0 0 10px;
  padding: 10px 20px;
  border-left: 5px solid #e2e2e2;
  font-size: 18px;
  line-height: 22px;
}

/* --- Focus visibility -----------------------------------------------------
   The original had no visible focus ring. Adding one is an accessibility fix
   that costs nothing visually until a keyboard user tabs. See MISSING_ITEMS. */
:focus-visible {
  outline: 3px solid var(--button-color);
  outline-offset: 2px;
  border-radius: 2px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 1000000;
  padding: .75rem 1.25rem;
  background: var(--primary-color);
  color: var(--white);
  border-radius: 0 0 var(--radius-btn) 0;
  font-family: var(--font-heading);
  font-weight: var(--fw-bold);
}
.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);
  white-space: nowrap;
  border: 0;
}

/* --- Layout primitives ----------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--container-pad);
}

.container-default {
  width: 100%;
  max-width: var(--container-default-max);
  margin-inline: auto;
  padding-inline: var(--container-default-pad);
}

/* The original drops .container's max-width entirely below 992px. */
@media screen and (max-width: 991px) {
  .container { max-width: none; }
}

.section {
  padding-top: var(--section-pad);
  padding-bottom: var(--section-pad);
}

.page-wrapper { position: relative; padding-bottom: 1.5rem; }

/* --- Scroll-reveal --------------------------------------------------------
   The original ships 43 elements at inline opacity:0 and reveals them with
   Webflow's IX runtime (jQuery + ~200KB). Same effect, IntersectionObserver,
   no dependencies. Content is visible by default if JS never runs.          */
/* Values read out of the original's IX2 data rather than guessed. Webflow's
   `slideInBottom` is: opacity 0 + translateY(100px), animating to opacity 1 +
   translateY(0) over 1000ms with `outQuart` easing. The rebuild used 24px over
   600ms on a generic ease — a much smaller, quicker move than the real one.
   outQuart == cubic-bezier(.165, .84, .44, 1). */
.reveal {
  opacity: 0;
  transform: translateY(100px);
  transition: opacity 1s var(--ease-out-quart), transform 1s var(--ease-out-quart);
}
/* The original defines SIX reveals, not one, spread across 66 scroll events.
   Transcribed from its IX2 action lists; all six are 1000ms outQuart and all
   start from opacity 0. Which element gets which was recovered by joining the
   runtime's `data-w-id` -> action-list map against the captured pages.

     slideInBottom  translateY(100px)   the default, and the large majority
     slideInTop     translateY(-100px)  .why-choose-us-card-wrapper
     slideInLeft    translateX(-100px)  .cdcp-flex, .about-image, quicksleeper
     slideInRight   translateX(100px)   .new-pateint-2 and one paragraph
     growIn         scale(.75)
     growBigIn      scale(0)            inner-page hero titles, new-patient art

   Before this the rebuild used one motion for everything, so anything meant to
   arrive from the side or scale up was moving the wrong way. */
.reveal--top      { transform: translateY(-100px); }
.reveal--left     { transform: translateX(-100px); }
.reveal--right    { transform: translateX(100px); }
.reveal--grow     { transform: scale(.75); }
.reveal--grow-big { transform: scale(0); }

.reveal.is-visible { opacity: 1; transform: none; }
.no-js .reveal, .reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}
