/* =========================================================
   Главная страница сайта (лендинг).
   Шапка и подвал наследуются из общего шаблона index.html,
   поэтому здесь описаны только стили содержимого страницы.
   ========================================================= */

:root {
  --bg: #f4f5f7;
  --surface: #ffffff;
  --text: #16181d;
  --muted: #68707d;
  --line: #e5e7eb;
  --blue: #2563eb;
  --blue-dark: #1d4ed8;
  --blue-soft: #eff6ff;
  --green: #16a34a;
  --shadow: 0 10px 30px rgba(20, 27, 45, .08);
  --radius: 18px;
  --lp-width: 1180px;
}

html { scroll-behavior: smooth; }

.landing {
  color: var(--text);
  background: var(--bg);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  line-height: 1.55;
}

.landing a { color: inherit; text-decoration: none; }
.landing img { display: block; max-width: 100%; }

.lp-container {
  width: min(calc(100% - 40px), var(--lp-width));
  margin: 0 auto;
}

.landing section { position: relative; }

/* чтобы якорные ссылки не уходили под прилипающую шапку */
.landing [id] { scroll-margin-top: 96px; }

/* =========================
   МАТЕМАТИЧЕСКИЙ ФОН (тёмная «доска»)
   Блоки с фоном на всю ширину: первый экран, «Ваш путь», «Направления».
   ========================= */
.math-bg {
  position: relative;
  overflow: hidden;
  color: #e8edf5;
  background-color: #0b1017;
  background-image:
    linear-gradient(rgba(8, 12, 19, .72), rgba(8, 12, 19, .72)),
    url("../img/main_page/math-pattern-dark.jpg");
  background-size: auto, cover;
  background-repeat: repeat, no-repeat;
  background-position: center, center;
}

.math-bg::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: .05;
  background-image:
    linear-gradient(rgba(255,255,255,.55) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.55) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: linear-gradient(to bottom, black, transparent 95%);
  -webkit-mask-image: linear-gradient(to bottom, black, transparent 95%);
}

/* текст на тёмном фоне блоков с картинкой */
.math-bg h1,
.math-bg h2 { color: #fff; }

.math-bg .section-kicker { color: #7ea6ff; }

.math-bg .section-heading p,
.math-bg .journey-copy p,
.math-bg .hero-text { color: #c6cfdd; }

.math-bg .track-number { color: #93a1b5; }

.formula {
  position: absolute;
  color: #cfe0ff;
  font-family: Georgia, "Times New Roman", serif;
  font-style: italic;
  opacity: .12;
  pointer-events: none;
  user-select: none;
  white-space: nowrap;
}

.f1 { top: 90px; left: 4%; font-size: 31px; transform: rotate(-8deg); }
.f2 { top: 180px; right: 5%; font-size: 28px; transform: rotate(7deg); }
.f3 { top: 430px; left: 7%; font-size: 25px; transform: rotate(5deg); }
.f4 { top: 520px; right: 9%; font-size: 35px; transform: rotate(-6deg); }
.f5 { top: 800px; left: 2%; font-size: 29px; transform: rotate(-4deg); }
.f6 { top: 850px; right: 3%; font-size: 27px; transform: rotate(4deg); }

/* =========================
   HERO
   ========================= */
.hero {
  min-height: 690px;
  display: flex;
  align-items: center;
  padding: 76px 0 90px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: 60px;
  align-items: center;
  position: relative;
  z-index: 1;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border: 1px solid #2f4257;
  border-radius: 999px;
  background: rgba(12, 19, 30, .62);
  color: #cfe0ff;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 20px;
}

.eyebrow-dot {
  width: 7px;
  height: 7px;
  background: #4ade80;
  border-radius: 50%;
}

.landing h1 {
  margin: 0 0 22px;
  max-width: 720px;
  font-size: clamp(42px, 5vw, 70px);
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: -2.5px;
}

.accent { color: #8ab4ff; }

.hero-text {
  max-width: 610px;
  margin: 0 0 30px;
  color: #c6cfdd;
  font-size: 18px;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 30px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 20px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 700;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(37,99,235,.15);
}

.btn-primary {
  background: var(--blue);
  color: #fff;
}

.btn-primary:hover { background: var(--blue-dark); }

.btn-secondary {
  background: rgba(23, 32, 46, .72);
  border-color: rgba(255,255,255,.22);
  color: #eef4ff;
}

.btn-secondary:hover {
  background: rgba(30, 41, 59, .92);
}

.hero-note {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  color: #aeb9c9;
  font-size: 13px;
}

.hero-note span::before {
  content: "✓";
  color: #4ade80;
  font-weight: 800;
  margin-right: 6px;
}

/* HERO IMAGE COLLAGE */
.hero-visual {
  position: relative;
  min-height: 510px;
}

.hero-card {
  position: absolute;
  overflow: hidden;
  border: 7px solid rgba(255,255,255,.92);
  box-shadow: 0 25px 60px rgba(28,39,57,.17);
  background: #ddd;
}

.hero-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-main {
  width: 72%;
  height: 390px;
  right: 3%;
  top: 34px;
  border-radius: 28px;
  transform: rotate(2deg);
}

.hero-small {
  width: 43%;
  height: 235px;
  left: 1%;
  bottom: 24px;
  border-radius: 23px;
  transform: rotate(-5deg);
}

.floating-badge {
  position: absolute;
  right: 0;
  top: 5px;
  background: #fff;
  color: var(--text);
  border: 1px solid #e6e9ee;
  box-shadow: var(--shadow);
  border-radius: 14px;
  padding: 13px 15px;
  font-size: 13px;
  z-index: 3;
}

.floating-badge strong {
  display: block;
  font-size: 15px;
  margin-bottom: 2px;
}

.floating-badge span { color: var(--muted); }

/* =========================
   БЛОК С МАРКЕТИНГОВЫМ ОБЕЩАНИЕМ
   ========================= */
.section {
  padding: 100px 0;
}

.section-white { background: #fff; }

.section-heading {
  max-width: 750px;
  margin-bottom: 46px;
}

.section-kicker {
  color: var(--blue);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.landing h2 {
  margin: 0 0 15px;
  font-size: clamp(31px, 4vw, 48px);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -1.5px;
}

.section-heading p {
  margin: 0;
  color: var(--muted);
  font-size: 17px;
}

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

.benefit {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: 0 5px 20px rgba(20,27,45,.04);
}

.benefit-icon {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 22px;
  margin-bottom: 20px;
}

.benefit h3 {
  margin: 0 0 9px;
  font-size: 18px;
  font-weight: 700;
}

.benefit p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

/* =========================
   ПУТЬ УЧЕНИКА / ЛЮДИ
   ========================= */
.journey {
  padding: 105px 0;
}

.journey-grid {
  display: grid;
  grid-template-columns: .85fr 1.15fr;
  gap: 70px;
  align-items: center;
}

.journey-copy p {
  color: var(--muted);
  font-size: 17px;
  line-height: 1.75;
}

.journey-quote {
  margin-top: 25px;
  padding: 18px 20px;
  border-left: 3px solid #60a5fa;
  background: rgba(255,255,255,.08);
  border-radius: 0 12px 12px 0;
  color: #eaf0fa;
  font-weight: 700;
}

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

.person-card {
  min-height: 300px;
  position: relative;
  overflow: hidden;
  border-radius: 20px;
  background: #ddd;
  box-shadow: var(--shadow);
}

.person-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.person-label {
  position: absolute;
  left: 14px;
  bottom: 14px;
  right: 14px;
  padding: 13px 15px;
  background: rgba(255,255,255,.93);
  color: var(--text);
  border-radius: 12px;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.person-label strong {
  display: block;
  font-size: 14px;
}

.person-label span {
  color: var(--muted);
  font-size: 12px;
}

/* =========================
   МЕНТОР
   ========================= */
.mentor-wrap {
  background: #111827;
  color: #fff;
  border-radius: 28px;
  padding: 62px;
  overflow: hidden;
  position: relative;
}

.mentor-wrap::after {
  content: "{ }  =>  01 10 01  ∑  f(x)";
  position: absolute;
  right: -10px;
  bottom: 15px;
  font-family: monospace;
  font-size: 44px;
  color: rgba(255,255,255,.045);
  transform: rotate(-8deg);
}

.mentor-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
  position: relative;
  z-index: 1;
}

.mentor-copy h2 { color: #fff; }
.mentor-copy p {
  color: #c4cad4;
  font-size: 16px;
}

.mentor-list {
  margin: 25px 0 0;
  padding: 0;
  list-style: none;
}

.mentor-list li {
  display: flex;
  gap: 12px;
  margin: 14px 0;
  color: #e7eaf0;
  font-size: 14px;
}

.check {
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(37,99,235,.22);
  color: #75a2ff;
  font-size: 12px;
  font-weight: 800;
}

.mentor-chat {
  background: #f8fafc;
  color: var(--text);
  border-radius: 20px;
  padding: 20px;
  box-shadow: 0 20px 40px rgba(0,0,0,.16);
}

.chat-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 15px;
  border-bottom: 1px solid #e7eaf0;
  font-size: 13px;
  font-weight: 700;
}

.avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #dbeafe;
  display: grid;
  place-items: center;
}

.message {
  margin: 16px 0 0;
  padding: 13px 15px;
  border-radius: 13px;
  background: #eef2f7;
  color: #4b5563;
  font-size: 13px;
  line-height: 1.55;
}

.message.me {
  background: #dbeafe;
  margin-left: 35px;
  color: #23426e;
}

/* =========================
   КУРСЫ / НАПРАВЛЕНИЯ
   ========================= */
.tracks {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 15px;
}

.track {
  background: #fff;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 23px;
  min-height: 190px;
  transition: transform .2s ease, box-shadow .2s ease;
}

.track:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow);
}

.track-number {
  color: #9aa2ad;
  font-family: monospace;
  font-size: 12px;
}

.track h3 {
  margin: 28px 0 8px;
  font-size: 17px;
  font-weight: 700;
}

.track p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

/* =========================
   CTA
   ========================= */
.cta-section {
  padding: 95px 0;
  background: #fff;
}

.cta {
  position: relative;
  overflow: hidden;
  text-align: center;
  padding: 75px 30px;
  border-radius: 28px;
  background:
    radial-gradient(circle at 20% 10%, rgba(96,165,250,.18), transparent 28%),
    radial-gradient(circle at 80% 80%, rgba(52,211,153,.13), transparent 25%),
    #eef5ff;
  border: 1px solid #d9e7ff;
}

.cta::before {
  position: absolute;
  left: 0;
  right: 0;
  top: 20px;
  text-align: center;
  color: #1e40af;
  opacity: .055;
  font-family: Georgia, serif;
  font-size: 28px;
  white-space: nowrap;
  transform: rotate(-2deg);
}

.cta h2 {
  max-width: 720px;
  margin: 0 auto 16px;
  position: relative;
}

.cta p {
  max-width: 610px;
  margin: 0 auto 28px;
  color: #5d6877;
  position: relative;
}

/* =========================
   АДАПТИВ
   ========================= */
@media (max-width: 980px) {
  .hero-grid,
  .journey-grid,
  .mentor-grid { grid-template-columns: 1fr; }

  .hero-visual {
    min-height: 480px;
    max-width: 650px;
    width: 100%;
    margin: 0 auto;
  }

  .benefits { grid-template-columns: 1fr; }
  .tracks { grid-template-columns: repeat(2, 1fr); }

  .mentor-wrap { padding: 42px 30px; }
}

@media (max-width: 650px) {
  .lp-container { width: min(calc(100% - 28px), var(--lp-width)); }

  .hero {
    padding: 55px 0 70px;
    min-height: auto;
  }

  .landing h1 { letter-spacing: -1.5px; }
  .hero-text { font-size: 16px; }
  .hero-visual { min-height: 390px; }
  .hero-main { height: 300px; }
  .hero-small { height: 180px; width: 47%; }
  .floating-badge { font-size: 11px; }

  .section,
  .journey,
  .cta-section { padding: 70px 0; }

  .people-grid { gap: 10px; }
  .person-card { min-height: 210px; }

  .mentor-wrap { padding: 30px 20px; border-radius: 20px; }
  .tracks { grid-template-columns: 1fr; }

  .formula { display: none; }
}
