/* =========================================================
   Алмазики — центр развития нейропотенциала
   Design tokens — ivory / deep teal / gold, matched to the brand seal.
   Single theme by design: no auto dark-mode switch.
   ========================================================= */
:root {
  /* tells browsers with a forced/auto dark mode (Mi Browser, Android
     "force dark", Samsung Internet, etc.) not to algorithmically
     recolor this page — it only has a light design */
  color-scheme: light;
  --paper: #F7F2E7;
  --paper-raised: #FFFFFF;
  --ink: #23312C;
  --ink-soft: #56655D;
  --gold: #C9A227;
  --gold-soft: #E4C878;
  --teal: #1E4A43;
  --teal-soft: #2F6158;
  --sage: #6FA089;
  --line: #E5DCC6;
  --shadow: 0 18px 40px -20px rgba(30, 74, 67, 0.28);

  --font-display: "Fraunces", "Iowan Old Style", Georgia, serif;
  --font-body: "Karla", "Segoe UI", system-ui, sans-serif;

  --facet-cut: 22px;
  --radius: 18px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: hidden; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}

body {
  margin: 0;
  /* safety net: stops any single stray element (long unbroken word, a grid
     track that doesn't shrink, etc.) from causing page-wide horizontal scroll */
  overflow-x: hidden;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, .stat-num {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  text-wrap: balance;
  margin: 0 0 0.5em;
  color: var(--ink);
}

h1 { font-size: clamp(2.1rem, 3.4vw, 2.9rem); font-weight: 600; letter-spacing: -0.01em; }
h2 { font-size: clamp(1.7rem, 2.8vw, 2.3rem); }
h3 { font-size: 1.25rem; margin-bottom: 0.4em; }
p { max-width: 65ch; }
a { color: inherit; }

.wrap {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 24px;
}

.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--gold); color: var(--teal);
  padding: 12px 18px; z-index: 200; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

.eyebrow {
  font-family: var(--font-body);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  font-size: 0.8rem;
  color: var(--teal);
  margin: 0 0 0.7em;
}

.section-head { max-width: 640px; margin-bottom: 2.6rem; }
.section-lead { color: var(--ink-soft); }
.section-lead a { color: var(--teal); font-weight: 700; text-decoration: underline; text-decoration-color: var(--gold); }

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

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  padding: 0.75em 1.5em;
  border-radius: 999px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.98rem;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.btn-primary {
  background: linear-gradient(135deg, var(--gold), var(--gold-soft));
  color: var(--teal);
  box-shadow: 0 10px 24px -10px rgba(201, 162, 39, 0.55);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 14px 28px -10px rgba(201, 162, 39, 0.6); }
.btn-ghost {
  background: transparent;
  border-color: var(--line);
  color: var(--teal);
}
.btn-ghost:hover { border-color: var(--teal); background: var(--teal); color: var(--paper); }
.btn-lg { padding: 0.95em 1.9em; font-size: 1.02rem; }
.btn-block { width: 100%; }
.btn-cta-price {
  flex-direction: column; gap: 0.3em; text-align: center;
  padding: 1.1em 1.9em; line-height: 1.25;
}
.btn-cta-price span { display: block; font-size: 1.05em; font-weight: 800; }
.btn-cta-price-amount { font-size: 1.35em; font-weight: 800; }

/* =========================================================
   Header
   ========================================================= */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1.5rem; padding-top: 10px; padding-bottom: 10px;
}
.logo { display: flex; align-items: center; gap: 0.7em; text-decoration: none; }
.logo-text {
  font-family: var(--font-display); font-style: normal; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.03em;
  font-size: 2.1rem; color: var(--teal);
}

.main-nav { display: flex; gap: 1.6rem; }
.main-nav a {
  text-decoration: none; font-weight: 600; font-size: 0.95rem; color: var(--ink-soft);
  padding: 0.3em 0; position: relative; white-space: nowrap;
}
.main-nav a:hover { color: var(--teal); }
.main-nav a.nav-highlight { color: var(--teal); display: flex; align-items: center; gap: 0.45em; }

.tag-new {
  display: inline-block; background: var(--gold); color: var(--teal);
  font-size: 0.62rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.04em;
  padding: 0.18em 0.55em; border-radius: 999px; line-height: 1.4;
}

.header-actions { display: flex; align-items: center; gap: 1.1rem; }
.phone-link { text-decoration: none; font-weight: 700; font-size: 0.95rem; white-space: nowrap; color: var(--teal); }

.nav-toggle {
  display: none; flex-direction: column; justify-content: center; gap: 5px;
  width: 40px; height: 40px; background: none; border: none; cursor: pointer;
}
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--ink); border-radius: 2px; }

/* =========================================================
   Hero
   ========================================================= */
.hero { position: relative; padding-top: 4rem; overflow: hidden; }
.hero-row {
  display: grid; grid-template-columns: 1.1fr 0.9fr; align-items: center; gap: 3rem;
  padding-bottom: 4rem;
}
.hero-lead { color: var(--ink-soft); font-size: 1.08rem; margin-bottom: 1.8rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.9rem; margin-bottom: 2rem; }

.trust-row { display: flex; align-items: center; gap: 1.1rem; flex-wrap: wrap; }
.trust-item { display: flex; align-items: center; gap: 0.5em; font-size: 0.92rem; color: var(--ink-soft); }
.trust-stars { color: var(--gold); letter-spacing: 1px; }
.trust-divider { width: 1px; height: 20px; background: var(--line); }
.badge-chip {
  display: inline-block; background: var(--paper-raised); border: 1px solid var(--gold-soft);
  padding: 0.35em 0.9em; border-radius: 999px; font-weight: 700; font-size: 0.85rem;
  box-shadow: var(--shadow); color: var(--teal);
}

.hero-visual { display: flex; justify-content: center; position: relative; }
.hero-visual::before {
  content: ""; position: absolute; inset: -6%;
  background: radial-gradient(circle, color-mix(in srgb, var(--gold-soft) 40%, transparent) 0%, transparent 70%);
  z-index: 0;
}
.hero-badge {
  position: relative; z-index: 1;
  width: 100%; max-width: 300px; aspect-ratio: 1 / 1;
  border-radius: 50%; overflow: hidden;
  box-shadow:
    0 22px 40px -16px rgba(30, 74, 67, 0.35),
    0 0 0 1px color-mix(in srgb, var(--gold-soft) 55%, transparent);
}
/* the source logo file has a faint dark ring right at its circular edge;
   scaling it up inside the clipped badge crops that ring out */
.hero-badge img { width: 111%; height: 111%; margin: -5.5%; display: block; object-fit: cover; }

.logo-badge {
  display: inline-flex; flex: 0 0 auto; border-radius: 50%; overflow: hidden;
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--gold-soft) 55%, transparent);
}
.logo-badge img { width: 111%; height: 111%; margin: -5.5%; display: block; object-fit: cover; }
.logo-badge--header { width: 44px; height: 44px; }
.logo-badge--footer { width: 34px; height: 34px; }

.wave-divider {
  display: block; width: 100%; height: 52px;
  /* matches the very next section (.diag-promo) so the wave joins it flush.
     negative margin closes a hairline sub-pixel gap some browsers leave
     between the SVG box and the section below it. */
  margin-bottom: -2px;
  fill: var(--teal);
}

/* =========================================================
   Diagnostika promo — accent band introducing the new service
   ========================================================= */
.diag-promo { background: var(--teal); color: var(--paper); padding: 3.6rem 0; overflow: hidden; }
.diag-promo-wrap { max-width: 1320px; }

.diag-promo-header { text-align: center; margin-bottom: 2.6rem; }
.tag-new--hero {
  font-size: 1rem;
  padding: 0.5em 1.3em;
  transform: rotate(-6deg);
  margin-bottom: 1rem;
  background: linear-gradient(110deg, var(--gold) 0%, var(--gold-soft) 22%, #fff6d9 40%, var(--gold-soft) 58%, var(--gold) 80%, var(--gold-soft) 100%);
  background-size: 260% 100%;
  box-shadow: 0 10px 22px -10px rgba(0, 0, 0, 0.4);
  animation: shimmer 3.2s ease-in-out infinite;
}
@keyframes shimmer {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}
@media (prefers-reduced-motion: reduce) {
  .tag-new--hero { animation: none; }
}
.diag-promo-kicker {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(1.6rem, 3.2vw, 2.3rem);
  text-transform: uppercase; letter-spacing: 0.02em;
  color: var(--paper); margin: 0 0 0.35rem;
}
.diag-promo-kicker-sub {
  display: block; width: 100%; text-align: center;
  font-family: var(--font-display); font-style: normal; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.02em;
  font-size: clamp(1.5rem, 3.4vw, 2.1rem);
  color: var(--gold-soft); margin: 0;
}

.diag-promo-row { display: grid; grid-template-columns: 1fr 1.05fr; align-items: center; gap: 2.6rem; }
.diag-promo .diag-promo-copy h2 { color: var(--paper); }
.diag-promo-lead { color: color-mix(in srgb, var(--paper) 80%, transparent); font-size: 1.02rem; max-width: 54ch; margin-bottom: 1.5rem; }

.diag-feature-list { list-style: none; margin: 0 0 1.8rem; padding: 0; display: grid; gap: 0.7rem; }
.diag-feature-list li {
  display: flex; align-items: center; gap: 0.7em; font-size: 0.96rem; font-weight: 600;
  color: color-mix(in srgb, var(--paper) 92%, transparent);
}
.diag-feature-list svg { color: var(--gold-soft); flex-shrink: 0; }

.diag-promo-actions { margin-bottom: 0; }

.diag-promo-visual { display: flex; justify-content: flex-end; align-items: center; position: relative; }
.diag-promo-visual::before {
  content: ""; position: absolute; inset: 6%;
  background: radial-gradient(circle, color-mix(in srgb, var(--sage) 35%, transparent) 0%, transparent 70%);
  z-index: 0;
}
.diag-promo-img {
  position: relative; z-index: 1;
  width: 100%; max-width: 600px;
  /* the source photo has a solid black background; screen-blending it
     against the section's teal drops the black out and keeps only the glow.
     note: this only works if no ancestor between here and .diag-promo has
     its own stacking context (transform/opacity/filter) — don't add
     .reveal or similar to .diag-promo-visual or its parents. */
  mix-blend-mode: screen;
}

@media (max-width: 980px) {
  .diag-promo-row { grid-template-columns: 1fr; }
  .diag-promo-visual { order: -1; max-width: 380px; margin: 0 auto; }
}

/* =========================================================
   About
   ========================================================= */
.about { background: var(--paper-raised); padding: 4.5rem 0; }
.about-row { display: grid; grid-template-columns: 1fr 1fr; gap: 3.5rem; align-items: start; }
.about-copy p { color: var(--ink-soft); }

.fact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; }
.fact-tile {
  background: var(--paper);
  border: 1px solid var(--line);
  padding: 1.3rem 1.3rem 1.4rem;
  clip-path: polygon(0 0, calc(100% - var(--facet-cut)) 0, 100% var(--facet-cut), 100% 100%, 0 100%);
}
.fact-tile svg { color: var(--teal); margin-bottom: 0.6rem; }
.fact-tile p { color: var(--ink-soft); font-size: 0.92rem; margin: 0; }

/* =========================================================
   Services
   ========================================================= */
.services { padding: 5rem 0; }
.services-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.4rem; }
.service-card {
  background: var(--paper-raised);
  border: 1px solid var(--line);
  padding: 1.7rem 1.6rem 1.5rem;
  clip-path: polygon(0 0, calc(100% - var(--facet-cut)) 0, 100% var(--facet-cut), 100% 100%, 0 100%);
  display: flex; flex-direction: column;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.service-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.service-icon {
  width: 46px; height: 46px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: color-mix(in srgb, var(--ic) 16%, transparent);
  color: var(--ic);
  margin-bottom: 1rem;
}
.service-card p { color: var(--ink-soft); font-size: 0.94rem; flex-grow: 1; }
.card-link {
  color: var(--teal); font-weight: 700; font-size: 0.92rem; margin-top: 0.8rem;
  text-decoration: underline; text-decoration-color: transparent;
  transition: color 0.15s ease, text-decoration-color 0.15s ease;
}
.card-link:hover { color: var(--ink); text-decoration-color: var(--gold); }
.service-card-unavailable { opacity: 0.72; }
.service-card-unavailable:hover { transform: none; box-shadow: none; }
.card-unavailable-note {
  margin-top: 0.8rem; flex-grow: 0;
  font-weight: 700; font-size: 0.86rem; color: var(--ink-soft);
}
.card-unavailable-note::before {
  content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%;
  background: var(--gold); margin-right: 0.5em; vertical-align: 0.1em;
}

/* =========================================================
   Process
   ========================================================= */
.process { background: var(--paper-raised); padding: 5rem 0; }
.process-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.6rem; }
.process-step { text-align: left; }
.step-mark {
  width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-weight: 700; font-size: 1.3rem;
  color: var(--gold-soft);
  background: var(--teal);
  clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
  margin-bottom: 0.9rem;
}
.process-step p { color: var(--ink-soft); font-size: 0.94rem; }

/* =========================================================
   Why / stats
   ========================================================= */
.why { padding: 3.6rem 0; background: var(--teal); color: var(--paper); }
.why-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; text-align: center; }
.why-stat { display: flex; flex-direction: column; gap: 0.3rem; }
.stat-num { font-size: 2.1rem; color: var(--gold-soft); display: flex; align-items: center; justify-content: center; gap: 0.15em; }
.stat-star { font-size: 1.3rem; }
.stat-badge { font-size: 1.05rem; }
.stat-label { color: color-mix(in srgb, var(--paper) 75%, transparent); font-size: 0.88rem; }

/* =========================================================
   Reviews — masonry grid of real reviews
   ========================================================= */
.reviews { padding: 5rem 0; }

.reviews-masonry { column-count: 3; column-gap: 1.2rem; }
.review-tile {
  break-inside: avoid;
  background: var(--paper-raised);
  border: 1px solid var(--line);
  padding: 1.5rem 1.6rem 1.6rem;
  margin: 0 0 1.2rem;
  clip-path: polygon(0 0, calc(100% - var(--facet-cut)) 0, 100% var(--facet-cut), 100% 100%, 0 100%);
  box-shadow: var(--shadow);
}
.review-tile-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 0.6rem; }
.review-tile-stars { color: var(--gold); letter-spacing: 2px; font-size: 0.95rem; }
.review-tile-date { color: var(--ink-soft); font-size: 0.78rem; white-space: nowrap; }
.review-tile-recommend {
  display: flex; align-items: center; gap: 0.4em; color: var(--sage);
  font-weight: 700; font-size: 0.8rem; margin: 0 0 0.75rem;
}
.review-tile-text { color: var(--ink); font-size: 0.95rem; margin: 0 0 0.9rem; }
.review-tile-author { color: var(--ink-soft); font-weight: 700; font-size: 0.86rem; margin: 0; }

.reviews-cta { text-align: center; margin-top: 2.2rem; }

/* =========================================================
   CTA banner
   ========================================================= */
.cta-banner { padding: 3.6rem 0; }
.cta-banner-row {
  background: var(--teal);
  color: var(--paper);
  padding: 3rem 3rem;
  clip-path: polygon(0 0, calc(100% - 40px) 0, 100% 40px, 100% 100%, 40px 100%, 0 calc(100% - 40px));
  display: flex; align-items: center; justify-content: space-between; gap: 2rem; flex-wrap: wrap;
}
.cta-banner-row h2 { color: var(--paper); max-width: 560px; margin: 0; }

/* =========================================================
   Contact
   ========================================================= */
.contact { background: var(--paper-raised); padding: 5rem 0; }
.contact-row { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 3rem; align-items: start; }

.booking-form { display: flex; flex-direction: column; gap: 1.1rem; margin-top: 1.6rem; }
.booking-form label { display: flex; flex-direction: column; gap: 0.4rem; font-weight: 700; font-size: 0.92rem; color: var(--ink-soft); }
.booking-form input, .booking-form select, .booking-form textarea {
  width: 100%; font-family: var(--font-body); font-size: 1rem; padding: 0.75em 0.9em;
  border: 1px solid var(--line); border-radius: 10px; background: var(--paper); color: var(--ink);
}
.booking-form textarea { resize: vertical; }
.booking-form-actions { display: flex; flex-wrap: wrap; gap: 0.9rem; }
.booking-form-actions .btn { flex: 1 1 200px; }
/* =========================================================
   Form result modal
   ========================================================= */
.modal-overlay {
  position: fixed; inset: 0; z-index: 300; padding: 1.2rem;
  display: flex; align-items: center; justify-content: center;
  background: color-mix(in srgb, var(--ink) 55%, transparent);
}
.modal-overlay[hidden] { display: none; }
.modal-card {
  position: relative; width: 100%; max-width: 380px;
  background: var(--paper-raised); padding: 2.4rem 2rem 2.1rem; text-align: center;
  clip-path: polygon(0 0, calc(100% - var(--facet-cut)) 0, 100% var(--facet-cut), 100% 100%, 0 100%);
  box-shadow: var(--shadow);
}
.modal-close {
  position: absolute; top: 0.7rem; right: 1rem; padding: 0.2em 0.4em;
  background: none; border: none; font-size: 1.5rem; line-height: 1;
  color: var(--ink-soft); cursor: pointer;
}
.modal-close:hover { color: var(--ink); }
.modal-icon {
  width: 56px; height: 56px; border-radius: 50%; margin: 0 auto 1.1rem;
  display: flex; align-items: center; justify-content: center;
}
.modal-icon--ok { background: color-mix(in srgb, var(--sage) 20%, transparent); color: var(--sage); }
.modal-icon--error { background: color-mix(in srgb, #b23b4e 18%, transparent); color: #b23b4e; }
.modal-card h3 { margin-bottom: 0.5rem; }
.modal-card p { color: var(--ink-soft); margin: 0; max-width: none; }

.contact-info { display: flex; flex-direction: column; gap: 1.4rem; }
.info-card {
  background: var(--paper);
  border: 1px solid var(--line);
  padding: 1.8rem 1.9rem;
  clip-path: polygon(0 0, calc(100% - var(--facet-cut)) 0, 100% var(--facet-cut), 100% 100%, 0 100%);
}
.info-card h3 { font-size: 0.95rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--teal); margin-bottom: 0.3em; font-family: var(--font-body); }
.info-card p { margin: 0 0 1.1em; color: var(--ink-soft); }
.inline-link { text-decoration: none; font-weight: 700; color: var(--ink); }
.info-actions { margin-top: 0.4rem; display: flex; gap: 0.8rem; flex-wrap: wrap; }
.map-embed { border: 1px solid var(--line); overflow: hidden; border-radius: var(--radius); }
.map-embed iframe { display: block; border: 0; }

/* =========================================================
   Footer
   ========================================================= */
.site-footer { background: var(--teal); color: var(--paper); padding-top: 3.4rem; }
.footer-row { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 2rem; padding-bottom: 2.4rem; border-bottom: 1px solid rgba(255,255,255,0.14); }
.footer-brand p { color: color-mix(in srgb, var(--paper) 70%, transparent); font-size: 0.9rem; margin-top: 0.6rem; }
.footer-brand .logo-text { color: var(--gold-soft); }
.footer-nav { display: flex; flex-direction: column; gap: 0.7rem; }
.footer-nav a { text-decoration: none; color: color-mix(in srgb, var(--paper) 85%, transparent); font-weight: 600; font-size: 0.94rem; }
.footer-nav a:hover { color: var(--gold-soft); }
.footer-contact p { margin: 0 0 0.6rem; color: color-mix(in srgb, var(--paper) 85%, transparent); font-size: 0.94rem; }
.footer-contact a { text-decoration: none; }
.footer-social { display: flex; gap: 0.9rem; margin-top: 0.9rem; }
.footer-social a {
  width: 34px; height: 34px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,0.1); color: var(--paper); transition: background 0.15s ease, color 0.15s ease;
}
.footer-social a:hover { background: var(--gold); color: var(--teal); }
.footer-legal {
  display: flex; justify-content: space-between; align-items: flex-start;
  flex-wrap: wrap; gap: 2rem;
  padding: 2.2rem 24px; border-top: 1px solid rgba(255,255,255,0.14);
}
.footer-legal-entity p {
  margin: 0 0 0.35rem; font-size: 0.78rem; letter-spacing: 0.02em; text-transform: uppercase;
  color: color-mix(in srgb, var(--paper) 65%, transparent);
}
.footer-legal-entity a { color: inherit; text-decoration: none; }
.footer-legal-entity a:hover { color: var(--gold-soft); }

.footer-legal-links { display: flex; flex-direction: column; align-items: flex-start; gap: 0.85rem; }
.footer-legal-links a {
  font-size: 0.94rem; font-weight: 600; text-decoration: none;
  color: color-mix(in srgb, var(--paper) 88%, transparent);
}
.footer-legal-links a:hover { color: var(--gold-soft); }
.footer-legal-license {
  margin: 0.5rem 0 0; max-width: 34ch; font-size: 0.78rem; line-height: 1.6;
  color: color-mix(in srgb, var(--paper) 55%, transparent);
}

@media (max-width: 700px) {
  .footer-legal { flex-direction: column; gap: 1.6rem; }
}
.footer-bottom { padding: 1rem 24px 1.8rem; text-align: center; font-size: 0.85rem; color: color-mix(in srgb, var(--paper) 60%, transparent); }

/* =========================================================
   Reveal on scroll
   ========================================================= */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.in-view { opacity: 1; transform: translateY(0); }

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 980px) {
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .process-row { grid-template-columns: repeat(2, 1fr); }
  .reviews-masonry { column-count: 2; }
  .why-row { grid-template-columns: repeat(2, 1fr); }
  .about-row, .contact-row { grid-template-columns: 1fr; }
  .hero-row { grid-template-columns: 1fr; text-align: left; }
  .hero-visual { order: -1; max-width: 240px; margin: 0 auto 1rem; }
  .footer-row { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .main-nav { display: none; }
  .nav-toggle { display: flex; }
  .phone-link { display: none; }
  .logo { gap: 0.4em; }
  .logo-text { font-size: 1.3rem; }
  .header-actions { gap: 0.6rem; }
  .header-actions .btn { padding: 0.6em 1em; font-size: 0.88rem; }
  .services-grid { grid-template-columns: 1fr; }
  .process-row { grid-template-columns: 1fr; }
  .why-row { grid-template-columns: 1fr 1fr; }
  .fact-grid { grid-template-columns: 1fr; }
  .cta-banner-row { flex-direction: column; align-items: flex-start; padding: 2.2rem; }
  .reviews-masonry { column-count: 1; }

  .main-nav.open {
    display: flex; flex-direction: column; position: absolute; top: 100%; left: 0; right: 0;
    background: var(--paper-raised); padding: 1.2rem 24px; border-bottom: 1px solid var(--line);
    gap: 1rem;
  }
}

/* =========================================================
   Chat widget (AI-консультант)
   ========================================================= */
.chat-widget { position: fixed; right: 20px; bottom: 20px; z-index: 250; }
.chat-toggle {
  display: flex; align-items: center; gap: 0.65em;
  height: 56px; padding: 0 1.2em 0 6px; border-radius: 999px; border: none; cursor: pointer;
  background: linear-gradient(135deg, var(--gold), var(--gold-soft));
  color: var(--teal); box-shadow: var(--shadow);
  font-family: var(--font-body); font-weight: 700; font-size: 0.95rem; white-space: nowrap;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.chat-toggle:hover { transform: translateY(-2px); box-shadow: 0 20px 34px -14px rgba(201, 162, 39, 0.55); }
.chat-toggle-icon {
  width: 44px; height: 44px; flex: none; border-radius: 50%;
  background: var(--teal); color: var(--paper);
  display: flex; align-items: center; justify-content: center;
}
.chat-toggle-icon svg { width: 21px; height: 21px; }
.chat-toggle .icon-close { display: none; }
.chat-widget.chat-widget--open .chat-toggle-icon .icon-chat { display: none; }
.chat-widget.chat-widget--open .chat-toggle-icon .icon-close { display: block; }
.chat-widget.chat-widget--open .chat-toggle-label { display: none; }
.chat-widget.chat-widget--open .chat-toggle { padding: 0; width: 56px; justify-content: center; }

.chat-panel {
  position: absolute; right: 0; bottom: calc(100% + 14px);
  width: 360px; max-width: calc(100vw - 40px); height: 500px; max-height: calc(100vh - 140px);
  background: var(--paper-raised); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); display: flex; flex-direction: column; overflow: hidden;
}
.chat-panel[hidden] { display: none; }

.chat-panel-header {
  background: var(--teal); color: var(--paper); padding: 0.9rem 1.1rem;
  display: flex; align-items: center; justify-content: space-between; flex: none;
}
.chat-panel-header strong { display: block; font-family: var(--font-display); font-size: 1.05rem; }
.chat-panel-header span { display: block; font-size: 0.78rem; color: color-mix(in srgb, var(--paper) 75%, transparent); }

.chat-messages {
  flex: 1 1 auto; overflow-y: auto; padding: 1rem 1rem 0.4rem;
  display: flex; flex-direction: column; gap: 0.6rem;
}
.chat-msg {
  max-width: 85%; padding: 0.6em 0.85em; border-radius: 14px; font-size: 0.92rem; line-height: 1.4;
  white-space: pre-wrap;
}
.chat-msg--bot { align-self: flex-start; background: var(--paper); color: var(--ink); border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.chat-msg-links { display: flex; flex-wrap: wrap; gap: 0.4em; margin-top: 0.5em; }
.chat-msg-links a {
  display: inline-block; padding: 0.4em 0.9em;
  background: var(--gold); color: var(--teal); font-weight: 700; font-size: 0.86rem;
  text-decoration: none; border-radius: 999px; white-space: nowrap;
}
.chat-msg-links a:hover { background: var(--gold-soft); }
.chat-msg--user .chat-msg-links a { background: var(--paper-raised); color: var(--teal); }
.chat-msg--user { align-self: flex-end; background: var(--teal); color: var(--paper); border-bottom-right-radius: 4px; }
.chat-msg--typing { align-self: flex-start; color: var(--ink-soft); font-style: italic; font-size: 0.85rem; }

.chat-form { display: flex; gap: 0.5rem; padding: 0.8rem 1rem 1rem; flex: none; }
.chat-form input {
  flex: 1; padding: 0.6em 0.8em; border-radius: 10px; border: 1px solid var(--line);
  font-family: var(--font-body); font-size: 0.92rem; background: var(--paper);
}
.chat-form input:focus { outline: 2px solid var(--gold-soft); outline-offset: 1px; }
.chat-send {
  width: 40px; height: 40px; border-radius: 10px; border: none; cursor: pointer; flex: none;
  background: var(--gold); color: var(--teal); font-size: 1.1rem; font-weight: 700;
}
.chat-send:hover { background: var(--gold-soft); }
.chat-send:disabled { opacity: 0.6; cursor: default; }

@media (max-width: 480px) {
  .chat-widget { right: 12px; bottom: 12px; }
  .chat-panel { width: calc(100vw - 24px); right: -8px; height: calc(100vh - 120px); }
}
