/* ============================================================
   drismailov.pro — дизайн-система
   Палитра: тёплый off-white, глубокий сине-зелёный, графит
   Типографика: Playfair Display (заголовки) + Inter (текст)
   ============================================================ */

:root {
  --bg:        #faf8f4;
  --bg-tint:   #f1ede5;
  --ink:       #23282a;
  --ink-soft:  #55605f;
  --accent:    #14554e;
  --accent-2:  #0e3f3a;
  --accent-soft: #dbe7e2;
  --line:      #e3ddd1;
  --white:     #ffffff;
  --surface:   #ffffff;
  --on-accent: #ffffff;
  --dark:      #142523;
  --dark-ink:  #e8efec;
  --nav-bg:    rgba(250, 248, 244, .88);
  --radius:    14px;
  --shadow:    0 10px 40px -12px rgba(20, 55, 50, .18);
  --font-head: "Playfair Display", Georgia, "Times New Roman", serif;
  --font-body: "Inter", -apple-system, "Segoe UI", Roboto, sans-serif;
}

html[data-theme="dark"] {
  --bg:        #101816;
  --bg-tint:   #14211f;
  --ink:       #edf5f2;
  --ink-soft:  #b9c7c3;
  --accent:    #8fcfbd;
  --accent-2:  #b3eadb;
  --accent-soft: #183d36;
  --line:      #29433e;
  --surface:   #192522;
  --on-accent: #08211d;
  --dark:      #07100f;
  --dark-ink:  #dcebe6;
  --nav-bg:    rgba(16, 24, 22, .9);
  --shadow:    0 14px 44px -14px rgba(0, 0, 0, .65);
  color-scheme: dark;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

h1, h2, h3 { font-family: var(--font-head); font-weight: 600; line-height: 1.15; }

h1 { font-size: clamp(2.6rem, 7vw, 4.4rem); letter-spacing: -.01em; }
h2 { font-size: clamp(1.8rem, 4.5vw, 2.6rem); margin-bottom: .5em; }
h3 { font-size: 1.15rem; font-family: var(--font-body); font-weight: 600; }

p { margin-bottom: 1em; }
p:last-child { margin-bottom: 0; }

a { color: var(--accent); }

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}
.section--dark :focus-visible, .footer :focus-visible { outline-color: var(--dark-ink); }

.container { max-width: 1120px; margin: 0 auto; padding: 0 20px; }

.kicker {
  text-transform: uppercase;
  letter-spacing: .14em;
  font-size: .78rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 1rem;
}

/* ------------------------------------------------ buttons */

.btn {
  display: inline-block;
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 600;
  font-size: .95rem;
  padding: 14px 28px;
  border: 1.5px solid var(--accent);
  border-radius: 999px;
  text-decoration: none;
  cursor: pointer;
  transition: background .2s, color .2s, transform .15s;
}
.btn:hover { background: var(--accent-2); border-color: var(--accent-2); transform: translateY(-1px); }
.btn--ghost { background: transparent; color: var(--accent); }
.btn--ghost:hover { background: var(--accent-soft); color: var(--accent-2); }
.btn--small { padding: 9px 18px; font-size: .85rem; }
.btn--full { width: 100%; }

/* ------------------------------------------------ nav */

.nav {
  position: sticky; top: 0; z-index: 50;
  background: var(--nav-bg);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav__inner { display: flex; align-items: center; gap: 28px; padding-top: 14px; padding-bottom: 14px; }
.nav__logo {
  display: inline-flex;
  align-items: center;
  color: var(--ink);
  text-decoration: none;
  margin-right: auto;
}
.nav__logo img {
  width: 174px;
  height: 52px;
  object-fit: contain;
}
.nav__links { display: flex; gap: 22px; }
.nav__links a {
  color: var(--ink-soft); text-decoration: none;
  font-size: .92rem; font-weight: 500;
}
.nav__links a:hover { color: var(--accent); }

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  padding: 0;
  transition: background .2s, border-color .2s, color .2s, transform .15s;
}
.theme-toggle:hover { border-color: var(--accent); transform: translateY(-1px); }
.theme-toggle__icon {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.theme-toggle__icon--sun { display: block; }
.theme-toggle__icon--moon { display: none; }
html[data-theme="dark"] .theme-toggle__icon--sun { display: none; }
html[data-theme="dark"] .theme-toggle__icon--moon { display: block; }

/* ------------------------------------------------ hero */

.hero { overflow: hidden; }
.hero__grid {
  display: grid;
  grid-template-columns: 6fr 5fr;
  gap: 48px;
  align-items: center;
  padding-top: 64px;
  padding-bottom: 72px;
}
.hero__lead { font-size: 1.13rem; color: var(--ink-soft); max-width: 34em; margin-top: 1.2rem; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 1.8rem; }

.hero__stats {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 20px; margin-top: 3rem;
  border-top: 1px solid var(--line); padding-top: 1.6rem;
}
.hero__stats dt { font-family: var(--font-head); font-size: 1.7rem; font-weight: 700; color: var(--accent); }
.hero__stats dd { font-size: .9rem; color: var(--ink-soft); margin-top: .25rem; overflow-wrap: break-word; }
.hero__stats div { min-width: 0; }

.hero__photo { position: relative; }
.hero__photo::before {
  content: ""; position: absolute; inset: 8% -6% -6% 10%;
  background: var(--accent-soft);
  border-radius: var(--radius);
  z-index: 0;
}
.hero__photo img {
  position: relative; z-index: 1;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  aspect-ratio: 4 / 5;
  object-fit: cover;
  width: 100%;
}

/* ------------------------------------------------ sections */

.section { padding: 76px 0; scroll-margin-top: 64px; }
.section--tinted { background: var(--bg-tint); }
.section--dark { background: var(--dark); color: var(--dark-ink); }
.section--dark h2 { color: var(--white); }
.section__head { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.section__note { color: var(--ink-soft); font-size: .9rem; }

/* ------------------------------------------------ about */

.about__grid { display: grid; grid-template-columns: 5fr 6fr; gap: 56px; align-items: center; }
.about__text p { color: var(--ink-soft); }
.about__text p:first-of-type { color: var(--ink); font-size: 1.05rem; }
.about__photos { position: relative; padding-bottom: 22%; }
.about__photo { border-radius: var(--radius); box-shadow: var(--shadow); }
.about__photo--main { width: 88%; aspect-ratio: 4 / 3; object-fit: cover; }
.about__photo--second {
  position: absolute; right: 0; bottom: 0;
  width: 42%; aspect-ratio: 3 / 4; object-fit: cover;
  border: 5px solid var(--bg);
}

/* ------------------------------------------------ timeline */

.timeline { list-style: none; max-width: 720px; margin-top: 2rem; }
.timeline__item {
  display: grid; grid-template-columns: 90px 1fr; gap: 24px;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
}
.timeline__item:last-child { border-bottom: 0; }
.timeline__year { font-family: var(--font-head); font-size: 1.5rem; font-weight: 700; color: var(--accent); }
.timeline__item p { color: var(--ink-soft); font-size: .93rem; margin-top: .2rem; }

/* ------------------------------------------------ services */

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 22px;
  margin-top: 2.2rem;
}
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px 26px;
  transition: transform .2s, box-shadow .2s;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.card__icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 52px; height: 52px;
  border-radius: 14px;
  background: var(--accent-soft);
  color: var(--accent);
  margin-bottom: 18px;
}
.card h3 { margin-bottom: .5rem; }
.card p { color: var(--ink-soft); font-size: .93rem; }

/* ------------------------------------------------ clinics */

.clinics { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; margin-top: 2.2rem; }
.clinic {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px 28px;
}
.clinic h3 { font-family: var(--font-head); font-size: 1.4rem; font-weight: 600; margin-bottom: .8rem; }
.clinic__address { font-weight: 500; }
.clinic__metro { color: var(--accent); font-size: .9rem; font-weight: 600; }
.clinic__note { color: var(--ink-soft); font-size: .88rem; margin-top: .6rem; }
.clinic__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 1.4rem; }

/* ------------------------------------------------ gallery */

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(238px, 1fr));
  gap: 20px;
  margin-top: 2.2rem;
}
.gallery--preview {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.gallery__item {
  min-width: 0;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
}
.gallery--preview .gallery__item:first-child {
  grid-column: span 2;
}
.gallery__media {
  display: grid;
  place-items: center;
  aspect-ratio: 4 / 3;
  background: #101311;
  overflow: hidden;
}
.gallery__item--photo .gallery__media {
  aspect-ratio: 4 / 5;
}
.gallery__item--scan .gallery__media {
  aspect-ratio: 3 / 4;
}
.gallery__item--scan-wide .gallery__media,
.gallery__item--landscape .gallery__media {
  aspect-ratio: 4 / 3;
}
.gallery__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.gallery__item--scan .gallery__media img,
.gallery__item--scan-wide .gallery__media img {
  object-fit: contain;
}
.gallery__item figcaption {
  padding: 18px 20px 20px;
  color: var(--ink);
  background: var(--surface);
  flex: 1;
}
.gallery__item strong {
  display: block;
  font-size: 1rem;
  line-height: 1.25;
  margin-bottom: .35rem;
}
.gallery__item span {
  display: block;
  font-size: .86rem;
  line-height: 1.45;
  color: var(--ink-soft);
}
.gallery__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
}
.gallery-hero {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 32px;
  margin-bottom: 36px;
  min-width: 0;
}
.gallery-hero > div {
  min-width: 0;
  max-width: 100%;
}
.gallery-hero h1 {
  max-width: 720px;
  overflow-wrap: break-word;
}
.gallery-hero__lead {
  color: var(--ink-soft);
  max-width: 42em;
  margin-top: 1rem;
  overflow-wrap: break-word;
}
.gallery-channel {
  margin-top: 52px;
  padding: 34px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-tint);
}
.gallery-channel p {
  color: var(--ink-soft);
  max-width: 42em;
}

/* ------------------------------------------------ reviews */

.reviews {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 22px;
  margin-top: 2.2rem;
}
.review {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px 28px;
  display: flex; flex-direction: column; gap: 18px;
}
.review blockquote { font-size: .97rem; color: var(--ink); flex: 1; }
.review blockquote::before { content: "«"; font-family: var(--font-head); font-size: 2.2rem; color: var(--accent); display: block; line-height: .6; margin-bottom: .5rem; }
.review figcaption { font-size: .85rem; font-weight: 600; color: var(--ink-soft); }
.review figcaption span { font-weight: 400; }

/* ------------------------------------------------ contact */

.contact__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: start; }
.contact__info p { color: var(--dark-ink); opacity: .85; max-width: 30em; }
.contact__links { list-style: none; margin-top: 1.6rem; display: grid; gap: 10px; }
.contact__links a {
  color: var(--white); text-decoration: none; font-weight: 500;
  display: inline-block; padding: 4px 0;
  border-bottom: 1px solid rgba(255,255,255,.25);
}
.contact__links a:hover { border-color: var(--white); }

.contact__form {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 34px 32px;
  color: var(--ink);
  display: grid; gap: 16px;
  box-shadow: var(--shadow);
}
.contact__form label { font-size: .87rem; font-weight: 600; display: grid; gap: 6px; }
.contact__form input[type="text"],
.contact__form input[type="tel"],
.contact__form input[type="password"],
.contact__form textarea {
  font: inherit; font-weight: 400;
  padding: 12px 14px;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  background: var(--bg);
  color: var(--ink);
  width: 100%;
}
.contact__form input:focus, .contact__form textarea:focus {
  outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent;
}
.checkbox { display: flex !important; gap: 10px; align-items: flex-start; font-weight: 400 !important; font-size: .8rem !important; color: var(--ink-soft); }
.checkbox input { margin-top: 2px; width: 19px; height: 19px; flex-shrink: 0; accent-color: var(--accent); }
.form__status { font-size: .9rem; font-weight: 600; min-height: 1.4em; margin: 0; }
.form__status.ok { color: var(--accent); }
.form__status.err { color: #b3261e; }

/* ------------------------------------------------ footer */

.footer { background: var(--dark); color: rgba(232, 239, 236, .68); padding: 34px 0 44px; font-size: .85rem; border-top: 1px solid rgba(255,255,255,.08); }
.footer p { margin-bottom: .4em; }
.footer a { color: rgba(232, 239, 236, .8); }
.footer__disclaimer { font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: rgba(232, 239, 236, .85); }
.footer__copy { margin-top: 1.2em; }

/* ------------------------------------------------ fab (mobile) */

.fab {
  display: none;
  position: fixed; left: 16px; right: 16px; bottom: 14px; z-index: 60;
  background: var(--accent); color: var(--on-accent);
  text-align: center; text-decoration: none;
  font-weight: 600; padding: 15px;
  border-radius: 999px;
  box-shadow: 0 8px 30px -6px rgba(14, 63, 58, .5);
  opacity: 0;
  pointer-events: none;
  transform: translateY(120%);
  transition: opacity .2s, transform .2s;
}
.fab.is-visible { opacity: 1; pointer-events: auto; transform: translateY(0); }

/* ------------------------------------------------ responsive */

@media (max-width: 900px) {
  .hero__grid { grid-template-columns: 1fr; padding-top: 36px; padding-bottom: 48px; gap: 36px; }
  .hero__photo { order: -1; max-width: 420px; }
  .hero__photo::before { inset: 10% -5% -5% 12%; }
  .about__grid { grid-template-columns: 1fr; gap: 40px; }
  .contact__grid { grid-template-columns: 1fr; gap: 36px; }
  .clinics { grid-template-columns: 1fr; }
  .gallery,
  .gallery--preview { grid-template-columns: 1fr 1fr; }
  .gallery--preview .gallery__item:first-child { grid-column: span 2; }
  .gallery-hero { align-items: start; flex-direction: column; }
  .nav__links { display: none; }
  .section { padding: 56px 0; }
}

@media (max-width: 640px) {
  h1 { font-size: clamp(2.1rem, 9.5vw, 2.6rem); }
  body { padding-bottom: 20px; }
  .container { padding-left: 18px; padding-right: 18px; }
  .nav__inner {
    position: relative;
    justify-content: space-between;
    gap: 14px;
    padding-top: 10px;
    padding-bottom: 10px;
  }
  .nav__logo { margin-right: 0; }
  .nav__logo img { width: 92px; height: 48px; }
  .theme-toggle {
    position: absolute;
    right: 18px;
    top: 50%;
    margin-left: 0;
    transform: translateY(-50%);
  }
  .theme-toggle:hover { transform: translateY(-50%); }
  .hero__grid { padding-top: 24px; padding-bottom: 44px; gap: 24px; }
  .hero__photo {
    justify-self: center;
    width: min(74vw, 286px);
    max-width: none;
  }
  .hero__photo::before { inset: 10% 0 -5% 9%; border-radius: 16px; }
  .hero__photo img { border-radius: 14px; }
  .kicker { font-size: .72rem; letter-spacing: .12em; margin-bottom: .75rem; }
  .hero__lead { font-size: 1rem; line-height: 1.55; margin-top: 1rem; }
  .hero__cta { margin-top: 1.45rem; gap: 12px; }
  .hero__cta .btn { width: 100%; text-align: center; }
  .hero__stats {
    grid-template-columns: 1fr;
    gap: 10px;
    border-top: 0;
    margin-top: 2rem;
    padding-top: 0;
  }
  .hero__stats div {
    display: block;
    padding: 15px 16px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--surface);
  }
  .hero__stats dt {
    font-size: clamp(1.65rem, 9vw, 2.05rem);
    line-height: 1;
    white-space: nowrap;
  }
  .hero__stats dd { font-size: .91rem; line-height: 1.45; margin-top: .4rem; }
  .about__grid { gap: 30px; }
  .about__photos { max-width: 350px; margin: 0 auto; padding-bottom: 46px; }
  .about__photo--main { width: 78%; aspect-ratio: 4 / 5; object-position: center; }
  .about__photo--second {
    width: 42%;
    right: 0;
    bottom: 4px;
    border-width: 4px;
  }
  .about__text p { line-height: 1.6; }
  .timeline__item { grid-template-columns: 64px 1fr; gap: 16px; }
  .gallery,
  .gallery--preview { grid-template-columns: 1fr; gap: 16px; }
  .gallery--preview .gallery__item:first-child { grid-column: auto; }
  .gallery__item figcaption { padding: 18px; }
  .gallery__actions .btn { width: 100%; text-align: center; }
  .gallery-channel { padding: 24px 20px; }
  .fab { display: block; }
  .nav .btn { display: none; }
  .theme-toggle { width: 40px; height: 40px; }
  .contact__form { padding: 26px 20px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, .card { transition: none; }
}
