/* InclusiveAI — Course page (course.html)
   Builds on main.css + home.css tokens. Video-first hero with a stack of
   real VK lesson thumbnails, module overview, full lesson grid, how-it-works. */

/* ══════════════════ COURSE HERO ══════════════════ */
.chero {
  position: relative;
  padding: 168px 0 84px;
  overflow: hidden;
}
.chero-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 56px;
  align-items: center;
}
.chero-title {
  font-family: var(--display);
  font-size: clamp(34px, 4.4vw, 56px);
  font-weight: 800;
  line-height: 1.06;
  letter-spacing: -0.03em;
  color: var(--ink);
  margin: 0 0 22px;
  text-wrap: balance;
}
.chero-title span { display: block; }
.chero-title .accent { color: var(--accent); }
.chero-sub {
  font-family: var(--reading);
  font-size: 1.0938rem;
  line-height: 1.7;
  color: var(--muted);
  max-width: 54ch;
  margin-bottom: 30px;
  text-wrap: pretty;
}

/* Course spec — a definition list, read as "24 lessons, 4 modules, 112
   minutes, free". Facts a learner needs, not a metrics showcase. */
.chero-spec {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 34px;
  margin-top: 38px;
  padding-top: 24px;
  border-top: 1.5px solid var(--line);
}
.chero-spec > div {
  display: flex;
  flex-direction: column-reverse;  /* value above label, order stays dt→dd for AT */
  gap: 2px;
}
.chero-spec dt {
  font-size: 0.7812rem;
  font-weight: 600;
  color: var(--muted-2);
}
.chero-spec dd {
  font-family: var(--display);
  font-size: 1.625rem;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: var(--ink);
}

/* ── stacked real thumbnails ── */
.chero-media { position: relative; }
.chero-stack {
  position: relative;
  aspect-ratio: 16 / 11;
}
.chero-stack img { border-radius: var(--r-md); }
.chero-stack-back,
.chero-stack-mid {
  position: absolute;
  width: 62%;
  height: auto;
  border: 2px solid var(--ink);
  box-shadow: 0 18px 50px rgba(22, 21, 28, 0.18);
}
.chero-stack-back { top: 0; right: 0; transform: rotate(4deg); opacity: 0.85; }
.chero-stack-mid  { top: 18%; left: 0; transform: rotate(-5deg); opacity: 0.92; }
.chero-stack-front {
  position: absolute;
  left: 12%; right: 12%;
  bottom: 0;
  display: block;
  padding: 0;
  border: 2px solid var(--ink);
  border-radius: var(--r-md);
  background: none;
  cursor: pointer;
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(22, 21, 28, 0.3);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.chero-stack-front:hover {
  transform: translateY(-5px) scale(1.015);
  box-shadow: 0 40px 100px rgba(90, 71, 214, 0.35);
}
.chero-stack-front img { display: block; width: 100%; height: auto; border-radius: 0; }
.chero-play {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 64px; height: 64px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 1.5px solid rgba(255, 255, 255, 0.95);
  display: flex; align-items: center; justify-content: center;
  color: var(--accent);
  transition: transform 0.3s var(--ease), background 0.3s var(--ease), color 0.3s var(--ease);
  animation: vk-pulse 2.4s ease-out infinite;
}
.chero-play svg { margin-left: 3px; }
.chero-stack-front:hover .chero-play {
  transform: translate(-50%, -50%) scale(1.1);
  background: var(--accent);
  color: #fff;
}
.chero-stack-tag {
  position: absolute;
  left: 12px; bottom: 12px;
  font-size: 0.75rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: #fff;
  background: rgba(10, 8, 24, 0.78);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  padding: 5px 12px;
  border-radius: 8px;
}
.chero-penguin {
  position: absolute;
  right: -14px; bottom: -30px;
  width: 110px;
  transform: rotate(8deg);
  filter: drop-shadow(0 12px 24px rgba(22, 21, 28, 0.2));
  z-index: 2;
}

/* ══════════════════ MODULE OVERVIEW ══════════════════ */
.cmodules { padding: 30px 0 80px; }
.cmodules-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.cmodule {
  position: relative;
  background: var(--surface);
  border: 2px solid var(--ink);
  border-radius: var(--r-lg);
  padding: 26px 24px 24px;
  overflow: hidden;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.cmodule:hover {
  transform: translateY(-5px);
  box-shadow: 0 18px 50px rgba(22, 21, 28, 0.12);
}
.cmodule::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 6px;
  background: var(--block-accent, var(--accent));
}
.cmodule-n {
  font-family: var(--display);
  font-size: 0.8125rem;
  font-weight: 800;
  color: var(--block-accent, var(--accent));
  letter-spacing: 0.08em;
}
.cmodule h2 {
  font-family: var(--display);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.015em;
  margin: 10px 0 10px;
}
.cmodule p {
  font-family: var(--reading);
  font-size: 0.875rem;
  line-height: 1.65;
  color: var(--muted);
}

/* ══════════════════ LESSONS (extends .vk-course) ══════════════════ */
.clessons { border-radius: var(--r-xl) var(--r-xl) 0 0; }

/* ══════════════════ HOW IT WORKS ══════════════════ */
.chow { padding: 96px 0; background: var(--surface); }
.chow-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.chow-step {
  background: var(--surface-2);
  border: 1.5px solid var(--line-2);
  border-radius: var(--r-lg);
  padding: 30px 28px;
  transition: transform 0.3s var(--ease), border-color 0.3s var(--ease);
}
.chow-step:hover { transform: translateY(-4px); border-color: var(--accent-light); }
.chow-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-family: var(--display);
  font-size: 1.125rem;
  font-weight: 800;
  margin-bottom: 18px;
}
.chow-step h3 {
  font-family: var(--display);
  font-size: 1.1875rem;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.015em;
  margin-bottom: 10px;
}
.chow-step p {
  font-family: var(--reading);
  font-size: 0.9375rem;
  line-height: 1.7;
  color: var(--muted);
}

/* ══════════════════ RESPONSIVE ══════════════════ */
/* iPad / tablet */
@media (max-width: 1024px) {
  .chero { padding: 140px 0 64px; }
  .chero-layout { gap: 36px; }
  .cmodules-grid { grid-template-columns: repeat(2, 1fr); }
  .chero-penguin { width: 88px; right: -6px; }
}

@media (max-width: 860px) {
  .chero-layout { grid-template-columns: 1fr; }
  .chero-media { max-width: 480px; margin: 8px auto 0; width: 100%; }
  .chero-sub { max-width: 560px; }
}

/* mobile */
@media (max-width: 600px) {
  .chero { padding: 120px 0 48px; }
  .chero-title { font-size: clamp(30px, 9vw, 38px); }
  .chero-sub { font-size: 1rem; }
  /* The spec row is a wrapping flex line, so "Бесплатно" — the widest value
     by far — pushed itself onto its own row and read as a fifth, louder fact
     instead of one of four. A 2x2 grid gives all four equal footing.
     (The old rule here targeted `.chero-stats`, a class that does not exist
     on this page, so it had never applied to anything.) */
  .chero-spec {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px 20px;
  }
  .chero-spec dd { font-size: 1.375rem; }
  .cmodules { padding: 16px 0 56px; }
  .cmodules-grid { grid-template-columns: 1fr; }
  .chow { padding: 64px 0; }
  .chow-grid { grid-template-columns: 1fr; }
  .chero-penguin { width: 70px; bottom: -18px; }
  .hero-actions .btn { width: 100%; justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  .chero-play { animation: none; }
  .chero-stack-front,
  .cmodule,
  .chow-step { transition: none; }
}
