/* ============================================================
   КУЗНИЦА — онлайн-школа программирования и дизайна
   Общие стили для всех страниц
   ============================================================ */

:root {
  --bg: #12101f;
  --bg-2: #1a1730;
  --surface: #211d3a;
  --surface-2: #2a2549;
  --line: rgba(255, 255, 255, 0.1);
  --line-2: rgba(255, 255, 255, 0.18);
  --text: #f4f2ff;
  --muted: #aaa5cc;
  --ink: #12101f;

  --violet: #6c4cff;
  --violet-dark: #4530b8;
  --lemon: #e8ff47;
  --lemon-dark: #a3b41f;
  --pink: #ff5ca8;
  --pink-dark: #c33b7b;
  --mint: #5ff2c4;
  --mint-dark: #2fb08a;
  --orange: #ff9f43;
  --sky: #5bc0ff;

  --font-head: "Unbounded", "Rubik", "Arial Black", sans-serif;
  --font-text: "Onest", "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", "Fira Code", Consolas, monospace;

  --r-sm: 12px;
  --r-md: 20px;
  --r-lg: 28px;
  --r-xl: 36px;

  --container: 1240px;
  --gutter: clamp(16px, 4vw, 40px);

  --shadow-soft: 0 30px 60px -30px rgba(0, 0, 0, 0.7);
  --shadow-violet: 0 40px 80px -30px rgba(108, 76, 255, 0.5);
  --ease-out: cubic-bezier(0.2, 0.7, 0.2, 1);
}

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

html {
  overflow-x: clip;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: 90px;
}

body {
  margin: 0;
  overflow-x: clip;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-text);
  font-size: clamp(15px, 0.35vw + 14px, 17px);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

body.menu-open {
  overflow: hidden;
}

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

a {
  color: inherit;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  border: 0;
  background: none;
  padding: 0;
}

:focus-visible {
  outline: 3px solid var(--lemon);
  outline-offset: 3px;
  border-radius: 6px;
}

::selection {
  background: var(--lemon);
  color: var(--ink);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- Типографика ---------- */

h1, h2, h3, h4,
.h1, .h2, .h3, .h4 {
  font-family: var(--font-head);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.01em;
  margin: 0;
  text-wrap: balance;
}

.h1 { font-size: clamp(2.1rem, 5.2vw + 0.4rem, 4.4rem); font-weight: 900; }
.h2 { font-size: clamp(1.7rem, 3.2vw + 0.5rem, 3rem); }
.h3 { font-size: clamp(1.15rem, 1.2vw + 0.7rem, 1.5rem); }
.h4 { font-size: clamp(1rem, 0.5vw + 0.8rem, 1.15rem); }

p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

.lead {
  font-size: clamp(1.05rem, 0.6vw + 0.85rem, 1.3rem);
  color: var(--muted);
  max-width: 60ch;
}

.muted { color: var(--muted); }
.ink { color: var(--ink); }
.center { text-align: center; }
.nowrap { white-space: nowrap; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-head);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--lemon);
  margin-bottom: 16px;
}

.eyebrow::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 3px;
  background: currentColor;
  transform: rotate(45deg);
}

.eyebrow--pink { color: var(--pink); }
.eyebrow--mint { color: var(--mint); }
.eyebrow--ink { color: var(--ink); }

.hl {
  position: relative;
  display: inline-block;
  white-space: nowrap;
  color: var(--ink);
  padding: 0 0.18em;
  isolation: isolate;
}

.hl::before {
  content: "";
  position: absolute;
  inset: 0.05em -0.1em;
  background: var(--lemon);
  border-radius: 0.28em;
  transform: rotate(-1.5deg);
  z-index: -1;
}

.hl--pink::before { background: var(--pink); }
.hl--mint::before { background: var(--mint); }
.hl--violet { color: #fff; }
.hl--violet::before { background: var(--violet); }

/* ---------- Раскладка ---------- */

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section {
  padding-block: clamp(56px, 8vw, 120px);
  position: relative;
}

.section--tight {
  padding-block: clamp(36px, 5vw, 72px);
}

.section__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px 40px;
  flex-wrap: wrap;
  margin-bottom: clamp(28px, 4vw, 56px);
}

.section__head .lead { margin-top: 14px; }

.grid {
  display: grid;
  gap: clamp(16px, 2vw, 24px);
}

.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

@media (max-width: 1024px) {
  .grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
  .grid--4,
  .grid--3,
  .grid--2 { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- Кнопки ---------- */

.btn {
  --btn-bg: var(--surface-2);
  --btn-fg: #fff;
  --btn-shadow: rgba(0, 0, 0, 0.5);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6em;
  padding: 0.95em 1.6em;
  border-radius: 999px;
  border: 2px solid transparent;
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.92rem;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: 0 6px 0 var(--btn-shadow);
  transition: transform 0.2s var(--ease-out), box-shadow 0.2s var(--ease-out), background 0.2s, color 0.2s;
  -webkit-tap-highlight-color: transparent;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 0 var(--btn-shadow);
}

.btn:active {
  transform: translateY(3px);
  box-shadow: 0 2px 0 var(--btn-shadow);
}

.btn--primary {
  --btn-bg: var(--lemon);
  --btn-fg: var(--ink);
  --btn-shadow: var(--lemon-dark);
}

.btn--violet {
  --btn-bg: var(--violet);
  --btn-fg: #fff;
  --btn-shadow: var(--violet-dark);
}

.btn--pink {
  --btn-bg: var(--pink);
  --btn-fg: var(--ink);
  --btn-shadow: var(--pink-dark);
}

.btn--ink {
  --btn-bg: var(--ink);
  --btn-fg: #fff;
  --btn-shadow: #000;
}

.btn--ghost {
  --btn-bg: transparent;
  --btn-fg: #fff;
  --btn-shadow: transparent;
  border-color: var(--line-2);
  box-shadow: none;
}

.btn--ghost:hover {
  background: rgba(255, 255, 255, 0.06);
  box-shadow: none;
}

.btn--ghost:active { box-shadow: none; }

.btn--ghost-ink {
  --btn-bg: transparent;
  --btn-fg: var(--ink);
  --btn-shadow: transparent;
  border-color: rgba(18, 16, 31, 0.35);
  box-shadow: none;
}

.btn--ghost-ink:hover { background: rgba(18, 16, 31, 0.08); box-shadow: none; }

.btn--sm { padding: 0.7em 1.2em; font-size: 0.8rem; }
.btn--lg { padding: 1.1em 2em; font-size: 1rem; }
.btn--block { width: 100%; }

.btn__arrow {
  width: 1.1em;
  height: 1.1em;
  transition: transform 0.25s var(--ease-out);
}

.btn:hover .btn__arrow { transform: translateX(4px); }

.btn:disabled,
.btn[aria-disabled="true"] {
  opacity: 0.5;
  pointer-events: none;
}

/* ---------- Плитки, стикеры, паттерны ---------- */

.tile {
  position: relative;
  border-radius: var(--r-lg);
  padding: clamp(22px, 3vw, 36px);
  background: var(--surface);
  border: 1px solid var(--line);
  overflow: hidden;
  color: var(--text);
  box-shadow: var(--shadow-soft), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.tile--violet { background: var(--violet); color: #fff; border-color: transparent; }
.tile--lemon { background: var(--lemon); color: var(--ink); border-color: transparent; }
.tile--pink { background: var(--pink); color: var(--ink); border-color: transparent; }
.tile--mint { background: var(--mint); color: var(--ink); border-color: transparent; }
.tile--orange { background: var(--orange); color: var(--ink); border-color: transparent; }
.tile--sky { background: var(--sky); color: var(--ink); border-color: transparent; }

.tile--lemon .muted,
.tile--pink .muted,
.tile--mint .muted,
.tile--orange .muted,
.tile--sky .muted { color: rgba(18, 16, 31, 0.65); }

.tile--violet .muted { color: rgba(255, 255, 255, 0.75); }

.tile--hover {
  transition: transform 0.35s var(--ease-out), box-shadow 0.35s var(--ease-out);
}

.tile--hover:hover {
  transform: translateY(-6px);
  box-shadow: 0 40px 60px -30px rgba(0, 0, 0, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.sticker {
  display: inline-block;
  padding: 0.55em 0.95em;
  border-radius: 12px;
  background: var(--lemon);
  color: var(--ink);
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.82rem;
  line-height: 1.1;
  white-space: nowrap;
  transform: rotate(-3deg);
  box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.35);
}

.sticker--pink { background: var(--pink); }
.sticker--mint { background: var(--mint); }
.sticker--violet { background: var(--violet); color: #fff; }
.sticker--white { background: #fff; }
.sticker--r { transform: rotate(3deg); }
.sticker--flat { transform: none; }

.pat-dots {
  background-image: radial-gradient(rgba(255, 255, 255, 0.16) 1.2px, transparent 1.4px);
  background-size: 18px 18px;
}

.pat-dots-ink {
  background-image: radial-gradient(rgba(18, 16, 31, 0.22) 1.4px, transparent 1.6px);
  background-size: 16px 16px;
}

.pat-stripes {
  background-image: repeating-linear-gradient(-45deg, rgba(18, 16, 31, 0.12) 0 10px, transparent 10px 22px);
}

.pat-stripes-light {
  background-image: repeating-linear-gradient(-45deg, rgba(255, 255, 255, 0.08) 0 10px, transparent 10px 22px);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0.35em 0.8em;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border: 1px solid var(--line);
  white-space: nowrap;
}

.badge--lemon { background: var(--lemon); color: var(--ink); border-color: transparent; }
.badge--pink { background: var(--pink); color: var(--ink); border-color: transparent; }
.badge--mint { background: var(--mint); color: var(--ink); border-color: transparent; }
.badge--violet { background: var(--violet); color: #fff; border-color: transparent; }
.badge--ink { background: var(--ink); color: #fff; border-color: transparent; }
.badge--outline-ink { background: transparent; color: var(--ink); border-color: rgba(18, 16, 31, 0.35); }

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  display: inline-flex;
  align-items: center;
  padding: 0.45em 0.9em;
  border-radius: 999px;
  border: 1px solid var(--line-2);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text);
  background: rgba(255, 255, 255, 0.03);
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.chip:hover { background: rgba(255, 255, 255, 0.08); }

.chip[aria-pressed="true"],
.chip.is-active {
  background: var(--lemon);
  color: var(--ink);
  border-color: var(--lemon);
}

.chip--ink {
  border-color: rgba(18, 16, 31, 0.25);
  color: var(--ink);
  background: rgba(255, 255, 255, 0.35);
}

.divider {
  height: 1px;
  background: var(--line);
  border: 0;
  margin: 0;
}

/* ---------- Шапка ---------- */

.header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(18, 16, 31, 0.78);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
}

.header__inner {
  display: flex;
  align-items: center;
  gap: 20px;
  min-height: 76px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-head);
  font-weight: 900;
  font-size: 1.2rem;
  letter-spacing: -0.02em;
  color: #fff;
  text-decoration: none;
  flex-shrink: 0;
}

.logo__mark {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
}

.nav {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}

.nav__link {
  display: inline-flex;
  align-items: center;
  padding: 0.55em 1.05em;
  border-radius: 999px;
  color: var(--muted);
  font-weight: 600;
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
}

.nav__link:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.07);
}

.nav__link[aria-current="page"] {
  color: #fff;
  background: var(--violet);
}

.nav__mobile-only { display: none; }

.header__cta { flex-shrink: 0; }

.header__cta[aria-current="page"] {
  --btn-bg: var(--violet);
  --btn-fg: #fff;
  --btn-shadow: var(--violet-dark);
}

.header__back {
  color: var(--muted);
  font-size: 0.82rem;
  text-decoration: none;
  white-space: nowrap;
  opacity: 0.75;
  transition: opacity 0.2s, color 0.2s;
}

.header__back:hover { opacity: 1; color: var(--lemon); }

.burger {
  display: none;
  position: relative;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  flex-shrink: 0;
  margin-left: auto;
}

.burger span,
.burger span::before,
.burger span::after {
  position: absolute;
  left: 50%;
  width: 20px;
  height: 2px;
  border-radius: 2px;
  background: #fff;
  transition: transform 0.3s var(--ease-out), opacity 0.2s;
}

.burger span {
  top: 50%;
  transform: translate(-50%, -50%);
}

.burger span::before,
.burger span::after {
  content: "";
  left: 0;
}

.burger span::before { transform: translateY(-6px); }
.burger span::after { transform: translateY(6px); }

.burger[aria-expanded="true"] span { background: transparent; }
.burger[aria-expanded="true"] span::before { transform: rotate(45deg); }
.burger[aria-expanded="true"] span::after { transform: rotate(-45deg); }

@media (max-width: 960px) {
  .header__back { display: none; }
  .nav__mobile-only { display: inline-flex; }

  .header__cta { display: none; }
  .burger { display: block; }

  .nav {
    position: fixed;
    inset: 76px 0 0 0;
    z-index: 55;
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    padding: 24px var(--gutter) 40px;
    margin: 0;
    background: var(--bg);
    overflow-y: auto;
    transform: translateX(100%);
    visibility: hidden;
    transition: transform 0.4s var(--ease-out), visibility 0.4s;
  }

  .nav.is-open {
    transform: none;
    visibility: visible;
  }

  .nav__link {
    font-family: var(--font-head);
    font-size: 1.4rem;
    padding: 0.6em 0.8em;
    border-radius: 16px;
  }

  .nav__cta {
    margin-top: 18px;
    justify-content: center;
  }

  .nav__back {
    margin-top: auto;
    padding-top: 32px;
    color: var(--muted);
    text-decoration: none;
    font-size: 0.95rem;
  }
}

@media (min-width: 961px) {
  .nav__cta,
  .nav__back { display: none; }
}

/* ---------- Футер ---------- */

.footer {
  margin-top: clamp(40px, 6vw, 80px);
  border-top: 1px solid var(--line);
  background: var(--bg-2);
}

.footer__top {
  display: grid;
  grid-template-columns: 1.6fr repeat(3, 1fr);
  gap: 32px;
  padding-block: clamp(40px, 5vw, 64px);
}

.footer__brand p {
  color: var(--muted);
  max-width: 34ch;
  margin-top: 14px;
}

.footer__title {
  font-family: var(--font-head);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--lemon);
  margin: 0 0 14px;
}

.footer__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.footer__list a {
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s;
}

.footer__list a:hover { color: #fff; }

.footer__bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  padding-block: 20px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.85rem;
}

.footer__back {
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s;
}

.footer__back:hover { color: var(--lemon); }

.footer__socials {
  display: flex;
  gap: 8px;
}

.footer__socials a {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  color: #fff;
  transition: background 0.2s, color 0.2s;
}

.footer__socials a:hover { background: var(--lemon); color: var(--ink); }
.footer__socials svg { width: 18px; height: 18px; }

@media (max-width: 900px) {
  .footer__top { grid-template-columns: 1fr 1fr; }
  .footer__brand { grid-column: 1 / -1; }
}

@media (max-width: 480px) {
  .footer__top { grid-template-columns: 1fr; }
}

/* ---------- Hero (главная) ---------- */

.hero {
  padding-block: clamp(40px, 7vw, 100px) clamp(24px, 4vw, 48px);
  position: relative;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(60% 50% at 80% 20%, rgba(108, 76, 255, 0.35), transparent 70%),
    radial-gradient(40% 40% at 10% 80%, rgba(255, 92, 168, 0.18), transparent 70%);
  pointer-events: none;
  z-index: -1;
}

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

.hero__title { margin-bottom: 24px; }

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 32px;
}

.hero__facts {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 24px;
  margin-top: 32px;
  color: var(--muted);
  font-size: 0.92rem;
}

.hero__facts span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.hero__facts svg {
  width: 18px;
  height: 18px;
  color: var(--mint);
}

.hero__visual {
  position: relative;
  padding: 36px 24px;
}

.hero__sticker {
  position: absolute;
  z-index: 3;
  animation: float 6s ease-in-out infinite;
}

.hero__sticker--1 { top: 6px; left: -4px; animation-delay: 0s; }
.hero__sticker--2 { top: 20px; right: -6px; animation-delay: -2s; }
.hero__sticker--3 { bottom: 10px; right: 20px; animation-delay: -4s; }
.hero__sticker--4 { bottom: 60px; left: -14px; animation-delay: -1s; font-size: 1.1rem; }

.hero__blob {
  position: absolute;
  z-index: 0;
  width: 60%;
  aspect-ratio: 1;
  right: -8%;
  top: -12%;
  opacity: 0.9;
  animation: spin 40s linear infinite;
}

@keyframes float {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -10px; }
}

@keyframes spin {
  to { rotate: 360deg; }
}

@media (max-width: 960px) {
  .hero__grid { grid-template-columns: 1fr; }
  .hero__visual { margin-top: 12px; padding: 30px 12px; }
  .hero__sticker--4 { left: 0; }
}

/* Окно кода */

.codewin {
  position: relative;
  z-index: 2;
  background: #0d0b19;
  border: 1px solid var(--line-2);
  border-radius: 22px;
  box-shadow: var(--shadow-violet), 0 1px 0 rgba(255, 255, 255, 0.1) inset;
  overflow: hidden;
  transform: rotate(-2deg);
  transition: transform 0.5s var(--ease-out);
}

.codewin:hover { transform: rotate(0deg); }

.codewin__bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
}

.codewin__dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--pink);
}

.codewin__dot:nth-child(2) { background: var(--lemon); }
.codewin__dot:nth-child(3) { background: var(--mint); }

.codewin__file {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--muted);
}

.codewin__code {
  margin: 0;
  padding: 22px 22px 26px;
  min-height: 300px;
  font-family: var(--font-mono);
  font-size: clamp(0.72rem, 0.35vw + 0.62rem, 0.88rem);
  line-height: 1.65;
  white-space: pre-wrap;
  word-break: break-word;
  color: #d9d6f0;
  tab-size: 2;
}

.codewin__code .cm { color: #6f6a94; font-style: italic; }
.codewin__code .kw { color: var(--pink); }
.codewin__code .str { color: var(--lemon); }
.codewin__code .fn { color: var(--sky); }
.codewin__code .num { color: var(--mint); }
.codewin__code .prop { color: #c6bfff; }

.cursor {
  display: inline-block;
  width: 0.55em;
  height: 1.15em;
  margin-left: 1px;
  background: var(--lemon);
  vertical-align: -0.2em;
  animation: blink 1s steps(1) infinite;
}

@keyframes blink {
  50% { opacity: 0; }
}

/* ---------- Бегущая строка ---------- */

.marquee {
  --gap: 14px;
  overflow: hidden;
  padding-block: 14px;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}

.marquee__track {
  display: flex;
  gap: var(--gap);
  width: max-content;
  animation: marquee 32s linear infinite;
}

.marquee--slow .marquee__track { animation-duration: 48s; }
.marquee--reverse .marquee__track { animation-direction: reverse; }
.marquee:hover .marquee__track { animation-play-state: paused; }

@keyframes marquee {
  to { transform: translateX(calc(-50% - var(--gap) / 2)); }
}

.marquee .sticker {
  transform: rotate(-2deg);
  margin-block: 6px;
}

.marquee .sticker:nth-child(even) { transform: rotate(2deg); }

/* ---------- Направления ---------- */

.dir-tile {
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-height: 260px;
  text-decoration: none;
}

.dir-tile__icon {
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  background: rgba(18, 16, 31, 0.15);
}

.tile--violet .dir-tile__icon,
.tile--dark .dir-tile__icon { background: rgba(255, 255, 255, 0.12); }

.dir-tile__icon svg {
  width: 28px;
  height: 28px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.dir-tile__desc {
  flex: 1;
  opacity: 0.85;
}

.dir-tile__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-weight: 600;
}

.dir-tile__arrow {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: currentColor;
  transition: transform 0.3s var(--ease-out);
}

.dir-tile__arrow svg {
  width: 20px;
  height: 20px;
  stroke-width: 2.5;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.tile--lemon .dir-tile__arrow svg,
.tile--pink .dir-tile__arrow svg,
.tile--mint .dir-tile__arrow svg,
.tile--orange .dir-tile__arrow svg,
.tile--sky .dir-tile__arrow svg { stroke: var(--lemon); }

.tile--violet .dir-tile__arrow svg,
.tile--dark .dir-tile__arrow svg { stroke: var(--ink); }

.tile--lemon .dir-tile__arrow svg { stroke: var(--mint); }

.dir-tile:hover .dir-tile__arrow { transform: rotate(-45deg) scale(1.1); }

.dir-tile__pattern {
  position: absolute;
  right: -30px;
  top: -30px;
  width: 160px;
  height: 160px;
  border-radius: 50%;
  opacity: 0.35;
  pointer-events: none;
}

/* ---------- Шаги ---------- */

.steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(16px, 2vw, 24px);
  counter-reset: step;
  position: relative;
}

.step {
  position: relative;
  padding: 28px 24px 28px;
  border-radius: var(--r-lg);
  background: var(--surface);
  border: 1px solid var(--line);
}

.step__num {
  display: inline-grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 16px;
  background: var(--lemon);
  color: var(--ink);
  font-family: var(--font-head);
  font-weight: 900;
  font-size: 1.3rem;
  transform: rotate(-6deg);
  margin-bottom: 20px;
  box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.35);
}

.step:nth-child(2) .step__num { background: var(--pink); transform: rotate(5deg); }
.step:nth-child(3) .step__num { background: var(--mint); transform: rotate(-4deg); }
.step:nth-child(4) .step__num { background: var(--violet); color: #fff; transform: rotate(6deg); }

.step__title { margin-bottom: 10px; }
.step p { color: var(--muted); }

.step__arrow {
  position: absolute;
  top: 36px;
  right: -22px;
  width: 36px;
  height: 24px;
  color: var(--lemon);
  z-index: 2;
}

.step:last-child .step__arrow { display: none; }

@media (max-width: 1024px) {
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .step__arrow { display: none; }
}

@media (max-width: 560px) {
  .steps { grid-template-columns: 1fr; }
}

/* ---------- Цифры ---------- */

.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(16px, 2vw, 24px);
}

.stat {
  padding: clamp(24px, 3vw, 36px);
  border-radius: var(--r-lg);
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent);
}

.stat__value {
  font-family: var(--font-head);
  font-weight: 900;
  font-size: clamp(2.4rem, 4.5vw + 0.5rem, 4.5rem);
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--lemon);
  font-variant-numeric: tabular-nums;
}

.stat:nth-child(2) .stat__value { color: var(--pink); }
.stat:nth-child(3) .stat__value { color: var(--mint); }
.stat:nth-child(4) .stat__value { color: var(--sky); }

.stat__label {
  margin-top: 12px;
  color: var(--muted);
  font-weight: 500;
}

@media (max-width: 900px) {
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 420px) {
  .stats { grid-template-columns: 1fr; }
}

/* ---------- Карусель историй ---------- */

.carousel-wrap { position: relative; }

.carousel {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  padding: 6px 6px 18px;
  margin: -6px -6px 0;
  scrollbar-width: none;
}

.carousel::-webkit-scrollbar { display: none; }

.carousel > * {
  flex: 0 0 min(440px, 86%);
  scroll-snap-align: start;
}

.carousel__nav {
  display: flex;
  gap: 10px;
}

.carousel__btn {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--line-2);
  color: #fff;
  display: grid;
  place-items: center;
  transition: background 0.2s, color 0.2s, transform 0.2s;
}

.carousel__btn:hover { background: var(--lemon); color: var(--ink); transform: scale(1.06); }
.carousel__btn svg { width: 20px; height: 20px; }

.story {
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-height: 100%;
}

.story__head {
  display: flex;
  align-items: center;
  gap: 16px;
}

.story__avatar {
  width: 64px;
  height: 64px;
  border-radius: 20px;
  overflow: hidden;
  flex-shrink: 0;
}

.story__name { font-weight: 700; font-family: var(--font-head); font-size: 0.95rem; }
.story__role { color: var(--muted); font-size: 0.9rem; }

.story__quote {
  flex: 1;
  font-size: 1.02rem;
  line-height: 1.55;
}

.story__salary {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding-top: 18px;
  border-top: 1px dashed var(--line-2);
  font-family: var(--font-head);
  font-size: 0.85rem;
}

.story__salary s { color: var(--muted); font-weight: 400; }
.story__salary strong { color: var(--mint); font-size: 1.1rem; }
.story__salary svg { width: 22px; height: 22px; color: var(--lemon); }

/* ---------- Партнёры ---------- */

.partners__logo {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 64px;
  padding: 0 26px;
  border-radius: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  color: rgba(255, 255, 255, 0.75);
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1rem;
  white-space: nowrap;
  transition: color 0.2s, border-color 0.2s;
}

.partners__logo:hover { color: #fff; border-color: var(--line-2); }
.partners__logo svg { width: 28px; height: 28px; flex-shrink: 0; }

/* ---------- CTA ---------- */

.cta {
  position: relative;
  padding: clamp(36px, 6vw, 72px);
  border-radius: var(--r-xl);
  overflow: hidden;
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 32px;
  align-items: center;
}

.cta__art {
  position: relative;
  min-height: 200px;
}

.cta__art svg {
  width: 100%;
  height: auto;
}

@media (max-width: 800px) {
  .cta { grid-template-columns: 1fr; }
  .cta__art { min-height: 0; max-width: 360px; }
}

/* ---------- Страница-заголовок (внутренние) ---------- */

.page-hero {
  padding-block: clamp(36px, 6vw, 80px) clamp(24px, 4vw, 48px);
  position: relative;
}

.page-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(50% 60% at 90% 10%, rgba(108, 76, 255, 0.28), transparent 70%);
  pointer-events: none;
  z-index: -1;
}

.page-hero__inner {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px 40px;
  flex-wrap: wrap;
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  list-style: none;
  padding: 0;
  margin: 0 0 18px;
  font-size: 0.85rem;
  color: var(--muted);
}

.breadcrumbs a { color: var(--muted); text-decoration: none; }
.breadcrumbs a:hover { color: #fff; }
.breadcrumbs li + li::before { content: "/"; margin-right: 6px; opacity: 0.5; }

/* ---------- Каталог курсов ---------- */

.toolbar {
  display: grid;
  gap: 18px;
  padding: 20px;
  border-radius: var(--r-lg);
  background: var(--surface);
  border: 1px solid var(--line);
  margin-bottom: 28px;
  position: sticky;
  top: 84px;
  z-index: 20;
}

.toolbar__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.toolbar__row--between { justify-content: space-between; }

.toolbar__group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.toolbar__label {
  font-size: 0.8rem;
  color: var(--muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.select {
  position: relative;
  display: inline-flex;
}

.select select {
  appearance: none;
  -webkit-appearance: none;
  padding: 0.6em 2.4em 0.6em 1em;
  border-radius: 999px;
  border: 1px solid var(--line-2);
  background: var(--bg);
  color: #fff;
  font-weight: 500;
  font-size: 0.9rem;
  cursor: pointer;
}

.select::after {
  content: "";
  position: absolute;
  right: 14px;
  top: 50%;
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--lemon);
  border-bottom: 2px solid var(--lemon);
  transform: translateY(-70%) rotate(45deg);
  pointer-events: none;
}

.view-toggle {
  display: inline-flex;
  padding: 4px;
  border-radius: 999px;
  border: 1px solid var(--line-2);
  background: var(--bg);
  gap: 2px;
}

.view-toggle button {
  width: 38px;
  height: 34px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: var(--muted);
  transition: background 0.2s, color 0.2s;
}

.view-toggle button[aria-pressed="true"] {
  background: var(--lemon);
  color: var(--ink);
}

.view-toggle svg { width: 18px; height: 18px; }

.results-count {
  color: var(--muted);
  font-size: 0.9rem;
}

.results-count strong { color: #fff; }

.courses {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(16px, 2vw, 24px);
}

@media (max-width: 1024px) {
  .courses { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .toolbar { position: static; }
}

@media (max-width: 640px) {
  .courses { grid-template-columns: 1fr; }
}

.courses--list { grid-template-columns: 1fr; }

.course-card {
  --c: var(--violet);
  display: flex;
  flex-direction: column;
  border-radius: var(--r-lg);
  background: var(--surface);
  border: 1px solid var(--line);
  overflow: hidden;
  transition: transform 0.35s var(--ease-out), box-shadow 0.35s var(--ease-out);
  animation: card-in 0.5s var(--ease-out) both;
}

@keyframes card-in {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: none; }
}

.course-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-soft);
}

.course-card__media {
  position: relative;
  display: block;
  background: var(--c);
  color: var(--ink);
  min-height: 170px;
  padding: 20px;
  overflow: hidden;
  text-decoration: none;
}

.course-card__media--light { color: #fff; }

.course-card__media svg.course-card__icon {
  position: absolute;
  right: 20px;
  bottom: 16px;
  width: 84px;
  height: 84px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.9;
  transition: transform 0.4s var(--ease-out);
}

.course-card:hover .course-card__icon { transform: rotate(-8deg) scale(1.08); }

.course-card__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  position: relative;
  z-index: 1;
}

.course-card__pattern {
  position: absolute;
  inset: 0;
  opacity: 0.7;
  pointer-events: none;
}

.course-card__body {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 22px;
  flex: 1;
}

.course-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  font-size: 0.82rem;
  color: var(--muted);
}

.course-card__title a {
  text-decoration: none;
  color: #fff;
}

.course-card__title a:hover { color: var(--lemon); }

.course-card__desc {
  color: var(--muted);
  font-size: 0.95rem;
  flex: 1;
}

.progress {
  display: grid;
  gap: 8px;
  font-size: 0.82rem;
  color: var(--muted);
}

.progress__row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.progress__bar {
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.progress__fill {
  height: 100%;
  width: var(--p, 0%);
  border-radius: inherit;
  background: linear-gradient(90deg, var(--mint), var(--lemon));
  transition: width 0.8s var(--ease-out);
}

.progress--hot .progress__fill {
  background: linear-gradient(90deg, var(--pink), var(--orange));
}

.course-card__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.price {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.price__now {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.1rem;
}

.price__old {
  color: var(--muted);
  font-size: 0.8rem;
  text-decoration: line-through;
}

.price__note { color: var(--muted); font-size: 0.78rem; }

.courses--list .course-card {
  display: grid;
  grid-template-columns: 260px 1fr;
}

.courses--list .course-card__media { min-height: 100%; }

@media (max-width: 720px) {
  .courses--list .course-card { grid-template-columns: 1fr; }
  .courses--list .course-card__media { min-height: 150px; }
}

.empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: clamp(40px, 6vw, 80px) 20px;
  border-radius: var(--r-lg);
  border: 1px dashed var(--line-2);
  color: var(--muted);
}

.empty svg {
  width: 72px;
  height: 72px;
  margin: 0 auto 20px;
  color: var(--pink);
}

/* ---------- Страница курса ---------- */

.course-hero {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: clamp(24px, 4vw, 56px);
  align-items: start;
}

.course-hero__title { margin: 12px 0 18px; }

.course-hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.course-hero__meta .badge { font-size: 0.85rem; padding: 0.5em 1em; }

.course-hero__art {
  position: relative;
  border-radius: var(--r-xl);
  min-height: 280px;
  overflow: hidden;
  display: grid;
  place-items: center;
  color: var(--ink);
}

.course-hero__art svg.big-icon {
  width: 46%;
  height: auto;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.course-hero__art .sticker {
  position: absolute;
}

.course-hero__art .sticker:nth-of-type(1) { top: 20px; left: 20px; }
.course-hero__art .sticker:nth-of-type(2) { bottom: 22px; right: 22px; }

@media (max-width: 900px) {
  .course-hero { grid-template-columns: 1fr; }
  .course-hero__art { min-height: 220px; }
}

.course-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: clamp(24px, 4vw, 56px);
  align-items: start;
}

.course-aside {
  position: sticky;
  top: 96px;
}

@media (max-width: 1024px) {
  .course-layout { grid-template-columns: 1fr; }
  .course-aside { position: static; }
}

.course-section + .course-section {
  margin-top: clamp(48px, 6vw, 80px);
}

.course-section .h2 { margin-bottom: 24px; }

.skills {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.skills li {
  list-style: none;
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px 16px;
  border-radius: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
}

.skills svg {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  color: var(--mint);
}

.skills ul, ul.skills { padding: 0; margin: 0; }

@media (max-width: 600px) {
  .skills { grid-template-columns: 1fr; }
}

/* Аккордеон */

.acc {
  display: grid;
  gap: 12px;
}

.acc__item {
  border-radius: var(--r-md);
  background: var(--surface);
  border: 1px solid var(--line);
  overflow: hidden;
}

.acc__btn {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 22px;
  text-align: left;
  font-weight: 600;
  transition: background 0.2s;
}

.acc__btn:hover { background: rgba(255, 255, 255, 0.04); }

.acc__num {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--violet);
  color: #fff;
  font-family: var(--font-head);
  font-size: 0.85rem;
}

.acc__title {
  flex: 1;
  font-family: var(--font-head);
  font-size: 1rem;
  font-weight: 700;
}

.acc__hint {
  color: var(--muted);
  font-size: 0.85rem;
  white-space: nowrap;
}

.acc__icon {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--line-2);
  display: grid;
  place-items: center;
  transition: transform 0.35s var(--ease-out), background 0.2s;
}

.acc__icon svg { width: 16px; height: 16px; }

.acc__item.is-open .acc__icon {
  transform: rotate(45deg);
  background: var(--lemon);
  color: var(--ink);
  border-color: var(--lemon);
}

.acc__panel {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.4s var(--ease-out);
}

.acc__item.is-open .acc__panel { grid-template-rows: 1fr; }

.acc__panel > div { overflow: hidden; }

.acc__content {
  padding: 0 22px 22px;
  color: var(--muted);
}

.acc--faq .acc__btn { padding: 18px 20px; }
.acc--faq .acc__title { font-family: var(--font-text); font-size: 1.02rem; font-weight: 600; }

.weeks {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.weeks li {
  display: flex;
  gap: 14px;
  align-items: baseline;
  padding: 12px 16px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
}

.weeks__n {
  flex-shrink: 0;
  font-family: var(--font-head);
  font-size: 0.72rem;
  color: var(--lemon);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.weeks li span:last-child { color: var(--text); }

.module__project {
  margin-top: 14px;
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 14px 16px;
  border-radius: 12px;
  background: rgba(232, 255, 71, 0.08);
  border: 1px dashed rgba(232, 255, 71, 0.4);
  color: var(--text);
  font-size: 0.95rem;
}

.module__project svg { width: 20px; height: 20px; flex-shrink: 0; color: var(--lemon); }

/* Преподаватели */

.teachers {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.teacher {
  display: flex;
  gap: 18px;
  padding: 20px;
  border-radius: var(--r-md);
  background: var(--surface);
  border: 1px solid var(--line);
}

.teacher__avatar {
  width: 84px;
  height: 84px;
  flex-shrink: 0;
  border-radius: 22px;
  overflow: hidden;
}

.teacher__name { font-family: var(--font-head); font-weight: 700; font-size: 0.95rem; }
.teacher__role { color: var(--lemon); font-size: 0.85rem; margin: 4px 0 8px; }
.teacher__bio { color: var(--muted); font-size: 0.9rem; }

@media (max-width: 640px) {
  .teachers { grid-template-columns: 1fr; }
}

/* Формат и расписание */

.format-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.format-item {
  padding: 22px;
  border-radius: var(--r-md);
  border: 1px solid var(--line);
  background: var(--surface);
}

.format-item__icon {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  margin-bottom: 14px;
}

.format-item__icon svg {
  width: 24px;
  height: 24px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.format-item h3 { margin-bottom: 8px; }
.format-item p { color: var(--muted); font-size: 0.95rem; }

@media (max-width: 600px) {
  .format-grid { grid-template-columns: 1fr; }
}

.timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0;
  position: relative;
}

.timeline li {
  position: relative;
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 20px;
  padding: 18px 0 18px 30px;
  border-left: 2px dashed var(--line-2);
}

.timeline li::before {
  content: "";
  position: absolute;
  left: -8px;
  top: 24px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--lemon);
  box-shadow: 0 0 0 4px var(--bg);
}

.timeline li:nth-child(2)::before { background: var(--pink); }
.timeline li:nth-child(3)::before { background: var(--mint); }
.timeline li:nth-child(4)::before { background: var(--sky); }
.timeline li:nth-child(5)::before { background: var(--violet); }

.timeline__date {
  font-family: var(--font-head);
  font-size: 0.85rem;
  color: var(--lemon);
}

.timeline__text strong { display: block; margin-bottom: 4px; }
.timeline__text span { color: var(--muted); font-size: 0.95rem; }

@media (max-width: 560px) {
  .timeline li { grid-template-columns: 1fr; gap: 6px; }
}

/* Карточка цены */

.price-card {
  display: grid;
  gap: 18px;
}

.price-card__value {
  font-family: var(--font-head);
  font-weight: 900;
  font-size: clamp(2rem, 2.5vw + 1rem, 2.8rem);
  line-height: 1;
  letter-spacing: -0.02em;
}

.price-card__value small {
  font-size: 0.45em;
  font-weight: 700;
  opacity: 0.7;
}

.price-card__old {
  color: var(--muted);
  text-decoration: line-through;
  font-size: 0.95rem;
}

.segmented {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  padding: 4px;
  gap: 4px;
  border-radius: 14px;
  background: var(--bg);
  border: 1px solid var(--line);
}

.segmented button {
  padding: 0.6em 0.4em;
  border-radius: 10px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted);
  transition: background 0.2s, color 0.2s;
}

.segmented button:hover { color: #fff; }

.segmented button[aria-pressed="true"] {
  background: var(--lemon);
  color: var(--ink);
}

.price-card__note {
  font-size: 0.85rem;
  color: var(--muted);
}

.price-card__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
  font-size: 0.92rem;
}

.price-card__list li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.price-card__list svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  color: var(--mint);
  margin-top: 3px;
}

.seats-note {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(255, 92, 168, 0.12);
  border: 1px solid rgba(255, 92, 168, 0.4);
  font-size: 0.88rem;
}

.seats-note svg { width: 20px; height: 20px; color: var(--pink); flex-shrink: 0; }

/* ---------- Формы ---------- */

.form {
  display: grid;
  gap: 16px;
}

.form__row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

@media (max-width: 600px) {
  .form__row { grid-template-columns: 1fr; }
}

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

.field label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
}

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 0.85em 1.1em;
  border-radius: 14px;
  border: 1px solid var(--line-2);
  background: var(--bg);
  color: #fff;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.field textarea { min-height: 120px; resize: vertical; }

.field input::placeholder,
.field textarea::placeholder { color: rgba(170, 165, 204, 0.6); }

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--lemon);
  box-shadow: 0 0 0 3px rgba(232, 255, 71, 0.2);
}

.field.is-invalid input,
.field.is-invalid select,
.field.is-invalid textarea {
  border-color: var(--pink);
  box-shadow: 0 0 0 3px rgba(255, 92, 168, 0.2);
}

.field__error {
  display: none;
  font-size: 0.8rem;
  color: var(--pink);
}

.field.is-invalid .field__error { display: block; }

.checkbox {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  font-size: 0.88rem;
  color: var(--muted);
  cursor: pointer;
}

.checkbox input {
  appearance: none;
  -webkit-appearance: none;
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  margin: 1px 0 0;
  border-radius: 7px;
  border: 1px solid var(--line-2);
  background: var(--bg);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}

.checkbox input::after {
  content: "";
  width: 6px;
  height: 11px;
  border-right: 2.5px solid var(--ink);
  border-bottom: 2.5px solid var(--ink);
  transform: rotate(45deg) translate(-1px, -1px);
  opacity: 0;
}

.checkbox input:checked { background: var(--lemon); border-color: var(--lemon); }
.checkbox input:checked::after { opacity: 1; }
.checkbox a { color: var(--lemon); }

.field.is-invalid .checkbox input { border-color: var(--pink); }

.form__success {
  display: none;
  padding: clamp(28px, 4vw, 44px);
  border-radius: var(--r-lg);
  background: var(--mint);
  color: var(--ink);
  text-align: center;
}

.form__success.is-visible { display: block; }

.form__success svg {
  width: 64px;
  height: 64px;
  margin: 0 auto 16px;
}

.form.is-sent { display: none; }

.form-card {
  padding: clamp(24px, 3vw, 40px);
  border-radius: var(--r-lg);
  background: var(--surface);
  border: 1px solid var(--line);
}

/* ---------- Тест / квиз ---------- */

.quiz {
  max-width: 820px;
  margin-inline: auto;
}

.quiz__progress {
  display: grid;
  gap: 10px;
  margin-bottom: 28px;
}

.quiz__progress-row {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-head);
  font-size: 0.8rem;
  color: var(--muted);
}

.quiz__bar {
  height: 12px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--line);
  overflow: hidden;
  padding: 2px;
}

.quiz__bar-fill {
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--violet), var(--pink), var(--lemon));
  transition: width 0.5s var(--ease-out);
}

.quiz__card {
  padding: clamp(24px, 4vw, 44px);
  border-radius: var(--r-xl);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-soft);
  animation: card-in 0.45s var(--ease-out) both;
}

.quiz__question {
  margin-bottom: 26px;
}

.quiz__options {
  display: grid;
  gap: 12px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.quiz__option {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 20px;
  text-align: left;
  border-radius: 18px;
  border: 1px solid var(--line-2);
  background: var(--bg);
  transition: border-color 0.2s, background 0.2s, transform 0.2s var(--ease-out);
}

.quiz__option:hover {
  border-color: var(--lemon);
  transform: translateX(4px);
}

.quiz__option[aria-pressed="true"] {
  background: rgba(232, 255, 71, 0.1);
  border-color: var(--lemon);
}

.quiz__key {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--surface-2);
  font-family: var(--font-head);
  font-size: 0.8rem;
  transition: background 0.2s, color 0.2s;
}

.quiz__option:hover .quiz__key,
.quiz__option[aria-pressed="true"] .quiz__key {
  background: var(--lemon);
  color: var(--ink);
}

.quiz__emoji {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
}

.quiz__emoji svg { width: 100%; height: 100%; }

.quiz__nav {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 26px;
  flex-wrap: wrap;
}

.quiz__result {
  display: grid;
  gap: 24px;
}

.result-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  align-items: center;
  padding: clamp(24px, 3vw, 36px);
  border-radius: var(--r-lg);
}

.result-card__icon {
  width: 120px;
  height: 120px;
  display: grid;
  place-items: center;
  border-radius: 32px;
  background: rgba(18, 16, 31, 0.15);
}

.result-card__icon svg {
  width: 64px;
  height: 64px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.result-card__match {
  font-family: var(--font-head);
  font-weight: 900;
  font-size: clamp(2.4rem, 4vw, 3.6rem);
  line-height: 1;
}

@media (max-width: 640px) {
  .result-card { grid-template-columns: 1fr; }
  .result-card__icon { width: 90px; height: 90px; border-radius: 24px; }
  .result-card__icon svg { width: 48px; height: 48px; }
}

.result-alt {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

@media (max-width: 640px) {
  .result-alt { grid-template-columns: 1fr; }
}

.result-alt__item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  border-radius: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  text-decoration: none;
  color: #fff;
  transition: border-color 0.2s, transform 0.2s var(--ease-out);
}

.result-alt__item:hover { border-color: var(--lemon); transform: translateY(-3px); }

.result-alt__icon {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.result-alt__icon svg {
  width: 24px;
  height: 24px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.result-alt__item small { display: block; color: var(--muted); }

.score-bars {
  display: grid;
  gap: 10px;
}

.score-bar {
  display: grid;
  grid-template-columns: 150px 1fr 44px;
  align-items: center;
  gap: 12px;
  font-size: 0.9rem;
}

.score-bar__track {
  height: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.score-bar__fill {
  height: 100%;
  width: var(--p, 0%);
  border-radius: inherit;
  transition: width 0.8s var(--ease-out);
}

.score-bar__val { text-align: right; color: var(--muted); font-variant-numeric: tabular-nums; }

@media (max-width: 520px) {
  .score-bar { grid-template-columns: 110px 1fr 40px; font-size: 0.82rem; }
}

/* ---------- О школе ---------- */

.mission {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: clamp(24px, 4vw, 56px);
  align-items: center;
}

@media (max-width: 900px) {
  .mission { grid-template-columns: 1fr; }
}

.values {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

@media (max-width: 900px) {
  .values { grid-template-columns: 1fr; }
}

.value-tile {
  min-height: 220px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 8px;
}

.value-tile__num {
  font-family: var(--font-head);
  font-weight: 900;
  font-size: clamp(2.6rem, 4vw, 3.6rem);
  line-height: 1;
  letter-spacing: -0.03em;
}

.team {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

@media (max-width: 1024px) {
  .team { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
  .team { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 420px) {
  .team { grid-template-columns: 1fr; }
}

.member {
  padding: 18px;
  border-radius: var(--r-lg);
  background: var(--surface);
  border: 1px solid var(--line);
  transition: transform 0.35s var(--ease-out), border-color 0.2s;
}

.member:hover { transform: translateY(-6px); border-color: var(--line-2); }

.member__avatar {
  aspect-ratio: 1;
  border-radius: 20px;
  overflow: hidden;
  margin-bottom: 16px;
}

.member__avatar svg { width: 100%; height: 100%; }

.member__name { font-family: var(--font-head); font-weight: 700; font-size: 0.95rem; }
.member__role { color: var(--lemon); font-size: 0.85rem; margin: 4px 0 8px; }
.member__bio { color: var(--muted); font-size: 0.88rem; }

.method {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

@media (max-width: 720px) {
  .method { grid-template-columns: 1fr; }
}

.method__item {
  display: flex;
  gap: 18px;
  padding: 24px;
  border-radius: var(--r-lg);
  background: var(--surface);
  border: 1px solid var(--line);
}

.method__icon {
  flex-shrink: 0;
  width: 54px;
  height: 54px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  color: var(--ink);
}

.method__icon svg {
  width: 26px;
  height: 26px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.method__item h3 { margin-bottom: 8px; }
.method__item p { color: var(--muted); font-size: 0.95rem; }

.career {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: clamp(24px, 4vw, 48px);
  align-items: start;
}

@media (max-width: 960px) {
  .career { grid-template-columns: 1fr; }
}

.career__stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 28px;
}

.career__stat {
  padding: 20px;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: var(--surface);
}

.career__stat strong {
  display: block;
  font-family: var(--font-head);
  font-weight: 900;
  font-size: clamp(1.8rem, 2.5vw, 2.4rem);
  line-height: 1;
  color: var(--lemon);
}

.career__stat:nth-child(2) strong { color: var(--pink); }
.career__stat:nth-child(3) strong { color: var(--mint); }
.career__stat:nth-child(4) strong { color: var(--sky); }

.career__stat span { display: block; margin-top: 6px; color: var(--muted); font-size: 0.88rem; }

.chart-card {
  padding: clamp(20px, 3vw, 32px);
  border-radius: var(--r-lg);
  background: var(--surface);
  border: 1px solid var(--line);
}

.chart-card__legend {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  margin-bottom: 18px;
  font-size: 0.85rem;
  color: var(--muted);
}

.chart-card__legend span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.chart-card__legend i {
  width: 14px;
  height: 14px;
  border-radius: 4px;
  display: inline-block;
}

.chart {
  width: 100%;
  height: auto;
  font-family: var(--font-text);
}

.chart .bar {
  transform-box: fill-box;
  transform-origin: 50% 100%;
  transform: scaleY(0);
  transition: transform 1s var(--ease-out);
}

.chart.is-visible .bar { transform: scaleY(1); }
.chart .bar:nth-of-type(2n) { transition-delay: 0.15s; }

.chart text { fill: var(--muted); font-size: 12px; }
.chart .chart__val { fill: #fff; font-weight: 600; font-size: 12px; }
.chart .chart__grid { stroke: rgba(255, 255, 255, 0.08); }

.chart-card__note {
  margin-top: 14px;
  font-size: 0.82rem;
  color: var(--muted);
}

.reviews {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

@media (max-width: 1024px) {
  .reviews { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
  .reviews { grid-template-columns: 1fr; }
}

.review {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 24px;
  border-radius: var(--r-lg);
  background: var(--surface);
  border: 1px solid var(--line);
}

.review__stars {
  display: flex;
  gap: 3px;
  color: var(--lemon);
}

.review__stars svg { width: 18px; height: 18px; }
.review__text { flex: 1; }
.review__author { display: flex; align-items: center; gap: 12px; }

.review__avatar {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  overflow: hidden;
  flex-shrink: 0;
}

.review__author strong { display: block; font-size: 0.92rem; }
.review__author span { color: var(--muted); font-size: 0.82rem; }

.contacts {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: clamp(24px, 4vw, 48px);
  align-items: start;
}

@media (max-width: 900px) {
  .contacts { grid-template-columns: 1fr; }
}

.contact-list {
  list-style: none;
  padding: 0;
  margin: 28px 0 0;
  display: grid;
  gap: 14px;
}

.contact-list li {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.contact-list svg {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  color: var(--lemon);
  margin-top: 2px;
}

.contact-list a { text-decoration: none; }
.contact-list a:hover { color: var(--lemon); }
.contact-list span { display: block; color: var(--muted); font-size: 0.85rem; }

/* ---------- Появление при скролле ---------- */

[data-reveal] {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.7s ease, transform 0.8s var(--ease-out);
  transition-delay: var(--d, 0s);
}

[data-reveal="left"] { transform: translateX(-30px); }
[data-reveal="right"] { transform: translateX(30px); }
[data-reveal="scale"] { transform: scale(0.92); }

[data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

/* ---------- Прочее ---------- */

.notfound {
  text-align: center;
  padding: clamp(48px, 8vw, 120px) 0;
}

.notfound svg {
  width: 120px;
  height: 120px;
  margin: 0 auto 24px;
}

.to-top {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 40;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--lemon);
  color: var(--ink);
  display: grid;
  place-items: center;
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.7);
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity 0.3s, transform 0.3s, visibility 0.3s;
}

.to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: none;
}

.to-top svg { width: 20px; height: 20px; }

/* ---------- Reduced motion ---------- */

@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;
    scroll-behavior: auto !important;
  }

  [data-reveal] {
    opacity: 1;
    transform: none;
  }

  .marquee__track { animation: none; }
  .marquee { overflow-x: auto; -webkit-mask-image: none; mask-image: none; }
  .hero__sticker,
  .hero__blob { animation: none; }
  .codewin { transform: none; }
  .chart .bar { transform: none; }
  .cursor { animation: none; }
}

/* [1ntegral.ru /concepts/] мобильный фикс, см. og/concepts_build.py */
@media (max-width: 700px) {
  .hl { white-space: normal; }
  .hero__grid > *, .mission > * { min-width: 0; }
  .h1 { overflow-wrap: anywhere; }
}
