/*
 * Wellbrook Medical — site styles.
 *
 * The :root block below is the shared token system from _template, with the
 * three colour anchors tuned to this practice: --palette-hue 185 and
 * --palette-chroma 0.104 reproduce the brand teal (#0d9488) that this site
 * previously hardcoded as --teal. Retune those rather than editing values.
 *
 * See refs/design/DESIGN.md. Typefaces are set on selectors below, not as
 * tokens, because they are this site's own.
 */
:root {
    /* --- Anchors: the dial for this site ------------------------------- */
    --u-min-vw: 320;
    --u-max-vw: 1240;
    --u-min-font: 16;
    --u-max-font: 18;
    --u-min-ratio: 1.2;
    --u-max-ratio: 1.25;

    /* --- Derivation. Not usually edited by hand. ----------------------- */
    /* Slope and intercept of the line between the two anchor viewports,
     * expressed so each step can be written as clamp(min, calc(...), max). */
    --u-vw-range: calc(var(--u-max-vw) - var(--u-min-vw));

    /* Type steps, in rem at each anchor. Each step multiplies the previous
     * one by the ratio, so the relationship between sizes is fixed even as the
     * absolute values move. */
    --u-min-0: calc(var(--u-min-font) / 16);
    --u-max-0: calc(var(--u-max-font) / 16);

    --u-min--2: calc(var(--u-min-0) / var(--u-min-ratio) / var(--u-min-ratio));
    --u-max--2: calc(var(--u-max-0) / var(--u-max-ratio) / var(--u-max-ratio));
    --u-min--1: calc(var(--u-min-0) / var(--u-min-ratio));
    --u-max--1: calc(var(--u-max-0) / var(--u-max-ratio));
    --u-min-1: calc(var(--u-min-0) * var(--u-min-ratio));
    --u-max-1: calc(var(--u-max-0) * var(--u-max-ratio));
    --u-min-2: calc(var(--u-min-1) * var(--u-min-ratio));
    --u-max-2: calc(var(--u-max-1) * var(--u-max-ratio));
    --u-min-3: calc(var(--u-min-2) * var(--u-min-ratio));
    --u-max-3: calc(var(--u-max-2) * var(--u-max-ratio));
    --u-min-4: calc(var(--u-min-3) * var(--u-min-ratio));
    --u-max-4: calc(var(--u-max-3) * var(--u-max-ratio));
    --u-min-5: calc(var(--u-min-4) * var(--u-min-ratio));
    --u-max-5: calc(var(--u-max-4) * var(--u-max-ratio));

    /* --- Type scale ---------------------------------------------------- */
    /* step--2 fine print · step-0 body · step-2/3 section headings ·
     * step-4/5 hero display. Use these, not raw px. */
    --step--2: clamp(calc(var(--u-min--2) * 1rem), calc(var(--u-min--2) * 1rem + (var(--u-max--2) - var(--u-min--2)) * (100vw - var(--u-min-vw) * 1px) / var(--u-vw-range) * 16), calc(var(--u-max--2) * 1rem));
    --step--1: clamp(calc(var(--u-min--1) * 1rem), calc(var(--u-min--1) * 1rem + (var(--u-max--1) - var(--u-min--1)) * (100vw - var(--u-min-vw) * 1px) / var(--u-vw-range) * 16), calc(var(--u-max--1) * 1rem));
    --step-0: clamp(calc(var(--u-min-0) * 1rem), calc(var(--u-min-0) * 1rem + (var(--u-max-0) - var(--u-min-0)) * (100vw - var(--u-min-vw) * 1px) / var(--u-vw-range) * 16), calc(var(--u-max-0) * 1rem));
    --step-1: clamp(calc(var(--u-min-1) * 1rem), calc(var(--u-min-1) * 1rem + (var(--u-max-1) - var(--u-min-1)) * (100vw - var(--u-min-vw) * 1px) / var(--u-vw-range) * 16), calc(var(--u-max-1) * 1rem));
    --step-2: clamp(calc(var(--u-min-2) * 1rem), calc(var(--u-min-2) * 1rem + (var(--u-max-2) - var(--u-min-2)) * (100vw - var(--u-min-vw) * 1px) / var(--u-vw-range) * 16), calc(var(--u-max-2) * 1rem));
    --step-3: clamp(calc(var(--u-min-3) * 1rem), calc(var(--u-min-3) * 1rem + (var(--u-max-3) - var(--u-min-3)) * (100vw - var(--u-min-vw) * 1px) / var(--u-vw-range) * 16), calc(var(--u-max-3) * 1rem));
    --step-4: clamp(calc(var(--u-min-4) * 1rem), calc(var(--u-min-4) * 1rem + (var(--u-max-4) - var(--u-min-4)) * (100vw - var(--u-min-vw) * 1px) / var(--u-vw-range) * 16), calc(var(--u-max-4) * 1rem));
    --step-5: clamp(calc(var(--u-min-5) * 1rem), calc(var(--u-min-5) * 1rem + (var(--u-max-5) - var(--u-min-5)) * (100vw - var(--u-min-vw) * 1px) / var(--u-vw-range) * 16), calc(var(--u-max-5) * 1rem));

    /* --- Weight -------------------------------------------------------- */
    /* Named by the CSS value, not by a word. "bold" is a claim about how a
     * typeface renders; 700 is what you actually asked for, and two faces
     * disagree about which of their cuts reads as bold.
     *
     * THREE WEIGHTS, DELIBERATELY. Body, emphasis, headline — that is the
     * whole system, and it is expressed by which tokens exist rather than by
     * a rule asking politely. Adding --weight-800 needs a reason: the face
     * has a visibly distinct heavy cut AND 700 alone is not creating enough
     * contrast. If 700 and 800 render identically on screen, that is not one.
     * A flat hierarchy is almost always a spacing or size problem, not a
     * weight problem. */
    --weight-400: 400;  /* body */
    --weight-600: 600;  /* nav, card emphasis, eyebrows */
    --weight-700: 700;  /* headlines, CTAs */

    /* --- Leading ------------------------------------------------------- */
    /* A ladder rather than a derived scale, so it is t-shirt sized like
     * --space-* rather than numbered like --step-*. Tightest to loosest.
     *
     * The relationship worth holding: line-height falls as type size rises.
     * Display type at body leading looks unset; body copy at display leading
     * is unreadable. Pair --leading-xs with --step-4/5 and --leading-l with
     * --step-0. */
    --leading-xs: 1.05;   /* display, very large headlines */
    --leading-s: 1.18;    /* headings */
    --leading-m: 1.3;     /* subheadings, ledes, card copy */
    --leading-l: 1.5;     /* body copy */
    --leading-xl: 1.6;    /* long-form and small print, which need more air */

    /* --- Tracking ------------------------------------------------------ */
    /* Same shape: a ladder, tightest to loosest, in em so it scales with
     * whatever size it is applied to.
     *
     * The relationship: tracking tightens as size grows, and ALL-CAPS always
     * needs opening up — uppercase at 0 tracking reads cramped at any size.
     * Pair --tracking-xs with --step-4/5, --tracking-m with body, and
     * --tracking-l or --tracking-xl with any text-transform: uppercase. */
    --tracking-xs: -0.02em;  /* large display */
    --tracking-s: -0.01em;   /* headings */
    --tracking-m: 0;         /* body — the default, stated so it can be reset to */
    --tracking-l: 0.04em;    /* small caps-ish, buttons */
    --tracking-xl: 0.08em;   /* eyebrows and other all-caps runs */

    /* --- Space scale --------------------------------------------------- */
    /* Multiples of the base size rather than the type ratio, so spacing stays
     * predictable while type can be as dramatic as the site needs. */
    --space-3xs: clamp(0.25rem, calc(0.25rem + 0.1vw), 0.375rem);
    --space-2xs: clamp(0.5rem, calc(0.45rem + 0.2vw), 0.625rem);
    --space-xs: clamp(0.75rem, calc(0.68rem + 0.3vw), 0.9375rem);
    --space-s: clamp(1rem, calc(0.91rem + 0.43vw), 1.25rem);
    --space-m: clamp(1.5rem, calc(1.37rem + 0.65vw), 1.875rem);
    --space-l: clamp(2rem, calc(1.82rem + 0.87vw), 2.5rem);
    --space-xl: clamp(3rem, calc(2.73rem + 1.3vw), 3.75rem);
    --space-2xl: clamp(4rem, calc(3.64rem + 1.74vw), 5rem);
    --space-3xl: clamp(6rem, calc(5.46rem + 2.61vw), 7.5rem);

    /* --- Space pairs --------------------------------------------------- */
    /* A pair moves from the SMALLER step on a phone to the LARGER one on a
     * desktop, so the gap changes step rather than merely scaling. This is what
     * replaces per-breakpoint section padding: --space-l-2xl is roughly the old
     * "40-48px mobile, 80-96px desktop" rule, expressed once. */
    --space-2xs-xs: clamp(0.5rem, calc(0.35rem + 0.76vw), 0.9375rem);
    --space-xs-s: clamp(0.75rem, calc(0.57rem + 0.87vw), 1.25rem);
    --space-s-m: clamp(1rem, calc(0.7rem + 1.52vw), 1.875rem);
    --space-m-l: clamp(1.5rem, calc(1.13rem + 1.85vw), 2.5rem);
    --space-l-xl: clamp(2rem, calc(1.36rem + 3.15vw), 3.75rem);
    --space-xl-2xl: clamp(3rem, calc(2.27rem + 3.62vw), 5rem);
    --space-l-2xl: clamp(2rem, calc(0.91rem + 5.43vw), 5rem);
    --space-s-l: clamp(1.125rem, calc(0.72rem + 2.04vw), 2.5rem);  /* skip-a-step: grid gutter */
    --space-2xl-3xl: clamp(4rem, calc(2.55rem + 7.24vw), 7.5rem);

    /* --- Measure ------------------------------------------------------- */
    --measure: 65ch;        /* body copy */
    --measure-tight: 45ch;  /* card and caption copy */

    /* =====================================================================
     * COLOUR
     *
     * Three anchors drive the whole palette. Change them to match the
     * practice; everything else follows. See refs/design/DESIGN.md.
     *
     *   --palette-hue         the practice's brand hue, 0-360.
     *                         Roughly: 25 terracotta · 60 ochre · 145 green
     *                         · 195 teal · 240 blue · 275 violet · 340 rose
     *   --palette-chroma      how saturated the brand reads. OKLCH chroma is
     *                         NOT 0-1 — it runs about 0-0.37 in sRGB, and
     *                         above ~0.15 a surface colour starts to shout.
     *                         0.04 muted · 0.09 confident · 0.14 vivid
     *   --palette-secondary-shift
     *                         degrees from the primary to the secondary.
     *                         150-180 gives a complement; 30-60 an analogous
     *                         neighbour that reads calmer.
     * ===================================================================== */
    --palette-hue: 185;    /* the practice teal, #0d9488 */
    --palette-chroma: 0.104;
    --palette-secondary-shift: 150;

    --hue-primary: var(--palette-hue);
    --hue-secondary: calc(var(--palette-hue) + var(--palette-secondary-shift));

    /* Feedback hues are FIXED and do not follow the brand. A danger colour
     * that rotates with the practice's hue stops reading as danger — the
     * entire value of a semantic colour is that it means the same thing on
     * every site. Only the brand colours above derive from --palette-hue. */
    --hue-success: 145;
    --hue-warning: 75;
    --hue-danger: 27;
    --hue-info: 240;

    /* Lightness ramp. Dark mode overrides these below rather than declaring a
     * second palette — in OKLCH, dark mode is largely an inversion of these
     * four numbers. */
    --l-solid: 0.55;   /* solid fills: buttons, badges */
    --l-hover: 0.48;   /* one step darker for hover */
    --l-light: 0.66;   /* one step lighter: gradient partner for --primary */
    --l-pale: 0.96;    /* tinted backgrounds */
    --l-muted: 0.92;   /* a touch stronger than pale, for wash gradients */
    --l-on-solid: 0.99;/* text on a solid fill */

    /* Brand */
    --primary: oklch(var(--l-solid) var(--palette-chroma) var(--hue-primary));
    --primary-hover: oklch(var(--l-hover) var(--palette-chroma) var(--hue-primary));
    --primary-light: oklch(var(--l-light) var(--palette-chroma) var(--hue-primary));
    /* Chroma falls as lightness rises — a pale tint at full chroma reads
     * muddy rather than tinted. */
    --primary-pale: oklch(var(--l-pale) calc(var(--palette-chroma) * 0.25) var(--hue-primary));
    --primary-muted: oklch(var(--l-muted) calc(var(--palette-chroma) * 0.35) var(--hue-primary));
    /* Pale wash that drifts slightly off the brand hue, for large soft
       backgrounds. Derived from the anchor so it follows a re-hued site. */
    --primary-pale-drift: oklch(var(--l-pale) calc(var(--palette-chroma) * 0.2) calc(var(--hue-primary) + 25));
    --on-primary: oklch(var(--l-on-solid) 0 0);

    --secondary: oklch(var(--l-solid) var(--palette-chroma) var(--hue-secondary));
    --secondary-hover: oklch(var(--l-hover) var(--palette-chroma) var(--hue-secondary));
    --secondary-pale: oklch(var(--l-pale) calc(var(--palette-chroma) * 0.25) var(--hue-secondary));

    /* Aliases for the older names in DESIGN.md, so existing markup and any
     * site copied from an earlier template keep working. */
    --accent: var(--primary);
    --accent-dark: var(--primary-hover);
    --accent-pale: var(--primary-pale);

    /* Feedback. Chroma is per-hue: yellows need more to read as yellow, reds
     * less before they turn fluorescent. */
    --success: oklch(calc(var(--l-solid) - 0.03) 0.13 var(--hue-success));
    --success-pale: oklch(var(--l-pale) 0.03 var(--hue-success));
    --warning: oklch(0.75 0.14 var(--hue-warning));
    --warning-pale: oklch(var(--l-pale) 0.04 var(--hue-warning));
    --danger: oklch(var(--l-solid) 0.17 var(--hue-danger));
    --danger-pale: oklch(var(--l-pale) 0.03 var(--hue-danger));
    --info: oklch(var(--l-solid) 0.11 var(--hue-info));
    --info-pale: oklch(var(--l-pale) 0.03 var(--hue-info));

    /* Neutrals carry a trace of the brand hue so greys feel of a piece with
     * the accent rather than dropped in from a different site. This is what
     * DESIGN.md asked for in prose — "a teal practice and a navy practice
     * want different --ink warmth" — expressed once instead of by eye. */
    /* Headings and dark surfaces: deeper and cooler than body copy. */
    --ink-strong: oklch(0.18 0.030 calc(var(--hue-primary) + 80));
    --ink: oklch(0.25 0.015 var(--hue-primary));
    --ink-mid: oklch(0.45 0.012 var(--hue-primary));
    --ink-soft: oklch(0.54 0.010 var(--hue-primary));
    --bg: oklch(0.99 0.004 var(--hue-primary));
    --surface: oklch(1 0 0);
    --border: oklch(0.90 0.008 var(--hue-primary));
    --border-strong: oklch(0.82 0.010 var(--hue-primary));

    /* --- Grid ---------------------------------------------------------- */
    /* Deliberately minimal: the container and gutter are fluid, placement is
     * left to each layout. Use .u-container and .u-grid below. */
    --grid-max-width: 77.5rem;
    --grid-gutter: var(--space-s-l);
    --grid-columns: 12;

    /* --- Radius -------------------------------------------------------- */
    /* Named by intent rather than by number, so a change of scale does not
     * mean auditing every --radius-3 in the stylesheet. */
    --radius-xs: 0.25rem;   /* tags, inline chips */
    --radius-s: 0.5rem;     /* buttons, inputs */
    --radius-m: 0.75rem;    /* cards */
    --radius-l: 1.25rem;    /* panels, modals, hero media */
    --radius-round: 50%;    /* avatars */
    --radius-pill: 999px;   /* pills, badges */

    /* --- Border widths ------------------------------------------------- */
    --border-thin: 1px;
    --border-medium: 2px;
    --border-thick: 4px;    /* accent rules, active states */

    /* --- Shadows ------------------------------------------------------- */
    /* Two knobs drive every shadow. --shadow-color takes the brand hue so a
     * raised card reads as part of this practice rather than as generic grey;
     * --shadow-strength is what dark mode adjusts, because a shadow on a dark
     * background needs MORE opacity to be seen, not less. */
    --shadow-color: var(--hue-primary, 220) 20% 15%;
    --shadow-strength: 1%;

    --shadow-s:
        0 1px 2px -1px hsl(var(--shadow-color) / calc(var(--shadow-strength) + 9%));
    --shadow-m:
        0 3px 5px -2px hsl(var(--shadow-color) / calc(var(--shadow-strength) + 3%)),
        0 7px 14px -5px hsl(var(--shadow-color) / calc(var(--shadow-strength) + 5%));
    --shadow-l:
        0 -1px 3px 0 hsl(var(--shadow-color) / calc(var(--shadow-strength) + 2%)),
        0 6px 12px -3px hsl(var(--shadow-color) / calc(var(--shadow-strength) + 3%)),
        0 15px 30px -6px hsl(var(--shadow-color) / calc(var(--shadow-strength) + 5%));

    --shadow-inner-s: inset 0 1px 2px 0 hsl(var(--shadow-color) / calc(var(--shadow-strength) + 6%));
    --shadow-inner-m: inset 0 2px 6px 0 hsl(var(--shadow-color) / calc(var(--shadow-strength) + 9%));

    /* --- Layers -------------------------------------------------------- */
    /* Six values, so z-index is never invented at the call site. */
    --wash-amber-from: #fef3c7;
    --wash-amber-to: #fde68a;
    --wash-violet-from: #ddd6fe;
    --wash-violet-to: #c4b5fd;

    --layer-behind: -1;    /* decorative washes sitting behind content */
    --layer-base: 1;
    --layer-raised: 2;      /* hover cards, sticky rows */
    --layer-nav: 3;         /* sticky header */
    --layer-overlay: 4;     /* dropdowns, popovers */
    --layer-modal: 5;       /* dialogs and their backdrop */
    --layer-top: 2147483647;/* skip links, live-region alerts */

    /* --- Motion -------------------------------------------------------- */
    --duration-fast: 120ms;   /* hover, focus */
    --duration-base: 220ms;   /* most transitions */
    --duration-slow: 400ms;   /* entrances */
    --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
    --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
    --reveal-distance: 1.5rem;

    --font-body: 'Nunito Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-heading: 'p22-mackinac-pro', Georgia, serif;
}

/* ═══════════════════════════════════════════════════════════════════════
 * RESET
 *
 * Josh Comeau's Custom CSS Reset (joshwcomeau.com/css/custom-css-reset/),
 * lightly adapted. Normalises browser defaults so the base layer below is
 * building on the same ground in every browser. Leave this alone; make
 * design decisions in the base layer and the tokens above it.
 * ═══════════════════════════════════════════════════════════════════════ */

*, *::before, *::after { box-sizing: border-box; }

* { margin: 0; padding: 0; }

html {
    -webkit-text-size-adjust: 100%;
    -moz-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body {
    -webkit-font-smoothing: antialiased;
    line-height: 1.5;
}

/* Media is block-level and never overflows its container. */
img, picture, video, canvas, svg {
    display: block;
    max-width: 100%;
}

/* Form controls inherit typography rather than using browser chrome. */
input, button, textarea, select { font: inherit; }

/* Long words and URLs wrap instead of forcing a horizontal scrollbar. */
p, h1, h2, h3, h4, h5, h6 { overflow-wrap: break-word; }

/* A new stacking context on the root, so app-level layers cannot escape. */
#root, #__next { isolation: isolate; }

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

/* ═══════════════════════════════════════════════════════════════════════
 * ELEMENT BASE LAYER
 *
 * Bare elements are styled here so a page is correct with no classes at
 * all. Without this, an unclassed <h2> falls back to the browser default
 * and whoever writes the page patches it with an inline style — which is
 * how a site ends up with a different heading treatment per page.
 *
 * Every heading has a matching .h1-.h6 class. Use the ELEMENT for document
 * structure (SEO, screen readers, outline) and the CLASS for appearance,
 * so an <h1> can look like an eyebrow without lying about the hierarchy:
 *
 *     <h1 class="h4">Still the page's real heading, just smaller</h1>
 *
 * Sites override these; they are a floor, not a straitjacket.
 * ═══════════════════════════════════════════════════════════════════════ */

body {
    margin: 0;
    font-family: var(--font-body);
    font-size: var(--step-0);
    font-weight: var(--weight-400);
    line-height: var(--leading-l);
    color: var(--ink);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
}

/* Headings ─────────────────────────────────────────────────────────────
 * Margins are top-heavy on purpose: a heading belongs to what follows it,
 * so the space above is larger than the space below. */
h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6 {
    margin: var(--space-l) 0 var(--space-s);
    font-family: var(--font-heading);
    font-weight: var(--weight-700);
    line-height: var(--leading-s);
    letter-spacing: var(--tracking-xs);
    color: var(--ink-strong);
    text-wrap: balance;
}

:where(h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6) + * {
    margin-top: 0;
}

/* A heading opening its container needs no space above it. */
:where(h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6):first-child {
    margin-top: 0;
}

h1, .h1 { font-size: var(--step-5); }
h2, .h2 { font-size: var(--step-4); }
h3, .h3 { font-size: var(--step-3); }
h4, .h4 { font-size: var(--step-2); }
h5, .h5 { font-size: var(--step-1); line-height: var(--leading-m); }
/* A small heading at body size, sentence case — for panel and card titles
 * that sit below the .h5 step but should not become an uppercase label. */
.h6-plain {
    font-size: var(--step-0);
    line-height: var(--leading-m);
    letter-spacing: normal;
    text-transform: none;
}

h6, .h6 {
    font-size: var(--step-0);
    line-height: var(--leading-m);
    letter-spacing: var(--tracking-m);
    text-transform: uppercase;
}

/* A highlighted phrase inside a heading. One mechanism, not three. */
:where(h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6) em {
    font-style: italic;
    color: var(--primary);
}

/* Text ─────────────────────────────────────────────────────────────── */
p, ul, ol, dl, blockquote, figure, table, pre {
    margin: 0 0 var(--space-m);
}

/*
 * Line length is a container's job, not every paragraph's — capping each <p>
 * leaves text hugging the left of any column already sized for reading.
 * Use .measure (or set a width on the container) where prose needs it.
 */
.measure { max-width: var(--measure); }
.measure-tight { max-width: var(--measure-tight); }

/* Opening paragraph: larger and looser than body copy. */
.lede {
    max-width: 600px;
    font-size: var(--step-1);
    line-height: var(--leading-xl);
    color: var(--ink-mid);
}

/* Small label above a heading. */
.eyebrow {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: var(--space-s);
    font-size: var(--step--2);
    font-weight: var(--weight-600);
    letter-spacing: var(--tracking-xl);
    text-transform: uppercase;
    color: var(--primary-hover);
}

/* The short rule that sets an eyebrow off from the heading below it. */
.eyebrow::before {
    content: '';
    display: block;
    width: 22px;
    height: 1.5px;
    background: var(--primary);
}

small, .text-small { font-size: var(--step--1); }

strong, b { font-weight: var(--weight-700); }

a {
    color: var(--primary);
    text-decoration-thickness: 1px;
    text-underline-offset: 0.15em;
    transition: color var(--duration-fast) var(--ease-out);
}
a:hover { color: var(--primary-hover); }

/* A visible focus ring on every interactive element, always. */
:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
    border-radius: var(--radius-xs);
}

ul, ol { padding-left: var(--space-m); }

/*
 * List spacing applies to PROSE lists only. Navigation, button groups and
 * card grids are lists too, and flow margins on those knock flex/grid items
 * out of alignment (the site header) or balloon the spacing (the footer).
 *
 * Presence of a class is not the test — a footer nav is a nav whether or not
 * anyone put a class on it — so navigation context opts out explicitly.
 */
:where(ul, ol) > li { margin-bottom: var(--space-2xs); }
:where(ul, ol) > li:last-child { margin-bottom: 0; }

nav ul, nav ol,
header ul, header ol,
footer ul, footer ol,
menu {
    margin: 0;
    padding-left: 0;
    list-style: none;
}

nav li, header li, footer li, menu li {
    margin-bottom: 0;
}

/* A list explicitly used for layout carries no bullets, indent or margin. */
:where(ul, ol)[class] {
    margin: 0;
    padding-left: 0;
    list-style: none;
}

:where(ul, ol)[class] > li { margin-bottom: 0; }

blockquote {
    padding-left: var(--space-m);
    border-left: var(--border-thick) solid var(--primary-pale);
    color: var(--ink-mid);
    font-style: italic;
}

hr {
    height: 0;
    margin: var(--space-l) 0;
    border: 0;
    border-top: var(--border-thin) solid var(--border);
}

code, kbd, samp, pre {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 0.9em;
}

/* Media ────────────────────────────────────────────────────────────────
 * Images are rounded by default. The square-photo bug on Wellbrook was an
 * <img> with no radius sitting beside cards that had one. */
img, picture, video, canvas, svg {
    display: block;
    max-width: 100%;
    height: auto;
}

img {
    border-radius: var(--radius-m);
    background: var(--surface);
}

/*
 * Logos, icons and inline SVG are not photographs — a background plate and a
 * radius are wrong for them, and show up as a white box on a dark footer.
 */
img[class*="logo"], img[class*="icon"], .logo img, svg {
    border-radius: 0;
    background: none;
}

/* Opt out where a radius is wrong: full-bleed art, decorative crops. */
img.is-flush, .is-flush img { border-radius: 0; background: none; }

figure { margin-inline: 0; }

figcaption {
    margin-top: var(--space-2xs);
    font-size: var(--step--1);
    color: var(--ink-soft);
}

/* Tables ───────────────────────────────────────────────────────────── */
table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

th, td {
    padding: var(--space-2xs) var(--space-xs);
    border-bottom: var(--border-thin) solid var(--border);
    vertical-align: top;
}

th {
    font-weight: var(--weight-600);
    color: var(--ink-strong);
}

tbody tr:last-child :where(th, td) { border-bottom: 0; }

/* Forms ────────────────────────────────────────────────────────────── */
label {
    display: block;
    margin-bottom: var(--space-3xs);
    font-size: var(--step--1);
    font-weight: var(--weight-600);
    color: var(--ink-strong);
}

input, select, textarea {
    width: 100%;
    padding: var(--space-2xs) var(--space-xs);
    font-family: inherit;
    font-size: var(--step-0);
    color: var(--ink);
    background: var(--surface);
    border: var(--border-thin) solid var(--border-strong);
    border-radius: var(--radius-s);
    transition: border-color var(--duration-fast) var(--ease-out);
}

input:hover, select:hover, textarea:hover { border-color: var(--ink-soft); }
input:focus, select:focus, textarea:focus { border-color: var(--primary); }

textarea { min-height: 8rem; resize: vertical; }

input[type="checkbox"], input[type="radio"] {
    width: auto;
    accent-color: var(--primary);
}

::placeholder { color: var(--ink-soft); opacity: 1; }

fieldset { margin: 0 0 var(--space-m); padding: 0; border: 0; }

/* Buttons ──────────────────────────────────────────────────────────────
 * .btn is the base; variants change colour, sizes change scale. Applies to
 * <button>, <a class="btn"> and inputs alike. */

/* Cards ────────────────────────────────────────────────────────────────
 * Deliberately minimal — a surface with a radius. Sites compose their own
 * card variants on top; modelling every one here would be guesswork. */
.card {
    padding: var(--space-m);
    background: var(--surface);
    border: var(--border-thin) solid var(--border);
    border-radius: var(--radius-m);
}

/* Utility ──────────────────────────────────────────────────────────── */
.visually-hidden, .sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}

/*
 * The base layer gives bare headings space above them, which is right for
 * flowing prose. These classes sit inside laid-out sections that already
 * control their own spacing, so they opt out.
 */
.hero-title,
.section-heading,
.page-hero h1 {
    margin-top: 0;
}

html { scroll-behavior: smooth; }

body {
    font-family: 'Nunito Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--surface);
    color: var(--ink);
    line-height: var(--leading-l);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

img { display: block; max-width: 100%; }
a { text-decoration: none; color: inherit; }

.skip-link {
    position: absolute;
    top: -100%;
    left: 1rem;
    background: var(--ink-strong);
    color: var(--on-primary);
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-m);
    z-index: var(--layer-overlay);
    font-weight: var(--weight-600);
}

.skip-link:focus {
    top: 1rem;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ─── REVEAL ANIMATIONS ──────────────────────────────────── */
.reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.72s cubic-bezier(0.22,1,0.36,1),
                transform 0.72s cubic-bezier(0.22,1,0.36,1);
}
.reveal.visible { opacity: 1; transform: none; }
.reveal-delay-1 { transition-delay: 0.10s; }
.reveal-delay-2 { transition-delay: 0.20s; }
.reveal-delay-3 { transition-delay: 0.32s; }
.reveal-delay-4 { transition-delay: 0.44s; }

/* ─── HEADER ─────────────────────────────────────────────── */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: var(--layer-nav);
    border-bottom: 1px solid var(--border);
    transition: box-shadow 0.3s;
}

.header::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(16px) saturate(1.4);
    -webkit-backdrop-filter: blur(16px) saturate(1.4);
    z-index: var(--layer-behind);
}

.header.scrolled { box-shadow: var(--shadow-s); }

.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
}

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.logo-img {
    height: 36px;
    width: auto;
    max-width: 200px;
    object-fit: contain;
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.logo-icon svg {
    width: 22px;
    height: 22px;
    color: var(--on-primary);
}

.logo-text {
    display: flex;
    flex-direction: column;
    line-height: var(--leading-xs);
}

.logo-name {
    font-size: var(--step--1);
    font-weight: var(--weight-700);
    color: var(--ink-strong);
    letter-spacing: var(--tracking-s);
}

.logo-sub {
    font-size: var(--step--2);
    color: var(--ink-soft);
    letter-spacing: var(--tracking-xl);
    text-transform: uppercase;
    font-weight: var(--weight-600);
}

.nav {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    list-style: none;
}

.nav-links a {
    color: var(--ink-mid);
    text-decoration: none;
    font-size: var(--step--1);
    font-weight: var(--weight-600);
    transition: color 0.2s;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    right: 0;
    height: 1.5px;
    background: var(--primary);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.25s cubic-bezier(0.22,1,0.36,1);
}

.nav-links a:hover,
.nav-links a.active { color: var(--primary); }

.nav-links a:hover::after,
.nav-links a.active::after { transform: scaleX(1); }

/* ─── NAV DROPDOWN ──────────────────────────────────────── */
.nav-dropdown {
    position: relative;
    cursor: pointer;
}

.nav-dropdown > button {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
    color: var(--ink-mid);
    font-size: var(--step--1);
    font-weight: var(--weight-600);
    padding: 0;
    transition: color 0.2s;
    position: relative;
}

.nav-dropdown > button::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    right: 0;
    height: 1.5px;
    background: var(--primary);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.25s cubic-bezier(0.22,1,0.36,1);
}

.nav-dropdown > button:hover,
.nav-dropdown > button[aria-expanded="true"] {
    color: var(--primary);
}

.nav-dropdown > button:hover::after,
.nav-dropdown > button[aria-expanded="true"]::after {
    transform: scaleX(1);
}

.nav-dropdown > button svg {
    width: 14px;
    height: 14px;
    transition: transform 0.2s;
}

.nav-dropdown > button[aria-expanded="true"] svg {
    transform: rotate(180deg);
}

.nav-dropdown-menu {
    display: none;
    position: absolute;
    top: calc(100% + 12px);
    left: 50%;
    transform: translateX(-50%);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-m);
    box-shadow: var(--shadow-m);
    min-width: 200px;
    padding: 0.5rem;
    z-index: var(--layer-overlay);
    list-style: none;
}

.nav-dropdown-menu::before {
    content: '';
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-bottom-color: var(--border);
}

.nav-dropdown-menu::after {
    content: '';
    position: absolute;
    top: -6px;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-bottom-color: var(--surface);
}

.nav-dropdown.open .nav-dropdown-menu {
    display: block;
}

.nav-dropdown-menu a {
    display: block;
    padding: 0.625rem 1rem;
    border-radius: var(--radius-s);
    font-size: var(--step--1);
    font-weight: var(--weight-600);
    color: var(--ink-mid);
    transition: background 0.15s, color 0.15s;
    white-space: nowrap;
    cursor: pointer;
}

.nav-dropdown-menu a::after {
    display: none;
}

.nav-dropdown-menu a:hover,
.nav-dropdown-menu a.active {
    background: var(--primary-pale);
    color: var(--primary);
}

.nav-buttons {
    display: flex;
    gap: 0.75rem;
}

/* ─── BUTTONS ────────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    border-radius: var(--radius-s);
    font-size: var(--step--1);
    font-weight: var(--weight-600);
    text-decoration: none;
    cursor: pointer;
    transition: background 0.2s, color 0.2s, box-shadow 0.2s, transform 0.2s, border-color 0.2s;
    border: none;
    font-family: inherit;
}

.btn-outline {
    background: transparent;
    color: var(--primary);
    border: 1.5px solid var(--primary);
}

.btn-outline:hover {
    background: var(--primary-pale);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: var(--on-primary);
    box-shadow: 0 2px 4px color-mix(in oklab, var(--primary) 20%, transparent);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-hover) 0%, var(--primary) 100%);
    box-shadow: 0 4px 8px color-mix(in oklab, var(--primary) 30%, transparent);
    transform: translateY(-1px);
}

.btn-primary:active { transform: translateY(0); }

.btn-large {
    padding: 0.875rem 1.75rem;
    font-size: var(--step-0);
}

/*
 * ON A DARK GROUND
 *
 * The two button variants above assume a light background. On a dark or
 * brand-coloured section they invert: the solid button becomes white, the
 * outline picks up a translucent white edge. One modifier rather than a
 * second set of names — it was three copies of an inline style before.
 */
/*
 * Text on a dark or brand-coloured ground. Pair with .strip / .section-dark
 * so headings and copy invert without a per-element colour override.
 */
.on-dark,
.strip,
.section-dark {
    color: var(--on-primary);
}

.on-dark :where(h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6),
.strip :where(h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6),
.section-dark :where(h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6) {
    color: var(--on-primary);
}

.on-dark .btn-primary,
.btn-primary.on-dark {
    background: var(--surface);
    color: var(--primary);
    box-shadow: none;
}

.on-dark .btn-primary:hover,
.btn-primary.on-dark:hover {
    background: var(--surface);
    color: var(--primary-hover);
    transform: translateY(-1px);
}

.on-dark .btn-outline,
.btn-outline.on-dark {
    color: var(--on-primary);
    border-color: color-mix(in oklab, var(--on-primary) 40%, transparent);
}

.on-dark .btn-outline:hover,
.btn-outline.on-dark:hover {
    background: color-mix(in oklab, var(--on-primary) 12%, transparent);
    color: var(--on-primary);
}

/* ─── HERO ───────────────────────────────────────────────── */
.hero {
    background: linear-gradient(135deg, var(--primary-pale) 0%, var(--primary-pale-drift) 50%, var(--info-pale) 100%);
    min-height: calc(100vh - 72px);
    padding-top: 72px;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 80%;
    height: 200%;
    background: radial-gradient(circle, rgba(13, 148, 136, 0.08) 0%, transparent 70%);
    pointer-events: none;
}

.hero-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 4rem 1.5rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    position: relative;
}

.hero-content {
    max-width: 540px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--surface);
    padding: 0.5rem 1rem;
    border-radius: 100px;
    font-size: var(--step--1);
    font-weight: var(--weight-600);
    color: var(--primary);
    box-shadow: var(--shadow-s);
    margin-bottom: 1.5rem;
}

.hero-badge svg {
    width: 16px;
    height: 16px;
}

.hero-title {
    font-family: 'p22-mackinac-pro', Georgia, serif;
    font-size: clamp(2.25rem, 5vw, 3.25rem);
    font-weight: var(--weight-700);
    color: var(--ink-strong);
    line-height: var(--leading-s);
    margin-bottom: 1.5rem;
}

.hero-title span {
    color: var(--primary);
}

.hero-description {
    font-size: var(--step-1);
    color: var(--ink-soft);
    margin-bottom: 2rem;
    line-height: var(--leading-xl);
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.hero-stats {
    display: flex;
    gap: 2.5rem;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(13, 148, 136, 0.15);
}

.stat { text-align: left; }

.stat-value {
    font-size: var(--step-2);
    font-weight: var(--weight-700);
    color: var(--ink-strong);
}

.stat-label {
    font-size: var(--step--1);
    color: var(--ink-soft);
}

/* Hero Visual / Card */
.hero-visual {
    position: relative;
    display: flex;
    justify-content: center;
    align-self: stretch;
}

.hero-img {
    width: 100%;
    height: 100%;
    min-height: 400px;
    border-radius: var(--radius-l);
    box-shadow: var(--shadow-l);
    object-fit: cover;
}

.hero-card {
    background: var(--surface);
    border-radius: var(--radius-l);
    padding: 2rem;
    box-shadow: var(--shadow-l);
    max-width: 400px;
    position: relative;
}

.hero-card::before {
    content: '';
    position: absolute;
    top: -20px;
    right: -20px;
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, var(--wash-amber-from) 0%, var(--wash-amber-to) 100%);
    border-radius: 50%;
    z-index: var(--layer-behind);
}

.hero-card::after {
    content: '';
    position: absolute;
    bottom: -30px;
    left: -30px;
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--wash-violet-from) 0%, var(--wash-violet-to) 100%);
    border-radius: 50%;
    z-index: var(--layer-behind);
}

.doctor-avatar {
    width: 80px;
    height: 80px;
    background: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.doctor-avatar svg {
    width: 40px;
    height: 40px;
    color: var(--on-primary);
}

.hero-card h3 {
    font-size: var(--step-1);
    font-weight: var(--weight-600);
    color: var(--ink-strong);
    margin-bottom: 0.25rem;
}

.hero-card p {
    color: var(--ink-soft);
    font-size: var(--step--1);
    margin-bottom: 1.5rem;
}

.service-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.service-tag {
    background: var(--primary-pale);
    color: var(--primary);
    padding: 0.375rem 0.75rem;
    border-radius: 100px;
    font-size: var(--step--1);
    font-weight: var(--weight-600);
}

.availability {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--success);
    font-size: var(--step--1);
    font-weight: var(--weight-600);
}

.availability-dot {
    width: 8px;
    height: 8px;
    background: var(--success);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* ─── SECTION SHARED ─────────────────────────────────────── */
.section { padding: 100px 0; }
.section-alt { background: var(--primary-pale); }
.section-dark { background: var(--ink-strong); color: var(--on-primary); }

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.section-heading {
    font-family: 'p22-mackinac-pro', Georgia, serif;
    font-size: clamp(1.75rem, 3.5vw, 2.75rem);
    font-weight: var(--weight-700);
    line-height: var(--leading-s);
    letter-spacing: var(--tracking-xs);
    color: var(--ink-strong);
    max-width: 520px;
}

.section-heading em,
.page-hero h1 em,
.hero-title em {
    font-style: italic;
    color: var(--primary);
}

/* ─── SERVICES GRID ──────────────────────────────────────── */
.services-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    margin-bottom: 3.5rem;
    gap: 2.5rem;
    flex-wrap: wrap;
}

.services-intro {
    font-size: var(--step-0);
    line-height: var(--leading-xl);
    color: var(--ink-mid);
    max-width: 360px;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.service-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-l);
    padding: 2.25rem 2rem 2rem;
    position: relative;
    overflow: hidden;
    transition: transform 0.3s cubic-bezier(0.22,1,0.36,1), box-shadow 0.3s;
}

.section-alt .service-card {
    background: var(--surface);
    border-color: transparent;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--primary-light));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s cubic-bezier(0.22,1,0.36,1);
}

.service-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-m);
}

.service-card:hover::before { transform: scaleX(1); }

.service-icon {
    width: 52px;
    height: 52px;
    border-radius: var(--radius-s);
    background: var(--primary-pale);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.service-icon svg {
    color: var(--primary);
}

.service-title {
    font-family: var(--font-body);
    font-size: var(--step-1);
    font-weight: var(--weight-600);
    color: var(--ink-strong);
    margin-top: 0;
    margin-bottom: 0.75rem;
}

.service-body {
    font-size: var(--step--1);
    line-height: var(--leading-xl);
    color: var(--ink-mid);
    margin-bottom: 1.5rem;
}

.service-link {
    font-size: var(--step--1);
    font-weight: var(--weight-600);
    color: var(--primary);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: gap 0.2s;
}

.service-card:hover .service-link { gap: 10px; }

/* ─── ABOUT SECTION ──────────────────────────────────────── */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5rem;
    align-items: center;
}

.about-visual { position: relative; }

.about-img-main {
    border-radius: var(--radius-l);
    overflow: hidden;
    aspect-ratio: 4/5;
    background: rgba(255, 255, 255, 0.1);
}

.about-img-float {
    position: absolute;
    bottom: -28px;
    right: -28px;
    width: 52%;
    border-radius: var(--radius-m);
    overflow: hidden;
    border: 4px solid var(--ink-strong);
    box-shadow: var(--shadow-l);
    aspect-ratio: 4/3;
    background: rgba(255, 255, 255, 0.08);
}

.img-placeholder {
    background-color: rgba(13, 148, 136, 0.06);
    background-image: repeating-linear-gradient(
        -45deg,
        transparent,
        transparent 8px,
        rgba(13, 148, 136, 0.06) 8px,
        rgba(13, 148, 136, 0.06) 9px
    );
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 6px;
    color: var(--ink-soft);
    font-size: var(--step--2);
    letter-spacing: var(--tracking-xl);
    text-align: center;
    line-height: var(--leading-l);
    user-select: none;
    width: 100%;
    height: 100%;
}

.section-dark .img-placeholder {
    background-color: rgba(255, 255, 255, 0.06);
    background-image: repeating-linear-gradient(
        -45deg,
        transparent,
        transparent 8px,
        rgba(255, 255, 255, 0.06) 8px,
        rgba(255, 255, 255, 0.06) 9px
    );
    color: rgba(255, 255, 255, 0.5);
}

.section-dark .eyebrow { color: var(--primary); }
.section-dark .eyebrow::before { background: var(--primary); }
.section-dark .section-heading { color: var(--on-primary); max-width: 100%; }

.about-body {
    font-size: var(--step-0);
    line-height: var(--leading-xl);
    color: rgba(255, 255, 255, 0.8);
    margin: 1.5rem 0 2.5rem;
}

.about-points {
    display: flex;
    flex-direction: column;
    gap: 0.875rem;
}

.about-point {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    font-size: var(--step--1);
    color: rgba(255, 255, 255, 0.9);
}

.about-point svg {
    flex-shrink: 0;
    margin-top: 3px;
    color: var(--primary);
}

/* ─── HIGHLIGHT STRIP ────────────────────────────────────── */
.strip {
    background: var(--primary);
    padding: 3.5rem 0;
}

.strip-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1px;
}

.strip-item {
    padding: 1.5rem 2rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    border-right: 1px solid rgba(255, 255, 255, 0.18);
}

.strip-item:last-child { border-right: none; }

.strip-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.strip-text .t1 {
    font-size: var(--step--1);
    font-weight: var(--weight-600);
    color: var(--on-primary);
}

.strip-text .t2 {
    font-size: var(--step--1);
    color: rgba(255, 255, 255, 0.9);
    margin-top: 2px;
}

/* ─── CONTACT SECTION ────────────────────────────────────── */
.contact-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 5rem;
    align-items: start;
}

.contact-map {
    border-radius: var(--radius-l);
    overflow: hidden;
    aspect-ratio: 4/3;
    box-shadow: var(--shadow-m);
}

.info-blocks {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.info-block {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.info-icon {
    width: 42px;
    height: 42px;
    border-radius: var(--radius-s);
    background: var(--surface);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: var(--shadow-s);
}

.section-alt .info-icon { background: var(--surface); }

.info-icon svg { color: var(--primary); }

.info-text .label {
    font-size: var(--step--2);
    font-weight: var(--weight-600);
    letter-spacing: var(--tracking-xl);
    text-transform: uppercase;
    color: var(--ink-soft);
    margin-bottom: 4px;
}

.info-text .val {
    font-size: var(--step--1);
    color: var(--ink);
    line-height: var(--leading-l);
}

.info-text .val a {
    color: var(--ink);
    transition: color 0.2s;
}

.info-text .val a:hover { color: var(--primary); }

.contact-cta {
    margin-top: 2rem;
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

/* ─── CONTACT FORM ───────────────────────────────────────── */
.form-section {
    padding: 100px 0;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5rem;
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    font-size: var(--step--1);
    font-weight: var(--weight-600);
    color: var(--ink);
    margin-bottom: 0.375rem;
}

.form-group label .required {
    color: var(--danger);
    margin-left: 0.125rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-s);
    font-size: var(--step--1);
    font-family: inherit;
    color: var(--ink);
    transition: border-color 0.2s, box-shadow 0.2s;
    background: var(--surface);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.1);
}

.form-group textarea { resize: vertical; min-height: 120px; }

[data-mf-feedback] {
    margin-top: 1rem;
    padding: 1rem 1.25rem;
    border-radius: var(--radius-m);
    font-size: var(--step-0);
    line-height: var(--leading-l);
}

[data-mf-feedback][data-status="success"] {
    background: var(--success-pale);
    color: var(--success);
    border: 1px solid #a7f3d0;
}

[data-mf-feedback][data-status="error"] {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

/* ─── LEGAL PAGES ───────────────────────────────────────── */
.legal-content h2 {
    font-size: var(--step-1);
    font-weight: var(--weight-700);
    color: var(--ink-strong);
    margin: 2.5rem 0 0.75rem;
}

.legal-content h3 {
    font-size: var(--step-1);
    font-weight: var(--weight-600);
    color: var(--ink-strong);
    margin: 2rem 0 0.5rem;
}

.legal-content p {
    color: var(--ink-mid);
    line-height: var(--leading-xl);
    margin-bottom: 1rem;
}

.legal-content ul {
    list-style: disc;
    padding-left: 1.5rem;
    margin-bottom: 1rem;
}

.legal-content li {
    color: var(--ink-mid);
    line-height: var(--leading-xl);
    margin-bottom: 0.25rem;
}

.legal-content a {
    color: var(--primary);
    text-decoration: underline;
    text-decoration-color: color-mix(in oklab, var(--primary) 30%, transparent);
    text-underline-offset: 2px;
}

.legal-content a:hover {
    text-decoration-color: var(--primary);
}

.legal-updated {
    font-size: var(--step--1);
    color: var(--ink-soft);
    margin-top: 3rem;
}

/* ─── PATIENT INFO PAGE ────────────────────────────────── */
.patient-info-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.patient-info-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-l);
    padding: 2rem;
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.3s, transform 0.3s;
}

.patient-info-card:hover {
    box-shadow: var(--shadow-m);
    transform: translateY(-2px);
}

.patient-info-icon {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, var(--primary-pale), var(--primary-muted));
    border-radius: var(--radius-m);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.25rem;
    color: var(--primary);
}

.patient-info-card h2 {
    font-size: var(--step-1);
    font-weight: var(--weight-700);
    color: var(--ink-strong);
    margin-bottom: 0.75rem;
}

.patient-info-body {
    color: var(--ink-mid);
    font-size: var(--step--1);
    line-height: var(--leading-xl);
    flex: 1;
}

.patient-info-body p {
    margin-bottom: 0.5rem;
}

.patient-info-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}

.patient-info-actions .btn {
    font-size: var(--step--1);
    padding: 0.5rem 1rem;
}

/* Policy cards */
.policy-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.policy-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-l);
    padding: 2rem;
    transition: box-shadow 0.3s, transform 0.3s;
}

.policy-card:hover {
    box-shadow: var(--shadow-m);
    transform: translateY(-2px);
}

.policy-icon {
    width: 44px;
    height: 44px;
    background: var(--primary-pale);
    border-radius: var(--radius-s);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    color: var(--primary);
}

.policy-card h3 {
    font-size: var(--step-1);
    font-weight: var(--weight-700);
    color: var(--ink-strong);
    margin-bottom: 0.5rem;
}

.policy-body {
    color: var(--ink-mid);
    font-size: var(--step--1);
    line-height: var(--leading-xl);
}

.policy-body p {
    margin-bottom: 0.5rem;
}

.policy-body a {
    color: var(--primary);
    text-decoration: underline;
    text-decoration-color: color-mix(in oklab, var(--primary) 30%, transparent);
    text-underline-offset: 2px;
}

.policy-body a:hover {
    text-decoration-color: var(--primary);
}

@media (max-width: 768px) {
    .patient-info-grid {
        grid-template-columns: 1fr;
    }
    .policy-grid {
        grid-template-columns: 1fr;
    }
}

/* ─── HOURS TABLE ───────────────────────────────────────── */
.hours-table {
    width: 100%;
    border-collapse: collapse;
}

.hours-table td {
    padding: 0.375rem 0;
    font-size: var(--step--1);
    line-height: var(--leading-l);
    vertical-align: top;
}

.hours-table td:first-child {
    font-weight: var(--weight-600);
    color: var(--ink);
    padding-right: 1.5rem;
    white-space: nowrap;
}

.hours-table td:last-child {
    color: var(--ink-mid);
}

/* ─── FOOTER ─────────────────────────────────────────────── */
.footer {
    background: var(--ink-strong);
    padding: 3.5rem 0 2rem;
    color: var(--on-primary);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 4rem;
    margin-bottom: 3rem;
}

.footer-brand .logo-img {
    filter: brightness(0) invert(1);
    opacity: 0.9;
}

.footer-brand p {
    font-size: var(--step--1);
    line-height: var(--leading-xl);
    color: rgba(255, 255, 255, 0.6);
    margin-top: 1.25rem;
}

.footer-col h4 {
    font-size: var(--step--2);
    font-weight: var(--weight-600);
    letter-spacing: var(--tracking-xl);
    text-transform: uppercase;
    color: var(--primary);
    margin-bottom: 1.25rem;
}

.footer-col ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
}

.footer-col ul li {
    font-size: var(--step--1);
    line-height: var(--leading-m);
}

.footer-col ul li a {
    font-size: var(--step--1);
    color: rgba(255, 255, 255, 0.6);
    transition: color 0.2s;
}

.footer-col ul li a:hover { color: var(--on-primary); }

.footer-col p {
    font-size: var(--step--1);
    line-height: var(--leading-xl);
    color: rgba(255, 255, 255, 0.6);
}

.footer-col p a {
    color: rgba(255, 255, 255, 0.6);
    transition: color 0.2s;
}

.footer-col p a:hover { color: var(--on-primary); }

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.footer-bottom p {
    font-size: var(--step--1);
    color: rgba(255, 255, 255, 0.4);
}

.footer-bottom a {
    color: rgba(255, 255, 255, 0.4);
    text-decoration: underline;
    text-decoration-color: rgba(255, 255, 255, 0.2);
    text-underline-offset: 2px;
    transition: color 0.2s;
}

.footer-bottom a:hover {
    color: rgba(255, 255, 255, 0.7);
    text-decoration-color: rgba(255, 255, 255, 0.4);
}

.footer-bottom .mf-email {
    color: rgba(255, 255, 255, 0.6);
}

.footer-bottom .mf-email:hover { color: var(--on-primary); }

/* ─── PAGE HERO (inner pages) ────────────────────────────── */
.page-hero {
    background: linear-gradient(135deg, var(--primary-pale) 0%, var(--primary-pale-drift) 100%);
    padding: 8rem 0 4rem;
}

.page-hero h1 {
    font-family: 'p22-mackinac-pro', Georgia, serif;
    font-size: var(--step-5);
    font-weight: var(--weight-700);
    line-height: var(--leading-s);
    letter-spacing: var(--tracking-xs);
    color: var(--ink-strong);
    margin-bottom: 1rem;
}

/* ─── TEAM GRID ──────────────────────────────────────────── */
.team-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.5rem;
}

.team-card {
    flex: 0 1 calc(33.333% - 1rem);
    min-width: 260px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-l);
    padding: 2rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: transform 0.3s, box-shadow 0.3s;
}

.team-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-m);
}

.team-avatar {
    width: 80px;
    height: 80px;
    background: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.25rem;
    position: relative;
    overflow: hidden;
}

.team-avatar svg {
    width: 36px;
    height: 36px;
    color: var(--on-primary);
}

.team-card h3 {
    font-size: var(--step-1);
    font-weight: var(--weight-600);
    color: var(--ink-strong);
    margin-bottom: 0.25rem;
}

.team-card .role {
    font-size: var(--step--1);
    color: var(--primary);
    font-weight: var(--weight-600);
    margin-bottom: 0.75rem;
}

.team-card .bio {
    font-size: var(--step--1);
    color: var(--ink-mid);
    line-height: var(--leading-l);
}

/* ─── DOCTORS PAGE ──────────────────────────────────────── */
.doctors-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

.doctor-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-l);
    padding: 2.5rem 2rem 2rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: transform 0.3s cubic-bezier(0.22,1,0.36,1), box-shadow 0.3s;
}

.doctor-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-m);
}

.doctor-card .doctor-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    position: relative;
    overflow: hidden;
    box-shadow: 0 0 0 4px var(--primary-pale), var(--shadow-s);
}

.doctor-card .doctor-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    position: relative;
    z-index: var(--layer-base);
}

.doctor-card .doctor-avatar svg {
    width: 48px;
    height: 48px;
    color: var(--on-primary);
    position: absolute;
}

.doctor-card h3 {
    font-size: var(--step-1);
    font-weight: var(--weight-700);
    color: var(--ink-strong);
    margin-bottom: 0.25rem;
}

.doctor-qualifications {
    font-size: var(--step--1);
    color: var(--ink-soft);
    font-weight: var(--weight-600);
    letter-spacing: var(--tracking-l);
    margin-bottom: 1rem;
}

.doctor-card .bio {
    font-size: var(--step--1);
    color: var(--ink-mid);
    line-height: var(--leading-xl);
    margin-bottom: 1.25rem;
}

.doctor-meta {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1.75rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--border);
}

.doctor-meta-item {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 0.5rem;
    font-size: var(--step--1);
    color: var(--ink-mid);
    line-height: var(--leading-l);
    text-align: center;
}

.doctor-meta-item svg {
    color: var(--primary);
    flex-shrink: 0;
    margin-top: 1px;
}

.doctor-book-btn {
    margin-top: auto;
    font-size: var(--step--1);
    padding: 0.625rem 1.25rem;
}

.doctor-days {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
    font-size: var(--step--2);
    color: var(--ink-soft);
    margin-top: 0.75rem;
}

.doctor-days svg {
    color: var(--ink-soft);
    flex-shrink: 0;
}

@media (max-width: 640px) {
    .doctors-grid {
        grid-template-columns: 1fr;
    }
}

/* ─── MOBILE MENU ────────────────────────────────────────── */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.625rem;
}

.mobile-menu-btn svg {
    width: 24px;
    height: 24px;
    color: var(--ink-mid);
}

.mobile-menu {
    display: none;
    position: fixed;
    top: 72px;
    left: 0;
    right: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-m);
    z-index: var(--layer-nav);
    padding: 1rem 1.5rem 1.5rem;
}

.mobile-menu.open { display: block; }

.mobile-menu ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    margin-bottom: 1rem;
}

.mobile-menu ul a {
    display: block;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-s);
    font-size: var(--step-0);
    font-weight: var(--weight-600);
    color: var(--ink-mid);
    transition: background 0.2s, color 0.2s;
}

.mobile-menu ul a:hover,
.mobile-menu ul a.active {
    background: var(--primary-pale);
    color: var(--primary);
}

.mobile-submenu-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-s);
    font-size: var(--step-0);
    font-weight: var(--weight-600);
    color: var(--ink-mid);
    transition: background 0.2s, color 0.2s;
}

.mobile-submenu-toggle:hover {
    background: var(--primary-pale);
    color: var(--primary);
}

.mobile-submenu-toggle svg {
    width: 16px;
    height: 16px;
    transition: transform 0.2s;
}

.mobile-submenu-toggle[aria-expanded="true"] svg {
    transform: rotate(180deg);
}

.mobile-submenu-toggle[aria-expanded="true"] {
    color: var(--primary);
}

.mobile-submenu {
    display: none;
    list-style: none;
    padding-left: 1rem;
}

.mobile-submenu.open {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.mobile-submenu a {
    display: block;
    padding: 0.625rem 1rem;
    border-radius: var(--radius-s);
    font-size: var(--step--1);
    font-weight: var(--weight-600);
    color: var(--ink-mid);
    transition: background 0.2s, color 0.2s;
}

.mobile-submenu a:hover,
.mobile-submenu a.active {
    background: var(--primary-pale);
    color: var(--primary);
}

.mobile-menu-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.mobile-menu-buttons .btn {
    justify-content: center;
    width: 100%;
}

/* ─── RESPONSIVE ─────────────────────────────────────────── */
@media (max-width: 1024px) {
    .nav-links { display: none; }
    .mobile-menu-btn { display: block; }

    .hero-inner {
        display: flex;
        flex-direction: column;
        text-align: center;
    }

    .hero-content {
        max-width: 600px;
        margin: 0 auto;
        order: -1;
    }

    .hero-img {
        min-height: 0;
        max-height: 320px;
        border-radius: var(--radius-m);
    }

    .hero-buttons { justify-content: center; }
    .hero-stats { justify-content: center; }

    .about-grid { grid-template-columns: 1fr; gap: 3rem; }
    .about-img-float { right: 0; }
    .contact-grid { grid-template-columns: 1fr; gap: 3rem; }
    .form-grid { grid-template-columns: 1fr; gap: 3rem; }
    .services-grid { grid-template-columns: repeat(2, 1fr); }
    .strip-grid { grid-template-columns: repeat(2, 1fr); }
    .strip-item:nth-child(2) { border-right: none; }
    .footer-grid { grid-template-columns: 1fr 1fr; gap: 2.5rem; }
}

@media (max-width: 640px) {
    .nav-buttons { display: none; }
    .container { padding: 0 1.25rem; }
    .section { padding: 5rem 0; }

    .hero-stats {
        flex-direction: column;
        gap: 1rem;
        align-items: center;
    }

    .stat { text-align: center; }

    .services-grid { grid-template-columns: 1fr; }
    .strip-grid { grid-template-columns: 1fr; }
    .strip-item {
        border-right: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.18);
    }
    .strip-item:last-child { border-bottom: none; }
    .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
    .about-img-float { display: none; }
    .page-hero { padding: 6rem 0 3rem; }
    .team-card { flex: 0 0 100%; }
}

/* ─── FOCUS STYLES ──────────────────────────────────────── */
.service-card:focus-within,
a.service-card:focus {
    transform: translateY(-6px);
    box-shadow: var(--shadow-m);
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

.btn:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

.footer-col ul li a,
.footer-col p a,
.info-text .val a {
    text-decoration: underline;
    text-decoration-color: rgba(255, 255, 255, 0.3);
    text-underline-offset: 2px;
}

.info-text .val a {
    text-decoration-color: var(--border);
}

.info-text .val a:hover {
    text-decoration-color: var(--primary);
}

.footer-col ul li a:hover,
.footer-col p a:hover {
    text-decoration-color: var(--on-primary);
}

/* ── 404 ──────────────────────────────────────────────────────────────
 * Served for any unmatched path, so it stands alone: say what happened, then
 * offer the way back rather than leaving a dead end.
 *
 * Deliberately written against fallbacks rather than this site's own token
 * names - every site in the fleet has a different vocabulary, and a 404 that
 * silently loses its layout because one variable is spelt differently is
 * worse than one that is slightly plainer. */
.notfound {
    padding-block: clamp(6rem, 14vw, 11rem) clamp(4rem, 9vw, 7rem);
    text-align: center;
}
.notfound__inner { max-width: 46rem; margin-inline: auto; }

/* Decorative, aria-hidden in the markup - the <h1> carries the meaning. Sized
 * large but kept at a legible contrast: a very pale numeral fails WCAG even
 * when it is ornamental. */
.notfound__code {
    font-size: clamp(4.5rem, 18vw, 9rem);
    font-weight: 700;
    line-height: 0.9;
    margin: 0 0 0.25em;
    opacity: 0.55;
}
.notfound h1 { margin-top: 0; }
.notfound__lede { font-size: 1.125rem; line-height: 1.5; margin-inline: auto; max-width: 40rem; }

.notfound__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
    margin-top: 2rem;
}

.notfound__links {
    margin-top: 3.5rem;
    padding-top: 2rem;
    border-top: 1px solid currentColor;
    /* The rule is a hairline of the surrounding ink rather than a named border
     * token, so it works whatever the site's palette is. */
    border-color: color-mix(in oklab, currentColor 22%, transparent);
}
.notfound__links-title {
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin: 0 0 1rem;
}
.notfound__links ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1.75rem;
    justify-content: center;
}
.notfound__links a {
    display: inline-block;
    /* WCAG 2.2 target size. */
    min-height: 24px;
    line-height: 24px;
    font-weight: 600;
}
