/* =========================================================
   Александр Старков — лендинг психолога
   Mobile-first, чистый CSS
   ========================================================= */

/* ---------- Переменные ---------- */
:root {
  --cream:        #FBF6F1;  /* фон */
  --beige:        #F0E4D8;  /* карточки / разделители */
  --sand:         #E8C4A0;  /* акцентный светлый (иконки, бейджи) */
  --terra:        #C1592F;  /* основной акцент / CTA */
  --terra-dark:   #A4471F;  /* hover CTA */
  --brown:        #8C6F5E;  /* приглушённый коричневый */
  --ink:          #3A2A22;  /* тёмный текст */
  --ink-soft:     #5c4a40;  /* вторичный текст */
  --white:        #ffffff;

  --radius:       18px;
  --radius-sm:    12px;
  --shadow-sm:    0 4px 14px rgba(58, 42, 34, 0.06);
  --shadow-md:    0 12px 34px rgba(58, 42, 34, 0.10);
  --maxw:         1160px;

  --font-serif:   "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --font-sans:    "Nunito Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

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

html { scroll-behavior: smooth; scroll-padding-top: 84px; }

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

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

a { color: inherit; }

h1, h2, h3, h4 { font-family: var(--font-serif); line-height: 1.15; margin: 0; color: var(--ink); }

p { margin: 0 0 1rem; }

ul { margin: 0; padding: 0; list-style: none; }

/* ---------- Layout helpers ---------- */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: 20px;
}
.container--narrow { max-width: 780px; }

.section { padding-block: 64px; }
.section--soft { background: var(--beige); }

.section__head { text-align: center; max-width: 640px; margin-inline: auto; margin-bottom: 40px; }
.section__title { font-size: clamp(1.9rem, 5vw, 2.9rem); font-weight: 600; }
.section__sub { color: var(--ink-soft); margin-top: 12px; font-size: 1.05rem; }
.section__badge-icon { margin: 0 auto 14px; }

.eyebrow {
  display: inline-block;
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--terra);
  background: var(--sand);
  padding: 5px 14px;
  border-radius: 999px;
  margin-bottom: 16px;
}

.hl { color: var(--terra); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 1rem;
  line-height: 1.1;
  padding: 13px 24px;
  border: 2px solid transparent;
  border-radius: 999px;
  cursor: pointer;
  text-decoration: none;
  transition: background-color .2s ease, color .2s ease, transform .12s ease, box-shadow .2s ease;
}
.btn--lg { padding: 16px 32px; font-size: 1.05rem; }

.btn--primary { background: var(--terra); color: var(--white); box-shadow: var(--shadow-sm); }
.btn--primary:hover { background: var(--terra-dark); transform: translateY(-2px); box-shadow: var(--shadow-md); }

.btn--ghost { background: transparent; color: var(--ink); border-color: var(--brown); }
.btn--ghost:hover { background: var(--brown); color: var(--white); border-color: var(--brown); }

/* ---------- Focus visibility (доступность) ---------- */
:focus-visible {
  outline: 3px solid var(--terra);
  outline-offset: 3px;
  border-radius: 6px;
}
.btn:focus-visible { outline-offset: 4px; }

/* =========================================================
   HEADER
   ========================================================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(251, 246, 241, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(140, 111, 94, 0.16);
}
.header__inner {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 68px;
}

.brand { display: inline-flex; align-items: center; text-decoration: none; font-weight: 700; }
.brand__name { font-family: var(--font-serif); font-size: 1.25rem; color: var(--ink); }

.nav { margin-left: auto; }
.nav__list { display: flex; gap: 22px; }
.nav__link {
  text-decoration: none;
  color: var(--ink-soft);
  font-weight: 600;
  font-size: 0.98rem;
  padding: 6px 0;
  position: relative;
}
.nav__link::after {
  content: ""; position: absolute; left: 0; bottom: 0;
  width: 0; height: 2px; background: var(--terra);
  transition: width .22s ease;
}
.nav__link:hover { color: var(--terra); }
.nav__link:hover::after { width: 100%; }

.header__cta { display: none; padding: 9px 18px; font-size: 0.9rem; }

.nav-toggle {
  margin-left: auto;
  display: inline-flex; flex-direction: column; justify-content: center; gap: 5px;
  width: 44px; height: 44px;
  background: transparent; border: none; cursor: pointer; padding: 8px;
}
.nav-toggle span { display: block; height: 2.5px; background: var(--ink); border-radius: 2px; transition: transform .25s ease, opacity .2s ease; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

/* =========================================================
   HERO
   ========================================================= */
.hero { padding-block: 48px 56px; background:
    radial-gradient(1200px 500px at 80% -10%, rgba(232, 196, 160, 0.35), transparent 60%),
    var(--cream);
}
.hero__inner { display: grid; gap: 36px; }
.hero__title { font-size: clamp(2.3rem, 8vw, 4rem); font-weight: 700; letter-spacing: -0.01em; }
.hero__lead { font-size: 1.15rem; color: var(--ink-soft); max-width: 560px; margin-top: 18px; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 28px; }

/* Photo */
.photo { margin: 0; position: relative; }
.photo__img {
  width: 100%;
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  object-fit: cover;
}
.photo--hero .photo__img {
  aspect-ratio: auto; object-fit: contain; height: auto;
  border: 3px solid var(--terra);
}
.photo--about .photo__img { aspect-ratio: 3 / 4; }
.photo__badge {
  position: absolute; left: 16px; bottom: 16px; right: 16px;
  background: rgba(251, 246, 241, 0.94);
  color: var(--ink);
  font-weight: 700; font-size: 0.92rem;
  padding: 10px 16px; border-radius: 999px;
  box-shadow: var(--shadow-sm);
  text-align: center;
}

/* =========================================================
   CARDS (специализация + отзывы)
   ========================================================= */
.cards { display: grid; gap: 20px; }
.cards--3 { grid-template-columns: 1fr; }

.card {
  background: var(--white);
  border: 1px solid rgba(140, 111, 94, 0.14);
  border-radius: var(--radius);
  padding: 28px 24px;
  box-shadow: var(--shadow-sm);
  transition: transform .2s ease, box-shadow .2s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.card__icon {
  width: 52px; height: 52px; padding: 10px;
  background: var(--sand); border-radius: 14px; margin-bottom: 16px;
}
.card__title { font-size: 1.5rem; font-weight: 600; margin-bottom: 8px; }
.card__text { color: var(--ink-soft); margin: 0; font-size: 1rem; }

/* Карточки-аргументы «Почему я» */
.reason {
  background: var(--white);
  border: 1px solid rgba(140, 111, 94, 0.14);
  border-radius: var(--radius);
  padding: 28px 24px;
  box-shadow: var(--shadow-sm);
  transition: transform .2s ease, box-shadow .2s ease;
}
.reason:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.reason__num {
  display: inline-grid; place-items: center;
  width: 48px; height: 48px;
  background: var(--sand); color: var(--terra);
  font-family: var(--font-serif); font-weight: 700; font-size: 1.3rem;
  border-radius: 13px; margin-bottom: 16px;
}
.reason__title { font-size: 1.4rem; font-weight: 600; margin-bottom: 8px; line-height: 1.2; }
.reason__text { color: var(--ink-soft); margin: 0; font-size: 1rem; }

/* =========================================================
   ABOUT
   ========================================================= */
.about__inner { display: grid; gap: 34px; align-items: center; }
.about__content p { color: var(--ink-soft); }
.about__content .btn { margin-top: 10px; }

/* =========================================================
   CREDENTIALS
   ========================================================= */
.creds { max-width: 780px; margin: 0 auto; display: grid; gap: 14px; }
.creds__item {
  display: flex; gap: 18px; align-items: flex-start;
  background: var(--white);
  border: 1px solid rgba(140, 111, 94, 0.14);
  border-left: 4px solid var(--terra);
  border-radius: var(--radius-sm);
  padding: 20px 22px;
  box-shadow: var(--shadow-sm);
}
.creds__year {
  flex: 0 0 auto;
  color: var(--terra); font-weight: 800;
  font-family: var(--font-serif); font-size: 1.5rem;
  min-width: 64px;
}
.creds__body { min-width: 0; flex: 1 1 auto; }
.creds__title { font-size: 1.28rem; font-weight: 600; margin-bottom: 6px; line-height: 1.25; }
.creds__org { color: var(--ink-soft); font-size: 0.96rem; margin: 0; }

.creds__thumb {
  flex: 0 0 auto;
  display: block;
  width: 72px; height: 96px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(140, 111, 94, 0.25);
  box-shadow: var(--shadow-sm);
  cursor: zoom-in;
  transition: transform .18s ease, box-shadow .18s ease;
  position: relative;
}
.creds__thumb img { width: 100%; height: 100%; object-fit: cover; }
.creds__thumb::after {
  content: "🔍";
  position: absolute; right: 6px; bottom: 6px;
  background: rgba(251, 246, 241, 0.9);
  border-radius: 6px; padding: 1px 5px; font-size: 0.8rem;
  opacity: 0; transition: opacity .18s ease;
}
.creds__thumb:hover { transform: scale(1.03); box-shadow: var(--shadow-md); }
.creds__thumb:hover::after { opacity: 1; }

/* =========================================================
   PRICING
   ========================================================= */
.pricing-block { margin-bottom: 48px; }
.pricing-block:last-child { margin-bottom: 0; }
.pricing-block__title {
  font-size: clamp(1.6rem, 4vw, 2.1rem); font-weight: 600;
  text-align: center; margin-bottom: 12px;
}
.pricing-block__intro {
  text-align: center; color: var(--ink-soft);
  max-width: 700px; margin: 0 auto 28px;
}
.pricing-block__cta { text-align: center; margin-top: 28px; }

.pricing-grid { display: grid; gap: 20px; grid-template-columns: 1fr; }

.price-card {
  position: relative;
  background: var(--white);
  border: 1px solid rgba(140, 111, 94, 0.16);
  border-radius: var(--radius);
  padding: 28px 24px;
  box-shadow: var(--shadow-sm);
  display: flex; flex-direction: column;
}
.price-card--featured { border-color: var(--terra); box-shadow: var(--shadow-md); }
.price-card__tag {
  position: absolute; top: -12px; left: 24px;
  background: var(--terra); color: var(--white);
  font-size: 0.74rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
  padding: 5px 12px; border-radius: 999px;
}
.price-card__tag--soft { background: var(--brown); }
.price-card__name { font-size: 1.4rem; font-weight: 600; margin-bottom: 4px; }
.price-card__meta { color: var(--brown); font-weight: 600; font-size: 0.95rem; margin: 0 0 12px; }
.price-card__value { font-family: var(--font-serif); font-size: 2rem; font-weight: 700; color: var(--terra); margin: 0 0 14px; }
.price-card__desc { color: var(--ink-soft); font-size: 0.98rem; margin: 0; }

/* =========================================================
   REVIEWS — движущаяся лента (marquee)
   ========================================================= */
.marquee {
  position: relative;
  overflow: hidden;
  padding-block: 12px;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
}
.marquee__track {
  display: flex;
  width: max-content;
  animation: marquee-scroll 55s linear infinite;
  will-change: transform;
}
.marquee:hover .marquee__track,
.marquee:focus-within .marquee__track { animation-play-state: paused; }

@keyframes marquee-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

.tcard {
  flex: 0 0 320px;
  width: 320px;
  margin-right: 22px;
  background: var(--white);
  border: 1px solid rgba(140, 111, 94, 0.14);
  border-radius: var(--radius);
  padding: 26px 24px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  white-space: normal;
}
.tcard__stars { color: #D99A2B; letter-spacing: 3px; font-size: 1rem; margin-bottom: 12px; }
.tcard__text { color: var(--ink-soft); font-style: italic; margin: 0 0 18px; font-size: 0.98rem; flex: 1 1 auto; }
.tcard__author { display: flex; align-items: center; gap: 12px; margin-top: auto; }
.tcard__avatar {
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--sand); color: var(--ink);
  display: grid; place-items: center;
  font-family: var(--font-serif); font-weight: 700; font-size: 1.2rem;
  flex: 0 0 auto;
}
.tcard__name { font-weight: 700; color: var(--ink); }

/* =========================================================
   FAQ
   ========================================================= */
.faq { display: grid; gap: 12px; }
.faq__item {
  background: var(--white);
  border: 1px solid rgba(140, 111, 94, 0.16);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.faq__q {
  cursor: pointer;
  list-style: none;
  padding: 18px 52px 18px 22px;
  font-family: var(--font-serif);
  font-size: 1.25rem; font-weight: 600;
  color: var(--ink);
  position: relative;
}
.faq__q::-webkit-details-marker { display: none; }
.faq__q::after {
  content: "+";
  position: absolute; right: 22px; top: 50%; transform: translateY(-50%);
  font-family: var(--font-sans); font-size: 1.6rem; color: var(--terra);
  transition: transform .2s ease;
}
.faq__item[open] .faq__q::after { content: "−"; }
.faq__a { padding: 0 22px 20px; }
.faq__a p { color: var(--ink-soft); margin: 0; }

/* =========================================================
   FINAL CTA / CONTACTS
   ========================================================= */
.final-cta { text-align: center; }
.final-cta__lead { color: var(--ink-soft); font-size: 1.1rem; max-width: 520px; margin: 14px auto 26px; }

.contacts {
  display: grid; gap: 14px;
  grid-template-columns: 1fr;
  max-width: 520px; margin: 40px auto 0;
  text-align: left;
}
.contacts__item {
  display: flex; flex-direction: column; gap: 2px;
  background: var(--white);
  border: 1px solid rgba(140, 111, 94, 0.14);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
}
.contacts__label { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--brown); font-weight: 700; }
.contacts__link { text-decoration: none; color: var(--terra); font-weight: 700; font-size: 1.05rem; }
.contacts__link:hover { text-decoration: underline; }

/* =========================================================
   FOOTER
   ========================================================= */
.site-footer { background: var(--ink); color: var(--cream); padding-block: 28px; }
.site-footer__inner { display: flex; flex-direction: column; gap: 6px; text-align: center; }
.site-footer__brand { font-family: var(--font-serif); font-size: 1.15rem; margin: 0; }
.site-footer__meta { margin: 0; color: rgba(251, 246, 241, 0.7); font-size: 0.92rem; }
.site-footer__link { color: var(--sand); }

/* =========================================================
   MODAL (умная кнопка выбора связи)
   ========================================================= */
.modal {
  position: fixed; inset: 0; z-index: 100;
  display: grid; place-items: center;
  padding: 20px;
}
.modal[hidden] { display: none; }
.modal__overlay {
  position: absolute; inset: 0;
  background: rgba(58, 42, 34, 0.55);
  animation: fade .2s ease;
}
.modal__dialog {
  position: relative;
  width: 100%; max-width: 420px;
  background: var(--cream);
  border-radius: var(--radius);
  padding: 32px 26px 26px;
  box-shadow: var(--shadow-md);
  animation: pop .22s ease;
}
.modal__close {
  position: absolute; top: 12px; right: 14px;
  width: 40px; height: 40px;
  background: transparent; border: none; cursor: pointer;
  font-size: 1.8rem; line-height: 1; color: var(--brown);
  border-radius: 50%;
}
.modal__close:hover { background: var(--beige); color: var(--ink); }
.modal__title { font-size: 1.7rem; font-weight: 600; margin-bottom: 6px; }
.modal__sub { color: var(--ink-soft); font-size: 0.98rem; margin-bottom: 20px; }
.modal__options { display: grid; gap: 12px; }

.option {
  display: flex; align-items: center; gap: 16px;
  text-decoration: none;
  background: var(--white);
  border: 1.5px solid rgba(140, 111, 94, 0.2);
  border-radius: var(--radius-sm);
  padding: 16px 18px;
  transition: transform .12s ease, border-color .18s ease, box-shadow .18s ease;
  min-height: 64px;
}
.option:hover { transform: translateY(-2px); border-color: var(--terra); box-shadow: var(--shadow-sm); }
.option__icon { width: 46px; height: 46px; flex: 0 0 auto; border-radius: 12px; }
.option__body { display: flex; flex-direction: column; }
.option__title { font-weight: 700; font-size: 1.1rem; color: var(--ink); }
.option__sub { color: var(--ink-soft); font-size: 0.9rem; }

@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes pop { from { opacity: 0; transform: translateY(14px) scale(.98); } to { opacity: 1; transform: none; } }

/* =========================================================
   LIGHTBOX (просмотр дипломов крупнее)
   ========================================================= */
.lightbox {
  position: fixed; inset: 0; z-index: 110;
  display: grid; place-items: center;
  padding: 24px;
}
.lightbox[hidden] { display: none; }
.lightbox__overlay {
  position: absolute; inset: 0;
  background: rgba(58, 42, 34, 0.82);
  animation: fade .2s ease;
}
.lightbox__inner {
  position: relative;
  margin: 0;
  max-width: min(1000px, 96vw);
  max-height: 92vh;
  animation: pop .22s ease;
}
.lightbox__img {
  display: block;
  max-width: 100%;
  max-height: 92vh;
  width: auto; height: auto;
  border-radius: 10px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}
.lightbox__close {
  position: absolute; top: -14px; right: -14px;
  width: 44px; height: 44px;
  background: var(--cream); color: var(--ink);
  border: none; border-radius: 50%;
  font-size: 1.8rem; line-height: 1; cursor: pointer;
  box-shadow: var(--shadow-md);
}
.lightbox__close:hover { background: var(--terra); color: var(--white); }

@media (max-width: 480px) {
  .lightbox__close { top: 6px; right: 6px; }
}

/* =========================================================
   REVEAL on scroll (Intersection Observer)
   ========================================================= */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .6s ease, transform .6s ease; }
.reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  * { animation-duration: .001ms !important; }
  /* Лента отзывов: вместо анимации — обычная горизонтальная прокрутка */
  .marquee { overflow-x: auto; -webkit-mask-image: none; mask-image: none; }
  .marquee__track { animation: none !important; }
}

/* =========================================================
   RESPONSIVE
   ========================================================= */

/* Планшеты */
@media (min-width: 640px) {
  .cards--3 { grid-template-columns: repeat(2, 1fr); }
  .pricing-grid { grid-template-columns: repeat(2, 1fr); }
  .contacts { grid-template-columns: repeat(2, 1fr); }
  .section { padding-block: 80px; }
  .creds__thumb { width: 100px; height: 134px; }
}

/* Планшет→десктоп: раскладка в 2–3 колонки (меню ещё в бургере) */
@media (min-width: 900px) {
  .hero__inner { grid-template-columns: 1.05fr 0.95fr; align-items: center; gap: 48px; }
  .cards--3 { grid-template-columns: repeat(3, 1fr); }
  .pricing-grid { grid-template-columns: repeat(3, 1fr); }
  .about__inner { grid-template-columns: 0.9fr 1.1fr; gap: 52px; }
  .hero { padding-block: 72px 84px; }
}

/* Десктоп: показываем горизонтальное меню, прячем бургер */
@media (min-width: 1080px) {
  .header__cta { display: inline-flex; }
  .nav-toggle { display: none; }
  .header__inner { gap: 28px; }
  .nav { margin-left: auto; }
}

@media (min-width: 1100px) {
  .about__inner { grid-template-columns: 460px 1fr; }
}

/* ---------- Мобильное/планшетное выпадающее меню ---------- */
@media (max-width: 1079px) {
  .nav {
    position: fixed;
    top: 68px; left: 0; right: 0;
    background: var(--cream);
    border-bottom: 1px solid rgba(140, 111, 94, 0.2);
    box-shadow: var(--shadow-md);
    transform: translateY(-8px);
    opacity: 0;
    visibility: hidden;
    transition: opacity .22s ease, transform .22s ease, visibility .22s;
    max-height: calc(100vh - 68px);
    overflow-y: auto;
  }
  .nav.is-open { opacity: 1; visibility: visible; transform: none; }
  .nav__list { flex-direction: column; gap: 0; padding: 8px 20px 20px; }
  .nav__list li { border-bottom: 1px solid rgba(140, 111, 94, 0.12); }
  .nav__link { display: block; padding: 15px 0; font-size: 1.1rem; }
  .nav__link::after { display: none; }
}

/* =========================================================
   LEGAL — страница политики конфиденциальности
   ========================================================= */
.legal .section__title { margin: 10px 0 24px; }
.legal > p { color: var(--ink-soft); }
.legal__h {
  font-size: clamp(1.35rem, 3.5vw, 1.9rem);
  font-weight: 600;
  margin-top: 34px;
  margin-bottom: 10px;
}
.legal__list {
  margin: 0 0 1rem;
  padding-left: 24px;
  list-style: disc;
  color: var(--ink-soft);
}
.legal__list li { margin-bottom: 6px; }
.legal__back { margin-top: 36px; }
