/* ============================================
   Любава Князева — психолог. Общие стили сайта.
   Мягкая система: крупные скругления, рассеянные
   тени как основной приём глубины, воздушные отступы.
   (по референсу — лендинг «Трансформационная
   программа», мягкая пыльно-голубая палитра)
   ============================================ */

:root{
  --ink: #1C2733;
  --ink-70: rgba(28,39,51,.72);
  --ink-50: rgba(28,39,51,.5);
  --paper: #EEF2F6;
  --paper-2: #FFFFFF;
  --block: #1B3A57;
  --block-2: #24507A;
  --line: #D3DAE2;
  --accent: #3E7CB1;
  --accent-dark: #2C5A82;
  --on-block: #F1F3F6;
  --on-block-70: rgba(241,243,246,.72);
  --on-block-50: rgba(241,243,246,.5);

  --font-body: "Manrope", "Segoe UI", sans-serif;
  --font-accent: "Lora", "Georgia", serif;

  --container: 1240px;
  --pad: 5vw;

  /* radii */
  --r-lg: 28px;
  --r-md: 22px;
  --r-sm: 14px;
  --r-xs: 12px;
  --r-pill: 999px;

  /* shadows: soft, diffuse — main depth cue instead of hairline borders */
  --shadow-sm: 0 12px 32px rgba(27,58,87,.08);
  --shadow-md: 0 20px 50px rgba(27,58,87,.10);
  --shadow-md-hover: 0 24px 60px rgba(27,58,87,.16);
  --shadow-lg: 0 30px 70px rgba(27,58,87,.14);
}

@media (min-width: 1024px){
  :root{ --pad: 64px; }
}
@media (min-width: 1440px){
  :root{ --pad: 80px; }
}

*, *::before, *::after{ box-sizing: border-box; }

html{ scroll-behavior: smooth; overflow-x: clip; }
body{ overflow-x: clip; }
@media (prefers-reduced-motion: reduce){
  html{ scroll-behavior: auto; }
}

body{
  margin: 0;
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 17px;
  line-height: 1.55;
  color: var(--ink-70);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

@media (min-width: 1024px){
  body{ font-size: 18px; }
}

img{ max-width: 100%; display: block; }

h1, h2, h3, h4{
  font-family: var(--font-body);
  color: var(--ink);
  margin: 0;
  font-weight: 800;
  text-transform: uppercase;
  /* Whole words wrap normally; a word only ever breaks mid-word (no
     hyphen mark inserted) as an absolute last resort, when it's too
     wide to fit the line on its own — never routine hyphenation. */
  overflow-wrap: break-word;
  word-break: normal;
  hyphens: none;
}

h1{
  font-size: clamp(2.3rem, 1.1rem + 4.4vw, 4.2rem);
  line-height: 1.03;
  letter-spacing: 0.01em;
}

h2{
  font-size: clamp(1.9rem, 1.2rem + 2.3vw, 2.75rem);
  line-height: 1.05;
  letter-spacing: 0.01em;
}

h3{
  font-size: 1.3rem;
  line-height: 1.15;
  letter-spacing: 0.01em;
}

/* On narrow phones the vw-based clamps above can force a single long
   uppercase word (e.g. "ПРОФЕССИОНАЛЬНОЕ") wider than the line, which
   makes overflow-wrap break it mid-word. Give h1/h2 more headroom to
   shrink there so whole words keep wrapping as whole words. */
@media (max-width: 420px){
  h1{ font-size: clamp(1.9rem, 1.3rem + 3.6vw, 4.2rem); }
  h2{ font-size: clamp(1.55rem, 1.05rem + 2vw, 2.75rem); }
}

p{ margin: 0 0 1em; }
p:last-child{ margin-bottom: 0; }

a{ color: inherit; }

.container{
  max-width: var(--container);
  margin: 0 auto;
  padding-left: var(--pad);
  padding-right: var(--pad);
}

section{
  padding: 56px 0;
}
@media (min-width: 1024px){
  section{ padding: 96px 0; }
}

.bg-paper{ background: var(--paper); }
.bg-paper-2{ background: var(--paper-2); }
.bg-block{ background: var(--block); color: var(--on-block); }

/* Sections that read as a big rounded card floating on the page
   background, rather than an edge-to-edge colored block. */
#zapis.bg-block,
#obuchenie.bg-block{
  background: var(--paper);
  color: var(--ink-70);
}
#zapis .container,
#obuchenie .container{
  background: var(--block);
  color: var(--on-block);
  border-radius: var(--r-lg);
  padding-top: 56px;
  padding-bottom: 56px;
  box-shadow: var(--shadow-lg);
}
@media (min-width: 1024px){
  #zapis .container,
  #obuchenie .container{ padding-top: 72px; padding-bottom: 72px; }
}

hr.hairline{
  border: none;
  border-top: 1px solid var(--line);
  margin: 0;
}

/* ---------- Buttons ---------- */
.btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: .04em;
  padding: 17px 30px;
  border-radius: var(--r-pill);
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: background 150ms ease, color 150ms ease, border-color 150ms ease;
  white-space: nowrap;
}
.btn:focus-visible{ outline: 3px solid var(--accent); outline-offset: 2px; }

.btn-primary{
  background: var(--block);
  color: var(--paper);
  border-color: var(--block);
}
.btn-primary:hover{ background: var(--ink); border-color: var(--ink); }
.hero-copy .btn-primary,
.bg-block .btn-primary{
  background: var(--paper);
  color: var(--block);
  border-color: var(--paper);
}
.hero-copy .btn-primary:hover,
.bg-block .btn-primary:hover{ background: var(--line); border-color: var(--line); }

.btn-outline-block{
  background: transparent;
  color: var(--ink);
  border-color: var(--ink);
}
.btn-outline-block:hover{ background: var(--ink); color: var(--paper); }

.btn-outline-onblock{
  background: transparent;
  color: var(--on-block);
  border-color: var(--on-block);
}
.btn-outline-onblock:hover{ background: var(--on-block); color: var(--block); }

.link-underline{
  font-weight: 700;
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: var(--line);
  transition: text-decoration-color 150ms ease, color 150ms ease;
}
.link-underline:hover{ text-decoration-color: currentColor; color: var(--accent-dark); }

/* ---------- Icons ----------
   Simple inline-SVG line icons, one stroke weight and one rounding
   style everywhere (see <svg> markup) so they read as a single set. */
.icon{
  flex: none;
  width: 26px;
  height: 26px;
  stroke: var(--accent);
  fill: none;
}
.icon-sm{ width: 20px; height: 20px; }
.icon-onblock{ stroke: var(--on-block); }
.icon-ink{ stroke: var(--ink); }

/* ---------- Header ---------- */
.site-header{
  position: sticky;
  top: 0;
  z-index: 100;
  width: 100%;
  background: var(--paper);
  box-shadow: 0 12px 28px rgba(27,58,87,.06);
}
.site-header .container{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-top: 16px;
  padding-bottom: 16px;
}
.wordmark{
  text-decoration: none;
  color: var(--ink);
  line-height: 1.15;
}
.wordmark .name{
  display: block;
  font-family: var(--font-body);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .01em;
  font-size: 18px;
}
.wordmark .role{
  display: block;
  font-family: var(--font-body);
  font-size: 12px;
  color: var(--ink-70);
  letter-spacing: .02em;
  text-transform: none;
  font-weight: 500;
}

.nav-links{
  display: flex;
  align-items: center;
  gap: 18px;
}
.nav-links a:not(.btn){
  text-decoration: none;
  font-weight: 700;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: .01em;
  color: var(--ink);
  border-bottom: 1px solid transparent;
  transition: border-color 150ms ease, color 150ms ease;
  white-space: nowrap;
}
.nav-links a:not(.btn):hover{ border-color: var(--accent); color: var(--accent-dark); }

.nav-phone{
  white-space: nowrap;
  text-transform: none !important;
}

.nav-legal{
  font-size: 12px !important;
  font-weight: 500 !important;
  text-transform: none !important;
  color: var(--ink-70) !important;
  letter-spacing: 0 !important;
  white-space: nowrap !important;
}

.burger{
  display: none;
  flex-direction: column;
  background: none;
  border: none;
  cursor: pointer;
  width: 44px;
  height: 44px;
  padding: 0;
  align-items: center;
  justify-content: center;
}
.burger span,
.burger::before,
.burger::after{
  content: "";
  display: block;
  width: 24px;
  height: 2px;
  background: var(--ink);
  transition: transform 200ms ease, opacity 200ms ease;
}
.burger span{ margin: 6px 0; }
.burger[aria-expanded="true"]::before{ transform: translateY(8px) rotate(45deg); }
.burger[aria-expanded="true"] span{ opacity: 0; }
.burger[aria-expanded="true"]::after{ transform: translateY(-8px) rotate(-45deg); }

@media (max-width: 1279px){
  .burger{ display: inline-flex; }
  .nav-links{
    position: fixed;
    inset: 0 0 0 auto;
    width: min(320px, 84vw);
    height: 100vh;
    background: var(--paper);
    border-left: 1px solid var(--line);
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 28px;
    padding: 40px var(--pad);
    transform: translateX(100%);
    visibility: hidden;
    transition: transform 250ms ease, visibility 0s linear 250ms;
    z-index: 101;
  }
  .nav-links.is-open{ transform: translateX(0); visibility: visible; transition: transform 250ms ease; }
  .burger{ position: relative; z-index: 102; }
  .nav-links a.btn{ width: 100%; }
}

/* ---------- Hero ----------
   Background bleeds full-width (edge to edge); the content grid inside
   stays aligned to the same .container width as every other section
   — no floating "card" for the whole hero, only the photo placeholder
   keeps its own rounded inset treatment. */
.hero{ padding-top: 40px; padding-bottom: 40px; background: var(--block); }
@media (min-width: 1024px){ .hero{ padding-top: 56px; padding-bottom: 56px; } }
.hero-grid{
  display: grid;
  grid-template-columns: 1fr;
}
.hero-grid > *{ min-width: 0; }
@media (min-width: 1024px){
  .hero-grid{
    grid-template-columns: 1fr 1fr;
    min-height: 600px;
  }
}
.hero-copy{
  /* left padding is 0 on purpose: .hero-copy already sits inside
     .container, which supplies the left inset. Adding var(--pad) here
     too double-indented the headline past the header wordmark and the
     cards below it. */
  background: var(--block);
  color: var(--on-block);
  padding: 48px 24px 44px 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
@media (min-width: 1024px){
  .hero-copy{ padding: 64px 48px 64px 0; }
}
.hero-copy h1{
  color: var(--on-block);
  margin-bottom: 24px;
  /* narrower than the page h1 scale: this heading lives in a half-width
     column once the hero splits into two, so the global vw-based clamp
     (sized for full-width headings) was forcing long words to break
     mid-word. */
  font-size: clamp(1.6rem, 0.9rem + 2vw, 2.4rem);
}
.hero-copy h1 em,
.hero-copy h1 .accent-serif{
  display: inline;
  font-family: var(--font-accent);
  font-style: italic;
  font-weight: 600;
  text-transform: none;
  color: #9FC2E0;
}
.hero-copy .lede{
  font-size: 18px;
  color: var(--on-block-70);
  max-width: 46ch;
  margin-bottom: 36px;
}
.hero-actions{
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
}

.hero-photo{
  position: relative;
  background: var(--block-2);
  min-height: 320px;
  display: flex;
  align-items: stretch;
}
.hero-photo-placeholder{
  flex: 1;
  margin: 16px;
  border-radius: var(--r-md);
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(circle at 25% 20%, rgba(159,194,224,.55), transparent 55%),
    radial-gradient(circle at 80% 75%, rgba(62,124,177,.5), transparent 60%),
    radial-gradient(circle at 55% 50%, rgba(36,80,122,.9), rgba(27,58,87,.95) 70%);
}
.hero-photo-placeholder::before{
  content: "";
  position: absolute;
  inset: -20%;
  background: radial-gradient(circle at 40% 30%, rgba(255,255,255,.18), transparent 50%);
  filter: blur(30px);
  pointer-events: none;
}
.hero-photo-frame{
  flex: 1;
  margin: 16px;
  border-radius: var(--r-md);
  overflow: hidden;
  position: relative;
  min-height: 420px;
}
.hero-photo-frame img{
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 18%;
}
.hero-photo-glyph{
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-accent);
  font-style: italic;
  font-weight: 600;
  font-size: clamp(6rem, 4rem + 8vw, 11rem);
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 2px var(--on-block-50);
}
.hero-photo-caption{
  position: absolute;
  left: 32px;
  right: 32px;
  bottom: 32px;
  border-radius: var(--r-pill);
  padding: 10px 18px;
  font-size: 12px;
  letter-spacing: .03em;
  color: var(--on-block);
  background: rgba(27,58,87,.55);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  width: fit-content;
}

.facts-section{ padding-top: 0; padding-bottom: 0; }

/* ---------- Facts strip ---------- */
.facts-strip{
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin: 48px 0;
}
@media (min-width: 1024px){
  .facts-strip{ margin: 64px 0; }
}
@media (min-width: 641px){
  .facts-strip{ grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px){
  .facts-strip{ grid-template-columns: repeat(4, 1fr); }
}
.fact{
  background: var(--paper-2);
  color: var(--ink);
  padding: 28px 24px;
  font-weight: 700;
  font-size: 15px;
  line-height: 1.4;
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 120px;
  border-radius: var(--r-md);
  box-shadow: var(--shadow-sm);
}
.fact.is-block{
  background: var(--block);
  color: var(--on-block);
}

/* ---------- Requests list ---------- */
.requests-wrap{
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
}
@media (min-width: 1024px){
  .requests-wrap{ grid-template-columns: 0.7fr 1.6fr; gap: 64px; }
}
.requests-list{
  display: grid;
  grid-template-columns: 1fr;
}
@media (min-width: 641px){
  .requests-list{ grid-template-columns: 1fr 1fr; gap: 0 32px; }
}
.request-item{
  display: flex;
  gap: 16px;
  padding: 20px 22px;
  background: var(--paper-2);
  border-radius: var(--r-sm);
  border-left: 3px solid var(--accent);
  box-shadow: var(--shadow-sm);
  margin-bottom: 12px;
}
.request-item p{ font-size: 16px; color: var(--ink-70); }

/* ---------- Teaching / programs teaser ---------- */
.teach-wrap{
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
}
@media (min-width: 1024px){
  .teach-wrap{ grid-template-columns: 1fr 1fr; gap: 56px; align-items: stretch; }
}
.teach-main{
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
/* This heading is a long two-part title (programme name + quoted title),
   not a short section label — the default h2 scale reads oversized here. */
.teach-main h2{ font-size: clamp(1.5rem, 1.05rem + 1.6vw, 2.1rem); }
.teach-lede{ margin-top: 16px; max-width: 46ch; }
.teach-list{
  list-style: none;
  margin: 28px 0 32px;
  padding: 0;
  display: grid;
  gap: 12px;
  width: 100%;
}
.teach-item{
  display: flex;
  align-items: center;
  gap: 14px;
  background: rgba(241,243,246,.08);
  border-radius: var(--r-sm);
  padding: 16px 20px;
  color: var(--on-block);
  font-weight: 700;
  font-size: 15px;
}
.teach-item .icon{ color: #9FC2E0; }
.teach-photo{
  margin: 0;
  border-radius: var(--r-md);
  overflow: hidden;
  width: 100%;
  height: 280px;
  background: var(--block-2);
}
@media (min-width: 1024px){
  .teach-photo{ height: auto; min-height: 420px; }
}
.teach-photo img{
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 30%;
}

/* ---------- Method ---------- */
.method-wrap{
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
}
.method-intro p{
  margin-top: 24px;
  font-size: 17px;
  max-width: 70ch;
}
.method-steps{
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  margin-top: 48px;
}
@media (min-width: 768px){
  .method-steps{ grid-template-columns: repeat(3, 1fr); }
}
.method-step{
  position: relative;
  background: var(--paper-2);
  padding: 32px 24px 28px;
  border-radius: var(--r-md);
  box-shadow: var(--shadow-sm);
}
.step-num{
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--on-block);
  font-family: var(--font-body);
  font-weight: 800;
  font-size: 1.05rem;
  line-height: 1;
  margin-bottom: 20px;
}
.method-step h3{ margin-bottom: 10px; }
.method-step p{ font-size: 15.5px; }

/* ---------- Photo + text split (about, bio) ---------- */
.about-split{
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
  align-items: start;
}
@media (min-width: 1024px){
  .about-split{ grid-template-columns: 0.75fr 1.25fr; gap: 72px; }
}
.about-split .about-wrap,
.about-split .bio-block{ max-width: none; }
.about-split > *{ min-width: 0; }
@media (max-width: 480px){
  .btn{ white-space: normal; text-align: center; max-width: 100%; padding: 15px 22px; }
  .about-split{ grid-template-columns: minmax(0, 1fr); }
}
.photo-card{
  margin: 0;
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  background: var(--block-2);
  aspect-ratio: 4 / 5;
  max-width: 460px;
}
.photo-card img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 22%;
}
@media (min-width: 1024px){
  .photo-card{ position: sticky; top: 110px; }
}

/* ---------- About (home short) ---------- */
.about-wrap{
  max-width: 780px;
}
.about-wrap p{ font-size: 17px; margin-bottom: 1.1em; }
.regalia-list{
  margin: 32px 0;
  padding: 0;
  margin-left: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.regalia-list li{
  list-style: none;
  padding: 9px 16px;
  background: var(--paper-2);
  border-radius: var(--r-xs);
  box-shadow: var(--shadow-sm);
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
}

/* ---------- Services ---------- */
.cards-grid{
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}
@media (min-width: 641px){
  .cards-grid{ grid-template-columns: repeat(3, 1fr); }
}
.card{
  background: var(--paper-2);
  padding: 32px 28px;
  color: var(--ink);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-md);
  transition: background 150ms ease, color 150ms ease, box-shadow 200ms ease, transform 200ms ease;
}
.card:hover{
  background: var(--block);
  color: var(--on-block);
  box-shadow: var(--shadow-md-hover);
  transform: translateY(-3px);
}
.card:hover h3{ color: var(--on-block); }
.card-icon{ margin-bottom: 18px; }
.card-icon .icon{ transition: stroke 150ms ease; }
.card:hover .card-icon .icon{ stroke: var(--on-block); }
.card h3{ margin-bottom: 14px; color: var(--ink); transition: color 150ms ease; }
.card p{ font-size: 16px; margin-bottom: 20px; }
.card-format{
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  margin-bottom: 18px;
  padding: 5px 12px;
  border-radius: var(--r-xs);
  background: var(--paper);
  opacity: .85;
}
.card:hover .card-format{ background: rgba(241,243,246,.12); }
.card-link{ display: inline-block; }
.card:hover .card-link{ color: var(--on-block); text-decoration-color: var(--on-block-50); }

/* Card "Подробнее" accordion toggle */
.card-toggle{
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  padding: 0;
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: var(--line);
  cursor: pointer;
  transition: text-decoration-color 150ms ease, color 150ms ease;
}
.card-toggle:hover{ text-decoration-color: currentColor; color: var(--accent-dark); }
.card-toggle:focus-visible{ outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 2px; }
.card:hover .card-toggle{ color: var(--on-block); text-decoration-color: var(--on-block-50); }
.card-toggle-chevron{ width: 14px; height: 14px; transition: transform 200ms ease; }
.card.is-expanded .card-toggle-chevron{ transform: rotate(180deg); }
.card .accordion-panel-inner{ padding-top: 18px; }
.card .accordion-panel-inner .link-underline{ display: inline-block; margin-top: 14px; }
.card:hover .accordion-panel-inner .link-underline{ color: var(--on-block); text-decoration-color: var(--on-block-50); }

/* ---------- Accordion (shared: service cards, documents list) ---------- */
.accordion-panel{
  display: grid;
  grid-template-rows: minmax(0, 0fr);
  transition: grid-template-rows 300ms ease;
}
.accordion-panel-inner{ overflow: hidden; min-height: 0; }
.is-expanded > .accordion-panel{ grid-template-rows: minmax(0, 1fr); }
@media (prefers-reduced-motion: reduce){
  .accordion-panel{ transition: none; }
}

/* ---------- Testimonials ---------- */
.testi-grid{
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}
@media (min-width: 641px){
  .testi-grid{ grid-template-columns: repeat(3, 1fr); }
}
.testi-card{
  background: var(--paper-2);
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  border-radius: var(--r-md);
  box-shadow: var(--shadow-md);
  transition: box-shadow 200ms ease, transform 200ms ease;
}
.testi-card:hover{
  box-shadow: var(--shadow-md-hover);
  transform: translateY(-3px);
}
.testi-quote-mark{
  font-weight: 800;
  font-size: 22px;
  color: var(--accent);
}
.testi-text{ font-size: 16px; color: var(--ink); flex: 1; }
.testi-author{
  font-size: 14px;
  font-weight: 700;
  color: var(--ink-70);
}

/* ---------- Form ---------- */
.form-wrap{
  display: grid;
  grid-template-columns: 1fr;
  gap: 48px;
}
@media (min-width: 1024px){
  .form-wrap{ grid-template-columns: 0.9fr 1.1fr; gap: 80px; }
}
.bg-block h2{ color: var(--on-block); }
.bg-block p{ color: var(--on-block-70); }

.booking-form{
  display: grid;
  gap: 20px;
}
.field{
  display: grid;
  gap: 8px;
}
.field label{
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--on-block-70);
}
.field input[type="text"],
.field input[type="tel"],
.field input[type="email"],
.field textarea,
.field select{
  font-family: var(--font-body);
  font-size: 16px;
  padding: 14px 16px;
  border-radius: var(--r-sm);
  border: 1px solid var(--on-block-50);
  background: rgba(241,243,246,.06);
  color: var(--on-block);
  width: 100%;
}
.field textarea{ resize: vertical; min-height: 110px; }
.field input::placeholder,
.field textarea::placeholder{ color: var(--on-block-50); }
.field input:focus,
.field textarea:focus,
.field select:focus{
  outline: none;
  border-color: var(--accent);
}
.radio-row{
  display: flex;
  gap: 24px;
}
.radio-row label{
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 500;
  text-transform: none;
  color: var(--on-block);
  letter-spacing: 0;
}
.radio-row input{ accent-color: var(--accent); width: 18px; height: 18px; }

.consent-row{
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.consent-row input{ margin-top: 4px; accent-color: var(--accent); width: 18px; height: 18px; flex: none; }
.consent-row label{
  font-size: 13px;
  color: var(--on-block-70);
  text-transform: none;
  letter-spacing: 0;
  font-weight: 400;
}

.form-success{
  display: none;
  background: rgba(241,243,246,.08);
  border: 1px solid var(--accent);
  border-radius: var(--r-sm);
  padding: 20px;
  color: var(--on-block);
  font-weight: 700;
}
.form-success.is-visible{ display: block; }
.booking-form.is-hidden{ display: none; }

/* ---------- Footer ---------- */
.site-footer{
  padding: 56px 0 0;
  font-size: 14px;
  color: var(--ink-70);
}
.footer-grid{
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  padding-bottom: 40px;
}
@media (min-width: 1024px){
  .footer-grid{ grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; }
}
.footer-contact-row{
  display: flex;
  align-items: center;
  gap: 10px;
}
.footer-contact-row a{ text-decoration: none; }
.footer-contact-row a:hover{ color: var(--accent-dark); }
.footer-nav{
  display: grid;
  gap: 10px;
}
.footer-nav a{ text-decoration: none; font-weight: 600; }
.footer-nav a:hover{ color: var(--accent-dark); }
.footer-bottom{
  border-top: 1px solid var(--line);
  padding: 20px 0;
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  justify-content: space-between;
  font-size: 12.5px;
  color: var(--ink-50);
}
.footer-bottom a{
  color: var(--ink-50);
  text-decoration: underline;
}

/* ---------- Page hero (secondary pages) ---------- */
.page-hero{
  padding: 56px 0 40px;
}
@media (min-width: 1024px){
  .page-hero{ padding: 88px 0 48px; }
}
.page-hero .lede{
  max-width: 60ch;
  font-size: 18px;
  margin-top: 20px;
}

/* ---------- obo-mne page ---------- */
.bio-block{
  max-width: 760px;
}
.bio-block p{ margin-bottom: 1.2em; font-size: 17px; }

.edu-groups{
  display: grid;
  gap: 16px;
  margin-top: 40px;
}
.edu-group{
  padding: 24px 28px;
  background: var(--paper-2);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-sm);
}
.edu-group h3{
  margin-bottom: 10px;
  font-size: 1.05rem;
}
.edu-group p{ font-size: 16px; }

.ethics-list{
  display: grid;
  gap: 16px;
  margin-top: 40px;
}
.ethics-item{
  padding: 22px 26px;
  background: var(--paper-2);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-sm);
}
.ethics-item strong{
  display: block;
  color: var(--ink);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .01em;
  font-size: .95rem;
  margin-bottom: 8px;
}
.ethics-item p{ font-size: 16px; }

.cta-band{
  text-align: left;
  padding: 56px 40px;
  background: var(--block);
  color: var(--on-block);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg);
}
@media (min-width: 641px){
  .cta-band{ text-align: center; }
}
@media (min-width: 1024px){
  .cta-band{ padding: 64px 56px; }
}
.cta-band h2{ margin-bottom: 20px; color: var(--on-block); }
.cta-band p{ max-width: 50ch; margin-left: auto; margin-right: auto; margin-bottom: 28px; color: var(--on-block-70); }

/* ---------- programs page ---------- */
.programs-list{
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}
@media (min-width: 1024px){
  .programs-list{ grid-template-columns: 1fr 1fr; }
}
.program-card{
  background: var(--paper-2);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-sm);
  padding: 32px 28px;
  transition: box-shadow 200ms ease, transform 200ms ease;
}
.program-card:hover{
  box-shadow: var(--shadow-md-hover);
  transform: translateY(-3px);
}
.program-card-head{
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 14px;
}
.program-card-head .icon{ margin-top: 2px; }
.program-card-head h3{ margin-bottom: 0; }
.program-card h3{ margin-bottom: 14px; }
.program-card p{ font-size: 16px; margin-bottom: 18px; color: var(--ink-70); }
.program-meta{
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--accent-dark);
  background: var(--paper);
  padding: 5px 12px;
  border-radius: var(--r-xs);
}

/* ---------- biblioteka page ---------- */
.books-grid{
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  margin-top: 48px;
}
@media (min-width: 641px){
  .books-grid{ grid-template-columns: repeat(2, 1fr); }
}
.book-card{
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 24px;
  background: var(--paper-2);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-sm);
  padding: 28px 24px;
  transition: box-shadow 200ms ease, transform 200ms ease;
}
.book-card:hover{
  box-shadow: var(--shadow-md-hover);
  transform: translateY(-3px);
}
@media (max-width: 480px){
  .book-card{ grid-template-columns: 1fr; }
}
.book-cover{
  position: relative;
  border-radius: var(--r-sm);
  overflow: hidden;
  aspect-ratio: 3/4.2;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px;
  text-align: center;
  color: rgba(241,243,246,.9);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 12px;
  line-height: 1.3;
  letter-spacing: .01em;
  background:
    radial-gradient(circle at 25% 15%, rgba(159,194,224,.55), transparent 55%),
    radial-gradient(circle at 80% 85%, rgba(62,124,177,.5), transparent 60%),
    radial-gradient(circle at 50% 50%, rgba(36,80,122,.9), rgba(27,58,87,.95) 70%);
}
.book-body h3{ margin-bottom: 10px; font-size: 1.1rem; }
.book-body p{ font-size: 15.5px; }

.note-band{
  margin-top: 56px;
  padding: 32px;
  border-radius: var(--r-md);
  box-shadow: var(--shadow-sm);
  background: var(--paper-2);
}
.note-band h3{ margin-bottom: 10px; }

/* ---------- Contacts page ---------- */
.contacts-wrap{ max-width: 640px; }
.contacts-list{
  display: grid;
  gap: 14px;
  margin-bottom: 36px;
}
.contact-card{
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 22px 26px;
  background: var(--paper-2);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-sm);
  text-decoration: none;
  color: var(--ink);
  transition: box-shadow 200ms ease, transform 200ms ease;
}
a.contact-card:hover{
  box-shadow: var(--shadow-md-hover);
  transform: translateY(-2px);
}
.contact-card-static{ cursor: default; }
.contact-card-icon{
  flex: none;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--paper);
  display: flex;
  align-items: center;
  justify-content: center;
}
.contact-card-label{
  display: block;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--ink-50);
  margin-bottom: 4px;
}
.contact-card-value{
  display: block;
  font-size: 17px;
  font-weight: 700;
  color: var(--ink);
}

/* ---------- Legal page ---------- */
.legal-body{
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
}
.legal-header{
  background: var(--paper);
}
.legal-wrap{
  max-width: 860px;
  margin: 0 auto;
  padding: 48px var(--pad) 96px;
}
.legal-wrap h1{ font-size: 1.9rem; margin-bottom: 8px; }
.legal-wrap .updated{ font-size: 14px; color: var(--ink-50); margin-bottom: 32px; }
.legal-toc{
  background: var(--paper-2);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-sm);
  padding: 24px 28px;
  margin-bottom: 48px;
}
.legal-toc h2{ font-size: .95rem; margin-bottom: 12px; letter-spacing: .04em; }
.legal-toc ol{ margin: 0; padding-left: 20px; columns: 1; }
@media (min-width: 641px){ .legal-toc ol{ columns: 2; gap: 24px; } }
.legal-toc li{ margin-bottom: 8px; font-size: 14.5px; }
.legal-toc a{ text-decoration: none; color: var(--accent-dark); }
.legal-toc a:hover{ text-decoration: underline; }

.legal-section{
  padding: 32px 0;
  border-top: 1px solid var(--line);
}
.legal-section:first-of-type{ border-top: none; }
.legal-section h2{
  font-size: 1.2rem;
  margin-bottom: 16px;
  scroll-margin-top: 20px;
}
.legal-section p{ font-size: 15.5px; margin-bottom: 12px; color: var(--ink-70); }
.legal-section ul, .legal-section ol{ margin: 0 0 12px; padding-left: 22px; color: var(--ink-70); font-size: 15.5px; }
.legal-section li{ margin-bottom: 6px; }
.legal-section .doc-placeholder{ color: var(--ink-50); font-style: italic; }

.legal-section .doc-list{
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}
.doc-item{
  background: var(--paper-2);
  border-radius: var(--r-sm);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.doc-trigger{
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 20px;
  background: none;
  border: none;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 15px;
  text-align: left;
  color: var(--ink);
  cursor: pointer;
}
.doc-trigger:focus-visible{ outline: 3px solid var(--accent); outline-offset: -3px; }
.doc-chevron{ color: var(--accent); transition: transform 200ms ease; }
.is-expanded .doc-chevron{ transform: rotate(180deg); }
.doc-item .accordion-panel-inner{ padding: 0 20px 18px; }
.doc-item .accordion-panel-inner p{ font-size: 15px; color: var(--ink-70); margin: 0; }

.skip-link{
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ink);
  color: var(--paper);
  padding: 12px 20px;
  border-radius: var(--r-xs);
  z-index: 1000;
}
.skip-link:focus{ left: 16px; top: 16px; }

:focus-visible{ outline: 3px solid var(--accent); outline-offset: 2px; }

/* ---------- Hero-only entrance (one-time, not per-scroll) ---------- */
.hero-enter{
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 700ms ease-out, transform 700ms ease-out;
}
.hero-enter.is-visible{
  opacity: 1;
  transform: translateY(0);
}
@media (prefers-reduced-motion: reduce){
  .hero-enter{ opacity: 1; transform: none; transition: none; }
}


/* ---------- Photos ---------- */
.photo-tile{
  margin: 0;
  position: relative;
  border-radius: var(--r-md);
  overflow: hidden;
  background: var(--block-2);
  box-shadow: var(--shadow-sm);
}
.photo-tile img{
  display: block;
  width: 100%;
  height: 100%;
  aspect-ratio: var(--ar, 4 / 3);
  object-fit: cover;
}
.photo-tile figcaption,
.photo-banner figcaption{
  position: absolute;
  left: 14px;
  bottom: 14px;
  width: fit-content;
  max-width: calc(100% - 28px);
  padding: 8px 14px;
  border-radius: var(--r-pill);
  font-size: 12px;
  line-height: 1.3;
  color: var(--on-block);
  background: rgba(27,58,87,.6);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
.photo-pair{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 32px;
}
.photo-gallery{
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
@media (min-width: 1024px){
  .photo-gallery--3{ grid-template-columns: repeat(3, 1fr); }
  .photo-gallery--4{ grid-template-columns: repeat(4, 1fr); }
}
.photo-banner{
  position: relative;
  margin: 0 0 48px;
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  background: var(--block-2);
}
.photo-banner img{
  display: block;
  width: 100%;
  aspect-ratio: 21 / 9;
  object-fit: cover;
  object-position: 50% 35%;
}
@media (max-width: 640px){
  .photo-banner img{ aspect-ratio: 4 / 3; }
}
.section-lede{ max-width: 62ch; margin-top: 16px; }
.gallery-head{ margin-bottom: 32px; }

/* ---------- Book covers with illustrations ---------- */
.book-cover{ flex-direction: column; gap: 14px; }
.book-cover svg{ width: 64px; height: 64px; flex: none; opacity: .9; }
.book-cover span{ display: block; }
.bc-1{ background: radial-gradient(circle at 20% 15%, rgba(159,194,224,.6), transparent 55%), linear-gradient(160deg, #2f6390, #1B3A57); }
.bc-2{ background: radial-gradient(circle at 80% 20%, rgba(159,194,224,.5), transparent 55%), linear-gradient(160deg, #3a5f80, #1f3d5a); }
.bc-3{ color: #3a2f1f; background: radial-gradient(circle at 25% 15%, rgba(255,255,255,.55), transparent 55%), linear-gradient(160deg, #e3d3b0, #b99f6d); }
.bc-4{ background: radial-gradient(circle at 70% 85%, rgba(62,124,177,.6), transparent 60%), linear-gradient(160deg, #24507A, #14293e); }


/* ---------- Form errors ---------- */
.field-error{
  font-size: 13px;
  line-height: 1.35;
  color: #ffb3b3;
}
.field-error:empty{ display: none; }
.field.is-invalid input,
.field.is-invalid select,
.field.is-invalid textarea{ border-color: #ff9a9a; }
.consent-row{ flex-wrap: wrap; }
.consent-row .field-error{ flex-basis: 100%; }
.form-error{
  border: 1px solid #ff9a9a;
  border-radius: var(--r-sm);
  padding: 14px 16px;
  font-size: 14px;
  color: #ffd0d0;
}
.form-error:empty{ display: none; }
.field select{
  appearance: none;
  -webkit-appearance: none;
  padding-right: 44px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23F1F3F6' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
}
.field select option,
.field select optgroup{ color: #1C2733; background: #fff; }

/* ---------- Popup ---------- */
.popup{
  border: 0;
  padding: 0;
  margin: auto;
  width: min(560px, calc(100% - 24px));
  max-height: calc(100vh - 24px);
  max-height: calc(100dvh - 24px);
  overflow: auto;
  border-radius: var(--r-lg);
  background: var(--block);
  color: var(--on-block);
  box-shadow: 0 40px 100px rgba(10,25,45,.45);
}
.popup::backdrop{
  background: rgba(14,28,46,.62);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}
.popup[open]{ animation: popup-in 220ms ease-out; }
@keyframes popup-in{
  from{ opacity: 0; transform: translateY(14px) scale(.98); }
  to{ opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce){
  .popup[open]{ animation: none; }
}
.popup-body{ padding: 40px 24px 28px; }
@media (min-width: 641px){
  .popup-body{ padding: 48px 40px 36px; }
}
.popup h2{
  font-size: clamp(1.5rem, 1.1rem + 1.6vw, 2rem);
  margin-bottom: 10px;
  padding-right: 44px;
}
.popup-lede{ margin-bottom: 24px; font-size: 16px; }
.popup .booking-form{ gap: 16px; }
.popup-close{
  position: absolute;
  top: 14px;
  right: 14px;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  display: grid;
  place-items: center;
  cursor: pointer;
  color: var(--on-block);
  background: rgba(241,243,246,.12);
  transition: background 150ms ease;
}
.popup-close:hover{ background: rgba(241,243,246,.24); }
.popup-close:focus-visible{ outline: 3px solid var(--accent); outline-offset: 2px; }
html.popup-open{ overflow: hidden; }
.program-cta{ margin-top: 18px; padding: 12px 22px; font-size: 13px; }
.popup{ scrollbar-width: thin; scrollbar-color: rgba(241,243,246,.35) transparent; }
.popup::-webkit-scrollbar{ width: 8px; }
.popup::-webkit-scrollbar-thumb{ background: rgba(241,243,246,.3); border-radius: 8px; }
.popup::-webkit-scrollbar-track{ background: transparent; }

/* rounded dark cards keep a small gutter from the screen edge on narrow screens */
#zapis .container,
#obuchenie .container{ width: calc(100% - 24px); }
@media (min-width: 1300px){
  #zapis .container,
  #obuchenie .container{ width: 100%; }
}


/* ---------- Library: real covers ---------- */
.book-feature{
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
  align-items: center;
  background: var(--paper-2);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-md);
  padding: 32px 28px;
}
@media (min-width: 720px){
  .book-feature{ grid-template-columns: 200px 1fr; gap: 44px; padding: 40px 44px; }
}
.feature-cover{ margin: 0; justify-self: center; }
.feature-cover img{
  display: block;
  width: 180px;
  max-width: 100%;
  height: auto;
  filter: drop-shadow(0 14px 22px rgba(27,58,87,.28));
}
.feature-cover--art{
  width: 180px;
  height: 240px;
  border-radius: var(--r-md);
  display: grid;
  place-items: center;
  color: rgba(241,243,246,.92);
  background: radial-gradient(circle at 70% 85%, rgba(62,124,177,.6), transparent 60%), linear-gradient(160deg, #24507A, #14293e);
  box-shadow: var(--shadow-sm);
}
.feature-cover--art svg{ width: 84px; height: 84px; }
.book-author{
  font-size: 14px;
  font-weight: 700;
  color: var(--accent-dark);
  margin-bottom: 8px;
}
.book-feature-body h3{ margin-bottom: 12px; font-size: 1.35rem; }
.book-feature-body p{ font-size: 16.5px; }
.lib-more-title{ margin: 48px 0 20px; font-size: 1.05rem; color: var(--ink-70); }
.book-strip{
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
@media (min-width: 720px){ .book-strip{ grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1100px){ .book-strip{ grid-template-columns: repeat(6, 1fr); } }
.book-mini{
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: var(--paper-2);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-sm);
  padding: 18px 14px 16px;
  text-align: center;
  transition: transform 250ms ease, box-shadow 250ms ease;
}
.book-mini:hover{ transform: translateY(-4px); box-shadow: var(--shadow-md-hover); }
.mini-cover{ margin: 0 0 8px; height: 150px; display: grid; place-items: center; }
.mini-cover img{
  max-height: 150px;
  width: auto;
  max-width: 100%;
  filter: drop-shadow(0 8px 12px rgba(27,58,87,.25));
}
.book-mini-title{ font-size: 13.5px; font-weight: 700; line-height: 1.3; color: var(--ink); }
.book-mini-author{ font-size: 12.5px; color: var(--ink-70); }
.mantra-acc{ margin-top: 18px; }
.doc-list{ list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }

/* ---------- Motion ---------- */
[data-reveal]{
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 700ms ease var(--d, 0ms), transform 700ms cubic-bezier(.2,.7,.2,1) var(--d, 0ms);
}
[data-reveal].is-in{ opacity: 1; transform: none; }

.btn{ transition: background 150ms ease, color 150ms ease, border-color 150ms ease, transform 200ms ease; }
.btn:hover{ transform: translateY(-2px); }
.btn:active{ transform: none; }

.testi-card,
.program-card,
.fact,
.contact-card,
.edu-group{
  transition: transform 250ms ease, box-shadow 250ms ease;
}
.testi-card:hover,
.program-card:hover,
.contact-card:hover,
.edu-group:hover{ transform: translateY(-4px); box-shadow: var(--shadow-md-hover); }
.fact:hover{ transform: translateY(-3px); }

.photo-tile img,
.photo-banner img,
.teach-photo img,
.photo-card img{ transition: transform 900ms cubic-bezier(.2,.7,.2,1); }
.photo-tile:hover img,
.photo-banner:hover img,
.teach-photo:hover img,
.photo-card:hover img{ transform: scale(1.05); }

.hero-photo-frame img{ animation: hero-settle 1600ms cubic-bezier(.2,.7,.2,1) both; }
@keyframes hero-settle{
  from{ transform: scale(1.09); opacity: .0; }
  to{ transform: scale(1); opacity: 1; }
}
.step-num{ transition: transform 300ms ease; }
.method-step:hover .step-num{ transform: scale(1.12) rotate(-4deg); }
.fact .icon{ transition: transform 300ms ease; }
.fact:hover .icon{ transform: scale(1.18); }

@media (prefers-reduced-motion: reduce){
  [data-reveal]{ opacity: 1 !important; transform: none !important; transition: none !important; }
  .hero-photo-frame img{ animation: none; }
  .btn, .testi-card, .program-card, .fact, .contact-card, .edu-group, .book-mini,
  .photo-tile img, .photo-banner img, .teach-photo img, .photo-card img{ transition: none; }
  .btn:hover, .testi-card:hover, .program-card:hover, .fact:hover, .book-mini:hover,
  .photo-tile:hover img, .photo-banner:hover img, .teach-photo:hover img, .photo-card:hover img{ transform: none; }
}
.doc-item .accordion-panel-inner p + p{ margin-top: 12px; }


/* ---------- Document downloads ---------- */
.doc-download{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 14.5px;
  color: var(--accent-dark);
  text-decoration: underline;
  text-decoration-color: rgba(44,90,130,.35);
  text-underline-offset: 3px;
  transition: text-decoration-color 150ms ease, color 150ms ease;
}
.doc-download:hover{ color: var(--ink); text-decoration-color: currentColor; }
.doc-download .icon{ flex: none; }
.doc-meta{ font-weight: 500; color: var(--ink-70); font-size: 13px; }
.doc-download-row{ margin-top: 10px; display: flex; flex-wrap: wrap; gap: 8px 22px; }
.doc-item .accordion-panel-inner .doc-download-row{ margin-top: 12px; }
.consent-row a{ color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.consent-row a:hover{ color: var(--on-block); }


/* ---------- Programs hero, schedule ---------- */
.hero-statement{
  font-size: clamp(1.25rem, 1rem + 1.2vw, 1.75rem);
  line-height: 1.3;
  font-weight: 800;
  color: var(--ink);
  max-width: 34ch;
  margin-top: 20px;
}
.hero-sub{
  font-size: 15.5px;
  color: var(--ink-70);
  max-width: 52ch;
  margin: 12px 0 28px;
}
.schedule-list{ display: grid; gap: 14px; }
.schedule-item{
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  align-items: center;
  background: var(--paper-2);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-sm);
  padding: 22px 24px;
  transition: transform 250ms ease, box-shadow 250ms ease;
}
.schedule-item:hover{ transform: translateY(-3px); box-shadow: var(--shadow-md-hover); }
@media (min-width: 900px){
  .schedule-item{ grid-template-columns: 1.6fr 1fr auto; gap: 32px; padding: 24px 32px; }
}
.schedule-item h3{ font-size: 1.05rem; margin-bottom: 6px; }
.schedule-meta{ font-size: 14px; color: var(--ink-70); margin: 0; }
.schedule-dates{ list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.schedule-dates li{
  font-size: 13.5px;
  font-weight: 700;
  color: var(--accent-dark);
  background: rgba(62,124,177,.12);
  border-radius: var(--r-xs);
  padding: 7px 12px;
}
.schedule-item .program-cta{ margin-top: 0; justify-self: start; }

/* ---------- Popup: chosen service line, no horizontal overflow ---------- */
.popup [hidden]{ display: none !important; }
.popup-chosen{
  margin: -8px 0 20px;
  padding: 10px 14px;
  border-radius: var(--r-sm);
  background: rgba(241,243,246,.1);
  font-size: 14px;
  color: var(--on-block);
}
.popup{ overflow-x: hidden; }
.booking-form{ grid-template-columns: minmax(0, 1fr); }
.field, .field > *{ min-width: 0; }
.field select, .field input, .field textarea{ max-width: 100%; min-width: 0; }
.field select{ text-overflow: ellipsis; }

/* ---------- Phones: text uses the full width of the grid ---------- */
@media (max-width: 1023px){
  .hero-copy{ padding-right: 0; }
  .hero-copy .lede,
  .page-hero .lede,
  .section-lede,
  .teach-lede,
  .hero-statement,
  .hero-sub,
  .bio-block,
  .about-wrap,
  .cta-band p{ max-width: none; }
}

/* ---------- Top bar (hides on scroll down, returns on scroll up) ---------- */
.topbar{
  background: #E4E8ED;
  color: var(--ink-70);
  font-size: 13px;
}
.site-header .topbar .container{
  padding-top: 10px;
  padding-bottom: 10px;
  gap: 24px;
}
.topbar-item{ display: inline-flex; align-items: center; gap: 8px; }
.topbar-links{ display: flex; align-items: center; gap: 28px; }
.topbar-links a{ color: var(--ink-70); text-decoration: none; white-space: nowrap; transition: color 150ms ease; }
.topbar-links a:hover{ color: var(--accent-dark); text-decoration: underline; text-underline-offset: 3px; }
.site-header{ transition: transform 300ms ease; }
.site-header.topbar-hidden{ transform: translateY(calc(-1 * var(--topbar-h, 40px))); }
.nav-more{ display: none; }
@media (max-width: 1279px){
  .topbar{ display: none; }
  .site-header.topbar-hidden{ transform: none; }
  .nav-links{
    width: min(360px, 100vw);
    justify-content: flex-start;
    gap: 0;
    padding: 84px 28px 32px;
    overflow-y: auto;
  }
  .nav-links > a:not(.btn):not(.nav-phone){
    width: 100%;
    padding: 15px 0;
    font-size: 19px;
    font-weight: 800;
    border-bottom: 1px solid var(--line);
  }
  .nav-more{
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    width: 100%;
    margin: 28px 0 8px;
  }
  .nav-more-title{
    width: 100%;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--ink-50);
  }
  .nav-links .nav-more a{
    display: inline-block;
    padding: 10px 16px;
    border: none;
    border-radius: var(--r-pill);
    background: var(--paper-2);
    box-shadow: var(--shadow-sm);
    font-size: 14px;
    font-weight: 600;
    text-transform: none;
    white-space: normal;
    line-height: 1.3;
    color: var(--ink);
  }
  .nav-links .nav-phone{ margin-top: 24px; }
  .nav-links a.btn{ margin-top: 16px; }
}
@media (min-width: 1280px) and (max-width: 1400px){
  .topbar-links{ gap: 18px; }
}

/* ---------- Footer legal links, document pages ---------- */
.footer-legal{
  display: flex;
  flex-wrap: wrap;
  gap: 10px 24px;
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  font-size: 14px;
}
.footer-legal a{ color: var(--ink-70); text-decoration: none; }
.footer-legal a:hover{ color: var(--accent-dark); text-decoration: underline; text-underline-offset: 3px; }
.legal-doc{ max-width: 860px; }
.legal-doc h1{ font-size: clamp(1.6rem, 1rem + 2vw, 2.4rem); margin-bottom: 12px; }
.legal-doc .updated{ font-size: 14px; color: var(--ink-50); margin-bottom: 32px; }
.legal-doc h2{ font-size: 1.1rem; margin: 36px 0 12px; letter-spacing: .02em; }
.legal-doc p{ font-size: 16px; line-height: 1.65; margin-bottom: .9em; }
.legal-back{ margin-top: 40px; }
.photo-more{ margin-top: 28px; }

/* ---------- Photo lightbox ---------- */
img.zoomable{ cursor: zoom-in; }
.lightbox{
  border: none;
  padding: 0;
  margin: 0;
  width: 100vw;
  height: 100vh;
  max-width: none;
  max-height: none;
  background: rgba(16,30,45,.92);
  color: #fff;
  overflow: hidden;
}
.lightbox[open]{ display: flex; align-items: center; justify-content: center; }
.lightbox::backdrop{ background: transparent; }
.lb-img{
  max-width: min(92vw, 1200px);
  max-height: 82vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: var(--r-md);
  box-shadow: 0 30px 80px rgba(0,0,0,.4);
}
.lb-cap{
  position: absolute;
  left: 0; right: 0; bottom: 18px;
  margin: 0;
  padding: 0 64px;
  text-align: center;
  font-size: 14px;
  color: rgba(255,255,255,.8);
}
.lb-close, .lb-nav{
  position: absolute;
  width: 48px; height: 48px;
  border: none;
  border-radius: 50%;
  background: rgba(255,255,255,.14);
  color: #fff;
  font-size: 30px;
  line-height: 1;
  cursor: pointer;
  transition: background 150ms ease;
}
.lb-close:hover, .lb-nav:hover{ background: rgba(255,255,255,.26); }
.lb-close{ top: 16px; right: 16px; }
.lb-nav{ top: 50%; transform: translateY(-50%); padding-bottom: 4px; }
.lb-prev{ left: 16px; }
.lb-next{ right: 16px; }
.lightbox.lb-single .lb-nav{ display: none; }
@media (max-width: 640px){
  /* Keep the arrows centred beside the photo (not stacked under it,
     where they used to collide with the caption text). */
  .lb-img{ max-height: 68vh; }
  .lb-close, .lb-nav{ width: 40px; height: 40px; font-size: 24px; }
  .lb-close{ top: 10px; right: 10px; }
  .lb-prev{ left: 6px; }
  .lb-next{ right: 6px; }
  .lb-cap{ padding: 0 52px; bottom: 12px; font-size: 13px; }
}

/* ---------- Glass captions on photos ---------- */
.hero-photo-caption,
.photo-tile figcaption,
.photo-banner figcaption{
  background: linear-gradient(135deg, rgba(255,255,255,.28), rgba(255,255,255,.10));
  border: 1px solid rgba(255,255,255,.45);
  box-shadow: 0 8px 24px rgba(10,25,45,.22), inset 0 1px 0 rgba(255,255,255,.4);
  -webkit-backdrop-filter: blur(14px) saturate(1.5);
  backdrop-filter: blur(14px) saturate(1.5);
  color: #fff;
  font-weight: 600;
  text-shadow: 0 1px 6px rgba(10,25,45,.45);
}
.hero-photo-caption{ padding: 11px 20px; font-size: 13px; }

/* ---------- Teach block: 3-photo gallery instead of single photo ---------- */
.teach-gallery{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.teach-gallery-main{ grid-column: 1 / -1; }
.teach-gallery .photo-tile{ margin: 0; }
@media (min-width: 1024px){
  .teach-gallery{ align-content: start; }
}

/* ---------- Hero: secondary "training" callout on dark hero ---------- */
.hero-copy .hero-statement-onblock{
  color: var(--on-block);
  margin-top: 32px;
  font-size: clamp(1.6rem, 0.9rem + 2vw, 2.4rem);
  line-height: 1.15;
  max-width: none;
}
.hero-copy .hero-statement-onblock em{
  display: inline;
  font-family: var(--font-accent);
  font-style: italic;
  font-weight: 600;
  color: #9FC2E0;
}
.hero-sub-onblock{ color: var(--on-block-70); }

/* ---------- Center logo (footer, obo-mne, kontakty) ---------- */
.footer-logo{
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
}
.footer-logo img{
  width: 100%;
  max-width: 220px;
  height: auto;
}
@media (min-width: 800px){
  .footer-logo{ justify-content: flex-end; }
}
.center-brand{
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}
.center-brand img{
  width: 160px;
  height: auto;
  flex: none;
}
.center-brand p{
  margin: 0;
  color: var(--ink-70);
  font-size: 15px;
  max-width: 46ch;
}

@media (max-width: 480px){
  .center-brand{ flex-direction: column; align-items: flex-start; gap: 14px; }
  .center-brand img{ width: 140px; }
  .footer-logo{ justify-content: flex-start; }
  .footer-logo img{ max-width: 180px; }
}

/* ---------- Header brand: center logo + wordmark ---------- */
.site-header .container{ position: relative; }
.brand-group{
  display: flex;
  align-items: center;
  gap: 14px;
}
.header-logo{
  display: flex;
  align-items: center;
  flex: none;
}
.header-logo img{
  height: 40px;
  width: auto;
}
@media (min-width: 1024px){
  .header-logo img{ height: 46px; }
}
/* On phones the header logo crowds the two-line wordmark next to the
   burger — it already reappears at the top of the slide-out menu, so
   drop it from the compact top bar itself. */
@media (max-width: 1279px){
  .header-logo{ display: none; }
}
@media (min-width: 1280px){
  /* Divider now sits between the logo and the name, not between the
     name and the nav links. */
  .wordmark{
    padding-left: 18px;
    border-left: 1px solid var(--line);
  }
}
/* The header CTA is redundant once the mobile slide-out already ends in
   its own full-width "Записаться" button — keep it only there, not in
   the horizontal desktop bar. */
@media (min-width: 1280px){
  .nav-cta{ display: none; }
}
.nav-mobile-logo{ display: none; }
@media (max-width: 1279px){
  .nav-mobile-logo{
    display: flex;
    margin-bottom: 8px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--line);
  }
  .nav-mobile-logo img{ height: 36px; width: auto; }
}

/* ---------- Header: hide "Отзывы"/"Контакты" on desktop, emphasize phone ---------- */
@media (min-width: 1280px){
  .nav-desktop-hide{ display: none; }
  /* nav-links used to shrink-to-fit and hug the right edge, packing the
     links tight against the phone. Let it fill the row instead, so the
     links stay near the wordmark and margin-left:auto has real slack to
     push the phone out to the far right. */
  .nav-links{ flex: 1 1 auto; }
  .nav-phone{ margin-left: auto; }
}
.nav-phone{
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.nav-phone-icon{
  width: 22px;
  height: 22px;
  stroke: var(--accent);
  flex: none;
}
.nav-phone-text{
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.nav-phone-num{
  font-weight: 800;
  color: var(--ink);
  white-space: nowrap;
  transition: color 150ms ease;
}
.nav-phone:hover .nav-phone-num{ color: var(--accent-dark); }
.nav-phone-caption{
  font-size: 11px;
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0;
  color: var(--ink-50);
  white-space: nowrap;
}
@media (min-width: 1280px){
  .nav-phone-num{ font-size: 17px; }
  .nav-phone-icon{ width: 30px; height: 30px; }
}
@media (max-width: 1279px){
  .nav-links .nav-phone{ gap: 12px; }
  .nav-links .nav-phone-icon{ width: 30px; height: 30px; }
  .nav-links .nav-phone-num{ font-size: 20px; }
  .nav-links .nav-phone-caption{ font-size: 13px; }
}

/* ---------- "Главная" — только в мобильном выпадающем меню; на десктопе
   на главную уже ведут логотип и имя в шапке, дублировать не нужно. ---------- */
.nav-home-mobile{ display: none; }
@media (max-width: 1279px){
  .nav-home-mobile{ display: block; }
}
