/* ==========================================================================
   NOVA DENTAL CARE — Stylesheet
   Identity: enamel-white paper, deep pine ink, one "nova spark" accent.
   Editorial serif (Instrument Serif) + clean grotesk (Hanken Grotesk).
   Sections stack like sheets of paper (rounded tops overlap the previous one).

   Structure: Fonts → Tokens → Reset → Base → Buttons → Reveal → Header →
   Hero → Stats → Services → Why → Doctors → Testimonials → Gallery →
   Booking → FAQ → Contact → Footer → Extras → Responsive → Reduced motion
   ========================================================================== */

/* ---------- Fonts (self-hosted, latin subset) ---------- */
@font-face {
  font-family: 'Instrument Serif';
  src: url('fonts/instrument-serif.woff2') format('woff2');
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Instrument Serif';
  src: url('fonts/instrument-serif-italic.woff2') format('woff2');
  font-weight: 400; font-style: italic; font-display: swap;
}
@font-face {
  font-family: 'Hanken Grotesk';
  src: url('fonts/hanken-grotesk-var.woff2') format('woff2');
  font-weight: 100 900; font-style: normal; font-display: swap;
}

/* ---------- Tokens ---------- */
:root {
  --paper: #F5F1E8;      /* enamel */
  --paper-2: #FBF9F4;
  --sand: #EBE4D4;
  --ink: #0E1F1D;
  --pine: #12403A;
  --spark: #FF5B2E;      /* the "nova" */
  --spark-ink: #D93E12;  /* spark, readable on paper */
  --muted: #5B6764;
  --line: rgba(14, 31, 29, 0.14);
  --on-dark: rgba(245, 241, 232, 0.72);
  --line-dark: rgba(245, 241, 232, 0.16);

  --font-display: 'Instrument Serif', 'Times New Roman', serif;
  --font-body: 'Hanken Grotesk', system-ui, -apple-system, 'Segoe UI', sans-serif;

  --fs-xs: clamp(0.75rem, 0.72rem + 0.12vw, 0.82rem);
  --fs-sm: clamp(0.9rem, 0.86rem + 0.15vw, 1rem);
  --fs-base: clamp(1rem, 0.96rem + 0.18vw, 1.1rem);
  --fs-lg: clamp(1.1rem, 1.04rem + 0.3vw, 1.3rem);
  --fs-xl: clamp(1.5rem, 1.3rem + 0.8vw, 2rem);
  --fs-2xl: clamp(1.9rem, 1.5rem + 1.6vw, 3rem);
  --fs-3xl: clamp(2.4rem, 1.7rem + 2.8vw, 4.2rem);
  --fs-hero: clamp(3.1rem, 1.9rem + 5.2vw, 6.6rem);

  --space-section: clamp(4.5rem, 3rem + 6vw, 9rem);
  --container: min(1240px, 92vw);
  --r: clamp(26px, 4vw, 52px);         /* sheet corner radius */
  --radius-sm: 12px;
  --radius-md: 22px;
  --radius-lg: 32px;
  --shadow-md: 0 18px 40px -18px rgba(14, 31, 29, 0.35);
  --shadow-lg: 0 34px 70px -24px rgba(14, 31, 29, 0.45);

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --header-h: 84px;

  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .55 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- Reset & base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) - 8px);
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-size: var(--fs-base);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
  overflow-x: hidden;
  min-width: 320px;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; height: auto; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, textarea, select { font-family: inherit; font-size: inherit; }
address { font-style: normal; }
figure { margin: 0; }

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.02;
  letter-spacing: -0.015em;
}
em { font-style: italic; }

::selection { background: var(--spark); color: var(--ink); }
:focus-visible { outline: 2.5px solid var(--spark); outline-offset: 3px; border-radius: 4px; }

.container { width: var(--container); margin-inline: auto; }

/* Sheets: every section after the hero tucks its rounded top over the previous one */
main > section:not(.hero),
.footer {
  position: relative;
  border-radius: var(--r) var(--r) 0 0;
  margin-top: calc(var(--r) * -1);
}
.section { background: var(--paper); padding-block: calc(var(--space-section) + var(--r) * 0.4) var(--space-section); }
.section-sand { background: var(--sand); }
.section-dark { background: var(--pine); color: var(--paper); }

/* Grain on dark/hero surfaces (static tile — no repaint cost) */
.hero::after, .trust-strip::after, .section-dark::after, .booking::after, .footer::after {
  content: '';
  position: absolute; inset: 0;
  background-image: var(--grain);
  opacity: 0.07;
  mix-blend-mode: overlay;
  pointer-events: none;
  border-radius: inherit;
}

.section-head { max-width: 680px; margin: 0 auto clamp(2.5rem, 2rem + 2.5vw, 5rem); text-align: center; }
.section-title { font-size: var(--fs-3xl); margin-bottom: 1.1rem; text-wrap: balance; }
.section-title em, .booking-copy h2 em { color: var(--spark-ink); }
.section-dark .section-title em { color: var(--spark); }
.section-desc { color: var(--muted); font-size: var(--fs-lg); max-width: 52ch; margin-inline: auto; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 9px;
  font-size: var(--fs-xs); font-weight: 700;
  letter-spacing: 0.16em; text-transform: uppercase;
  margin-bottom: 1.3rem;
}
.eyebrow svg { fill: var(--spark); flex-shrink: 0; }

/* ---------- Buttons ---------- */
.btn {
  position: relative; overflow: hidden; isolation: isolate;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: var(--fs-sm);
  padding: 0.95rem 1.8rem; min-height: 50px;
  border-radius: 100px; white-space: nowrap;
  transition: color 0.4s var(--ease), border-color 0.4s var(--ease), box-shadow 0.4s var(--ease);
  translate: var(--mx, 0px) var(--my, 0px);
}
.btn > span { position: relative; z-index: 1; }
.btn::before {
  content: ''; position: absolute; inset: -1px; z-index: 0;
  background: var(--spark);
  transform: translateY(101%); border-radius: 50% 50% 0 0 / 30% 30% 0 0;
  transition: transform 0.55s var(--ease), border-radius 0.55s var(--ease);
}
.btn:hover::before, .btn:focus-visible::before { transform: translateY(0); border-radius: 0; }
.btn-primary { background: var(--ink); color: var(--paper); }
.btn-primary:hover, .btn-primary:focus-visible { color: var(--ink); }
.btn-secondary { border: 1.5px solid var(--ink); }
.btn-secondary::before { background: var(--ink); }
.btn-secondary:hover, .btn-secondary:focus-visible { color: var(--paper); }
.btn-block { width: 100%; }
.section-dark .btn-primary, .booking .btn-primary { background: var(--spark); color: var(--ink); }
.booking .btn-primary::before { background: var(--ink); }
.booking .btn-primary:hover { color: var(--paper); }

/* ---------- Scroll reveal (only hidden when JS is running) ---------- */
.js .reveal {
  opacity: 0; transform: translateY(32px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
  transition-delay: calc(var(--rd, 0) * 90ms);
}
.js .reveal.in-view { opacity: 1; transform: none; }

/* Image "curtain" reveal (clip is on the img so the observed container stays measurable) */
.js [data-reveal-img] img {
  clip-path: inset(100% 0 0 0); transform: scale(1.22);
  transition: clip-path 1.2s var(--ease), transform 1.6s var(--ease);
}
.js [data-reveal-img].in-view img { clip-path: inset(0 0 0 0); transform: scale(1); }

/* ==========================================================================
   HEADER
   ========================================================================== */
.header {
  position: fixed; inset: 0 0 auto 0; z-index: 1000;
  height: var(--header-h);
  display: flex; align-items: center;
  transition: background 0.4s var(--ease), height 0.4s var(--ease), box-shadow 0.4s var(--ease);
}
.header.scrolled {
  height: 68px;
  background: rgba(245, 241, 232, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 1px 0 var(--line);
}
.header-inner { width: var(--container); margin-inline: auto; display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; }

.logo { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); }
.logo-mark { flex-shrink: 0; transition: transform 0.6s var(--ease); }
.logo:hover .logo-mark { transform: rotate(-12deg) scale(1.06); }
.logo-word { font-family: var(--font-display); font-size: 1.7rem; line-height: 1; letter-spacing: -0.01em; }
.logo-word em { color: var(--spark-ink); margin-left: 1px; }

.nav { display: flex; align-items: center; gap: clamp(1.2rem, 0.8vw + 0.9rem, 2.2rem); }
.nav-link { position: relative; font-size: var(--fs-sm); font-weight: 600; padding: 6px 0; }
.nav-link::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 2px;
  background: var(--spark); transform: scaleX(0); transform-origin: right;
  transition: transform 0.45s var(--ease);
}
.nav-link:hover::after, .nav-link:focus-visible::after, .nav-link.current::after { transform: scaleX(1); transform-origin: left; }

.header-actions { display: flex; align-items: center; gap: 1rem; }
.hamburger { display: none; width: 46px; height: 46px; flex-direction: column; gap: 7px; align-items: center; justify-content: center; border-radius: 50%; border: 1.5px solid var(--ink); }
.hamburger span { width: 18px; height: 2px; background: var(--ink); border-radius: 2px; transition: transform 0.4s var(--ease); }
.hamburger.active span:nth-child(1) { transform: translateY(4.5px) rotate(45deg); }
.hamburger.active span:nth-child(2) { transform: translateY(-4.5px) rotate(-45deg); }

.mobile-nav {
  position: fixed; inset: var(--header-h) 0 0 0; z-index: 999;
  background: var(--paper);
  display: flex; flex-direction: column; padding: 1.5rem 6vw 2rem;
  clip-path: inset(0 0 100% 0); visibility: hidden;
  transition: clip-path 0.6s var(--ease), visibility 0s 0.6s;
  overflow-y: auto;
}
.mobile-nav.active { clip-path: inset(0); visibility: visible; transition: clip-path 0.6s var(--ease); }
.mobile-nav .nav-link { font-family: var(--font-display); font-size: clamp(2rem, 8vw, 2.8rem); padding: 0.55rem 0; border-bottom: 1px solid var(--line); line-height: 1.1; }
.mobile-nav .nav-link::after { display: none; }
.mobile-nav .btn { margin-top: 1.75rem; }

/* ==========================================================================
   HERO
   ========================================================================== */
.hero {
  position: relative; overflow: hidden;
  padding-top: calc(var(--header-h) + clamp(1.5rem, 4vw, 4rem));
  padding-bottom: calc(clamp(4rem, 7vw, 7rem) + var(--r));
  background:
    radial-gradient(60% 50% at 8% 100%, rgba(191, 227, 208, 0.55), transparent 70%),
    var(--paper);
}
.hero-star {
  position: absolute; top: -18%; right: -14%;
  width: clamp(420px, 62vw, 860px); height: auto; aspect-ratio: 1;
  fill: var(--spark); opacity: 0.09; pointer-events: none;
  animation: spin 90s linear infinite;
  will-change: transform;
}
@keyframes spin { to { rotate: 360deg; } }

.hero-inner {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: 1.15fr 0.85fr;
  gap: clamp(2rem, 4vw, 4rem); align-items: center;
}
.hero-content h1 { font-size: var(--fs-hero); line-height: 0.93; letter-spacing: -0.025em; margin-bottom: 1.6rem; }

/* Headline: each word rises out of a mask */
.hero h1 .w { display: inline-block; overflow: hidden; vertical-align: top; padding: 0.04em 0.06em 0.12em; margin: -0.04em -0.06em -0.12em; }
.hero h1 .w > span { display: inline-block; transform: translateY(110%); animation: rise 1s var(--ease) forwards; animation-delay: calc(var(--i) * 80ms + 120ms); }
.hero h1 .accent em { color: var(--spark-ink); position: relative; }
.hero h1 .accent em::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: 0.1em; height: 0.05em;
  background: var(--spark); border-radius: 4px; transform: scaleX(0); transform-origin: left;
  animation: draw 1s var(--ease) 1.1s forwards;
}
@keyframes rise { to { transform: none; } }
@keyframes draw { to { transform: scaleX(1); } }

.hero-in { opacity: 0; transform: translateY(24px); animation: fadeUp 1s var(--ease) forwards; animation-delay: calc(var(--d, 0) * 90ms + 200ms); }
@keyframes fadeUp { to { opacity: 1; transform: none; } }

.hero-desc { font-size: var(--fs-lg); color: var(--muted); max-width: 48ch; margin-bottom: 2.1rem; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 0.9rem; margin-bottom: 2.4rem; }
.hero-trust { display: flex; align-items: center; gap: 1.2rem; flex-wrap: wrap; }
.avatar-stack { display: flex; }
.avatar-stack img { width: 42px; height: 42px; border-radius: 50%; border: 3px solid var(--paper); object-fit: cover; margin-left: -12px; background: var(--sand); }
.avatar-stack img:first-child { margin-left: 0; }
.rating-line { display: flex; flex-direction: column; gap: 2px; }
.stars { color: var(--spark); font-size: 0.95rem; letter-spacing: 3px; }
.rating-text { font-size: var(--fs-xs); font-weight: 600; color: var(--muted); }

/* 3D stage — layers sit at different Z depths; pointer rotates the whole stack */
.stage { perspective: 1100px; width: 100%; max-width: 480px; margin-left: auto; aspect-ratio: 4 / 5; }
.stage-inner {
  position: relative; width: 100%; height: 100%;
  transform-style: preserve-3d;
  transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transition: transform 0.35s var(--ease);
}
.layer { position: absolute; transform: translateZ(var(--z, 0px)); }
.l-ring { inset: 0; border: 1.5px solid var(--ink); border-radius: 999px 999px 30px 30px; translate: 22px 22px; opacity: 0.35; }
.l-arch {
  inset: 0; overflow: hidden; background: var(--sand);
  border-radius: 999px 999px 30px 30px; box-shadow: var(--shadow-lg);
}
.l-arch img { width: 100%; height: 100%; object-fit: cover; filter: saturate(0.92) contrast(1.03); }

.l-seal { top: -4%; right: -9%; width: 118px; height: 118px; border-radius: 50%; background: var(--spark); display: grid; place-items: center; box-shadow: var(--shadow-md); }
.seal-text { position: absolute; inset: 0; animation: spin 22s linear infinite; }
.seal-text text { font-family: var(--font-body); font-size: 10.4px; font-weight: 700; letter-spacing: 0.17em; fill: var(--ink); }
.seal-core { fill: var(--ink); }

.floating-card {
  display: flex; align-items: center; gap: 12px;
  background: var(--paper-2); color: var(--ink);
  border: 1px solid var(--line); border-radius: var(--radius-md);
  box-shadow: var(--shadow-md); padding: 0.85rem 1.15rem 0.85rem 0.85rem;
  animation: floaty 6s ease-in-out infinite;
}
.card-top { top: 14%; left: -14%; animation-delay: -1.5s; }
.card-bottom { bottom: 22%; right: -12%; animation-delay: -3.5s; }
@keyframes floaty { 50% { translate: 0 -12px; } }
.fc-icon { width: 40px; height: 40px; border-radius: 12px; background: var(--ink); color: var(--paper); display: grid; place-items: center; flex-shrink: 0; }
.fc-icon svg { stroke: currentColor; fill: none; }
.fc-title { font-weight: 700; font-size: 0.95rem; line-height: 1.25; }
.fc-sub { font-size: var(--fs-xs); color: var(--muted); }

.gauge-card {
  left: -7%; bottom: -3%;
  display: flex; align-items: center; gap: 14px;
  background: var(--ink); color: var(--paper);
  border-radius: var(--radius-md); box-shadow: var(--shadow-lg);
  padding: 0.95rem 1.3rem 0.95rem 0.95rem;
  animation: floaty 7s ease-in-out infinite; animation-delay: -2s;
}
.gauge-card .fc-sub { color: var(--on-dark); }
.gauge-ring { position: relative; width: 60px; height: 60px; flex-shrink: 0; }
.gauge-ring svg { transform: rotate(-90deg); width: 100%; height: 100%; }
.gauge-ring circle { fill: none; stroke-width: 6; }
.gauge-ring .track { stroke: rgba(245, 241, 232, 0.16); }
.gauge-ring .progress { stroke: url(#gaugeGradient); stroke-linecap: round; stroke-dasharray: 176; stroke-dashoffset: 176; transition: stroke-dashoffset 1.8s var(--ease); }
.gauge-num { position: absolute; inset: 0; display: grid; place-items: center; font-weight: 700; font-size: 0.85rem; }

/* ==========================================================================
   STATS
   ========================================================================== */
.trust-strip { background: var(--ink); color: var(--paper); z-index: 2; }
.trust-grid { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(4, 1fr); padding-block: calc(clamp(2.5rem, 4vw, 4.5rem) + var(--r) * 0.4) clamp(3.5rem, 5vw, 5.5rem); }
.trust-item { padding-inline: clamp(1rem, 2vw, 2rem); border-left: 1px solid var(--line-dark); }
.trust-item:first-child { border-left: 0; padding-left: 0; }
.trust-num { display: block; font-family: var(--font-display); font-size: clamp(3rem, 2rem + 4.2vw, 5.8rem); line-height: 1; letter-spacing: -0.03em; }
.trust-num [data-suffix] { font-variant-numeric: tabular-nums; }
.trust-label { display: block; margin-top: 0.7rem; color: var(--on-dark); font-size: var(--fs-xs); font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; }

/* ==========================================================================
   SERVICES — an indexed list, not a card grid
   ========================================================================== */
.services { z-index: 3; }
.services-inner { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: clamp(2rem, 5vw, 6rem); align-items: start; }
.sticky-head { text-align: left; margin: 0; max-width: none; position: sticky; top: calc(var(--header-h) + 32px); }
.sticky-head .section-desc { margin-inline: 0; }

.svc-list { border-bottom: 1px solid var(--line); }
.svc {
  position: relative; isolation: isolate;
  display: grid; grid-template-columns: 2.2rem 56px 1fr auto; align-items: center; gap: clamp(0.9rem, 2vw, 1.6rem);
  padding: clamp(1.4rem, 2.2vw, 2rem) 0; border-top: 1px solid var(--line);
  transition: color 0.45s var(--ease);
}
.svc::before {
  content: ''; position: absolute; z-index: -1; inset: -1px -1.25rem;
  background: var(--ink); border-radius: 18px;
  transform: scaleY(0); transform-origin: bottom;
  transition: transform 0.55s var(--ease);
}
.svc-n { font-family: var(--font-display); font-style: italic; color: var(--spark-ink); font-size: 1.15rem; }
.svc-ico { width: 56px; height: 56px; border-radius: 50%; border: 1.5px solid var(--line); display: grid; place-items: center; transition: background 0.45s var(--ease), border-color 0.45s var(--ease), transform 0.6s var(--ease); }
.svc h3 { font-size: var(--fs-xl); margin-bottom: 0.3rem; }
.svc p { color: var(--muted); font-size: var(--fs-sm); max-width: 46ch; transition: color 0.45s var(--ease); }
.svc-link { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: var(--fs-sm); white-space: nowrap; }
.svc-link::after { content: ''; position: absolute; inset: 0; }  /* whole row is the hit area */
.svc-link svg { transition: transform 0.45s var(--ease); }
.svc:focus-within { outline: 2.5px solid var(--spark); outline-offset: 4px; border-radius: 4px; }
.svc-link:focus-visible { outline: none; }

@media (hover: hover) {
  .svc:hover { color: var(--paper); }
  .svc:hover::before { transform: scaleY(1); }
  .svc:hover p { color: var(--on-dark); }
  .svc:hover .svc-ico { background: var(--spark); border-color: var(--spark); color: var(--ink); transform: rotate(-8deg); }
  .svc:hover .svc-n { color: var(--spark); }
  .svc:hover .svc-link svg { transform: translateX(6px); }
}

/* ==========================================================================
   WHY US
   ========================================================================== */
.why-inner { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: clamp(2.5rem, 6vw, 6.5rem); align-items: center; }
.why-visual { position: relative; }
.why-frame { aspect-ratio: 4 / 4.9; border-radius: 230px 30px 30px 30px; overflow: hidden; background: var(--paper); box-shadow: var(--shadow-lg); }
.why-frame img { width: 100%; height: 118%; object-fit: cover; transform-origin: center; }
.why-badge {
  position: absolute; right: -1.6rem; bottom: 2.2rem;
  display: flex; align-items: center; gap: 0.9rem;
  background: var(--ink); color: var(--paper);
  border-radius: var(--radius-md); padding: 1.1rem 1.4rem;
  box-shadow: var(--shadow-lg); rotate: -3deg;
}
.why-badge .num { font-family: var(--font-display); font-size: clamp(2.4rem, 2rem + 1.4vw, 3.4rem); line-height: 1; color: var(--spark); }
.why-badge .label { font-size: var(--fs-xs); font-weight: 600; max-width: 11ch; line-height: 1.3; color: var(--on-dark); }

.why-content .section-desc { margin-inline: 0; }
.why-list { margin: 2.2rem 0 2.6rem; border-bottom: 1px solid var(--line); }
.why-item { display: grid; grid-template-columns: 3rem 1fr; gap: 0.5rem; padding: 1.3rem 0; border-top: 1px solid var(--line); transition: padding-left 0.5s var(--ease); }
.why-item:hover { padding-left: 0.6rem; }
.why-n { font-family: var(--font-display); font-style: italic; font-size: 1.5rem; color: var(--spark-ink); line-height: 1.2; }
.why-item h3 { font-size: var(--fs-xl); margin-bottom: 0.3rem; }
.why-item p { color: var(--muted); font-size: var(--fs-sm); }

/* ==========================================================================
   DOCTORS — staggered, with pointer tilt
   ========================================================================== */
.doctors-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(1rem, 2vw, 1.8rem); align-items: start; }
.doctor-card:nth-child(even) { margin-top: clamp(2rem, 4vw, 4rem); }
.doctor-card { perspective: 900px; }
.doctor-photo {
  position: relative; aspect-ratio: 4 / 4.8; overflow: hidden;
  border-radius: var(--radius-md); background: var(--sand);
  transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease);
  box-shadow: var(--shadow-md);
}
.doctor-photo img { width: 100%; height: 100%; object-fit: cover; filter: saturate(0.8) contrast(1.02); transition: filter 0.6s var(--ease), transform 0.8s var(--ease); }
.doctor-photo::after { content: ''; position: absolute; inset: 0; opacity: 0; transition: opacity 0.4s; background: radial-gradient(circle at var(--gx, 50%) var(--gy, 30%), rgba(255, 255, 255, 0.35), transparent 55%); pointer-events: none; }
@media (hover: hover) {
  .doctor-card:hover .doctor-photo { box-shadow: var(--shadow-lg); }
  .doctor-card:hover img { filter: none; transform: scale(1.05); }
  .doctor-card:hover .doctor-photo::after { opacity: 1; }
}
.doctor-info { padding: 1.2rem 0.25rem 0; }
.doctor-info h3 { font-size: var(--fs-xl); margin-bottom: 0.25rem; }
.doc-role { color: var(--spark-ink); font-weight: 700; font-size: var(--fs-sm); margin-bottom: 0.5rem; }
.doc-exp { color: var(--muted); font-size: var(--fs-xs); display: flex; align-items: center; gap: 6px; }
.doc-exp svg { stroke: currentColor; flex-shrink: 0; }

/* ==========================================================================
   TESTIMONIALS
   ========================================================================== */
.testimonials { color: var(--paper); }
.testimonials > .container { position: relative; z-index: 1; }
.testimonials-wrap { position: relative; max-width: 900px; margin-inline: auto; text-align: center; }
.quote-mark { position: absolute; left: 50%; top: 0.1em; translate: -50% 0; font-family: var(--font-display); font-size: clamp(10rem, 8rem + 12vw, 20rem); line-height: 1; color: var(--spark); opacity: 0.22; pointer-events: none; }
.testimonial-slides { display: grid; position: relative; }
.testimonial-slide { grid-area: 1 / 1; opacity: 0; visibility: hidden; transform: translateY(18px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease), visibility 0s 0.7s; padding-top: 1rem; }
.testimonial-slide.active { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
.testimonial-slide .stars { margin-bottom: 1.4rem; font-size: 1.1rem; }
.testimonial-quote { font-family: var(--font-display); font-size: clamp(1.7rem, 1.3rem + 1.9vw, 3rem); line-height: 1.18; letter-spacing: -0.01em; margin-bottom: 2rem; text-wrap: balance; }
.testimonial-author { display: flex; align-items: center; justify-content: center; gap: 14px; text-align: left; }
.testimonial-author img { width: 52px; height: 52px; border-radius: 50%; object-fit: cover; border: 2px solid var(--spark); background: var(--sand); }
.t-name { font-weight: 700; font-size: var(--fs-sm); }
.t-role { color: var(--on-dark); font-size: var(--fs-xs); }

.testimonial-controls { display: flex; align-items: center; justify-content: center; gap: 1.5rem; margin-top: 2.6rem; }
.testimonial-dots { display: flex; gap: 8px; }
.testimonial-dots button { position: relative; width: 28px; height: 28px; }
.testimonial-dots button::before { content: ''; position: absolute; left: 50%; top: 50%; width: 8px; height: 8px; border-radius: 8px; translate: -50% -50%; background: var(--line-dark); transition: width 0.5s var(--ease), background 0.4s; }
.testimonial-dots button.active::before { width: 26px; background: var(--spark); }
.testimonial-arrow { width: 50px; height: 50px; border-radius: 50%; border: 1.5px solid var(--line-dark); display: grid; place-items: center; transition: background 0.35s var(--ease), color 0.35s var(--ease), border-color 0.35s; }
.testimonial-arrow:hover { background: var(--spark); border-color: var(--spark); color: var(--ink); }

/* ==========================================================================
   GALLERY — asymmetric mosaic
   ========================================================================== */
.gallery-grid { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: clamp(150px, 17vw, 230px); gap: clamp(0.7rem, 1.4vw, 1.2rem); grid-auto-flow: dense; }
.g1 { grid-column: span 2; grid-row: span 2; }
.g3 { grid-row: span 2; }
.g5, .g6 { grid-column: span 2; }
.gallery-item { position: relative; overflow: hidden; border-radius: 20px; cursor: zoom-in; background: var(--sand); }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; filter: saturate(0.88); transition: transform 0.9s var(--ease), filter 0.6s; }
.gallery-overlay {
  position: absolute; inset: auto 0 0 0; padding: 2.5rem 1.1rem 1rem;
  background: linear-gradient(0deg, rgba(14, 31, 29, 0.78), transparent);
  color: var(--paper); font-weight: 700; font-size: var(--fs-sm);
  transform: translateY(100%); transition: transform 0.5s var(--ease);
}
.gallery-item:focus-visible { outline-offset: -4px; }
@media (hover: hover) {
  .gallery-item:hover img { transform: scale(1.07); filter: none; }
  .gallery-item:hover .gallery-overlay, .gallery-item:focus-visible .gallery-overlay { transform: none; }
}
@media (hover: none) { .gallery-overlay { transform: none; padding-top: 1.6rem; } }

.lightbox { position: fixed; inset: 0; background: rgba(14, 31, 29, 0.94); z-index: 2000; display: flex; align-items: center; justify-content: center; padding: 5vh 5vw; opacity: 0; visibility: hidden; transition: opacity 0.35s var(--ease), visibility 0s 0.35s; }
.lightbox.active { opacity: 1; visibility: visible; transition-delay: 0s; }
.lightbox img { max-width: 100%; max-height: 88vh; border-radius: var(--radius-md); transform: scale(0.94); transition: transform 0.5s var(--ease); box-shadow: var(--shadow-lg); }
.lightbox.active img { transform: none; }
.lightbox-close { position: absolute; top: 22px; right: 22px; width: 50px; height: 50px; border-radius: 50%; background: rgba(245, 241, 232, 0.12); color: var(--paper); display: grid; place-items: center; transition: background 0.3s; }
.lightbox-close:hover { background: var(--spark); color: var(--ink); }

/* ==========================================================================
   BOOKING
   ========================================================================== */
.booking-section { padding-inline: 0; }
.booking {
  --lx: 22%; --ly: 18%;
  position: relative; overflow: hidden; isolation: isolate;
  width: var(--container); margin-inline: auto;
  background: var(--ink); color: var(--paper);
  border-radius: calc(var(--r) * 0.8);
}
.booking::before { /* pointer-following light */
  content: ''; position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(520px circle at var(--lx) var(--ly), rgba(255, 91, 46, 0.34), transparent 60%),
    radial-gradient(60% 60% at 100% 100%, rgba(18, 64, 58, 0.9), transparent 70%);
}
.booking-inner { position: relative; z-index: 1; display: grid; grid-template-columns: 0.85fr 1.15fr; gap: clamp(2rem, 4vw, 4.5rem); padding: clamp(2rem, 5vw, 5rem); }
.booking-copy { align-self: center; }
.booking-copy h2 { font-size: var(--fs-3xl); margin-bottom: 1.1rem; text-wrap: balance; }
.booking-copy h2 em { color: var(--spark); }
.booking-copy p { color: var(--on-dark); margin-bottom: 1.8rem; max-width: 42ch; }
.booking-perks { display: grid; gap: 0.85rem; }
.booking-perks li { display: flex; align-items: center; gap: 10px; font-size: var(--fs-sm); }
.booking-perks svg { stroke: var(--spark); fill: none; flex-shrink: 0; }

.booking-form { background: var(--paper); color: var(--ink); border-radius: var(--radius-md); padding: clamp(1.5rem, 3vw, 2.5rem); box-shadow: var(--shadow-lg); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; }
.field-full { grid-column: 1 / -1; }
.field { position: relative; }
.field label { position: absolute; left: 0.9rem; top: 1rem; font-size: var(--fs-base); color: var(--muted); pointer-events: none; background: #fff; padding: 0 5px; transform-origin: left top; transition: transform 0.3s var(--ease), color 0.3s var(--ease); line-height: 1.3; }
.field input, .field select, .field textarea { width: 100%; border: 1.5px solid var(--line); border-radius: var(--radius-sm); padding: 1rem; color: var(--ink); background: #fff; transition: border-color 0.3s, box-shadow 0.3s; }
.field textarea { min-height: 110px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 4px rgba(255, 91, 46, 0.25); }
.field input:focus + label,
.field input:not(:placeholder-shown) + label,
.field input[type='date'] + label,
.field select:focus + label,
.field select.filled + label,
.field textarea:focus + label,
.field textarea:not(:placeholder-shown) + label { transform: translateY(-1.6rem) scale(0.82); color: var(--ink); font-weight: 700; }
.field select { appearance: none; -webkit-appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9'%3E%3Cpath d='M1 1l6 6 6-6' stroke='%235B6764' stroke-width='2' fill='none'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 1rem center; }
.form-submit { margin-top: 1.5rem; }
.form-note { font-size: var(--fs-xs); color: var(--muted); margin-top: 1rem; text-align: center; }
.form-success { display: none; align-items: center; gap: 12px; background: rgba(18, 64, 58, 0.1); border: 1px solid rgba(18, 64, 58, 0.3); color: var(--pine); padding: 1rem 1.2rem; border-radius: var(--radius-sm); font-weight: 700; font-size: var(--fs-sm); margin-bottom: 1.2rem; }
.form-success svg { stroke: currentColor; fill: none; flex-shrink: 0; }
.form-success.show { display: flex; }

/* ==========================================================================
   FAQ
   ========================================================================== */
.faq-inner { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: clamp(2rem, 5vw, 6rem); align-items: start; }
.faq-list { border-bottom: 1px solid var(--line); }
.faq-item { border-top: 1px solid var(--line); }
.faq-item h3 { font-size: inherit; line-height: inherit; }
.faq-question { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; padding: 1.5rem 0; text-align: left; font-family: var(--font-display); font-size: var(--fs-xl); line-height: 1.15; transition: color 0.3s, padding-left 0.5s var(--ease); }
.faq-question:hover { padding-left: 0.5rem; }
.faq-icon { position: relative; width: 36px; height: 36px; border-radius: 50%; border: 1.5px solid var(--ink); flex-shrink: 0; transition: background 0.4s var(--ease), border-color 0.4s, rotate 0.5s var(--ease); }
.faq-icon::before, .faq-icon::after { content: ''; position: absolute; left: 50%; top: 50%; width: 12px; height: 1.8px; background: currentColor; translate: -50% -50%; transition: rotate 0.5s var(--ease); }
.faq-icon::after { rotate: 90deg; }
.faq-item.active .faq-icon { background: var(--spark); border-color: var(--spark); color: var(--ink); }
.faq-item.active .faq-icon::after { rotate: 0deg; }
.faq-answer { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 0.5s var(--ease); }
.faq-answer > div { overflow: hidden; }
.faq-item.active .faq-answer { grid-template-rows: 1fr; }
.faq-answer p { padding: 0 3.5rem 1.6rem 0; color: var(--muted); max-width: 58ch; }

/* ==========================================================================
   CONTACT
   ========================================================================== */
.contact-inner { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: clamp(1.2rem, 2.5vw, 2.2rem); align-items: stretch; }
.contact-map { position: relative; display: block; overflow: hidden; min-height: 440px; border-radius: var(--radius-lg); background: var(--sand); color: var(--pine); isolation: isolate; }
.map-art { position: absolute; inset: 0; width: 100%; height: 100%; transition: transform 1.2s var(--ease); }
.contact-map:hover .map-art { transform: scale(1.05); }
.map-pin { position: absolute; top: 50%; left: 50%; translate: -50% -58%; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.pin-dot { width: 58px; height: 58px; border-radius: 50%; background: var(--spark); color: var(--ink); display: grid; place-items: center; box-shadow: var(--shadow-md); position: relative; fill: var(--ink); }
.map-ripple { position: absolute; top: 0; width: 58px; height: 58px; border-radius: 50%; border: 2px solid var(--spark); animation: ripple 2.6s ease-out infinite; }
@keyframes ripple { from { transform: scale(0.8); opacity: 0.9; } to { transform: scale(2.8); opacity: 0; } }
.map-pin span { font-weight: 700; font-size: var(--fs-sm); background: var(--ink); color: var(--paper); padding: 6px 15px; border-radius: 100px; }
.map-pin small { font-size: var(--fs-xs); font-weight: 700; color: var(--ink); letter-spacing: 0.04em; }

.contact-cards { display: grid; gap: 1rem; grid-template-rows: repeat(3, auto); }
.contact-two { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.contact-card { display: flex; flex-direction: column; gap: 0.35rem; background: var(--paper-2); border: 1px solid var(--line); border-radius: var(--radius-md); padding: 1.35rem 1.4rem; transition: transform 0.45s var(--ease), border-color 0.3s; }
.contact-card:hover { transform: translateY(-4px); border-color: var(--ink); }
.cc-label { font-size: var(--fs-xs); font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.contact-card a, .contact-card p { font-family: var(--font-display); font-size: var(--fs-lg); line-height: 1.25; overflow-wrap: anywhere; }
.contact-card a:hover { color: var(--spark-ink); }
.contact-card.emergency { background: var(--spark); border-color: var(--spark); }
.contact-card.emergency .cc-label { color: var(--ink); }
.contact-card.emergency a:hover { color: var(--paper); }

/* ==========================================================================
   FOOTER
   ========================================================================== */
.footer { background: var(--ink); color: var(--on-dark); padding-top: clamp(3.5rem, 6vw, 6rem); overflow: hidden; z-index: 5; }
.footer > * { position: relative; z-index: 1; }
.footer-top { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.3fr; gap: clamp(2rem, 4vw, 3.5rem); padding-bottom: clamp(2rem, 3vw, 3rem); }
.footer-brand .logo { color: var(--paper); margin-bottom: 1.1rem; }
.footer-brand .logo-word em { color: var(--spark); }
.footer-brand p { font-size: var(--fs-sm); max-width: 32ch; margin-bottom: 1.5rem; }
.footer-social { display: flex; gap: 10px; }
.footer-social a { width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--line-dark); display: grid; place-items: center; transition: background 0.35s var(--ease), color 0.35s, transform 0.45s var(--ease); }
.footer-social a:hover { background: var(--spark); border-color: var(--spark); color: var(--ink); transform: translateY(-3px); }
.footer-title { color: var(--paper); font-weight: 700; font-size: var(--fs-xs); letter-spacing: 0.16em; text-transform: uppercase; margin-bottom: 1.2rem; }
.footer-col ul { display: grid; gap: 0.7rem; }
.footer-col li a { font-size: var(--fs-sm); transition: color 0.3s, padding-left 0.4s var(--ease); }
.footer-col li a:hover { color: var(--paper); padding-left: 6px; }
.footer-note { font-size: var(--fs-sm); margin-bottom: 0.9rem; }
.newsletter-form { display: flex; gap: 8px; }
.newsletter-form input { flex: 1; min-width: 0; padding: 0.85rem 1.1rem; border-radius: 100px; border: 1px solid var(--line-dark); background: rgba(245, 241, 232, 0.06); color: var(--paper); font-size: var(--fs-sm); }
.newsletter-form input::placeholder { color: rgba(245, 241, 232, 0.5); }
.newsletter-form input:focus { outline: none; border-color: var(--spark); }
.newsletter-form button { width: 48px; height: 48px; border-radius: 50%; background: var(--spark); color: var(--ink); display: grid; place-items: center; flex-shrink: 0; transition: transform 0.4s var(--ease); }
.newsletter-form button:hover { transform: scale(1.08) rotate(-8deg); }

.footer-mark { font-family: var(--font-display); font-size: clamp(7rem, 30vw, 30rem); line-height: 0.74; height: 0.62em; overflow: hidden; text-align: center; color: rgba(245, 241, 232, 0.07); user-select: none; letter-spacing: -0.04em; }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1rem; padding-block: 1.6rem; font-size: var(--fs-xs); border-top: 1px solid var(--line-dark); }
.footer-bottom-links { display: flex; gap: 1.5rem; }
.footer-bottom-links a:hover { color: var(--paper); }

/* ==========================================================================
   EXTRAS
   ========================================================================== */
.scroll-progress { position: fixed; top: 0; left: 0; height: 3px; width: 100%; background: var(--spark); z-index: 1100; transform: scaleX(0); transform-origin: left; }

.back-to-top { position: fixed; bottom: 26px; right: 26px; width: 52px; height: 52px; border-radius: 50%; background: var(--ink); color: var(--paper); box-shadow: var(--shadow-lg); display: grid; place-items: center; z-index: 900; opacity: 0; transform: translateY(16px) scale(0.9); pointer-events: none; transition: opacity 0.4s var(--ease), transform 0.4s var(--ease), background 0.3s, color 0.3s; }
.back-to-top.visible { opacity: 1; transform: none; pointer-events: auto; }
.back-to-top:hover { background: var(--spark); color: var(--ink); }

.custom-cursor { position: fixed; left: 0; top: 0; width: 20px; height: 20px; margin: -10px 0 0 -10px; border-radius: 50%; border: 1.5px solid var(--spark); pointer-events: none; z-index: 1200; opacity: 0; display: grid; place-items: center; transition: width 0.35s var(--ease), height 0.35s var(--ease), margin 0.35s var(--ease), background 0.3s, opacity 0.3s; will-change: transform; }
.custom-cursor span { font-size: 0.7rem; font-weight: 800; letter-spacing: 0.06em; color: var(--ink); opacity: 0; transition: opacity 0.2s; }
.custom-cursor.active { opacity: 1; }
.custom-cursor.hovering { width: 48px; height: 48px; margin: -24px 0 0 -24px; background: rgba(255, 91, 46, 0.16); }
.custom-cursor.view { width: 74px; height: 74px; margin: -37px 0 0 -37px; background: var(--spark); }
.custom-cursor.view span { opacity: 1; }

.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; }
.skip-link { position: fixed; top: -70px; left: 12px; background: var(--ink); color: var(--paper); padding: 12px 20px; border-radius: 8px; z-index: 2000; font-weight: 700; transition: top 0.3s var(--ease); }
.skip-link:focus { top: 12px; }

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (min-width: 1920px) { :root { --container: min(1440px, 88vw); } }

@media (max-width: 1200px) {
  .footer-top { grid-template-columns: 1.2fr 1fr 1fr; }
  .footer-top > :last-child { grid-column: 1 / -1; max-width: 420px; }
  .card-top { left: -6%; }
  .card-bottom { right: -6%; }
  .l-seal { right: -4%; }
  .gauge-card { left: -3%; }
}

@media (max-width: 1024px) {
  .nav, .header .btn-primary { display: none; }
  .hamburger { display: flex; }

  .hero-inner { grid-template-columns: 1fr; text-align: center; }
  .hero-desc { margin-inline: auto; }
  .hero-ctas, .hero-trust { justify-content: center; }
  .stage { order: -1; max-width: 360px; margin-inline: auto; }
  .hero-content h1 { font-size: clamp(3rem, 1.6rem + 7vw, 5.4rem); }

  .services-inner, .faq-inner, .why-inner, .contact-inner, .booking-inner { grid-template-columns: 1fr; }
  .sticky-head { position: static; }
  .why-visual { max-width: 460px; margin-inline: auto; width: 100%; }
  .why-badge { right: -0.5rem; }
  .doctors-grid { grid-template-columns: repeat(2, 1fr); }
  .contact-map { min-height: 340px; }
  .trust-grid { grid-template-columns: repeat(2, 1fr); row-gap: 2.2rem; }
  .trust-item:nth-child(3) { border-left: 0; padding-left: 0; }
}

@media (max-width: 820px) {
  :root { --header-h: 72px; }
  .form-grid, .contact-two { grid-template-columns: 1fr; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); grid-auto-rows: clamp(140px, 36vw, 220px); }
  .g1, .g5 { grid-column: span 2; }
  .g1 { grid-row: span 2; }
  .g3 { grid-row: span 1; }
  .g6 { grid-column: span 1; }
}

@media (max-width: 640px) {
  .container { width: 90vw; }
  .booking { width: 94vw; }
  .svc { grid-template-columns: 52px 1fr; padding-block: 1.4rem; }
  .svc-n { display: none; }
  .svc-ico { width: 52px; height: 52px; grid-row: span 2; }
  .svc-link { grid-column: 2; }
  .why-item { grid-template-columns: 2.4rem 1fr; }
  .why-badge { position: relative; right: auto; bottom: auto; margin: -2rem 1rem 0 auto; width: max-content; }

  /* Doctors become a swipeable strip */
  .doctors-grid { display: grid; grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 74%; gap: 1rem; overflow-x: auto; scroll-snap-type: x mandatory; margin-inline: -5vw; padding: 0 5vw 1rem; scrollbar-width: none; overscroll-behavior-x: contain; }
  .doctors-grid::-webkit-scrollbar { display: none; }
  .doctor-card { scroll-snap-align: center; }
  .doctor-card:nth-child(even) { margin-top: 0; }

  .faq-question { font-size: 1.35rem; }
  .faq-answer p { padding-right: 0; }
  .footer-top { grid-template-columns: 1fr 1fr; }
  .footer-brand, .footer-top > :last-child { grid-column: 1 / -1; }
  .footer-bottom { flex-direction: column; text-align: center; }
  .custom-cursor { display: none; }
  .back-to-top { width: 46px; height: 46px; bottom: 18px; right: 18px; }
  .stage { max-width: 320px; margin-bottom: 2.6rem; }
  .card-top { left: 3%; top: 8%; }
  .card-bottom { right: 1%; }
  .gauge-card { left: 3%; }
  .l-seal { width: 92px; height: 92px; right: 1%; top: -6%; }
  .seal-text text { font-size: 10.8px; }
  .trust-num { font-size: clamp(2.6rem, 12vw, 3.6rem); }
}

@media (max-width: 420px) {
  .hero-ctas { flex-direction: column; align-items: stretch; }
  .newsletter-form { flex-direction: column; }
  .newsletter-form button { width: 100%; border-radius: var(--radius-sm); }
  .floating-card { padding-right: 0.9rem; }
}

/* ==========================================================================
   REDUCED MOTION — show everything, move nothing
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; transition-delay: 0s !important; scroll-behavior: auto !important; }
  .hero h1 .w > span, .hero-in { transform: none; opacity: 1; }
  .js .reveal, .js [data-reveal-img] img { opacity: 1; transform: none; clip-path: none; }
  .hero-star, .seal-text, .floating-card, .gauge-card { animation: none; }
}
