/* ==========================================================
   Емаль — демо-сайт стоматології (Київ). Чистий CSS.
   Брейкпоінти: 701 (планшет), 1101 (десктоп), 1600 (широкий)
   ========================================================== */

@font-face { font-family: Manrope; src: url('../fonts/manrope-400.ttf') format('truetype'); font-weight: 400; font-display: swap; }
@font-face { font-family: Manrope; src: url('../fonts/manrope-500.ttf') format('truetype'); font-weight: 500; font-display: swap; }
@font-face { font-family: Manrope; src: url('../fonts/manrope-800.ttf') format('truetype'); font-weight: 800; font-display: swap; }

:root {
  --ink: #141311;        /* графіт */
  --ink-2: #1e1b18;
  --paper: #f3efe8;      /* світлий камінь */
  --white: #fffdf9;
  --muted: #6b655c;
  --line: #dad3c7;
  --gold: #b8945a;       /* м'яке золото */
  --gold-soft: #e2d3b6;
  --accent-ink: #7a5a26; /* фокус, посилання */
  --form-panel: #e8dfd0;
  --field-line: #c9bba3;
  --error: #8a3a2b;
  --ease: cubic-bezier(.22, 1, .36, 1);
  --pad: 24px;
  --bar-h: 0px;
  color-scheme: light;
}
@media (min-width: 701px) { :root { --pad: 32px; } }
@media (min-width: 1101px) { :root { --pad: 48px; } }
@media (min-width: 1600px) { :root { --pad: max(48px, calc((100vw - 1504px) / 2)); } }

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 16px; -webkit-text-size-adjust: 100%; }
@media (min-width: 701px) { html { scroll-padding-top: 24px; } }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: Manrope, Arial, sans-serif; font-weight: 400; font-size: 16px; line-height: 1.6;
  font-synthesis: none; -webkit-font-smoothing: antialiased; overflow-x: clip;
  padding-bottom: var(--bar-h);
}
img, svg { display: block; max-width: 100%; }
h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
button:disabled { cursor: default; }
a { -webkit-tap-highlight-color: transparent; }
:where(a, button, [tabindex], input, select, summary):focus-visible { outline: 2px solid var(--accent-ink); outline-offset: 6px; }
.on-dark :where(a, button, [tabindex]):focus-visible { outline-color: var(--gold-soft); }
::selection { background: var(--gold-soft); color: var(--ink); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.icon { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.icon--20 { width: 20px; height: 20px; }
.tnum { font-variant-numeric: tabular-nums; }

.skip { position: absolute; left: 16px; top: -80px; z-index: 50; background: var(--paper); color: var(--ink); padding: 12px 16px; border-radius: 4px; }
.skip:focus { top: 16px; }

/* ---------- Спільні елементи секцій ---------- */
.section { padding: 64px var(--pad); }
@media (min-width: 701px) { .section { padding-block: 96px; } }
.section--lined { border-top: 1px solid var(--line); }
.h2 { font-size: 42px; line-height: 1.08; font-weight: 500; letter-spacing: -0.045em; text-wrap: balance; }
@media (min-width: 701px) { .h2 { font-size: clamp(42px, 4.5vw, 64px); } }
.h2 .soft { color: var(--muted); }
.lead { font-size: 16px; line-height: 1.75; max-width: 34em; }
.note { font-size: 13px; line-height: 1.7; color: var(--muted); }
.head-row { display: grid; gap: 24px; align-items: end; }
@media (min-width: 901px) { .head-row { grid-template-columns: 1fr minmax(260px, 30%); } }
.link-line {
  display: inline-flex; align-items: center; gap: 12px; min-height: 44px; padding-bottom: 4px;
  border-bottom: 1px solid currentColor; font-size: 15px; font-weight: 500;
}
.link-line .icon { transition: transform .25s var(--ease); }
.link-line:hover .icon { transform: translate(2px, -2px); }

/* ---------- Шапка ---------- */
.header {
  position: absolute; inset: 0 0 auto; z-index: 10; height: 80px; padding: 0 var(--pad);
  display: flex; align-items: center; justify-content: space-between; gap: 16px; color: var(--paper);
}
@media (min-width: 701px) { .header { height: 100px; } }
.logo { font-weight: 800; font-size: 28px; letter-spacing: -2px; line-height: 1; display: inline-flex; align-items: flex-start; min-height: 44px; padding-top: 6px; }
.logo sup { font-size: .5em; letter-spacing: 0; margin-left: 2px; color: var(--gold); line-height: 1; }
@media (min-width: 701px) { .logo { font-size: 36px; } }
.nav { display: none; }
@media (min-width: 701px) {
  .nav { display: flex; gap: 24px; position: absolute; left: 50%; transform: translateX(-50%); }
  .nav a { font-size: 13px; opacity: .78; min-height: 44px; display: inline-flex; align-items: center; transition: opacity .2s; }
  .nav a:hover { opacity: 1; }
}
@media (min-width: 1101px) { .nav { gap: 32px; } }
.header__right { display: flex; align-items: center; gap: 28px; }
.header__phone { display: none; font-size: 14px; opacity: .85; }
@media (min-width: 1101px) { .header__phone { display: inline-flex; min-height: 44px; align-items: center; } }
.header__cta { display: inline-flex; align-items: center; gap: 24px; min-height: 44px; font-size: 14px; font-weight: 500; border-bottom: 1px solid rgba(243, 239, 232, .7); }
@media (min-width: 701px) { .header__cta { gap: 32px; } }

/* ---------- HERO ---------- */
.hero { position: relative; height: 200svh; --p: 0; --r: 0; --k: 3.5; }
@media (min-width: 701px) { .hero { height: 230svh; } }
.hero__stage {
  position: sticky; top: 0; height: 100svh; min-height: 560px; overflow: hidden; isolation: isolate;
  color: var(--paper);
  background: linear-gradient(180deg, #141311 0%, #141311 8%, #1e1b18 24%, #3a3128 43%, #74603f 62%, #b8945a 78%, #e2d3b6 91%, #f3efe8 100%);
}
@media (min-width: 701px) { .hero__stage { min-height: 640px; } }
.hero__arcs { position: absolute; inset: 0; width: 100%; height: 100%; opacity: .65; z-index: 1; pointer-events: none; }
@media (min-width: 701px) { .hero__arcs { opacity: 1; } }

.hero__title {
  position: absolute; left: 18%; right: 18%; top: 50%; z-index: 3; text-align: center;
  transform: translateY(calc(-50% - var(--p) * 30svh)) scale(calc(1 - var(--p) * .34));
}
.hero__title h1 {
  font-weight: 800; font-size: 18vw; line-height: .9; letter-spacing: -0.07em; color: var(--paper);
  margin-inline: -20%; white-space: nowrap;
}
@media (min-width: 701px) { .hero__title h1 { font-size: min(18vw, 340px); } }
.hero__where { margin-top: 14px; font-size: 16px; font-weight: 500; letter-spacing: .01em; color: rgba(243, 239, 232, .86); white-space: nowrap; }
@media (min-width: 701px) { .hero__where { font-size: 18px; margin-top: 20px; } }

.inst {
  position: absolute; left: var(--l); top: var(--t); width: var(--w); max-width: var(--mw); z-index: 2; pointer-events: none;
  opacity: calc(var(--o) * (1 - clamp(0, (var(--p) - .45) / .35, 1)));
  transform: translate(-50%, -50%)
    translate3d(calc(var(--x) * var(--p) * 130vw), calc(var(--y) * var(--p) * 75vh), 0)
    scale(calc(1 + var(--p) * var(--k)))
    rotate(calc(var(--rot) + var(--p) * 12deg));
}
.inst--near { z-index: 4; }
.inst__float { animation: float-a 7s ease-in-out infinite; }
.inst__float img { width: 100%; height: auto; filter: drop-shadow(8px 20px 14px rgba(0, 0, 0, .16)); }
.inst--spatula   { --l: 7%;  --t: 38%; --w: 54vw; --mw: 500px; --rot: 28deg;  --o: .85; --x: -1;  --y: -.35; }
.inst--tweezers  { --l: 94%; --t: 36%; --w: 56vw; --mw: 480px; --rot: 28deg;  --o: .9;  --x: 1;   --y: -.25; }
.inst--braces    { --l: 27%; --t: 72%; --w: 43vw; --mw: 360px; --rot: -18deg; --o: 1;   --x: -.8; --y: .9; }
.inst--clamp     { --l: 32%; --t: 28%; --w: 23vw; --mw: 200px; --rot: -24deg; --o: .9;  --x: -.6; --y: -.8; }
.inst--tray      { --l: 79%; --t: 66%; --w: 46vw; --mw: 360px; --rot: 22deg;  --o: 1;   --x: .9;  --y: .85; }
@media (min-width: 701px) {
  .inst--spatula  { --l: 10%; --t: 42%; --w: 34vw; }
  .inst--tweezers { --l: 90%; --t: 36%; --w: 32vw; }
  .inst--braces   { --l: 27%; --t: 76%; --w: 24vw; }
  .inst--clamp    { --l: 34%; --t: 29%; --w: 14vw; }
  .inst--tray     { --l: 76%; --t: 68%; --w: 25vw; }
}
.inst--spatula .inst__float  { animation-delay: -2s; }
.inst--tweezers .inst__float { animation-name: float-b; animation-duration: 8s; }
.inst--braces .inst__float   { animation-direction: reverse; }
.inst--clamp .inst__float    { animation-name: float-b; animation-duration: 8s; animation-delay: -3s; }
.inst--tray .inst__float     { animation-delay: -4s; }
.hero.is-idle .inst__float { animation-play-state: paused; }
/* Шари прискорені постійно, поки перший екран на виду: без перемальовування на старті руху */
.hero:not(.is-idle) .inst, .hero:not(.is-idle) .hero__title { will-change: transform, opacity; }

/* Полегшений режим для слабких телефонів */
.hero--lite { --k: 1.6; }
.hero--lite .inst--spatula, .hero--lite .inst--tweezers { display: none; }
.hero--lite .inst__float { animation: none; }
.hero--lite .inst__float img { filter: none; }
/* Телефон: тінь (filter) на п’яти великих картинках, збільшених у 4,5 раза, надто важка — прибираємо */
@media (max-width: 700px) { .inst__float img { filter: none; } }

.hero__slogan {
  position: absolute; top: 46%; left: 5%; width: 90%; z-index: 4; text-align: center;
  opacity: var(--r); transform: translateY(calc((1 - var(--r)) * 40px));
}
.hero__slogan[data-hidden] { visibility: hidden; }
@media (min-width: 701px) { .hero__slogan { left: 15%; width: 70%; } }
.hero__slogan p.big { font-size: 10vw; font-weight: 500; line-height: 1.12; letter-spacing: -0.045em; text-wrap: balance; }
@media (min-width: 701px) { .hero__slogan p.big { font-size: clamp(40px, 5.5vw, 84px); } }
.hero__slogan .u { position: relative; display: inline-block; }
.hero__slogan .u::after { content: ''; position: absolute; left: 4%; right: 0; bottom: -.04em; height: 3px; background: var(--paper); border-radius: 2px; transform: rotate(-2deg); }
.hero__sub { margin-top: 32px; display: inline-flex; align-items: center; gap: 32px; text-align: left; font-size: 15px; line-height: 1.6; color: rgba(243, 239, 232, .9); }
@media (min-width: 701px) { .hero__sub { margin-top: 40px; gap: 48px; } }
.round-btn { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; background: var(--paper); color: var(--ink); flex: none; transition: transform .25s var(--ease); }
.round-btn:hover { transform: scale(1.06); }
@media (min-width: 701px) { .round-btn { width: 56px; height: 56px; } }

.hero__bottom {
  position: absolute; left: var(--pad); right: var(--pad); bottom: calc(var(--bar-h) + 16px); z-index: 5;
  display: flex; justify-content: space-between; align-items: center; gap: 16px; color: var(--ink);
}
@media (min-width: 701px) { .hero__bottom { bottom: 32px; } }
.scroll-hint { display: inline-flex; align-items: center; gap: 16px; min-height: 48px; font-size: 13px; font-weight: 500; }
.scroll-hint__pill { width: 40px; height: 48px; border: 1px solid rgba(20, 19, 17, .45); border-radius: 999px; display: grid; place-items: center; }
.hero__aside { font-size: 12px; line-height: 1.6; text-align: right; }
.hero__progress { position: absolute; left: 0; right: 0; bottom: var(--bar-h); height: 2px; background: var(--accent-ink); transform: scaleX(var(--p)); transform-origin: left; z-index: 6; }

/* Низькі екрани (≈568px): слоган вище, без правого підпису */
@media (max-height: 640px) {
  .hero__slogan { top: 36%; }
  .hero__sub { margin-top: 16px; }
  .hero__aside { display: none; }
}

/* ---------- ПОСЛУГИ ---------- */
.services { background: var(--paper); border-top: 1px solid var(--line); padding: 48px var(--pad) 0; }
@media (min-width: 701px) { .services { padding-top: 64px; } }
.services__title { font-size: 52px; line-height: 1.04; font-weight: 500; letter-spacing: -0.045em; }
@media (min-width: 701px) { .services__title { font-size: clamp(48px, 6vw, 88px); } }
.services__title .soft { color: var(--muted); }
.services__title .dot { color: var(--gold); }
.services__intro { font-size: 15px; line-height: 1.8; }
.services__intro span { color: var(--muted); }

.tabs { margin: 40px calc(-1 * var(--pad)) 0; padding: 0 var(--pad) 16px; display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; scroll-snap-type: x proximity; scroll-padding-inline: var(--pad); }
.tabs::-webkit-scrollbar { display: none; }
@media (min-width: 701px) { .tabs { flex-wrap: wrap; overflow: visible; margin-top: 56px; } }
.tab {
  flex: none; scroll-snap-align: start; min-height: 48px; padding: 0 16px; border-radius: 4px;
  display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 500; white-space: nowrap;
  transition: background-color .25s var(--ease), color .25s var(--ease);
}
.tab:hover { background: rgba(20, 19, 17, .05); }
.tab sup { font-size: 10px; color: var(--muted); align-self: flex-start; margin-top: 12px; }
.tab[aria-selected='true'] { background: var(--ink); color: var(--paper); }
.tab[aria-selected='true'] sup { color: var(--gold); }

.catalog { border-top: 1px solid var(--line); display: grid; }
@media (min-width: 701px) { .catalog { grid-template-columns: 46% 54%; min-height: 640px; } }
@media (min-width: 1101px) { .catalog { grid-template-columns: 50% 50%; } }

.wheel {
  --wheel-size: 480px; --edge: 100px; --list-left: 112px; --step: 70px; --dot-y: 42%;
  position: relative; min-height: 420px; overflow: hidden; margin-left: calc(-1 * var(--pad));
  touch-action: pan-x pinch-zoom; user-select: none; -webkit-user-select: none;
}
@media (min-width: 701px) { .wheel { --wheel-size: 620px; --edge: 90px; --list-left: 108px; --step: 92px; --dot-y: 46%; border-right: 1px solid var(--line); min-height: 640px; } }
@media (min-width: 901px) { .wheel { --edge: 200px; --list-left: 212px; } }
@media (min-width: 1101px) { .wheel { --edge: 280px; --list-left: 300px; } }
@media (min-width: 1600px) { .wheel { --edge: 360px; --list-left: 380px; } }

.dial {
  position: absolute; top: var(--dot-y); left: calc(var(--edge) - var(--wheel-size));
  width: var(--wheel-size); height: var(--wheel-size); border-radius: 50%; border: 1px solid #cfc6b7;
  transform: translateY(-50%);
}
.dial__inner { position: absolute; inset: 0; border-radius: 50%; transform: rotate(calc(var(--sel, 0) * -24deg)); transition: transform .8s var(--ease); }
.dial__ring { position: absolute; inset: 48px; border-radius: 50%; border: 1px solid #ddd5c8; }
.tick { position: absolute; left: 50%; top: 50%; width: 12px; height: 1px; background: #b9ae9c; transform-origin: 0 0; transform: rotate(var(--a)) translateX(calc(var(--wheel-size) / 2 - 26px)); }
.tick--long { width: 20px; transform: rotate(var(--a)) translateX(calc(var(--wheel-size) / 2 - 34px)); background: #9c907c; }
.dial__dot { position: absolute; top: var(--dot-y); left: calc(var(--edge) - 5px); width: 10px; height: 10px; margin-top: -5px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 8px var(--paper); z-index: 2; }

.wheel__list { position: absolute; top: var(--dot-y); left: calc(var(--list-left) + 8px); right: 16px; height: 0; outline: none; }
.wheel__list:focus-visible::before { content: ''; position: absolute; left: -12px; right: 0; top: -32px; height: 64px; border: 2px solid var(--accent-ink); border-radius: 6px; }
.opt {
  position: absolute; left: 0; top: 0; width: 100%; display: flex; align-items: center; gap: 12px; cursor: pointer;
  transform: translate3d(calc(var(--ao) * -28px), calc(var(--o) * var(--step) - 50%), 0) rotate(calc(var(--o) * 4deg));
  transform-origin: left center; transition: transform .7s var(--ease), opacity .7s var(--ease), color .3s;
  font-size: 16px; line-height: 1.2; color: var(--muted); min-height: 44px;
}
.opt[data-far] { opacity: .38; }
.opt[data-hidden] { opacity: 0; pointer-events: none; }
.opt[aria-selected='true'] { color: var(--ink); font-size: 20px; font-weight: 500; letter-spacing: -0.02em; }
.opt .icon { color: var(--accent-ink); opacity: 0; transition: opacity .3s; }
.opt[aria-selected='true'] .icon { opacity: 1; }
@media (min-width: 701px) { .opt { font-size: 17px; } .opt[aria-selected='true'] { font-size: 22px; } }
@media (min-width: 1101px) { .opt[aria-selected='true'] { font-size: 24px; } }
@media (min-width: 1600px) { .opt[aria-selected='true'] { font-size: 28px; } }

.wheel__controls { position: absolute; left: var(--list-left); bottom: 20px; right: 16px; }
@media (min-width: 701px) { .wheel__controls { bottom: 40px; } }
.wheel__btns { display: flex; align-items: center; gap: 16px; }
.circle-btn { width: 44px; height: 44px; border-radius: 50%; border: 1px solid #b9ae9c; display: grid; place-items: center; transition: background-color .2s, opacity .2s; }
.circle-btn:hover:not(:disabled) { background: rgba(20, 19, 17, .06); }
.circle-btn:disabled { opacity: .35; }
.wheel__count { font-size: 14px; min-width: 52px; text-align: center; }
.wheel__hint { margin-top: 12px; font-size: 13px; color: var(--muted); }

.card { display: flex; flex-direction: column; padding: 24px 0 40px; border-top: 1px solid var(--line); min-height: 560px; }
@media (min-width: 701px) { .card { padding: 40px 0 40px 32px; border-top: 0; } }
@media (min-width: 1101px) { .card { padding: 48px 0 48px 48px; } }
.card__media { position: relative; height: 240px; isolation: isolate; background: var(--paper); display: grid; place-items: center; }
@media (min-width: 701px) { .card__media { height: 280px; } }
.card__media::before, .card__media::after { content: ''; position: absolute; width: 16px; height: 16px; border-color: #a99d88; border-style: solid; }
.card__media::before { left: 0; top: 0; border-width: 1px 0 0 1px; }
.card__media::after { right: 0; bottom: 24px; border-width: 0 1px 1px 0; }
/* Фон шару = фон сторінки: інакше multiply не має з чим множити і білий фон картинки лишається білим */
.card__float { animation: service-float 8s ease-in-out infinite; position: absolute; inset: 18px 20px 40px; display: flex; align-items: center; justify-content: center; background: var(--paper); isolation: isolate; }
.card__media img { width: auto; height: auto; max-width: min(360px, 80%); max-height: 100%; object-fit: contain; mix-blend-mode: multiply; }
.card__code { position: absolute; right: 0; bottom: 0; font-size: 11px; color: var(--muted); }
.card__meta { margin-top: 32px; display: flex; justify-content: space-between; gap: 16px; font-size: 13px; color: var(--muted); }
.card__name { margin-top: 12px; font-size: 28px; line-height: 1.15; font-weight: 500; letter-spacing: -0.035em; text-wrap: balance; }
@media (min-width: 701px) { .card__name { font-size: 26px; } }
@media (min-width: 1101px) { .card__name { font-size: 30px; } }
.card__desc { margin-top: 16px; font-size: 16px; line-height: 1.75; color: #3e3a34; max-width: 36em; }
@media (min-width: 701px) { .card__desc { font-size: 15px; } }
.card__price { margin-top: auto; padding-top: 24px; border-top: 1px solid var(--line); display: flex; align-items: baseline; justify-content: space-between; gap: 16px; }
.card__desc + .card__price { margin-top: 28px; }
.card__price strong { font-size: 30px; font-weight: 500; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
@media (min-width: 701px) { .card__price strong { font-size: 28px; } }
.card__price span { font-size: 13px; color: var(--muted); }
.card__cta { margin-top: 24px; align-self: flex-start; }

/* Телефон: барабан і ціна ближче одне до одного */
@media (max-width: 700px) {
  .wheel { min-height: 280px; --step: 54px; --dot-y: 35%; }
  .wheel__controls { bottom: 12px; }
  .opt[data-far] { opacity: 0; pointer-events: none; }
  .card { min-height: 0; padding-top: 16px; }
  .card__media { height: 176px; }
  .card__meta { margin-top: 20px; }
  .card__desc + .card__price { margin-top: 20px; }
}
.card.is-enter .card__body { animation: detail-enter .45s var(--ease); }

.services__foot { border-top: 1px solid var(--line); padding: 24px 0 48px; display: grid; gap: 12px; font-size: 14px; }
@media (min-width: 701px) { .services__foot { grid-template-columns: 1fr auto; } .services__foot .note { text-align: right; max-width: 30em; } }

/* ---------- ПРО НАС ---------- */
.about { background: var(--ink); color: var(--paper); }
.about__grid { display: grid; gap: 48px; max-width: 1440px; }
@media (min-width: 701px) { .about__grid { grid-template-columns: 1.1fr 1fr; gap: 64px; } }
@media (min-width: 1101px) { .about__grid { gap: 112px; } }
.about__title { font-size: 52px; line-height: 1.04; font-weight: 500; letter-spacing: -0.045em; }
@media (min-width: 701px) { .about__title { font-size: clamp(52px, 6vw, 88px); } }
.about__title .gold { color: var(--gold); }
.about__sub { margin-top: 24px; font-size: 17px; line-height: 1.6; color: rgba(243, 239, 232, .68); }
@media (min-width: 701px) { .about__sub { font-size: 18px; } }
.about .link-line { margin-top: 40px; }
.about__lead { font-size: 19px; line-height: 1.65; }
@media (min-width: 701px) { .about__lead { font-size: 22px; } }
.about__text { margin-top: 24px; font-size: 16px; line-height: 1.85; color: rgba(243, 239, 232, .7); }
.principles { margin-top: 40px; border-top: 1px solid rgba(243, 239, 232, .16); }
.principles li { padding: 20px 0; border-bottom: 1px solid rgba(243, 239, 232, .16); display: grid; gap: 6px; }
@media (min-width: 701px) { .principles li { grid-template-columns: 200px 1fr; gap: 24px; } }
.principles h3 { font-size: 17px; font-weight: 500; }
.principles p { font-size: 15px; line-height: 1.7; color: rgba(243, 239, 232, .68); }

/* ---------- ДОКУМЕНТИ ---------- */
.docs { border-bottom: 1px solid var(--line); }
.docs__grid { margin: 56px auto 0; max-width: 1200px; display: grid; gap: 48px; }
@media (min-width: 701px) { .docs__grid { grid-template-columns: repeat(3, 1fr); gap: 32px; } }
.doc { display: grid; gap: 20px; justify-items: center; text-align: center; }
.sheet {
  width: 100%; max-width: 320px; aspect-ratio: 3 / 4; max-height: 400px; background: var(--white); padding: 32px;
  border: 1px solid var(--line); box-shadow: 0 8px 24px rgba(20, 19, 17, .05); position: relative;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; text-align: center;
}
.sheet::before { content: ''; position: absolute; inset: 10px; border: 1px solid #ebe5da; pointer-events: none; }
@media (min-width: 701px) { .doc:nth-child(1) .sheet { transform: rotate(-2deg); } .doc:nth-child(2) .sheet { transform: rotate(1deg); } .doc:nth-child(3) .sheet { transform: rotate(-1deg); } }
.sheet__code { position: absolute; top: 24px; left: 24px; font-size: 11px; color: var(--muted); }
.sheet .icon { width: 40px; height: 40px; stroke-width: 1; color: #bfb5a4; }
.sheet__t { font-size: 18px; line-height: 1.3; color: #8b8377; }
.sheet__lines { width: 60%; display: grid; gap: 8px; }
.sheet__lines i { height: 1px; background: #e4ddd1; }
.sheet__lines i:nth-child(2) { width: 80%; }
.sheet__lines i:nth-child(3) { width: 55%; }
.sheet__ph { position: absolute; bottom: 24px; font-size: 11px; color: var(--muted); }
.doc h3 { font-size: 18px; font-weight: 500; }
.doc p { font-size: 14px; color: var(--muted); }

/* ---------- ЛІКАРІ ---------- */
.doctors__grid { margin-top: 56px; display: grid; gap: 48px 24px; }
@media (min-width: 560px) { .doctors__grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 701px) { .doctors__grid { column-gap: 32px; } }
@media (min-width: 1101px) { .doctors__grid { grid-template-columns: repeat(4, 1fr); } }
.doctor { display: flex; flex-direction: column; }
.portrait { aspect-ratio: 4 / 5; width: 100%; height: auto; }
.doctor h3 { margin-top: 24px; font-size: 26px; line-height: 1.15; letter-spacing: -0.035em; font-weight: 500; }
.doctor__role { margin-top: 10px; font-size: 15px; font-weight: 500; }
.doctor__exp { font-size: 14px; color: var(--muted); }
.doctor__note { margin-top: 10px; font-size: 15px; line-height: 1.6; color: #3e3a34; }
.doctor__cta { margin-top: auto; padding-top: 16px; }
.doctor__cta a { margin-top: 20px; border-top: 1px solid var(--line); min-height: 56px; display: flex; align-items: center; justify-content: space-between; font-size: 15px; font-weight: 500; }
.doctor__cta a:hover .icon { transform: translate(2px, -2px); }
.doctor__cta .icon { transition: transform .25s var(--ease); }
.doctors__note { margin-top: 40px; }

/* ---------- АДРЕСА ---------- */
.location { border-block: 1px solid var(--line); }
.location__grid { display: grid; gap: 48px; }
@media (min-width: 701px) { .location__grid { grid-template-columns: .85fr 1.15fr; } }
@media (min-width: 1101px) { .location__grid { gap: 96px; } }
.location__addr { margin-top: 32px; font-size: 22px; line-height: 1.45; font-style: normal; }
.hours { margin-top: 32px; border-block: 1px solid var(--line); padding: 16px 0; display: grid; gap: 10px; font-size: 15px; max-width: 420px; }
.hours div { display: flex; justify-content: space-between; gap: 16px; }
.hours dt { color: #3e3a34; }
.location .link-line { margin-top: 32px; }
.location .note { margin-top: 20px; max-width: 30em; }
.map { width: 100%; height: auto; min-height: 360px; background: #e6e1d9; }
@media (min-width: 701px) { .map { min-height: 480px; } }
.map-wrap { align-self: center; }

/* ---------- ЗАПИС ---------- */
.appt { display: grid; }
@media (min-width: 701px) { .appt { grid-template-columns: .9fr 1.1fr; } }
.appt__left { background: var(--white); padding: 64px var(--pad); display: flex; flex-direction: column; }
.appt__right { background: var(--form-panel); padding: 56px var(--pad) 64px; }
@media (min-width: 701px) { .appt__left, .appt__right { padding-block: 96px; } }
.appt__title { font-size: clamp(36px, 11.5vw, 46px); line-height: 1.06; font-weight: 500; letter-spacing: -0.045em; }
@media (min-width: 701px) { .appt__title { font-size: clamp(36px, 4.7vw, 72px); } }
.appt__title .soft { color: var(--muted); }
.appt__left .lead { margin-top: 28px; }
.appt__calm { margin-top: 32px; display: flex; align-items: center; gap: 16px; font-size: 15px; }
.appt__calm::before { content: ''; width: 40px; height: 1px; background: var(--ink); }
.appt__left .note { margin-top: 40px; padding-top: 24px; }
@media (min-width: 701px) { .appt__left .note { margin-top: auto; } }

.form-wrap { max-width: 600px; }
.form-wrap h3 { font-size: 28px; font-weight: 500; letter-spacing: -0.03em; }
.form-wrap > p { margin-top: 6px; font-size: 15px; color: #4d473f; }
.form { margin-top: 32px; }
.form fieldset { border: 0; padding: 0; margin: 0; display: grid; gap: 20px; }
@media (min-width: 560px) and (max-width: 700px) { .form fieldset { grid-template-columns: 1fr 1fr; } .field--full { grid-column: 1 / -1; } }
@media (min-width: 1101px) { .form fieldset { grid-template-columns: 1fr 1fr; } .field--full { grid-column: 1 / -1; } }
.field label { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; font-weight: 500; margin-bottom: 8px; }
.field label span { color: #5a544b; font-weight: 400; }
.input {
  width: 100%; min-height: 56px; padding: 0 16px; border-radius: 8px; border: 1px solid var(--field-line);
  background: rgba(255, 253, 249, .92); font-size: 16px; color: var(--ink); appearance: none; -webkit-appearance: none;
  transition: border-color .2s, box-shadow .2s;
}
.input::placeholder { color: #6f675b; }
.input:focus { outline: none; border-color: var(--accent-ink); box-shadow: 0 0 0 3px rgba(122, 90, 38, .18); }
.input[aria-invalid='true'] { border-color: var(--error); }
select.input { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' fill='none' stroke='%23141311' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m4.5 7 4.5 4.5L13.5 7'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 16px center; padding-right: 44px; }
input[type='date'].input { line-height: 54px; }
.err { margin-top: 6px; font-size: 13px; color: var(--error); }
.err:empty { display: none; }
.field label.check { font-size: 15px; font-weight: 400; justify-content: flex-start; margin-bottom: 0; }
.check { display: flex; gap: 12px; align-items: flex-start; font-size: 15px; line-height: 1.5; cursor: pointer; min-height: 44px; padding-top: 4px; }
.check input { width: 22px; height: 22px; margin: 0; flex: none; accent-color: var(--ink); }
.btn {
  min-height: 56px; border-radius: 8px; padding: 0 24px; background: var(--ink); color: var(--paper);
  display: inline-flex; align-items: center; justify-content: space-between; gap: 24px; font-size: 16px; font-weight: 500; width: 100%;
  transition: background-color .2s;
}
.btn:hover:not(:disabled) { background: #3a3128; }
.btn:disabled { opacity: .7; }
.success { text-align: left; padding: 8px 0; }
.success__icon { width: 64px; height: 64px; border-radius: 50%; background: var(--ink); color: var(--paper); display: grid; place-items: center; }
.success h3 { margin-top: 28px; font-size: 28px; font-weight: 500; letter-spacing: -0.03em; }
.success p { margin-top: 12px; font-size: 16px; line-height: 1.7; max-width: 32em; }
.success .note { font-size: 14px; }
.success__id { margin-top: 20px; font-size: 14px; color: var(--muted); }
.success__id b { color: var(--ink); font-weight: 500; letter-spacing: .06em; }
.success .btn { margin-top: 32px; width: auto; }
.success:focus { outline: none; }

/* ---------- FAQ ---------- */
.faq__grid { display: grid; gap: 40px; }
@media (min-width: 701px) { .faq__grid { grid-template-columns: .75fr 1.25fr; gap: 64px; } }
.faq__intro .lead { margin-top: 20px; }
.faq__intro .link-line { margin-top: 32px; }
.faq__list { border-top: 1px solid var(--line); }
.faq__item { border-bottom: 1px solid var(--line); }
.faq__q { width: 100%; min-height: 80px; padding: 24px 0; display: flex; align-items: center; justify-content: space-between; gap: 24px; text-align: left; font-size: 18px; font-weight: 500; letter-spacing: -0.015em; line-height: 1.35; }
@media (min-width: 701px) { .faq__q { font-size: 20px; } }
.faq__q .icon { color: var(--accent-ink); }
.faq__q .minus { display: none; }
.faq__q[aria-expanded='true'] .plus { display: none; }
.faq__q[aria-expanded='true'] .minus { display: block; }
.faq__a { padding: 0 48px 28px 0; font-size: 16px; line-height: 1.8; color: #3e3a34; max-width: 44em; }

/* ---------- ФУТЕР ---------- */
.footer { background: var(--ink); color: var(--paper); padding: 48px var(--pad) 32px; }
.footer__top { display: grid; gap: 40px; }
@media (min-width: 901px) { .footer__top { grid-template-columns: 1fr 1fr auto; align-items: start; } }
.footer__links { margin-top: 20px; display: flex; flex-wrap: wrap; gap: 4px 24px; }
.footer__links a { min-height: 44px; display: inline-flex; align-items: center; font-size: 15px; color: rgba(243, 239, 232, .78); }
.footer__links a:hover { color: var(--paper); }
.footer__contact { font-style: normal; font-size: 15px; line-height: 1.8; color: rgba(243, 239, 232, .78); }
.footer__contact a { color: var(--paper); display: inline-flex; min-height: 44px; align-items: center; }
.footer__up { display: inline-flex; align-items: center; gap: 12px; min-height: 44px; font-size: 15px; }
.footer__bottom { margin-top: 40px; padding-top: 24px; border-top: 1px solid rgba(243, 239, 232, .16); display: grid; gap: 12px; font-size: 13px; line-height: 1.7; color: rgba(243, 239, 232, .62); }
@media (min-width: 901px) { .footer__bottom { grid-template-columns: 1fr auto; } .footer__bottom p:last-child { text-align: right; max-width: 36em; } }
.footer__demo { color: var(--gold-soft); }

/* ---------- Нижня панель на телефоні ---------- */
.mbar { display: none; }
@media (max-width: 700px) {
  :root { --bar-h: calc(64px + env(safe-area-inset-bottom)); }
  .mbar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; display: grid; grid-template-columns: 1fr 1fr 1.25fr; gap: 8px;
    padding: 8px 12px calc(8px + env(safe-area-inset-bottom)); background: rgba(20, 19, 17, .96); color: var(--paper);
    border-top: 1px solid rgba(243, 239, 232, .12);
  }
  .mbar a { min-height: 48px; border-radius: 8px; display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 15px; font-weight: 500; border: 1px solid rgba(243, 239, 232, .22); }
  .mbar a.mbar__call { background: var(--gold); border-color: var(--gold); color: var(--ink); }
}

.toast {
  position: fixed; left: 50%; bottom: calc(var(--bar-h) + 16px); z-index: 60; max-width: calc(100% - 32px);
  transform: translate(-50%, 12px); opacity: 0; pointer-events: none;
  background: var(--ink); color: var(--paper); border: 1px solid rgba(243, 239, 232, .2); border-radius: 8px; padding: 12px 16px; font-size: 15px;
  transition: opacity .25s var(--ease), transform .25s var(--ease);
}
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Анімації ---------- */
@keyframes float-a { 0%, 100% { transform: translateY(0) rotate(-2deg); } 50% { transform: translateY(-12px) rotate(2deg); } }
@keyframes float-b { 0%, 100% { transform: translateY(-8px) rotate(2deg); } 50% { transform: translateY(8px) rotate(-2deg); } }
@keyframes service-float { 0%, 100% { transform: translateY(4px) rotate(-.6deg); } 50% { transform: translateY(-8px) rotate(.6deg); } }
@keyframes detail-enter { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

/* ---------- Зменшення руху ----------
   Вмикається класом .reduce-motion на <html> (див. EMAL_RESPECT_REDUCED_MOTION у js/data.js).
   Зараз вимкнено на прохання власника: анімація повна завжди. */
.reduce-motion { scroll-behavior: auto; }
.reduce-motion *, .reduce-motion *::before, .reduce-motion *::after { animation: none !important; transition: none !important; }
.reduce-motion .hero { height: 100svh; --p: 0 !important; }
.reduce-motion .hero__title { transform: translateY(calc(-50% - 25svh)) scale(.66); }
.reduce-motion .hero__slogan { opacity: 1; transform: none; visibility: visible; }
.reduce-motion .hero__slogan[data-hidden] { visibility: visible; }
.reduce-motion .hero__progress { display: none; }
.reduce-motion .inst { opacity: calc(var(--o) * .5); }
.reduce-motion .inst--near, .reduce-motion .inst--tray { opacity: .3; }
.reduce-motion .hero__where { font-size: 22px; }
