/* POLIQ — главная страница: hero на весь экран, курс уроков, путь ученика, возможности.
   Общие компоненты (кнопки, демо, сценарии, Франк, FAQ) — в site.css; здесь только то, что есть на главной. */

.site-container.wide,
.page-home .site-header .site-container,
.page-home .site-footer .site-container { max-width: 1360px; } /* шапка и подвал — вровень с контентом главной */

/* ── 1. Hero ───────────────────────────────────────────────────────────── */
.hx {
  position: relative;
  display: flex;
  align-items: center;
  min-height: calc(100svh - var(--header-h));
  padding: clamp(40px, 6vw, 72px) 0;
  overflow: hidden;
  isolation: isolate;
}
.hx-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(600px 420px at 82% 18%, color-mix(in srgb, var(--red) 16%, transparent), transparent 70%),
    radial-gradient(520px 380px at 8% 92%, color-mix(in srgb, var(--red) 9%, transparent), transparent 70%),
    var(--bg);
}
.hx-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(color-mix(in srgb, var(--text) 13%, transparent) 1px, transparent 1.2px);
  background-size: 24px 24px;
  -webkit-mask-image: radial-gradient(ellipse 75% 70% at 60% 45%, #000 20%, transparent 75%);
  mask-image: radial-gradient(ellipse 75% 70% at 60% 45%, #000 20%, transparent 75%);
}
.hx-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: clamp(40px, 6vw, 88px);
  align-items: center;
}
.hx-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 14px 6px 6px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface) 85%, transparent);
  backdrop-filter: blur(8px);
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  box-shadow: var(--shadow);
  transition: border-color 0.15s, transform 0.15s;
}
.hx-badge:hover { border-color: var(--red); transform: translateY(-1px); }
.hx-badge-new {
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--red);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
}
.hx-badge i { color: var(--red); }
.hx h1 {
  margin-top: 26px;
  font-size: clamp(42px, 6.4vw, 92px);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -0.05em;
}
.hx-accent {
  background: linear-gradient(100deg, var(--red) 10%, color-mix(in srgb, var(--red) 55%, #f59e0b) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hx-lead {
  max-width: 34em;
  margin-top: 26px;
  font-size: clamp(17px, 1.4vw, 20px);
  line-height: 1.55;
  color: var(--muted);
}
.hx-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }
.hx-trust {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
  font-size: 14px;
  color: var(--muted);
}
.hx-trust li { display: inline-flex; align-items: center; gap: 7px; }
.hx-trust i { color: var(--red); font-size: 17px; }

.hx-visual { position: relative; padding: 56px 40px; }
.hx-demo { position: relative; z-index: 2; max-width: 520px; margin: 0 auto; }
.hx-demo .demo-card { box-shadow: 0 30px 80px rgba(16, 16, 20, 0.16); }

.hx-float {
  position: absolute;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: var(--shadow-lg);
  font-size: 14px;
  animation: hx-float 7s ease-in-out infinite;
}
.hx-float b { display: block; font-size: 15px; letter-spacing: -0.01em; }
.hx-float-kicker { display: block; font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--red); }
.hx-float-meta { display: block; font-size: 12px; color: var(--muted); }
.hx-float--lesson { top: 0; right: -4px; flex-direction: column; align-items: flex-start; gap: 4px; animation-delay: -2s; }
.hx-float--goal { bottom: 8px; left: -10px; animation-delay: -4s; }
.hx-float--word { bottom: 26px; right: -8px; animation-delay: -1s; }
.hx-dots { display: flex; gap: 4px; margin: 4px 0 2px; }
.hx-dots i { width: 12px; height: 12px; border-radius: 50%; border: 1.5px solid var(--border-strong); }
.hx-dots i.ok { background: var(--ok); border-color: var(--ok); }
.hx-dots i.cur { border-color: var(--red); box-shadow: 0 0 0 3px color-mix(in srgb, var(--red) 18%, transparent); }
.hx-ring {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: conic-gradient(var(--red) var(--p), var(--surface-2) 0);
}
.hx-ring b { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--surface); font-size: 12px; }
.hx-say { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: var(--red-soft); color: var(--red); font-size: 18px; }
@keyframes hx-float { 50% { transform: translateY(-10px); } }

/* ── 2. Цифры ──────────────────────────────────────────────────────────── */
.hx-stats { border-block: 1px solid var(--border); background: var(--bg-alt); }
.hx-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  margin: 0;
}
.hx-stats-grid div { padding: clamp(22px, 3vw, 36px) clamp(12px, 2vw, 28px); border-left: 1px solid var(--border); }
.hx-stats-grid div:first-child { border-left: 0; }
.hx-stats-grid dt {
  font-size: clamp(32px, 3.6vw, 52px);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
}
.hx-stats-grid dd { margin: 8px 0 0; font-size: 14px; color: var(--muted); }

/* ── 3. Курс ───────────────────────────────────────────────────────────── */
.course-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: clamp(24px, 3vw, 40px); align-items: start; }
.course-levels { display: grid; gap: 18px; }
.course-level {
  padding: clamp(20px, 2.4vw, 28px);
  border: 1px solid var(--border);
  border-radius: 24px;
  background: var(--surface);
  box-shadow: var(--shadow);
}
.course-level-head { display: flex; align-items: center; gap: 16px; margin-bottom: 18px; }
.course-level-code {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: var(--red);
  color: #fff;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.course-level:nth-child(2) .course-level-code { background: var(--text); color: var(--bg); }
.course-level-head h3 { font-size: 22px; }
.course-level-head p { margin-top: 2px; font-size: 14px; color: var(--muted); }
.course-units { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.course-units li {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 12px;
  border-radius: 999px;
  background: var(--surface-2);
  font-size: 14px;
  font-weight: 500;
}
.course-units small {
  display: grid;
  place-items: center;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}
.course-next { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); }

.course-inside { display: grid; gap: 18px; position: sticky; top: calc(var(--header-h) + 20px); }
.lesson-mock {
  margin: 0;
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: 24px;
  background: var(--surface);
  box-shadow: var(--shadow-lg);
}
.lesson-mock-top { display: grid; gap: 4px; padding-bottom: 14px; border-bottom: 1px solid var(--border); }
.lesson-mock-unit { font-size: 12px; color: var(--muted); }
.lesson-mock-top b { font-size: 18px; }
.lesson-mock-bar { display: grid; grid-template-columns: repeat(10, 1fr); gap: 4px; margin-top: 8px; }
.lesson-mock-bar i { height: 5px; border-radius: 99px; background: var(--surface-2); }
.lesson-mock-bar i.ok { background: var(--ok); }
.lesson-mock-bar i.cur { background: var(--red); }
.lesson-mock-title { margin: 16px 0 10px; font-size: 20px; font-weight: 800; letter-spacing: -0.02em; }
.lesson-mock-chat { display: grid; gap: 10px; }
.bubble { max-width: 86%; padding: 10px 14px; border-radius: 16px; background: var(--surface-2); }
.bubble.right { justify-self: end; background: var(--red-soft); }
.bubble-who { display: block; font-size: 11px; font-weight: 700; color: var(--muted); }
.bubble-pl { display: block; font-weight: 700; }
.bubble-pl i { color: var(--red); font-size: 14px; vertical-align: -2px; }
.bubble-ru { display: block; font-size: 13px; color: var(--muted); }
.inside-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 0; padding: 0; list-style: none; }
.inside-list li { display: flex; gap: 12px; padding: 14px; border: 1px solid var(--border); border-radius: 16px; background: var(--surface); }
.inside-list i { flex: 0 0 auto; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; background: var(--red-soft); color: var(--red); font-size: 19px; }
.inside-list b { display: block; font-size: 15px; }
.inside-list span { display: block; font-size: 13px; line-height: 1.4; color: var(--muted); }

/* ── 4. Путь ученика ───────────────────────────────────────────────────── */
.path {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(16px, 2vw, 28px);
  margin: 0;
  padding: 0;
  list-style: none;
}
.path::before {
  content: "";
  position: absolute;
  top: 31px;
  left: 6%;
  right: 6%;
  height: 2px;
  background: repeating-linear-gradient(90deg, var(--border-strong) 0 8px, transparent 8px 16px);
}
.path li { position: relative; padding: 0 4px; }
.path-icon {
  position: relative;
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  margin-bottom: 20px;
  border-radius: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  color: var(--red);
  font-size: 28px;
}
.path li:nth-child(1) .path-icon { background: var(--red); color: #fff; border-color: var(--red); }
.path h3 { font-size: 22px; margin-bottom: 8px; }
.path p { color: var(--muted); }

/* ── 5. Возможности ────────────────────────────────────────────────────── */
.fx { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.fx-card {
  position: relative;
  padding: 26px;
  border: 1px solid var(--border);
  border-radius: 24px;
  background: var(--surface);
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}
.fx-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--border-strong); }
.fx-wide { grid-column: span 2; }
.fx-hero { grid-row: span 2; background: linear-gradient(160deg, var(--red-soft), var(--surface) 55%); }
.fx-icon { display: grid; place-items: center; width: 46px; height: 46px; margin-bottom: 18px; border-radius: 14px; background: var(--red-soft); color: var(--red); font-size: 22px; }
.fx-hero .fx-icon { background: var(--red); color: #fff; }
.fx-card h3 { font-size: 20px; margin-bottom: 8px; }
.fx-hero h3 { font-size: clamp(24px, 2.4vw, 32px); }
.fx-card p { color: var(--muted); font-size: 15px; }
.fx-sample { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.fx-rail { display: flex; gap: 6px; margin-top: 22px; overflow: hidden; -webkit-mask-image: linear-gradient(90deg, #000 70%, transparent); mask-image: linear-gradient(90deg, #000 70%, transparent); }
.fx-rail i {
  flex: 0 0 26px;
  display: grid;
  place-items: center;
  height: 26px;
  border-radius: 50%;
  border: 1.5px solid var(--border-strong);
  background: var(--surface);
  color: var(--muted);
  font-size: 10px;
  font-style: normal;
  font-weight: 700;
}
.fx-rail i.ok { background: var(--ok); border-color: var(--ok); color: #fff; }
.fx-rail i.err { background: repeating-linear-gradient(135deg, var(--red) 0 3px, color-mix(in srgb, var(--red) 70%, #fff) 3px 6px); border-color: var(--red); color: #fff; }
.fx-rail i.cur { border-color: var(--red); color: var(--red); transform: scale(1.15); box-shadow: 0 0 0 4px color-mix(in srgb, var(--red) 16%, transparent); }

/* ── CTA ───────────────────────────────────────────────────────────────── */
.hx-cta {
  position: relative;
  padding: clamp(64px, 9vw, 120px) 0;
  overflow: hidden;
  background:
    radial-gradient(500px 300px at 85% 10%, rgba(255, 255, 255, 0.18), transparent 70%),
    linear-gradient(120deg, #9b0c24, var(--red) 60%, #e0344f);
  color: #fff;
}
.hx-cta-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 28px; }
.hx-cta h2 { font-size: clamp(32px, 4.4vw, 56px); font-weight: 800; letter-spacing: -0.045em; }
.hx-cta p { max-width: 36em; margin-top: 12px; font-size: 18px; opacity: 0.9; }

/* ── адаптив ───────────────────────────────────────────────────────────── */
@media (max-width: 1100px) {
  .hx { min-height: 0; }
  .hx-grid { grid-template-columns: 1fr; }
  .hx-visual { max-width: 620px; margin: 0 auto; width: 100%; }
  .course-grid { grid-template-columns: 1fr; }
  .course-inside { position: static; }
  .fx { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fx-hero { grid-row: auto; }
}
@media (max-width: 760px) {
  .hx-visual { padding: 0; }
  .hx-float--word, .hx-float--goal { display: none; }
  .hx-float--lesson { position: relative; top: auto; right: auto; margin: 14px auto 0; width: fit-content; animation: none; }
  .hx-stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hx-stats-grid div { border-left: 0; border-top: 1px solid var(--border); }
  .hx-stats-grid div:nth-child(-n+2) { border-top: 0; }
  .hx-stats-grid div:nth-child(even) { border-left: 1px solid var(--border); }
  .path { grid-template-columns: 1fr; gap: 22px; }
  .path::before { top: 32px; bottom: 32px; left: 31px; right: auto; width: 2px; height: auto;
    background: repeating-linear-gradient(180deg, var(--border-strong) 0 8px, transparent 8px 16px); }
  .path li { display: grid; grid-template-columns: 64px 1fr; column-gap: 18px; }
  .path-icon { grid-row: span 2; margin: 0; }
  .fx { grid-template-columns: 1fr; }
  .fx-wide { grid-column: auto; }
  .inside-list { grid-template-columns: 1fr; }
  .hx-actions .site-btn { width: 100%; justify-content: center; }
  .hx-cta-inner { flex-direction: column; align-items: stretch; }
  .hx-cta-actions .site-btn { width: 100%; justify-content: center; }
}
@media (prefers-reduced-motion: reduce) {
  .hx-float { animation: none; }
  .fx-card, .hx-badge { transition: none; }
}
@media (prefers-color-scheme: dark) {
  .hx-demo .demo-card { box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5); }
}
