/* ============================================================
   ИИ-Лаборатория — style.css
   ============================================================ */

:root {
  --bg: #0b0e1a;
  --bg-soft: #11152a;
  --bg-card: #151a33;
  --surface: rgba(255, 255, 255, 0.04);
  --border: rgba(255, 255, 255, 0.09);
  --text: #eef1ff;
  --text-muted: #9aa3c7;
  --primary: #6366f1;
  --primary-light: #818cf8;
  --accent: #22d3ee;
  --pink: #ec4899;
  --green: #10b981;
  --amber: #f59e0b;
  --radius: 20px;
  --radius-sm: 14px;
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
  --font-display: "Unbounded", sans-serif;
  --font-body: "Manrope", sans-serif;
  --header-h: 76px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; }

.container { width: min(1180px, 92%); margin-inline: auto; }

.section { padding: 110px 0; position: relative; }

::selection { background: var(--primary); color: #fff; }

/* ---------- Прелоадер ---------- */
.preloader {
  position: fixed; inset: 0; z-index: 9999;
  background: var(--bg);
  display: grid; place-items: center;
  transition: opacity .5s ease, visibility .5s;
}
.preloader.is-hidden { opacity: 0; visibility: hidden; }
.preloader__bot { font-size: 64px; animation: bounceBot 1s ease infinite; }
@keyframes bounceBot {
  0%, 100% { transform: translateY(0) rotate(-6deg); }
  50% { transform: translateY(-18px) rotate(6deg); }
}

/* ---------- Прогресс скролла ---------- */
.scroll-progress {
  position: fixed; top: 0; left: 0; height: 3px; width: 0;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  z-index: 1002; transition: width .1s linear;
}

/* ---------- Шапка ---------- */
.header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  height: var(--header-h);
  display: flex; align-items: center;
  transition: background .3s, box-shadow .3s, backdrop-filter .3s;
}
.header.is-scrolled {
  background: rgba(11, 14, 26, 0.82);
  backdrop-filter: blur(14px);
  box-shadow: 0 6px 30px rgba(0, 0, 0, 0.35);
}
.header__inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; }

.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); }
.logo__icon { font-size: 28px; filter: drop-shadow(0 0 10px rgba(99, 102, 241, .8)); }
.logo__text { font-size: 19px; letter-spacing: .3px; }
.logo__text strong { color: var(--primary-light); }

.nav { display: flex; align-items: center; gap: 28px; }
.nav__link {
  color: var(--text-muted); text-decoration: none; font-weight: 600; font-size: 15px;
  position: relative; transition: color .25s;
}
.nav__link::after {
  content: ""; position: absolute; left: 0; bottom: -6px;
  width: 0; height: 2px; border-radius: 2px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  transition: width .3s;
}
.nav__link:hover { color: var(--text); }
.nav__link:hover::after { width: 100%; }

.burger { display: none; background: none; border: 0; cursor: pointer; flex-direction: column; gap: 5px; padding: 6px; }
.burger span { width: 26px; height: 3px; border-radius: 3px; background: var(--text); transition: .3s; }
.burger.is-open span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.burger.is-open span:nth-child(2) { opacity: 0; }
.burger.is-open span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* ---------- Кнопки ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 28px; border-radius: 999px; border: 0; cursor: pointer;
  font-family: var(--font-body); font-weight: 700; font-size: 15px;
  text-decoration: none; transition: transform .25s, box-shadow .25s, background .25s;
}
.btn--primary {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff; box-shadow: 0 10px 30px rgba(99, 102, 241, .4);
}
.btn--primary:hover { transform: translateY(-3px); box-shadow: 0 16px 40px rgba(99, 102, 241, .55); }
.btn--ghost {
  background: var(--surface); color: var(--text);
  border: 1px solid var(--border); backdrop-filter: blur(8px);
}
.btn--ghost:hover { background: rgba(255, 255, 255, .09); transform: translateY(-3px); }
.btn--lg { padding: 16px 36px; font-size: 16px; }
.btn--full { width: 100%; }

/* ---------- Hero ---------- */
.hero {
  min-height: 100vh; display: flex; align-items: center;
  padding: calc(var(--header-h) + 40px) 0 80px; position: relative; overflow: hidden;
  background: linear-gradient(180deg, var(--bg) 50%, #121838 90%, #131a3d 100%);
}
.hero__bg {
  position: absolute; inset: 0; z-index: 0;
  /* плавное затухание всего фона (свечения + сетка) к нижней границе,
     чтобы не было резкого среза при переходе к следующей секции */
  -webkit-mask-image: linear-gradient(180deg, #000 62%, transparent 97%);
  mask-image: linear-gradient(180deg, #000 62%, transparent 97%);
}
.hero__grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 80% 70% at 50% 40%, #000 30%, transparent 75%);
}
.orb { position: absolute; border-radius: 50%; filter: blur(90px); opacity: .5; animation: drift 14s ease-in-out infinite alternate; }
.orb--1 { width: 480px; height: 480px; background: #4338ca; top: -120px; left: -120px; }
.orb--2 { width: 400px; height: 400px; background: #0e7490; bottom: 4%; right: -80px; animation-delay: -4s; }
.orb--3 { width: 260px; height: 260px; background: #9d174d; top: 36%; left: 55%; animation-delay: -8s; }
@keyframes drift { from { transform: translate(0, 0) scale(1); } to { transform: translate(50px, -40px) scale(1.12); } }

.hero__inner { display: grid; grid-template-columns: 1.1fr .9fr; gap: 56px; align-items: center; position: relative; z-index: 1; }

.badge {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 8px 18px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--border);
  font-size: 13.5px; font-weight: 600; color: var(--text-muted);
  margin-bottom: 24px; backdrop-filter: blur(8px);
}
.badge__dot {
  width: 9px; height: 9px; border-radius: 50%; background: var(--green);
  box-shadow: 0 0 0 0 rgba(16, 185, 129, .6); animation: pulse 2s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(16,185,129,.6); }
  70% { box-shadow: 0 0 0 10px rgba(16,185,129,0); }
  100% { box-shadow: 0 0 0 0 rgba(16,185,129,0); }
}

.hero__title {
  font-family: var(--font-display);
  font-size: clamp(28px, 4vw, 54px);
  line-height: 1.12; font-weight: 900; margin-bottom: 22px;
}
.hero__title-gradient {
  display: block; margin-top: 10px;
  white-space: nowrap; /* каждая фраза — строго одна строка */
  background: linear-gradient(90deg, var(--primary-light), var(--accent), var(--pink));
  -webkit-background-clip: text; background-clip: text; color: transparent;
  background-size: 200% auto; animation: shimmer 6s linear infinite;
}
@keyframes shimmer { to { background-position: 200% center; } }

.hero__subtitle { font-size: 18px; color: var(--text-muted); max-width: 560px; margin-bottom: 34px; }
/* ---------- Карточка стоимости ---------- */
.price-card {
  display: inline-flex; align-items: center; gap: 18px;
  padding: 16px 28px 16px 18px; margin-bottom: 30px;
  background:
    linear-gradient(135deg, rgba(99,102,241,.16), rgba(34,211,238,.10)),
    var(--surface);
  border: 1px solid rgba(129,140,248,.35);
  border-radius: var(--radius);
  backdrop-filter: blur(10px);
  box-shadow: 0 14px 40px rgba(99,102,241,.18), inset 0 1px 0 rgba(255,255,255,.06);
}
.price-card__icon {
  flex: none; width: 52px; height: 52px; border-radius: 16px;
  display: grid; place-items: center; font-size: 24px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  box-shadow: 0 8px 22px rgba(99,102,241,.45);
}
.price-card__label {
  display: block; margin-bottom: 4px;
  font-size: 12.5px; font-weight: 700; letter-spacing: .06em;
  text-transform: uppercase; color: var(--text-muted);
}
.price-card__value { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px 12px; }
.price-card__amount {
  font-family: var(--font-display); font-weight: 900; font-size: 30px; line-height: 1.1;
  background: linear-gradient(90deg, #fff, var(--primary-light) 55%, var(--accent));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.price-card__period { font-size: 16px; font-weight: 700; color: var(--text); }

.hero__actions { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 46px; }

.hero__stats { display: flex; gap: 44px; flex-wrap: wrap; }
.stat__num {
  display: block; font-family: var(--font-display); font-weight: 700;
  font-size: 34px; background: linear-gradient(90deg, var(--primary-light), var(--accent));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.stat__label { font-size: 13.5px; color: var(--text-muted); font-weight: 600; }

.hero__photo-wrap { position: relative; }
.hero__photo {
  width: 100%; aspect-ratio: 4 / 4.6; object-fit: cover;
  border-radius: 28px; border: 1px solid var(--border);
  box-shadow: var(--shadow);
  mask-image: linear-gradient(#000 85%, transparent);
}
.hero__card {
  position: absolute; display: flex; align-items: center; gap: 11px;
  background: rgba(17, 21, 42, .88); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 12px 16px;
  backdrop-filter: blur(10px); box-shadow: 0 12px 34px rgba(0,0,0,.4);
  font-size: 13px; line-height: 1.35;
}
.hero__card b { display: block; font-size: 13.5px; }
.hero__card small { color: var(--text-muted); }
.hero__card-icon { font-size: 22px; }
.hero__card--1 { top: 6%; left: -34px; }
.hero__card--2 { top: 26%; right: -30px; }
.hero__card--3 { bottom: 7%; left: -18px; }
.hero__card--4 { bottom: 24%; right: -34px; }
.hero__card--5 { top: 40%; left: -36px; }

.float { animation: floatY 5s ease-in-out infinite; }
.float--delay { animation-delay: -1.8s; }
.float--slow { animation-duration: 6.5s; animation-delay: -3s; }
@keyframes floatY { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }

.hero__scroll { position: absolute; bottom: 28px; left: 50%; transform: translateX(-50%); z-index: 2; }
.hero__mouse {
  display: block; width: 26px; height: 42px; border: 2px solid var(--text-muted);
  border-radius: 999px; position: relative;
}
.hero__mouse span {
  position: absolute; top: 7px; left: 50%; width: 4px; height: 8px;
  background: var(--accent); border-radius: 4px; transform: translateX(-50%);
  animation: wheel 1.6s ease infinite;
}
@keyframes wheel { 0% { opacity: 1; top: 7px; } 100% { opacity: 0; top: 22px; } }

/* ---------- Заголовки секций ---------- */
.section-head { text-align: center; max-width: 760px; margin: 0 auto 64px; }
.section-tag {
  display: inline-block; padding: 7px 18px; border-radius: 999px;
  background: rgba(99, 102, 241, .14); color: var(--primary-light);
  border: 1px solid rgba(99, 102, 241, .3);
  font-size: 13px; font-weight: 700; letter-spacing: 1.2px; text-transform: uppercase;
  margin-bottom: 20px;
}
.section-title {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(26px, 3.4vw, 42px); line-height: 1.2; margin-bottom: 18px;
}
.section-title em {
  font-style: normal;
  background: linear-gradient(90deg, var(--primary-light), var(--accent));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.section-desc { color: var(--text-muted); font-size: 17px; }

/* ---------- О программе ---------- */
.about {
  background: linear-gradient(180deg, #131a3d 0%, #121838 18%, var(--bg) 60%);
  margin-top: -1px;
}
.about__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.skill-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 36px 30px;
  transition: transform .35s, border-color .35s, box-shadow .35s;
  position: relative; overflow: hidden;
}
.skill-card::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--c1, var(--primary)), var(--c2, var(--accent)));
  opacity: 0; transition: opacity .35s;
}
.skill-card:hover { transform: translateY(-8px); border-color: rgba(255,255,255,.18); box-shadow: var(--shadow); }
.skill-card:hover::before { opacity: 1; }
.skill-card__icon {
  width: 64px; height: 64px; display: grid; place-items: center;
  font-size: 30px; border-radius: 18px; margin-bottom: 22px;
  background: linear-gradient(135deg, var(--c1, var(--primary)), var(--c2, var(--accent)));
  box-shadow: 0 10px 26px rgba(0,0,0,.35);
}
.skill-card h3 { font-size: 20px; margin-bottom: 12px; }
.skill-card p { color: var(--text-muted); font-size: 15px; margin-bottom: 18px; }
.skill-card__list { list-style: none; }
.skill-card__list li {
  padding: 7px 0 7px 26px; position: relative;
  font-size: 14.5px; font-weight: 600; color: var(--text);
  border-top: 1px dashed var(--border);
}
.skill-card__list li::before { content: "✓"; position: absolute; left: 2px; color: var(--accent); font-weight: 800; }

.about__quote {
  margin-top: 56px; text-align: center; max-width: 820px; margin-inline: auto;
  background: linear-gradient(135deg, rgba(99,102,241,.12), rgba(34,211,238,.08));
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 40px 48px; position: relative;
}
.about__quote-mark {
  font-family: var(--font-display); font-size: 70px; line-height: .6;
  color: var(--primary-light); margin-bottom: 10px;
}
.about__quote p { font-size: 18px; }
.about__quote b { color: var(--accent); }

/* ---------- Возрастные группы ---------- */
.ages__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.age-card {
  display: flex; flex-direction: column;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden; text-decoration: none; color: var(--text);
  transition: transform .35s, box-shadow .35s, border-color .35s;
}
.age-card:hover { transform: translateY(-10px); box-shadow: var(--shadow); border-color: var(--c1); }
.age-card__media { position: relative; aspect-ratio: 16 / 10; overflow: hidden; }
.age-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.age-card:hover .age-card__media img { transform: scale(1.07); }
.age-card__media::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 45%, rgba(11,14,26,.92));
}
.age-card__badge {
  position: absolute; top: 16px; left: 16px; z-index: 1;
  padding: 8px 18px; border-radius: 999px; font-weight: 800; font-size: 14px; color: #0b0e1a;
  background: linear-gradient(135deg, var(--c1), var(--c2));
  box-shadow: 0 8px 22px rgba(0,0,0,.35);
}
.age-card__body { padding: 26px 26px 30px; display: flex; flex-direction: column; flex: 1; }
.age-card__body h3 { font-size: 21px; margin-bottom: 8px; }
.age-card__slogan {
  font-size: 14px; font-style: italic; color: var(--c1);
  margin-bottom: 16px; font-weight: 600;
}
.age-card__body ul { list-style: none; margin-bottom: 22px; }
.age-card__body li { padding: 6px 0; font-size: 14.5px; color: var(--text-muted); font-weight: 500; }
.age-card__link {
  margin-top: auto; font-weight: 800; font-size: 14.5px;
  background: linear-gradient(90deg, var(--c1), var(--c2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* ---------- Программа: тезисные карточки ---------- */
.program__note {
  margin-top: 40px; text-align: center;
  padding: 26px 32px; border-radius: var(--radius);
  background: var(--surface); border: 1px dashed var(--border);
  color: var(--text-muted); font-size: 16px; font-weight: 600;
}
.thesis-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }

.thesis-card {
  display: flex; flex-direction: column;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 32px 28px;
  position: relative; overflow: hidden;
  transition: transform .35s, border-color .35s, box-shadow .35s;
}
.thesis-card::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 4px;
  background: linear-gradient(90deg, var(--c1), var(--c2));
}
.thesis-card:hover {
  transform: translateY(-8px);
  border-color: var(--c1);
  box-shadow: var(--shadow);
}
.thesis-card__head { margin-bottom: 22px; }
.thesis-card__badge {
  display: inline-block; padding: 7px 16px; border-radius: 999px;
  font-weight: 800; font-size: 13.5px; color: #0b0e1a;
  background: linear-gradient(135deg, var(--c1), var(--c2));
  margin-bottom: 16px;
}
.thesis-card__head h3 { font-size: 20px; font-family: var(--font-display); font-weight: 700; line-height: 1.3; }
.thesis-card__list { list-style: none; display: grid; gap: 10px; margin-bottom: 24px; flex: 1; }
.thesis-card__list li {
  padding: 13px 16px; border-radius: var(--radius-sm);
  background: var(--surface); border: 1px solid var(--border);
  font-size: 14.5px; font-weight: 500; color: var(--text-muted);
  transition: transform .25s, border-color .25s, color .25s;
}
.thesis-card__list li:hover { transform: translateX(6px); border-color: var(--c1); color: var(--text); }
.thesis-card__result {
  padding: 16px 18px; border-radius: var(--radius-sm);
  background: linear-gradient(135deg, rgba(16,185,129,.12), rgba(34,211,238,.08));
  border: 1px solid rgba(16,185,129,.3);
  font-size: 14px; font-weight: 600; line-height: 1.5;
}
.thesis-card__btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  padding: 13px 22px; border-radius: 999px; border: 0; cursor: pointer;
  font-family: var(--font-body); font-weight: 800; font-size: 14.5px; color: #fff;
  background-color: var(--primary);
  background-image: linear-gradient(135deg, var(--c1, var(--primary)), var(--c2, var(--accent)));
  box-shadow: 0 10px 26px rgba(0, 0, 0, .35);
  transition: transform .25s, box-shadow .25s;
}
.thesis-card__btn:hover { transform: translateY(-3px); box-shadow: 0 14px 34px rgba(0, 0, 0, .45); }
.thesis-card__btn:active { transform: translateY(-1px); }

/* ---------- Галерея ---------- */
.gallery__grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: 240px; gap: 18px;
}
.gallery__item {
  border-radius: var(--radius); overflow: hidden; position: relative;
  border: 1px solid var(--border); cursor: pointer;
}
.gallery__item:nth-child(1), .gallery__item:nth-child(6) { grid-row: span 2; }
.gallery__item img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .6s ease, filter .6s;
  filter: saturate(.85);
}
.gallery__item:hover img { transform: scale(1.08); filter: saturate(1.1); }
.gallery__item::after {
  content: "✨"; position: absolute; inset: 0; display: grid; place-items: center;
  font-size: 34px; background: rgba(11,14,26,.45); opacity: 0;
  transition: opacity .35s;
}
.gallery__item:hover::after { opacity: 1; }

/* ---------- Видео ---------- */
.video { background: linear-gradient(180deg, transparent, rgba(34,211,238,.05)); }
.video__frame {
  position: relative; width: min(920px, 100%); margin: 0 auto;
  border-radius: 24px; overflow: hidden; text-align: center;
  border: 1px solid var(--border); background: #000;
  box-shadow: var(--shadow);
}
.video__frame video {
  max-width: 100%; width: auto; height: auto; max-height: 76vh;
  object-fit: contain; display: inline-block;
}
.video__overlay {
  position: absolute; inset: 0; z-index: 2;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px;
  background: rgba(11, 14, 26, .62); backdrop-filter: blur(3px);
  cursor: pointer; transition: opacity .35s;
}
.video__overlay.is-hidden { opacity: 0; pointer-events: none; }
.video__play {
  width: 92px; height: 92px; border-radius: 50%;
  display: grid; place-items: center; font-size: 32px; color: #fff;
  padding-left: 8px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  box-shadow: 0 14px 40px rgba(99, 102, 241, .55);
  animation: playPulse 2.2s ease infinite;
  transition: transform .3s;
}
.video__overlay:hover .video__play { transform: scale(1.1); }
@keyframes playPulse {
  0% { box-shadow: 0 14px 40px rgba(99,102,241,.55), 0 0 0 0 rgba(99,102,241,.4); }
  70% { box-shadow: 0 14px 40px rgba(99,102,241,.55), 0 0 0 26px rgba(99,102,241,0); }
  100% { box-shadow: 0 14px 40px rgba(99,102,241,.55), 0 0 0 0 rgba(99,102,241,0); }
}
.video__hint { text-align: center; font-weight: 600; font-size: 16px; line-height: 1.6; }
.video__hint small { color: var(--text-muted); font-weight: 500; font-size: 13.5px; }

/* ---------- Контакты ---------- */
.contact { background: linear-gradient(180deg, transparent, rgba(99,102,241,.06)); }
.contact__inner {
  display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: start;
}
.contact__desc { color: var(--text-muted); font-size: 17px; margin: 18px 0 28px; }
.contact__list { list-style: none; display: grid; gap: 14px; }
.contact__list li {
  display: flex; gap: 14px; align-items: center;
  padding: 14px 18px; border-radius: var(--radius-sm);
  background: var(--surface); border: 1px solid var(--border);
  font-weight: 600; font-size: 15px;
}
.contact__list span { font-size: 20px; }

.contact__side { display: grid; gap: 22px; align-content: start; }
.contact__side-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 30px;
  transition: transform .3s, border-color .3s;
}
.contact__side-card:hover { transform: translateY(-5px); border-color: rgba(99,102,241,.45); }
.contact__side-icon { font-size: 34px; display: block; margin-bottom: 14px; }
.contact__side-card h3 { font-size: 18px; margin-bottom: 8px; }
.contact__side-card p { color: var(--text-muted); font-size: 14.5px; }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.contact__form label,
.modal__dialog label { display: block; margin-bottom: 16px; }
.contact__form label span,
.modal__dialog label span {
  display: block; font-size: 13px; font-weight: 700; color: var(--text-muted);
  margin-bottom: 7px; letter-spacing: .4px; text-transform: uppercase;
}
.contact__form input,
.contact__form select,
.contact__form textarea,
.modal__dialog input,
.modal__dialog select,
.modal__dialog textarea {
  width: 100%; padding: 14px 16px; border-radius: var(--radius-sm);
  background: var(--surface); border: 1px solid var(--border);
  color: var(--text); font-family: var(--font-body); font-size: 15px;
  transition: border-color .25s, box-shadow .25s; resize: vertical;
}
.modal__dialog select { cursor: pointer; }
.modal__dialog option { background: var(--bg-soft); }
.contact__form input:focus,
.contact__form select:focus,
.contact__form textarea:focus,
.modal__dialog input:focus,
.modal__dialog select:focus,
.modal__dialog textarea:focus {
  outline: none; border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(99,102,241,.18);
}
.form-note { margin-top: 14px; font-size: 12.5px; color: var(--text-muted); text-align: center; }
.form-success {
  margin-top: 18px; padding: 16px 20px; border-radius: var(--radius-sm);
  background: rgba(16,185,129,.12); border: 1px solid rgba(16,185,129,.4);
  color: var(--green); font-weight: 700; font-size: 15px; text-align: center;
}

/* ---------- Футер ---------- */
.footer {
  border-top: 1px solid var(--border); padding: 56px 0 40px;
  background: var(--bg-soft); text-align: center;
}
.footer__inner { display: flex; flex-direction: column; align-items: center; gap: 18px; }
.footer .logo { justify-content: center; }
.footer__slogan {
  font-family: var(--font-display); font-size: 14px; letter-spacing: 3px;
  text-transform: uppercase;
  background: linear-gradient(90deg, var(--primary-light), var(--accent));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.footer__nav { display: flex; gap: 26px; flex-wrap: wrap; justify-content: center; }
.footer__nav a { color: var(--text-muted); text-decoration: none; font-size: 14.5px; font-weight: 600; transition: color .25s; }
.footer__nav a:hover { color: var(--accent); }
.footer__copy { color: var(--text-muted); font-size: 13.5px; margin-top: 8px; }

/* ---------- Плавающая кнопка записи (FAB) ---------- */
.fab {
  position: fixed; right: 26px; bottom: 26px; z-index: 950;
  display: inline-flex; align-items: center; gap: 10px;
  padding: 16px 28px; border-radius: 999px; border: 0; cursor: pointer;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff; font-family: var(--font-body); font-weight: 800; font-size: 15.5px;
  box-shadow: 0 12px 34px rgba(99, 102, 241, .5);
  transition: transform .25s, box-shadow .25s;
  animation: fabGlow 3s ease infinite;
}
@keyframes fabGlow {
  0%, 100% { box-shadow: 0 12px 34px rgba(99,102,241,.5); }
  50% { box-shadow: 0 12px 44px rgba(34,211,238,.55); }
}
.fab:hover { transform: translateY(-4px) scale(1.03); }
.fab__icon { font-size: 18px; }

/* ---------- Кнопка наверх ---------- */
.to-top {
  position: fixed; right: 26px; bottom: 94px; z-index: 900;
  width: 52px; height: 52px; border-radius: 50%; border: 0; cursor: pointer;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff; font-size: 20px; font-weight: 800;
  box-shadow: 0 10px 30px rgba(99,102,241,.45);
  opacity: 0; visibility: hidden; transform: translateY(16px);
  transition: all .35s;
}
.to-top.is-visible { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { transform: translateY(-4px); }

/* ---------- Модальное окно ---------- */
.modal {
  position: fixed; inset: 0; z-index: 1100;
  display: grid; place-items: center; padding: 20px;
  visibility: hidden; opacity: 0; transition: opacity .3s, visibility .3s;
}
.modal.is-open { visibility: visible; opacity: 1; }
.modal__overlay {
  position: absolute; inset: 0;
  background: rgba(5, 7, 15, .72); backdrop-filter: blur(6px);
}
.modal__dialog {
  position: relative; width: min(560px, 100%);
  max-height: 90vh; overflow-y: auto;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 24px; padding: 38px 34px;
  box-shadow: var(--shadow);
  transform: translateY(26px) scale(.97); transition: transform .35s cubic-bezier(.2,.9,.3,1.2);
}
.modal.is-open .modal__dialog { transform: none; }
.modal__close {
  position: absolute; top: 16px; right: 16px;
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--surface); border: 1px solid var(--border);
  color: var(--text); font-size: 16px; cursor: pointer;
  transition: background .25s, transform .25s;
}
.modal__close:hover { background: rgba(236,72,153,.2); transform: rotate(90deg); }
.modal__dialog h3 { font-family: var(--font-display); font-size: 22px; margin-bottom: 8px; }
.modal__dialog > p { color: var(--text-muted); font-size: 15px; margin-bottom: 24px; }

/* ---------- Модалка: краткое резюме ---------- */
.modal__dialog--wide { width: min(680px, 100%); }
.summary-group {
  display: flex; gap: 16px; align-items: flex-start;
  padding: 18px 20px; border-radius: var(--radius-sm);
  background: var(--surface); border: 1px solid var(--border);
  margin-bottom: 14px;
  transition: border-color .25s, transform .25s;
}
.summary-group:hover { border-color: rgba(99,102,241,.45); transform: translateX(4px); }
.summary-group__icon {
  flex-shrink: 0; width: 46px; height: 46px; display: grid; place-items: center;
  font-size: 22px; border-radius: 13px;
  background: linear-gradient(135deg, rgba(99,102,241,.25), rgba(34,211,238,.18));
  border: 1px solid var(--border);
}
.summary-group h4 { font-size: 15.5px; margin-bottom: 4px; }
.summary-group p { color: var(--text-muted); font-size: 14px; line-height: 1.6; }
.summary-final {
  margin-top: 20px; padding: 20px 22px; border-radius: var(--radius-sm);
  background: linear-gradient(135deg, rgba(16,185,129,.14), rgba(34,211,238,.1));
  border: 1px solid rgba(16,185,129,.35);
  font-size: 15px; font-weight: 600; line-height: 1.65;
}
.summary-final b { color: var(--green); }

/* ---------- Контакты: карточка телефона ---------- */
.contact__phone-card {
  display: flex; align-items: center; gap: 16px;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 22px 26px; margin-top: 8px;
  transition: border-color .25s, transform .25s;
}
.contact__phone-card:hover { border-color: rgba(99,102,241,.45); transform: translateY(-3px); }
.contact__phone-icon { font-size: 30px; flex-shrink: 0; }
.contact__phone-num {
  display: block; font-family: var(--font-display); font-weight: 700; font-size: 23px;
  background: linear-gradient(90deg, var(--primary-light), var(--accent));
  -webkit-background-clip: text; background-clip: text; color: transparent;
  text-decoration: none; line-height: 1.2;
}
.contact__phone-name { color: var(--text-muted); font-size: 13.5px; display: block; margin-top: 4px; }

/* ---------- Модалка: телефон ---------- */
#signupModal .modal__dialog { text-align: center; }
.contact-modal__icon {
  width: 74px; height: 74px; border-radius: 50%;
  display: grid; place-items: center; font-size: 32px;
  margin: 0 auto 18px;
  background: linear-gradient(135deg, rgba(99,102,241,.25), rgba(34,211,238,.18));
  border: 1px solid var(--border);
  animation: playPulse 2.4s ease infinite;
}
.contact-modal__phone {
  display: block; font-family: var(--font-display); font-weight: 700; font-size: 30px;
  background: linear-gradient(90deg, var(--primary-light), var(--accent), var(--pink));
  background-size: 200% auto;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  text-decoration: none; margin: 16px 0 6px;
  animation: shimmer 6s linear infinite;
}
.contact-modal__name {
  color: var(--text-muted); font-size: 15px; font-weight: 600; margin-bottom: 26px;
}
.contact-actions { display: grid; gap: 12px; }

/* ---------- Reveal-анимации ---------- */
.reveal { opacity: 0; transform: translateY(34px); transition: opacity .7s ease, transform .7s ease; transition-delay: calc(var(--i, 0) * .12s); }
.reveal.is-visible { opacity: 1; transform: none; }

/* ---------- Адаптив ---------- */
@media (max-width: 1024px) {
  .hero__inner { grid-template-columns: 1fr; gap: 48px; }
  .hero__visual { max-width: 520px; margin-inline: auto; }
  .hero__card--1 { left: -10px; top: 4%; }
  .hero__card--2 { right: -8px; top: 20%; }
  .hero__card--3 { left: -6px; bottom: 5%; }
  .hero__card--4 { right: -10px; bottom: 18%; }
  .hero__card--5 { left: -12px; top: 36%; }
  .about__grid, .ages__grid { grid-template-columns: 1fr; max-width: 560px; margin-inline: auto; }
  .thesis-grid { grid-template-columns: 1fr; max-width: 560px; margin-inline: auto; }
  .contact__inner { grid-template-columns: 1fr; gap: 44px; }
  .gallery__grid { grid-template-columns: repeat(2, 1fr); }
  .gallery__item:nth-child(1), .gallery__item:nth-child(6) { grid-row: auto; }
}

@media (max-width: 760px) {
  .section { padding: 72px 0; }
  .section-head { margin-bottom: 42px; }
  .section-desc { font-size: 15px; }

  /* --- Шапка и меню --- */
  .nav {
    position: fixed; top: var(--header-h); right: 0; width: min(300px, 80vw);
    height: calc(100vh - var(--header-h));
    flex-direction: column; align-items: stretch; gap: 4px;
    background: rgba(11,14,26,.97); backdrop-filter: blur(16px);
    padding: 28px 24px calc(28px + env(safe-area-inset-bottom)); border-left: 1px solid var(--border);
    transform: translateX(100%); transition: transform .4s cubic-bezier(.7,0,.3,1);
  }
  .nav.is-open { transform: none; }
  .nav__link { font-size: 17px; padding: 13px 0; border-bottom: 1px dashed var(--border); }
  .nav__link::after { display: none; }
  .nav__cta { margin-top: 20px; justify-content: center; }
  .burger { display: flex; z-index: 1001; padding: 10px; }
  .logo__text { font-size: 17px; }

  /* --- Hero --- */
  .hero { padding: calc(var(--header-h) + 20px) 0 56px; }
  .hero__inner { gap: 36px; }
  .hero__title { font-size: clamp(27px, 8.2vw, 40px); line-height: 1.16; margin-bottom: 16px; }
  .hero__subtitle { font-size: 15px; margin-bottom: 26px; }
  .price-card { display: flex; width: 100%; gap: 14px; padding: 14px 16px; margin-bottom: 22px; }
  .price-card__icon { width: 46px; height: 46px; font-size: 21px; border-radius: 14px; }
  .price-card__amount { font-size: 25px; }
  .price-card__period { font-size: 14.5px; }
  .hero__actions { flex-direction: column; gap: 12px; margin-bottom: 34px; }
  .hero__actions .btn { width: 100%; justify-content: center; }
  .hero__stats { flex-direction: column; gap: 10px; }
  .stat {
    display: flex; align-items: center; justify-content: space-between;
    width: 100%; padding: 11px 16px;
    background: var(--surface); border: 1px solid var(--border);
    border-radius: 12px;
  }
  .stat__num { font-size: 22px; }
  .stat__label { font-size: 12.5px; }
  .hero__visual { max-width: 100%; }
  .hero__photo { aspect-ratio: 1 / 1.08; border-radius: 22px; }
  .hero__scroll { display: none; }
  .hero__card { padding: 9px 12px; font-size: 11.5px; border-radius: 12px; gap: 8px; }
  .hero__card-icon { font-size: 17px; }
  .hero__card b { font-size: 12px; }
  .hero__card small { font-size: 10.5px; }
  .hero__card--1 { top: 10px; left: 8px; }
  .hero__card--2 { top: 74px; right: 8px; }
  .hero__card--3 { bottom: 12px; left: 8px; }
  .hero__card--4, .hero__card--5 { display: none; }

  /* --- Секции --- */
  .skill-card { padding: 26px 22px; }
  .skill-card__icon { width: 54px; height: 54px; font-size: 26px; }
  .about__quote { padding: 28px 20px; margin-top: 40px; }
  .about__quote p { font-size: 15.5px; }
  .age-card__body { padding: 20px 20px 24px; }
  .thesis-card { padding: 26px 20px; }
  .program__note { padding: 20px 18px; font-size: 14.5px; }
  .gallery__grid { grid-template-columns: 1fr; grid-auto-rows: 230px; gap: 14px; }
  .contact__list li { font-size: 13.5px; padding: 12px 14px; }
  .contact__side-card { padding: 22px 20px; }
  .footer { padding: 42px 0 32px; }
  .footer__nav { gap: 14px; }
  .footer__nav a { font-size: 13.5px; }

  /* --- Формы: 16px, чтобы iOS не приближал экран --- */
  .modal__dialog input,
  .modal__dialog select,
  .modal__dialog textarea { font-size: 16px; padding: 12px 14px; }
  .form-row { grid-template-columns: 1fr; gap: 0; }

  /* --- Видео --- */
  .video__frame { border-radius: 18px; }
  .video__frame video { max-height: 70vh; }
  .video__play { width: 68px; height: 68px; font-size: 24px; }
  .video__hint { font-size: 14px; padding: 0 14px; }

  /* --- Плавающие кнопки --- */
  .fab {
    right: 14px;
    bottom: calc(14px + env(safe-area-inset-bottom));
    padding: 13px 20px; font-size: 14px;
  }
  .to-top {
    right: 14px;
    bottom: calc(76px + env(safe-area-inset-bottom));
    width: 44px; height: 44px; font-size: 17px;
  }

  /* --- Модалка --- */
  .modal { padding: 12px; }
  .modal__dialog { padding: 26px 20px; border-radius: 18px; }
  .modal__dialog h3 { font-size: 19px; }
  .modal__dialog > p { font-size: 14px; margin-bottom: 18px; }
  .contact__phone-card { padding: 18px 20px; }
  .contact__phone-num { font-size: 19px; }
  .contact-modal__phone { font-size: 25px; }
  .contact-modal__icon { width: 62px; height: 62px; font-size: 27px; }
}

@media (max-width: 380px) {
  .hero__title { font-size: 25px; }
  .stat__num { font-size: 20px; }
  .stat__label { font-size: 11.5px; }
  .price-card__amount { font-size: 22px; }
  .hero__card--2 { top: 64px; }
  .section { padding: 60px 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  html { scroll-behavior: auto; }
}