:root {
  --ink: #143246;
  --muted: #5d7484;
  --teal: #2f8ca8;
  --teal-d: #1a6a82;
  --gold: #d99a1d;
  --line: #d5e4ec;
  --bg: #f4f8fb;
  --card: #fff;
  --shadow: 0 16px 40px rgba(20, 50, 70, 0.08);
  --radius: 22px;
  font-synthesis: none;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
[id] { scroll-margin-top: 108px; }
body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(900px 480px at 50% 18%, #fff 0%, rgba(255, 255, 255, 0) 70%),
    linear-gradient(180deg, #e7f3f8 0%, var(--bg) 32%, #fff 100%);
  font-family: Manrope, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.5;
}
img { max-width: 100%; display: block; }
a { color: var(--teal-d); }
button, input, select { font: inherit; }
h1, h2, h3 { font-family: Literata, Georgia, serif; font-weight: 650; letter-spacing: -0.02em; }

.top {
  position: fixed;
  z-index: 30;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  width: min(1160px, calc(100% - 28px));
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 8px 10px 8px 14px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 18px;
  box-shadow: 0 10px 30px rgba(20, 50, 70, 0.08);
  backdrop-filter: blur(12px);
}
.brand { display: flex; align-items: center; }
.brand img { height: 52px; width: auto; }
.nav { display: flex; gap: 16px; margin-left: 8px; }
.nav a { color: var(--ink); text-decoration: none; font-weight: 650; font-size: 14.5px; }
.nav a:hover { color: var(--teal-d); }
.top-actions { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.phone { color: var(--ink); text-decoration: none; font-weight: 800; white-space: nowrap; }
.menu { display: none; }

.btn, .submit-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--teal);
  color: #fff;
  text-decoration: none;
  border: 0;
  border-radius: 999px;
  padding: 11px 18px;
  font-weight: 750;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(47, 140, 168, 0.25);
}
.btn:hover, .submit-btn:hover { background: var(--teal-d); }
.btn.light { background: #fff; color: var(--teal-d); border: 1px solid var(--line); box-shadow: none; }

.hero {
  position: relative;
  height: 100vh;
  min-height: 780px;
  overflow: hidden;
}
#tooth-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}
.hero-copy {
  position: absolute;
  z-index: 3;
  top: 84px;
  left: 50%;
  transform: translateX(-50%);
  width: min(520px, 38vw);
  text-align: center;
  pointer-events: none;
  padding: 6px 16px 18px;
  background: radial-gradient(ellipse at center, rgba(244, 248, 251, 0.94) 0%, rgba(244, 248, 251, 0) 74%);
}
.hero-copy .btn { pointer-events: auto; }
.eyebrow {
  margin: 0 0 6px;
  color: var(--teal-d);
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.hero h1 { margin: 0; font-size: clamp(26px, 2.5vw, 36px); line-height: 1.12; }
.hero-lead { margin: 6px 0 0; color: var(--muted); font-size: 14px; }
.side {
  position: absolute;
  z-index: 3;
  top: 54%;
  transform: translateY(-50%);
  width: min(270px, 23vw);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.side-left { left: max(18px, calc((100% - 1180px) / 2)); }
.side-right { right: max(18px, calc((100% - 1180px) / 2)); }
.side a {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  padding: 11px 14px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(47, 140, 168, 0.14);
  border-radius: 16px;
  color: var(--ink);
  text-decoration: none;
  box-shadow: 0 10px 24px rgba(20, 50, 70, 0.06);
  backdrop-filter: blur(8px);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.side a span { font-weight: 750; font-size: 14.5px; }
.side a b { color: var(--teal-d); font-size: 13px; white-space: nowrap; }
.side-left a:hover, .side.is-hot.side-left a { transform: translateX(6px); border-color: var(--teal); }
.side-right a:hover, .side.is-hot.side-right a { transform: translateX(-6px); border-color: var(--teal); }
.hero-status {
  position: absolute;
  z-index: 2;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.wrap { width: min(1120px, calc(100% - 36px)); margin: 0 auto; }
.section { padding: 88px 0 72px; }
.section h2 { font-size: clamp(30px, 4vw, 42px); margin: 0 0 8px; }
.lede { color: var(--muted); margin: 0 0 28px; max-width: 62ch; }

.about {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 28px;
  align-items: center;
  background: #fff;
  border-radius: 28px;
  overflow: hidden;
  box-shadow: var(--shadow);
}
.about img { width: 100%; height: 100%; object-fit: cover; min-height: 280px; }
.about div { padding: 32px 32px 32px 8px; }
.facts { display: grid; gap: 10px; padding: 0; margin: 18px 0 0; list-style: none; }
.facts li { display: flex; gap: 12px; align-items: baseline; }
.facts strong { min-width: 118px; white-space: nowrap; font-size: 18px; }
.facts span { color: var(--muted); font-size: 14px; }

.promo {
  display: grid;
  grid-template-columns: 1.4fr 0.7fr;
  gap: 22px;
  padding: 28px;
  background: linear-gradient(135deg, #fff 0%, #e7f6fa 100%);
  border-radius: var(--radius);
  border: 1px solid #d5eaf1;
}
.badge {
  display: inline-block;
  background: #fff4d4;
  color: #8a6208;
  font-weight: 800;
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-radius: 999px;
  padding: 4px 10px;
}
.steps { list-style: none; padding: 0; margin: 16px 0 0; display: grid; gap: 8px; }
.steps li { display: flex; gap: 10px; align-items: center; }
.steps span {
  width: 26px; height: 26px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--teal); color: #fff; font-weight: 800; font-size: 13px; flex: none;
}
.promo-price {
  background: #fff;
  border-radius: 18px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  box-shadow: var(--shadow);
}
.promo-price em { font-style: normal; color: var(--muted); font-size: 14px; }
.promo-price strong { font-family: Literata, Georgia, serif; font-size: 40px; color: var(--teal-d); line-height: 1.1; }

.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.card {
  background: #fff;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: 0 8px 24px rgba(20, 50, 70, 0.04);
  display: flex;
  flex-direction: column;
}
.card img { width: 100%; height: 180px; object-fit: cover; background: #e7f1f6; }
.card div { padding: 16px 16px 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card h3 { margin: 0; font-size: 22px; }
.card p { margin: 0; color: var(--muted); flex: 1; }
.price-tag { font-weight: 800; color: var(--teal-d); }
.card .more { font-weight: 750; text-decoration: none; }

.price-tools { display: flex; gap: 12px; margin-bottom: 18px; }
.price-tools input {
  flex: 1;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 14px;
  background: #fff;
}
.price-grid { columns: 2 340px; column-gap: 28px; }
.price-cat {
  break-inside: avoid;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 16px 16px 6px;
  margin: 0 0 18px;
}
.price-cat h3 { margin: 0 0 8px; font-size: 20px; }
.price-cat ul { list-style: none; padding: 0; margin: 0; }
.price-cat li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  border-top: 1px dashed var(--line);
  font-size: 14.5px;
}
.price-cat b { white-space: nowrap; color: var(--teal-d); }

.form-card, .panel {
  background: #fff;
  border-radius: 24px;
  padding: 28px;
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
  overflow: visible;
}
.form-grid { display: grid; gap: 14px; max-width: 640px; }
.book-layout { display: grid; grid-template-columns: minmax(260px, 0.82fr) minmax(340px, 1.18fr); gap: 28px; align-items: start; }
.book-fields { display: grid; gap: 14px; align-content: start; }
.book-picked {
  margin: 0;
  padding: 12px 14px;
  border-radius: 14px;
  background: #e8f5f9;
  font-weight: 800;
}
.when { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.hint { margin: 0; color: var(--muted); font-weight: 650; font-size: 14px; }
.book-nav { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.book-nav button {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #fff;
  cursor: pointer;
  font-weight: 800;
}
.book-cal { position: relative; display: grid; gap: 12px; }
.book-cal [data-cal-grid] { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.book-dow { text-align: center; color: var(--muted); font-size: 12px; font-weight: 800; }
.book-day {
  min-height: 64px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #fff;
  padding: 6px 8px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-start;
  cursor: pointer;
  color: var(--ink);
}
.book-day.is-out { visibility: hidden; pointer-events: none; }
.book-day.is-past { opacity: 0.45; }
.book-day.is-selected { outline: 2px solid var(--teal); background: #e8f5f9; }
.book-day.is-today b { color: var(--teal-d); }
.book-day b { font-size: 15px; }
.book-day em { font-style: normal; font-size: 11px; font-weight: 800; color: var(--teal-d); }
.book-day-title { margin: 0 28px 4px 0; font-weight: 800; font-size: 22px; }
.book-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(20, 36, 48, 0);
  transition: background 0.32s ease;
}
.book-modal.is-open { background: rgba(20, 36, 48, 0.46); }
.book-modal[hidden] { display: none; }
.book-modal-card {
  width: min(560px, 100%);
  display: grid;
  gap: 14px;
  padding: 22px;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 24px 60px rgba(20, 50, 70, 0.22);
  position: relative;
  opacity: 0;
  transform: translateY(18px) scale(0.96);
  transition: opacity 0.32s ease, transform 0.42s cubic-bezier(0.16, 1, 0.3, 1);
}
.book-modal.is-open .book-modal-card { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .book-modal, .book-modal-card { transition: none; }
}
.book-modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: #f3f7f9;
  color: var(--ink);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}
.book-slots { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.book-slot {
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #fff;
  padding: 8px 8px;
  cursor: pointer;
  text-align: left;
  color: var(--ink);
}
.book-slot span, .book-slot small { display: block; }
.book-slot small { color: var(--muted); font-size: 11px; font-weight: 700; }
.book-slot.is-busy, .book-slot.is-past { background: #f3f6f8; color: var(--muted); cursor: not-allowed; }
.book-slot.is-on { background: var(--teal); border-color: var(--teal); color: #fff; }
.book-slot.is-on small { color: rgba(255, 255, 255, 0.88); }
.legend { display: flex; gap: 14px; flex-wrap: wrap; margin: 0; color: var(--muted); font-size: 13px; font-weight: 700; }
.lg::before {
  content: "";
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 99px;
  margin-right: 6px;
  vertical-align: -1px;
}
.lg.free::before { background: var(--teal); }
.lg.busy::before { background: #c5d3dc; }
.lg.past::before { background: #e6edf1; }
@media (max-width: 860px) {
  .book-layout { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .when { grid-template-columns: 1fr; }
  .book-day { min-height: 48px; padding: 4px; }
  .book-day em { font-size: 10px; }
  .book-slots { grid-template-columns: repeat(3, 1fr); }
}
label { display: grid; gap: 6px; font-weight: 700; font-size: 14px; }
input, select {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 12px;
  background: #f8fbfc;
}
.hp { position: absolute; left: -9999px; }
.success { display: none; }
.success.show { display: block; }
.form-card.is-done form { display: none; }
.form-card.is-done .success { display: block; }

.reviews { height: 560px; border-radius: 20px; overflow: hidden; background: #fff; border: 1px solid var(--line); }
.reviews iframe { width: 100%; height: 100%; border: 0; }

.gallery, .certs { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }
.certs { grid-template-columns: 1fr 1fr 1.1fr; }
.cert button { display: block; width: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; }
.shot, .cert {
  padding: 0;
  border: 0;
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  cursor: zoom-in;
  text-align: left;
  box-shadow: var(--shadow);
}
.shot img, .cert img { width: 100%; height: 240px; object-fit: cover; }
.cert figcaption, .shot span { display: block; padding: 10px 12px 12px; font-weight: 700; font-size: 14px; }
.doc {
  background: #fff;
  border-radius: 16px;
  padding: 22px;
  border: 1px solid var(--line);
}
.doc h3 { margin-top: 0; }
.doc p { color: var(--muted); }

.contacts {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 18px;
}
.contacts li { list-style: none; margin: 0 0 14px; }
.contacts ul { padding: 0; margin: 0 0 16px; }
.contacts small { display: block; color: var(--muted); font-weight: 700; }
.map { min-height: 420px; border-radius: 20px; overflow: hidden; border: 1px solid var(--line); }
.map iframe { width: 100%; height: 100%; min-height: 420px; border: 0; }
.socials { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.socials a {
  text-decoration: none;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 12px;
  font-weight: 750;
  color: var(--ink);
  background: #f7fbfc;
}

.req { color: var(--muted); font-size: 14px; }
footer {
  padding: 28px 0 40px;
  color: var(--muted);
  text-align: center;
}
footer a { color: var(--muted); }

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: rgba(10, 24, 34, 0.82);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.lightbox.open { display: flex; }
.lightbox img { max-width: min(960px, 100%); max-height: 88vh; border-radius: 12px; }
.lightbox button {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 0;
  background: #fff;
  font-size: 26px;
  cursor: pointer;
}

@media (max-width: 980px) {
  .nav { display: none; }
  .menu { display: block; margin-left: auto; }
  .menu summary { cursor: pointer; font-weight: 800; }
  .menu a { display: block; padding: 6px 0; text-decoration: none; color: var(--ink); }
  .top-actions .phone { display: none; }
  .hero { height: auto; min-height: 0; display: flex; flex-direction: column; padding: 96px 14px 24px; }
  #tooth-canvas { position: relative; height: 420px; order: 2; }
  .hero-copy { position: relative; top: auto; left: auto; transform: none; width: auto; order: 1; }
  .side { position: relative; top: auto; transform: none; width: auto; order: 3; }
  .hero-status { position: relative; left: auto; bottom: auto; transform: none; text-align: center; order: 4; }
  .about, .promo, .contacts { grid-template-columns: 1fr; }
  .about div { padding: 8px 20px 24px; }
  .cards, .gallery { grid-template-columns: 1fr 1fr; }
  .certs { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .cards, .gallery { grid-template-columns: 1fr; }
  .brand img { height: 42px; }
}
