/* ============================================================
   Онлайн-репетитор по математике — стили
   Чистый CSS, без зависимостей.
   ============================================================ */

/* ---------- Переменные / палитра ---------- */
:root {
  --bg:            #F7F9FC;
  --bg-soft:       #EEF4FF;
  --card:          #FFFFFF;
  --text:          #0F172A;
  --text-2:        #475569;
  --accent:        #F97316;   /* оранжевый CTA */
  --accent-dark:   #EA6A0C;
  --blue:          #2563EB;
  --border:        #E2E8F0;

  --radius:        20px;
  --radius-sm:     12px;
  --shadow:        0 10px 30px rgba(15, 23, 42, .06);
  --shadow-hover:  0 16px 40px rgba(15, 23, 42, .12);

  --maxw:          1180px;
  --header-h:      72px;
}

/* ---------- Сброс ---------- */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;       /* нет горизонтального скролла */
}

img, svg, video { max-width: 100%; display: block; }

a { color: inherit; text-decoration: none; }

ul, ol { margin: 0; padding: 0; list-style: none; }

/* ---------- Контейнер ---------- */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Кнопки ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 600;
  font-size: 16px;
  border-radius: 999px;
  padding: 12px 22px;
  cursor: pointer;
  border: 2px solid transparent;
  transition: transform .15s ease, box-shadow .2s ease, background .2s ease;
  white-space: nowrap;
}
.btn--lg { padding: 16px 30px; font-size: 17px; }

.btn--accent {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 8px 20px rgba(249, 115, 22, .28);
}
.btn--accent:hover { background: var(--accent-dark); transform: translateY(-2px); box-shadow: 0 12px 26px rgba(249, 115, 22, .36); }

.btn--ghost {
  background: #fff;
  color: var(--text);
  border-color: var(--border);
}
.btn--ghost:hover { border-color: var(--blue); color: var(--blue); transform: translateY(-2px); }

/* ============================================================
   HEADER
   ============================================================ */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(247, 249, 252, .85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.header__inner {
  height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 32px;
}
.logo {
  font-weight: 800;
  font-size: 19px;
  letter-spacing: -.02em;
  white-space: nowrap;
  flex-shrink: 0;
  /* аккуратный овальный ободок оранжевого цвета */
  border: 2px solid var(--accent);
  border-radius: 999px;
  padding: 9px 20px;
  background: rgba(249, 115, 22, .06);
  transition: background .2s, box-shadow .2s;
}
.logo:hover {
  background: rgba(249, 115, 22, .12);
  box-shadow: 0 6px 16px rgba(249, 115, 22, .18);
}
.logo__role {
  font-weight: 500;
  color: var(--text-2);
}
.nav {
  display: flex;
  gap: 30px;
  margin: 0 auto;          /* навигация по центру шапки */
}
.nav__link {
  color: var(--text-2);
  font-weight: 500;
  font-size: 15px;
  white-space: nowrap;
  transition: color .2s;
}
.nav__link:hover { color: var(--text); }

.header__cta { flex-shrink: 0; }

/* Бургер */
.burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  margin-left: auto;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  cursor: pointer;
}
.burger span {
  display: block;
  width: 22px;
  height: 2px;
  margin: 0 auto;
  background: var(--text);
  border-radius: 2px;
  transition: transform .25s, opacity .25s;
}
.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); }

/* ============================================================
   СЕКЦИИ — общее
   ============================================================ */
.section { padding: 84px 0; }
.section--soft { background: var(--bg-soft); }

.section__title {
  font-size: clamp(26px, 4vw, 40px);
  font-weight: 800;
  letter-spacing: -.02em;
  text-align: center;
  margin: 0 0 16px;
}
.section__title--left { text-align: left; }

.section__subtitle {
  text-align: center;
  color: var(--text-2);
  font-size: 18px;
  max-width: 720px;
  margin: 0 auto 48px;
}

/* ============================================================
   HERO
   ============================================================ */
.hero { padding-top: 64px; padding-bottom: 72px; }
.hero__inner {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 48px;
  align-items: center;
}
.hero__title {
  font-size: clamp(34px, 5.4vw, 56px);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -.03em;
  margin: 0 0 20px;
}
.hero__subtitle {
  font-size: 19px;
  color: var(--text-2);
  margin: 0 0 32px;
  max-width: 540px;
}
.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 32px;
}
.hero__facts {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.hero__facts li {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 7px 16px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-2);
}

.hero__media { position: relative; }

/* Декоративные формулы */
.formula {
  position: absolute;
  font-weight: 700;
  color: var(--blue);
  opacity: .18;
  font-size: 38px;
  z-index: 1;
  pointer-events: none;
}
.formula--1 { top: -10px; left: -6px; }
.formula--2 { top: 30%; right: -4px; font-size: 52px; color: var(--accent); }
.formula--3 { bottom: 8%; left: -10px; font-size: 30px; }
.formula--4 { bottom: -8px; right: 20%; font-size: 46px; }

/* ============================================================
   PLACEHOLDERS для фото
   ============================================================ */
.photo-placeholder {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-align: center;
  background: linear-gradient(135deg, #fff 0%, var(--bg-soft) 100%);
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  color: var(--text-2);
  box-shadow: var(--shadow);
}
.photo-placeholder--hero { aspect-ratio: 4 / 5; }
.photo-placeholder--wide { aspect-ratio: 16 / 10; }
.photo-placeholder--final { aspect-ratio: 4 / 5; }

.ph-icon { width: 56px; height: 56px; fill: var(--blue); opacity: .5; }
.ph-text { font-weight: 600; color: var(--text); }
.ph-subtext { font-size: 14px; }

/* ============================================================
   КАРТОЧКИ (универсальные)
   ============================================================ */
.cards { display: grid; gap: 24px; }
.cards--3 { grid-template-columns: repeat(3, 1fr); }

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
  transition: transform .2s, box-shadow .2s;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); }

.card__badge {
  display: inline-block;
  background: var(--bg-soft);
  color: var(--blue);
  font-weight: 700;
  font-size: 15px;
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 14px;
}
.card__heading { font-size: 19px; font-weight: 700; margin: 0 0 8px; }
.card__text { color: var(--text-2); margin: 0 0 14px; }
.card__list li {
  position: relative;
  padding-left: 22px;
  color: var(--text-2);
  margin-bottom: 6px;
  font-size: 15px;
}
.card__list li::before {
  content: "";
  position: absolute;
  left: 0; top: 9px;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent);
}
.card--feature .card__text { margin-bottom: 0; }

/* Нижняя плашка-заметка */
.note-bar {
  margin-top: 36px;
  text-align: center;
  background: var(--card);
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius-sm);
  padding: 18px 24px;
  font-weight: 600;
  font-size: 18px;
  box-shadow: var(--shadow);
}

.center-cta { text-align: center; margin-top: 44px; }

/* ============================================================
   ШАГИ (процесс)
   ============================================================ */
.steps {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin-bottom: 48px;
}
.step {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 10px 18px 10px 10px;
  box-shadow: var(--shadow);
  font-weight: 500;
}
.step__num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px; height: 30px;
  background: var(--blue);
  color: #fff;
  border-radius: 50%;
  font-weight: 700;
  font-size: 15px;
  flex-shrink: 0;
}
.step__label { font-size: 15px; }

.process__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 36px;
  align-items: center;
}
.process__text {
  font-size: 19px;
  color: var(--text-2);
}

/* ============================================================
   ВИДЕООТЗЫВЫ
   ============================================================ */
.reviews {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 24px;
}
.review {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform .2s, box-shadow .2s;
}
.review:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); }

.video-placeholder {
  position: relative;
  aspect-ratio: 4 / 5;
  background: linear-gradient(160deg, #1e293b 0%, #334155 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  text-align: center;
  padding: 16px;
}
.video-placeholder__text {
  color: rgba(255, 255, 255, .8);
  font-size: 14px;
}
/* Карточка может содержать реальное <video> вместо placeholder */
.review video { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; background: #000; }

.play-btn {
  width: 60px; height: 60px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, .92);
  cursor: pointer;
  position: relative;
  transition: transform .15s, background .2s;
}
.play-btn:hover { transform: scale(1.08); background: #fff; }
.play-btn::after {
  content: "";
  position: absolute;
  top: 50%; left: 54%;
  transform: translate(-50%, -50%);
  border-style: solid;
  border-width: 11px 0 11px 18px;
  border-color: transparent transparent transparent var(--accent);
}

.review__meta { padding: 18px 20px 22px; }
.review__name { font-size: 17px; font-weight: 700; margin: 0 0 6px; }
.review__result { color: var(--text-2); font-size: 15px; margin: 0; }

/* ============================================================
   ФОРМАТ И СТОИМОСТЬ
   ============================================================ */
.pricing__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  margin-bottom: 56px;
}
.format-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 30px;
  box-shadow: var(--shadow);
}
.format-list li {
  position: relative;
  padding-left: 30px;
  margin-bottom: 12px;
  color: var(--text);
  font-weight: 500;
}
.format-list li::before {
  content: "✓";
  position: absolute;
  left: 0; top: 0;
  color: var(--accent);
  font-weight: 800;
}

.price-cards { display: flex; flex-direction: column; gap: 18px; }
.price-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 26px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.price-card--free { border: 2px solid var(--accent); }
.price-card__name { color: var(--text-2); font-weight: 600; }
.price-card__value { font-size: 28px; font-weight: 800; }
.price-card__value small { font-size: 15px; font-weight: 500; color: var(--text-2); }
.price-note { color: var(--text-2); font-size: 15px; margin: 4px 0 0; }

/* FAQ */
.faq { max-width: 800px; margin: 0 auto; }
.faq__title { text-align: center; font-size: 24px; font-weight: 700; margin: 0 0 24px; }
.faq__item {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
  overflow: hidden;
}
.faq__question {
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  padding: 20px 22px;
  font-size: 17px;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.faq__icon {
  position: relative;
  width: 18px; height: 18px;
  flex-shrink: 0;
}
.faq__icon::before, .faq__icon::after {
  content: "";
  position: absolute;
  background: var(--accent);
  border-radius: 2px;
  transition: transform .25s;
}
.faq__icon::before { top: 8px; left: 0; width: 18px; height: 2px; }       /* горизонталь */
.faq__icon::after  { left: 8px; top: 0; width: 2px; height: 18px; }       /* вертикаль */
.faq__question[aria-expanded="true"] .faq__icon::after { transform: scaleY(0); }

.faq__answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height .3s ease;
}
.faq__answer p { margin: 0; padding: 0 22px 20px; color: var(--text-2); }

/* ============================================================
   ФИНАЛ / КОНТАКТЫ
   ============================================================ */
.final__inner {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 48px;
  align-items: center;
}
.final__text { font-size: 19px; color: var(--text-2); margin: 0 0 28px; }

.final__perks {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 28px 0;
}
.final__perks li {
  background: var(--bg-soft);
  color: var(--blue);
  border-radius: 999px;
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 600;
}
.contacts-list li { color: var(--text-2); margin-bottom: 8px; font-weight: 500; }
.contacts-list a { color: var(--blue); font-weight: 600; }

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  background: var(--text);
  color: rgba(255, 255, 255, .8);
  padding: 40px 0;
}
.footer__inner p { margin: 0 0 6px; }
.footer__inner a { color: #fff; font-weight: 600; }
.footer__small { font-size: 13px; opacity: .6; margin-top: 12px; }

/* ============================================================
   АДАПТИВНОСТЬ
   ============================================================ */
@media (max-width: 980px) {
  .hero__inner,
  .process__grid,
  .pricing__grid,
  .final__inner {
    grid-template-columns: 1fr;
  }
  .cards--3 { grid-template-columns: repeat(2, 1fr); }

  .hero__media { order: -1; max-width: 360px; margin: 0 auto; }
  .photo-placeholder--final { max-width: 360px; margin: 0 auto; }

  /* Мобильное меню */
  .nav {
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    background: #fff;
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow);
    padding: 8px 0;
    transform: translateY(-12px);
    opacity: 0;
    visibility: hidden;
    transition: opacity .2s, transform .2s, visibility .2s;
  }
  .nav.is-open { opacity: 1; visibility: visible; transform: translateY(0); }
  .nav__link { padding: 14px 24px; font-size: 16px; border-bottom: 1px solid var(--border); }
  .nav__link:last-child { border-bottom: none; }

  .header__cta { display: none; }   /* CTA в шапке скрываем, есть в hero */
  .burger { display: flex; }

  /* Шаги — в вертикальный список */
  .steps { flex-direction: column; align-items: stretch; }
  .step { justify-content: flex-start; }
}

@media (max-width: 620px) {
  .section { padding: 60px 0; }
  .container { padding: 0 18px; }
  .cards--3 { grid-template-columns: 1fr; }
  .reviews { grid-template-columns: 1fr; }
  .card { padding: 22px; }
  .hero__subtitle, .section__subtitle, .process__text, .final__text { font-size: 17px; }
  .btn--lg { width: 100%; }   /* крупные кнопки на всю ширину */
  .hero__actions { flex-direction: column; }
}

/* На узких экранах оставляем в логотипе только имя — роль скрываем */
@media (max-width: 560px) {
  .logo__role { display: none; }
}

@media (max-width: 380px) {
  .container { padding: 0 14px; }
  .logo { font-size: 18px; }
}
