/* ============================================================
   Глинская Анна Валерьевна — врач-стоматолог
   Warm clinical editorial · self-contained, no external assets
   ============================================================ */

/* ---------- 1. Tokens ---------- */
:root {
  --canvas: #FAF6EF;
  --surface: #FFFCF6;
  --surface-2: #F1EADF;
  --ink: #1C2B27;
  --ink-muted: #4E5A53;
  --ink-faint: #6B746E;
  --accent: #2F5B4F;
  --accent-ink: #274D43;
  --accent-soft: #DCE7E0;
  --clay: #A9663A;
  --line: rgba(28, 43, 39, 0.14);
  --line-strong: rgba(28, 43, 39, 0.26);
  --danger: #A2361F;

  --radius-lg: 32px;
  --radius-md: 20px;
  --radius-sm: 14px;
  --radius-pill: 999px;

  --shadow-soft: 0 24px 48px -24px rgba(28, 43, 39, 0.16);
  --shadow-panel: 0 40px 80px -60px rgba(28, 43, 39, 0.55);

  --font-display: "Prata", "Times New Roman", serif;
  --font-sans: "Golos Text", "Helvetica Neue", Arial, sans-serif;

  --ease: cubic-bezier(0.32, 0.72, 0, 1);
  --gutter: clamp(18px, 4vw, 40px);
}

/* ---------- 2. Reset ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

body,
h1, h2, h3, p, ul, ol, figure, dl, dd { margin: 0; }

ul, ol { padding: 0; list-style: none; }

img, svg { display: block; max-width: 100%; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  background: var(--canvas);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

main { display: block; }

[hidden] { display: none !important; }

:where(a, button, summary, input, select, textarea):focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* ---------- 3. Layout ---------- */
.wrap {
  width: 100%;
  max-width: 1180px;
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section { padding-block: clamp(52px, 7vw, 96px); }

section[id] { scroll-margin-top: 104px; }

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 100;
  padding: 12px 20px;
  border-radius: var(--radius-pill);
  background: var(--accent);
  color: #FBF7F0;
  font-size: 14px;
  text-decoration: none;
  transform: translateY(-180%);
  transition: transform 0.35s var(--ease);
}
.skip-link:focus { transform: translateY(0); }

.eyebrow {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

/* ---------- 4. Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 15px 18px 15px 24px;
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 500;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  transition:
    transform 0.5s var(--ease),
    background-color 0.4s var(--ease),
    border-color 0.4s var(--ease),
    color 0.4s var(--ease),
    box-shadow 0.5s var(--ease);
}
.btn:active { transform: scale(0.985); }

.btn--primary {
  background: var(--accent);
  color: #FBF7F0;
  box-shadow: 0 16px 32px -20px rgba(47, 91, 79, 0.85);
}
.btn--primary:hover {
  background: var(--accent-ink);
  box-shadow: 0 20px 38px -20px rgba(47, 91, 79, 0.75);
}

.btn--ghost {
  padding-inline: 26px;
  border-color: var(--line-strong);
  color: var(--ink);
}
.btn--ghost:hover {
  border-color: var(--ink);
  background: rgba(28, 43, 39, 0.04);
}

.btn--sm {
  padding: 11px 12px 11px 18px;
  font-size: 14px;
  gap: 10px;
}

.btn__icon {
  display: inline-grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(251, 247, 240, 0.16);
  transition: transform 0.5s var(--ease), background-color 0.4s var(--ease);
}
.btn--sm .btn__icon { width: 22px; height: 22px; }

.btn--primary:hover .btn__icon {
  transform: translate(1px, -1px) scale(1.06);
  background: rgba(251, 247, 240, 0.26);
}

/* ---------- 5. Navigation ---------- */
.nav-shell {
  position: fixed;
  inset: clamp(12px, 2.2vw, 22px) 0 auto;
  display: flex;
  justify-content: center;
  padding-inline: 16px;
  z-index: 60;
  pointer-events: none;
}

.nav {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: clamp(18px, 3vw, 40px);
  padding: 9px 9px 9px 22px;
  border-radius: var(--radius-pill);
  background: rgba(250, 246, 239, 0.74);
  -webkit-backdrop-filter: blur(18px) saturate(1.15);
  backdrop-filter: blur(18px) saturate(1.15);
  box-shadow:
    inset 0 0 0 1px rgba(28, 43, 39, 0.1),
    0 18px 40px -30px rgba(28, 43, 39, 0.6);
}

.nav__mark {
  font-family: var(--font-display);
  font-size: 16px;
  letter-spacing: 0.005em;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: clamp(16px, 2.2vw, 28px);
}

.nav__links a {
  position: relative;
  display: inline-block;
  padding-block: 6px;
  font-size: 14px;
  color: var(--ink-muted);
  text-decoration: none;
  transition: color 0.35s var(--ease);
}
.nav__links a:hover { color: var(--ink); }

.nav__links a::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.45s var(--ease);
}
.nav__links a:hover::after,
.nav__links a[aria-current="true"]::after { transform: scaleX(1); }

/* ---------- 6. Hero ---------- */
.hero {
  padding-top: clamp(112px, 15vw, 172px);
  padding-bottom: clamp(36px, 5vw, 64px);
  background-image: radial-gradient(
    52% 44% at 76% 6%,
    rgba(220, 231, 224, 0.9) 0%,
    rgba(250, 246, 239, 0) 72%
  );
}

.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(0, 0.72fr);
  gap: clamp(32px, 5vw, 76px);
  align-items: start;
}

.hero__title {
  margin-top: 14px;
  max-width: 15ch;
  font-family: var(--font-display);
  font-size: clamp(38px, 5.6vw, 74px);
  font-weight: 400;
  line-height: 1.04;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

.hero__lede {
  margin-top: clamp(20px, 2.4vw, 28px);
  max-width: 46ch;
  font-size: clamp(16px, 1.1vw, 17.5px);
  line-height: 1.65;
  color: var(--ink-muted);
  text-wrap: pretty;
}

.hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: clamp(28px, 3.4vw, 40px);
}

.hero__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 20px;
  margin-top: clamp(34px, 4.6vw, 54px);
  padding-top: 20px;
  border-top: 1px solid var(--line);
  font-size: 13px;
  color: var(--ink-faint);
}

.hero__meta li { display: flex; align-items: center; }

/* Portrait / monogram card */
.portrait {
  padding: 9px;
  border-radius: var(--radius-lg);
  background: linear-gradient(170deg, #FFFDF8 0%, #EDE4D5 100%);
  box-shadow:
    inset 0 0 0 1px var(--line),
    0 44px 70px -54px rgba(28, 43, 39, 0.7);
}

.portrait__inner {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 3 / 4;
  border-radius: calc(var(--radius-lg) - 9px);
  overflow: hidden;
  background: var(--surface-2);
}

.portrait__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ---------- 7. Intro ---------- */
.intro { padding-block: clamp(48px, 6.5vw, 92px); }

.intro__text {
  max-width: 58ch;
  font-family: var(--font-display);
  font-size: clamp(19px, 1.75vw, 26px);
  line-height: 1.52;
  letter-spacing: -0.005em;
  color: var(--ink);
  text-wrap: pretty;
}

/* ---------- 8. Section head ---------- */
.section-head {
  display: grid;
  gap: 16px;
  max-width: 36ch;
  margin-bottom: clamp(34px, 4.4vw, 58px);
}

.section-head__title {
  font-family: var(--font-display);
  font-size: clamp(26px, 3.2vw, 42px);
  font-weight: 400;
  line-height: 1.12;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

/* ---------- 9. Principles ---------- */
.principles { border-top: 1px solid var(--line); }

.principle {
  display: grid;
  grid-template-columns: 76px minmax(0, 270px) minmax(0, 1fr);
  gap: clamp(14px, 2.6vw, 46px);
  align-items: start;
  padding-block: clamp(22px, 2.8vw, 32px);
  border-bottom: 1px solid var(--line);
}

.principle:nth-child(2) { padding-left: clamp(0px, 4vw, 64px); }

.principle__num {
  padding-top: 3px;
  font-family: var(--font-display);
  font-size: 13px;
  letter-spacing: 0.12em;
  color: var(--clay);
}

.principle__title {
  font-size: 18px;
  font-weight: 500;
  line-height: 1.35;
}

.principle__text {
  max-width: 54ch;
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink-muted);
}

/* ---------- 10. Services ---------- */
.services { border-top: 1px solid var(--line); }

.service {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(8px, 2.6vw, 46px);
  align-items: baseline;
  padding-block: clamp(16px, 2.2vw, 24px);
  border-bottom: 1px solid var(--line);
  transition: color 0.35s var(--ease);
}

.service__title {
  font-size: clamp(17px, 1.4vw, 19px);
  font-weight: 500;
  line-height: 1.4;
  transition: color 0.35s var(--ease);
}
.service:hover .service__title { color: var(--accent); }

.service__text {
  font-size: 15.5px;
  line-height: 1.6;
  color: var(--ink-muted);
}

.services__note {
  margin-top: 22px;
  font-size: 13.5px;
  color: var(--ink-faint);
}

/* ---------- 11. Statement band ---------- */
.band {
  padding-block: clamp(52px, 7.5vw, 96px);
  background-color: var(--accent);
  background-image:
    radial-gradient(90% 120% at 88% 0%, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0) 62%),
    radial-gradient(70% 90% at 0% 100%, rgba(0, 0, 0, 0.14) 0%, rgba(0, 0, 0, 0) 60%);
  color: #F7F3EA;
}

.band__text {
  max-width: 18ch;
  font-family: var(--font-display);
  font-size: clamp(28px, 4.4vw, 56px);
  line-height: 1.16;
  letter-spacing: -0.01em;
}

/* ---------- 12. Process ---------- */
.steps {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(20px, 3vw, 40px);
}

.steps::before {
  content: "";
  position: absolute;
  inset: 9px 0 auto;
  height: 1px;
  background: var(--line);
}

.step {
  position: relative;
  padding-top: 38px;
}

.step__num {
  position: absolute;
  top: 0;
  left: 0;
  padding-right: 14px;
  background: var(--canvas);
  font-family: var(--font-display);
  font-size: 13px;
  line-height: 18px;
  letter-spacing: 0.14em;
  color: var(--clay);
}

.step__title {
  font-size: 17px;
  font-weight: 500;
  line-height: 1.4;
}

.step__text {
  margin-top: 8px;
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink-muted);
}

/* ---------- 13. FAQ ---------- */
.faq { border-top: 1px solid var(--line); max-width: 920px; }

.faq__item { border-bottom: 1px solid var(--line); }

.faq__q {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-block: clamp(18px, 2.2vw, 24px);
  font-size: clamp(16px, 1.3vw, 18px);
  font-weight: 500;
  color: var(--ink);
  cursor: pointer;
  list-style: none;
  transition: color 0.35s var(--ease);
}
.faq__q::-webkit-details-marker { display: none; }
.faq__q:hover { color: var(--accent); }

.faq__sign {
  position: relative;
  flex: 0 0 auto;
  width: 14px;
  height: 14px;
  color: var(--ink-muted);
}
.faq__sign::before,
.faq__sign::after {
  content: "";
  position: absolute;
  background: currentColor;
  border-radius: 1px;
  transition: transform 0.45s var(--ease), opacity 0.3s var(--ease);
}
.faq__sign::before { inset: 6.5px 0 auto; height: 1px; }
.faq__sign::after { inset: 0 auto 0 6.5px; width: 1px; }

.faq__item[open] .faq__sign::after {
  transform: scaleY(0);
  opacity: 0;
}

.faq__a {
  max-width: 66ch;
  padding-right: clamp(20px, 6vw, 96px);
  padding-bottom: clamp(18px, 2.2vw, 24px);
  font-size: 15.5px;
  line-height: 1.65;
  color: var(--ink-muted);
}

.faq__item[open] .faq__a { animation: faq-in 0.4s var(--ease) both; }

@keyframes faq-in {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: none; }
}

/* ---------- 14. Booking ---------- */
.section--booking { padding-bottom: clamp(64px, 8.5vw, 112px); }

.booking__panel {
  padding: 10px;
  border-radius: 40px;
  background: linear-gradient(180deg, #FFFDF8 0%, #F2EADC 100%);
  box-shadow:
    inset 0 0 0 1px var(--line),
    var(--shadow-panel);
}

.booking__core {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  gap: clamp(28px, 4vw, 64px);
  padding: clamp(26px, 4.2vw, 56px);
  border-radius: 30px;
  background: var(--surface);
  box-shadow: inset 0 0 0 1px rgba(28, 43, 39, 0.06);
}

.booking__title {
  margin-top: 14px;
  font-family: var(--font-display);
  font-size: clamp(28px, 3.4vw, 44px);
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -0.01em;
}

.booking__lede {
  margin-top: 16px;
  max-width: 38ch;
  font-size: 15.5px;
  line-height: 1.65;
  color: var(--ink-muted);
}

.contacts {
  margin-top: clamp(26px, 3.4vw, 40px);
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.contacts__links {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}

.contacts__links a {
  font-size: 14px;
  font-weight: 500;
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 5px;
}
.contacts__links a:hover { color: var(--accent-ink); }

.contacts__email {
  margin-top: 18px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--ink-muted);
}

.contacts__email a {
  color: var(--ink);
  font-weight: 500;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
  transition: color 0.35s var(--ease);
}
.contacts__email a:hover { color: var(--accent); }

.contacts__location {
  margin-top: 8px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--ink-muted);
}

/* Form */
.form { display: grid; gap: 16px; align-content: start; }

.field__label {
  display: block;
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink);
}

.field__opt {
  font-weight: 400;
  color: var(--ink-faint);
}

.field__input {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--canvas);
  font-family: var(--font-sans);
  font-size: 15.5px;
  line-height: 1.4;
  color: var(--ink);
  transition: border-color 0.3s var(--ease), box-shadow 0.3s var(--ease), background-color 0.3s var(--ease);
}

.field__input::placeholder { color: var(--ink-faint); opacity: 0.85; }

.field__input:focus {
  outline: none;
  border-color: var(--accent);
  background: #FFFFFF;
  box-shadow: 0 0 0 4px rgba(47, 91, 79, 0.12);
}

.field__input[aria-invalid="true"] {
  border-color: var(--danger);
  box-shadow: 0 0 0 4px rgba(162, 54, 31, 0.1);
}

.field__input--area {
  min-height: 96px;
  resize: vertical;
}

.field__select { position: relative; }

.field__select select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 44px;
  cursor: pointer;
}

.field__chev {
  position: absolute;
  top: 50%;
  right: 17px;
  translate: 0 -50%;
  pointer-events: none;
  color: var(--ink-muted);
}

.field__error {
  margin-top: 6px;
  font-size: 13px;
  line-height: 1.4;
  color: var(--danger);
}

.consent {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  column-gap: 12px;
  row-gap: 6px;
  align-items: start;
  margin-top: 2px;
}

.consent__box {
  width: 18px;
  height: 18px;
  margin: 2px 0 0;
  accent-color: var(--accent);
  cursor: pointer;
}

.consent__label {
  font-size: 14px;
  line-height: 1.45;
  color: var(--ink-muted);
  cursor: pointer;
}

.consent .field__error { grid-column: 2; }

.form__submit {
  justify-self: start;
  margin-top: 6px;
}

/* Success state */
.form-success {
  display: grid;
  gap: 14px;
  align-content: start;
}

.form-success__title {
  font-family: var(--font-display);
  font-size: clamp(22px, 2.2vw, 28px);
  line-height: 1.2;
}

.form-success__text {
  font-size: 15px;
  color: var(--ink-muted);
}

.form-success__out {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--canvas);
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.6;
  color: var(--ink);
  resize: vertical;
}

.form-success__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
}

.form-success__reset {
  padding: 8px 0;
  border: 0;
  background: none;
  font-family: var(--font-sans);
  font-size: 14px;
  color: var(--ink-faint);
  text-decoration: underline;
  text-underline-offset: 5px;
  cursor: pointer;
  transition: color 0.3s var(--ease);
}
.form-success__reset:hover { color: var(--ink); }

/* ---------- 15. Footer ---------- */
.footer {
  padding-block: clamp(32px, 4.6vw, 52px);
  border-top: 1px solid var(--line);
}

.footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}

.footer__mark {
  display: block;
  font-family: var(--font-display);
  font-size: 18px;
}

.footer__role {
  display: block;
  margin-top: 6px;
  font-size: 13.5px;
  color: var(--ink-faint);
}

.footer__legal {
  display: grid;
  justify-items: end;
  gap: 10px;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--ink-faint);
  text-align: right;
}

.footer__top {
  font-size: 13px;
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 5px;
}

/* ---------- 16. Reveal ---------- */
.principles > .principle:nth-child(1),
.services > .service:nth-child(1),
.steps > .step:nth-child(1) { --i: 0; }

.principles > .principle:nth-child(2),
.services > .service:nth-child(2),
.steps > .step:nth-child(2) { --i: 1; }

.principles > .principle:nth-child(3),
.services > .service:nth-child(3),
.steps > .step:nth-child(3) { --i: 2; }

.services > .service:nth-child(4),
.steps > .step:nth-child(4) { --i: 3; }

.services > .service:nth-child(5) { --i: 4; }

.js .reveal {
  opacity: 0;
  transform: translate3d(0, 18px, 0);
  transition:
    opacity 0.8s var(--ease),
    transform 0.8s var(--ease);
  transition-delay: calc(var(--i, 0) * 70ms);
}

.js .reveal.is-in {
  opacity: 1;
  transform: none;
}

/* ---------- 17. Responsive ---------- */
@media (max-width: 1020px) {
  .principle {
    grid-template-columns: 64px minmax(0, 200px) minmax(0, 1fr);
  }
  .principle:nth-child(2) { padding-left: clamp(0px, 2.5vw, 32px); }
}

@media (max-width: 900px) {
  .hero__grid { grid-template-columns: 1fr; }
  .portrait { max-width: 420px; }
  .hero__title { max-width: 18ch; }

  .booking__core { grid-template-columns: 1fr; }

  .steps { grid-template-columns: 1fr; gap: 0; }
  .steps::before { display: none; }
  .step {
    padding: 22px 0;
    border-top: 1px solid var(--line);
  }
  .step:last-child { border-bottom: 1px solid var(--line); }
  .step__num {
    position: static;
    display: block;
    margin-bottom: 8px;
    padding-right: 0;
    background: none;
  }
}

@media (max-width: 860px) {
  .nav__links { display: none; }
  .nav {
    width: 100%;
    justify-content: space-between;
    padding-left: 20px;
  }
  section[id] { scroll-margin-top: 92px; }
}

@media (max-width: 760px) {
  .principle {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .principle:nth-child(2) { padding-left: 0; }
  .principle__num { padding-top: 0; }
  .principle__title { font-size: 17px; }

  .service { grid-template-columns: 1fr; gap: 6px; }

  .hero__meta { font-size: 12.5px; }

  .footer__inner { align-items: flex-start; }
  .footer__legal { justify-items: start; text-align: left; }
}

@media (max-width: 520px) {
  .hero__cta { gap: 10px; }
  .btn { width: 100%; justify-content: space-between; }
  .btn--sm { width: auto; }
  .hero__meta { gap: 6px 14px; }
  .form__submit { width: 100%; justify-content: space-between; }
  .contacts__links { flex-wrap: wrap; gap: 14px; }
}

/* ---------- 18. Motion & print ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  .js .reveal {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

@media print {
  .nav-shell,
  .skip-link,
  .form,
  .form-success,
  .footer__top { display: none !important; }

  body { background: #FFFFFF; color: #000000; }
  .band { background: none; color: var(--ink); }
  .booking__panel,
  .booking__core { box-shadow: none; background: none; }
  .js .reveal { opacity: 1 !important; transform: none !important; }
}
