/* ==========================================================================
   Светлана Черняева — психолог, арт-терапевт. Лендинг.
   Fonts (Playfair Display / Inter) are self-hosted variable woff2 files in
   assets/fonts/ — no third-party CDN, one file per family/style covers
   weights 400–700.
   ========================================================================== */

/* --- Fonts --- */
@font-face{
  font-family: 'Playfair Display';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('../fonts/playfair-display-cyrillic.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face{
  font-family: 'Playfair Display';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('../fonts/playfair-display-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face{
  font-family: 'Playfair Display';
  font-style: italic;
  font-weight: 400 700;
  font-display: swap;
  src: url('../fonts/playfair-display-italic-cyrillic.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face{
  font-family: 'Playfair Display';
  font-style: italic;
  font-weight: 400 700;
  font-display: swap;
  src: url('../fonts/playfair-display-italic-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face{
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('../fonts/inter-cyrillic.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face{
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('../fonts/inter-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root{
  /* --- Color tokens (palette: dusty lavender / deep navy / soft champagne) --- */
  --bg: #EDECF3;
  --bg-alt: #E2E0EC;
  --surface: #FFFFFF;
  --surface-tint: #FBFAFD;
  --text: #262A42;
  --text-muted: #625F72;
  --text-soft: #918FA0;
  --border: #D8D6E4;
  --border-soft: #E6E4EE;

  --olive: #4A4768;
  --olive-dark: #34324C;
  --olive-tint: #E4E2ED;

  --gold: #E3CB98;
  --gold-deep: #E3CB98;
  --gold-deep-hover: #D6BB80;
  --gold-tint: #F3EAD4;

  --slate: #8482A0;
  --slate-dark: #4F4C65;
  --slate-tint: #E5E3EE;

  --blue: #6B6890;
  --blue-tint: #E7E5F0;

  --error: #B3432E;
  --error-tint: #F3E0DB;

  --focus-ring: #34324C;

  /* --- Typography --- */
  --font-serif: 'Playfair Display', Georgia, serif;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* --- Spacing scale (spacious, marketing page) --- */
  --space-1: 0.5rem;
  --space-2: 1rem;
  --space-3: 1.5rem;
  --space-4: 2.25rem;
  --space-5: 3.5rem;
  --space-6: 5rem;
  --space-7: 7rem;

  --radius-sm: 10px;
  --radius-md: 18px;
  --radius-lg: 28px;

  --shadow-soft: 0 20px 45px -25px rgba(38, 43, 46, 0.35);
  --shadow-card: 0 12px 30px -18px rgba(38, 43, 46, 0.28);

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --dur: 260ms;
  --reveal-dur: 640ms;
}

/* --- Reset --- */
*, *::before, *::after{ box-sizing: border-box; }
html{
  scroll-behavior: smooth;
  overflow-x: hidden;
  width: 100%;
}
body{
  margin: 0;
  width: 100%;
  max-width: 100vw;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img{ max-width: 100%; display: block; }
/* <picture> wrappers must be layout-transparent so `img{height:100%}` keeps
   resolving against .frame / .about-photo / .approach-photo containers */
picture{ display: contents; }
a{ color: inherit; text-decoration: none; }
ul{ margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4{ font-family: var(--font-serif); font-weight: 600; line-height: 1.15; margin: 0; overflow-wrap: break-word; text-wrap: balance; }
p{ margin: 0; text-wrap: pretty; }
button{ font-family: inherit; cursor: pointer; }

/* Fine paper-grain overlay — the site was otherwise perfectly flat vector
   color; a near-invisible SVG turbulence texture, blended with `overlay`,
   gives surfaces a tactile quality without touching the palette. Fixed +
   pointer-events:none so it never affects layout or interaction, and it
   sits above ordinary content (z-index 1) but below the header (100) and
   mobile drawer (99). */
body::after{
  content: '';
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.045;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='140' height='140'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix type='saturate' values='0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  background-size: 140px 140px;
}
input, textarea, select{
  font-family: inherit;
  font-size: 1rem;
  width: 100%;
  min-width: 0;
}

/* Flex/grid children shrink correctly instead of forcing page-wide horizontal scroll
   (form controls and long text otherwise impose a content-based minimum width) */
.hero .container,
.about-grid > *,
.approach-grid > *,
.formats-grid > *,
.final-grid > *,
.practice-card > *,
.format-card,
.field,
.practice-form,
.contact-card form,
.radio-group > label{
  min-width: 0;
}

@media (prefers-reduced-motion: reduce){
  html{ scroll-behavior: auto; }
  *, *::before, *::after{
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

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

.container{
  width: 100%;
  max-width: 1180px;
  margin-inline: auto;
  padding-inline: var(--space-3);
}

section{ position: relative; }

.section-pad{ padding-block: var(--space-6); }
@media (max-width: 640px){
  .section-pad{ padding-block: var(--space-5); }
}

.bg-alt{ background: var(--bg-alt); }
.bg-olive{ background: var(--slate-dark); color: #F3F6F5; }

/* --- Eyebrow / labels --- */
.eyebrow{
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--olive);
  font-weight: 600;
  margin-bottom: var(--space-2);
}
.eyebrow::before{
  content: '';
  width: 22px;
  height: 1.5px;
  background: var(--gold);
  display: inline-block;
}
.bg-olive .eyebrow,
.recognition .eyebrow,
.final-cta .eyebrow{ color: var(--gold-tint); }
.bg-olive .eyebrow::before,
.recognition .eyebrow::before,
.final-cta .eyebrow::before{ background: var(--gold-tint); }

/* --- Section heading blocks --- */
.section-head{
  max-width: 660px;
  margin-bottom: var(--space-5);
}
.section-head.center{ margin-inline: auto; text-align: center; }
.section-head h2,
.h2-compact{
  font-size: clamp(1.75rem, 1.2rem + 2vw, 2.6rem);
  letter-spacing: -0.01em;
}
.about-grid .h2-compact{ margin-bottom: var(--space-3); }
.section-head .lede{
  margin-top: var(--space-2);
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 56ch;
}

/* ==========================================================================
   Header
   ========================================================================== */
.site-header{
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(246, 244, 239, 0.7);
  backdrop-filter: blur(10px) saturate(1.1);
  -webkit-backdrop-filter: blur(10px) saturate(1.1);
  border-bottom: 1px solid transparent;
  transition: background var(--dur) var(--ease), border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.site-header.scrolled{
  background: rgba(246, 244, 239, 0.92);
  border-bottom-color: var(--border-soft);
  box-shadow: 0 8px 24px -18px rgba(38, 43, 46,0.3);
}
.site-header .container{
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 78px;
}
.brand{
  font-family: var(--font-serif);
  font-size: 1.2rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--text);
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}
.brand span{
  font-family: var(--font-sans);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-soft);
  font-weight: 500;
  margin-top: 2px;
}
.nav-desktop{
  display: none;
}
.nav-desktop ul{
  display: flex;
  align-items: center;
  gap: var(--space-4);
}
.nav-desktop a{
  font-size: 0.94rem;
  color: var(--text-muted);
  font-weight: 500;
  position: relative;
  padding-block: 4px;
  transition: color var(--dur) var(--ease);
}
.nav-desktop a::after{
  content:'';
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 1.5px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform var(--dur) var(--ease);
}
.nav-desktop a:hover{ color: var(--text); }
.nav-desktop a:hover::after{ transform: scaleX(1); transform-origin: left; }

.header-actions{ display: flex; align-items: center; gap: var(--space-2); }

.menu-toggle{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px; height: 44px;
  background: none;
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--text);
}
@media (min-width: 960px){
  .nav-desktop{ display: block; }
  .menu-toggle{ display: none; }
}

/* Mobile nav drawer */
.nav-mobile{
  position: fixed;
  inset: 0;
  z-index: 99;
  background: var(--bg);
  padding: calc(78px + var(--space-2)) var(--space-3) var(--space-3);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  transform: translateY(-8px);
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease), visibility var(--dur);
}
.nav-mobile.open{
  opacity: 1; visibility: visible; transform: translateY(0);
}
.nav-mobile ul{ display: flex; flex-direction: column; gap: 0.4rem; }
.nav-mobile a{
  font-family: var(--font-serif);
  font-size: 1.2rem;
  color: var(--text);
  display: inline-block;
  padding-block: 0.2rem;
}
.nav-mobile .contact-line{
  margin-top: auto;
  border-top: 1px solid var(--border);
  padding-top: var(--space-2);
  color: var(--text-muted);
  font-size: 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
@media (min-width: 960px){ .nav-mobile{ display: none; } }

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 0.95rem 1.7rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.98rem;
  border: 1px solid transparent;
  transition: transform var(--dur) var(--ease), background var(--dur) var(--ease), box-shadow var(--dur) var(--ease), color var(--dur) var(--ease), border-color var(--dur) var(--ease);
  white-space: nowrap;
  min-height: 44px;
}
.btn:active{ transform: scale(0.97); }
.btn-primary{
  background: var(--gold-deep);
  color: #2A2844;
  box-shadow: var(--shadow-card);
}
.btn-primary:hover{
  background: var(--gold-deep-hover);
  transform: translateY(-2px);
  box-shadow: 0 12px 28px -10px rgba(42,40,68,0.35);
}
.btn-primary:active{ transform: translateY(-1px) scale(0.97); box-shadow: 0 6px 16px -8px rgba(42,40,68,0.3); }
.btn-ghost{
  background: transparent;
  border-color: var(--border);
  color: var(--text);
}
.btn-ghost:hover{ border-color: var(--olive); background: var(--olive-tint); }
.btn-outline-light{
  background: transparent;
  border-color: rgba(243, 246, 245,0.55);
  color: #F3F6F5;
}
.btn-outline-light:hover{ background: rgba(243, 246, 245,0.12); border-color: #F3F6F5; }
.btn-sm{ padding: 0.7rem 1.3rem; font-size: 0.9rem; }
.btn-block{ width: 100%; }

/* Secondary hero action as a text link, not a second pill button — one
   filled CTA reads as the primary action, the other earns attention
   through motion (underline + arrow) instead of competing chrome. */
.link-arrow{
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding-block: 0.95rem;
  font-weight: 600;
  font-size: 0.98rem;
  color: var(--text);
  position: relative;
}
.link-arrow::after{
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: 0.7rem;
  height: 1.5px;
  background: var(--olive);
  opacity: 0.45;
  transform: scaleX(0.32);
  transform-origin: left;
  transition: transform var(--dur) var(--ease), opacity var(--dur) var(--ease);
}
.link-arrow svg{ transition: transform var(--dur) var(--ease); }
.link-arrow:hover::after{ transform: scaleX(1); opacity: 1; }
.link-arrow:hover svg{ transform: translateX(4px); }

.header-actions .btn{ display: none; }
@media (min-width: 640px){ .header-actions .btn{ display: inline-flex; } }

/* Sticky mobile CTA */
.mobile-cta{
  position: fixed;
  left: var(--space-2); right: var(--space-2); bottom: var(--space-2);
  z-index: 90;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 999px;
  box-shadow: var(--shadow-soft);
  padding: 0.5rem;
  display: flex;
  gap: 0.5rem;
  transform: translateY(140%);
  transition: transform var(--dur) var(--ease);
}
.mobile-cta.show{ transform: translateY(0); }
.mobile-cta a{ flex: 1; min-width: 0; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (min-width: 960px){ .mobile-cta{ display: none; } }

/* ==========================================================================
   Hero
   ========================================================================== */
.hero{
  padding-top: calc(78px + var(--space-6));
  padding-bottom: var(--space-6);
  overflow: hidden;
}
.hero .container{
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-5);
  align-items: center;
}
/* The eyebrow sits inside the h1 so the heading carries the search phrase
   («психолог, арт-терапевт в Москве»); it must look exactly like a normal
   eyebrow, so the h1 itself keeps body text metrics (the eyebrow's line box
   stays the same as outside a heading) and the display type lives on
   .hero-title. */
.hero-copy h1{
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.65;
}
.hero-copy h1 .eyebrow{ text-wrap: wrap; }
.hero-copy .hero-title{
  display: block;
  font-family: var(--font-serif);
  font-size: clamp(2.15rem, 1.4rem + 3.4vw, 3.9rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.022em;
  max-width: 16ch;
  animation: hero-focus-in 720ms var(--ease) 150ms backwards;
}
.hero-copy h1 em{
  font-style: italic;
  color: var(--olive-dark);
}
.hero-copy .sub{
  margin-top: var(--space-3);
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 46ch;
}
.hero-actions{
  margin-top: var(--space-4);
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
}
.hero-meta{
  margin-top: var(--space-4);
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
}
.hero-meta .item{
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.92rem;
  color: var(--text-muted);
}
.hero-meta svg{ color: var(--olive); flex-shrink: 0; }

.hero-visual{
  position: relative;
  justify-self: center;
  width: min(420px, 82vw);
}
.hero-visual .frame{
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  aspect-ratio: 4/5;
  transition: transform 220ms var(--ease);
}
.hero-visual img{ width: 100%; height: 100%; object-fit: cover; object-position: top center; }
.hero-visual .frame img{ animation: hero-image-focus 900ms var(--ease) 60ms backwards; }
.hero-visual .badge{
  position: absolute;
  bottom: -22px; left: -22px;
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  padding: 0.9rem 1.2rem;
  box-shadow: var(--shadow-card);
  max-width: 220px;
  font-size: 0.85rem;
  color: var(--text-muted);
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
  animation: hero-focus-in 720ms var(--ease) 450ms backwards;
}
.hero-visual .badge strong{
  display: block;
  font-family: var(--font-serif);
  font-size: 1.15rem;
  color: var(--text);
  font-weight: 600;
}
.hero-visual .ring{
  position: absolute;
  width: 130px; height: 130px;
  border-radius: 50%;
  border: 1.5px solid var(--gold);
  top: -26px; right: -20px;
  opacity: 0.55;
  animation: ring-breathe 6s ease-in-out infinite;
}
/* A second, fainter ring breathing on the same rhythm with a phase
   offset — a ripple echoing outward from the first, not a glow wash */
.hero-visual .ring::before{
  content: '';
  position: absolute;
  inset: -18px;
  border-radius: 50%;
  border: 1px solid var(--gold);
  opacity: 0.3;
  animation: ring-breathe 6s ease-in-out infinite;
  animation-delay: 0.6s;
}
@keyframes ring-breathe{
  0%, 100% { transform: scale(1); opacity: 0.55; }
  50% { transform: scale(1.08); opacity: 0.8; }
}
/* Hero focal entrance — plays once on load, not tied to [data-reveal]/scroll.
   "Coming into focus" mirrors the h1's own words ("Увидеть себя настоящего").
   Ends on `none` and uses fill-mode `backwards` (not `both`): an identity
   blur(0)/scale(1) left applied by a forwards fill still creates a stacking
   context and keeps a finished Animation alive on the text, image and badge
   for the life of the page. */
@keyframes hero-focus-in{
  from{ filter: blur(6px); }
  to{ filter: none; }
}
@keyframes hero-image-focus{
  from{ transform: scale(1.04); filter: blur(10px); }
  to{ transform: none; filter: none; }
}
@media (max-width: 480px){
  .hero-visual .badge{
    left: 8px; right: 8px; bottom: -16px;
    max-width: none;
    padding: 0.75rem 1rem;
  }
  .hero-visual .ring{ width: 80px; height: 80px; top: -12px; right: 4px; }
}

@media (min-width: 960px){
  .hero .container{
    grid-template-columns: 1.05fr 0.95fr;
  }
  .hero-visual{ justify-self: end; }
}

/* ==========================================================================
   Recognition / Pain block
   ========================================================================== */
.recognition{ background: var(--slate-dark); color: #F3F6F5; position: relative; overflow: hidden; }
/* A faint gold glow breaks up the flat solid fill without touching the
   palette family — same trick as .final-cta, both are the only two dark
   sections on an otherwise light page. */
.recognition::before{
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: radial-gradient(680px circle at 88% -10%, rgba(227, 203, 152, 0.1), transparent 60%);
}
.recognition .container{ position: relative; z-index: 1; }
.recognition .section-head h2{ color: #FBF7EC; }
.recognition .section-head .lede{ color: rgba(243, 246, 245,0.72); }
.pain-grid{
  display: grid;
  grid-template-columns: 1fr;
  gap: 1px;
  background: rgba(243, 246, 245,0.14);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.pain-item{
  background: rgba(243, 246, 245,0.05);
  padding: var(--space-3) var(--space-4);
  display: flex;
  gap: 0.9rem;
  align-items: flex-start;
  font-size: 1.02rem;
}
.pain-item svg{ flex-shrink: 0; margin-top: 0.25rem; color: var(--gold-tint); }
.pain-item-title{ font-weight: 600; color: #FBF7EC; }
.pain-item-desc{ margin: 0.3rem 0 0; color: #F3F6F5; font-size: 0.92rem; line-height: 1.5; }
@media (min-width: 720px){
  .pain-grid{ grid-template-columns: 1fr 1fr; }
}
.recognition-close{
  margin-top: var(--space-4);
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.25rem;
  color: #FBF7EC;
  max-width: 46ch;
}

/* ==========================================================================
   Process (4 steps)
   ========================================================================== */
.process-grid{
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-3);
}
@media (min-width: 720px){ .process-grid{ grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1080px){ .process-grid{ grid-template-columns: repeat(4, 1fr); } }

.process-card{
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  padding: var(--space-4) var(--space-3);
  position: relative;
  isolation: isolate;
}
.process-card .num{
  font-family: var(--font-serif);
  font-size: 2.4rem;
  color: var(--gold-tint);
  -webkit-text-stroke: 1.5px var(--gold);
  line-height: 1;
  margin-bottom: var(--space-2);
}
.process-card h3{ font-size: 1.2rem; margin-bottom: 0.5rem; }
.process-card p{ color: var(--text-muted); font-size: 0.95rem; }

/* A path connecting the four steps — dashed thread visible only in the
   grid gaps (cards' own background covers it elsewhere), echoing the
   copy's "путь, у которого есть своя логика" without extra markup. */
@media (min-width: 1080px){
  .process-grid{ position: relative; }
  .process-grid::before{
    content: '';
    position: absolute;
    left: calc(var(--space-3) + 1.5rem);
    right: calc(var(--space-3) + 1.5rem);
    top: calc(var(--space-4) + 1.2rem);
    height: 1px;
    background-image: repeating-linear-gradient(to right, rgba(227, 203, 152, 0.65) 0 8px, transparent 8px 18px);
    z-index: 0;
  }
  .process-card{ z-index: 1; }
}

/* ==========================================================================
   About
   ========================================================================== */
.about-grid{
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-5);
  align-items: start;
}
@media (min-width: 900px){
  .about-grid{ grid-template-columns: 0.85fr 1.15fr; gap: var(--space-6); }
}
.about-photo{
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  aspect-ratio: 4/5;
  max-width: 420px;
}
.about-photo img{ width: 100%; height: 100%; object-fit: cover; object-position: top center; }
.about-quote{
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.35rem;
  line-height: 1.5;
  color: var(--text);
  max-width: 60ch;
}
.about-quote::before{ content: '\201C'; color: var(--blue); font-size: 1.2em; }
.about-body{ margin-top: var(--space-3); color: var(--text-muted); max-width: 62ch; }
.about-body p + p{ margin-top: 1rem; }

.fact-list{
  margin-top: var(--space-4);
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.7rem;
}
@media (min-width: 560px){ .fact-list{ grid-template-columns: 1fr 1fr; } }
.fact-item{
  display: flex;
  gap: 0.7rem;
  align-items: flex-start;
  font-size: 0.94rem;
  color: var(--text);
  padding: 0.7rem 0.9rem;
  background: var(--surface-tint);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
}
.fact-item svg{ color: var(--olive); flex-shrink: 0; margin-top: 2px; }

/* Details / accordion (credentials) */
details.credentials{
  margin-top: var(--space-4);
  border-top: 1px solid var(--border);
  padding-top: var(--space-3);
}
details.credentials summary{
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 600;
  color: var(--text);
  font-size: 1rem;
  padding: 0.4rem 0;
}
details.credentials summary::-webkit-details-marker{ display: none; }
details.credentials summary .plus{
  width: 26px; height: 26px;
  border: 1px solid var(--border);
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: transform var(--dur) var(--ease), background var(--dur) var(--ease);
}
details.credentials[open] summary .plus{ transform: rotate(45deg); background: var(--olive-tint); }
.credentials-body{ padding-top: var(--space-2); color: var(--text-muted); font-size: 0.95rem; }
.credentials-body h3{ font-family: var(--font-sans); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--olive); margin: 1.1rem 0 0.5rem; font-weight: 600; }
.credentials-body h3:first-child{ margin-top: 0; }
.credentials-body ul{ display: flex; flex-direction: column; gap: 0.45rem; }
.credentials-body li{ padding-left: 1.1rem; position: relative; }
.credentials-body li::before{ content: '—'; position: absolute; left: 0; color: var(--gold); }

/* ==========================================================================
   Request areas
   ========================================================================== */
.topics-grid{
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-3);
}
@media (min-width: 640px){ .topics-grid{ grid-template-columns: 1fr 1fr; } }
@media (min-width: 1080px){ .topics-grid{ grid-template-columns: repeat(3, 1fr); } }

.topic-card{
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  padding: var(--space-4);
  position: relative;
  isolation: isolate;
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.topic-card:hover{ transform: translateY(-4px); box-shadow: var(--shadow-card); border-color: var(--border); }
/* Spotlight: a soft glow that follows the cursor, set via --spot-x/--spot-y
   (assets/js/main.js). Negative z-index keeps it above the card's own
   background but below its content, inside the isolated stacking context. */
.topic-card::before,
.process-card::before,
.format-card .format-body::before{
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  opacity: 0;
  background: radial-gradient(220px circle at var(--spot-x, 50%) var(--spot-y, 50%), rgba(227, 203, 152, 0.28), transparent 70%);
  transition: opacity var(--dur) var(--ease);
}
.topic-card:hover::before,
.process-card:hover::before,
.format-card:hover .format-body::before{ opacity: 1; }
.topic-card .icon{
  width: 52px; height: 52px;
  border-radius: 14px;
  background: var(--olive-tint);
  color: var(--olive-dark);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: var(--space-3);
}
.topic-card h3{ font-size: 1.15rem; margin-bottom: 0.5rem; }
.topic-card p{ color: var(--text-muted); font-size: 0.94rem; }

/* ==========================================================================
   Formats / services
   ========================================================================== */
.formats-grid{
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-3);
}
@media (min-width: 860px){ .formats-grid{ grid-template-columns: 1fr 1fr; } }
@media (min-width: 1080px){ .formats-grid{ grid-template-columns: repeat(3, 1fr); } }
/* At 2 columns, a 3rd card alone in row 2 reads as a layout mistake —
   give it the full row instead, centered like a featured entry. */
@media (min-width: 860px) and (max-width: 1079px){
  .formats-grid > .format-card:nth-child(3){
    grid-column: 1 / -1;
    max-width: 460px;
    margin-inline: auto;
  }
}

.format-card{
  background: var(--surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-soft);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: opacity var(--reveal-dur) var(--ease), translate var(--reveal-dur) var(--ease), transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease), border-color var(--dur) var(--ease);
  transition-delay: var(--reveal-delay, 0s), var(--reveal-delay, 0s), 0s, 0s, 0s;
}
.format-card:hover{ transform: translateY(-4px); box-shadow: var(--shadow-card); border-color: var(--border); }
.format-card .format-media{
  aspect-ratio: 16/9;
  overflow: hidden;
  position: relative;
}
.format-card .format-media img{ width: 100%; height: 100%; object-fit: cover; }
.format-card .format-media .tag{
  position: absolute; top: 1rem; left: 1rem;
  background: rgba(246, 244, 239,0.92);
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--olive-dark);
}
.format-card .format-body{ padding: var(--space-3); display: flex; flex-direction: column; gap: 0.65rem; flex: 1; position: relative; isolation: isolate; }
.format-card h3{ font-size: 1.25rem; }
.format-card p{ color: var(--text-muted); }
.format-card .format-list{ display: flex; flex-direction: column; gap: 0.5rem; margin-top: 0.3rem; }
.format-card .format-list li{ display: flex; gap: 0.6rem; align-items: flex-start; font-size: 0.93rem; color: var(--text); }
.format-card .format-list svg{ color: var(--olive); flex-shrink: 0; margin-top: 3px; }
.format-price{
  margin-top: auto;
  padding-top: var(--space-2);
  border-top: 1px solid var(--border-soft);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.format-price .price-line{ display: flex; flex-direction: column; gap: 0.15rem; }
.format-price .price-line b{ font-family: var(--font-serif); font-size: 1.15rem; font-variant-numeric: tabular-nums; }
.format-price .price-line span{ font-size: 0.82rem; color: var(--text-soft); }

/* ==========================================================================
   Approach
   ========================================================================== */
.approach-grid{
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-5);
  align-items: center;
}
@media (min-width: 940px){ .approach-grid{ grid-template-columns: 0.9fr 1.1fr; } }
.approach-photo{
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  aspect-ratio: 4/5;
  max-width: 440px;
}
.approach-photo img{ width: 100%; height: 100%; object-fit: cover; object-position: top center; }
.method-list{
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.65rem;
  margin-top: var(--space-3);
}
@media (min-width: 560px){ .method-list{ grid-template-columns: 1fr 1fr; } }
.method-list li{
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
  font-size: 0.92rem;
  display: flex;
  gap: 0.55rem;
  align-items: flex-start;
  transition: opacity var(--reveal-dur) var(--ease), translate var(--reveal-dur) var(--ease), transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease), border-color var(--dur) var(--ease);
  transition-delay: var(--reveal-delay, 0s), var(--reveal-delay, 0s), 0s, 0s, 0s;
}
.method-list li:hover{ transform: translateY(-4px); box-shadow: var(--shadow-card); border-color: var(--border); }
.method-list svg{ color: var(--blue); flex-shrink: 0; margin-top: 3px; }

/* ==========================================================================
   Free practice
   ========================================================================== */
.practice-card{
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  padding: var(--space-3);
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-4);
  box-shadow: var(--shadow-card);
}
@media (min-width: 640px){ .practice-card{ padding: var(--space-5); } }
@media (min-width: 860px){ .practice-card{ grid-template-columns: 1.2fr 0.8fr; align-items: center; } }
.practice-card h3{ font-size: 1.7rem; margin-bottom: 0.6rem; }
.practice-card .practice-note{
  margin-top: var(--space-3);
  font-size: 0.85rem;
  color: var(--text-soft);
  border-top: 1px solid var(--border-soft);
  padding-top: var(--space-2);
}
.practice-form{
  background: var(--bg-alt);
  border-radius: var(--radius-md);
  padding: var(--space-2);
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  min-width: 0;
}
@media (min-width: 640px){ .practice-form{ padding: var(--space-3); } }
.field{
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.field label, .field legend{ font-size: 0.85rem; color: var(--text-muted); font-weight: 500; }
fieldset.field{ border: 0; padding: 0; margin: 0; min-inline-size: 0; }
.field legend{ padding: 0; margin-bottom: 0.35rem; }
.field input, .field textarea, .field select{
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 10px;
  padding: 0.75rem 0.9rem;
  color: var(--text);
  min-height: 44px;
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.field input:focus, .field textarea:focus, .field select:focus{
  border-color: var(--olive);
  box-shadow: 0 0 0 3px var(--olive-tint);
  outline: none;
}
.field textarea{ min-height: 90px; resize: vertical; }
.field.error input, .field.error textarea{ border-color: var(--error); }
.field .error-msg{ font-size: 0.8rem; color: var(--error); display: none; }
.field.error .error-msg{ display: block; }
.field-check.error span{ color: var(--error); }
.field-check{
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
  font-size: 0.82rem;
  color: var(--text-muted);
}
.field-check input{ margin-top: 3px; width: 17px; height: 17px; accent-color: var(--olive); flex-shrink: 0; }
.field-check .inline-link{ color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.field-check .inline-link:hover{ color: var(--olive); }
.contact-card .field-check .inline-link:hover{ color: var(--gold-tint); }
.form-success{
  display: none;
  align-items: flex-start;
  gap: 0.7rem;
  background: var(--olive-tint);
  border: 1px solid var(--olive);
  border-radius: 12px;
  padding: 1rem 1.1rem;
  color: var(--olive-dark);
  font-size: 0.94rem;
}
.form-success.show{ display: flex; }
.form-success svg{ flex-shrink: 0; margin-top: 2px; }
/* Checkmark draw-in: relies on pathLength="100" on the circle/path in the
   markup, which normalizes their length to 100 regardless of actual
   geometry — stroke-dasharray/offset then just work without measuring
   anything. Circle draws first, the check stroke follows once it's done. */
.form-success svg circle,
.form-success svg path{
  stroke-dasharray: 100;
  stroke-dashoffset: 100;
}
.form-success.show svg circle{ animation: draw-stroke 500ms var(--ease) forwards; }
.form-success.show svg path{ animation: draw-stroke 320ms var(--ease) 460ms forwards; }
@keyframes draw-stroke{ to{ stroke-dashoffset: 0; } }
.form-error{
  display: none;
  align-items: flex-start;
  gap: 0.7rem;
  background: var(--error-tint);
  border: 1px solid var(--error);
  border-radius: 12px;
  padding: 1rem 1.1rem;
  color: var(--error);
  font-size: 0.94rem;
  margin-top: 0.7rem;
}
.form-error.show{ display: flex; }
.form-error svg{ flex-shrink: 0; margin-top: 2px; }
.form-error a{ text-decoration: underline; text-underline-offset: 2px; }

/* ==========================================================================
   FAQ
   ========================================================================== */
.faq-list{ display: flex; flex-direction: column; gap: 0.7rem; max-width: 800px; }
.faq-item{
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  padding: 0.3rem var(--space-3);
}
.faq-item summary{
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 1rem;
  justify-content: space-between;
  padding: 1.1rem 0;
  font-weight: 600;
  font-size: 1.02rem;
}
.faq-item summary::-webkit-details-marker{ display: none; }
.faq-item summary .plus{
  width: 30px; height: 30px;
  border-radius: 50%;
  border: 1px solid var(--border);
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: transform var(--dur) var(--ease), background var(--dur) var(--ease);
}
.faq-item[open] summary .plus{ transform: rotate(45deg); background: var(--gold-tint); }
.faq-item .faq-body{ padding: 0 0 1.2rem; color: var(--text-muted); font-size: 0.96rem; max-width: 68ch; }

/* Smooth expand/collapse for both accordions (FAQ and "Образование…").
   A closed <details> hides its content through the ::details-content slot
   (content-visibility: hidden), which skips rendering of the whole subtree —
   so animating the children (grid-rows, visibility, a JS-toggled class) can
   never work on close. Animate the slot itself instead: block-size 0 <-> auto
   (interpolate-size) plus content-visibility as a discrete transition, which
   keeps the content rendered until the collapse has finished. Native <details>
   semantics (keyboard, find-in-page, a11y tree) are untouched. Browsers
   without both features skip the block and simply open/close instantly.
   Exit is quicker than entrance. */
@supports (interpolate-size: allow-keywords) and selector(::details-content){
  :root{ interpolate-size: allow-keywords; }
  .faq-item::details-content,
  details.credentials::details-content{
    block-size: 0;
    overflow: clip;
    transition: block-size 240ms var(--ease), content-visibility 240ms allow-discrete;
  }
  .faq-item[open]::details-content,
  details.credentials[open]::details-content{
    block-size: auto;
    transition-duration: 340ms;
  }
  /* The global reduced-motion reset (`*, *::before, *::after`) does not
     match ::details-content, so it has to be switched off explicitly. The
     open/close itself still happens — only the movement is dropped. */
  @media (prefers-reduced-motion: reduce){
    .faq-item::details-content,
    .faq-item[open]::details-content,
    details.credentials::details-content,
    details.credentials[open]::details-content{ transition: none; }
  }
}

/* ==========================================================================
   Final CTA + Contacts
   ========================================================================== */
.final-cta{ background: var(--slate-dark); color: #F3F6F5; position: relative; overflow: hidden; }
.final-cta::before{
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: radial-gradient(680px circle at 8% 110%, rgba(227, 203, 152, 0.1), transparent 60%);
}
.final-cta .container{ position: relative; z-index: 1; }
.final-grid{
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-5);
}
@media (min-width: 960px){ .final-grid{ grid-template-columns: 1.1fr 0.9fr; gap: var(--space-6); } }
.final-copy h2{ color: #FBF7EC; font-size: clamp(1.9rem, 1.3rem + 2.2vw, 2.7rem); max-width: 18ch; }
.final-copy .lede{ margin-top: var(--space-2); color: rgba(243, 246, 245,0.75); font-size: 1.08rem; max-width: 46ch; }
.final-info{
  margin-top: var(--space-4);
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}
.final-info .item{ display: flex; gap: 0.6rem; align-items: center; font-size: 0.95rem; color: rgba(243, 246, 245,0.85); }
.final-info svg{ color: var(--gold-tint); flex-shrink: 0; }
.final-actions{ margin-top: var(--space-4); display: flex; flex-wrap: wrap; gap: 0.85rem; }

.contact-card{
  background: rgba(246, 244, 239,0.06);
  border: 1px solid rgba(243, 246, 245,0.18);
  border-radius: var(--radius-lg);
  padding: var(--space-3);
  min-width: 0;
}
@media (min-width: 640px){ .contact-card{ padding: var(--space-4); } }
.contact-card .field label, .contact-card .field legend{ color: rgba(243, 246, 245,0.78); }
.contact-card .field input, .contact-card .field textarea, .contact-card .field select{
  background: rgba(246, 244, 239,0.08);
  border-color: rgba(243, 246, 245,0.62);
  color: #F3F6F5;
}
.contact-card .field input::placeholder, .contact-card .field textarea::placeholder{ color: rgba(243, 246, 245,0.4); }
.contact-card .field input:focus, .contact-card .field textarea:focus, .contact-card .field select:focus{
  border-color: var(--gold-tint);
  box-shadow: 0 0 0 3px rgba(244, 232, 190,0.2);
}
.contact-card .radio-group{ display: flex; gap: 0.6rem; }
.contact-card .radio-group label{
  position: relative;
  flex: 1;
  min-width: 0;
  border: 1px solid rgba(243, 246, 245,0.25);
  border-radius: 10px;
  padding: 0.65rem 0.4rem;
  text-align: center;
  font-size: 0.88rem;
  cursor: pointer;
  color: rgba(243, 246, 245,0.8);
  transition: background var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.contact-card .radio-group input{ position: absolute; opacity: 0; pointer-events: none; }
.contact-card .radio-group input:checked + span{ color: #FBF7EC; }
.contact-card .radio-group label:has(input:checked){ background: rgba(244, 232, 190,0.16); border-color: var(--gold-tint); }
.contact-card .field-check{ color: rgba(243, 246, 245,0.78); }
.contact-card .field-check.error span{ color: #F2B8A6; }
.contact-card .form-success{
  background: rgba(244, 232, 190,0.14);
  border-color: var(--gold-tint);
  color: #FBF7EC;
}
.contact-card .form-error{
  background: rgba(179, 67, 46, 0.16);
  border-color: #E08668;
  color: #FFC7B3;
}
.contact-card .form-error a{ color: inherit; }

.legal-note{
  margin-top: var(--space-3);
  font-size: 0.82rem;
  color: rgba(243, 246, 245,0.7);
  max-width: 60ch;
  line-height: 1.6;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer{
  background: #211F35;
  color: rgba(243, 246, 245, 0.6);
  padding-block: var(--space-4);
  font-size: 0.88rem;
}
.footer-top{
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  padding-bottom: var(--space-3);
  border-bottom: 1px solid rgba(243, 246, 245, 0.12);
}
@media (min-width: 900px){
  .footer-top{ flex-direction: row; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: var(--space-4); }
}
.footer-brand{ font-family: var(--font-serif); color: #F3F6F5; font-size: 1.2rem; }
.footer-tagline{ margin-top: 0.25rem; font-size: 0.88rem; }
.footer-nav{ display: flex; flex-wrap: wrap; gap: 0.5rem 1.2rem; }
.footer-nav a{ transition: color var(--dur) var(--ease); }
.footer-nav a:hover{ color: #F3F6F5; }
.footer-contacts{ display: flex; flex-wrap: wrap; gap: 0.6rem 1.4rem; }
.footer-contacts a{ transition: color var(--dur) var(--ease); }
.footer-contacts a:hover{ color: #F3F6F5; }
.footer-bottom{
  margin-top: var(--space-3);
  display: flex;
  flex-direction: column-reverse;
  gap: 0.7rem;
  font-size: 0.78rem;
  color: rgba(243, 246, 245, 0.4);
}
@media (min-width: 640px){
  .footer-bottom{ flex-direction: row; align-items: flex-start; justify-content: space-between; gap: var(--space-3); }
}
.footer-note{ max-width: 62ch; line-height: 1.6; }
.footer-note a{ text-decoration: underline; text-underline-offset: 2px; transition: color var(--dur) var(--ease); }
.footer-note a:hover{ color: #F3F6F5; }
.footer-copy{ white-space: nowrap; }

/* ==========================================================================
   Scroll reveal
   ========================================================================== */
/* Hide-before-reveal only when scripting is available: without JS the
   .in-view class never arrives, so content must stay visible. Browsers
   that don't support the media query skip the block — same safe result. */
@media (scripting: enabled){
  /* :where() keeps this selector at zero specificity so any component's own
     hover rule (.format-card:hover, .method-list li:hover, ...) can win the
     cascade regardless of source order. Reveal moves via the standalone
     `translate` property, never `transform` — the two compose instead of
     competing, so a card can slide in on scroll AND lift on hover at the
     same time without one clobbering the other. Components that also
     transition their own properties (box-shadow, border-color, transform)
     must fold opacity/translate into their own `transition` list (see
     .format-card, .method-list li) — otherwise :where()'s zero-specificity
     transition loses to theirs and the reveal snaps in instead of easing. */
  :where([data-reveal]){
    opacity: 0;
    translate: 0 22px;
    transition: opacity var(--reveal-dur) var(--ease), translate var(--reveal-dur) var(--ease);
    transition-delay: var(--reveal-delay, 0s);
  }
  :where([data-reveal].in-view){
    opacity: 1;
    translate: 0;
  }
}
/* Stagger sets --reveal-delay only — never transition-delay directly, which
   would apply to every transition on the element (including hover's) since
   CSS repeats a short transition-delay list to match transition-property.
   That was the previous bug: method tile 6 took 379ms to start lifting on
   hover (vs 28ms for tile 1) because its blanket transition-delay: 350ms
   also delayed the hover transform. */
.pain-item:nth-child(2), .format-card:nth-child(2), .method-list li:nth-child(2){ --reveal-delay: 70ms; }
.pain-item:nth-child(3), .format-card:nth-child(3), .method-list li:nth-child(3){ --reveal-delay: 140ms; }
.pain-item:nth-child(4), .method-list li:nth-child(4){ --reveal-delay: 210ms; }
.pain-item:nth-child(5), .method-list li:nth-child(5){ --reveal-delay: 280ms; }
.pain-item:nth-child(6), .method-list li:nth-child(6){ --reveal-delay: 350ms; }
@media (prefers-reduced-motion: reduce){
  [data-reveal]{ opacity: 1; translate: none; }
  .hero-visual .ring, .hero-visual .ring::before{ animation: none; }
}

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