/* =========================================================================
   BMCH — motion layer: 3D reveals, card tilt, depth parallax
   (all of it switches off for visitors who prefer reduced motion)
   ========================================================================= */

/* 3D entrance: content rises and un-tilts towards the viewer */
[data-reveal="up"] { transform: perspective(1000px) translate3d(0, 46px, 0) rotateX(14deg); transform-origin: 50% 100%; }
[data-reveal="left"] { transform: perspective(1000px) translate3d(46px, 0, 0) rotateY(-12deg); transform-origin: 100% 50%; }
[data-reveal="right"] { transform: perspective(1000px) translate3d(-46px, 0, 0) rotateY(12deg); transform-origin: 0 50%; }
[data-reveal="zoom"] { transform: perspective(1200px) scale(.92) rotateX(10deg); transform-origin: 50% 100%; }
[data-reveal].is-in { transform: none; }

/* headings: a slightly deeper 3D rise */
.section-title[data-reveal="up"] { transform: perspective(900px) translate3d(0, 34px, -40px) rotateX(22deg); }
.section-title[data-reveal].is-in { transform: none; }

/* 3D tilt cards */
.fx-tilt { transform-style: preserve-3d; will-change: transform; transition: transform .6s var(--ease-out), box-shadow .5s; }
.fx-tilt.is-tilting { transition: transform .12s linear, box-shadow .3s; }
.fx-glare { position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0; z-index: 3;
  background: radial-gradient(420px circle at var(--gx, 50%) var(--gy, 50%), rgba(255,255,255,.38), transparent 45%); mix-blend-mode: soft-light; transition: opacity .4s; }
.fx-tilt.is-tilting .fx-glare { opacity: 1; }
.fx-pop { transform: translateZ(28px); }

/* depth parallax images (moved by fx.js) */
.fx-par { will-change: transform; transform: scale(1.12); transition: opacity .8s var(--ease) !important; }
.fx-par-wrap { overflow: hidden; }

/* scroll-linked 3D panels (appointment, CTA, numbers) */
.fx-depth { transform-origin: 50% 100%; will-change: transform; }


@media (prefers-reduced-motion: reduce) {
  [data-reveal], .section-title[data-reveal] { transform: none !important; }
  .fx-par, .fx-depth, .fx-tilt { transform: none !important; }
  .im-track { animation: none !important; }
}

/* automatic scroll reveal (fx.js) for every page */
.fx-rv { opacity: 0; transition: opacity .9s var(--ease), transform 1s var(--ease-out), filter 1s var(--ease-out); transition-delay: var(--rv-d, 0ms); will-change: transform, opacity; }
.fx-rv--up { transform: perspective(1000px) translate3d(0, 44px, 0) rotateX(12deg); transform-origin: 50% 100%; }
.fx-rv--img { transform: perspective(1000px) translate3d(0, 36px, 0) scale(.94); filter: blur(6px); }
.fx-rv.is-in { opacity: 1; transform: none; filter: none; }
.fx-rv.fx-tilt.is-in { transition-delay: 0ms; }
@media (prefers-reduced-motion: reduce) { .fx-rv { opacity: 1 !important; transform: none !important; filter: none !important; } }


/* =========================================================================
   PAGE LOADER — your real logo, with its "A" building itself
   The logo fades in with the A cut out, then the four crimson pieces fly into
   the gap, the green tick draws, a light sweeps across and the A pulses.
   Later pages of the same visit use a quicker version (html.pl-fast).
   ========================================================================= */
.page-loader { --k: 1; background: transparent; clip-path: none; display: block; overflow: hidden; transition: visibility 0s linear 1.4s; }
.pl-fast .page-loader { --k: .5; }
.page-loader.is-done { opacity: 1; clip-path: none; visibility: hidden; pointer-events: none; }

.pl-panel { position: absolute; left: 0; right: 0; height: 50.3%; background: #fff; transition: transform 1s cubic-bezier(.76,0,.24,1) .28s; will-change: transform; }
.pl-panel--t { top: 0; }
.pl-panel--b { bottom: 0; }
.page-loader.is-done .pl-panel--t { transform: translateY(-101%); }
.page-loader.is-done .pl-panel--b { transform: translateY(101%); }

.pl-stage { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 0 24px; text-align: center; transition: transform .9s var(--ease-out), opacity .55s var(--ease), filter .7s; }
.pl-stage::before { content: ""; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(55% 60% at 82% 18%, rgba(62,100,242,.10), transparent 70%), radial-gradient(55% 60% at 14% 84%, rgba(227,23,91,.08), transparent 70%); }
.page-loader.is-done .pl-stage { transform: scale(1.35); opacity: 0; filter: blur(8px); }

.pl-logo { --lw: clamp(280px, 64vw, 400px); position: relative; width: var(--lw); aspect-ratio: 1539 / 269; animation: plFloat 3.6s ease-in-out calc(2.6s * var(--k)) infinite; }
.pl-logo-img { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; clip-path: inset(0 100% 0 0); animation: plLogoIn calc(1.1s * var(--k)) cubic-bezier(.65,0,.35,1) calc(.1s * var(--k)) both; }
.pl-a { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; filter: drop-shadow(0 6px 10px rgba(227,23,91,.3)); }
.pl-a-pop { transform-box: view-box; transform-origin: 44.4% 32%; animation: plPop .9s cubic-bezier(.34,1.56,.64,1) calc(2.1s * var(--k)) both; }

/* soft glow behind the A */
.pl-aura { position: absolute; left: 44.4%; top: 32%; width: 34%; aspect-ratio: 1; margin: -17% 0 0 -17%; border-radius: 50%; background: radial-gradient(closest-side, rgba(227,23,91,.28), rgba(62,100,242,.14) 55%, transparent 75%); opacity: 0; animation: plAura 2.2s ease-in-out calc(.9s * var(--k)) infinite alternate; }

.pa { opacity: 0; transform-box: fill-box; transform-origin: 50% 50%; animation-duration: calc(.85s * var(--k)); animation-timing-function: cubic-bezier(.22,1.25,.36,1); animation-fill-mode: both; }
.pa-foot { animation-name: plFoot; animation-delay: calc(.9s * var(--k)); }
.pa-right { animation-name: plRight; animation-delay: calc(1.07s * var(--k)); }
.pa-cap { animation-name: plCap; animation-delay: calc(1.25s * var(--k)); }
.pa-check { animation: plCheck calc(.75s * var(--k)) cubic-bezier(.65,0,.35,1) calc(1.8s * var(--k)) both; }
.pl-sheen { transform: skewX(-18deg); animation: plSheen 2.4s ease-in-out calc(2.3s * var(--k)) infinite; }

.pl-spark { position: absolute; left: 44.4%; top: 32%; width: 11px; height: 11px; margin: -5.5px 0 0 -5.5px; opacity: 0; color: var(--bm-pink); --a: 0deg; --r: calc(var(--lw) * .085);
  background: linear-gradient(currentColor, currentColor) center / 100% 2.4px no-repeat, linear-gradient(currentColor, currentColor) center / 2.4px 100% no-repeat;
  animation: plSpark 1.2s cubic-bezier(.16,1,.3,1) calc(2.2s * var(--k)) both; }
.pl-spark--1 { --a: -20deg; } .pl-spark--2 { --a: 40deg; color: var(--bm-green); } .pl-spark--3 { --a: 100deg; color: var(--bm-blue); }
.pl-spark--4 { --a: 160deg; } .pl-spark--5 { --a: 220deg; color: var(--bm-green); } .pl-spark--6 { --a: 290deg; color: var(--bm-blue); }

.pl-stage .loader-bar { margin: 28px auto 0; opacity: 0; animation: plFade .6s var(--ease) calc(.6s * var(--k)) both; }

@keyframes plLogoIn { 0% { opacity: 0; clip-path: inset(0 100% 0 0); } 15% { opacity: 1; } 100% { opacity: 1; clip-path: inset(0 0 0 0); } }
@keyframes plFoot { from { opacity: 0; transform: translate(-60px, 70px) rotate(-26deg) scale(.55); } to { opacity: 1; transform: none; } }
@keyframes plRight { from { opacity: 0; transform: translate(60px, 70px) rotate(26deg) scale(.55); } to { opacity: 1; transform: none; } }
@keyframes plCap { from { opacity: 0; transform: translate(0, -90px) rotate(-8deg) scale(.7); } to { opacity: 1; transform: none; } }
@keyframes plCheck { 0% { opacity: 1; clip-path: inset(0 100% 0 0) fill-box; } 100% { opacity: 1; clip-path: inset(-4px -4px -4px -4px) fill-box; } }
@keyframes plSheen { 0% { transform: translateX(0) skewX(-18deg); } 55%, 100% { transform: translateX(340px) skewX(-18deg); } }
@keyframes plPop { 0% { transform: scale(1); } 45% { transform: scale(1.35); } 100% { transform: scale(1); } }
@keyframes plFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
@keyframes plAura { from { opacity: .2; transform: scale(.8); } to { opacity: 1; transform: scale(1.15); } }
@keyframes plSpark { 0% { opacity: 0; transform: rotate(var(--a)) translateY(calc(var(--r) * -.6)) scale(.2); } 25% { opacity: 1; } 100% { opacity: 0; transform: rotate(var(--a)) translateY(calc(var(--r) * -1.6)) scale(1.1) rotate(90deg); } }
@keyframes plFade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  .pa, .pl-logo-img, .pl-stage .loader-bar { animation: none !important; opacity: 1; clip-path: none; }
  .pl-logo, .pl-a-pop, .pl-aura, .pl-sheen, .pl-spark { animation: none !important; }
  .pl-spark { display: none; }
  .pl-panel, .pl-stage { transition-duration: .4s; }
}


/* =========================================================================
   CINEMATIC MOTION — everything below only moves, fades, clips or scales
   what is already on the page (transform / opacity / clip-path / filter),
   so no layout, spacing or size changes anywhere.
   ========================================================================= */

/* hero: opens like a film frame, then dollies slowly as you scroll */
html.fx .hero-stage { clip-path: inset(7% 5% 7% 5% round 38px); scale: 1.05; transition: clip-path 1.7s cubic-bezier(.76,0,.24,1) .2s, scale 2.2s var(--ease-out) .2s; }
html.fx body.is-ready .hero-stage { clip-path: inset(-120px -40px -120px -40px round 38px); scale: 1; }
html.fx .hero-stage.fx-hero-done { clip-path: none; transition: none; }
.hero-poster, .hero-video { transform: scale(calc(1 + var(--hs, 0) * .14)) translate3d(0, calc(var(--hs, 0) * 3%), 0); transform-origin: 50% 40%; will-change: transform; }
.hero-vignette { opacity: calc(1 + var(--hs, 0) * .6); background: linear-gradient(0deg, rgba(6,15,63,.45) 0%, transparent 28%), radial-gradient(90% 80% at 50% 45%, transparent calc(55% - var(--hs, 0) * 20%), rgba(6,15,63,calc(var(--hs, 0) * .55)) 100%); }

/* section headings: a focus pull as they rise into place
   (no clipping on the element itself, so the scroll observer can still see it) */
html.fx .section-title[data-reveal] { filter: blur(9px); transition: opacity 1s var(--ease), transform 1.15s var(--ease-out), filter 1.1s var(--ease-out); }
html.fx .section-title[data-reveal].is-in { filter: none; }
.eyebrow[data-reveal] { transition-duration: .8s; }

/* big photos: a curtain draws back while the picture settles */
html.fx .fx-curtain > img { clip-path: inset(0 0 100% 0); scale: 1.3; transition: opacity .8s var(--ease), clip-path 1.4s cubic-bezier(.76,0,.24,1), scale 2.2s var(--ease-out); }
html.fx .fx-curtain > img.fx-par { transition: opacity .8s var(--ease), clip-path 1.4s cubic-bezier(.76,0,.24,1), scale 2.2s var(--ease-out) !important; }
html.fx .fx-curtain.is-in > img { clip-path: inset(0 0 0 0); scale: 1; }

/* light that follows the pointer (desktop only) */
.fx-light { position: fixed; left: 0; top: 0; width: 560px; height: 560px; margin: -280px 0 0 -280px; border-radius: 50%; pointer-events: none; z-index: 60; opacity: 0;
  background: radial-gradient(closest-side, rgba(255,255,255,.34), rgba(255,255,255,0)); mix-blend-mode: overlay; transition: opacity .6s var(--ease); will-change: transform; }
.fx-light.is-on { opacity: 1; }

/* slow living backgrounds */
.numbers-bg::after { animation: fxGrid 30s linear infinite; }
.appt-glow--a { animation: fxFloatA 16s ease-in-out infinite alternate; }
.appt-glow--b { animation: fxFloatB 19s ease-in-out infinite alternate; }
@keyframes fxGrid { to { background-position: 48px 48px, 48px 48px; } }
@keyframes fxFloatA { from { transform: translate3d(0, 0, 0) scale(1); } to { transform: translate3d(-60px, 40px, 0) scale(1.15); } }
@keyframes fxFloatB { from { transform: translate3d(0, 0, 0) scale(1); } to { transform: translate3d(70px, -30px, 0) scale(1.12); } }

/* buttons: a light sweep on hover */
.btn-bm { overflow: hidden; }
.btn-bm::after { content: ""; position: absolute; top: 0; bottom: 0; left: -60%; width: 40%; z-index: 0; pointer-events: none; transform: skewX(-20deg) translateX(-120%); background: linear-gradient(90deg, transparent, rgba(255,255,255,.35), transparent); transition: transform .9s var(--ease-out); }
.btn-bm:hover::after { transform: skewX(-20deg) translateX(520%); }

/* leaving a page: it eases back and softens before the next one opens */
html.fx-leaving main, html.fx-leaving .site-footer { opacity: 0; transform: scale(.985); filter: blur(5px); transition: opacity .38s var(--ease), transform .38s var(--ease), filter .38s var(--ease); }

@media (prefers-reduced-motion: reduce) {
  html.fx .hero-stage { clip-path: none !important; scale: 1 !important; }
  html.fx .section-title[data-reveal] { filter: none !important; }
  html.fx .fx-curtain > img { clip-path: none !important; scale: 1 !important; }
  .hero-poster, .hero-video { transform: none !important; }
  .numbers-bg::after, .appt-glow--a, .appt-glow--b { animation: none !important; }
  .fx-light { display: none; }
  html.fx-leaving main, html.fx-leaving .site-footer { opacity: 1; transform: none; filter: none; }
}


/* ambulance tab: a flashing siren sits on the roof of the vehicle icon */
.st-ico { overflow: visible; }
.st-siren { position: absolute; left: 50%; top: 4px; width: 14px; height: 9px; margin-left: -7px; z-index: 2; animation: drive 1.2s ease-in-out infinite; }
.st-siren::after { content: ""; position: absolute; left: -2px; right: -2px; bottom: -2px; height: 3px; border-radius: 2px; background: #3B4268; }
.st-siren span { position: absolute; inset: 0; border-radius: 8px 8px 1px 1px; animation: sirenFlash .6s steps(1) infinite; }
.st-siren span::before { content: ""; position: absolute; left: 50%; top: 50%; width: 34px; height: 34px; margin: -17px 0 0 -17px; border-radius: 50%; background: radial-gradient(closest-side, currentColor, transparent); opacity: .55; animation: sirenGlow .6s ease-in-out infinite alternate; }
@keyframes sirenFlash { 0% { background: #FF2D2D; color: #FF2D2D; box-shadow: 0 0 8px 2px rgba(255,45,45,.9); } 50% { background: #2F6BFF; color: #2F6BFF; box-shadow: 0 0 8px 2px rgba(47,107,255,.9); } }
@keyframes sirenGlow { from { transform: scale(.7); opacity: .25; } to { transform: scale(1.1); opacity: .6; } }
@media (prefers-reduced-motion: reduce) { .st-siren, .st-siren span, .st-siren span::before { animation: none; } .st-siren span { background: #FF2D2D; } }

