/* Ortodont Rashid — стили
   Палитра взята с логотипа: тёмно-синий круг, белый зуб, серо-голубое кольцо, почти чёрный фон. */
:root {
  --bg: #0a0f18;
  --bg-2: #101827;
  --navy: #1f3a6b;
  --navy-deep: #172c52;
  --steel: #8b9bb2;
  --mist: #b9c5d5;
  --enamel: #f3f5f8;
  --line: rgba(139, 155, 178, 0.24);
  --line-soft: rgba(139, 155, 178, 0.12);
  --err: #f2a7a0;

  --serif: "Forum", "Times New Roman", serif;
  --sans: "Golos Text", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --gutter: clamp(16px, 4vw, 56px);
  --maxw: 1240px;
  --radius: 22px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--enamel);
  font: 400 17px/1.6 var(--sans);
  overflow-x: hidden;
}
img, svg { display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; margin: 0; letter-spacing: -0.005em; }
h1 { font-size: clamp(2.6rem, 6.2vw, 5.4rem); line-height: 1.02; }
h2 { font-size: clamp(2rem, 4.2vw, 3.5rem); line-height: 1.06; }
h3 { font-size: clamp(1.35rem, 2vw, 1.65rem); line-height: 1.2; }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

:focus-visible { outline: 2px solid var(--mist); outline-offset: 3px; border-radius: 6px; }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.skip { position: absolute; left: -9999px; top: 8px; z-index: 50; background: var(--enamel); color: var(--bg); padding: 8px 14px; border-radius: 999px; }
.skip:focus { left: 8px; }

/* ---------- верх ---------- */
.demo-note {
  margin: 0;
  padding: 8px var(--gutter);
  font-size: 13px;
  line-height: 1.4;
  color: var(--mist);
  background: var(--navy-deep);
  text-align: center;
}

.site-header {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 28px;
  padding: 14px var(--gutter);
  background: rgba(10, 15, 24, 0.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line-soft);
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand-mark { width: 44px; height: 44px; flex: none; }
.brand-word { font-family: var(--serif); font-size: 15px; line-height: 1.05; letter-spacing: 0.14em; text-transform: uppercase; }
.nav { display: flex; gap: 26px; margin-left: auto; }
.nav a { text-decoration: none; color: var(--mist); font-size: 15px; }
.nav a:hover { color: var(--enamel); }

/* ---------- кнопки ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 52px; padding: 0 26px;
  border-radius: 999px;
  font: 500 16px/1 var(--sans);
  text-decoration: none; cursor: pointer;
  border: 1px solid transparent;
  transition: background-color .2s, color .2s, border-color .2s;
}
.btn-sm { min-height: 42px; padding: 0 20px; font-size: 15px; }
.btn-light { background: var(--enamel); color: var(--bg); }
.btn-light:hover { background: #fff; }
.btn-ghost { border-color: var(--steel); color: var(--enamel); background: transparent; }
.btn-ghost:hover { background: rgba(139, 155, 178, 0.12); }
.btn-block { width: 100%; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.link-btn {
  background: none; border: 0; padding: 6px 0; cursor: pointer;
  color: var(--mist); font: 500 15px/1.2 var(--sans);
  text-decoration: underline; text-underline-offset: 4px; text-decoration-color: var(--steel);
}
.link-btn:hover { color: var(--enamel); }

/* ---------- холст зуба ---------- */
#tooth-canvas {
  position: fixed; inset: 0; width: 100%; height: 100%;
  z-index: 5; pointer-events: none;
}
.no-3d #tooth-canvas { display: none; }

/* ---------- «точки», куда приходит зуб ---------- */
.spot { position: relative; aspect-ratio: 1; width: 100%; }
.spot::before, .spot::after { content: ""; position: absolute; border-radius: 50%; }
.spot::before { inset: 8%; border: 1px solid var(--line); }
.spot::after { inset: 20%; background: radial-gradient(circle at 50% 45%, rgba(31, 58, 107, 0.45), transparent 68%); }

/* в hero точка — это и есть логотип: синий круг в серо-голубом кольце */
.spot-hero::before { inset: 4%; border: clamp(8px, 1.4vw, 16px) solid rgba(139, 155, 178, 0.55); }
.spot-hero::after { inset: calc(4% + clamp(8px, 1.4vw, 16px)); background: radial-gradient(circle at 50% 40%, #27467e, var(--navy) 55%, var(--navy-deep)); }
.spot-fallback { position: absolute; inset: 24%; width: 52%; height: 52%; z-index: 1; transition: opacity .4s; }
.has-3d .spot-fallback { opacity: 0; }

.spot-mini { display: none; }

/* ---------- раскладка ---------- */
main { position: relative; z-index: 1; }
.section, .hero {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(72px, 10vw, 140px) var(--gutter);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  align-items: center;
  gap: clamp(24px, 5vw, 80px);
  min-height: calc(100svh - 110px);
  padding-top: clamp(40px, 6vw, 80px);
}
.hero h1 { max-width: 12ch; }
.lead { font-size: clamp(1.05rem, 1.4vw, 1.2rem); color: var(--mist); max-width: 34em; margin: 28px 0 36px; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-facts { list-style: none; padding: 0; margin: 48px 0 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; max-width: 760px; }
.hero-facts li { font-size: 14px; line-height: 1.45; color: var(--mist); padding-top: 14px; border-top: 1px solid var(--line); }
.hero-facts strong { display: block; color: var(--enamel); font-weight: 500; font-size: 15px; margin-bottom: 4px; }
.spot-hero { max-width: 520px; justify-self: end; }

/* разделы с точкой сбоку: левая/правая колонка */
.about, .services, .steps, .prices {
  display: grid;
  gap: clamp(24px, 5vw, 80px);
  align-items: start;
}
.about, .steps { grid-template-columns: minmax(0, 0.7fr) minmax(0, 1.3fr); }
.services, .prices { grid-template-columns: minmax(0, 1.3fr) minmax(0, 0.7fr); }
.spot-side { position: sticky; top: 22vh; max-width: 380px; justify-self: center; }
.spot-small { max-width: 280px; }

.head { margin-bottom: clamp(28px, 4vw, 48px); }
.head h2 { max-width: 16ch; }

/* врач */
.about-grid { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: 36px; align-items: start; }
.about-grid p { color: var(--mist); max-width: 36em; }
.photo-ph {
  margin: 0; aspect-ratio: 4 / 5;
  border-radius: 200px 200px var(--radius) var(--radius);
  border: 1px dashed var(--steel);
  background: linear-gradient(180deg, rgba(31, 58, 107, 0.35), rgba(16, 24, 39, 0.6));
  display: grid; place-items: center; text-align: center;
  color: var(--mist); font-size: 15px;
}
.photo-ph small { color: var(--steel); }
.facts { margin: 28px 0 0; display: grid; gap: 0; }
.facts div { display: grid; grid-template-columns: 9.5em 1fr; gap: 16px; padding: 12px 0; border-top: 1px solid var(--line-soft); }
.facts dt { color: var(--steel); font-size: 15px; }
.facts dd { margin: 0; }

/* услуги */
.service-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 48px; }
.service-list li { padding: 26px 0 28px; border-top: 1px solid var(--line); display: grid; gap: 10px; align-content: start; }
.service-list p { color: var(--mist); font-size: 16px; max-width: 30em; }
.service-list .link-btn { justify-self: start; }

/* этапы — это последовательность, поэтому с номерами */
.step-list { list-style: none; margin: 0; padding: 0; counter-reset: step; }
.step-list li {
  counter-increment: step;
  display: grid; grid-template-columns: 4.2rem 1fr; column-gap: 20px;
  padding: 24px 0; border-top: 1px solid var(--line);
}
.step-list li::before {
  content: counter(step);
  grid-row: span 2;
  font-family: var(--serif); font-size: 2.6rem; line-height: 1;
  color: var(--steel);
}
.step-list p { color: var(--mist); margin-top: 6px; max-width: 36em; }

/* цены */
.note { color: var(--steel); font-size: 15px; max-width: 40em; }
.price-table { width: 100%; border-collapse: collapse; margin-top: 24px; }
.price-table td { padding: 16px 0; border-top: 1px solid var(--line); vertical-align: baseline; }
.price-table td:last-child { text-align: right; white-space: nowrap; padding-left: 16px; font-family: var(--serif); font-size: 1.35rem; }
.price-table tr:last-child td { border-bottom: 1px solid var(--line); }

/* отзывы */
.reviews .note { margin-top: 14px; }
.reviews-head { display: grid; grid-template-columns: minmax(0, 1fr) 220px; gap: 24px; align-items: center; margin-bottom: 0; }
.review-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin-top: 40px; }
.review {
  margin: 0; padding: 26px;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  display: grid; gap: 16px; align-content: start;
}
.review p { font-family: var(--serif); font-size: 1.25rem; line-height: 1.4; }
.review footer { color: var(--steel); font-size: 14px; }
.tag { justify-self: start; font-size: 13px; color: var(--bg); background: var(--mist); padding: 3px 10px; border-radius: 999px; }

/* запись */
.booking-panel {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(28px, 5vw, 72px);
  padding: clamp(28px, 5vw, 64px);
  background: var(--navy);
  border-radius: clamp(24px, 4vw, 48px);
  box-shadow: 0 0 0 clamp(6px, 1vw, 12px) rgba(139, 155, 178, 0.28);
}
.booking-info p { color: #d7dfea; max-width: 30em; }
.booking-info .head { margin-bottom: 20px; }
.quick { display: flex; flex-wrap: wrap; gap: 10px; margin: 28px 0 18px; }
.quick .btn-ghost { border-color: rgba(243, 245, 248, 0.5); }
.phone-line a { font-family: var(--serif); font-size: clamp(1.5rem, 2.4vw, 2rem); text-decoration: none; }
.spot-booking { position: relative; top: 0; max-width: 260px; margin: 24px 0 0; justify-self: start; }
.spot-booking::before { border-color: rgba(243, 245, 248, 0.25); }
.spot-booking::after { background: radial-gradient(circle at 50% 45%, rgba(10, 15, 24, 0.35), transparent 68%); }

.booking-form { background: var(--bg-2); border-radius: var(--radius); padding: clamp(20px, 3vw, 32px); display: grid; gap: 16px; align-content: start; }
.field { display: grid; gap: 6px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field label { font-size: 14px; color: var(--mist); }
input, select {
  width: 100%; min-height: 50px; padding: 0 14px;
  font: 400 16px var(--sans); color: var(--enamel);
  background: var(--bg); border: 1px solid var(--line); border-radius: 12px;
}
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--steel) 50%), linear-gradient(135deg, var(--steel) 50%, transparent 50%); background-position: calc(100% - 20px) 22px, calc(100% - 15px) 22px; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 36px; }
input::placeholder { color: #5f6e84; }
input:focus, select:focus { outline: none; border-color: var(--mist); }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--mist); cursor: pointer; }
.check input { width: 20px; height: 20px; min-height: 0; margin: 2px 0 0; accent-color: var(--navy); flex: none; }
.err { display: none; font-size: 13px; color: var(--err); }
.invalid .err, .err.show { display: block; }
.invalid input { border-color: var(--err); }
.form-status { margin: 0; font-size: 15px; color: var(--mist); }
.form-status.ok { color: var(--enamel); padding: 14px 16px; border-radius: 12px; background: rgba(31, 58, 107, 0.6); }

/* контакты */
.contacts { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: clamp(24px, 5vw, 72px); align-items: center; }
.map-ph {
  position: relative; aspect-ratio: 4 / 3;
  border-radius: var(--radius); overflow: hidden;
  background: var(--bg-2); border: 1px solid var(--line);
  display: grid; place-items: center;
}
.map-lines { position: absolute; inset: 0; width: 100%; height: 100%; }
.map-lines path { fill: none; stroke: rgba(139, 155, 178, 0.28); stroke-width: 10; }
.map-lines path.thin { stroke-width: 3; stroke: rgba(139, 155, 178, 0.16); }
.spot-map { width: 42%; position: relative; }
.map-label { position: absolute; left: 16px; bottom: 14px; font-size: 13px; color: var(--steel); }

/* подвал */
.site-footer {
  position: relative; z-index: 1;
  max-width: var(--maxw); margin: 0 auto;
  padding: 48px var(--gutter) 64px;
  border-top: 1px solid var(--line-soft);
  display: grid; grid-template-columns: auto 1fr auto; gap: 24px; align-items: center;
  font-size: 14px; color: var(--steel);
}
.site-footer p { margin: 0; }

.mobile-bar { display: none; }

/* ---------- планшет и телефон ---------- */
@media (max-width: 1080px) {
  .nav { display: none; }
  .site-header .btn { margin-left: auto; }
  .service-list { grid-template-columns: 1fr; }
  .about-grid { grid-template-columns: 1fr; }
  .photo-ph { max-width: 320px; }
}

@media (max-width: 859px) {
  body { font-size: 16px; padding-bottom: 72px; }
  .site-header { padding-top: 10px; padding-bottom: 10px; }
  .brand-mark { width: 38px; height: 38px; }

  .hero { grid-template-columns: 1fr; min-height: 0; padding-top: 24px; gap: 8px; }
  .spot-hero { order: -1; width: min(300px, 78vw); justify-self: center; }
  .hero-facts { grid-template-columns: 1fr; gap: 0; margin-top: 36px; }
  .hero-facts li { padding: 12px 0; }
  .actions .btn { flex: 1 1 100%; }

  .about, .services, .steps, .prices, .contacts { grid-template-columns: 1fr; }
  .spot-side { display: none; }
  .head { display: grid; grid-template-columns: minmax(0, 1fr) 104px; gap: 12px; align-items: center; }
  .spot-mini { display: block; width: 104px; }

  .facts div { grid-template-columns: 1fr; gap: 2px; }
  .review-row { grid-template-columns: 1fr; }
  .booking-panel { grid-template-columns: 1fr; padding: 24px 18px; }
  .quick .btn { flex: 1 1 auto; }
  .field-row { grid-template-columns: 1fr; }
  .site-footer { grid-template-columns: 1fr; }
  .spot-map { width: 46%; }

  .mobile-bar {
    display: grid; grid-template-columns: 1.3fr 1fr 1fr;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
    padding: 8px 10px calc(8px + env(safe-area-inset-bottom));
    gap: 8px;
    background: rgba(10, 15, 24, 0.92);
    backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid var(--line-soft);
  }
  .mobile-bar a {
    display: grid; place-items: center; min-height: 48px;
    border-radius: 999px; text-decoration: none; font-weight: 500; font-size: 15px;
    border: 1px solid var(--steel);
  }
  .mobile-bar a:first-child { background: var(--enamel); color: var(--bg); border-color: var(--enamel); }
}

@media (max-width: 420px) {
  .brand-word { font-size: 13px; }
  .head { grid-template-columns: minmax(0, 1fr) 88px; }
  .spot-mini { width: 88px; }
}
