/* ============================================================
   Терапия Души — Александр и Ольга Прядун
   Палитра и типографика перенесены из дизайн-макета.
   ============================================================ */

:root {
  --bg: #fdf8fa;
  --bg-soft: #f5eefa;
  --bg-blue: #eef1fb;
  --ink: #3b2f4d;
  --ink-2: #4a3d63;
  --ink-3: #5c4d75;
  /* Приглушённые тона затемнены до контраста 4.5:1 — иначе мелкий текст
     нечитаем на светлом фоне (проверено по WCAG AA). */
  --muted: #7a5da3;
  --muted-2: #8163ab;
  --accent: #6f4fa8;
  --accent-2: #4c5fbe;
  --line: rgba(111, 79, 168, 0.1);
  --line-strong: rgba(111, 79, 168, 0.18);
  --shadow-sm: 0 8px 24px rgba(111, 79, 168, 0.07);
  --shadow-md: 0 10px 30px rgba(111, 79, 168, 0.07);
  --shadow-lg: 0 20px 50px rgba(111, 79, 168, 0.12);
  --serif: 'Cormorant Garamond', 'Times New Roman', serif;
  --sans: 'Manrope', -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  --wrap: 1240px;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 90px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

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

a { color: var(--accent); text-decoration: none; transition: color .25s ease; }
a:hover { color: var(--accent-2); }
img { max-width: 100%; height: auto; display: block; }
::selection { background: #e8ddf5; }

:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; margin: -1px;
  padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 500;
  background: #fff; color: var(--accent); padding: 12px 20px;
  border-radius: 12px; font-weight: 600; transition: top .2s ease;
}
.skip-link:focus { top: 12px; }

/* ---------- Типографика ---------- */

h1, h2, h3, h4 { font-family: var(--serif); font-weight: 600; margin: 0; text-wrap: balance; }
h1 { font-size: clamp(34px, 4.6vw, 64px); line-height: 1.12; }
h2 { font-size: clamp(30px, 3.4vw, 48px); line-height: 1.18; }
h3 { font-size: clamp(22px, 2.2vw, 30px); line-height: 1.25; }
p { margin: 0 0 22px; }
p:last-child { margin-bottom: 0; }

.eyebrow {
  font-family: var(--sans);
  font-size: 13px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--muted); font-weight: 600; margin: 0 0 24px;
}
.lead { font-size: 18px; line-height: 1.65; color: var(--ink-3); }
.center { text-align: center; }
.quote-accent {
  font-family: var(--serif);
  font-size: clamp(24px, 2.4vw, 32px);
  font-style: italic; line-height: 1.4; color: var(--accent);
  text-wrap: balance; margin: 0;
}
blockquote.pull {
  margin: 56px 0 0; padding: 0 0 0 28px;
  border-left: 3px solid #b79ade;
  font-family: var(--serif); font-size: clamp(24px, 2.6vw, 36px);
  font-style: italic; line-height: 1.35; color: var(--accent);
}

/* ---------- Раскладка ---------- */

section { padding: 120px 32px; position: relative; }
.wrap { max-width: var(--wrap); margin: 0 auto; position: relative; }
.wrap-narrow { max-width: 760px; margin: 0 auto; position: relative; }
.wrap-mid { max-width: 940px; margin: 0 auto; position: relative; }

.bg-soft { background: linear-gradient(170deg, var(--bg-soft) 0%, var(--bg-blue) 100%); }
.bg-blue { background: linear-gradient(170deg, var(--bg-blue) 0%, var(--bg-soft) 100%); }
.bg-plain { background: var(--bg); }

.blob { position: absolute; border-radius: 50%; pointer-events: none; z-index: 0; }
.blob-pink { background: radial-gradient(circle, rgba(240, 197, 221, .38), rgba(240, 197, 221, 0) 70%); }
.blob-blue { background: radial-gradient(circle, rgba(178, 190, 240, .34), rgba(178, 190, 240, 0) 70%); }

.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 28px; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 28px; }
.split { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 64px; align-items: center; }
.split-start { align-items: start; }
.sticky { position: sticky; top: 110px; }

/* ---------- Шапка ---------- */

.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  background: rgba(253, 248, 250, .78);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(111, 79, 168, .08);
  transition: box-shadow .4s ease;
}
.site-header.is-scrolled { box-shadow: 0 8px 30px rgba(111, 79, 168, .14); }
.progress {
  position: absolute; top: 0; left: 0; height: 3px; width: 0;
  background: linear-gradient(90deg, #e9a8c9, #9b7bc9, var(--accent-2));
  border-radius: 0 3px 3px 0;
}
.header-inner {
  max-width: var(--wrap); margin: 0 auto; padding: 14px 32px;
  display: flex; align-items: center; gap: 24px; min-width: 0;
}
.logo {
  font-family: var(--serif); font-size: 20px; font-weight: 600;
  color: var(--ink); white-space: nowrap; flex-shrink: 0;
}
.logo span { color: var(--muted-2); font-weight: 500; }
.site-nav { display: flex; gap: 20px; margin-left: auto; font-size: 14px; font-weight: 500; }
.site-nav a { color: var(--ink-3); white-space: nowrap; }
.site-nav a:hover, .site-nav a[aria-current='page'] { color: var(--accent); }

.burger {
  display: none; margin-left: auto; background: none; border: none;
  cursor: pointer; padding: 10px 8px; flex-direction: column; gap: 5px;
}
.burger span {
  display: block; width: 22px; height: 2px; background: var(--ink);
  border-radius: 2px; transition: transform .3s ease, opacity .3s ease;
}
.burger[aria-expanded='true'] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger[aria-expanded='true'] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded='true'] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-nav { max-height: 0; overflow: hidden; transition: max-height .45s ease; }
.mobile-nav.is-open { max-height: 520px; }
.mobile-nav nav { display: flex; flex-direction: column; padding: 6px 24px 18px; }
.mobile-nav a {
  padding: 13px 0; font-size: 16px; font-weight: 600; color: var(--ink);
  border-bottom: 1px solid var(--line);
}
.mobile-nav a:last-child { border-bottom: none; }

/* ---------- Кнопки ---------- */

.btn {
  display: inline-block; border: none; cursor: pointer;
  background: linear-gradient(120deg, var(--accent), var(--accent-2));
  color: #fff; padding: 17px 36px; border-radius: 999px;
  font-family: var(--sans); font-size: 16px; font-weight: 600;
  box-shadow: 0 10px 30px rgba(111, 79, 168, .3);
  transition: transform .3s ease, box-shadow .3s ease;
}
.btn:hover { color: #fff; transform: translateY(-3px); box-shadow: 0 16px 38px rgba(111, 79, 168, .4); }
.btn-sm { padding: 10px 22px; font-size: 14px; box-shadow: 0 6px 18px rgba(111, 79, 168, .25); }
.btn-header { flex-shrink: 0; }
.btn-ghost {
  display: inline-block; padding: 15px 32px; border-radius: 999px;
  border: 1.5px solid var(--line-strong); background: #fff;
  color: var(--accent); font-weight: 600; font-size: 16px;
  transition: transform .3s ease, box-shadow .3s ease;
}
.btn-ghost:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.btn-row { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; }

/* ---------- Первый экран ---------- */

.hero {
  min-height: 88vh; display: flex; align-items: center;
  padding: 150px 32px 90px;
  background: linear-gradient(160deg, #fdf6f8 0%, var(--bg-soft) 45%, var(--bg-blue) 100%);
}
.hero h1 { margin: 0 0 26px; }
.hero .lead { max-width: 560px; margin: 0 0 34px; }
.hero-art { position: relative; }
.hero-art::before {
  content: ''; position: absolute; inset: -24px;
  background: linear-gradient(140deg, rgba(240, 197, 221, .5), rgba(178, 190, 240, .5));
  border-radius: 48% 52% 55% 45% / 50% 46% 54% 50%;
  filter: blur(4px); animation: floatSoft 9s ease-in-out infinite;
}
.hero-art img { position: relative; border-radius: 32px; width: 100%; object-fit: cover; }
.sparkle {
  position: absolute; background: linear-gradient(120deg, #fff, #e9c8f0);
  transform: rotate(45deg); animation: twinkle 5s ease-in-out infinite; pointer-events: none;
}

@keyframes floatSoft { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-14px); } }
@keyframes twinkle {
  0%, 100% { opacity: .15; transform: rotate(45deg) scale(.7); }
  50% { opacity: .9; transform: rotate(45deg) scale(1.15); }
}
@media (prefers-reduced-motion: reduce) {
  .hero-art::before, .sparkle { animation: none; }
}

/* ---------- Реплики «Если вам это знакомо» ---------- */

.bubbles { display: flex; flex-direction: column; gap: 20px; }
.bubble {
  max-width: 78%; padding: 20px 28px; font-size: 17px; line-height: 1.5;
  color: var(--ink-2); box-shadow: var(--shadow-sm);
}
.bubble-l {
  align-self: flex-start; background: #fff;
  border: 1px solid var(--line); border-radius: 24px 24px 24px 6px;
}
.bubble-r {
  align-self: flex-end; background: linear-gradient(120deg, #f4e9f4, #ecebf9);
  border-radius: 24px 24px 6px 24px;
}

/* ---------- Карточки ---------- */

.card {
  background: #fff; border: 1px solid var(--line); border-radius: 28px;
  padding: 36px 32px; box-shadow: var(--shadow-md);
  transition: transform .35s ease, box-shadow .35s ease;
}
.card:hover { transform: translateY(-6px); box-shadow: 0 18px 40px rgba(111, 79, 168, .12); }
.card h3 { margin: 0 0 14px; font-size: 25px; }
.card p { font-size: 16px; line-height: 1.65; color: var(--ink-3); }
.card-num {
  font-family: var(--serif); font-size: 52px; font-weight: 500;
  color: #c9aee6; line-height: 1; margin-bottom: 18px;
}
.card-num.b { color: #aab0e2; }
.card-num.c { color: #e0aacb; }
.card-link { display: inline-block; margin-top: 16px; font-weight: 600; font-size: 15px; }

/* Плитка запросов (SEO-перелинковка) */
.topics { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; }
.topics a {
  display: block; background: #fff; border: 1px solid var(--line);
  border-radius: 16px; padding: 15px 20px; font-size: 15.5px;
  font-weight: 500; color: var(--ink-2); line-height: 1.4;
  transition: transform .25s ease, box-shadow .25s ease, color .25s ease;
}
.topics a:hover { transform: translateY(-3px); box-shadow: var(--shadow-sm); color: var(--accent); }

/* ---------- Отзывы ---------- */

.reviews { columns: 2; column-gap: 28px; max-width: 900px; margin: 0 auto; }
.review {
  break-inside: avoid; margin-bottom: 28px; background: #fff;
  border-radius: 24px 24px 24px 6px; padding: 26px 30px; box-shadow: var(--shadow-md);
}
.review-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.review-avatar {
  width: 38px; height: 38px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 600; font-size: 15px;
}
.review-name { font-weight: 600; font-size: 15px; color: var(--ink); }
.review p { margin: 0; font-size: 15.5px; line-height: 1.65; color: var(--ink-2); }

/* ---------- Цены ---------- */

.price-card { background: #fff; border: 1px solid var(--line); border-radius: 28px; padding: 42px 36px; box-shadow: var(--shadow-md); }
.price-card h3 { font-size: 27px; margin: 0 0 26px; }
.price-row { display: flex; justify-content: space-between; gap: 16px; align-items: baseline; font-size: 16px; color: var(--ink-2); }
.price-row + .price-row { border-top: 1px solid var(--line); margin-top: 16px; padding-top: 16px; }
.price-val { font-weight: 700; white-space: nowrap; color: var(--accent); }

/* ---------- FAQ ---------- */

.faq { display: flex; flex-direction: column; gap: 16px; }
.faq details {
  background: #fff; border-radius: 22px; box-shadow: var(--shadow-sm); overflow: hidden;
}
.faq summary {
  display: flex; justify-content: space-between; align-items: center; gap: 20px;
  padding: 22px 30px; cursor: pointer; list-style: none;
  font-size: 17px; font-weight: 600; color: var(--ink);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: '+'; font-size: 26px; color: #b79ade; line-height: 1;
  flex-shrink: 0; transition: transform .3s ease;
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq summary:hover { color: var(--accent); }
.faq-body { padding: 0 30px 24px; font-size: 16px; line-height: 1.7; color: var(--ink-3); }
.faq-body p { margin: 0 0 14px; }

/* ---------- Форма ---------- */

.form-card { background: #fff; border-radius: 32px; padding: 42px 38px; box-shadow: var(--shadow-lg); }
.field { display: flex; flex-direction: column; gap: 8px; margin-bottom: 18px; font-size: 14px; font-weight: 600; color: var(--ink-3); }
.field input, .field select, .field textarea {
  font-family: var(--sans); font-size: 16px; padding: 14px 18px;
  border: 1px solid var(--line-strong); border-radius: 14px;
  background: #fdfbfd; color: var(--ink); outline: none;
  transition: border-color .2s ease;
}
.field textarea { resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--muted); }
.field .optional { font-weight: 400; color: var(--muted); }
.field-error { font-weight: 500; font-size: 13px; color: #c25577; min-height: 0; }
.field.has-error input, .field.has-error textarea { border-color: #c25577; }

.consent { display: flex; gap: 12px; align-items: flex-start; font-size: 13.5px; line-height: 1.5; color: var(--ink-3); font-weight: 400; margin: 4px 0 22px; }
.consent input { width: 20px; height: 20px; flex-shrink: 0; margin: 1px 0 0; accent-color: var(--accent); }
.form-card .btn { width: 100%; padding: 17px; }
.form-note { font-size: 13px; color: var(--muted); margin: 16px 0 0; text-align: center; line-height: 1.5; }

.contact-links { display: flex; flex-direction: column; gap: 14px; }
.contact-link {
  display: flex; align-items: center; gap: 14px; background: #fff;
  border: 1px solid rgba(111, 79, 168, .12); border-radius: 18px;
  padding: 18px 24px; font-weight: 600; color: var(--ink);
  transition: transform .3s ease, box-shadow .3s ease;
}
.contact-link:hover { transform: translateY(-3px); box-shadow: 0 12px 28px rgba(111, 79, 168, .12); color: var(--accent); }
.contact-badge {
  width: 40px; height: 40px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 12px; font-weight: 700;
}
.badge-tg { background: linear-gradient(120deg, #6f8fd8, var(--accent-2)); }
.badge-max { background: linear-gradient(120deg, #b57bd6, #8b5fc4); }

/* ---------- Статьи ---------- */

.breadcrumbs { font-size: 14px; color: var(--muted); margin: 0 0 24px; }
.breadcrumbs a { color: var(--muted); }
.breadcrumbs a:hover { color: var(--accent); }
.breadcrumbs span { margin: 0 8px; opacity: .5; }

.article { max-width: 720px; margin: 0 auto; }
.article-meta { font-size: 14px; color: var(--muted); margin: 18px 0 0; }
.article-body { font-size: 17.5px; line-height: 1.8; color: var(--ink-2); }
.article-body h2 { font-size: clamp(26px, 2.6vw, 34px); margin: 56px 0 20px; }
.article-body h3 { font-size: clamp(21px, 2vw, 25px); margin: 40px 0 14px; }
.article-body ul, .article-body ol { margin: 0 0 22px; padding-left: 24px; }
.article-body li { margin-bottom: 10px; }
.article-body blockquote {
  margin: 36px 0; padding: 0 0 0 24px; border-left: 3px solid #d6c3ee;
  font-family: var(--serif); font-size: 23px; font-style: italic;
  line-height: 1.45; color: var(--accent);
}
.article-body strong { color: var(--ink); }

.post-list { display: flex; flex-direction: column; gap: 20px; }
.post-item {
  display: block; background: #fff; border: 1px solid var(--line);
  border-radius: 24px; padding: 30px 34px; box-shadow: var(--shadow-sm);
  transition: transform .3s ease, box-shadow .3s ease;
}
.post-item:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.post-item h2 { font-size: clamp(23px, 2.2vw, 29px); color: var(--ink); margin: 0 0 10px; }
.post-item p { font-size: 16px; color: var(--ink-3); margin: 0; }
.post-item .tag { font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); display: block; margin-bottom: 12px; }

.cta-band {
  background: linear-gradient(120deg, #f4e9f4, #ecebf9);
  border-radius: 32px; padding: 48px 44px; text-align: center; margin-top: 72px;
}
.cta-band h2 { font-size: clamp(26px, 2.6vw, 34px); margin: 0 0 14px; }
.cta-band p { color: var(--ink-3); max-width: 520px; margin: 0 auto 28px; }

.legal { font-size: 16px; line-height: 1.75; color: var(--ink-2); }
.legal h2 { font-size: 26px; margin: 44px 0 16px; }
.legal ul { padding-left: 22px; }
.legal li { margin-bottom: 8px; }

/* ---------- Подвал ---------- */

.site-footer {
  background: linear-gradient(160deg, var(--ink), #33395e);
  color: #cfc6e2; padding: 56px 32px 40px; font-size: 14.5px;
}
.site-footer a { color: #cfc6e2; }
.site-footer a:hover { color: #fff; }
.footer-top {
  max-width: var(--wrap); margin: 0 auto; display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 36px;
}
.footer-brand { font-family: var(--serif); font-size: 22px; color: #fff; margin-bottom: 10px; }
.footer-col h4 { font-family: var(--sans); font-size: 13px; letter-spacing: .1em; text-transform: uppercase; color: #bbb0d6; margin: 0 0 14px; font-weight: 600; }
.footer-col ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 9px; }
.footer-bottom {
  max-width: var(--wrap); margin: 40px auto 0; padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, .12);
  display: flex; flex-wrap: wrap; gap: 16px; justify-content: space-between;
  font-size: 13px; color: #bbb0d6;
}
.disclaimer { max-width: 620px; line-height: 1.6; }

/* ---------- Появление при скролле ---------- */

/* По умолчанию всё видно. Прятать блоки берётся только сам скрипт —
   если он не загрузится или упадёт, страница останется читаемой. */
html.js-reveal .reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .9s cubic-bezier(.22, .61, .36, 1), transform .9s cubic-bezier(.22, .61, .36, 1);
}
html.js-reveal .reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html.js-reveal .reveal { opacity: 1; transform: none; transition: none; }
}

/* ---------- Адаптив ---------- */

@media (max-width: 1360px) { .logo span { display: none; } }

@media (max-width: 1100px) {
  .site-nav { display: none; }
  .burger { display: flex; }
}

@media (max-width: 980px) {
  .split { grid-template-columns: 1fr; gap: 40px; }
  .sticky { position: static; }
  .reviews { columns: 1; }
  .order-text { order: 2; }
  .order-img { order: 1; }
}

@media (max-width: 720px) {
  body { font-size: 16px; }
  section { padding: 84px 20px; }
  .hero { min-height: auto; padding: 118px 20px 72px; }
  .header-inner { padding: 10px 16px; gap: 14px; }
  .btn-header { padding: 8px 14px; font-size: 13px; }
  .bubble { max-width: 94%; padding: 17px 22px; font-size: 16px; }
  .card, .price-card { padding: 30px 24px; }
  .form-card { padding: 30px 22px; }
  .cta-band { padding: 36px 24px; border-radius: 24px; }
  .faq summary { padding: 18px 22px; font-size: 16px; }
  .faq-body { padding: 0 22px 20px; }
  .site-footer { padding: 40px 20px 32px; }
  .article-body { font-size: 17px; }
  .blob { display: none; }
}
