/* =========================================================
   Hip Resurfacing Practice - Design System
   Inspired by sloanestreetsurgery.co.uk
   - Palette: deep navy + warm gold on white / cream
   - Typography: elegant uppercase serif headings + clean body
   ========================================================= */

:root {
    --navy: #004068;
    --navy-dark: #002d4a;
    --navy-deeper: #001f33;
    --gold: #b08d57;
    --gold-light: #c8a877;
    --gold-dark: #8c6f44;
    --cream: #f7f4ef;
    --cream-light: #faf8f4;
    --grey-line: #e6e1d8;
    --white: #ffffff;
    --text: #2a3340;

    --serif: "Cormorant Garamond", "Goudy Old Style", "Garamond", Georgia, serif;
    --sans: "Source Sans 3", "Frutiger", "Helvetica Neue", Arial, sans-serif;

    --container: 1280px;
    --container-wide: 1440px;

    --shadow-card: 0 2px 16px rgba(0, 32, 60, 0.08);

    /* Sticky-bar heights — main.js overwrites these with measured values
       on load, resize, and via ResizeObserver. The fallbacks here are
       used only in the brief window before main.js runs.
       --header-h: the .site-header sticky bar height.
       --anchor-nav-h: the in-page .anchor-nav sticky bar height (stays 0
       on pages that don't have one, e.g. index.html, about.html). */
    --header-h: 96px;
    --anchor-nav-h: 0px;
}

* {
    box-sizing: border-box;
}

/* Defensive: prevent any oversized child (third-party embeds, etc.)
   from causing horizontal page scroll on mobile. `clip` is preferred
   over `hidden` so position: sticky inside still works. */
html, body {
    overflow-x: clip;
}

html {
    scroll-behavior: smooth;
}

/* Anchor-link landing offset.
   Clicking an in-page anchor (e.g. <a href="#procedure">) defaults to
   placing the target at viewport top 0, which would sit behind the
   sticky site-header (and the sticky anchor-nav on pillar pages).
   scroll-margin-top shifts the landing point down so the section
   heading appears just below whichever sticky bars are present. */
section[id] {
    scroll-margin-top: calc(var(--header-h) + var(--anchor-nav-h) + 16px);
}

body {
    margin: 0;
    font-family: var(--sans);
    font-size: 17px;
    line-height: 1.65;
    color: var(--text);
    background: var(--white);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img {
    max-width: 100%;
    display: block;
}

a {
    color: var(--navy);
    text-decoration: none;
    transition: color 0.25s ease;
}

a:hover {
    color: var(--gold);
}

/* Inline text link — gold with underline, used in body copy */
.text-link {
    color: var(--gold);
    border-bottom: 1px solid rgba(176, 141, 87, 0.45);
    transition: color 0.2s ease, border-bottom-color 0.2s ease;
}
.text-link:hover {
    color: var(--navy);
    border-bottom-color: var(--navy);
}

/* ----- Typography ----- */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--serif);
    font-weight: 500;
    color: var(--navy);
    letter-spacing: 0.04em;
    margin: 0 0 0.6em;
    line-height: 1.15;
}

h1 {
    font-size: clamp(2.4rem, 4.6vw, 4.4rem);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 500;
}

h2 {
    font-size: clamp(1.7rem, 2.6vw, 2.6rem);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

h3 {
    font-size: clamp(1.3rem, 1.8vw, 1.75rem);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

h4 {
    font-size: 1.15rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--gold);
}

p {
    margin: 0 0 1.1em;
}

/* Brand-name casing preservation.
   The design system uppercases h1/h2/h3/h4, .eyebrow, anchor-nav, and .btn.
   Trade names with internal capitals (e.g. ReCerf) must keep their casing.
   Wrap such names in <span class="brand-case">ReCerf</span> to override. */
.brand-case {
    text-transform: none;
    letter-spacing: 0;
}

.eyebrow {
    font-family: var(--sans);
    font-size: 0.82rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--gold);
    font-weight: 600;
    margin: 0 0 0.8rem;
    display: inline-block;
}

.eyebrow--centered {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    color: var(--gold);
}

.eyebrow--centered::before,
.eyebrow--centered::after {
    content: "";
    width: 36px;
    height: 1px;
    background: var(--gold);
}

.gold-rule {
    width: 56px;
    height: 1px;
    background: var(--gold);
    border: 0;
    margin: 14px auto 22px;
}

.gold-rule--left {
    margin-left: 0;
    margin-right: auto;
}

/* ----- Layout helpers ----- */
.container {
    width: 100%;
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 28px;
}

.container--wide {
    max-width: var(--container-wide);
}

.section {
    padding: 96px 0;
}

.section--tight {
    padding: 64px 0;
}

.section--cream {
    background: var(--cream);
}

.section--navy {
    background: var(--navy);
    color: var(--white);
}

.section--navy h1,
.section--navy h2,
.section--navy h3,
.section--navy h4 {
    color: var(--white);
}

.section--navy .gold-rule {
    background: var(--gold);
}

/* ----- Buttons ----- */
.btn {
    display: inline-block;
    padding: 14px 34px;
    font-family: var(--sans);
    font-size: 0.82rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    font-weight: 600;
    border: 1px solid var(--gold);
    background: transparent;
    color: var(--navy);
    cursor: pointer;
    transition: all 0.25s ease;
    text-decoration: none;
    line-height: 1.2;
}

.btn:hover {
    background: var(--gold);
    color: var(--white);
}

.btn--solid {
    background: var(--navy);
    color: var(--white);
    border-color: var(--navy);
}

.btn--solid:hover {
    background: var(--gold);
    border-color: var(--gold);
    color: var(--white);
}

.btn--ghost-light {
    border-color: rgba(255, 255, 255, 0.7);
    color: var(--white);
}

.btn--ghost-light:hover {
    background: var(--gold);
    border-color: var(--gold);
    color: var(--white);
}

/* ----- Header / Navigation ----- */
.site-header {
    position: sticky;
    top: 0;
    /* Sits above the menu overlay (z-index 200) so the nav bar stays visible
       — logo, menu button, contact link, phone — while the menu is open. */
    z-index: 250;
    background: var(--white);
    border-bottom: 1px solid var(--grey-line);
}

/* ----- Menu-open scroll lock ----- */
/* While the overlay is open, JS adds .menu-open to <body> and pins it in
   place (top offset = saved scroll position). This stops the page scrolling
   behind the menu on every browser, including iOS Safari where
   `overflow: hidden` alone is ignored. */
body.menu-open {
    position: fixed;
    left: 0;
    right: 0;
    width: 100%;
    overflow: hidden;
}

/* With the body pinned via position:fixed, the header can no longer rely on
   sticky positioning, so we fix it to the viewport top. This guarantees the
   nav bar — and its close button — stays visible no matter how far the menu
   content is scrolled. */
body.menu-open .site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
}

.nav-bar {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    padding: 18px 36px;
    gap: 24px;
}

.nav-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.menu-btn {
    background: transparent;
    border: 1.5px solid var(--navy);
    border-radius: 2px;
    padding: 13px 22px;
    display: inline-flex;
    align-items: center;
    gap: 16px;
    cursor: pointer;
    font-family: var(--sans);
    font-size: 0.82rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--navy);
    font-weight: 600;
    line-height: 1;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.menu-btn:hover {
    background: rgba(0, 64, 104, 0.04);
}

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

.menu-btn__icons {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
}

.menu-btn .hamburger {
    display: inline-flex;
    flex-direction: column;
    gap: 5px;
    width: 22px;
}

.menu-btn .hamburger span {
    display: block;
    height: 1.5px;
    background: var(--gold);
    width: 100%;
}

.menu-btn .hamburger span:nth-child(2) {
    width: 70%;
}

/* Close-icon SVG inside the menu button — hidden until the menu is open. */
.menu-btn__close {
    display: none;
    color: var(--navy);
}

.menu-btn[aria-expanded="true"] .hamburger {
    display: none;
}

.menu-btn[aria-expanded="true"] .menu-btn__close {
    display: inline-block;
}

.brand {
    text-align: center;
    text-decoration: none;
    color: var(--navy-deeper);
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    line-height: 1;
    padding: 4px 0;
}

.brand__top {
    font-family: var(--serif);
    font-size: 0.7rem;
    letter-spacing: 0.34em;
    color: var(--navy-deeper);
    text-transform: uppercase;
}

.brand__main {
    display: flex;
    align-items: center;
    gap: 14px;
}

.brand__main::before,
.brand__main::after {
    content: "";
    width: 38px;
    height: 1px;
    background: var(--gold);
}

.brand__name {
    font-family: var(--serif);
    font-size: 1.55rem;
    letter-spacing: 0.18em;
    color: var(--navy);
    text-transform: uppercase;
    font-weight: 500;
}

.brand__sub {
    font-family: var(--serif);
    font-size: 0.72rem;
    letter-spacing: 0.4em;
    color: var(--navy-deeper);
    text-transform: uppercase;
}

.nav-right {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 38px;
}

.nav-link {
    font-family: var(--sans);
    font-size: 0.78rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--navy);
    font-weight: 600;
    padding-bottom: 4px;
    border-bottom: 1.5px solid transparent;
}

.nav-link:hover,
.nav-link.is-active {
    color: var(--navy);
    border-bottom-color: var(--gold);
}

.nav-phone {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid var(--gold);
    color: var(--navy);
    text-decoration: none;
    transition: background 0.25s ease, transform 0.2s ease;
}

.nav-phone:hover {
    background: var(--gold);
}

.nav-phone:hover .nav-phone__icon {
    stroke: var(--white);
}

.nav-phone__icon {
    width: 20px;
    height: 20px;
    stroke: var(--gold);
    fill: none;
    stroke-width: 1.8;
    transition: stroke 0.25s ease;
}

.nav-phone__number {
    font-family: var(--serif);
    font-size: 1.1rem;
    letter-spacing: 0.06em;
    color: var(--navy);
    font-weight: 500;
}

.nav-phone__sub {
    font-family: var(--sans);
    font-size: 0.62rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--navy);
    opacity: 0.7;
    display: block;
    margin-top: 2px;
}

/* ----- Slide-out / overlay menu ----- */
/* Padding-top clears the sticky header so menu items don't sit behind it.
   The header has its own white background and a higher z-index (250),
   so it stays fully visible on top of the navy overlay. */
.menu-overlay {
    position: fixed;
    inset: 0;
    background: var(--navy);
    color: var(--white);
    z-index: 200;
    display: none;
    padding: 190px 48px 56px;
    overflow-y: auto;
}

.menu-overlay.is-open {
    display: block;
}

/* Panels — root is shown by default; sub-panels (e.g. The Implants) appear
   when the matching .is-active class is toggled in JS. */
/* Left-aligned by default — the panel hugs the overlay's left padding
   on desktop. On mobile the viewport is narrower than max-width, so
   items still appear to fill the space naturally. */
.menu-overlay__panel {
    display: none;
    max-width: 540px;
    margin: 0;
}

.menu-overlay__panel.is-active {
    display: block;
}

.menu-overlay__panel-head {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-bottom: 36px;
    padding-bottom: 18px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.menu-overlay__back {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 50%;
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--gold);
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.menu-overlay__back:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: var(--gold);
    color: var(--gold-light);
}

.menu-overlay__panel-title {
    font-family: var(--serif);
    font-size: 1.25rem;
    font-weight: 500;
    color: var(--white);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin: 0;
}

.menu-overlay__list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.menu-overlay__list li {
    margin-bottom: 18px;
}

/* "+" expand row — styled to match the regular menu items so the rhythm is
   unbroken; the gold "+" on the right signals it has child content. */
/* The whole row is the tap target (width 100%), but the "+" sits
   directly next to the label rather than being pushed to the far
   right by space-between. */
.menu-overlay__expand {
    background: transparent;
    border: 0;
    padding: 0;
    cursor: pointer;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 14px;
    font-family: var(--serif);
    font-size: 1.25rem;
    color: var(--white);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    text-align: left;
    transition: color 0.2s ease;
}

.menu-overlay__expand:hover {
    color: var(--gold-light);
}

.menu-overlay__plus {
    font-family: var(--sans);
    /* 1.25em scales with the parent font-size, so the "+" is visibly
       larger than the label on both desktop (1.6rem) and mobile (1.25rem). */
    font-size: 1.25em;
    color: var(--gold);
    line-height: 1;
    font-weight: 300;
    transition: color 0.2s ease;
}

.menu-overlay__expand:hover .menu-overlay__plus {
    color: var(--gold-light);
}

.menu-overlay__cta-item {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 22px;
}

.menu-overlay__list a {
    font-family: var(--serif);
    font-size: 1.25rem;
    color: var(--white);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    text-decoration: none;
    transition: color 0.2s ease;
}

.menu-overlay__list a:hover {
    color: var(--gold-light);
}

/* ----- Overlay CTA + Doctify trust signal ----- */

/* CTA link inherits the .menu-overlay__list a typography
   (serif, uppercase, 1.6rem desktop / 1.25rem mobile, 0.1em
   letter-spacing) so it sits in the same vertical rhythm as
   the other menu items. The only differentiator is the thin
   gold rule beneath it. */
.menu-overlay__cta-link {
    border-bottom: 1px solid var(--gold);
    padding-bottom: 6px;
    align-self: flex-start;
    white-space: nowrap;
}

.menu-overlay__cta-link:hover {
    border-bottom-color: var(--gold-light);
}

.menu-overlay__trust {
    display: inline-flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    color: rgba(255, 255, 255, 0.55);
    text-decoration: none;
    font-family: var(--sans);
    line-height: 1;
    transition: color 0.2s ease;
}

.menu-overlay__trust:hover {
    color: var(--gold-light);
}

.menu-overlay__stars {
    color: var(--gold);
    font-size: 0.95rem;
    letter-spacing: 0.22em;
    line-height: 1;
}

.menu-overlay__trust-text {
    font-size: 0.68rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    white-space: nowrap;
    font-weight: 500;
}

/* ----- Hero ----- */
.hero {
    position: relative;
    /* 62vh leaves the info-bar peeking above the fold on most desktops,
       signalling depth without losing the cinematic statement feel.
       Matches the Sloane Street reference roughly. */
    min-height: 62vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--white);
    overflow: hidden;
    background: var(--navy-deeper);
}

/* Ken Burns cycle: three implant images (ReCerf → H1 → Adept) stacked,
   each visible for ~7s of a 24s loop with 1s crossfades, with a slow
   per-image zoom-IN and rotation arc. object-fit: contain means the
   whole implant is always visible (never cropped or overflowing) on
   either desktop or mobile; the navy background fills any remaining
   space and matches the implant images' own backgrounds. */
.hero__cycle {
    position: absolute;
    inset: 0;
    z-index: 1;
    overflow: hidden;
    /* Matches the unified navy used inside all three implant canvases,
       so rotation that clips the image bbox at the hero edges shows
       only matching navy, never a seam. */
    background: #02314b;
}

.hero__media {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    opacity: 0;
    will-change: opacity, transform;
}

.hero__media--1 { animation: hero-show-1 36s ease-in-out infinite, hero-pan-1 36s ease-out infinite; }
.hero__media--2 { animation: hero-show-2 36s ease-in-out infinite, hero-pan-2 36s ease-out infinite; }
.hero__media--3 { animation: hero-show-3 36s ease-in-out infinite, hero-pan-3 36s ease-out infinite; }

/* Opacity keyframes — each image visible for ~7s of the 24s cycle,
   with 1s crossfade transitions. Image 1 wraps at the loop boundary. */
@keyframes hero-show-1 {
    0%   { opacity: 1; }
    29%  { opacity: 1; }
    33%  { opacity: 0; }
    96%  { opacity: 0; }
    100% { opacity: 1; }
}
@keyframes hero-show-2 {
    0%   { opacity: 0; }
    29%  { opacity: 0; }
    33%  { opacity: 1; }
    62%  { opacity: 1; }
    66%  { opacity: 0; }
    100% { opacity: 0; }
}
@keyframes hero-show-3 {
    0%   { opacity: 0; }
    62%  { opacity: 0; }
    66%  { opacity: 1; }
    96%  { opacity: 1; }
    100% { opacity: 0; }
}

/* Per-image Ken Burns — each implant starts at scale 0.7 (already
   sizable, not tiny) facing 4 o'clock (rotate 120deg), then over its
   ~12s visible window zooms IN to scale 1.0 and rotates clockwise by
   18° to rotate 138deg. Slow, deliberate, 36s per full cycle.

   Scale + rotation HOLD at the end values through the entire fade-out
   window, then snap back to start values only while fully invisible,
   so the next zoom-in always starts from the same orientation and
   there's no ugly reverse-zoom before the loop. */
@keyframes hero-pan-1 {
    0%   { transform: scale(0.7) rotate(120deg); }     /* start: small, facing 4 */
    29%  { transform: scale(1.0) rotate(138deg); }     /* end: full size, slight clockwise */
    33%  { transform: scale(1.0) rotate(138deg); }     /* hold through fade-out */
    34%  { transform: scale(0.7) rotate(120deg); }     /* snap reset (invisible) */
    100% { transform: scale(0.7) rotate(120deg); }     /* hold ready for loop */
}
@keyframes hero-pan-2 {
    0%, 33%  { transform: scale(0.7) rotate(120deg); }
    62%      { transform: scale(1.0) rotate(138deg); }
    66%      { transform: scale(1.0) rotate(138deg); } /* hold through fade-out */
    67%      { transform: scale(0.7) rotate(120deg); }
    100%     { transform: scale(0.7) rotate(120deg); }
}
@keyframes hero-pan-3 {
    0%, 66%  { transform: scale(0.7) rotate(120deg); }
    95%      { transform: scale(1.0) rotate(138deg); }
    /* Hold scale 1.0 + rotate 138deg through the fade-out (95-100%).
       The snap back to start values happens at the loop boundary —
       invisible because opacity is 0 at both 100% and 0% of next cycle. */
    100%     { transform: scale(1.0) rotate(138deg); }
}

.hero__media {
    transform-origin: center center;
}

/* Honour users with vestibular sensitivities — freeze on the first image. */
@media (prefers-reduced-motion: reduce) {
    .hero__media {
        animation: none;
    }
    .hero__media--1 {
        opacity: 1;
    }
}

.hero__overlay {
    position: absolute;
    inset: 0;
    /* Radial vignette: ~60% opacity dark navy directly behind the
       headline + lede, fading to transparent at the corners so the
       implant rotation and zoom remain visible at the hero edges
       where they look most dramatic. */
    background: radial-gradient(
        ellipse 65% 55% at center,
        rgba(0, 25, 45, 0.62) 0%,
        rgba(0, 25, 45, 0.32) 55%,
        rgba(0, 25, 45, 0) 95%
    );
    z-index: 2;
}

.hero__content {
    position: relative;
    z-index: 3;
    max-width: 820px;
    padding: 120px 28px;
}

.hero__eyebrow {
    color: var(--white);
    font-family: var(--sans);
    font-size: 0.78rem;
    letter-spacing: 0.36em;
    font-weight: 600;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    margin-bottom: 22px;
}

.hero__eyebrow::before,
.hero__eyebrow::after {
    content: "";
    width: 60px;
    height: 1px;
    background: var(--gold);
}

.hero h1 {
    color: var(--white);
    margin: 0 0 22px;
    font-weight: 500;
    /* Responsive scale — 2rem on the smallest phones up to 3.4rem
       on wide desktops. Stops the headline pushing the hero past
       a single mobile viewport. */
    font-size: clamp(2rem, 5vw, 3.4rem);
    line-height: 1.15;
    /* Soft dark halo so the white headline still reads cleanly if
       it lands over a bright pink/silver area of the implant. */
    text-shadow: 0 2px 14px rgba(0, 25, 45, 0.75), 0 1px 2px rgba(0, 25, 45, 0.5);
}

.hero__lede {
    font-family: var(--sans);
    font-size: 1.1rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.92);
    max-width: 540px;
    margin: 0 auto 36px;
    /* Same soft dark halo as the h1 for consistent readability against
       any frame of the rotating implant photos. */
    text-shadow: 0 2px 10px rgba(0, 25, 45, 0.7), 0 1px 2px rgba(0, 25, 45, 0.5);
}

.hero__cta {
    display: flex;
    gap: 14px;
    justify-content: center;
    flex-wrap: wrap;
}

/* image placeholder used inside hero/media slots */
.media-placeholder {
    background: linear-gradient(135deg, #cfd9e1 0%, #aab9c5 100%);
    color: var(--navy);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-family: var(--sans);
    font-size: 0.78rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    font-weight: 600;
    aspect-ratio: 4 / 3;
    width: 100%;
    border: 1px dashed rgba(0, 64, 104, 0.25);
    padding: 24px;
}

.media-placeholder--portrait {
    aspect-ratio: 3 / 4;
}

.media-placeholder--square {
    aspect-ratio: 1 / 1;
}

.media-placeholder--wide {
    aspect-ratio: 16 / 9;
}

.media-placeholder--hero {
    position: absolute;
    inset: 0;
    aspect-ratio: auto;
    border: none;
    opacity: 0.55;
    color: var(--white);
    background: linear-gradient(135deg, #003a5e 0%, #005380 100%);
}

/* ----- Ken Burns slideshow (home page feature block) ----- */
.kb-slideshow {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: #000;
    border: 1px solid rgba(0, 64, 104, 0.12);
    isolation: isolate;
}

.kb-slide {
    position: absolute;
    inset: 0;
    margin: 0;
    opacity: 0;
    transition: opacity 1.6s ease-in-out;
    will-change: opacity;
}

.kb-slide.is-active {
    opacity: 1;
    z-index: 1;
}

.kb-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transform-origin: center center;
    will-change: transform, opacity;
    animation-duration: 7.6s;
    animation-timing-function: ease-out;
    animation-fill-mode: both;
    animation-play-state: paused;
}

/* Animations are attached to each slide type but paused by default; they
   start when the slide gains .is-active and hold their end state when it
   loses it, so the transform never jumps during the crossfade. */
.kb-slide--patient img { animation-name: kb-zoom; }
.kb-slide--team img    { animation-name: kb-zoom; }
.kb-slide--ski img     { animation-name: kb-zoom-out; }

/* The implant slide is the visual centrepiece: a touch deeper zoom and a
   longer hold, but the same smooth easing so the rhythm stays consistent.
   transform-origin biases the zoom toward where the implant typically sits
   in a procedure photo — tune per photo if needed. */
.kb-slide--implant img {
    transform-origin: 50% 48%;
    animation-name: kb-zoom-deep;
    animation-duration: 9.6s;
}

.kb-slide.is-active img {
    animation-play-state: running;
}

@keyframes kb-zoom {
    from { transform: scale(1.00); }
    to   { transform: scale(1.08); }
}

@keyframes kb-zoom-deep {
    from { transform: scale(1.00); }
    to   { transform: scale(1.18); }
}

@keyframes kb-zoom-out {
    from { transform: scale(1.10); }
    to   { transform: scale(1.00); }
}

@media (prefers-reduced-motion: reduce) {
    .kb-slide,
    .kb-slide img {
        transition: none !important;
        animation: none !important;
    }
}

/* ----- Info bar (under hero) ----- */
.info-bar {
    background: var(--navy);
    color: var(--white);
    padding: 64px 0 72px;
}

.info-bar__title {
    text-align: center;
    color: var(--white);
    margin-bottom: 48px;
}

.info-bar__grid {
    display: grid;
    grid-template-columns: 1fr 1px 1fr;
    gap: 60px;
    align-items: start;
    max-width: 1080px;
    margin: 0 auto;
}

/* Three-column variant for the hospital locations row */
.info-bar__grid--three {
    grid-template-columns: repeat(3, 1fr);
    gap: 48px;
    max-width: 1100px;
}

.info-bar__divider {
    background: rgba(255, 255, 255, 0.18);
    width: 1px;
    height: 100%;
    min-height: 220px;
}

.info-bar__col {
    text-align: center;
}

/* Clickable location cards (homepage Practice Locations) link to each
   hospital page. Added 2026-06-09. */
a.info-bar__col {
    display: block;
    text-decoration: none;
    color: inherit;
    border-radius: 8px;
    padding: 22px 18px;
    transition: background 0.2s ease, transform 0.2s ease;
}
a.info-bar__col:hover {
    background: rgba(255, 255, 255, 0.06);
    transform: translateY(-2px);
}
a.info-bar__col:hover h3 {
    color: var(--gold-light);
}
a.info-bar__col:focus-visible {
    outline: 2px solid var(--gold);
    outline-offset: 2px;
}
.info-bar__col-cue {
    display: inline-block;
    margin-top: 4px;
    font-family: var(--sans);
    font-size: 0.78rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    font-weight: 700;
    color: var(--gold-light);
}

.info-bar__col h3 {
    color: var(--white);
    letter-spacing: 0.18em;
    margin-bottom: 18px;
    font-size: 1.2rem;
}

.info-bar__col p {
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 18px;
}

/* Contact block beneath the three locations — Wendy + Book button. */
.info-bar__contact {
    text-align: center;
    margin: 56px auto 0;
    padding-top: 40px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    max-width: 480px;
}

.info-bar__contact-label {
    font-family: var(--sans);
    font-size: 0.78rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 14px;
}

.info-bar__contact-name {
    font-family: var(--serif);
    font-size: 1.25rem;
    color: var(--white);
    margin-bottom: 6px;
}

.info-bar__contact-name span {
    color: rgba(255, 255, 255, 0.55);
    font-size: 0.95rem;
}

.info-bar__contact-phone {
    font-family: var(--serif);
    font-size: 1.4rem;
    margin-bottom: 24px;
}

.info-bar__contact-phone a {
    color: var(--gold-light);
    text-decoration: none;
    border-bottom: 1px solid rgba(200, 168, 119, 0.4);
    padding-bottom: 2px;
    transition: color 0.2s ease, border-color 0.2s ease;
}

.info-bar__contact-phone a:hover {
    color: var(--white);
    border-bottom-color: var(--white);
}

/* ----- Two-column feature ----- */
.feature {
    padding: 96px 0;
}

.feature__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
}

.feature__grid--reverse {
    direction: rtl;
}

.feature__grid--reverse > * {
    direction: ltr;
}

.feature__copy h2 {
    margin-bottom: 22px;
}

.feature__copy p {
    color: var(--text);
    font-size: 1.05rem;
}

/* Direct-child selector only: the standalone feature photo. Must NOT match
   the nested .kb-slide imgs, whose height:100% / object-fit:cover fill
   would be broken by height:auto (off-centre slides with visible edges). */
.feature__media > img {
    display: block;
    width: 100%;
    height: auto;
    border: 1px solid var(--gold-light);
    box-shadow: var(--shadow-card);
}

/* ----- Pillars / icon grid ----- */
.pillars {
    background: var(--cream);
}

.pillars__head {
    text-align: center;
    max-width: 720px;
    margin: 0 auto 64px;
}

.pillars__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
}

.pillar {
    background: var(--white);
    padding: 40px 32px;
    text-align: center;
    border: 1px solid var(--grey-line);
}

.pillar__icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 22px;
    color: var(--gold);
}

.pillar h3 {
    font-size: 1.2rem;
    letter-spacing: 0.12em;
    margin-bottom: 12px;
}

.pillar p {
    color: var(--text);
    font-size: 0.98rem;
    margin: 0;
}

/* ----- Quote / testimonial ----- */
.quote-section {
    text-align: center;
    background: var(--cream-light);
}

.quote-section__icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 24px;
    color: var(--gold);
}

.quote-section blockquote {
    font-family: var(--serif);
    font-size: clamp(1.3rem, 2vw, 1.75rem);
    line-height: 1.5;
    color: var(--navy);
    max-width: 820px;
    margin: 0 auto 26px;
    font-style: italic;
    font-weight: 500;
}

.quote-section cite {
    font-family: var(--sans);
    font-size: 0.78rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--gold);
    font-weight: 600;
    font-style: normal;
}

/* ----- Doctify reviews carousel embed ----- */
.doctify-embed {
    max-width: 880px;
    margin: 8px auto 0;
    width: 100%;
}
.doctify-embed iframe.doctify-widget {
    display: block;
    width: 100%;
    border: 0;
    min-height: 300px;
}
.quote-section__link {
    margin: 24px 0 0;
}
.quote-section__link a {
    font-family: var(--sans);
    font-size: 0.78rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    font-weight: 600;
    color: var(--gold-dark);
    border-bottom: 1px solid var(--gold);
    padding-bottom: 2px;
    transition: color 0.2s ease;
}
.quote-section__link a:hover {
    color: var(--navy);
}
@media (max-width: 700px) {
    .doctify-embed iframe.doctify-widget {
        min-height: 380px;
    }
}

/* ----- Article grid ----- */
.articles {
    background: var(--cream);
}

.articles__head {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 48px;
    flex-wrap: wrap;
    gap: 24px;
}

.articles__head h2 {
    margin: 0;
}

.article-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
}

.article-card {
    background: var(--white);
    border: 1px solid var(--gold-light);
    box-shadow: var(--shadow-card);
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.22s ease, transform 0.22s ease, border-color 0.22s ease;
}

.article-card:hover {
    border-color: var(--gold);
    box-shadow: 0 10px 30px rgba(0, 32, 60, 0.15);
    transform: translateY(-3px);
}

.article-card__media {
    aspect-ratio: 16 / 10;
    overflow: hidden;
    border-bottom: 1px solid var(--grey-line);
}

.article-card__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.article-card__body {
    padding: 26px 26px 30px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.article-card h3 {
    font-size: 1.15rem;
    margin-bottom: 18px;
    letter-spacing: 0.06em;
    flex: 1;
    line-height: 1.3;
}

.article-card .read-link {
    font-family: var(--sans);
    font-size: 0.78rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--navy);
    font-weight: 600;
    border-bottom: 1.5px solid var(--gold);
    padding-bottom: 4px;
    align-self: flex-start;
}

/* ----- Contact / find us banner ----- */
.find-banner {
    background: var(--cream-light);
    text-align: center;
}

.find-banner h2 {
    margin-bottom: 14px;
}

.find-banner__address {
    font-family: var(--serif);
    font-size: 1.2rem;
    color: var(--navy);
    margin: 18px 0 6px;
    line-height: 1.5;
}

.find-banner__phone {
    font-family: var(--serif);
    font-size: 1.2rem;
    color: var(--navy);
    margin: 0 0 24px;
}

/* ----- Footer ----- */
.site-footer {
    background: var(--navy-dark);
    color: rgba(255, 255, 255, 0.85);
    padding: 72px 0 24px;
}

.site-footer h4 {
    color: var(--gold);
    font-family: var(--sans);
    font-size: 0.82rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    margin: 0 0 22px;
    font-weight: 600;
}

.site-footer a {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
}

.site-footer a:hover {
    color: var(--gold-light);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 1fr 1fr;
    gap: 48px;
    margin-bottom: 56px;
}

.footer-grid p {
    font-size: 0.95rem;
    line-height: 1.7;
    margin-bottom: 12px;
}

.footer-grid ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-grid li {
    margin-bottom: 10px;
    font-size: 0.95rem;
}

/* Footer emphasis — serif promotion (and a bigger phone) to lift the
   key bits out of the sans body text without touching colour. */
.footer-name {
    font-family: var(--serif);
    font-size: 1.1rem;
    letter-spacing: 0.02em;
}

.footer-phone {
    font-family: var(--serif);
    font-size: 1.35rem;
    letter-spacing: 0.03em;
    line-height: 1.4;
    display: inline-block;
    margin-bottom: 4px;
}

.footer-locations a {
    font-family: var(--serif);
    font-size: 1.05rem;
    letter-spacing: 0.02em;
    display: inline-block;
    margin-bottom: 4px;
    border-bottom: 1px solid transparent;
    transition: color 0.2s ease, border-color 0.2s ease;
}

.footer-locations a:hover {
    color: var(--gold-light);
    border-bottom-color: rgba(200, 168, 119, 0.5);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 22px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.6);
    flex-wrap: wrap;
    gap: 18px;
}

.footer-bottom .legal a {
    margin-left: 18px;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.82rem;
}

/* ----- Page banner (sub-pages) ----- */
.page-banner {
    background: var(--navy);
    color: var(--white);
    padding: 90px 0 80px;
    text-align: center;
}

.page-banner h1 {
    color: var(--white);
    margin-bottom: 14px;
}

.page-banner__crumbs {
    font-family: var(--sans);
    font-size: 0.78rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.8);
}

.page-banner__crumbs a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    border-bottom: 1px solid var(--gold);
    padding-bottom: 2px;
}

/* ----- Responsive ----- */
@media (max-width: 1100px) {
    .nav-bar {
        grid-template-columns: 1fr auto 1fr;
        padding: 16px 20px;
    }

    .nav-right {
        gap: 22px;
    }

    .nav-phone__sub {
        display: none;
    }

    .feature__grid {
        gap: 48px;
    }

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

@media (max-width: 900px) {
    .section {
        padding: 64px 0;
    }

    .feature__grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .feature__grid--reverse {
        direction: ltr;
    }

    .pillars__grid,
    .article-grid {
        grid-template-columns: 1fr;
    }

    .info-bar__grid,
    .info-bar__grid--three {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .info-bar__divider {
        display: none;
    }

    .info-bar__contact {
        margin-top: 40px;
        padding-top: 32px;
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 32px;
    }
}

@media (max-width: 700px) {
    .nav-bar {
        grid-template-columns: auto 1fr auto;
        gap: 12px;
    }

    /* On mobile the menu button drops the bordered-pill treatment —
       just an icon-only tap target. Padding is kept so the 44x44 touch
       target is preserved even though the border is gone. */
    .menu-btn {
        border: 0;
        padding: 11px;
        gap: 0;
    }

    .menu-btn:hover {
        background: transparent;
    }

    .menu-btn span.menu-label {
        display: none;
    }

    .nav-link {
        display: none;
    }

    .brand__top,
    .brand__sub {
        font-size: 0.55rem;
    }

    .brand__name {
        font-size: 1.05rem;
    }

    /* Tighten the gold dashes on either side of the brand name so they
       sit closer to the text in mobile view. */
    .brand__main {
        gap: 6px;
    }

    .brand__main::before,
    .brand__main::after {
        width: 18px;
    }

    .nav-phone__number {
        font-size: 0.95rem;
    }

    .menu-overlay {
        padding: 150px 28px 44px;
    }

    /* Reduce menu item size on mobile so all items fit on screen
       without scrolling. Font drops from 1.25rem → 1rem;
       spacing tightens from 18px → 14px. Desktop is unaffected. */
    .menu-overlay__list a,
    .menu-overlay__expand {
        font-size: 1rem;
    }

    .menu-overlay__list li {
        margin-bottom: 14px;
    }

    /* Mobile hero — keep the full headline + CTA buttons inside one
       viewport. dvh accounts for the iOS / Android URL bar so the box
       doesn't grow when the bar collapses. The smaller internal padding
       removes the airy whitespace that pushed it past one screen. */
    .hero {
        min-height: 70vh;
        min-height: 70dvh;
    }

    .hero__content {
        padding: 56px 22px;
    }

    .hero__lede {
        font-size: 1rem;
        margin-bottom: 28px;
    }

    .menu-overlay__back {
        width: 40px;
        height: 40px;
    }

    .menu-overlay__panel-head {
        margin-bottom: 28px;
    }

    .footer-grid {
        grid-template-columns: 1fr;
    }

    .footer-bottom {
        justify-content: center;
        text-align: center;
        flex-direction: column;
    }

    .footer-bottom .legal a {
        margin: 0 8px;
    }
}


/* ============================================================
   In-page anchor nav -- mobile "Jump to section" dropdown.
   Desktop keeps the pill row; below 700px the row is replaced
   by a compact native <select>. Added 2026-06-09.
   ============================================================ */
.anchor-nav__select-wrap{display:none;align-items:center;gap:12px;padding-top:10px;padding-bottom:10px}
.anchor-nav__select-label{font-family:var(--sans);font-size:.72rem;letter-spacing:.18em;text-transform:uppercase;font-weight:700;color:var(--gold-dark);flex:0 0 auto}
.anchor-nav__select{flex:1 1 auto;font-family:var(--sans);font-size:.95rem;font-weight:600;color:var(--navy);background-color:var(--white);border:1px solid var(--grey-line);border-radius:4px;padding:12px 40px 12px 14px;appearance:none;-webkit-appearance:none;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23004068' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right 14px center;background-size:12px}
.anchor-nav__select:focus-visible{outline:2px solid var(--gold);outline-offset:1px}
@media(max-width:700px){
  /* Higher specificity (.anchor-nav prefix) so these beat the per-page
     inline base rule .anchor-nav__inner{display:flex}, which loads after
     this stylesheet and would otherwise win on source order. */
  .anchor-nav .anchor-nav__inner{display:none}
  .anchor-nav .anchor-nav__select-wrap{display:flex}
}
