/* Катерина — психолог, гештальт-терапевт. Дизайн-система: см. DESIGN.md */
:root {
  --bg: oklch(97.6% 0.007 165);
  --surface: oklch(99.2% 0.003 165);
  --ink: oklch(24% 0.03 172);
  --ink-soft: oklch(42% 0.025 172);
  --line: oklch(87% 0.012 165);
  --accent: oklch(41% 0.075 168);
  --accent-hover: oklch(35% 0.075 168);
  --accent-ink: oklch(98% 0.01 165);
  --clay: oklch(55% 0.11 42);
  --tint: oklch(93.5% 0.02 165);

  --font-head: "Source Serif 4", Georgia, "Times New Roman", serif;
  --font-body: "Golos Text", system-ui, -apple-system, "Segoe UI", sans-serif;

  --s1: .25rem; --s2: .5rem; --s3: .75rem; --s4: 1rem; --s5: 1.5rem;
  --s6: 2rem; --s7: 3rem; --s8: 4.5rem; --s9: 7rem;

  --radius: 10px;
  --wrap: 72rem;
  --measure: 38rem;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 1.0625rem/1.6 var(--font-body);
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { color: var(--accent-hover); }
:focus-visible { outline: 2px solid var(--clay); outline-offset: 3px; border-radius: 4px; }

h1, h2, h3 { font-family: var(--font-head); font-weight: 600; line-height: 1.15; margin: 0; text-wrap: balance; letter-spacing: -0.005em; }
h1 { font-size: clamp(2.1rem, 1.4rem + 3vw, 3.4rem); }
h2 { font-size: clamp(1.65rem, 1.3rem + 1.4vw, 2.35rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 var(--s4); text-wrap: pretty; }
p:last-child { margin-bottom: 0; }

.wrap { width: min(100% - 2.5rem, var(--wrap)); margin-inline: auto; }
.measure { max-width: var(--measure); }
.skip { position: absolute; left: -999px; }
.skip:focus { left: var(--s4); top: var(--s4); background: var(--surface); padding: var(--s2) var(--s4); z-index: 10; }

/* Header */
.site-header { border-bottom: 1px solid var(--line); background: var(--bg); }
.site-header .wrap { display: flex; align-items: center; gap: var(--s5); padding-block: var(--s4); flex-wrap: wrap; }
.brand { font-family: var(--font-head); font-size: 1.2rem; font-weight: 600; color: var(--ink); text-decoration: none; line-height: 1.2; }
.brand small { display: block; font-family: var(--font-body); font-weight: 400; font-size: .85rem; color: var(--ink-soft); }
.nav { display: flex; gap: var(--s5); margin-left: auto; flex-wrap: wrap; }
.nav a { color: var(--ink); text-decoration: none; font-size: .98rem; }
.nav a:hover { color: var(--accent); text-decoration: underline; }

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: var(--s2); padding: .8rem 1.35rem; border-radius: 999px; font: 500 1rem/1.2 var(--font-body); text-decoration: none; border: 1px solid transparent; transition: background-color .15s ease, color .15s ease, border-color .15s ease; }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: var(--accent-hover); color: var(--accent-ink); }
.btn-ghost { border-color: var(--line); color: var(--ink); background: var(--surface); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn-row { display: flex; flex-wrap: wrap; gap: var(--s3); }

/* Sections */
section { padding-block: var(--s8); }
section + section { border-top: 1px solid var(--line); }
.section-head { margin-bottom: var(--s6); max-width: var(--measure); }
.section-head p { color: var(--ink-soft); margin-top: var(--s3); }

/* Hero */
.hero { padding-block: var(--s8) var(--s8); }
.hero-grid { display: grid; gap: var(--s7); grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); align-items: start; }
.hero .lead { font-size: 1.2rem; color: var(--ink-soft); margin-block: var(--s5) var(--s6); max-width: 34rem; }
.hero .note { margin-top: var(--s5); font-size: .95rem; color: var(--ink-soft); max-width: 32rem; }

.facts { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: var(--s5); }
.facts h2 { font-size: 1.15rem; margin-bottom: var(--s4); }
.facts dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: var(--s2) var(--s4); font-size: .98rem; }
.facts dt { color: var(--ink-soft); }
.facts dd { margin: 0; }

/* Topics: editorial list, not a card grid */
.topics { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 var(--s7); }
.topic { padding-block: var(--s5); border-top: 1px solid var(--line); }
.topic h3 { margin-bottom: var(--s2); }
.topic p { color: var(--ink-soft); }
.topic .more { font-weight: 500; }

/* Steps: a real sequence */
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s5); counter-reset: step; max-width: 48rem; }
.steps li { counter-increment: step; display: grid; grid-template-columns: 2.5rem 1fr; gap: var(--s4); }
.steps li::before { content: counter(step); font-family: var(--font-head); font-size: 1.6rem; color: var(--clay); line-height: 1.1; }
.steps h3 { margin-bottom: var(--s1); }
.steps p { color: var(--ink-soft); }

/* Approach */
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: var(--s7); align-items: start; }
.pull { font-family: var(--font-head); font-size: clamp(1.35rem, 1.1rem + 1vw, 1.75rem); line-height: 1.35; color: var(--ink); border-left: 2px solid var(--clay); padding-left: var(--s5); margin: 0; }

/* About */
.about { display: grid; grid-template-columns: 9rem minmax(0, 1fr); gap: var(--s6); align-items: start; }
.avatar { width: 9rem; height: 9rem; border-radius: 50%; object-fit: cover; }
.creds { margin: var(--s5) 0 0; padding: 0; list-style: none; display: grid; gap: var(--s2); }
.creds li { padding-left: var(--s5); position: relative; }
.creds li::before { content: ""; position: absolute; left: 0; top: .7em; width: .55rem; height: 1px; background: var(--clay); }
.aside-note { margin-top: var(--s6); padding-top: var(--s5); border-top: 1px solid var(--line); color: var(--ink-soft); font-size: .98rem; }

/* Quote */
.quote { margin: 0; max-width: 46rem; }
.quote p { font-family: var(--font-head); font-size: clamp(1.3rem, 1.1rem + .8vw, 1.6rem); line-height: 1.4; }
.quote footer { margin-top: var(--s4); color: var(--ink-soft); font-size: .95rem; }

/* Prices */
.prices { width: 100%; max-width: 46rem; border-collapse: collapse; }
.prices th, .prices td { text-align: left; padding: var(--s4) 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.prices td:last-child { text-align: right; white-space: nowrap; font-weight: 500; padding-left: var(--s5); }
.prices th { font-weight: 500; }
.prices .desc { display: block; font-weight: 400; color: var(--ink-soft); font-size: .95rem; margin-top: var(--s1); }
.fineprint { margin-top: var(--s5); color: var(--ink-soft); font-size: .95rem; max-width: var(--measure); }

/* FAQ */
.faq { max-width: 48rem; }
.faq details { border-top: 1px solid var(--line); }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; padding: var(--s4) 0; font-weight: 500; list-style: none; display: flex; justify-content: space-between; gap: var(--s4); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--accent); font-size: 1.3rem; line-height: 1; }
.faq details[open] summary::after { content: "–"; }
.faq details > div { padding-bottom: var(--s5); color: var(--ink-soft); max-width: var(--measure); }

/* Contact */
.contact { background: var(--tint); }
.contact .btn-row { margin-top: var(--s5); }

/* Article page */
.crumbs { font-size: .92rem; color: var(--ink-soft); padding-top: var(--s5); }
.crumbs a { color: var(--ink-soft); }
.article { padding-block: var(--s6) var(--s8); }
.article h1 { margin-bottom: var(--s5); max-width: 46rem; }
.article h2 { margin: var(--s7) 0 var(--s4); }
.article .prose { max-width: var(--measure); }
.article ul { padding-left: 1.2rem; }
.article li { margin-bottom: var(--s2); }
.callout { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: var(--s5); margin-block: var(--s6); max-width: var(--measure); }

/* Footer */
.site-footer { padding-block: var(--s7); font-size: .95rem; color: var(--ink-soft); border-top: 1px solid var(--line); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: var(--s6); }
.site-footer h2 { font-family: var(--font-body); font-size: .95rem; font-weight: 600; color: var(--ink); margin-bottom: var(--s3); }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s2); }
.site-footer a { color: var(--ink-soft); }
.crisis { margin-top: var(--s6); padding-top: var(--s5); border-top: 1px solid var(--line); }

@media (max-width: 860px) {
  .hero-grid, .split, .topics, .footer-grid { grid-template-columns: 1fr; }
  .hero-grid { gap: var(--s6); }
  .split { gap: var(--s5); }
  section { padding-block: var(--s7); }
}
@media (max-width: 560px) {
  body { font-size: 1rem; }
  .nav { gap: var(--s4); margin-left: 0; width: 100%; }
  .about { grid-template-columns: 1fr; }
  .avatar { width: 7rem; height: 7rem; }
  .prices td:last-child { white-space: normal; }
}

/* ===== v2: фото, сертификаты, отзывы, группа ===== */
.hero-photo { border-radius: var(--radius); overflow: hidden; }
.hero-photo img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 20%; }
.facts-strip { padding-block: 0 var(--s8); border-top: 0; }
.facts-strip dl { margin: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: var(--s5); border-top: 1px solid var(--line); padding-top: var(--s5); }
.facts-strip dt { color: var(--ink-soft); font-size: .92rem; margin-bottom: var(--s1); }
.facts-strip dd { margin: 0; }

.notice { background: var(--surface); border: 1px solid var(--line); border-left: 3px solid var(--clay); border-radius: var(--radius); padding: var(--s6); display: grid; grid-template-columns: minmax(0, 1.4fr) auto; gap: var(--s5); align-items: center; }
.notice h2 { font-size: clamp(1.4rem, 1.2rem + .8vw, 1.8rem); margin-bottom: var(--s3); }
.notice p { color: var(--ink-soft); margin: 0; }

.about-photo { border-radius: var(--radius); overflow: hidden; }
.about-photo img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.about2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: var(--s7); align-items: start; }
.stats { display: flex; flex-wrap: wrap; gap: var(--s5) var(--s7); margin-top: var(--s5); }
.stats div { font-size: .95rem; color: var(--ink-soft); }
.stats strong { display: block; font-family: var(--font-head); font-size: 1.6rem; color: var(--ink); font-weight: 600; }

/* Horizontal galleries: certificates and screenshot reviews */
.gallery-nav { display: flex; gap: var(--s2); justify-content: flex-end; margin-bottom: var(--s4); }
.gallery-nav button { width: 2.75rem; height: 2.75rem; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font-size: 1.2rem; cursor: pointer; }
.gallery-nav button:hover { border-color: var(--accent); color: var(--accent); }
.gallery { list-style: none; margin: 0; padding: 0 0 var(--s4); display: grid; grid-auto-flow: column; gap: var(--s4); overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain; scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
.gallery li { scroll-snap-align: start; }
.gallery a { display: block; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: var(--surface); }
.gallery.certs { grid-auto-columns: minmax(16rem, 20rem); }
.gallery.certs img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; object-position: top; }
.gallery.certs figcaption { padding: var(--s3) var(--s1) 0; font-size: .92rem; color: var(--ink-soft); line-height: 1.45; }
.gallery.certs figcaption strong { display: block; color: var(--ink); font-weight: 500; }
.gallery.shots { grid-auto-columns: minmax(13rem, 15rem); }
.gallery.shots img { width: 100%; aspect-ratio: 9 / 19.5; object-fit: cover; object-position: top; }
.gallery figure { margin: 0; }

.address { font-style: normal; color: var(--ink-soft); margin-top: var(--s4); }

@media (max-width: 860px) {
  .facts-strip dl { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .notice, .about2 { grid-template-columns: 1fr; }
}

/* ===== Лайтбокс для каруселей ===== */
html.lb-open { overflow: hidden; }
.lightbox { width: 100vw; height: 100vh; max-width: none; max-height: none; margin: 0; padding: var(--s7) var(--s8); border: 0; background: oklch(12% 0.01 62 / .92); color: oklch(96% 0.01 80); }
.lightbox::backdrop { background: oklch(12% 0.01 62 / .6); }
.lightbox[open] { display: grid; place-items: center; }
.lightbox figure { margin: 0; display: grid; justify-items: center; gap: var(--s3); max-height: 100%; }
.lightbox img { max-width: min(92vw, 60rem); max-height: calc(100vh - 8rem); width: auto; height: auto; object-fit: contain; border-radius: 6px; }
.lightbox figcaption { white-space: pre-line; max-width: 40rem; text-align: center; font-size: .95rem; line-height: 1.45; }
.lightbox button { position: fixed; width: 3rem; height: 3rem; border-radius: 50%; border: 1px solid oklch(96% 0.01 80 / .35); background: oklch(12% 0.01 62 / .6); color: inherit; font-size: 1.3rem; line-height: 1; cursor: pointer; }
.lightbox button:hover { border-color: oklch(96% 0.01 80 / .8); }
.lightbox button[hidden] { display: none; }
.lightbox .lb-close { top: var(--s4); right: var(--s4); font-size: 1.6rem; }
.lightbox .lb-prev { left: var(--s4); top: 50%; transform: translateY(-50%); }
.lightbox .lb-next { right: var(--s4); top: 50%; transform: translateY(-50%); }
.lightbox .lb-count { position: fixed; top: var(--s5); left: 50%; transform: translateX(-50%); font-size: .9rem; opacity: .8; }
.shots a, .gallery a { cursor: zoom-in; }
@media (max-width: 600px) {
  .lightbox { padding: var(--s8) var(--s3); }
  .lightbox img { max-width: 100%; max-height: calc(100vh - 9rem); }
  .lightbox .lb-prev, .lightbox .lb-next { top: auto; bottom: var(--s4); transform: none; }
}
