/* ==========================================================================
   Наталья Прудникова — лендинг психолога
   ========================================================================== */

:root {
  --bg: #F6F3EE;
  --bg-alt: #EFEAE2;
  --bg-alt-hover: #E7E1D7;
  --border: #E4DED4;
  --text: #383641;
  --text-muted: #6C6875;
  --accent: #6A7AA0;
  --accent-hover: #5A6889;
  --accent-quote: #B7A7C4;
  --warn: #8C7B55;
  --max-width: 1140px;
  --pad-inline: clamp(20px, 4vw, 32px);
  --pad-section: clamp(60px, 8vw, 120px);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Nunito Sans", "PT Sans", sans-serif;
  font-size: 18px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, .brand { font-family: "Nunito", sans-serif; font-weight: 600; }

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }

::selection { background: #DED7E4; }

input, textarea, button { font-family: inherit; }
input:focus, textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(106, 122, 160, 0.14);
}

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

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

/* Offsets anchor-jump targets so the sticky header doesn't cover them. */
[id] { scroll-margin-top: 80px; }

.wrap { max-width: var(--max-width); margin: 0 auto; padding-left: var(--pad-inline); padding-right: var(--pad-inline); }
.section-alt { background: var(--bg-alt); }
.section-pad { padding-top: var(--pad-section); padding-bottom: var(--pad-section); }

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(246, 243, 238, 0.94);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

.site-header .wrap {
  padding-top: 14px;
  padding-bottom: 14px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px 28px;
}

.brand { font-size: 17px; color: var(--text); line-height: 1.35; }
.brand span { display: block; font-size: 14px; color: var(--text-muted); font-weight: 400; font-family: "Nunito Sans", sans-serif; }

.menu-toggle {
  -webkit-appearance: none;
  appearance: none;
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: stretch;
  gap: 5px;
  width: 52px;
  height: 52px;
  padding: 0 15px;
  border-radius: 50px;
  border: 1px solid var(--border);
  background: var(--bg-alt);
  cursor: pointer;
}
/* Explicit width — don't rely on flex stretch alone, iOS Safari can be
   inconsistent about applying it to <button> flex children. */
.menu-toggle span { display: block; width: 100%; height: 2px; border-radius: 2px; background: var(--text); flex-shrink: 0; }

/* Nav sits in its own grid column (the middle 1fr) — if it doesn't fit, it
   wraps its own links onto a second line instead of pushing the CTA out
   of the top-right corner. */
.main-nav { display: flex; flex-wrap: wrap; gap: 10px 16px; font-size: 16px; min-width: 0; }
.main-nav a { color: var(--text-muted); padding: 10px 0; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50px;
  transition: background .4s ease, transform .3s ease;
  cursor: pointer;
  border: none;
}
.btn-primary { background: var(--accent); color: #fff; padding: 14px 26px; font-size: 16px; }
.btn-primary:hover { background: var(--accent-hover); color: #fff; }
.btn-primary:active { transform: scale(0.98); }

.btn-secondary {
  border: 1px solid var(--border);
  color: var(--text);
  background: var(--bg-alt);
  padding: 16px 28px;
  min-height: 56px;
  font-size: 16px;
}
.btn-secondary:hover { background: var(--bg-alt-hover); }

@media (max-width: 999px) {
  /* Photo first, copy below — the photo should be the first thing you
     see on mobile, not a screenful of text before it. */
  .hero-media { order: -1; margin: 0 auto; }

  .site-header .wrap { grid-template-columns: 1fr auto; }
  .brand { grid-column: 1; grid-row: 1; }
  .menu-toggle { display: flex; grid-column: 2; grid-row: 1; }
  /* Overlay, not part of the header's flow: position:absolute so opening
     it never changes the header's own height / pushes page content down,
     whether you're at the very top of the page or scrolled. */
  .main-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 4px;
    font-size: 17px;
    padding: 12px var(--pad-inline) 20px;
    background: var(--bg);
    border-top: 1px solid var(--border);
    box-shadow: 0 16px 24px -12px rgba(56, 54, 65, 0.18);
  }
  .main-nav.is-open { display: flex; }
  .header-cta { display: none; }
}

/* ---------- Hero ---------- */

.hero {
  padding-top: clamp(24px, 3vw, 56px);
  padding-bottom: clamp(60px, 8vw, 120px);
  display: flex;
  flex-wrap: wrap;
  gap: clamp(32px, 5vw, 64px);
  align-items: center;
}
.hero-copy { flex: 1 1 380px; max-width: 720px; }
.hero-eyebrow { margin: 0 0 22px; font-size: 16px; color: var(--text-muted); }
.hero h1 { font-size: clamp(34px, 5vw, 54px); line-height: 1.25; margin: 0 0 24px; text-wrap: pretty; }
.hero-lead { margin: 0 0 18px; font-size: clamp(18px, 2vw, 21px); max-width: 620px; text-wrap: pretty; }
.hero-sub { margin: 0 0 40px; color: var(--text-muted); max-width: 620px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 16px; }
.hero-actions .btn-primary { padding: 18px 34px; min-height: 56px; flex: 1 1 240px; }
.hero-actions .btn-secondary { flex: 1 1 260px; }
.hero-media { flex: 1 1 300px; min-width: 260px; max-width: 440px; }
.hero-media img { width: 100%; height: auto; border-radius: 24px; }

/* ---------- Generic content blocks ---------- */

h2.section-title { font-size: clamp(26px, 3.4vw, 36px); line-height: 1.3; margin: 0 0 14px; }
.section-lead { margin: 0 0 48px; color: var(--text-muted); max-width: 660px; }

.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 20px; }
.card {
  background: var(--bg);
  border-radius: 20px;
  padding: 32px;
  border: 1px solid var(--border);
}
.card-icon { width: 44px; height: 44px; border-radius: 12px; background: #DFE3EC; margin-bottom: 20px; }
.card-icon.alt { background: #E5DEE9; }
.card h3 { font-size: 20px; margin: 0 0 10px; }
.card p { margin: 0; color: var(--text-muted); font-size: 17px; }

/* "С чем ко мне приходят" */
.request-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; margin-bottom: 32px; }
.request-item { background: var(--bg-alt); border-radius: 18px; padding: 28px 32px; }
.request-item p { margin: 0; font-size: 17px; }

.cw-box { border: 1px solid var(--border); border-radius: 20px; padding: 28px 32px; max-width: 760px; }
.cw-label { margin: 0 0 6px; font-size: 15px; color: var(--warn); }
.cw-box > p { margin: 0 0 20px; color: var(--text-muted); font-size: 17px; }
.cw-content { display: grid; gap: 12px; margin-top: 24px; }
.cw-content p { margin: 0; font-size: 17px; }

/* Details/summary used for collapsible content — no JS needed */
details.disclosure summary {
  list-style: none;
  cursor: pointer;
}
details.disclosure summary::-webkit-details-marker { display: none; }

/* "Кому подходит" split */
.split { display: flex; flex-wrap: wrap; gap: clamp(32px, 5vw, 64px); align-items: center; }
.split-text { flex: 1 1 320px; max-width: 660px; }
.split-text p { margin: 0 0 18px; }
.split-text p.muted { color: var(--text-muted); }
.split-media { flex: 1 1 280px; min-width: 250px; max-width: 420px; }
.split-media img { width: 100%; height: auto; border-radius: 24px; }
.split-quote { margin: 18px 0 0; font-size: 16px; color: var(--text-muted); font-style: italic; border-left: 2px solid var(--accent-quote); padding-left: 16px; }

/* "Как я работаю" steps */
.step-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; margin-bottom: clamp(40px, 6vw, 72px); }
.step { background: var(--bg-alt); border-radius: 20px; padding: 36px 32px; }
.step-num { margin: 0 0 18px; color: var(--accent); font-size: 16px; }
.step h3 { font-size: 21px; margin: 0 0 12px; }
.step p { margin: 0; color: var(--text-muted); font-size: 17px; }

.banner-img { width: 100%; height: auto; max-height: 460px; object-fit: cover; object-position: center 35%; border-radius: 24px; display: block; margin: 0 0 clamp(40px, 6vw, 72px); }

.first-meeting {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(28px, 4vw, 56px);
  align-items: flex-start;
  background: var(--bg-alt);
  border-radius: 24px;
  padding: clamp(28px, 4vw, 48px);
}
.first-meeting-text { flex: 1 1 320px; max-width: 620px; }
.first-meeting-text h3 { font-size: clamp(22px, 2.6vw, 27px); margin: 0 0 20px; }
.first-meeting-text p { margin: 0 0 16px; color: var(--text-muted); }
.first-meeting-video { flex: 0 1 280px; min-width: 230px; }
.first-meeting-video video { width: 100%; aspect-ratio: 9/16; object-fit: cover; border-radius: 20px; display: block; background: var(--bg-alt); cursor: pointer; }
.first-meeting-video p { margin: 16px 0 0; font-size: 16px; color: var(--text-muted); }

/* Stat tiles ("Обо мне") */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; }
.stat { background: var(--bg); border: 1px solid var(--border); border-radius: 16px; padding: 20px 24px; }
.stat .num { margin: 0; font-family: "Nunito", sans-serif; font-size: 22px; }
.stat .label { margin: 4px 0 0; font-size: 16px; color: var(--text-muted); }

/* Formats & price */
.format-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(265px, 1fr)); gap: 20px; margin-bottom: 28px; }
.format-card { background: var(--bg-alt); border-radius: 20px; padding: 36px 32px; }
.format-card h3 { font-size: 21px; margin: 0 0 10px; }
.format-card .tag { margin: 0 0 16px; font-size: 16px; color: var(--accent); }
.format-card p:last-child { margin: 0; color: var(--text-muted); font-size: 17px; }

.price-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px; }
.price-card { border: 1px solid var(--border); border-radius: 18px; padding: 28px 30px; }
.price-card .amount { margin: 0; font-family: "Nunito", sans-serif; font-size: 26px; }
.price-card .desc { margin: 6px 0 0; color: var(--text-muted); font-size: 17px; }

.disclaimer { margin-top: 40px; max-width: 760px; border-left: 2px solid var(--accent-quote); padding: 4px 0 4px 20px; }
.disclaimer p { margin: 0 0 10px; color: var(--text-muted); font-size: 17px; }
.disclaimer p:last-child { margin: 0; }

/* Principles */
.principle-card { background: var(--bg); border: 1px solid var(--border); border-radius: 20px; padding: 32px; }
.principle-card h3 { font-size: 20px; margin: 0 0 12px; }
.principle-card p { margin: 0; color: var(--text-muted); font-size: 17px; }

.reviews-note { background: var(--bg); border: 1px solid var(--border); border-radius: 24px; padding: clamp(28px, 4vw, 44px); max-width: 760px; }
.reviews-note h3 { font-size: 21px; margin: 0 0 14px; }
.reviews-note p { margin: 0 0 14px; color: var(--text-muted); font-size: 17px; }
.reviews-note p:last-child { margin: 0; }

/* Education */
.edu-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; }
.edu-grid.certs { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); margin-top: 32px; }
.edu-item { margin: 0; background: var(--bg-alt); border-radius: 20px; padding: 20px; }
.edu-grid.certs .edu-item { padding: 18px; }
.edu-item img { width: 100%; height: auto; border-radius: 14px; }
.edu-item figcaption { margin: 18px 4px 4px; font-size: 17px; color: var(--text-muted); }
.edu-grid.certs figcaption { margin: 16px 4px 4px; }
h3.subheading { font-size: clamp(22px, 2.6vw, 27px); margin: clamp(48px, 6vw, 72px) 0 32px; }

/* Contract */
.contract-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 16px; margin: 0 0 32px; }
.contract-point { background: var(--bg-alt); border-radius: 18px; padding: 26px 30px; }
.contract-point p { margin: 0; font-size: 17px; color: var(--text-muted); }

.contract-full { margin-top: 32px; max-width: 760px; display: grid; gap: 28px; }
.contract-full h3 { font-size: 21px; margin: 0 0 14px; }
.contract-full .clauses { display: grid; gap: 12px; }
.contract-full .clauses.tight { margin-bottom: 20px; }
.contract-full p { margin: 0; font-size: 17px; color: var(--text-muted); }
.contract-full p.lead-in { color: var(--text); margin: 0 0 12px; }

/* Contact */
.contact-grid { display: flex; flex-wrap: wrap; gap: clamp(32px, 5vw, 64px); align-items: flex-start; }
.contact-info { flex: 1 1 300px; max-width: 520px; }
.contact-info h2 { margin: 0 0 20px; }
.contact-info p { margin: 0 0 18px; color: var(--text-muted); }
.contact-links { display: grid; gap: 12px; }
.contact-links a {
  display: flex;
  align-items: center;
  min-height: 56px;
  padding: 16px 26px;
  border: 1px solid var(--border);
  border-radius: 50px;
  background: var(--bg-alt);
  color: var(--text);
  transition: background .4s ease;
}
.contact-links a:hover { background: var(--bg-alt-hover); color: var(--text); }

.contact-form {
  flex: 1 1 340px;
  max-width: 520px;
  background: var(--bg-alt);
  border-radius: 24px;
  padding: clamp(28px, 4vw, 40px);
  display: grid;
  gap: 18px;
}
.contact-form-fields { display: grid; gap: 18px; }
.contact-form-fields[hidden] { display: none; }
.contact-form label { display: grid; gap: 8px; font-size: 16px; color: var(--text-muted); }
.contact-form input, .contact-form textarea {
  padding: 0 20px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--bg);
  font-size: 17px;
  color: var(--text);
  transition: border-color .3s ease, box-shadow .3s ease;
}
.contact-form input { min-height: 56px; }
.contact-form textarea { padding: 16px 20px; line-height: 1.6; resize: vertical; }
.form-hint { margin: 0; font-size: 16px; color: var(--warn); }
.form-hint[hidden] { display: none; }
.contact-form label.consent-check {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 10px;
  font-size: 15px;
  line-height: 1.5;
  color: var(--text-muted);
  cursor: pointer;
}
.consent-check input[type="checkbox"] {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  min-height: 0;
  margin-top: 2px;
  accent-color: var(--accent);
  cursor: pointer;
}
.form-consent-hint { margin: 0; font-size: 16px; color: var(--warn); }
.form-consent-hint[hidden] { display: none; }
.form-captcha-hint { margin: 0; font-size: 16px; color: var(--warn); }
.form-captcha-hint[hidden] { display: none; }
.g-recaptcha > div { margin: 0 auto; } /* центрируем виджет в узкой форме */
.form-error { margin: 0; font-size: 16px; color: #B0362B; }
.form-error[hidden] { display: none; }
.form-success { margin: 0; font-size: 16px; color: var(--accent-hover); line-height: 1.6; }
.form-success[hidden] { display: none; }

.link-btn {
  margin-top: 10px;
  padding: 0;
  border: none;
  background: none;
  color: var(--accent);
  font-size: 15px;
  text-decoration: underline;
  cursor: pointer;
  font-family: inherit;
}
.link-btn:hover { color: var(--accent-hover); }
.contact-form .btn-primary { width: 100%; padding: 16px 32px; min-height: 56px; font-size: 17px; }
.contact-form .fine-print { margin: 0; font-size: 15px; color: var(--text-muted); }

/* Footer */
.site-footer { border-top: 1px solid var(--border); }
.site-footer .wrap { padding: 44px var(--pad-inline) 56px; display: flex; flex-wrap: wrap; gap: 20px 40px; align-items: flex-start; }
.footer-brand { margin-right: auto; }
.footer-brand p:first-child { margin: 0; font-family: "Nunito", sans-serif; font-size: 17px; }
.footer-brand p:last-child { margin: 6px 0 0; font-size: 16px; color: var(--text-muted); }
.footer-links { display: grid; gap: 8px; font-size: 16px; }
.footer-links a { color: var(--text-muted); }

.footer-credit { border-top: 1px solid var(--border); padding: 16px var(--pad-inline) 20px; text-align: center; font-size: 13px; color: var(--text-muted); }
.footer-credit a { color: var(--text-muted); text-decoration: underline; }
.footer-credit a:hover { color: var(--accent); }
