/* ============================================================
   LYU-NAILS - школа-студия ногтевого сервиса, Алматы
   Концепция: «Бирюзовая орхидея» - премиально, женственно, чисто
   Палитра: teal #1F8A8A / #2CB1B1, свет #E7F4F3, серый #8FA3A6 /
   #EEF2F2, графит #232B2C, белый
   ============================================================ */

/* ---------- Переменные и сброс ---------- */
:root {
  --teal-700: #1F8A8A;
  --teal-500: #2CB1B1;
  --teal-100: #E7F4F3;
  --grey-400: #8FA3A6;
  --grey-100: #EEF2F2;
  --ink: #232B2C;
  --white: #FFFFFF;

  --font-display: "Prata", "Georgia", serif;
  --font-body: "Manrope", "Helvetica Neue", Arial, sans-serif;

  --radius-lg: 28px;
  --radius-md: 18px;
  --shadow-soft: 0 18px 50px rgba(31, 138, 138, 0.14);
  --shadow-card: 0 10px 34px rgba(35, 43, 44, 0.08);
  --header-h: 72px;
}

*,
*::before,
*::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  /* Якоря не прячутся под липкой шапкой */
  scroll-padding-top: calc(var(--header-h) + 12px);
}

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }

.container {
  width: min(1160px, 100% - 40px);
  margin-inline: auto;
}
.container--wide { width: min(1360px, 100% - 24px); }

/* ---------- Кнопки ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.01em;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease, color 0.25s ease;
  will-change: transform;
}
.btn--lg { padding: 16px 34px; font-size: 16px; }

.btn--solid {
  background: linear-gradient(135deg, var(--teal-500), var(--teal-700));
  color: var(--white);
  box-shadow: 0 8px 24px rgba(31, 138, 138, 0.35);
}
.btn--solid:hover { transform: translateY(-2px); box-shadow: 0 12px 30px rgba(31, 138, 138, 0.45); }
.btn--solid:active { transform: translateY(0); }

.btn--ghost {
  background: var(--white);
  color: var(--teal-700);
  box-shadow: inset 0 0 0 1.5px rgba(31, 138, 138, 0.35);
}
.btn--ghost:hover { background: var(--teal-100); transform: translateY(-2px); }

/* ---------- Секции: общие элементы ---------- */
.section { padding: clamp(64px, 9vw, 120px) 0; }

.section__eyebrow {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--teal-700);
  background: var(--teal-100);
  padding: 7px 16px;
  border-radius: 999px;
  margin-bottom: 18px;
}
.section__eyebrow--center { display: table; margin-inline: auto; }

.section__title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(30px, 4.6vw, 48px);
  line-height: 1.15;
  margin-bottom: 16px;
}
.section__title--center { text-align: center; }

.section__sub {
  max-width: 560px;
  margin: 0 auto clamp(36px, 5vw, 56px);
  text-align: center;
  color: var(--grey-400);
  font-size: 17px;
}

/* ---------- Шапка ---------- */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transition: box-shadow 0.3s ease;
}
.header.is-scrolled { box-shadow: 0 6px 24px rgba(35, 43, 44, 0.08); }

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
}

.header__logo img { width: auto; height: 52px; }

.nav { display: flex; align-items: center; gap: 30px; }

.nav__link {
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  position: relative;
  transition: color 0.25s ease;
}
.nav__link::after {
  content: "";
  position: absolute;
  left: 0; right: 100%;
  bottom: -6px;
  height: 2px;
  border-radius: 2px;
  background: var(--teal-500);
  transition: right 0.3s ease;
}
.nav__link:hover { color: var(--teal-700); }
.nav__link:hover::after { right: 0; }

.nav__cta { padding: 11px 22px; font-size: 14px; }

/* Бургер */
.burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  align-items: center;
}
.burger span {
  display: block;
  width: 24px;
  height: 2px;
  border-radius: 2px;
  background: var(--ink);
  transition: transform 0.3s ease, opacity 0.3s ease;
}
.burger.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger.is-open span:nth-child(2) { opacity: 0; }
.burger.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- HERO ---------- */
.hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(1000px 600px at 85% -10%, rgba(44, 177, 177, 0.16), transparent 60%),
    linear-gradient(180deg, var(--white) 0%, var(--teal-100) 100%);
  padding: clamp(40px, 7vw, 90px) 0 clamp(56px, 8vw, 110px);
}

/* Мягкие бирюзовые блики */
.hero__glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.35;
  pointer-events: none;
}
.hero__glow--1 {
  width: 460px; height: 460px;
  background: var(--teal-500);
  top: -180px; right: -120px;
}
.hero__glow--2 {
  width: 380px; height: 380px;
  background: var(--grey-400);
  bottom: -220px; left: -160px;
  opacity: 0.18;
}

.hero__inner {
  position: relative;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}

.hero__eyebrow {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--teal-700);
  margin-bottom: 20px;
}

.hero__title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(34px, 5.4vw, 60px);
  line-height: 1.12;
  margin-bottom: 22px;
}
.hero__title em {
  font-style: normal;
  color: var(--teal-700);
  position: relative;
}

.hero__subtitle {
  font-size: 17px;
  color: #4c5a5c;
  max-width: 460px;
  margin-bottom: 32px;
}

.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 34px; }

.hero__badges { display: flex; flex-wrap: wrap; gap: 10px 22px; }
.hero__badges li {
  position: relative;
  padding-left: 20px;
  font-size: 14px;
  font-weight: 600;
  color: #4c5a5c;
}
.hero__badges li::before {
  content: "✦";
  position: absolute;
  left: 0;
  color: var(--teal-500);
}

/* Фото Юлии - форма арки, как силуэт ногтя */
.hero__visual { position: relative; }

.hero__photo-frame {
  position: relative;
  border-radius: 300px 300px var(--radius-lg) var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  max-width: 440px;
  margin-inline: auto;
}
.hero__photo-frame::after {
  /* Тонкая внутренняя рамка поверх фото */
  content: "";
  position: absolute;
  inset: 12px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 288px 288px 18px 18px;
  pointer-events: none;
}
.hero__photo-frame img { width: 100%; height: auto; }

/* Плавающие карточки-факты на фото */
.hero__card {
  position: absolute;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(8px);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  padding: 14px 20px;
  display: flex;
  flex-direction: column;
  animation: float 5s ease-in-out infinite;
}
.hero__card strong {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 24px;
  color: var(--teal-700);
  line-height: 1.1;
}
.hero__card span { font-size: 12.5px; font-weight: 600; color: var(--grey-400); }

.hero__card--exp { top: 34%; left: max(-14px, 1%); }
.hero__card--students { bottom: 9%; right: max(-14px, 1%); animation-delay: 2.5s; }

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-9px); }
}

/* ---------- ЦИФРЫ ---------- */
.stats {
  background: linear-gradient(135deg, var(--teal-700), var(--teal-500));
  color: var(--white);
  padding: clamp(44px, 6vw, 70px) 0;
}

.stats__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 28px;
  text-align: center;
}

.stat__num {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(38px, 5vw, 56px);
  line-height: 1.1;
}
.stat__label {
  display: block;
  margin-top: 6px;
  font-size: 14px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.82);
}

/* ---------- О МАСТЕРЕ ---------- */
.about { background: var(--white); }

.about__inner {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: clamp(36px, 6vw, 80px);
  align-items: center;
}

.about__visual {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  align-items: start;
}
.about__photo {
  border-radius: 200px 200px var(--radius-md) var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-card);
}
.about__photo img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 3 / 5; }
.about__photo--offset { margin-top: 56px; border-radius: var(--radius-md) var(--radius-md) 200px 200px; }

.about__lead {
  font-size: 17px;
  color: #4c5a5c;
  margin-bottom: 28px;
  max-width: 540px;
}
.about__lead strong { color: var(--teal-700); font-weight: 700; }

.about__titles { display: grid; gap: 13px; }
.about__titles li {
  display: flex;
  gap: 12px;
  align-items: baseline;
  font-size: 15.5px;
  font-weight: 500;
  background: var(--grey-100);
  border-radius: 14px;
  padding: 12px 18px;
}
.about__icon { color: var(--teal-500); font-size: 11px; flex-shrink: 0; }

/* ---------- КУРСЫ ---------- */
.courses {
  background:
    radial-gradient(800px 500px at 10% 0%, rgba(44, 177, 177, 0.08), transparent 55%),
    var(--teal-100);
}

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

.course {
  display: flex;
  flex-direction: column;
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 30px 28px 28px;
  box-shadow: var(--shadow-card);
  position: relative;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  /* Мягкая подсветка при наведении */
  outline: 1.5px solid transparent;
}
.course:hover {
  transform: translateY(-6px);
  box-shadow: 0 22px 50px rgba(31, 138, 138, 0.18);
  outline-color: rgba(44, 177, 177, 0.45);
}

.course__body { flex: 1; }

.course__name {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 22px;
  line-height: 1.25;
  margin-bottom: 12px;
}

.course__desc { font-size: 15px; color: #4c5a5c; margin-bottom: 14px; }

.course__modules {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px 14px;
  margin-bottom: 14px;
}
.course__modules li {
  position: relative;
  padding-left: 16px;
  font-size: 13.5px;
  font-weight: 500;
  color: #4c5a5c;
}
.course__modules li::before {
  content: "";
  position: absolute;
  left: 0; top: 8px;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--teal-500);
}

.course__note { font-size: 13px; font-weight: 600; color: var(--grey-400); }

.course__footer { margin-top: 20px; }

.course__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 16px;
}
.course__price {
  font-family: var(--font-display);
  font-size: 26px;
  color: var(--teal-700);
}
.course__duration {
  position: relative;
  overflow: hidden;
  display: inline-block;
  font-size: 15px;
  font-weight: 800;
  color: #fff;
  background: var(--teal-500);
  padding: 7px 16px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
  animation: durationGlow 1.15s ease-in-out infinite;
}
/* Пробегающий блик по бейджу */
.course__duration::after {
  content: "";
  position: absolute;
  top: 0;
  left: -80%;
  width: 65%;
  height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.9), transparent);
  transform: skewX(-20deg);
  animation: durationShine 1.5s ease-in-out infinite;
}
/* Пульсирующее свечение вокруг числа (ярче и быстрее) */
@keyframes durationGlow {
  0%, 100% { box-shadow: 0 4px 14px rgba(44, 177, 177, 0.5), 0 0 0 0 rgba(44, 177, 177, 0.35); }
  50% { box-shadow: 0 6px 30px rgba(44, 177, 177, 1), 0 0 0 7px rgba(44, 177, 177, 0.3); }
}
@keyframes durationShine {
  0% { left: -80%; }
  55%, 100% { left: 150%; }
}

.course__actions { display: flex; gap: 10px; flex-wrap: wrap; }
.course__actions .btn { flex: 1; padding: 12px 16px; font-size: 14px; white-space: nowrap; }

/* Флагманский курс - во всю ширину, тёмный премиум */
.course--flagship {
  grid-column: 1 / -1;
  background:
    radial-gradient(700px 400px at 90% 10%, rgba(44, 177, 177, 0.35), transparent 60%),
    linear-gradient(135deg, #1c3536, var(--ink));
  color: var(--white);
  padding: 40px 38px 34px;
}
.course--flagship .course__desc,
.course--flagship .course__modules li { color: rgba(255, 255, 255, 0.82); }
.course--flagship .course__note { color: rgba(255, 255, 255, 0.6); }
.course--flagship .course__name { font-size: clamp(26px, 3vw, 34px); }
.course--flagship .course__price { font-size: clamp(28px, 3.4vw, 38px); color: var(--teal-500); }
.course--flagship .course__duration { background: #fff; color: var(--teal-700); box-shadow: 0 6px 18px rgba(0, 0, 0, 0.3); }
.course--flagship:hover { outline-color: rgba(44, 177, 177, 0.7); }
.course--flagship .course__modules { grid-template-columns: repeat(3, 1fr); }
.course--flagship .course__actions { max-width: 460px; }
.course--flagship .btn--ghost {
  background: transparent;
  color: var(--white);
  box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, 0.4);
}
.course--flagship .btn--ghost:hover { background: rgba(255, 255, 255, 0.1); }

.course__flag {
  position: absolute;
  top: -14px;
  left: 34px;
  background: linear-gradient(135deg, var(--teal-500), var(--teal-700));
  color: var(--white);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 8px 18px;
  border-radius: 999px;
  box-shadow: 0 8px 20px rgba(31, 138, 138, 0.4);
}

/* ---------- ГАЛЕРЕЯ ---------- */
.gallery { background: var(--white); }

.gallery__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.gallery__item {
  border-radius: var(--radius-md);
  overflow: hidden;
  position: relative;
  aspect-ratio: 3 / 4;
  box-shadow: var(--shadow-card);
}
.gallery__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.gallery__item::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 60%, rgba(31, 138, 138, 0.35));
  opacity: 0;
  transition: opacity 0.35s ease;
}
.gallery__item:hover img { transform: scale(1.06); }
.gallery__item:hover::after { opacity: 1; }

/* ---------- ЗАПИСЬ ---------- */
.booking {
  background:
    radial-gradient(900px 500px at 100% 100%, rgba(44, 177, 177, 0.3), transparent 55%),
    linear-gradient(135deg, #1c3536, var(--ink));
  color: var(--white);
}

.booking__inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(36px, 6vw, 80px);
  align-items: center;
}

.booking .section__eyebrow { background: rgba(44, 177, 177, 0.18); color: var(--teal-500); }
.booking__text { color: rgba(255, 255, 255, 0.78); font-size: 17px; max-width: 440px; }

.booking__form {
  background: var(--white);
  color: var(--ink);
  border-radius: var(--radius-lg);
  padding: clamp(26px, 4vw, 40px);
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.3);
  display: grid;
  gap: 18px;
}

.field { display: grid; gap: 7px; }

.field__label { font-size: 13.5px; font-weight: 700; }

.field__input {
  width: 100%;
  font: inherit;
  font-size: 15px;
  color: var(--ink);
  background: var(--grey-100);
  border: 1.5px solid transparent;
  border-radius: 14px;
  padding: 13px 16px;
  outline: none;
  transition: border-color 0.25s ease, background 0.25s ease;
  -webkit-appearance: none;
  appearance: none;
}
.field__input:focus { border-color: var(--teal-500); background: var(--white); }
.field__input.is-invalid { border-color: #d66; }

.field__select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%231F8A8A' stroke-width='2' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 40px;
  cursor: pointer;
}

.field__error {
  font-size: 12.5px;
  font-weight: 600;
  color: #c55;
  min-height: 1em;
}

.booking__submit { width: 100%; }
.booking__privacy {
  font-size: 12.5px;
  color: var(--grey-400);
  text-align: center;
}

/* ---------- КОНТАКТЫ ---------- */
.contacts { background: var(--teal-100); }

.contacts__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 20px;
  margin-top: clamp(30px, 4vw, 48px);
}

.contact-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 30px 26px;
  text-align: center;
  box-shadow: var(--shadow-card);
  display: grid;
  justify-items: center;
  gap: 4px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
a.contact-card:hover { transform: translateY(-5px); box-shadow: 0 18px 44px rgba(31, 138, 138, 0.2); }

.contact-card__icon {
  display: grid;
  place-items: center;
  width: 56px; height: 56px;
  border-radius: 50%;
  background: var(--teal-100);
  color: var(--teal-700);
  margin-bottom: 10px;
}
.contact-card__label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--grey-400);
}
.contact-card__value { font-size: 17px; font-weight: 700; }

/* ---------- ПОДВАЛ ---------- */
.footer { background: var(--white); padding: 48px 0 32px; }
.footer__inner { display: grid; justify-items: center; gap: 10px; text-align: center; }
.footer__logo { width: auto; height: 74px; }
.footer__tagline { font-size: 14px; color: var(--grey-400); font-weight: 500; }
.footer__copy { font-size: 13px; color: var(--grey-400); }

/* ---------- Липкая кнопка WhatsApp ---------- */
.whatsapp-fab {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 90;
  width: 58px; height: 58px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, #34c98e, #1F8A8A);
  color: var(--white);
  box-shadow: 0 12px 30px rgba(31, 138, 138, 0.45);
  transition: transform 0.25s ease;
}
.whatsapp-fab:hover { transform: scale(1.08); }
.whatsapp-fab::before {
  /* Пульсирующее кольцо */
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid rgba(44, 177, 177, 0.6);
  animation: pulse 2.4s ease-out infinite;
}
@keyframes pulse {
  0% { transform: scale(1); opacity: 1; }
  70%, 100% { transform: scale(1.55); opacity: 0; }
}

/* ---------- Лайтбокс ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(20, 30, 31, 0.92);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.lightbox.is-open { opacity: 1; }
/* Атрибут hidden обязан перекрывать display:flex */
.lightbox[hidden] { display: none; }

.lightbox__figure {
  max-width: min(92vw, 560px);
  max-height: 100%;
  display: grid;
  justify-items: center;
  gap: 12px;
}
.lightbox__img {
  max-height: 82vh;
  max-width: 100%;
  width: auto;
  border-radius: var(--radius-md);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
}
.lightbox__caption { color: rgba(255, 255, 255, 0.8); font-size: 14px; text-align: center; }

.lightbox__close {
  position: absolute;
  top: 14px; right: 18px;
  font-size: 42px;
  line-height: 1;
  color: rgba(255, 255, 255, 0.85);
  transition: color 0.2s ease, transform 0.2s ease;
  z-index: 2;
}
.lightbox__close:hover { color: var(--white); transform: rotate(90deg); }

.lightbox__arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 52px;
  line-height: 1;
  color: rgba(255, 255, 255, 0.75);
  padding: 10px 16px;
  transition: color 0.2s ease;
  z-index: 2;
  user-select: none;
}
.lightbox__arrow:hover { color: var(--white); }
.lightbox__arrow--prev { left: 6px; }
.lightbox__arrow--next { right: 6px; }
.lightbox__arrow[hidden] { display: none; }

/* ---------- Scroll-reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.is-visible { opacity: 1; transform: none; }

/* Галерея: фото эффектно "всплывают" — pop с пружинным отскоком (заметно) */
.gallery__item.reveal {
  opacity: 0;
  transform: scale(0.8) translateY(30px);
  transition: opacity 0.5s ease, transform 0.62s cubic-bezier(0.34, 1.56, 0.64, 1);
  will-change: transform, opacity;
}
.gallery__item.reveal.is-visible {
  opacity: 1;
  transform: scale(1) translateY(0);
}

/* Каскадная задержка для сеток */
.courses__grid .reveal:nth-child(2),
.gallery__grid .reveal:nth-child(3n + 2),
.stats__grid .reveal:nth-child(2) { transition-delay: 0.1s; }
.courses__grid .reveal:nth-child(3),
.gallery__grid .reveal:nth-child(3n),
.stats__grid .reveal:nth-child(3) { transition-delay: 0.2s; }
.stats__grid .reveal:nth-child(4) { transition-delay: 0.3s; }

/* ---------- Доступность: минимум движения ---------- */
@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;
  }
  .reveal,
  .gallery__item.reveal { opacity: 1 !important; transform: none !important; }
}

/* ============================================================
   АДАПТИВ
   ============================================================ */

/* Планшет */
@media (max-width: 1024px) {
  .courses__grid { grid-template-columns: repeat(2, 1fr); }
  .gallery__grid { grid-template-columns: repeat(3, 1fr); }
  .course--flagship .course__modules { grid-template-columns: repeat(2, 1fr); }
}

/* Мобильные и небольшие планшеты */
@media (max-width: 860px) {
  :root { --header-h: 64px; }

  .header__logo img { height: 44px; }

  /* Мобильное меню */
  .burger { display: flex; }
  .nav {
    position: fixed;
    top: var(--header-h);
    left: 0; right: 0;
    background: var(--white);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 12px 20px 22px;
    box-shadow: 0 24px 40px rgba(35, 43, 44, 0.14);
    transform: translateY(-12px);
    opacity: 0;
    visibility: hidden;
    transition: transform 0.3s ease, opacity 0.3s ease, visibility 0.3s;
  }
  .nav.is-open { transform: none; opacity: 1; visibility: visible; }
  .nav__link { padding: 14px 4px; font-size: 17px; }
  .nav__link::after { display: none; }
  .nav__cta { margin-top: 12px; justify-content: center; }

  .hero__inner { grid-template-columns: 1fr; }
  .hero__content { text-align: center; }
  .hero__subtitle { margin-inline: auto; }
  .hero__actions { justify-content: center; }
  .hero__badges { justify-content: center; }
  .hero__visual { max-width: 360px; margin-inline: auto; width: 100%; }
  .hero__card--exp { left: -8px; }
  .hero__card--students { right: -8px; }

  .stats__grid { grid-template-columns: repeat(2, 1fr); gap: 30px 16px; }

  .about__inner { grid-template-columns: 1fr; }
  .about__visual { order: 2; max-width: 440px; margin-inline: auto; width: 100%; }

  .courses__grid { grid-template-columns: 1fr; }
  .course--flagship { padding: 34px 24px 28px; }
  .course--flagship .course__modules { grid-template-columns: 1fr 1fr; }
  .course--flagship .course__actions { max-width: none; }

  .gallery__grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }

  .booking__inner { grid-template-columns: 1fr; }

  .contacts__grid { grid-template-columns: 1fr; }

  .lightbox__arrow { font-size: 40px; padding: 8px 10px; }
}

/* Узкие экраны */
@media (max-width: 420px) {
  .btn--lg { padding: 15px 26px; }
  .hero__card { padding: 10px 14px; }
  .hero__card strong { font-size: 19px; }
  .course__actions .btn { flex-basis: 100%; }
}
