/* =========================================================================
   Наука Впечатлений — сайт 2.0
   Взрослая редакционная подача: светлая основа, тёмно-синие эмоциональные
   секции, один акцентный цвет (электрический синий/циан).
   ========================================================================= */

@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&display=swap');

:root {
  --bg: #FAF7F1;
  --bg-alt: #F1EBE1;
  --paper: #FFFFFF;
  --ink: #16203A;
  --ink-soft: #4B5471;
  --ink-faint: #7C849C;
  --line: #E4DDD0;
  --line-soft: #ECE6DA;

  --navy: #0F1830;
  --navy-2: #172347;
  --navy-line: rgba(255, 255, 255, 0.12);
  --navy-ink: #F4F6FB;
  --navy-ink-soft: #B7C0DE;

  --accent: #2A5CF0;
  --accent-ink: #0E2FA8;
  --accent-glow: #6FE0FF;

  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 10px;
  --radius-pill: 999px;

  --shadow-sm: 0 2px 10px rgba(22, 32, 58, 0.06);
  --shadow-md: 0 12px 32px rgba(22, 32, 58, 0.10);
  --shadow-lg: 0 24px 60px rgba(15, 24, 48, 0.18);

  --container: 1280px;
  --font: 'Manrope', 'Segoe UI', system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
h1, h2, h3, h4, p, ul { margin: 0; }
ul { padding: 0; list-style: none; }
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 32px;
}
section { position: relative; }

/* ---------- Типографика ---------- */
.eyebrow {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent-ink);
}
.navy-section .eyebrow { color: var(--accent-glow); }
h1, .h1 {
  font-size: clamp(36px, 5vw, 68px);
  font-weight: 800;
  line-height: 1.06;
  letter-spacing: -0.01em;
}
h2, .h2 {
  font-size: clamp(28px, 3.4vw, 46px);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.01em;
}
h3, .h3 {
  font-size: clamp(20px, 2vw, 26px);
  font-weight: 700;
  line-height: 1.25;
}
.lede {
  font-size: clamp(17px, 1.6vw, 20px);
  color: var(--ink-soft);
  max-width: 62ch;
  line-height: 1.55;
}
.navy-section .lede { color: var(--navy-ink-soft); }
p.body { font-size: 16px; color: var(--ink-soft); line-height: 1.65; max-width: 68ch; }

/* ---------- Кнопки ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 15px 28px;
  border-radius: var(--radius-pill);
  font-weight: 700;
  font-size: 16px;
  border: 1.5px solid transparent;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease, border-color .15s ease;
  white-space: nowrap;
}
.btn-primary { background: var(--accent); color: #fff; box-shadow: 0 10px 24px rgba(42, 92, 240, 0.28); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 14px 30px rgba(42, 92, 240, 0.36); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent-ink); }
.navy-section .btn-ghost { color: var(--navy-ink); border-color: var(--navy-line); }
.navy-section .btn-ghost:hover { border-color: var(--accent-glow); color: var(--accent-glow); }
.btn-light { background: #fff; color: var(--ink); }
.btn-light:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  color: var(--accent-ink);
  border-bottom: 1.5px solid transparent;
  transition: border-color .15s ease, gap .15s ease;
}
.link-arrow:hover { border-color: currentColor; gap: 12px; }
.navy-section .link-arrow { color: var(--accent-glow); }
.link-text {
  font-weight: 600;
  color: var(--ink-soft);
  border-bottom: 1px dashed var(--ink-faint);
}
.link-text:hover { color: var(--ink); }

/* =========================================================================
   Header
   ========================================================================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(250, 247, 241, 0.86);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line-soft);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 82px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  white-space: nowrap;
}
.logo-img { height: 48px; width: auto; display: block; }
.logo-text { font-weight: 800; font-size: 18px; letter-spacing: -0.01em; color: var(--ink); }
.footer-brand .logo-img { height: 52px; }
.footer-brand .logo-text { color: #fff; }
.main-nav { display: flex; align-items: center; gap: 28px; }
.main-nav a { font-weight: 600; font-size: 15px; color: var(--ink-soft); transition: color .15s ease; }
.main-nav a:hover { color: var(--ink); }
.header-actions { display: flex; align-items: center; gap: 18px; }
.header-phone { font-weight: 700; font-size: 15px; }
.nav-toggle {
  display: none;
  width: 44px; height: 44px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: #fff;
  align-items: center; justify-content: center;
  flex: none;
}
.nav-toggle span, .nav-toggle::before, .nav-toggle::after { content: ""; display: block; width: 18px; height: 2px; background: var(--ink); border-radius: 2px; position: relative; transition: transform .2s ease, opacity .2s ease; }
.nav-toggle::before { transform: translateY(-6px); }
.nav-toggle::after { transform: translateY(4px); }
.nav-toggle span { display: none; }
.nav-toggle.is-open::before { transform: translateY(0) rotate(45deg); }
.nav-toggle.is-open::after { transform: translateY(-2px) rotate(-45deg); }

.mobile-nav {
  display: none;
  flex-direction: column;
  gap: 2px;
  background: var(--paper);
  border-bottom: 1px solid var(--line-soft);
  padding: 8px 0 18px;
}
.mobile-nav a {
  padding: 14px 32px;
  font-weight: 600;
  font-size: 16px;
  border-radius: var(--radius-sm);
}
.mobile-nav a:active { background: var(--bg-alt); }
.mobile-nav .btn { margin: 10px 32px 0; justify-content: center; }
.mobile-nav.is-open { display: flex; }

/* =========================================================================
   Hero
   ========================================================================= */
.hero { position: relative; background: var(--navy); color: var(--navy-ink); overflow: hidden; }
.hero-media { position: absolute; inset: 0; z-index: 0; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; object-position: center 38%; }
.hero-scrim {
  position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(260deg, rgba(15,24,48,.97) 0%, rgba(15,24,48,.92) 24%, rgba(15,24,48,.6) 48%, rgba(15,24,48,.08) 74%, rgba(15,24,48,0) 88%);
}
.hero .container {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-height: 800px;
  padding-top: 56px;
  padding-bottom: 56px;
}
.hero-copy { max-width: 560px; }
.hero-copy h1 { color: #fff; margin-top: 18px; }
.hero-copy .lede { margin-top: 20px; margin-bottom: 32px; color: var(--navy-ink-soft); }
.hero-actions { display: flex; align-items: center; gap: 26px; flex-wrap: wrap; }

/* =========================================================================
   Trust strip (Блок 2)
   ========================================================================= */
.trust-bar { background: var(--bg-alt); border-bottom: 1px solid var(--line); }
.trust-bar .container { padding-top: 30px; padding-bottom: 30px; }
.trust-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px;
}
.trust-item { display: flex; gap: 14px; align-items: flex-start; min-width: 0; }
.trust-item .ico {
  flex: none; width: 40px; height: 40px; border-radius: 11px;
  background: #fff; border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center;
}
.trust-item .ico svg { width: 20px; height: 20px; stroke: var(--accent-ink); }
.trust-item p { font-weight: 700; font-size: 15.5px; line-height: 1.4; }
.trust-numbers {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
  margin-top: 30px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}
.trust-number { text-align: center; }
.trust-number .num { display: block; font-size: 26px; font-weight: 800; color: var(--accent-ink); }
.trust-number .label { display: block; margin-top: 4px; font-size: 13.5px; color: var(--ink-soft); }
.trust-more { text-align: center; margin-top: 22px; }

/* =========================================================================
   About (Блок 3)
   ========================================================================= */
.about { padding: 88px 0; }
.about-top { display: grid; grid-template-columns: 5fr 7fr; gap: 64px; align-items: center; }
.about-founder-photo { border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-lg); aspect-ratio: 4/5; }
.about-founder-photo img { width: 100%; height: 100%; object-fit: cover; object-position: center 20%; }
.about-copy h2 { margin-top: 14px; }
.about-copy .lede { margin: 22px 0 14px; }
.about-copy p.body + p.body { margin-top: 14px; }
.about-copy .btn { margin-top: 30px; }
.about-video { margin-top: 80px; text-align: center; scroll-margin-top: 96px; }
.about-video-intro { max-width: 640px; margin: 0 auto 36px; }
.about-video-lead { font-size: 22px; font-weight: 800; color: var(--ink); }
.about-video-intro .body { margin-top: 14px; color: var(--ink-soft); }
.video-frame-lg { max-width: 980px; margin: 0 auto; }

/* =========================================================================
   Видео (внутри «О компании», плюс переиспользуется на страницах программ)
   ========================================================================= */
.video-frame {
  position: relative;
  aspect-ratio: 16/9;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: #000;
  box-shadow: var(--shadow-lg);
}
.video-frame img { width: 100%; height: 100%; object-fit: cover; opacity: .78; }
.video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.play-btn {
  position: absolute; inset: 0; margin: auto;
  width: 84px; height: 84px; border-radius: 50%;
  background: rgba(255,255,255,0.14);
  border: 1.5px solid rgba(255,255,255,0.5);
  backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center;
  transition: transform .15s ease, background .15s ease;
}
.play-btn:hover { transform: scale(1.06); background: rgba(255,255,255,0.22); }
.play-btn svg { width: 26px; height: 26px; margin-left: 4px; fill: #fff; }
.video-frame .vid-caption {
  position: absolute; left: 20px; bottom: 16px;
  font-size: 13px; font-weight: 700; letter-spacing: 0.03em;
  color: rgba(255,255,255,0.85);
  background: rgba(0,0,0,0.35);
  padding: 6px 12px; border-radius: var(--radius-pill);
}

/* =========================================================================
   Catalog (Блок 5)
   ========================================================================= */
.catalog { padding: 108px 0 96px; }
.catalog-head { max-width: 720px; margin: 0 auto 52px; text-align: center; }
.catalog-head h2 { margin-top: 14px; }
.catalog-head .lede { margin: 18px auto 0; }
.catalog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px;
}
.prog-card {
  background: var(--paper);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform .18s ease, box-shadow .18s ease;
}
.prog-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.prog-card .thumb { aspect-ratio: 4/3; background: var(--bg-alt); position: relative; overflow: hidden; }
.prog-card .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.prog-card:hover .thumb img { transform: scale(1.05); }
.prog-card .thumb.no-photo {
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--navy), var(--navy-2));
}
.prog-card .thumb.no-photo span {
  font-family: var(--font);
  font-weight: 800;
  font-size: 15px;
  color: var(--accent-glow);
  text-align: center;
  padding: 0 20px;
  letter-spacing: 0.01em;
}
.prog-card .age-tag {
  position: absolute; top: 14px; left: 14px;
  background: rgba(15,24,48,0.72);
  color: #fff; font-size: 12.5px; font-weight: 700;
  padding: 6px 12px; border-radius: var(--radius-pill);
  backdrop-filter: blur(4px);
}
.prog-card .body-wrap { padding: 22px 22px 24px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.prog-card h3 { font-size: 19px; }
.prog-card .position { font-size: 14px; font-weight: 700; color: var(--accent-ink); }
.prog-card .desc { font-size: 14.5px; color: var(--ink-soft); line-height: 1.55; flex: 1; }
.prog-card .card-cta {
  margin-top: 6px; display: flex; align-items: center; justify-content: space-between;
  padding-top: 14px; border-top: 1px solid var(--line-soft);
  font-weight: 700; font-size: 14.5px; color: var(--accent-ink);
}
.prog-card .card-cta svg { width: 16px; height: 16px; transition: transform .15s ease; }
.prog-card:hover .card-cta svg { transform: translateX(3px); }
.prog-card.is-soon .card-cta { color: var(--ink-faint); }

.catalog-more { display: none; text-align: center; margin-top: 36px; }
.catalog-more .btn { padding-left: 34px; padding-right: 34px; }

/* =========================================================================
   How it works (Блок 6)
   ========================================================================= */
.how { background: var(--bg-alt); padding: 100px 0; }
.how .container { display: grid; grid-template-columns: 0.95fr 1.05fr; gap: 60px; align-items: center; }
.how-head h2 { margin-top: 14px; margin-bottom: 34px; }
.how-steps { display: flex; flex-direction: column; gap: 26px; }
.how-step { display: flex; gap: 18px; }
.how-step .num {
  flex: none; width: 40px; height: 40px; border-radius: 11px;
  background: var(--paper); border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; color: var(--accent-ink); font-size: 15px;
}
.how-step p { font-weight: 600; font-size: 15.5px; line-height: 1.55; color: var(--ink); }
.how-note { margin-top: 30px; font-size: 14.5px; color: var(--ink-faint); line-height: 1.6; padding-top: 22px; border-top: 1px solid var(--line); }
/* Фото альбомное (~16:9) — контейнер под него, не наоборот (см. отчёт). */
.how-media { border-radius: var(--radius-lg); overflow: hidden; aspect-ratio: 16/9; box-shadow: var(--shadow-md); }
.how-media img { width: 100%; height: 100%; object-fit: cover; }

/* =========================================================================
   Thanks (Блок 8)
   ========================================================================= */
/* «how» и «thanks» раньше делили один и тот же --bg-alt без границы и
   визуально сливались в одну секцию. thanks вернулась к базовому --bg
   (как catalog/contacts) + тонкая верхняя линия — спокойный, некрикливый
   переход без дополнительного декора. */
.thanks { background: var(--bg); padding: 108px 0; border-top: 1px solid var(--line); }
.thanks-head { max-width: 640px; margin: 0 auto 46px; text-align: center; }
.thanks-head h2 { margin-top: 14px; }
.thanks-head .lede { margin: 16px auto 0; }
.thanks-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.thanks-card {
  background: var(--paper);
  border-radius: var(--radius-lg);
  border: 1px solid var(--line-soft);
  padding: 26px;
  display: flex; flex-direction: column; gap: 16px;
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease;
}
.thanks-card:hover, .thanks-card:focus-visible { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.thanks-card:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.thanks-quote { font-size: 16px; font-weight: 600; line-height: 1.55; color: var(--ink); flex: 1; }
.thanks-card.featured .thanks-quote { font-size: 17px; }
.thanks-quote::before { content: "\201C"; color: var(--accent); font-weight: 800; }
.thanks-meta { display: flex; gap: 14px; align-items: center; padding-top: 14px; border-top: 1px solid var(--line-soft); }
.thanks-meta .thumb { width: 46px; height: 60px; border-radius: 6px; overflow: hidden; flex: none; border: 1px solid var(--line); }
.thanks-meta .thumb img { width: 100%; height: 100%; object-fit: cover; }
.thanks-meta .who { font-size: 13.5px; }
.thanks-meta .school { font-weight: 700; display: block; }
.thanks-meta .city { color: var(--ink-faint); }
.thanks-more { text-align: center; margin-top: 30px; }

/* Модальное окно писем */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(15, 20, 38, 0.78);
  display: none; align-items: center; justify-content: center;
  padding: 40px 20px; z-index: 1000;
  backdrop-filter: blur(3px);
}
.modal-overlay.is-open { display: flex; }
.modal-box {
  position: relative;
  max-width: 640px; max-height: 88vh;
  background: #fff; border-radius: var(--radius-md);
  overflow: auto;
  box-shadow: var(--shadow-lg);
}
.modal-box img { width: 100%; display: block; }
.modal-close {
  position: fixed;
  top: 26px; right: 26px;
  width: 48px; height: 48px; border-radius: 50%;
  background: rgba(255,255,255,0.14); border: 1.5px solid rgba(255,255,255,0.4);
  color: #fff; font-size: 22px; display: flex; align-items: center; justify-content: center;
  z-index: 1001;
}

/* =========================================================================
   Contacts (Блок 9)
   ========================================================================= */
.contacts { padding: 100px 0; }
.contacts .container { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }
.contacts h2 { margin-top: 14px; }
.contacts .lede { margin: 18px 0 0; }
.contact-list { display: flex; flex-direction: column; gap: 18px; }
.contact-row {
  display: flex; align-items: center; gap: 16px;
  padding: 20px 24px;
  background: var(--bg-alt);
  border-radius: var(--radius-md);
  font-weight: 700; font-size: 18px;
  transition: background .15s ease;
}
.contact-row:hover { background: #EDE4D3; }
.contact-row .ico {
  flex: none; width: 42px; height: 42px; border-radius: 11px;
  background: var(--paper); border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center;
}
.contact-row .ico svg { width: 20px; height: 20px; stroke: var(--accent-ink); }
.contact-row .ico img { width: 20px; height: 20px; }
.contact-row small { display: block; font-weight: 500; font-size: 12.5px; color: var(--ink-faint); margin-bottom: 2px; }

/* =========================================================================
   Footer
   ========================================================================= */
.site-footer { background: var(--navy); color: var(--navy-ink-soft); padding: 64px 0 32px; }
.footer-top { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 40px; padding-bottom: 40px; border-bottom: 1px solid var(--navy-line); }
.footer-brand .logo { color: #fff; }
.footer-brand p { margin-top: 16px; font-size: 14px; line-height: 1.6; max-width: 32ch; color: var(--navy-ink-soft); }
.footer-col h4 { font-size: 13px; text-transform: uppercase; letter-spacing: 0.05em; color: #fff; margin-bottom: 16px; font-weight: 700; }
.footer-col ul { display: flex; flex-direction: column; gap: 11px; }
.footer-col a, .footer-col span { font-size: 14.5px; color: var(--navy-ink-soft); }
.footer-col a:hover { color: #fff; }
.footer-bottom { display: flex; justify-content: flex-start; align-items: center; padding-top: 26px; font-size: 13px; color: #6C7699; flex-wrap: wrap; gap: 8px 18px; }
.footer-max { display: inline-flex !important; align-items: center; gap: 7px; }
.footer-max img { opacity: .85; }

.legal-accordion { display: none; }
.legal-accordion details { border-top: 1px solid var(--navy-line); padding: 14px 0; }
.legal-accordion summary { font-weight: 700; font-size: 14.5px; color: #fff; cursor: pointer; }
.legal-accordion p { font-size: 13.5px; color: var(--navy-ink-soft); margin-top: 10px; line-height: 1.6; }

/* =========================================================================
   Program page (единый шаблон)
   ========================================================================= */
.prog-hero {
  background: var(--navy); color: var(--navy-ink);
  padding-top: 40px;
}
.breadcrumb { font-size: 14px; color: var(--navy-ink-soft); display: flex; gap: 8px; align-items: center; margin-bottom: 30px; }
.breadcrumb a:hover { color: #fff; }
.prog-hero-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; padding-bottom: 64px; }
.prog-hero-copy .age-pill {
  display: inline-block; padding: 7px 16px; border-radius: var(--radius-pill);
  background: rgba(255,255,255,0.1); border: 1px solid var(--navy-line);
  font-size: 13.5px; font-weight: 700; color: var(--accent-glow); margin-bottom: 18px;
}
.prog-hero-copy h1 { color: #fff; }
.prog-hero-copy .position { font-size: 19px; font-weight: 600; color: var(--navy-ink-soft); margin-top: 16px; max-width: 46ch; }
.prog-hero-actions { display: flex; gap: 26px; align-items: center; margin-top: 34px; flex-wrap: wrap; }
.prog-hero-media { border-radius: var(--radius-lg); overflow: hidden; aspect-ratio: 4/5; box-shadow: var(--shadow-lg); }
.prog-hero-media img { width: 100%; height: 100%; object-fit: cover; }
.prog-hero-media.no-photo { display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, var(--navy-2), #0A1226); }
.prog-hero-media.no-photo span { color: var(--accent-glow); font-weight: 800; font-size: 20px; text-align: center; padding: 0 30px; }

.prog-section { padding: 88px 0; }
.prog-section.alt { background: var(--bg-alt); }
.prog-section-head { max-width: 680px; margin-bottom: 44px; }
.prog-section-head h2 { margin-top: 12px; }

.prog-about-grid { display: grid; grid-template-columns: 3fr 2fr; gap: 56px; align-items: start; }
.quick-facts { background: var(--bg-alt); border: 1px solid var(--line-soft); border-radius: var(--radius-lg); padding: 28px; }
.quick-facts h3 { font-size: 13px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--ink-faint); font-weight: 800; }
.quick-facts dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 16px; margin-top: 20px; }
.qf-item dt { font-size: 12.5px; color: var(--ink-soft); }
.qf-item dd { margin-top: 4px; font-size: 15px; font-weight: 700; color: var(--ink); line-height: 1.3; }

.moment-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 22px; }
.moment-card { background: var(--paper); border: 1px solid var(--line-soft); border-radius: var(--radius-md); padding: 26px; }
.moment-card .idx { font-weight: 800; font-size: 13px; color: var(--accent-ink); letter-spacing: 0.05em; }
.moment-card h3 { margin-top: 12px; font-size: 18px; }
.moment-card p { margin-top: 10px; font-size: 14.5px; color: var(--ink-soft); line-height: 1.55; }

.prog-media-block { padding: 88px 0; background: var(--navy); color: var(--navy-ink); }
.prog-media-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 40px; }
.prog-media-grid img { border-radius: var(--radius-md); aspect-ratio: 4/3; object-fit: cover; width: 100%; }

.trust-quote { background: var(--paper); border: 1px solid var(--line-soft); border-radius: var(--radius-lg); padding: 40px; display: flex; gap: 30px; align-items: center; cursor: pointer; }
.trust-quote .thumb { width: 90px; height: 118px; border-radius: 8px; overflow: hidden; flex: none; border: 1px solid var(--line); }
.trust-quote .thumb img { width: 100%; height: 100%; object-fit: cover; }
.trust-quote blockquote { font-size: 18px; font-weight: 600; line-height: 1.5; }
.trust-quote cite { display: block; margin-top: 12px; font-style: normal; font-size: 14px; color: var(--ink-faint); font-weight: 600; }
.trust-quote-compact { margin-top: 36px; padding: 24px 28px; gap: 22px; }
.trust-quote-compact .thumb { width: 64px; height: 84px; }
.trust-quote-compact blockquote { font-size: 15.5px; }
.trust-quote-compact:hover, .trust-quote-compact:focus-visible { box-shadow: var(--shadow-md); }
.trust-quote-compact:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.related-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }

.legal-doc h3 { font-size: 20px; margin-top: 40px; margin-bottom: 4px; }
.legal-doc h3:first-child { margin-top: 0; }
.legal-doc p.body { max-width: none; margin-top: 14px; }

/* =========================================================================
   Утилиты и адаптив
   ========================================================================= */
.hidden-mobile { display: initial; }
.show-mobile { display: none; }

@media (max-width: 1180px) {
  .container { padding: 0 24px; }
  .header-phone { display: none; }
  .main-nav { gap: 18px; }
}

@media (max-width: 1024px) {
  .hero { overflow: visible; }
  .hero-media { position: relative; inset: auto; height: 320px; }
  /* Мобильный кадр — портретный источник (grani-1151), при object-fit:cover
     верх кадра иначе попадает на баннер «НАУКА ВПЕЧАТЛЕНИЙ» (обрезанный
     обрывок надписи). 54% уводит окно ниже баннера на всех ширинах до
     360px включительно, оставляя детей и момент с пузырём в кадре. */
  .hero-media img { object-position: center 54%; }
  .hero-scrim { display: none; }
  .hero .container { display: block; min-height: auto; padding-top: 32px; padding-bottom: 44px; }
  .hero-copy { max-width: none; }
  .about-top, .how .container, .contacts .container, .prog-hero-grid, .prog-about-grid { grid-template-columns: 1fr; }
  .about-founder-photo { order: -1; max-width: 420px; margin: 0 auto; }
  .about-video { margin-top: 56px; }
  .catalog-grid { grid-template-columns: repeat(2, 1fr); }
  .thanks-grid { grid-template-columns: 1fr 1fr; }
  .footer-top { grid-template-columns: 1fr 1fr; row-gap: 32px; }
  .related-grid { grid-template-columns: 1fr; }
}

@media (max-width: 860px) {
  .main-nav, .header-actions .header-phone { display: none; }
  .header-actions .hidden-mobile { display: none; }
  .nav-toggle { display: flex; }
}

@media (max-width: 768px) {
  .container { padding: 0 20px; }
  section, .about, .catalog, .how, .thanks, .contacts, .prog-section, .prog-media-block { padding-top: 64px; padding-bottom: 64px; }
  .hero .container { padding-top: 28px; padding-bottom: 44px; }
  .trust-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); row-gap: 20px; }
  .trust-item:last-child { grid-column: span 2; }
  .trust-numbers { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 18px; }
  .catalog-grid { grid-template-columns: 1fr; gap: 16px; }
  .catalog-grid.is-collapsed .prog-card:nth-child(n+5) { display: none; }
  .catalog-more { display: block; }
  .prog-card { flex-direction: row; }
  /* Раньше aspect-ratio:auto — высота thumb зависела от пропорций
     исходного фото каждой программы: у «Магии света» портретный кадр
     (2:3), у остальных альбомный (3:2), из-за чего одна карточка
     оказывалась заметно выше остальных. Фиксированная высота + cover
     уравнивает все карточки независимо от исходных пропорций. */
  .prog-card .thumb { width: 38%; height: 96px; flex: none; }
  /* «Магия света»: без сдвига видна тёмная верхняя часть кадра — поднимаем
     окно, чтобы попали лица в очках и светящийся рисунок. */
  .prog-card .thumb img[alt="Магия света"] { object-position: center 25%; }
  /* min-width:0 — без него flex-элемент с текстом не сжимается по контенту
     и заезжает на область фото вместо переноса строк. */
  .prog-card .body-wrap { padding: 14px 14px 14px 12px; gap: 6px; min-width: 0; }
  .prog-card h3 { font-size: 15.5px; overflow-wrap: break-word; }
  .prog-card .position { font-size: 12.5px; }
  .prog-card .desc { display: none; }
  .prog-card .age-tag { top: 10px; left: 10px; font-size: 11px; padding: 4px 10px; }
  .prog-card .card-cta { border-top: 0; padding-top: 2px; margin-top: 0; font-size: 13px; }
  .prog-card .card-cta svg { width: 14px; height: 14px; }
  .thanks-grid { grid-template-columns: 1fr; }
  .thanks-card.featured { grid-column: span 1; }
  .footer-top { grid-template-columns: 1fr; gap: 28px; }
  .footer-col.legal-links { display: none; }
  .legal-accordion { display: block; }
  .contact-row { font-size: 16px; }
  .prog-hero-actions { gap: 18px; }
  .prog-media-grid { grid-template-columns: repeat(2, 1fr); }
  .trust-quote { flex-direction: column; text-align: center; padding: 30px 24px; }
}

@media (max-width: 480px) {
  h1, .h1 { font-size: 34px; }
  .hero-media { height: 270px; }
  .hero-actions { flex-direction: column; align-items: flex-start; gap: 16px; }
  .catalog-head, .thanks-head { text-align: left; }
  .catalog-head .lede, .thanks-head .lede { margin-left: 0; margin-right: 0; }
  .prog-media-grid { grid-template-columns: 1fr; }
  .modal-close { top: 14px; right: 14px; width: 42px; height: 42px; }
}

/* pre-production audit, п.5: уважаем системную настройку "меньше движения" —
   убираем плавный скролл и сокращаем анимации/переходы, ничего не отключая
   визуально в остальном (эффекты остаются, просто без анимации). */
@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;
  }
}
