/* ═══════════════════════════════════════════
   SRI ANANDHA POLY CLINIC — Cinematic Static
   ═══════════════════════════════════════════ */

/* ─── Tokens ─────────────────────────────── */
:root {
  --bg:            #f5f3ee;
  --bg-elev:       #ffffff;
  --bg-quiet:      #ecebe6;
  --ink:           #0d1217;
  --ink-soft:      #3a434c;
  --ink-mute:      #6e7884;
  --line:          rgba(13, 18, 23, 0.10);
  --line-strong:   rgba(13, 18, 23, 0.22);
  --navy:          #0c2340;
  --teal:          #2d8a8a;
  --teal-soft:     #5cbdb9;
  --metal-1:       #d9d4c7;
  --metal-2:       #b6ad99;
  --grad-surface:  linear-gradient(180deg, #fbfaf6 0%, #ecebe6 100%);
  --grad-metal:    linear-gradient(135deg, #ffffff 0%, #d9d4c7 55%, #b6ad99 100%);
  --grad-aurora:   radial-gradient(60% 50% at 20% 30%, rgba(45,138,138,.18), transparent 60%),
                   radial-gradient(50% 40% at 80% 70%, rgba(12,35,64,.14), transparent 60%);
  --glass:         rgba(255,255,255,.55);
  --glass-stroke:  rgba(255,255,255,.7);
  --shadow-lg:     0 30px 80px -30px rgba(12,35,64,.25);
  --serif:         "Fraunces", "Times New Roman", serif;
  --sans:          "Inter", system-ui, sans-serif;
  --easing:        cubic-bezier(.2,.7,.2,1);
}

[data-theme="dark"] {
  --bg:            #0b1014;
  --bg-elev:       #11181f;
  --bg-quiet:      #0f161c;
  --ink:           #ecf1f5;
  --ink-soft:      #b9c3cc;
  --ink-mute:      #6c7884;
  --line:          rgba(236,241,245,.10);
  --line-strong:   rgba(236,241,245,.22);
  --navy:          #1a3a5c;
  --teal:          #4fd0c5;
  --teal-soft:     #79e4d8;
  --metal-1:       #2a323a;
  --metal-2:       #4a5563;
  --grad-surface:  linear-gradient(180deg, #0d1318 0%, #0a0e12 100%);
  --grad-metal:    linear-gradient(135deg, #1a2128 0%, #2a323a 50%, #4a5563 100%);
  --grad-aurora:   radial-gradient(60% 50% at 20% 30%, rgba(79,208,197,.22), transparent 60%),
                   radial-gradient(50% 40% at 80% 70%, rgba(26,58,92,.45), transparent 60%);
  --glass:         rgba(20,28,36,.55);
  --glass-stroke:  rgba(255,255,255,.08);
  --shadow-lg:     0 30px 80px -30px rgba(0,0,0,.6);
}

/* ─── Base ───────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }

/* ─── Performance: keep heavy compositing off the main thread ── */
.mesh, .streaks i, .hero__portrait-halo, .hero__portrait-plinth,
.hero__portrait-img, .float-card, .contact__glow {
  will-change: transform;
  transform: translateZ(0);
  backface-visibility: hidden;
}
/* Isolate paint of big animated sections so scroll doesn't repaint everything */
.hero, .modules, .trust, .contact, .mastery, .evolution, .focus { contain: layout paint; content-visibility: auto; contain-intrinsic-size: 800px; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .mesh, .streaks i { animation: none !important; }
}

/* On smaller / touch devices, drop the most expensive blurred layers */
@media (max-width: 900px) {
  .mesh--c, .mesh--d, .streaks { display: none; }
  .mesh { filter: blur(30px); }
  .cursor-halo { display: none; }
}

body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
::selection { background: var(--teal); color: #fff; }

/* ─── Cursor halo ────────────────────────── */
.cursor-halo {
  position: fixed; top: 0; left: 0; width: 280px; height: 280px;
  border-radius: 50%; pointer-events: none; z-index: 1;
  background: radial-gradient(closest-side, color-mix(in oklab, var(--teal) 28%, transparent), transparent 70%);
  transform: translate(-50%, -50%) translate(-1000px, -1000px);
  transition: opacity .4s var(--easing);
  mix-blend-mode: plus-lighter;
  opacity: 0;
}
@media (hover: hover) and (pointer: fine) { .cursor-halo { opacity: .9; } }

/* ─── Loader ─────────────────────────────── */
.loader {
  position: fixed; inset: 0; z-index: 100;
  background: var(--bg);
  display: grid; place-items: center;
  transition: opacity .8s var(--easing), visibility .8s;
}
.loader.is-done { opacity: 0; visibility: hidden; }
.loader__line {
  width: 1px; height: 64px;
  background: linear-gradient(to bottom, transparent, var(--ink), transparent);
  animation: line 1.6s infinite var(--easing);
}
.loader__mark {
  position: absolute; bottom: 6vh; left: 6vw;
  font-family: var(--serif); font-size: 14px; letter-spacing: .3em;
  color: var(--ink-mute);
}
@keyframes line {
  0%   { transform: scaleY(0); transform-origin: top; }
  45%  { transform: scaleY(1); transform-origin: top; }
  55%  { transform: scaleY(1); transform-origin: bottom; }
  100% { transform: scaleY(0); transform-origin: bottom; }
}

/* ─── Nav ────────────────────────────────── */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 22px clamp(20px, 4vw, 56px);
  transition: background .6s var(--easing);
}
.nav.is-scrolled {
  background: color-mix(in oklab, var(--bg) 70%, transparent);
  backdrop-filter: blur(10px) saturate(120%);
  -webkit-backdrop-filter: blur(10px) saturate(120%);
  border-bottom: 1px solid var(--line);
}
.nav__brand { display: flex; align-items: center; gap: 14px; }
.nav__mark { font-family: var(--serif); font-size: 22px; font-weight: 500; letter-spacing: .02em; }
.nav__dot { color: var(--teal); }
.nav__name {
  font-size: 12px; letter-spacing: .28em; text-transform: uppercase;
  color: var(--ink-mute);
}
.nav__links { display: flex; gap: 32px; font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-soft); }
.nav__links a { position: relative; padding: 6px 0; transition: color .3s var(--easing); }
.nav__links a::after {
  content: ""; position: absolute; left: 0; right: 100%; bottom: 0;
  height: 1px; background: var(--teal);
  transition: right .4s var(--easing);
}
.nav__links a:hover { color: var(--ink); }
.nav__links a:hover::after { right: 0; }

.theme-toggle {
  display: flex; align-items: center; gap: 10px;
  background: none; border: 1px solid var(--line-strong);
  padding: 8px 14px 8px 10px; border-radius: 999px;
  color: var(--ink); cursor: pointer;
  font: inherit; font-size: 12px; letter-spacing: .18em; text-transform: uppercase;
  transition: border-color .3s, transform .3s var(--easing);
}
.theme-toggle:hover { transform: translateY(-1px); border-color: var(--ink); }
.theme-toggle__track {
  width: 28px; height: 16px; border-radius: 999px;
  background: var(--bg-quiet); position: relative;
  border: 1px solid var(--line-strong);
}
.theme-toggle__thumb {
  position: absolute; top: 1px; left: 1px;
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--teal);
  transition: transform .4s var(--easing);
}
[data-theme="dark"] .theme-toggle__thumb { transform: translateX(12px); }
@media (max-width: 880px) { .nav__name, .nav__links { display: none; } }

/* ─── Typography utilities ───────────────── */
.eyebrow { font-size: 11px; letter-spacing: .32em; text-transform: uppercase; color: var(--ink-soft); }
.eyebrow--mute { color: var(--ink-mute); }
.section-tag {
  font-size: 11px; letter-spacing: .36em; text-transform: uppercase;
  color: var(--ink-mute); margin: 0 0 48px;
  display: flex; align-items: center; gap: 14px;
}
.section-tag::before { content: ""; width: 28px; height: 1px; background: var(--ink-mute); }
.section-tag--light { color: rgba(255,255,255,.6); }
.section-tag--light::before { background: rgba(255,255,255,.6); }
.serif-title {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(40px, 6vw, 92px);
  line-height: 1.02; letter-spacing: -0.025em; margin: 0;
}
.serif-title em { font-style: italic; font-weight: 300; color: var(--teal); }

/* ─── 1 · HERO ───────────────────────────── */
.hero {
  position: relative;
  min-height: 100vh;
  padding: 140px clamp(20px, 5vw, 80px) 80px;
  display: flex; flex-direction: column;
  overflow: hidden;
}
.hero__ambient { position: absolute; inset: 0; pointer-events: none; }

/* Animated mesh blobs — slow, cinematic */
.mesh {
  position: absolute; border-radius: 50%; filter: blur(40px);
  mix-blend-mode: screen; opacity: .45;
  will-change: transform;
}
[data-theme="light"] .mesh { mix-blend-mode: multiply; opacity: .35; }
.mesh--a {
  width: 56vw; height: 56vw; top: -18vw; right: -10vw;
  background: radial-gradient(closest-side, color-mix(in oklab, var(--teal) 60%, transparent), transparent 70%);
  animation: meshA 28s var(--easing) infinite alternate;
}
.mesh--b {
  width: 48vw; height: 48vw; bottom: -16vw; left: -10vw;
  background: radial-gradient(closest-side, color-mix(in oklab, var(--navy) 55%, transparent), transparent 70%);
  animation: meshB 34s var(--easing) infinite alternate-reverse;
}
.mesh--c {
  width: 36vw; height: 36vw; top: 30%; left: 28%;
  background: radial-gradient(closest-side, color-mix(in oklab, var(--teal-soft) 50%, transparent), transparent 70%);
  animation: meshC 40s var(--easing) infinite alternate;
}
.mesh--d {
  width: 28vw; height: 28vw; bottom: 18%; right: 26%;
  background: radial-gradient(closest-side, color-mix(in oklab, #5b8cff 45%, transparent), transparent 70%);
  animation: meshD 46s var(--easing) infinite alternate-reverse;
}
@keyframes meshA { from { transform: translate(0,0) scale(1); } to { transform: translate(-6vw, 4vw) scale(1.15); } }
@keyframes meshB { from { transform: translate(0,0) scale(1); } to { transform: translate(5vw, -3vw) scale(1.1); } }
@keyframes meshC { from { transform: translate(-3vw,-2vw) scale(.9); } to { transform: translate(4vw, 3vw) scale(1.1); } }
@keyframes meshD { from { transform: translate(2vw,1vw) scale(1); } to { transform: translate(-4vw,-2vw) scale(1.18); } }

.hero__grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(to right, var(--line) 1px, transparent 1px),
    linear-gradient(to bottom, var(--line) 1px, transparent 1px);
  background-size: 88px 88px;
  mask-image: radial-gradient(ellipse at center, black 30%, transparent 75%);
  opacity: .35;
}

/* Floating particles */
.particles { position: absolute; inset: 0; }
.particles span {
  position: absolute; width: 4px; height: 4px; border-radius: 50%;
  background: color-mix(in oklab, var(--teal-soft) 80%, transparent);
  opacity: .55;
  will-change: transform;
}
.particles span:nth-child(1)  { left: 6%;  top: 90%; animation-delay:  -1s; }
.particles span:nth-child(2)  { left: 12%; top: 95%; animation-delay:  -4s; width: 3px; height: 3px; }
.particles span:nth-child(3)  { left: 22%; top: 88%; animation-delay:  -8s; }
.particles span:nth-child(4)  { left: 32%; top: 92%; animation-delay: -12s; width: 2px; height: 2px; }
.particles span:nth-child(5)  { left: 41%; top: 96%; animation-delay: -15s; }
.particles span:nth-child(6)  { left: 49%; top: 89%; animation-delay: -18s; width: 5px; height: 5px; }
.particles span:nth-child(7)  { left: 56%; top: 94%; animation-delay:  -2s; }
.particles span:nth-child(8)  { left: 63%; top: 91%; animation-delay:  -6s; }
.particles span:nth-child(9)  { left: 70%; top: 97%; animation-delay: -10s; width: 3px; height: 3px; }
.particles span:nth-child(10) { left: 76%; top: 88%; animation-delay: -13s; }
.particles span:nth-child(11) { left: 82%; top: 95%; animation-delay: -17s; width: 2px; height: 2px; }
.particles span:nth-child(12) { left: 88%; top: 90%; animation-delay: -20s; }
.particles span:nth-child(13) { left: 92%; top: 94%; animation-delay:  -3s; }
.particles span:nth-child(14) { left: 18%; top: 80%; animation-delay:  -9s; width: 2px; height: 2px; }
.particles span:nth-child(15) { left: 67%; top: 82%; animation-delay: -14s; }
@keyframes floatUp {
  0%   { transform: translateY(0) translateX(0); opacity: 0; }
  10%  { transform: translateY(-12vh) translateX(6px); opacity: .55; }
  90%  { transform: translateY(-90vh) translateX(-8px); opacity: .5; }
  100% { transform: translateY(-110vh) translateX(40px); opacity: 0; }
}
.hero.in-view .particles span { animation: floatUp 22s linear infinite; }

/* Diagonal light streaks */
.streaks { position: absolute; inset: 0; overflow: hidden; }
.streaks i {
  position: absolute;
  width: 220%; height: 1px;
  background: linear-gradient(90deg, transparent, color-mix(in oklab, var(--teal-soft) 70%, transparent), transparent);
  opacity: .25;
  transform-origin: left center;
  animation: streak 18s linear infinite;
}
.streaks i:nth-child(1) { top: 18%; transform: rotate(-12deg); animation-delay: -3s; }
.streaks i:nth-child(2) { top: 52%; transform: rotate(-8deg);  animation-delay: -9s; opacity: .15; }
.streaks i:nth-child(3) { top: 78%; transform: rotate(-14deg); animation-delay: -14s; }
@keyframes streak {
  0%   { transform: translateX(-60%) rotate(-12deg); }
  100% { transform: translateX(20%) rotate(-12deg); }
}

.hero__meta {
  display: flex; justify-content: space-between; align-items: center;
  position: relative; z-index: 2;
}

.hero__stage {
  position: relative; z-index: 2;
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: clamp(24px, 5vw, 80px);
  align-items: end;
  padding-top: clamp(40px, 6vw, 80px);
}
@media (max-width: 920px) {
  .hero__stage { grid-template-columns: 1fr; }
}

/* ─── Doctor portrait — cinematic poster ─── */
.hero__portrait {
  margin: 0; position: relative;
  transform: translateY(40px) scale(.98);
  opacity: 0;
}
.hero__portrait.in-view {
  opacity: 1; transform: translateY(0) scale(1);
  transition: opacity 1.4s var(--easing), transform 1.4s var(--easing);
}
.hero__portrait-stage {
  position: relative;
  aspect-ratio: 4 / 5;
  width: 100%;
  min-height: 70vh;
  display: flex; align-items: flex-end; justify-content: center;
  isolation: isolate;
}

/* Layered ring — concentric clinical halo */
.portrait-ring {
  position: absolute; inset: 4% 6%;
  border-radius: 50%;
  background:
    conic-gradient(from 200deg,
      color-mix(in oklab, var(--teal) 24%, transparent),
      transparent 40%,
      color-mix(in oklab, var(--navy) 32%, transparent),
      transparent 80%,
      color-mix(in oklab, var(--teal) 24%, transparent));
  filter: blur(28px);
  opacity: .9;
  z-index: -3;
  animation: spinSlow 60s linear infinite;
}
@keyframes spinSlow { to { transform: rotate(360deg); } }

.portrait-aura {
  position: absolute; inset: 0;
  background:
    radial-gradient(45% 55% at 50% 38%,
      color-mix(in oklab, var(--teal) 45%, transparent) 0%,
      color-mix(in oklab, var(--teal) 14%, transparent) 35%,
      transparent 65%),
    radial-gradient(70% 80% at 50% 60%,
      color-mix(in oklab, var(--navy) 30%, transparent), transparent 70%);
  filter: blur(10px);
  z-index: -2;
}
.portrait-plinth {
  position: absolute; left: 4%; right: 4%; bottom: 2%;
  height: 18%;
  background: radial-gradient(60% 100% at 50% 0%,
    color-mix(in oklab, var(--ink) 60%, transparent), transparent 70%);
  filter: blur(22px);
  z-index: -1;
}

.hero__portrait-img {
  width: 100%; height: 100%;
  object-fit: contain;
  object-position: bottom center;
  filter: drop-shadow(0 36px 50px rgba(12,35,64,.40))
          drop-shadow(0 10px 18px rgba(12,35,64,.25));
  transition: transform 1.2s var(--easing), filter .8s var(--easing);
  position: relative; z-index: 1;
}
[data-theme="dark"] .hero__portrait-img {
  filter: drop-shadow(0 36px 60px rgba(0,0,0,.7))
          drop-shadow(0 0 40px color-mix(in oklab, var(--teal) 28%, transparent));
}
.hero__portrait:hover .hero__portrait-img { transform: translateY(-6px) scale(1.02); }

/* Premium glass reflection sheen overlay */
.portrait-glass {
  position: absolute; inset: 0;
  background: linear-gradient(115deg,
    transparent 40%,
    rgba(255,255,255,.10) 48%,
    rgba(255,255,255,.22) 50%,
    rgba(255,255,255,.10) 52%,
    transparent 60%);
  mix-blend-mode: overlay;
  pointer-events: none;
  z-index: 2;
  animation: sheen 9s var(--easing) infinite;
}
@keyframes sheen {
  0%, 100% { transform: translateX(-30%); opacity: 0; }
  50%      { transform: translateX(30%);  opacity: 1; }
}

/* Floating glass info cards */
.float-card {
  position: absolute; z-index: 3;
  background: color-mix(in oklab, var(--bg-elev) 65%, transparent);
  backdrop-filter: blur(18px) saturate(150%);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  border: 1px solid var(--glass-stroke);
  border-radius: 10px;
  padding: 14px 18px;
  display: flex; flex-direction: column; gap: 4px;
  min-width: 150px;
  box-shadow: 0 20px 50px -20px rgba(12,35,64,.35);
  animation: drift 9s var(--easing) infinite alternate;
}
.float-card__pre {
  font-size: 9px; letter-spacing: .32em; text-transform: uppercase;
  color: var(--ink-mute);
}
.float-card__val {
  font-family: var(--serif); font-size: 22px; line-height: 1;
  color: var(--ink); letter-spacing: -.01em;
}
.float-card__meta {
  font-size: 10px; letter-spacing: .08em;
  color: var(--ink-soft);
}
.float-card__pulse {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 0 0 color-mix(in oklab, var(--teal) 70%, transparent);
  animation: pulse 1.8s ease-out infinite;
  margin-bottom: 2px;
}
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 color-mix(in oklab, var(--teal) 70%, transparent); }
  100% { box-shadow: 0 0 0 14px color-mix(in oklab, var(--teal) 0%, transparent); }
}
.float-card--a { top: 8%;  left: -6%;  animation-delay: 0s; }
.float-card--b { top: 36%; right: -8%; animation-delay: -3s; }
.float-card--c { bottom: 12%; left: -8%; animation-delay: -6s; }
@keyframes drift {
  from { transform: translateY(0); }
  to   { transform: translateY(-10px); }
}
@media (max-width: 760px) {
  .float-card { display: none; }
  .hero__portrait-stage { min-height: 60vh; }
}

.portrait-tag {
  position: absolute; right: -2px; top: 8%;
  writing-mode: vertical-rl;
  font-family: var(--serif); font-style: italic;
  font-size: 11px; letter-spacing: .42em; text-transform: uppercase;
  color: var(--ink-mute);
  padding: 14px 4px;
  border-left: 1px solid var(--line-strong);
  z-index: 3;
}
.hero__portrait figcaption {
  position: absolute; left: -8px; bottom: -18px;
  background: var(--bg-elev);
  padding: 14px 22px;
  border: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 4px;
  transform: rotate(0.5deg);
  z-index: 4;
}
.hero__sig { font-family: var(--serif); font-size: 17px; }
.hero__sig-sub { font-size: 10px; letter-spacing: .28em; text-transform: uppercase; color: var(--ink-mute); }

.hero__words { align-self: end; }
.display {
  font-family: var(--serif); font-weight: 300;
  font-size: clamp(44px, 8vw, 132px);
  line-height: 0.96;
  letter-spacing: -0.035em;
  margin: 0 0 36px;
}
.display__line { display: block; overflow: hidden; }
.display__line span {
  display: inline-block;
  transform: translateY(110%);
  transition: transform 1.1s var(--easing);
  transition-delay: calc(var(--i, 0) * 120ms);
}
.display__line--italic span { font-style: italic; font-weight: 400; }
.display__line--accent span { color: var(--teal); font-style: italic; font-weight: 400; }
.display__line:nth-child(1) span { --i: 1; }
.display__line:nth-child(2) span { --i: 2; }
.display__line:nth-child(3) span { --i: 3; }
.display__line:nth-child(4) span { --i: 4; }
.is-loaded .display__line span { transform: translateY(0); }

.hero__sub {
  max-width: 56ch;
  font-size: clamp(15px, 1.15vw, 18px);
  line-height: 1.6;
  color: var(--ink-soft);
  margin: 0 0 40px;
}
.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; }

/* ─── Buttons ────────────────────────────── */
.btn {
  position: relative; display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 22px; border-radius: 999px;
  font-size: 13px; letter-spacing: .18em; text-transform: uppercase;
  border: 1px solid var(--line-strong);
  background: var(--glass);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  color: var(--ink);
  overflow: hidden;
  transition: transform .4s var(--easing), border-color .4s, color .4s, background .4s;
}
.btn::before {
  content: ""; position: absolute; inset: 0;
  background: var(--teal);
  transform: translateY(101%);
  transition: transform .5s var(--easing);
  z-index: -1;
}
.btn:hover { transform: translateY(-2px); color: #fff; border-color: var(--teal); }
.btn:hover::before { transform: translateY(0); }
.btn__arrow { transition: transform .4s var(--easing); font-style: normal; }
.btn:hover .btn__arrow { transform: translateX(4px); }
.btn--solid { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.btn--solid::before { background: var(--teal); }
.btn--ghost { background: transparent; }

/* ─── Ticker ─────────────────────────────── */
.hero__ticker {
  position: absolute; bottom: 0; left: 0; right: 0;
  display: flex; gap: 36px; padding: 22px 0;
  border-top: 1px solid var(--line);
  font-size: 11px; letter-spacing: .32em; text-transform: uppercase;
  color: var(--ink-mute);
  white-space: nowrap;
  overflow: hidden;
  mask-image: linear-gradient(to right, transparent, black 8%, black 92%, transparent);
}
.hero__ticker > * { animation: tick 38s linear infinite; }
@keyframes tick { to { transform: translateX(-100%); } }

/* ─── 2 · EVOLUTION ──────────────────────── */
.evolution {
  position: relative;
  padding: clamp(120px, 16vw, 220px) clamp(20px, 5vw, 80px);
  background: var(--grad-surface);
}
.evolution__stack {
  display: flex; flex-direction: column; gap: clamp(40px, 8vw, 120px);
  max-width: 1300px; margin: 0 auto;
}
.phrase {
  font-family: var(--serif); font-weight: 300;
  font-size: clamp(40px, 8vw, 132px);
  line-height: 1.02; letter-spacing: -.035em;
  margin: 0;
  opacity: 0; transform: translateY(40px);
  transition: opacity 1.2s var(--easing), transform 1.2s var(--easing);
}
.phrase.in-view { opacity: 1; transform: translateY(0); }
.phrase em { font-style: italic; color: var(--teal); font-weight: 400; }
.phrase--1 { padding-left: 0; }
.phrase--2 { padding-left: 12vw; }
.phrase--3 { padding-left: 4vw; text-align: right; }
.phrase--4 { padding-left: 20vw; }
@media (max-width: 720px) {
  .phrase--2, .phrase--3, .phrase--4 { padding-left: 0; text-align: left; }
}

/* ─── 3 · FOCUS · INTERACTIVE EXPERTISE ───── */
.focus { padding: clamp(100px, 14vw, 200px) clamp(20px, 5vw, 80px); }
.focus__head { max-width: 1300px; margin: 0 auto 100px; }
.focus__lede {
  margin-top: 28px; max-width: 56ch;
  font-size: 17px; line-height: 1.6; color: var(--ink-soft);
}
.modules { max-width: 1300px; margin: 0 auto; }

.module {
  position: relative;
  display: flex; flex-wrap: wrap; gap: clamp(20px, 4vw, 60px);
  align-items: center;
  padding: 60px 0;
  border-top: 1px solid var(--line);
  transition: background .6s var(--easing);
}
.modules .module:last-of-type { border-bottom: 1px solid var(--line); }
.module__visual { flex: 0 0 45%; order: -1; }
.module__body { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; justify-content: center; }
.module__body h3 {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(32px, 4.4vw, 64px);
  line-height: 1; letter-spacing: -.025em;
  margin: 0 0 24px;
  transition: transform .6s var(--easing), color .4s;
}
.module__body p {
  max-width: 46ch; font-size: 16px; line-height: 1.65;
  color: var(--ink-soft); margin: 0 0 28px;
}
.module__visual {
  position: relative;
  background-size: cover; background-position: center;
  border-radius: 4px;
  overflow: hidden;
  transition: transform .8s var(--easing);
  width: 100%;
  aspect-ratio: 5 / 4;
  will-change: transform;
}
.module__visual::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(12,35,64,.25), transparent 60%);
}
.module:hover .module__visual { transform: scale(1.02); }
.module:hover .module__body h3 { transform: translateX(8px); color: var(--teal); }

.module__visual--01 { background-image: url('assets/Implantology.png'); }
.module__visual--02 { background-image: url('assets/Biomimetic & Restorative.png'); }
.module__visual--03 { background-image: url('assets/Full Mouth Rehabilitation.png'); }
.module__visual--04 { background-image: url('assets/Orthodontics.png'); }
.module__visual--05 { background-image: url('assets/Bps Dentures.png'); }

/* Toggle button */
.module__toggle {
  align-self: flex-start;
  display: inline-flex; align-items: center; gap: 14px;
  padding: 12px 18px 12px 20px;
  background: transparent;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--ink);
  font: inherit; font-size: 11px; letter-spacing: .26em; text-transform: uppercase;
  cursor: pointer;
  transition: background .4s var(--easing), border-color .4s, color .4s, transform .4s var(--easing);
}
.module__toggle:hover { background: var(--ink); color: var(--bg); border-color: var(--ink); transform: translateY(-2px); }
.module__toggle-icon {
  display: inline-grid; place-items: center;
  width: 22px; height: 22px; border-radius: 50%;
  border: 1px solid currentColor;
  font-style: normal; font-size: 14px; line-height: 1;
  transition: transform .5s var(--easing);
}
.module.is-open .module__toggle-icon { transform: rotate(45deg); }
.module.is-open .module__toggle-label::before {
  content: "Close "; opacity: .7;
}

/* Expanded cinematic panel */
.module__expand {
  flex: 0 0 100%;
  margin-top: 0;
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transition: max-height .9s var(--easing), opacity .6s var(--easing), margin-top .6s var(--easing);
}
.module.is-open .module__expand {
  max-height: 3000px;
  opacity: 1;
  margin-top: 40px;
}
.expand {
  position: relative;
  padding: clamp(28px, 4vw, 56px);
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow-lg);
  display: flex; flex-direction: column; gap: 48px;
  overflow: hidden;
}
.expand::before {
  content: ""; position: absolute; inset: 0;
  background: var(--grad-aurora);
  opacity: .35; pointer-events: none;
}
.expand__head {
  display: flex; justify-content: space-between; align-items: baseline;
  flex-wrap: wrap; gap: 16px;
  position: relative;
}
.expand__pre {
  font-size: 10px; letter-spacing: .36em; text-transform: uppercase;
  color: var(--teal);
}
.expand__meta {
  font-size: 11px; letter-spacing: .24em; text-transform: uppercase;
  color: var(--ink-mute);
}

/* Block heading */
.expand__sec-title {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(20px, 2vw, 26px);
  margin: 0 0 18px;
  display: flex; align-items: center; gap: 14px;
  color: var(--ink);
}
.expand__sec-title::before {
  content: ""; width: 22px; height: 1px; background: var(--teal);
}

/* Horizontal cinematic gallery */
.gallery {
  position: relative;
}
.gallery__rail {
  display: flex; gap: 18px;
  overflow-x: auto; overflow-y: hidden;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
  padding-bottom: 8px;
  cursor: grab;
  touch-action: pan-x;
}
.gallery__rail.is-dragging { cursor: grabbing; }
.gallery__rail::-webkit-scrollbar { display: none; }
.gallery__item {
  flex: 0 0 clamp(220px, 28vw, 360px);
  aspect-ratio: 4 / 5;
  scroll-snap-align: start;
  position: relative;
  border-radius: 6px;
  overflow: hidden;
  background-size: cover; background-position: center;
  cursor: grab;
  border: 1px solid var(--line);
  user-select: none;
  -webkit-user-select: none;
  filter: grayscale(1);
  transition: filter .5s ease;
}
.gallery__rail.is-dragging .gallery__item { cursor: grabbing; }
.gallery__item--rotate { overflow: hidden; }
@media (hover: hover) {
  .gallery__item:hover { filter: grayscale(0); }
}
@media (hover: none) {
  .gallery__item { filter: none; }
}
.gallery__item::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 50%, rgba(0,0,0,.55));
  transition: opacity .5s ease;
}
@media (hover: hover) {
  .gallery__item:hover::after { opacity: .3; }
}
.gallery__item-cap {
  position: absolute; left: 16px; right: 16px; bottom: 14px;
  z-index: 2; color: #fff;
  font-size: 11px; letter-spacing: .24em; text-transform: uppercase;
}

/* Before / After comparison slider */
.ba {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 6px;
  overflow: hidden;
  user-select: none;
  border: 1px solid var(--line);
  background: #000;
}
.ba__img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  background-size: cover; background-position: center;
}
.ba__before { filter: grayscale(1); }
.ba__after { clip-path: inset(0 0 0 var(--ba-pos, 50%)); }
.ba__handle {
  position: absolute; top: 0; bottom: 0;
  left: var(--ba-pos, 50%);
  width: 2px;
  background: #fff;
  cursor: ew-resize;
  z-index: 3;
  box-shadow: 0 0 0 1px rgba(0,0,0,.3), 0 0 30px rgba(255,255,255,.4);
}
.ba__handle::after {
  content: "⇋";
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 42px; height: 42px; border-radius: 50%;
  background: #fff; color: var(--ink);
  display: grid; place-items: center;
  font-size: 18px; font-weight: 600;
  box-shadow: 0 6px 20px rgba(0,0,0,.4);
}
.ba__label {
  position: absolute; top: 14px;
  padding: 6px 12px; border-radius: 999px;
  background: rgba(0,0,0,.55);
  color: #fff;
  font-size: 10px; letter-spacing: .3em; text-transform: uppercase;
  z-index: 2;
}
.ba__label--before { left: 14px; }
.ba__label--after  { right: 14px; }


/* Mobile module layout */
@media (max-width: 820px) {
  .module { gap: 12px; padding: 40px 0; }
  .module__visual { flex: 0 0 100%; aspect-ratio: 4 / 3; order: -1; }
  .module__body { flex: 0 0 100%; }
  .module__body h3 { font-size: clamp(26px, 6vw, 32px); margin: 0 0 16px; }
  .module__body p { font-size: 14px; margin: 0 0 20px; }
  .module__expand { flex: 0 0 100%; }
  .expand { padding: 20px; gap: 32px; }
  .expand__head { flex-direction: column; align-items: flex-start; }
  .gallery__item { flex: 0 0 clamp(160px, 40vw, 220px); }
  .ba { aspect-ratio: 4 / 3; }
  .certs { grid-template-columns: 1fr; gap: 16px; }
  .focus__head { margin-bottom: 60px; }
  .focus__lede { font-size: 15px; }
}
@media (max-width: 480px) {
  .module { padding: 28px 0; }
  .expand { padding: 16px; gap: 24px; }
  .gallery__item { flex: 0 0 140px; }
  .module__body h3 { font-size: 24px; }
}

/* ─── Certifications carousel ────────────── */
.certs-showcase {
  padding: clamp(24px, 4vw, 60px) clamp(20px, 5vw, 80px) clamp(80px, 12vw, 160px);
  background: var(--bg-quiet);
  overflow: hidden;
}
.certs-showcase__title { margin-bottom: 48px; }
.certs-showcase__wrap {
  width: 100%;
  overflow: hidden;
  mask-image: linear-gradient(to right, transparent, black 6%, black 94%, transparent);
}
.certs-showcase__track {
  display: flex;
  gap: 28px;
  width: fit-content;
  animation: scrollCerts 25s linear infinite;
}
.certs-showcase:hover .certs-showcase__track,
.certs-showcase:focus-within .certs-showcase__track {
  animation-play-state: paused;
}
@keyframes scrollCerts {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
.certs-showcase__card {
  flex: 0 0 300px;
  aspect-ratio: 7 / 5;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--bg-elev);
  padding: 0;
  cursor: zoom-in;
  transition: transform .5s var(--easing), box-shadow .5s var(--easing);
  position: relative;
}
.certs-showcase__card:hover {
  transform: translateY(-6px) scale(1.02);
  box-shadow: 0 24px 50px -16px rgba(0,0,0,.3);
  z-index: 2;
}
.certs-showcase__card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.certs-showcase__card-name {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 40px 14px 14px;
  background: linear-gradient(transparent, rgba(0,0,0,.7));
  color: #fff;
  font-size: 11px;
  letter-spacing: .16em;
  text-transform: uppercase;
  text-align: center;
  pointer-events: none;
}
.certs-showcase__hint {
  text-align: center;
  margin-top: 36px;
  font-size: 11px;
  letter-spacing: .32em;
  text-transform: uppercase;
  color: var(--ink-mute);
}
@media (max-width: 820px) {
  .certs-showcase__card { flex: 0 0 240px; }
  .certs-showcase__track { gap: 18px; animation-duration: 20s; }
}
@media (max-width: 480px) {
  .certs-showcase__card { flex: 0 0 200px; }
  .certs-showcase__track { gap: 14px; animation-duration: 16s; }
}

/* ─── 4 · MASTERY ────────────────────────── */
.mastery {
  padding: clamp(100px, 14vw, 200px) 0 clamp(60px, 10vw, 100px);
  background: var(--bg-quiet);
  overflow: hidden;
}
.mastery__head { max-width: 1300px; margin: 0 auto 80px; padding: 0 clamp(20px, 5vw, 80px); }
.mastery__lede { max-width: 56ch; margin-top: 28px; color: var(--ink-soft); font-size: 17px; line-height: 1.6; }
.mastery__track {
  overflow-x: auto; overflow-y: hidden; scroll-snap-type: x proximity; cursor: grab;
  scrollbar-width: none; padding: 0 clamp(20px, 5vw, 80px);
  touch-action: pan-x;
}
.mastery__track::-webkit-scrollbar { display: none; }
.mastery__track.is-dragging { cursor: grabbing; }
.mastery__rail { display: inline-flex; gap: 22px; padding-bottom: 30px; }
.cred {
  flex: 0 0 320px; scroll-snap-align: start;
  padding: 32px 28px; background: var(--bg-elev);
  border: 1px solid var(--line); border-radius: 6px;
  display: flex; flex-direction: column; gap: 18px;
  transition: transform .5s var(--easing), border-color .5s;
  position: relative; min-height: 240px;
  will-change: transform;
}
.cred:hover {
  transform: translateY(-6px); border-color: var(--teal);
}
.cred__year { font-family: var(--serif); font-size: 28px; color: var(--teal); }
.cred h4 { font-family: var(--serif); font-weight: 400; font-size: 24px; line-height: 1.15; margin: 0; letter-spacing: -.01em; }
.cred p { font-size: 13px; letter-spacing: .04em; line-height: 1.5; color: var(--ink-mute); margin: 0; }
.mastery__hint {
  text-align: center; margin-top: 36px;
  font-size: 11px; letter-spacing: .32em; text-transform: uppercase;
  color: var(--ink-mute);
}

/* ─── 5 · TRUST ──────────────────────────── */
.trust { padding: clamp(120px, 16vw, 220px) clamp(20px, 5vw, 80px); background: var(--grad-surface); }
.trust .section-tag { max-width: 1300px; margin-inline: auto; }
.trust__panel {
  max-width: 1100px; margin: 0 auto; position: relative;
  background: var(--glass);
  backdrop-filter: blur(12px) saturate(120%);
  -webkit-backdrop-filter: blur(12px) saturate(120%);
  border: 1px solid var(--glass-stroke);
  border-radius: 8px;
  padding: clamp(40px, 6vw, 80px);
  display: grid; grid-template-columns: auto 1fr; gap: clamp(32px, 5vw, 64px);
  align-items: start;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  will-change: filter;
}
.trust__panel::before {
  content: ""; position: absolute; inset: 0;
  background: var(--grad-aurora); opacity: .6;
  pointer-events: none;
}
.trust__seal { position: relative; }
.trust__seal svg { width: 96px; height: 96px; stroke: var(--teal); stroke-width: 1.2; fill: none; }
.trust__seal svg circle:first-child { stroke: var(--metal-2); stroke-dasharray: 4 3; }
.trust__body { position: relative; }
.trust__pre { font-size: 11px; letter-spacing: .36em; text-transform: uppercase; color: var(--ink-mute); margin: 0 0 18px; }
.trust__title { font-family: var(--serif); font-weight: 400; font-size: clamp(28px, 3.6vw, 52px); line-height: 1.05; letter-spacing: -.02em; margin: 0 0 36px; }
.trust__title em { font-style: italic; color: var(--teal); font-weight: 300; }
.trust__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 28px 40px; margin: 0 0 32px; }
.trust__grid dt { font-size: 11px; letter-spacing: .26em; text-transform: uppercase; color: var(--ink-mute); margin-bottom: 8px; }
.trust__grid dd { margin: 0; font-family: var(--serif); font-size: 19px; line-height: 1.3; }
.trust__note { font-size: 13px; line-height: 1.6; color: var(--ink-soft); margin: 0; padding-top: 24px; border-top: 1px solid var(--line); max-width: 70ch; }
@media (max-width: 720px) { .trust__panel { grid-template-columns: 1fr; } .trust__grid { grid-template-columns: 1fr; } }

/* ─── 6 · HUMAN ──────────────────────────── */
.human {
  position: relative;
  padding: clamp(140px, 20vw, 260px) clamp(20px, 5vw, 80px);
  color: #f5f3ee; text-align: center;
  overflow: hidden;
  isolation: isolate;
}
.human__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -2;
}
.human__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(11,16,20,.6), rgba(11,16,20,.8));
  z-index: -1;
}
.human__inner { max-width: 900px; margin: 0 auto; position: relative; }
.human__title { font-family: var(--serif); font-weight: 300; font-size: clamp(40px, 6.4vw, 96px); line-height: 1.05; letter-spacing: -.03em; margin: 0 0 32px; }
.human__title em { font-style: italic; color: var(--teal-soft); font-weight: 400; }
.human__body { font-size: 17px; line-height: 1.75; color: rgba(245,243,238,.78); max-width: 56ch; margin: 0 auto; }

/* ─── 7 · CONTACT ────────────────────────── */
.contact { position: relative; padding: clamp(120px, 16vw, 220px) clamp(20px, 5vw, 80px); overflow: hidden; }
.contact__ambient { position: absolute; inset: 0; pointer-events: none; }
.contact__glow { position: absolute; border-radius: 50%; filter: blur(100px); opacity: .5; }
.contact__glow--a { width: 50vw; height: 50vw; top: -10vw; left: -15vw; background: radial-gradient(closest-side, color-mix(in oklab, var(--teal) 35%, transparent), transparent); }
.contact__glow--b { width: 50vw; height: 50vw; bottom: -15vw; right: -10vw; background: radial-gradient(closest-side, color-mix(in oklab, var(--navy) 35%, transparent), transparent); }
.contact__title { position: relative; max-width: 1300px; margin: 0 auto 80px; }
.contact .section-tag { position: relative; max-width: 1300px; margin-inline: auto; }
.contact__grid { position: relative; max-width: 1300px; margin: 0 auto; display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.contact__card {
  position: relative; padding: 40px 36px;
  background: var(--glass);
  backdrop-filter: blur(12px) saturate(120%);
  -webkit-backdrop-filter: blur(12px) saturate(120%);
  border: 1px solid var(--glass-stroke);
  border-radius: 6px;
  display: flex; flex-direction: column; gap: 10px;
  min-height: 220px;
  transition: transform .5s var(--easing), border-color .5s, background .5s;
  overflow: hidden;
}
.contact__card::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(circle at var(--mx, 50%) var(--my, 50%),
              color-mix(in oklab, var(--teal) 22%, transparent), transparent 50%);
  opacity: 0; transition: opacity .5s; pointer-events: none;
}
.contact__card:hover { transform: translateY(-4px); border-color: var(--teal); }
.contact__card:hover::before { opacity: 1; }
.contact__card-pre { font-size: 11px; letter-spacing: .32em; text-transform: uppercase; color: var(--ink-mute); }
.contact__card-title { font-family: var(--serif); font-weight: 400; font-size: clamp(28px, 3vw, 42px); line-height: 1.1; letter-spacing: -.015em; }
.contact__card-meta { margin-top: auto; font-size: 13px; color: var(--ink-soft); letter-spacing: .02em; }
.contact__card-arrow { position: absolute; top: 32px; right: 32px; font-style: normal; font-size: 20px; transition: transform .5s var(--easing); }
.contact__card:hover .contact__card-arrow { transform: translate(4px, -4px); color: var(--teal); }
.contact__card--solid { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.contact__card--solid .contact__card-pre,
.contact__card--solid .contact__card-meta { color: color-mix(in oklab, var(--bg) 70%, transparent); }
@media (max-width: 720px) { .contact__grid { grid-template-columns: 1fr; } }

/* ─── Footer ─────────────────────────────── */
.foot { padding: 40px clamp(20px, 5vw, 80px); border-top: 1px solid var(--line); font-size: 12px; letter-spacing: .12em; color: var(--ink-mute); }
.foot__row { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.foot__row--fine { margin-top: 22px; padding-top: 22px; border-top: 1px solid var(--line); font-size: 11px; }
.foot__mark { font-family: var(--serif); font-size: 14px; color: var(--ink); letter-spacing: .04em; }

/* ─── Lightbox ───────────────────────────── */
.lightbox {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(6,10,14,.86);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  display: grid; place-items: center;
  padding: clamp(20px, 4vw, 60px);
  opacity: 0; visibility: hidden;
  transition: opacity .5s var(--easing), visibility .5s;
}
.lightbox.is-open { opacity: 1; visibility: visible; }
.lightbox__stage {
  position: relative; max-width: min(1100px, 92vw); max-height: 86vh;
  display: flex; flex-direction: column; gap: 14px; align-items: center;
  transform: scale(.96); transition: transform .6s var(--easing);
}
.lightbox.is-open .lightbox__stage { transform: scale(1); }
.lightbox__img {
  max-width: 100%; max-height: 78vh;
  border-radius: 6px;
  box-shadow: 0 40px 100px -20px rgba(0,0,0,.7);
  object-fit: contain;
}
.lightbox__cap {
  color: rgba(255,255,255,.78);
  font-size: 12px; letter-spacing: .26em; text-transform: uppercase;
  margin: 0;
}
.lightbox__close {
  position: absolute; top: 24px; right: 28px;
  width: 48px; height: 48px; border-radius: 50%;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.2);
  color: #fff; font-size: 28px; line-height: 1;
  cursor: pointer;
  transition: transform .4s var(--easing), background .4s;
}
.lightbox__close:hover { background: rgba(255,255,255,.2); transform: rotate(90deg); }

/* ─── Reveals ────────────────────────────── */
.reveal { will-change: opacity, transform; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
}
