/* ==========================================================================
   Елена Равкина — психолог
   Palette (website-colors.md):
     #F7F4F3 smoky white  — page background
     #F6ECE5 linen        — warm accent surface
     #E0E6F1 lavender     — cool surface
     #C8D3E6 periwinkle   — shapes, chips
     #43576B marengo      — buttons, icons, accents
     #121924 ink          — text
   ========================================================================== */

@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-display: swap;
  font-weight: 200 800;
  src: url("/fonts/manrope-cyrillic-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-display: swap;
  font-weight: 200 800;
  src: url("/fonts/manrope-latin-ext-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+20A0-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-display: swap;
  font-weight: 200 800;
  src: url("/fonts/manrope-latin-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --bg: #F7F4F3;
  --linen: #F6ECE5;
  --lavender: #E0E6F1;
  --periwinkle: #C8D3E6;
  --marengo: #43576B;
  --marengo-dark: #34465A;
  --ink: #121924;
  --ink-soft: #3E4856;
  --shape: #A9BAD6;          /* deeper periwinkle for decorative shapes */
  --surface: #FCFBFA;
  --line: rgba(67, 87, 107, .14);

  --radius: 28px;
  --radius-sm: 18px;
  --shadow: 0 1px 2px rgba(18, 25, 36, .04), 0 12px 40px rgba(67, 87, 107, .08);
  --container: 1200px;
  --gutter: clamp(16px, 4vw, 32px);
  --font: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --header-h: 72px;
  --footer-h: 96px;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  /* never split words at the end of a line */
  -webkit-hyphens: manual; hyphens: manual;
  overflow-wrap: normal; word-break: normal;
}
/* compound words (по-новому, врача-психиатра, Telegram/WhatsApp) stay on one line */
.nowrap { white-space: nowrap; }
img, svg { display: block; max-width: 100%; }
img { height: auto; }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3 { margin: 0; line-height: 1.15; font-weight: 600; letter-spacing: -0.02em; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--marengo); outline-offset: 3px; border-radius: 6px; }

.container { width: 100%; max-width: calc(var(--container) + 2 * var(--gutter)); margin-inline: auto; padding-inline: var(--gutter); }

.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--marengo); color: #fff; padding: 10px 16px; border-radius: 10px; text-decoration: none;
}
.skip-link:focus { top: 12px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .6em;
  min-height: 52px; padding: 0 28px;
  border-radius: 999px; border: 1.5px solid transparent;
  font: inherit; font-size: 16px; font-weight: 600; text-decoration: none; cursor: pointer;
  transition: background-color .2s, color .2s, border-color .2s, transform .2s;
}
.btn .arrow { transition: transform .2s; }
.btn:hover .arrow { transform: translateX(4px); }
.btn-dark { background: var(--marengo); color: #fff; }
.btn-dark:hover { background: var(--marengo-dark); }
.btn-outline { border-color: var(--marengo); color: var(--marengo); background: transparent; }
.btn-outline:hover { background: var(--marengo); color: #fff; }
.btn-sm { min-height: 42px; padding: 0 22px; font-size: 15px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  height: var(--header-h);
  background: rgba(247, 244, 243, .82);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s, box-shadow .3s;
}
.site-header.is-scrolled { border-bottom-color: var(--line); box-shadow: 0 6px 24px rgba(67, 87, 107, .06); }
.header-inner { height: 100%; display: flex; align-items: center; gap: 32px; }
.logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 600; font-size: 17px; letter-spacing: -0.01em; }
.logo-mark { width: 32px; height: 32px; }
.logo-mark circle { fill: var(--lavender); }
.logo-mark path { fill: none; stroke: var(--marengo); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.nav { display: flex; gap: 32px; margin-left: auto; }
.nav a { text-decoration: none; font-size: 15.5px; font-weight: 500; color: var(--ink-soft); padding: 6px 0; position: relative; }
.nav a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1.5px; background: var(--marengo); transform: scaleX(0); transform-origin: left; transition: transform .25s; }
.nav a:hover { color: var(--ink); }
.nav a:hover::after { transform: scaleX(1); }
.burger { display: none; }

/* ---------- Cards & shapes ---------- */
.card {
  position: relative;
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: clamp(24px, 4vw, 48px);
}
.blob { position: absolute; pointer-events: none; border-radius: 50%; }

/* Spacing is a margin (outside the section) so anchor links land with the
   section content right under the sticky header, not 88px lower. */
.section { margin-top: clamp(48px, 7vw, 88px); }
/* The last section must be tall enough to scroll up under the header;
   otherwise «Записаться» stops at the page bottom with the card mid-screen. */
.contacts-section { min-height: calc(100svh - var(--header-h) - 16px - var(--footer-h)); }
.section-title { font-size: clamp(2rem, 4.2vw, 3rem); font-weight: 500; margin-bottom: clamp(20px, 3vw, 32px); }
.card-title { font-size: clamp(1.15rem, 1.8vw, 1.35rem); font-weight: 600; margin-bottom: 16px; letter-spacing: -0.01em; }

/* ---------- Hero ---------- */
.hero { padding-top: 16px; }
.hero-card {
  display: grid; grid-template-columns: 1.05fr 1fr; align-items: stretch;
  min-height: min(640px, calc(100svh - var(--header-h) - 32px));
  padding: 0; overflow: hidden;
  background:
    radial-gradient(70% 90% at 0% 0%, rgba(255,255,255,.9) 0%, rgba(255,255,255,0) 60%),
    radial-gradient(55% 75% at 8% 100%, rgba(246,236,229,1) 0%, rgba(246,236,229,0) 70%),
    radial-gradient(45% 60% at 92% 6%, rgba(224,230,241,1) 0%, rgba(224,230,241,0) 72%),
    linear-gradient(105deg, #FAF8F7 0%, #F4EEEA 45%, #E6EBF3 100%);
}
.hero-text { align-self: center; padding: clamp(32px, 6vw, 80px); padding-right: 0; position: relative; z-index: 2; }
.hero-role { font-size: clamp(1.6rem, 3vw, 2.4rem); font-weight: 400; margin-bottom: .1em; letter-spacing: -0.02em; }
.hero-name { font-size: clamp(3rem, 7vw, 5.4rem); font-weight: 650; line-height: 1.0; letter-spacing: -0.035em; margin-bottom: clamp(24px, 3vw, 36px); }
.hero-place { display: flex; gap: 12px; align-items: flex-start; font-size: 16px; line-height: 1.55; color: var(--ink-soft); margin-bottom: clamp(28px, 4vw, 40px); }
.hero-place svg { width: 22px; height: 22px; flex: none; margin-top: 2px; fill: none; stroke: var(--marengo); stroke-width: 1.6; }

.hero-visual { position: relative; display: flex; align-items: flex-end; justify-content: center; min-height: 420px; }
.hero-photo { position: relative; z-index: 2; width: auto; max-height: min(620px, 96%); max-width: 100%; object-fit: contain; object-position: bottom; }
.hero-visual picture { display: flex; align-items: flex-end; justify-content: center; height: 100%; width: 100%; position: relative; z-index: 2; }
.blob-hero-1 { width: 78%; aspect-ratio: 1; right: -18%; bottom: -22%; background: var(--shape); opacity: .55; }
.blob-hero-2 { width: 62%; aspect-ratio: 1; left: 4%; bottom: -30%; background: var(--periwinkle); opacity: .55; }
.hero-deco { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.blob-hero-warm { width: 34%; aspect-ratio: 1; left: -9%; bottom: -16%; background: var(--linen); opacity: .9; }
.blob-hero-cool { width: 22%; aspect-ratio: 1; left: 34%; top: -12%; background: radial-gradient(circle, rgba(224,230,241,.9) 0%, rgba(224,230,241,0) 70%); }
.blob-hero-ring { width: 26%; aspect-ratio: 1; left: 30%; bottom: -12%; border: 1.5px solid rgba(169, 186, 214, .55); }
.hero-sparkle { position: absolute; fill: #E3C3A6; }
.hero-sparkle-1 { width: 22px; height: 22px; left: 44%; top: 22%; }
.hero-sparkle-2 { width: 13px; height: 13px; left: 47.5%; top: 30%; opacity: .7; fill: var(--shape); }
.hero-line { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 1; }
.hero-line path { fill: none; stroke: #fff; stroke-width: 2; opacity: .9; }

/* ---------- About ---------- */
.about-grid { display: grid; grid-template-columns: 1.25fr 1fr; gap: clamp(16px, 2.4vw, 28px); align-items: stretch; }
.about-card { z-index: 3; }
.about-card p { color: var(--ink-soft); max-width: 60ch; }
.about-card .btn { margin-top: 12px; }
.chips { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 24px; }
.chips li { background: var(--lavender); color: var(--marengo); padding: 10px 18px; border-radius: 999px; font-size: 14.5px; font-weight: 500; line-height: 1.35; }

.about-photo { position: relative; margin: 0; min-height: 360px; }
.about-photo picture { position: relative; z-index: 2; display: block; height: 100%; }
.about-photo img { width: 100%; height: 100%; object-fit: cover; border-radius: var(--radius); box-shadow: var(--shadow); }
.blob-about { width: 70%; aspect-ratio: 1; left: -14%; bottom: -16%; background: var(--periwinkle); opacity: .6; z-index: 1; }
.about-line { position: absolute; z-index: 1; left: -36px; top: 8%; height: 84%; width: auto; }
.about-line path { fill: none; stroke: var(--marengo); stroke-width: 1.4; opacity: .5; }

.practice-card {
  margin-top: clamp(16px, 2.4vw, 28px);
  display: grid; grid-template-columns: 1.4fr 1fr; gap: 24px; overflow: hidden;
  background: linear-gradient(120deg, #E8ECF4 0%, var(--lavender) 60%, #D6DEEC 100%);
}
.practice-text { position: relative; z-index: 2; }
.practice-text .card-title { max-width: 30ch; font-weight: 500; font-size: clamp(1.25rem, 2.2vw, 1.6rem); line-height: 1.3; margin-bottom: 24px; }
.checklist { display: grid; gap: 16px; margin-bottom: 28px; }
.checklist li { display: flex; gap: 14px; align-items: flex-start; font-size: 17px; }
.checklist li::before {
  content: ""; flex: none; width: 26px; height: 26px; margin-top: 1px; border-radius: 50%;
  background: var(--marengo) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m7 12.5 3.2 3L17 9'/%3E%3C/svg%3E") center / 18px no-repeat;
  opacity: .85;
}
.practice-note { color: var(--ink-soft); max-width: 62ch; padding-top: 24px; border-top: 1px solid var(--line); }
.practice-art { position: relative; display: flex; align-items: center; justify-content: center; }
.practice-art picture { display: block; width: 100%; max-width: 300px; }
.practice-art img { width: 100%; height: auto; }

/* ---------- Topics ---------- */
.topics-card { background: var(--surface); }
.topics { display: grid; grid-template-columns: repeat(7, 1fr); gap: 16px 12px; margin-bottom: 32px; }
.topics li { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 14px; font-size: 15px; line-height: 1.35; color: var(--ink-soft); }
.topic-icon {
  width: 88px; height: 88px; border-radius: 50%; display: grid; place-items: center;
  background: var(--lavender); transition: background-color .25s, transform .25s;
}
.topics li:hover .topic-icon { background: var(--periwinkle); transform: translateY(-3px); }
.topic-icon svg .seam { stroke: #C79A6B; stroke-width: 1.8; }
.topic-icon svg { width: 46px; height: 46px; fill: none; stroke: var(--marengo); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.topics-note { color: var(--ink-soft); text-align: center; padding-top: 24px; border-top: 1px solid var(--line); text-wrap: balance; }
.not-working { margin-top: 28px; background: var(--linen); border-radius: var(--radius-sm); padding: clamp(20px, 3vw, 32px); }
.not-working .card-title { margin-bottom: 12px; }
.not-working ul { display: grid; gap: 8px; }
.not-working li { position: relative; padding-left: 22px; color: var(--ink-soft); }
.not-working li::before { content: ""; position: absolute; left: 2px; top: .72em; width: 10px; height: 1.5px; background: var(--marengo); }

/* ---------- Education ---------- */
.edu-grid { display: grid; grid-template-columns: 1fr 1.25fr; gap: clamp(16px, 2.4vw, 28px); align-items: start; }
.edu-col { display: grid; gap: clamp(16px, 2.4vw, 28px); }
.edu-list { display: grid; gap: 20px; }
.edu-list li { display: grid; gap: 2px; padding-left: 18px; border-left: 2px solid var(--periwinkle); color: var(--ink-soft); font-size: 16px; line-height: 1.5; }
.edu-list strong { display: block; color: var(--ink); font-weight: 600; }
.edu-years { font-size: 13.5px; font-weight: 600; color: var(--marengo); letter-spacing: .02em; }
.edu-list-compact { gap: 16px; }
.supervision-card {
  display: flex; gap: 18px; align-items: flex-start;
  background: var(--linen); box-shadow: none;
  padding-top: clamp(20px, 3vw, 32px);
}
.supervision-card p { color: var(--ink-soft); max-width: 80ch; }
.supervision-icon { flex: none; width: 40px; height: 40px; margin-top: -4px; fill: none; stroke: var(--marengo); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Price ---------- */
.price-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(16px, 2.4vw, 28px); }
.price-card { display: flex; flex-direction: column; gap: 6px; }
.price-format { font-size: 18px; font-weight: 500; color: var(--ink-soft); margin: 0; }
.price-value { font-size: clamp(2.6rem, 5vw, 3.6rem); font-weight: 600; letter-spacing: -0.03em; line-height: 1.1; margin: 0; }
.price-meta { margin: 6px 0 0; color: var(--ink-soft); font-size: 16px; }
.price-card-accent { background: linear-gradient(120deg, #E8ECF4 0%, var(--lavender) 100%); }

/* ---------- Steps ---------- */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(16px, 2vw, 24px); counter-reset: none; }
.step { display: flex; flex-direction: column; padding: clamp(24px, 3vw, 32px); }
.step p { color: var(--ink-soft); font-size: 15.5px; }
.step-num {
  width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; margin-bottom: 20px;
  background: var(--lavender); color: var(--marengo); font-weight: 700; font-size: 17px;
}

/* ---------- Contacts ---------- */
.contacts-card {
  display: grid; grid-template-columns: 1fr 1fr; gap: 32px; align-items: center; overflow: hidden;
  background: linear-gradient(115deg, var(--linen) 0%, #F3EEEA 45%, var(--lavender) 100%);
}
.contacts-text { position: relative; z-index: 2; }
.contacts-text p { color: var(--ink-soft); font-size: 18px; max-width: 42ch; }
.blob-contacts { width: 46%; aspect-ratio: 1; right: -12%; bottom: -40%; background: var(--periwinkle); opacity: .5; }
.contact-links { position: relative; z-index: 2; display: grid; gap: 12px; }
.contact-link {
  display: flex; align-items: center; gap: 16px; padding: 16px 20px; min-height: 72px;
  background: rgba(255, 255, 255, .78); border-radius: var(--radius-sm); text-decoration: none;
  border: 1px solid rgba(255, 255, 255, .9);
  transition: transform .2s, box-shadow .2s, background-color .2s;
}
.contact-link:hover { transform: translateY(-2px); background: #fff; box-shadow: var(--shadow); }
.contact-link > svg { width: 44px; height: 44px; padding: 10px; flex: none; border-radius: 50%; background: var(--marengo); fill: none; stroke: #fff; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.contact-label { display: block; font-size: 13.5px; color: var(--ink-soft); }
.contact-value { display: block; font-weight: 600; font-size: 17px; }

/* ---------- Footer ---------- */
.site-footer { height: var(--footer-h); display: flex; align-items: center; color: var(--ink-soft); font-size: 14.5px; }
.footer-inner { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: var(--ink); }

/* ---------- Reveal on scroll (only when JS is on) ---------- */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; }
.js .reveal.is-visible { opacity: 1; transform: none; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1100px) {
  .topics { grid-template-columns: repeat(4, 1fr); gap: 28px 12px; }
  .steps { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 900px) {
  :root { --header-h: 64px; }
  body { font-size: 16px; }

  .burger {
    display: grid; place-content: center; gap: 6px; margin-left: auto;
    width: 44px; height: 44px; border: 0; border-radius: 50%; background: var(--lavender); cursor: pointer;
  }
  .burger span { display: block; width: 18px; height: 1.6px; background: var(--ink); transition: transform .25s; }
  .burger[aria-expanded="true"] span:first-child { transform: translateY(3.8px) rotate(45deg); }
  .burger[aria-expanded="true"] span:last-child { transform: translateY(-3.8px) rotate(-45deg); }
  .header-cta { display: none; }
  .nav {
    position: fixed; inset: var(--header-h) 0 auto 0; margin: 0;
    flex-direction: column; gap: 0; padding: 8px var(--gutter) 24px;
    background: var(--bg); border-bottom: 1px solid var(--line); box-shadow: 0 20px 40px rgba(67, 87, 107, .1);
    transform: translateY(-8px); opacity: 0; visibility: hidden;
    transition: opacity .2s, transform .2s, visibility .2s;
  }
  .nav.is-open { transform: none; opacity: 1; visibility: visible; }
  .nav a { font-size: 19px; padding: 14px 0; border-bottom: 1px solid var(--line); }
  .nav a::after { display: none; }

  .hero-card { grid-template-columns: 1fr; min-height: 0; }
  .hero-text { padding: 36px 24px 8px; text-align: left; }
  .hero-visual { min-height: 0; height: clamp(360px, 95vw, 520px); }
  .hero-photo { max-height: 100%; }
  .blob-hero-1 { width: 80%; right: -16%; bottom: -26%; }
  .blob-hero-2 { width: 70%; left: -10%; bottom: -34%; }
  .hero-sparkle, .blob-hero-ring, .blob-hero-cool { display: none; }
  .blob-hero-warm { width: 70%; left: -30%; bottom: auto; top: -18%; }

  .about-grid { grid-template-columns: 1fr; }
  .about-photo { min-height: 0; aspect-ratio: 4 / 3; }
  .about-line { display: none; }

  .practice-card { grid-template-columns: 1fr; }
  .practice-art picture { max-width: 240px; }

  .edu-grid { grid-template-columns: 1fr; }
  .contacts-card { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  .topics { grid-template-columns: repeat(2, 1fr); gap: 24px 12px; }
  .topic-icon { width: 76px; height: 76px; }
  .topic-icon svg { width: 40px; height: 40px; }
  .steps { grid-template-columns: 1fr; }
  .price-grid { grid-template-columns: 1fr; }
  .hero-text .btn { width: 100%; justify-content: center; }
  .chips li { font-size: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
  .js .reveal { opacity: 1; transform: none; }
}

/* ---------- 404 ---------- */
.notfound { min-height: 100svh; display: grid; place-items: center; padding-block: 48px; text-align: center; }
.notfound-card { max-width: 560px; }
.notfound-card p { color: var(--ink-soft); }
