:root {
  --porcelain: #ffffff;
  --mist: #f2f6fb;
  --mist-deep: #e3ecf6;
  --slate: #102033;
  --slate-soft: #4c6178;
  --cobalt: #0560b0;
  --cobalt-dark: #044682;
  --cobalt-tint: #d8e8f8;
  --line: rgba(16, 32, 51, 0.11);
  --display: "Fraunces", Georgia, serif;
  --body: "DM Sans", system-ui, sans-serif;
  --radius: 22px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --wrap: min(1220px, 100% - 40px);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; overflow-x: clip; }
body {
  margin: 0;
  font: 400 17px/1.64 var(--body);
  color: var(--slate);
  background: var(--porcelain);
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}
::selection { background: var(--cobalt); color: #fff; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3, h4 {
  font-family: var(--display);
  font-weight: 500;
  letter-spacing: -0.025em;
  line-height: 1.06;
  margin: 0;
}
p { margin: 0; }
.wrap { width: var(--wrap); margin-inline: auto; }
.skip { position: absolute; left: -9999px; }
.skip:focus {
  position: fixed; left: 16px; top: 16px; z-index: 200;
  background: var(--cobalt); color: #fff; padding: 12px 18px; border-radius: 99px; font-weight: 600;
}

/* Preloader */
.ed-loader {
  position: fixed; inset: 0; z-index: 100;
  background: var(--porcelain); color: var(--slate);
  display: grid; place-items: center;
}
.ed-loader-inner { display: grid; gap: 16px; justify-items: center; text-align: center; }
.ed-loader-word { font-family: var(--display); font-size: clamp(1.4rem, 3vw, 2rem); }
.ed-loader-arc { width: 140px; height: 42px; }

/* Header */
.ed-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 60;
  padding: 14px 0;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease);
}
.ed-header.scrolled { box-shadow: 0 12px 30px -24px rgba(16, 32, 51, 0.35); }
.ed-header.hide { transform: translateY(-105%); }
.ed-header .wrap { display: flex; align-items: center; gap: 18px; }

.ed-brand {
  display: inline-flex; align-items: center; gap: 12px;
  text-decoration: none; min-height: 44px;
}
.ed-brand svg { width: 52px; height: 32px; flex-shrink: 0; }
.ed-brand-text { line-height: 1.05; }
.ed-brand-text strong {
  display: block; font-family: var(--display); font-weight: 600;
  font-size: 1.15rem; color: var(--slate);
}
.ed-brand-text span {
  font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--slate-soft);
}

.ed-nav { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.ed-nav a {
  text-decoration: none; font-size: 0.94rem; font-weight: 500;
  padding: 10px 15px; min-height: 44px; display: inline-flex; align-items: center;
  border-radius: 99px; transition: background-color 0.25s, color 0.25s;
}
.ed-nav a:hover, .ed-nav a[aria-current="page"] {
  background: var(--cobalt-tint); color: var(--cobalt-dark);
}
.ed-tel {
  text-decoration: none; font-weight: 600; font-size: 0.94rem;
  color: var(--cobalt); padding: 10px 10px; min-height: 44px;
  display: inline-flex; align-items: center; white-space: nowrap;
}

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 46px; padding: 12px 22px; border-radius: 99px; border: 0;
  background: var(--cobalt); color: #fff; font: 600 0.94rem var(--body);
  text-decoration: none; cursor: pointer;
  transition: transform 0.25s var(--ease), background-color 0.25s, box-shadow 0.25s;
}
.btn:hover {
  transform: translateY(-2px); background: var(--cobalt-dark);
  box-shadow: 0 12px 24px -10px rgba(5, 96, 176, 0.45);
}
.btn.soft {
  background: var(--mist); color: var(--slate);
  box-shadow: inset 0 0 0 1px var(--line);
}
.btn.soft:hover { background: var(--mist-deep); box-shadow: inset 0 0 0 1px var(--cobalt); }
.btn:focus-visible, a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--cobalt); outline-offset: 2px;
}

.ed-menu-btn {
  display: none; width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid var(--line); background: var(--porcelain); color: var(--slate);
  cursor: pointer; align-items: center; justify-content: center;
  flex-direction: column; gap: 5px; padding: 0;
}
.ed-menu-btn span { width: 18px; height: 2px; background: currentColor; }

/* Architectural Split Hero */
.ed-hero {
  min-height: 100svh;
  padding: 112px 0 64px;
  background: linear-gradient(180deg, var(--mist) 0%, var(--porcelain) 100%);
  display: flex; align-items: center; position: relative; overflow: hidden;
}
.ed-hero-grid {
  display: grid; grid-template-columns: 1.05fr 0.95fr;
  gap: 48px; align-items: center;
}
.ed-hero h1 {
  font-size: clamp(2.7rem, 5.6vw, 4.9rem);
  margin-bottom: 22px; color: var(--slate);
}
.ed-hero h1 em { font-style: italic; color: var(--cobalt); font-weight: 400; }
.ed-hero h1 .ln { display: block; overflow: hidden; }
.ed-hero h1 .ln > span { display: block; }
.ed-hero-lead {
  font-size: clamp(1.05rem, 1.35vw, 1.2rem);
  color: var(--slate-soft); max-width: 48ch; margin-bottom: 30px;
}
.ed-ctas { display: flex; flex-wrap: wrap; gap: 12px; }
.ed-hero-meta {
  display: flex; flex-wrap: wrap; gap: 24px; margin-top: 34px;
  padding-top: 24px; border-top: 1px solid var(--line);
  font-size: 0.9rem; color: var(--slate-soft);
}
.ed-hero-meta strong { display: block; color: var(--slate); font-size: 0.98rem; }

.ed-hero-sculpture {
  position: relative; aspect-ratio: 4 / 3.6;
  background: var(--porcelain); border: 1px solid var(--line);
  border-radius: 28px; padding: 20px; overflow: hidden;
  box-shadow: 0 28px 60px -36px rgba(16, 32, 51, 0.28);
}
.ed-hero-sculpture svg { width: 100%; height: 100%; }
.ed-hero-sculpture img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: 28px;
}

/* Statement & Counters */
.pad { padding: clamp(72px, 8.5vw, 124px) 0; }
.ed-statement {
  font-family: var(--display); font-size: clamp(1.75rem, 3.2vw, 2.75rem);
  line-height: 1.2; max-width: 30ch; color: var(--slate);
}
.ed-statement .w { opacity: 0.25; transition: opacity 0.25s; }
.ed-statement .w.on { opacity: 1; }

.ed-metrics {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 20px; margin-top: 48px;
}
.ed-metric {
  background: var(--mist); border-radius: var(--radius); padding: 28px;
  border: 1px solid var(--line);
}
.ed-metric b {
  display: block; font-family: var(--display);
  font-size: clamp(2.1rem, 3.6vw, 3rem); color: var(--cobalt);
  line-height: 1; margin-bottom: 8px;
}
.ed-metric span { color: var(--slate-soft); font-size: 0.95rem; }

/* Signature Scroll: Pinned Clinic Evolution */
.ed-evo {
  background: var(--slate); color: #fff;
  padding: clamp(64px, 7vw, 96px) 0;
  min-height: 100svh; display: flex; flex-direction: column; justify-content: center;
  overflow: hidden;
}
.ed-evo-head {
  display: flex; justify-content: space-between; align-items: flex-end;
  gap: 24px; flex-wrap: wrap; margin-bottom: 36px;
}
.ed-evo-head h2 { font-size: clamp(2rem, 4vw, 3.3rem); max-width: 16ch; }
.ed-evo-head p { max-width: 40ch; color: rgba(255, 255, 255, 0.78); }

.ed-evo-track {
  display: flex; gap: 22px;
  padding-left: max(20px, calc((100vw - 1220px) / 2));
  padding-right: 48px;
  will-change: transform;
}
.ed-evo-card {
  flex: 0 0 clamp(290px, 32vw, 410px);
  background: #172b44; border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius); padding: 28px; display: grid; gap: 14px;
}
.ed-evo-year {
  display: inline-block; width: fit-content; padding: 6px 12px; border-radius: 99px;
  background: rgba(5, 96, 176, 0.35); color: #9dd0ff; font-weight: 600; font-size: 0.82rem;
}
.ed-evo-card h3 { font-size: 1.45rem; color: #fff; }
.ed-evo-card p { color: rgba(255, 255, 255, 0.78); font-size: 0.95rem; }
.ed-evo-line {
  width: var(--wrap); margin: 28px auto 0; height: 2px;
  background: rgba(255, 255, 255, 0.16); overflow: hidden;
}
.ed-evo-line i {
  display: block; width: 100%; height: 100%; background: #5fb0ff;
  transform-origin: left center; transform: scaleX(0);
}

/* Treatments Grid */
.sec-head {
  display: flex; justify-content: space-between; align-items: flex-end;
  gap: 24px; flex-wrap: wrap; margin-bottom: 40px;
}
.sec-head h2 { font-size: clamp(2rem, 4vw, 3.2rem); max-width: 18ch; }
.sec-head p { max-width: 42ch; color: var(--slate-soft); }

.care-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 270px), 1fr));
  gap: 20px;
}
.care-card {
  background: var(--mist); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 26px; display: grid; gap: 10px;
  transition: transform 0.3s var(--ease), border-color 0.3s;
}
.care-card:hover { transform: translateY(-4px); border-color: var(--cobalt); }
.care-icon {
  width: 42px; height: 42px; border-radius: 12px;
  background: var(--porcelain); color: var(--cobalt);
  display: grid; place-items: center; border: 1px solid var(--line);
}
.care-icon svg { width: 22px; height: 22px; }
.care-card h3 { font-size: 1.28rem; }
.care-card p { color: var(--slate-soft); font-size: 0.94rem; }

/* Signature Scroll: Pinned Patient Comfort Walkthrough */
.ed-comfort {
  background: var(--mist);
  padding: clamp(64px, 7.5vw, 108px) 0;
  overflow: hidden;
}
.ed-comfort-grid {
  display: grid; grid-template-columns: 0.95fr 1.05fr;
  gap: 48px; align-items: center;
}
.ed-comfort-visual {
  background: var(--porcelain); border: 1px solid var(--line);
  border-radius: 26px; padding: 28px;
}
.ed-comfort-visual h2 { font-size: clamp(1.9rem, 3.6vw, 2.9rem); margin-bottom: 14px; }
.ed-comfort-visual p { color: var(--slate-soft); margin-bottom: 22px; }
.ed-smile-svg { width: 100%; height: auto; }

.comfort-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.comfort-step {
  background: var(--porcelain); border: 1px solid var(--line);
  border-radius: 18px; padding: 20px 22px;
  transition: border-color 0.3s, box-shadow 0.3s;
}
.comfort-step.is-on {
  border-color: var(--cobalt);
  box-shadow: 0 18px 34px -24px rgba(5, 96, 176, 0.35);
}
.comfort-step h3 { font-size: 1.18rem; margin-bottom: 6px; color: var(--slate); }
.comfort-step p { color: var(--slate-soft); font-size: 0.94rem; }

/* CTA Band */
.ed-cta {
  background: var(--cobalt); color: #fff;
  padding: clamp(68px, 8vw, 110px) 0;
}
.ed-cta-grid {
  display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 32px; align-items: center;
}
.ed-cta h2 { font-size: clamp(2rem, 4.2vw, 3.3rem); margin-bottom: 14px; }
.ed-cta p { color: rgba(255, 255, 255, 0.88); max-width: 48ch; }
.ed-cta-actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: flex-end; }
.ed-cta .btn { background: #fff; color: var(--slate); }
.ed-cta .btn.ghost { background: transparent; color: #fff; box-shadow: inset 0 0 0 1.5px rgba(255,255,255,0.45); }

/* Subpages */
.page-hero {
  padding: clamp(128px, 13vw, 170px) 0 clamp(50px, 6vw, 80px);
  background: var(--mist); border-bottom: 1px solid var(--line);
}
.page-hero h1 { font-size: clamp(2.4rem, 5vw, 4.2rem); max-width: 17ch; margin-bottom: 16px; }
.page-hero p { font-size: 1.1rem; color: var(--slate-soft); max-width: 56ch; }

.tab-bar { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 32px; }
.tab-btn {
  min-height: 44px; padding: 10px 18px; border-radius: 99px;
  border: 1px solid var(--line); background: var(--porcelain); color: var(--slate);
  font: 500 0.94rem var(--body); cursor: pointer;
  transition: background-color 0.25s, color 0.25s, border-color 0.25s;
}
.tab-btn[aria-pressed="true"], .tab-btn:hover {
  background: var(--cobalt); color: #fff; border-color: var(--cobalt);
}

.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 44px; align-items: start; }
.two-col p + p { margin-top: 16px; }
.info-box {
  background: var(--mist); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px;
}

/* Contact Form */
.contact-grid { display: grid; grid-template-columns: 0.88fr 1.12fr; gap: 44px; align-items: start; }
.contact-dl { display: grid; gap: 18px; margin-top: 24px; }
.contact-dl dt {
  font-size: 0.78rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.14em; color: var(--cobalt); margin-bottom: 4px;
}
.contact-dl dd { margin: 0; font-weight: 500; }
.contact-dl a { text-decoration: none; }
.contact-dl a:hover { text-decoration: underline; }

.form-card {
  background: var(--mist); border: 1px solid var(--line);
  border-radius: var(--radius); padding: clamp(22px, 3vw, 36px);
}
.form-card h2 { font-size: 1.85rem; margin-bottom: 8px; }
.form-sub { color: var(--slate-soft); margin-bottom: 24px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { display: grid; gap: 6px; margin-bottom: 16px; }
.field label { font-size: 0.88rem; font-weight: 600; color: var(--slate); }
.field input, .field select, .field textarea {
  width: 100%; min-height: 46px; padding: 11px 14px;
  border: 1.5px solid rgba(16, 32, 51, 0.2); border-radius: 12px;
  font: inherit; color: var(--slate); background: #fff;
}
.field textarea { min-height: 96px; resize: vertical; }
.consent-row {
  display: grid; grid-template-columns: 22px 1fr; gap: 12px; align-items: start;
  margin: 12px 0 20px; font-size: 0.88rem; color: var(--slate-soft);
}
.consent-row input[type="checkbox"] { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--cobalt); }
.consent-row a { color: var(--cobalt); font-weight: 600; }
.form-status { display: block; margin-top: 14px; font-weight: 600; font-size: 0.94rem; min-height: 1.4em; }
.form-status.ok { color: var(--cobalt); }
.form-status.err { color: #a62626; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Legal */
.legal-wrap { display: grid; grid-template-columns: 240px 1fr; gap: 44px; align-items: start; }
.legal-toc {
  position: sticky; top: 100px; display: grid; gap: 6px;
  background: var(--mist); border: 1px solid var(--line); border-radius: 16px; padding: 16px;
}
.legal-toc a { text-decoration: none; font-size: 0.9rem; font-weight: 500; padding: 8px 12px; border-radius: 10px; color: var(--slate-soft); }
.legal-toc a:hover { background: var(--porcelain); color: var(--slate); }
.legal-body h2 { font-size: 1.6rem; margin: 34px 0 12px; }
.legal-body h2:first-of-type { margin-top: 0; }
.legal-body p, .legal-body li { color: var(--slate-soft); margin-bottom: 12px; }
.legal-body ul { padding-left: 20px; }

/* Footer */
.ed-footer { background: var(--slate); color: rgba(255, 255, 255, 0.82); padding: 64px 0 92px; }
.foot-word {
  font-family: var(--display); font-size: clamp(2.1rem, 6vw, 5.2rem);
  color: #fff; line-height: 0.98; margin-bottom: 42px;
}
.foot-word span { color: #79bfff; }
.foot-cols {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px;
  padding-bottom: 38px; border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}
.foot-cols h4 { color: #fff; font-size: 1rem; margin-bottom: 14px; }
.foot-cols a, .foot-cols p { display: block; text-decoration: none; font-size: 0.92rem; margin-bottom: 8px; color: rgba(255,255,255,0.78); }
.foot-cols a:hover { color: #79bfff; }
.foot-bottom {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px;
  padding-top: 22px; font-size: 0.84rem; color: rgba(255, 255, 255, 0.65);
}

.fab-call {
  position: fixed; right: 18px; bottom: 18px; z-index: 50;
  min-height: 48px; padding: 12px 18px; border-radius: 99px;
  background: var(--cobalt); color: #fff; font-weight: 600; font-size: 0.92rem;
  text-decoration: none; display: inline-flex; align-items: center; gap: 8px;
  box-shadow: 0 14px 30px -10px rgba(5, 96, 176, 0.5);
}
.fab-call svg { width: 18px; height: 18px; }

html.ed-anim .rv { opacity: 0; transform: translateY(20px); }

@media (max-width: 960px) {
  .ed-hero-grid, .ed-comfort-grid, .ed-cta-grid, .two-col, .contact-grid, .legal-wrap { grid-template-columns: 1fr; }
  .ed-cta-actions { justify-content: flex-start; }
  .ed-metrics, .foot-cols { grid-template-columns: 1fr 1fr; }
  .legal-toc { position: static; }
}

@media (max-width: 780px) {
  .ed-tel, .ed-header .btn { display: none; }
  .ed-menu-btn { display: inline-flex; margin-left: auto; }
  .ed-nav {
    position: fixed; inset: 0; background: var(--porcelain); color: var(--slate);
    flex-direction: column; justify-content: center; align-items: center; gap: 14px;
    padding: 32px; opacity: 0; pointer-events: none; transition: opacity 0.3s var(--ease);
  }
  .ed-nav.open { opacity: 1; pointer-events: auto; }
  .ed-nav a { font-size: 1.45rem; padding: 12px 24px; }
  .form-row, .ed-metrics, .foot-cols { grid-template-columns: 1fr; }
  .ed-comfort { padding: 48px 0 28px; }
  .ed-comfort-grid { gap: 16px; }
  .ed-comfort-visual { padding: 18px; }
  .ed-comfort-visual p { margin-bottom: 12px; font-size: 0.92rem; }
  .ed-smile-svg { max-height: 82px; }
  .comfort-steps { gap: 8px; }
  .comfort-step { padding: 12px 14px; }
  .comfort-step h3 { font-size: 1rem; margin-bottom: 2px; }
  .comfort-step p { font-size: 0.84rem; line-height: 1.4; }
  .fab-call { width: 48px; height: 48px; padding: 0; justify-content: center; font-size: 0; gap: 0; }
  .fab-call svg { width: 20px; height: 20px; }
}

@media (prefers-reduced-motion: reduce) {
  .ed-loader { display: none !important; }
  .ed-statement .w { opacity: 1; }
  html.ed-anim .rv { opacity: 1; transform: none; }
}
