/* ============================================================
   Maxcare Premium Layer — finalisation polish (June 2026)
   Cinematic hero, 3D tilt cards, staggered blur-up reveals,
   scroll progress, ambient depth. All motion is disabled under
   prefers-reduced-motion. No external libraries.
   ============================================================ */

/* ---------- scroll progress bar ---------- */
#mxProgress {
  position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 90;
  background: linear-gradient(90deg, var(--color-gold), var(--color-golddk), var(--color-gold));
  transform-origin: 0 50%; transform: scaleX(0); pointer-events: none;
}

/* ---------- navbar scrolled state ---------- */
header.mx-scrolled {
  background: rgba(250, 247, 242, 0.92) !important;
  box-shadow: 0 10px 40px -18px rgba(10, 31, 42, 0.25);
}
header { transition: background .35s ease, box-shadow .35s ease; }

/* ---------- smooth anchors ---------- */
html { scroll-behavior: smooth; }
section[id] { scroll-margin-top: 84px; }

/* ---------- hero cinematics ---------- */
#home img[data-hero] {
  animation: mxKenBurns 22s ease-in-out infinite alternate;
  will-change: transform;
}
@keyframes mxKenBurns {
  from { transform: scale(1) translateY(0); }
  to   { transform: scale(1.09) translateY(-1.5%); }
}
/* headline words rise in with a blur-up, staggered via --wd */
.mx-word {
  display: inline-block;
  opacity: 0; filter: blur(10px); transform: translateY(0.45em);
  animation: mxWordIn .9s cubic-bezier(.22,.8,.26,1) forwards;
  animation-delay: calc(0.25s + var(--wd, 0) * 0.09s);
}
@keyframes mxWordIn {
  to { opacity: 1; filter: blur(0); transform: translateY(0); }
}
/* the rest of the hero content follows the headline */
.mx-hero-follow {
  opacity: 0; transform: translateY(18px);
  animation: mxFollowIn 1s ease forwards;
}
.mx-hero-follow.d1 { animation-delay: .95s; }
.mx-hero-follow.d2 { animation-delay: 1.15s; }
.mx-hero-follow.d3 { animation-delay: 1.35s; }
@keyframes mxFollowIn { to { opacity: 1; transform: translateY(0); } }

/* floating gold dust in the hero */
.mx-dust { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.mx-dust i {
  position: absolute; display: block; border-radius: 50%;
  background: radial-gradient(circle, rgba(201,168,106,.9), rgba(201,168,106,0) 70%);
  animation: mxFloat linear infinite;
  opacity: 0;
}
@keyframes mxFloat {
  0%   { transform: translateY(30px) translateX(0);    opacity: 0; }
  12%  { opacity: .4; }
  88%  { opacity: .22; }
  100% { transform: translateY(-60vh) translateX(26px); opacity: 0; }
}

/* CTA shine sweep */
.mx-shine { position: relative; overflow: hidden; }
.mx-shine::after {
  content: ""; position: absolute; top: 0; bottom: 0; width: 44%;
  left: -60%; transform: skewX(-22deg);
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.5), transparent);
  animation: mxSweep 5.8s ease-in-out infinite;
}
@keyframes mxSweep {
  0%, 55% { left: -60%; }
  85%, 100% { left: 130%; }
}

/* scroll cue */
.mx-cue { animation: mxCue 2.2s ease-in-out infinite; }
@keyframes mxCue {
  0%, 100% { transform: translate(-50%, 0); opacity: .6; }
  50%      { transform: translate(-50%, 8px); opacity: 1; }
}

/* ---------- reveal 2.0 : blur-up + stagger ---------- */
html:not(.js) .reveal { opacity: 1 !important; transform: none !important; filter: none !important; }
.reveal {
  opacity: 0;
  transform: translateY(30px);
  filter: blur(7px);
  transition:
    opacity .85s cubic-bezier(.22,.8,.26,1),
    transform .85s cubic-bezier(.22,.8,.26,1),
    filter .85s ease;
  transition-delay: var(--rv, 0s);
}
.reveal.visible { opacity: 1; transform: translateY(0); filter: blur(0); }

/* ---------- 3D tilt + glare ---------- */
.card-lift { transform-style: preserve-3d; position: relative; }
.mx-tilting { transition: box-shadow .4s; will-change: transform; }
.mx-glare {
  position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: radial-gradient(420px circle at var(--gx, 50%) var(--gy, 50%),
              rgba(255, 252, 240, 0.28), transparent 55%);
  opacity: 0; transition: opacity .35s; z-index: 2; mix-blend-mode: soft-light;
}
.card-lift:hover .mx-glare { opacity: 1; }

/* doctor portrait micro-zoom */
.doc-portrait { transition: transform .6s cubic-bezier(.22,.8,.26,1); transform-origin: bottom center; }
article:hover .doc-portrait { transform: translateX(-50%) scale(1.035); }
article .aspect-\[5\/4\] img:not(.doc-portrait) { transition: transform .7s cubic-bezier(.22,.8,.26,1); }
article:hover .aspect-\[5\/4\] img:not(.doc-portrait) { transform: scale(1.045); }

/* ---------- ambient orbs (dark + tinted sections) ---------- */
.mx-orb {
  position: absolute; border-radius: 50%; pointer-events: none;
  filter: blur(60px); opacity: .5; will-change: transform;
  animation: mxOrb 16s ease-in-out infinite alternate;
}
@keyframes mxOrb {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to   { transform: translate3d(40px, -30px, 0) scale(1.18); }
}

/* ---------- FAQ open animation ---------- */
details > div { animation: none; }
details[open] > div { animation: mxFaqIn .45s cubic-bezier(.22,.8,.26,1); }
@keyframes mxFaqIn {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ---------- footer reveal polish ---------- */
.fab { transition: transform .25s, box-shadow .25s; }
.fab:hover { transform: scale(1.1) translateY(-2px); box-shadow: 0 18px 40px -10px rgba(0,0,0,.45); }

/* ---------- reduced motion: shut it all down ---------- */
@media (prefers-reduced-motion: reduce) {
  #home img[data-hero], .mx-word, .mx-hero-follow, .mx-dust i,
  .mx-shine::after, .mx-cue, .mx-orb { animation: none !important; }
  .mx-word, .mx-hero-follow { opacity: 1; transform: none; filter: none; }
  .reveal { opacity: 1; transform: none; filter: none; transition: none; }
  html { scroll-behavior: auto; }
  .mx-tilting { transform: none !important; }
}

/* ============================================================
   ROUND 2 — designed duo hero, marquee, mobile nav + action bar,
   and the mobile comfort audit. (June 2026 finalisation)
   ============================================================ */

/* ---------- designed hero ---------- */
.mx-hero { background: var(--color-ink); }
.mx-hero-bg {
  position: absolute; inset: 0;
  background:
    radial-gradient(1100px 520px at 12% -10%, rgba(26,107,126,.55), transparent 60%),
    radial-gradient(900px 540px at 88% 8%, rgba(201,168,106,.16), transparent 55%),
    radial-gradient(700px 480px at 70% 100%, rgba(26,107,126,.35), transparent 60%),
    linear-gradient(160deg, #0A1F2A 0%, #0B3D4D 58%, #11505f 100%);
}
.mx-hero-bg::after {
  content: ""; position: absolute; inset: 0; opacity: .14;
  background-image: radial-gradient(circle at 25% 25%, rgba(255,255,255,.5) 1px, transparent 1px);
  background-size: 26px 26px;
}
.mx-hero > .relative { z-index: 2; }
.mx-hero .mx-dust { z-index: 1; }
.mx-h1 { font-size: clamp(2.35rem, 5.1vw, 4.35rem); line-height: 1.06; }

.mx-proof {
  display: inline-flex; align-items: center; gap: .5rem;
  background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.14);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  padding: .5rem .9rem; border-radius: 999px; font-size: .88rem;
  color: rgba(250,247,242,.9);
}
.mx-stars { color: var(--color-gold); letter-spacing: .12em; font-size: .82rem; }
.mx-proof-sep { width: 1px; height: 22px; background: rgba(255,255,255,.18); }

/* ---------- the couple ---------- */
.mx-duo {
  position: relative; z-index: 2;
  height: clamp(340px, 40vw, 560px);
  margin-top: .5rem;
}
.mx-duo-backlight {
  position: absolute; left: 50%; bottom: -4%; transform: translateX(-50%);
  width: 130%; height: 96%; pointer-events: none;
  background:
    radial-gradient(ellipse 52% 64% at 50% 78%, rgba(26,107,126,.55), transparent 70%),
    radial-gradient(ellipse 40% 50% at 50% 30%, rgba(201,168,106,.18), transparent 65%);
  filter: blur(6px);
}
.mx-duo-ring {
  position: absolute; left: 50%; bottom: -14px; transform: translateX(-50%);
  width: 88%; height: 110px; border-radius: 50%;
  border: 1px solid rgba(201,168,106,.45);
  box-shadow: 0 0 40px rgba(201,168,106,.18), inset 0 0 30px rgba(201,168,106,.08);
  mask-image: linear-gradient(to top, black 48%, transparent 52%);
  -webkit-mask-image: linear-gradient(to top, black 48%, transparent 52%);
}
.mx-duo { display: flex; align-items: flex-end; justify-content: center; }
.mx-duo-img {
  position: relative; width: auto; object-fit: contain;
  filter: drop-shadow(0 30px 44px rgba(5,18,25,.6));
  opacity: 0; transform: translateY(26px);
  animation: mxDuoIn 1s cubic-bezier(.22,.8,.26,1) forwards;
}
.mx-duo-smita  { height: 90%; z-index: 2; animation-delay: .72s; }
.mx-duo-vishal { height: 97%; z-index: 1; margin-left: -6%; animation-delay: .55s; }
@keyframes mxDuoIn { to { opacity: 1; transform: translateY(0); } }

.mx-chip {
  position: absolute; z-index: 3; display: flex; flex-direction: column; gap: 1px;
  background: rgba(10,31,42,.55); border: 1px solid rgba(250,247,242,.16);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border-radius: 14px; padding: .55rem .85rem;
  color: var(--color-cream);
  box-shadow: 0 14px 34px rgba(5,18,25,.4);
  opacity: 0; animation: mxDuoIn .8s ease forwards;
}
.mx-chip strong { font-size: .82rem; font-weight: 600; white-space: nowrap; }
.mx-chip span { font-size: .68rem; color: rgba(250,247,242,.65); white-space: nowrap; }
.mx-chip-v { left: 0; top: 38%; animation-delay: 1.15s; }
.mx-chip-s { right: 0; bottom: 9%; animation-delay: 1.3s; }

/* ---------- marquee trust strip ---------- */
.mx-marquee {
  background: var(--color-ink); border-top: 1px solid rgba(201,168,106,.18);
  border-bottom: 1px solid rgba(201,168,106,.18);
  overflow: hidden; position: relative; z-index: 3;
}
.mx-marquee-track {
  display: inline-flex; align-items: center; gap: 2.4rem;
  padding: .85rem 1.2rem; width: max-content; white-space: nowrap;
  animation: mxMarquee 46s linear infinite;
}
.mx-marquee-track span { color: rgba(250,247,242,.85); font-size: .86rem; letter-spacing: .05em; }
.mx-marquee-track i { color: var(--color-gold); font-style: normal; font-size: .7rem; }
.mx-marquee:hover .mx-marquee-track { animation-play-state: paused; }
@keyframes mxMarquee { to { transform: translateX(-50%); } }

/* ---------- hamburger ---------- */
.mx-burger {
  width: 42px; height: 42px; border-radius: 12px;
  display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px;
  background: rgba(11,61,77,.06); border: 1px solid rgba(11,61,77,.12);
}
.mx-burger span {
  display: block; width: 18px; height: 2px; border-radius: 2px;
  background: var(--color-deep); transition: transform .3s, opacity .3s;
}
body.mx-open .mx-burger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
body.mx-open .mx-burger span:nth-child(2) { opacity: 0; }
body.mx-open .mx-burger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- mobile nav panel ---------- */
.mx-nav-panel {
  position: fixed; inset: 0; z-index: 49;
  background: rgba(250,247,242,.97);
  -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px);
  padding: 96px 1.5rem 2rem;
  display: flex; flex-direction: column; gap: 1.6rem;
  opacity: 0; transform: translateY(-12px);
  transition: opacity .32s ease, transform .32s ease;
  overflow-y: auto;
}
.mx-nav-panel.mx-in { opacity: 1; transform: translateY(0); }
.mx-nav-links { display: flex; flex-direction: column; }
.mx-nav-links a {
  font-family: 'Fraunces', Georgia, serif; font-size: 1.65rem; font-weight: 600;
  color: var(--color-deep); padding: .9rem .25rem;
  border-bottom: 1px solid rgba(11,61,77,.08);
  display: flex; justify-content: space-between; align-items: center;
}
.mx-nav-links a::after { content: "→"; font-size: 1.1rem; color: var(--color-gold); }
.mx-nav-ctas { display: grid; gap: .8rem; }
.mx-nav-call, .mx-nav-wa {
  text-align: center; padding: 1rem; border-radius: 999px; font-weight: 600; font-size: .95rem;
}
.mx-nav-call { background: var(--color-deep); color: var(--color-cream); }
.mx-nav-wa { background: #25D366; color: #fff; }
body.mx-open { overflow: hidden; }

/* ---------- mobile bottom action bar ---------- */
.mx-actionbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 70;
  display: grid; grid-template-columns: 1fr 1fr 1.25fr; align-items: stretch; gap: 2px;
  background: rgba(10,31,42,.94);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  border-top: 1px solid rgba(201,168,106,.25);
  padding: .45rem .6rem calc(.45rem + env(safe-area-inset-bottom));
}
.mx-ab {
  display: flex; align-items: center; justify-content: center; gap: .45rem;
  color: rgba(250,247,242,.92); font-size: .82rem; font-weight: 500;
  padding: .72rem .4rem; border-radius: 12px;
}
.mx-ab:active { background: rgba(255,255,255,.08); }
.mx-ab-book { background: var(--color-gold); color: var(--color-ink); font-weight: 700; }
.mx-ab-book:active { background: var(--color-golddk); color: var(--color-cream); }

@media (max-width: 1023px) {
  .fab { display: none; }
  body { padding-bottom: calc(64px + env(safe-area-inset-bottom)); }
}

/* ---------- mobile comfort audit ---------- */
@media (max-width: 1023px) {
  .mx-duo { height: clamp(300px, 64vw, 460px); margin-top: -.5rem; }
  .mx-chip strong { font-size: .74rem; }
  .mx-chip span { font-size: .62rem; }
}
@media (max-width: 640px) {
  .py-24 { padding-top: 3.6rem; padding-bottom: 3.6rem; }
  .py-20 { padding-top: 3rem; padding-bottom: 3rem; }
  .py-14 { padding-top: 2.6rem; padding-bottom: 2.6rem; }
  .text-4xl { font-size: 1.92rem; line-height: 1.2; }
  .text-5xl { font-size: 2.3rem; }
  .p-7 { padding: 1.35rem; }
  .pl-16 { padding-left: 3.4rem; }
  .gap-16 { gap: 2.6rem; }
  .gap-12 { gap: 2.2rem; }
  .gap-10 { gap: 2rem; }
  .mt-16 { margin-top: 2.6rem; }
  .mt-14 { margin-top: 2.3rem; }
  input, select, textarea { font-size: 16px !important; }
  .eyebrow { font-size: .7rem; }
  .mx-duo { height: clamp(280px, 78vw, 420px); }
  .mx-duo-vishal { right: 2%; }
  .mx-duo-smita { left: 3%; }
  .mx-chip-v { top: 32%; left: 0; }
  .mx-chip-s { bottom: 6%; right: 0; }
  .mx-marquee-track { gap: 1.6rem; padding: .7rem 1rem; }
  .mx-marquee-track span { font-size: .78rem; }
  .mx-proof { font-size: .8rem; padding: .42rem .75rem; }
}

@media (prefers-reduced-motion: reduce) {
  .mx-duo-img, .mx-chip { animation: none; opacity: 1; transform: none; }
  .mx-marquee-track { animation: none; }
  .mx-nav-panel { transition: none; }
}

/* ---------- visibility gates (compiled Tailwind lacks lg:hidden) ---------- */
.mx-burger { display: inline-flex; }
@media (min-width: 1024px) {
  .mx-burger, .mx-actionbar, .mx-nav-panel { display: none !important; }
}

/* ---------- hero grid (compiled Tailwind lacks the responsive utilities) ---------- */
.mx-grid { padding-top: 4rem; }
.mx-copy { padding-bottom: 2.5rem; }
@media (min-width: 640px) {
  .mx-grid { padding-top: 5.5rem; }
  .mx-copy { padding-bottom: 4rem; }
}
@media (min-width: 1024px) {
  .mx-grid { grid-template-columns: 1.04fr .96fr; gap: 1.25rem; padding-top: 6.75rem; }
  .mx-copy { padding-bottom: 5.5rem; }
}

@media print {
  .reveal { opacity: 1 !important; transform: none !important; filter: none !important; }
}
/* header Book CTA cramps at narrow widths; bottom action bar owns booking there */
@media (max-width: 520px) {
  header a[href$="#contact"] { display: none; }
}
/* panel lives INSIDE <header>; keep the bar (logo + burger=close) above it */
header > div:not(#mxNavPanel) { position: relative; z-index: 51; }

/* doctors page: mirrored profile layout at desktop (lg:order-* absent from build) */
@media (min-width: 1024px) {
  .mx-ord2 { order: 2; }
  .mx-ord1 { order: 1; }
}
