/* ==========================================================
   Мастерсам — вариант A «Графит»
   Токены совпадают с переменными Figma «Mastersam · Цвета» (режим A)
   ========================================================== */
:root {
  --bg: #FFFFFF;
  --surface: #F5F3EF;
  --surface-alt: #EEEBE5;
  --inverse: #2A2A2D;
  --ink: #202020;
  --muted: #6E6B66;
  --on-dark-muted: #B8B8B8;
  --accent: #FF7A00;
  --accent-dark: #D95700;
  --accent-soft: #FFF1E2;
  --line: #E6E2DB;
  --code-bg: #1B1B1D;

  --r-xl: 36px;
  --r-l: 28px;
  --r-m: 20px;
  --r-s: 14px;

  --container: 1312px;
  --gutter: clamp(16px, 4.4vw, 64px);
  --section-y: clamp(40px, 5vw, 56px);

  --font: "Onest", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Menlo, monospace;
  --shadow: 0 12px 32px rgba(0, 0, 0, .12);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-height, 84px) + 16px); background: #fff; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4, p, ul, ol, figure { margin: 0; }
ul { padding: 0; list-style: none; }
button, input, select { font: inherit; color: inherit; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.container { width: 100%; max-width: calc(var(--container) + var(--gutter) * 2); margin-inline: auto; padding-inline: var(--gutter); padding-left: max(var(--gutter), env(safe-area-inset-left, 0px)); padding-right: max(var(--gutter), env(safe-area-inset-right, 0px)); }
.section { padding-block: var(--section-y); }
.section--tight { padding-block: 16px; }

/* ---------- Icons ---------- */
.i { width: 20px; height: 20px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.i--sm { width: 16px; height: 16px; }
.i--lg { width: 26px; height: 26px; }

/* ---------- Typography ---------- */
.h1 { font-size: clamp(36px, 4.6vw, 66px); line-height: 1.02; font-weight: 700; letter-spacing: -.035em; }
.hero .h1 { font-size: clamp(34px, 4.1vw, 58px); }
.hero__audience, .hero__city { display: block; font-size: .8em; line-height: 1.16; white-space: nowrap; }
.hero__audience { margin-top: 8px; }
.hero__city { font-size: .72em; }
.h2 { font-size: clamp(30px, 3.6vw, 52px); line-height: 1.06; font-weight: 700; letter-spacing: -.03em; }
.h3 { font-size: clamp(22px, 2vw, 28px); line-height: 1.15; font-weight: 600; letter-spacing: -.02em; }
.lead { font-size: clamp(16px, 1.35vw, 19px); line-height: 1.5; color: var(--muted); }
.muted { color: var(--muted); }
.accent { color: var(--accent); }
.mono { font-family: var(--mono); }

.section-head { display: flex; flex-direction: column; align-items: stretch; gap: 16px; margin-bottom: 36px; }
.section-head__title { display: flex; flex-direction: column; width: 100%; max-width: none; }
.section-head__desc { width: 100%; max-width: none; font-size: 17px; line-height: 1.5; color: var(--muted); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: 56px; padding: 0 28px; border-radius: 999px; border: 0;
  font-size: 16px; font-weight: 600; white-space: nowrap; cursor: pointer;
  transition: transform .15s ease, background-color .15s ease, box-shadow .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn--primary { background: var(--accent); color: #fff; }
.btn--primary:hover { background: #F06F00; box-shadow: 0 8px 20px rgba(255, 122, 0, .3); }
.btn--dark { background: var(--inverse); color: #fff; }
.btn--light { background: #fff; color: var(--ink); }
.btn--outline { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line); }
.btn--outline:hover { box-shadow: inset 0 0 0 1.5px var(--ink); }
.btn--block { width: 100%; }
.btn--sm { height: 46px; padding: 0 22px; font-size: 15px; }

/* ---------- Chips ---------- */
.chip { display: inline-flex; align-items: center; padding: 8px 16px; border-radius: 999px; background: var(--surface); font-size: 14px; font-weight: 500; white-space: nowrap; }
.chip--light { background: #fff; }
.chip--glass { background: rgba(255, 255, 255, .2); color: #fff; }
.chip--accent { background: var(--accent-soft); color: var(--accent); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }

/* ---------- Header ---------- */
.header { position: sticky; top: 0; z-index: 50; padding-top: env(safe-area-inset-top, 0px); background: #fff; }
/* Extend the opaque header behind Safari's translucent top browser controls. */
.header::before { content: ""; position: absolute; inset: auto 0 100%; height: 100vh; height: 100lvh; background: #fff; pointer-events: none; }
.header__inner { display: flex; align-items: center; gap: 32px; padding-block: 18px; }
.logo { display: flex; flex-direction: column; gap: 6px; }
.logo img { height: 23px; width: auto; }
.logo small { font-size: 12px; color: var(--muted); }
.nav { display: flex; gap: 4px; }
.nav a { padding: 10px 16px; border-radius: 999px; font-size: 15px; font-weight: 500; transition: background .15s; }
.nav a:hover, .nav a[aria-current="page"] { background: var(--surface); }
.header__phone { margin-left: auto; font-weight: 600; }
.header__actions { display: none; gap: 8px; margin-left: auto; }
.icon-btn { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; border: 0; cursor: pointer; background: var(--surface); }
.icon-btn--dark { background: var(--inverse); color: #fff; }

/* Mobile menu */
.menu { position: fixed; inset: 0 0 auto; z-index: 100; height: 100vh; height: 100lvh; min-height: calc(var(--menu-viewport-top, 0px) + var(--menu-viewport-height, 100dvh)); background: #fff; opacity: 0; visibility: hidden; pointer-events: none; transition: opacity .22s ease, visibility 0s linear .22s; }
.menu::before { content: ""; position: absolute; z-index: -1; inset: -100vh 0; background: #fff; pointer-events: none; }
.menu.is-open { opacity: 1; visibility: visible; pointer-events: auto; transition-delay: 0s; }
.menu__panel { position: relative; top: var(--menu-viewport-top, 0px); display: flex; flex-direction: column; gap: 24px; height: 100vh; height: var(--menu-viewport-height, 100dvh); padding: max(12px, env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px)) max(24px, env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px)); overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.menu__top { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 1; display: flex; flex: none; align-items: center; justify-content: space-between; background: #fff; }
.menu__nav { display: flex; flex: none; flex-direction: column; }
.menu__nav a { display: flex; align-items: center; justify-content: space-between; padding: 18px 0; border-bottom: 1px solid var(--line); font-size: 26px; font-weight: 600; letter-spacing: -.02em; }
.menu__nav a .i { color: var(--muted); }
.menu__bottom { flex: none; margin-top: auto; display: flex; flex-direction: column; gap: 14px; }
html.menu-open { overflow: hidden; overscroll-behavior: none; }
body.menu-open { position: fixed; top: var(--menu-scroll-top, 0px); width: 100%; overflow: hidden; }

/* ---------- Home: hero ---------- */
.hero { padding-block: 8px 16px; }
.hero__grid { display: grid; grid-template-columns: minmax(0, 1.16fr) minmax(0, 1fr); gap: 16px; }
.hero__grid > * { min-width: 0; }
.hero__main { position: relative; overflow: hidden; background: var(--surface); border-radius: var(--r-xl); padding: 40px; display: flex; flex-direction: column; justify-content: center; gap: 24px; min-height: 0; }
.hero__main > * { position: relative; z-index: 1; }
.hero__top { display: flex; flex-direction: column; gap: 20px; width: 100%; min-width: 0; max-width: 584px; }
.hero__top .lead { max-width: 100%; overflow-wrap: break-word; }
.hero__ring { position: absolute; z-index: 0; right: -110px; bottom: -110px; width: 240px; height: 240px; border-radius: 50%; border: 36px solid var(--accent); }
.pill { align-self: flex-start; display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px; background: #fff; font-size: 13px; font-weight: 600; }
.pill::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; }
.hero__side { display: flex; flex-direction: column; gap: 12px; }
.hero__photo { position: relative; flex: 1; min-height: 420px; border-radius: 28px; overflow: hidden; }
.hero__photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 55% 60%; }
.badge { position: absolute; left: 20px; bottom: 20px; display: flex; align-items: center; gap: 14px; background: #fff; border-radius: var(--r-m); padding: 16px 22px; box-shadow: var(--shadow); }
.badge b { font-size: 38px; line-height: 1; letter-spacing: -.03em; }
.badge span { font-size: 14px; line-height: 1.3; color: var(--muted); }
.hero__minis { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.mini { min-height: 176px; border-radius: var(--r-l); padding: 24px; display: flex; flex-direction: column; justify-content: space-between; color: #fff; }
.mini--dark { background: var(--inverse); }
.mini--accent { background: var(--accent); }
.mini__icon { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; background: rgba(255, 255, 255, .16); }
.mini b { display: block; font-size: 26px; font-weight: 600; letter-spacing: -.02em; }
.mini span { font-size: 14px; opacity: .75; line-height: 1.35; }

/* ---------- Trust bar ---------- */
.trust { display: grid; grid-template-columns: repeat(4, auto); justify-content: space-between; gap: 24px; padding: 28px 8px; border-block: 1px solid var(--line); }
.trust__item { display: flex; align-items: center; gap: 14px; }
.trust__item b { font-size: 40px; font-weight: 700; letter-spacing: -.03em; color: var(--accent); }
.trust__item span { font-size: 14px; line-height: 1.35; color: var(--muted); }

/* ---------- Directions ---------- */
.dirs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 17px; }
.dir { display: flex; flex-direction: column; gap: 18px; padding: 28px; border-radius: 32px; overflow: hidden; }
.dir--dark { background: var(--inverse); color: #fff; }
.dir--accent { background: var(--accent); color: #fff; }
.dir--light { background: var(--surface); }
.dir__top { display: flex; align-items: center; justify-content: space-between; }
.dir__num { font-size: 13px; font-weight: 600; letter-spacing: .08em; opacity: .65; }
.dir__visual { height: 210px; border-radius: var(--r-m); overflow: hidden; }
.dir__visual img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 45%; }
.dir__title { font-size: 28px; font-weight: 600; letter-spacing: -.02em; line-height: 1.15; }
.dir p { font-size: 16px; opacity: .78; }
.dir--light p { color: var(--muted); opacity: 1; }
.dir .chips { margin-top: auto; }
.dir--light .chip { background: #fff; }

.code { background: var(--code-bg); color: #C9C9C9; border-radius: var(--r-m); padding: 16px 20px; font-family: var(--mono); font-size: 13.5px; line-height: 1.65; white-space: pre; overflow: hidden; }
.code__dots { display: flex; gap: 6px; margin-bottom: 14px; }
.code__dots i { width: 10px; height: 10px; border-radius: 50%; background: #4A4A4E; }
.code__dots i:first-child { background: var(--accent); }
.tok-k { color: #FF9A3D; } .tok-s { color: #9BD48A; } .tok-c { color: #6E6E6E; } .tok-n { color: #7FB8FF; } .tok-d { color: #FFC24D; }

.ai-orbit { position: relative; isolation: isolate; width: 100%; height: 210px; flex: none; user-select: none; pointer-events: none; }
.ai-logo { position: absolute; left: var(--x); top: var(--y); width: var(--size); height: var(--size); transform: translate(-50%, -50%); }
.ai-logo--hero { z-index: 1; }
.ai-logo__tile { display: grid; place-items: center; width: 100%; height: 100%; border-radius: 23%; border: 1px solid #fff; background: linear-gradient(145deg, #fff 50%, #f8f6f0); box-shadow: 0 5px 0 #e5dfd3, 0 12px 18px #86360026; transform: rotate(var(--tilt)); animation: aiLogoFloat var(--duration) ease-in-out var(--delay) infinite; }
.ai-logo__tile img { width: 64%; height: 64%; object-fit: contain; pointer-events: none; -webkit-user-drag: none; }
@keyframes aiLogoFloat {
  0%, 100% { transform: translate3d(0, 0, 0) rotate(var(--tilt)); }
  50% { transform: translate3d(var(--drift-x), var(--drift-y), 0) rotate(calc(var(--tilt) + 4deg)); }
}

/* ---------- Courses catalog ---------- */
.filters { display: flex; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.seg { display: flex; gap: 4px; padding: 5px; border-radius: 999px; background: var(--surface); overflow-x: auto; scrollbar-width: none; }
.seg::-webkit-scrollbar { display: none; }
.seg button { border: 0; background: none; padding: 10px 18px; border-radius: 999px; font-size: 15px; font-weight: 500; color: var(--muted); cursor: pointer; white-space: nowrap; }
.seg button.is-active { background: #fff; color: var(--ink); box-shadow: 0 2px 8px rgba(0, 0, 0, .06); }
.course-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.course { display: flex; flex-direction: column; background: var(--surface); border-radius: var(--r-l); overflow: hidden; transition: transform .2s ease, box-shadow .2s ease; }
.course:hover { transform: translateY(-4px); box-shadow: 0 16px 32px rgba(0, 0, 0, .08); }
.course[hidden] { display: none; }
.course__photo { position: relative; aspect-ratio: 16 / 10; overflow: hidden; }
/* обложки: текст в верхних ~42%, люди ниже — показываем полосу 42–94% */
.course__photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 85%; transition: transform .4s ease; }
.course:hover .course__photo img { transform: scale(1.04); }
.course__age { position: absolute; top: 14px; left: 14px; padding: 6px 12px; border-radius: 999px; background: #fff; font-size: 13px; font-weight: 600; }
.course__body { flex: 1; display: flex; flex-direction: column; gap: 10px; padding: 18px 22px 22px; }
.course__dir { font-size: 12px; font-weight: 600; letter-spacing: .08em; color: var(--accent); }
.course__title { font-size: 20px; font-weight: 600; letter-spacing: -.02em; line-height: 1.2; }
.course__tags { display: flex; flex-wrap: wrap; gap: 6px; }
.course__tags span { padding: 5px 10px; border-radius: 999px; background: #fff; font-size: 12.5px; font-weight: 500; color: var(--muted); }
.course__foot { margin-top: auto; padding-top: 8px; display: flex; align-items: center; justify-content: space-between; }
.course__price b { display: block; font-size: 18px; font-weight: 600; }
.course__price small { font-size: 12px; color: var(--muted); }
.go { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--inverse); color: #fff; flex: none; }
.course--dark { background: var(--inverse); color: #fff; }
.course--dark .course__tags span { background: rgba(255, 255, 255, .1); color: #BDBDBD; }
.course--dark .course__price small { color: #BDBDBD; }
.course--dark .go { background: var(--accent); }
.empty { padding: 40px; text-align: center; border-radius: var(--r-l); background: var(--surface); color: var(--muted); }

/* ---------- How ---------- */
.how { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.how__photo { position: relative; min-height: 520px; border-radius: 324px 324px 36px 36px; overflow: hidden; }
.how__photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.caption { position: absolute; left: 24px; right: 24px; bottom: 24px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 20px 24px; border-radius: 22px; background: rgba(32, 32, 32, .86); color: #fff; font-size: 20px; font-weight: 600; line-height: 1.25; }
.steps { display: flex; flex-direction: column; gap: 16px; }
.step { flex: 1; display: flex; align-items: center; gap: 20px; padding: 28px 32px; border-radius: var(--r-l); background: var(--surface); }
.step--active { background: var(--accent-soft); }
.step__n { flex: none; width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; background: #fff; color: var(--accent); font-size: 20px; font-weight: 700; }
.step--active .step__n { background: var(--accent); color: #fff; }
.step h3 { font-size: 24px; font-weight: 600; letter-spacing: -.02em; margin-bottom: 6px; }
.step p { color: var(--muted); }

/* ---------- Dark / accent blocks ---------- */
.block { border-radius: var(--r-xl); padding: 56px; display: grid; gap: 48px; align-items: center; }
.block--dark { background: var(--inverse); color: #fff; }
.block--accent { background: var(--accent); color: #fff; }
.block--soft { background: var(--surface); }
.block--split { grid-template-columns: 1fr minmax(0, 560px); }
.block__content { display: flex; flex-direction: column; gap: 20px; }
.block .lead { color: inherit; opacity: .78; }
.block__photo { height: 100%; min-height: 420px; overflow: hidden; }
.block__photo img { width: 100%; height: 100%; object-fit: cover; }
.shape-leaf { border-radius: 220px 28px 220px 28px; }
.shape-corner { border-radius: 260px 28px 28px 28px; }
.shape-arch { border-radius: 999px 999px 28px 28px; }
.shape-capsule { border-radius: 999px; }

.res-list { display: flex; flex-direction: column; gap: 10px; margin-top: 8px; }
.res-list li { display: flex; align-items: center; gap: 18px; padding: 18px 22px; border-radius: var(--r-m); background: rgba(255, 255, 255, .06); }
.res-list .mono { color: #FF8A00; font-size: 15px; }
.res-list b { display: block; font-size: 19px; font-weight: 600; }
.res-list span { font-size: 14px; color: #AFAFAF; }

.checks { display: flex; flex-direction: column; gap: 12px; }
.checks li { display: flex; align-items: center; gap: 14px; font-size: 18px; font-weight: 500; }
.checks li::before { content: ""; flex: none; width: 28px; height: 28px; border-radius: 50%; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 12.5l4 4 8-9' fill='none' stroke='%23FF7A00' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 16px no-repeat; }
.checks--dark li::before { background-color: var(--accent); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 12.5l4 4 8-9' fill='none' stroke='%23fff' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.price-inline { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.price-inline b { display: block; font-size: 24px; letter-spacing: -.02em; }
.price-inline small { opacity: .8; }

/* ---------- FAQ ---------- */
.faq { display: grid; grid-template-columns: 420px 1fr; gap: 56px; align-items: start; }
.faq--wide { display: flex; flex-direction: column; align-items: stretch; gap: 28px; }
.faq__questions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 48px; align-items: start; }
.faq__questions > .qa { min-width: 0; }
.faq__questions > .qa > summary { min-height: var(--faq-summary-height, 0px); }
.faq__questions > .qa > .qa__content { min-height: var(--faq-answer-height, 0px); }
.faq--wide > .help-card { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 24px 40px; }
.help-card__content { display: grid; gap: 12px; }
.help-card__actions { display: flex; flex-direction: column; align-items: flex-end; gap: 14px; }
.faq__aside { display: flex; flex-direction: column; gap: 20px; }
.qa { border-bottom: 1px solid var(--line); }
.qa summary { list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 22px 0; cursor: pointer; font-size: 21px; font-weight: 600; letter-spacing: -.01em; }
.qa summary::-webkit-details-marker { display: none; }
.qa summary::after { content: ""; flex: none; width: 40px; height: 40px; border-radius: 50%; background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 5v14M5 12h14' fill='none' stroke='%23202020' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") center / 18px no-repeat; transition: background-color .2s; }
.qa[open] summary::after { background-color: var(--accent); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 12h14' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E"); }
.qa p { padding: 0 64px 22px 0; font-size: 17px; color: var(--muted); }
.price-card { display: flex; flex-direction: column; gap: 14px; padding: 28px; border-radius: var(--r-l); background: var(--surface); }
.price-card .row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding-bottom: 12px; }
.price-card .row span { font-size: 15px; color: var(--muted); }
.price-card .row b { font-size: 22px; letter-spacing: -.02em; }
.help-card { display: flex; flex-direction: column; gap: 14px; padding: 28px; border-radius: var(--r-l); background: var(--inverse); color: #fff; }
.help-card p { opacity: .7; }
.help-card__phone { font-size: 22px; font-weight: 600; }

/* ---------- Lead form ---------- */
.lead-block { display: grid; grid-template-columns: 1fr 520px; gap: 56px; align-items: center; padding: 56px; border-radius: var(--r-xl); background: var(--surface); }
.contacts { display: flex; flex-direction: column; gap: 18px; margin-top: 16px; }
.contact { display: flex; align-items: center; gap: 14px; }
.contact__icon { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; background: #fff; color: var(--accent); flex: none; }
.contact b { display: block; font-size: 18px; }
.contact span { font-size: 14px; color: var(--muted); }
.form { display: flex; flex-direction: column; gap: 12px; padding: 32px; border-radius: var(--r-l); background: #fff; box-shadow: 0 20px 60px rgba(0, 0, 0, .07); }
.form h3 { font-size: 28px; font-weight: 600; letter-spacing: -.02em; }
.toggle { display: grid; grid-template-columns: 1fr 1fr; padding: 5px; border-radius: 999px; background: var(--surface); }
.toggle button { border: 0; background: none; padding: 11px; border-radius: 999px; font-size: 15px; font-weight: 500; color: var(--muted); cursor: pointer; }
.toggle button.is-active { background: var(--inverse); color: #fff; }
.input { width: 100%; height: 58px; border: 1.5px solid transparent; border-radius: var(--r-s); background: var(--surface); padding: 0 20px; font-size: 16px; outline: none; appearance: none; transition: border-color .15s, background .15s; }
.input::placeholder { color: #8F8B85; }
.input:focus { border-color: var(--accent); background: #fff; }
select.input { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 9l6 6 6-6' fill='none' stroke='%236E6B66' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 18px center; background-size: 20px; color: #8F8B85; }
.form small { font-size: 12.5px; line-height: 1.4; color: var(--muted); }
.form small a { text-decoration: underline; }

/* ---------- Map ---------- */
.map { position: relative; height: 480px; border-radius: var(--r-xl); overflow: hidden; background: #F1EFEA url("../assets/map.svg") center / cover no-repeat; }
.map iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.map__card { position: absolute; top: 24px; left: 24px; z-index: 2; width: 400px; display: flex; flex-direction: column; gap: 18px; padding: 28px; border-radius: var(--r-l); background: #fff; box-shadow: 0 16px 40px rgba(0, 0, 0, .12); }
.map__card h3 { font-size: 30px; font-weight: 700; letter-spacing: -.02em; }
.addr { display: flex; align-items: center; gap: 12px; }
.addr__badge { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; flex: none; background: var(--accent-soft); color: var(--accent); }
.addr__badge--metro { background: #E42313; color: #fff; font-weight: 700; font-size: 15px; }
.addr__badge--metro .metro-icon { display: block; width: 24px; height: 24px; fill: #fff; }
.addr b { display: block; font-size: 15px; }
.addr span { font-size: 13px; color: var(--muted); }
.btn-col { display: flex; flex-direction: column; gap: 10px; }

/* ---------- Footer ---------- */
.footer { margin-top: 40px; background: var(--inverse); color: #fff; padding-block: 56px 36px; }
.footer__top { display: grid; grid-template-columns: 1.4fr repeat(3, 220px); gap: 40px; padding-bottom: 40px; border-bottom: 1px solid #3A3A3E; }
.footer__brand { display: flex; flex-direction: column; gap: 14px; }
.footer__brand img { height: 25px; width: auto; align-self: flex-start; }
.footer__brand p { font-size: 14px; color: #9C9C9C; }
.footer h4 { font-size: 14px; font-weight: 500; color: #9C9C9C; margin-bottom: 14px; }
.footer li + li { margin-top: 10px; }
.footer li a:hover { color: var(--accent); }
.socials { display: flex; gap: 8px; }
.socials a { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .08); font-size: 13px; font-weight: 600; }
.socials__icon { display: block; width: 24px; height: 24px; fill: currentColor; color: #fff; }
.footer__bottom { display: flex; justify-content: space-between; gap: 16px; padding-top: 24px; font-size: 13px; color: #8D8D8D; }

/* ==========================================================
   Course pages
   ========================================================== */
.crumbs { padding-block: 4px 16px; font-size: 14px; color: var(--muted); }
.crumbs a:hover { color: var(--ink); }
.crumbs span[aria-current] { color: var(--ink); }
.crumbs .sep { margin-inline: 10px; }

.c-hero { display: grid; grid-template-columns: 1fr 420px; gap: 16px; padding-bottom: 32px; }
.c-hero__main { position: relative; overflow: hidden; min-height: 580px; padding: 56px; border-radius: var(--r-xl); background: var(--inverse); color: #fff; display: flex; flex-direction: column; gap: 22px; }
.c-hero__main > :not(.c-hero__photo):not(.c-hero__ring):not(.sticker) { position: relative; z-index: 1; max-width: 480px; }
.c-hero__main .lead { color: #fff; opacity: .72; max-width: 440px; }
.c-hero__photo { position: absolute; right: 32px; bottom: 0; width: 300px; height: 450px; overflow: hidden; }
.c-hero__photo img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.65); transform-origin: 75% 100%; }
.c-hero__photo.shape-arch { border-radius: 150px 150px 0 0; }
.c-hero__photo.shape-capsule { bottom: auto; top: 70px; }
.c-hero__ring { position: absolute; right: -50px; top: -50px; width: 120px; height: 120px; border-radius: 50%; border: 20px solid var(--accent); }
.sticker { position: absolute; z-index: 2; right: 250px; bottom: 60px; display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-radius: 14px; background: #fff; color: var(--ink); font-size: 14px; font-weight: 600; transform: rotate(-4deg); box-shadow: 0 10px 24px rgba(0, 0, 0, .25); }
.sticker__icon { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
.facts { margin-top: auto; display: flex; gap: 36px; }
.facts b { display: block; font-size: 30px; letter-spacing: -.02em; }
.facts span { font-size: 14px; opacity: .6; white-space: pre-line; }
.stage-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.stage-pills span { padding: 8px 14px; border-radius: 999px; background: rgba(255, 255, 255, .12); font-size: 14px; font-weight: 600; }
.stage-pills span:last-child { background: var(--accent); }

.buy { display: flex; flex-direction: column; gap: 16px; padding: 32px; border-radius: var(--r-xl); background: var(--surface); }
.buy__price { display: flex; align-items: baseline; gap: 8px; }
.buy__price b { font-size: 48px; letter-spacing: -.03em; line-height: 1; }
.buy__price span { font-size: 18px; color: var(--muted); }
.buy dl { margin: 0; }
.buy dl div { display: flex; justify-content: space-between; gap: 12px; padding-block: 12px; border-bottom: 1px solid var(--line); font-size: 15px; }
.buy dt { color: var(--muted); }
.buy dd { margin: 0; font-weight: 600; text-align: right; }
.note { margin-top: auto; display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 16px; background: var(--accent-soft); font-size: 14px; font-weight: 500; }
.note__icon { flex: none; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: #fff; }

.features { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.feature { min-height: 250px; display: flex; flex-direction: column; gap: 12px; padding: 28px; border-radius: var(--r-l); background: var(--surface); }
.feature__icon { width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; background: #fff; color: var(--accent); margin-bottom: auto; }
.feature h3 { font-size: 21px; font-weight: 600; letter-spacing: -.02em; line-height: 1.2; }
.feature p { font-size: 15px; color: var(--muted); }
.feature--accent { background: var(--accent); color: #fff; }
.feature--accent .feature__icon { background: rgba(255, 255, 255, .18); color: #fff; }
.feature--accent p { color: #fff; opacity: .88; }

/* lesson timeline */
.timeline { display: flex; gap: 8px; }
.timeline__part { flex: var(--min) 1 0; min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.timeline__bar { height: 72px; border-radius: 18px; display: grid; place-items: center; font-size: 18px; font-weight: 700; letter-spacing: -.01em; }
.timeline__part h3 { font-size: 19px; font-weight: 600; letter-spacing: -.01em; padding-inline: 4px; }
.timeline__part p { font-size: 14px; line-height: 1.4; color: var(--muted); padding-inline: 4px; }
.t-soft { background: var(--accent-soft); color: var(--accent); }
.t-alt { background: var(--surface-alt); }
.t-accent { background: var(--accent); color: #fff; }
.t-dark { background: var(--inverse); color: #fff; }
.t-deep { background: var(--accent-dark); color: #fff; }
.callout { display: flex; align-items: center; gap: 14px; margin-top: 24px; padding: 18px 22px; border-radius: var(--r-m); background: var(--surface); font-size: 16px; }
.callout__icon { flex: none; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: #fff; }
.levels { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 12px; }
.level { display: flex; align-items: center; gap: 14px; padding: 18px 22px; border-radius: var(--r-m); background: var(--surface); }
.level b { display: block; font-size: 17px; }
.level span { font-size: 14px; color: var(--muted); }
.level--dark { background: var(--inverse); color: #fff; }
.level--dark span { color: #BDBDBD; }

/* program: blocks (4 cols) */
.blocks { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.pblock { display: flex; flex-direction: column; gap: 12px; padding: 24px; border-radius: var(--r-l); background: var(--surface); }
.pblock__top { display: flex; justify-content: space-between; font-size: 13px; color: var(--muted); }
.pblock__top b { font-family: var(--mono); color: var(--accent); }
.pblock h3 { font-size: 22px; font-weight: 600; letter-spacing: -.02em; line-height: 1.2; }
.pblock p { font-size: 15px; color: var(--muted); }
.pblock--dark { background: var(--inverse); color: #fff; }
.pblock--dark p, .pblock--dark .pblock__top { color: #BDBDBD; }
.badge-proj { margin-top: auto; display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 12px; background: var(--accent-soft); color: var(--accent); font-size: 13px; font-weight: 600; }
.badge-proj--plain { background: #fff; color: var(--ink); }
.badge-proj--solid { background: var(--accent); color: #fff; }

/* program: modules (2x2) */
.modules { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.module { display: flex; flex-direction: column; gap: 14px; padding: 32px; border-radius: 32px; background: var(--surface); }
.module__top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.module__top b { font-family: var(--mono); font-size: 13px; color: var(--accent); }
.module__top .badge-proj { margin: 0; }
.module h3 { font-size: 28px; font-weight: 600; letter-spacing: -.02em; }
.module p { color: var(--muted); }
.dots { display: flex; flex-direction: column; gap: 10px; margin-top: 6px; }
.dots li { display: flex; align-items: center; gap: 10px; font-size: 15px; color: #4A4743; }
.dots li::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); flex: none; }
.module--dark { background: var(--inverse); color: #fff; }
.module--dark p { color: #BDBDBD; }
.module--dark .dots li { color: #fff; }
.module--dark .badge-proj { background: var(--accent); color: #fff; }

/* program: stages (games) */
.stages { display: grid; grid-template-columns: repeat(3, 1fr); gap: 17px; }
.stage { display: flex; flex-direction: column; border-radius: var(--r-l); background: var(--surface); overflow: hidden; }
.stage__visual { height: 210px; display: grid; place-items: center; }
.stage__body { flex: 1; display: flex; flex-direction: column; gap: 10px; padding: 24px; }
.stage__body > b { font: 700 12px var(--mono); color: var(--accent); }
.stage h3 { font-size: 24px; font-weight: 600; letter-spacing: -.02em; }
.stage p { font-size: 15px; color: var(--muted); }
.stage .chips .chip { background: #fff; font-size: 13px; padding: 6px 12px; }
.lvl { width: 300px; height: 150px; border-radius: 14px; background: #fff; position: relative; transform: rotate(-2deg); }
.puzzle { display: flex; flex-direction: column; gap: 6px; }
.puzzle span { display: block; padding: 10px 14px; border-radius: 10px; font: 700 13px var(--mono); color: #fff; background: var(--inverse); }
.puzzle span:nth-child(1) { background: var(--accent); }
.puzzle span:nth-child(2) { margin-left: 22px; }
.puzzle span:nth-child(3) { margin-left: 44px; background: var(--accent-soft); color: var(--accent); }
.puzzle span:nth-child(4) { margin-left: 22px; }
.road { margin-top: 17px; display: flex; align-items: center; gap: 10px; padding: 20px 24px; border-radius: 24px; background: var(--inverse); }
.road__item { flex: 1; padding: 10px 14px; border-radius: 16px; background: rgba(255, 255, 255, .08); color: #fff; }
.road__item small { display: block; font: 11px var(--mono); color: #9C9C9C; }
.road__item b { font-size: 15px; font-weight: 600; }
.road__item--jam { background: var(--accent); }
.road__item--jam small { color: #fff; }
.road__item--fest { background: #fff; color: var(--ink); }
.road__item--fest small { color: var(--accent); }
.road > .i { color: #6E6E6E; }

/* portfolio */
.portfolio { display: grid; grid-template-columns: repeat(3, 1fr); gap: 17px; }
.pcard { display: flex; flex-direction: column; border-radius: var(--r-l); background: var(--surface); overflow: hidden; }
.pcard__visual { height: 200px; display: grid; place-items: center; overflow: hidden; }
.pcard__body { display: flex; flex-direction: column; gap: 8px; padding: 24px; }
.pcard__body > b { font: 700 12px var(--mono); color: var(--accent); }
.pcard h3 { font-size: 21px; font-weight: 600; letter-spacing: -.02em; }
.pcard p { font-size: 15px; color: var(--muted); }
.game { display: flex; flex-direction: column; gap: 10px; padding: 28px; border-radius: var(--r-l); background: var(--surface); }
.game__top { display: flex; align-items: center; gap: 14px; font-size: 13px; font-weight: 500; color: var(--muted); }
.game__n { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; background: #fff; color: var(--accent); font: 700 18px var(--mono); flex: none; }
.game h3 { font-size: 23px; font-weight: 600; letter-spacing: -.02em; }
.game p { font-size: 15px; color: var(--muted); }
.game--jam { background: var(--accent-soft); }
.game--jam .game__n { background: var(--accent); color: #fff; }
.game--final { background: var(--inverse); color: #fff; }
.game--final .game__n { background: var(--accent); color: #fff; }
.game--final p, .game--final .game__top { color: #BDBDBD; }

/* illustrated mocks */
.bg-soft { background: var(--accent-soft); } .bg-accent { background: var(--accent); } .bg-alt { background: var(--surface-alt); } .bg-dark { background: var(--inverse); }
.mock-card { background: #fff; border-radius: 14px; padding: 18px; box-shadow: 0 10px 24px rgba(0, 0, 0, .08); }
.mock-tilt-l { transform: rotate(-5deg); } .mock-tilt-r { transform: rotate(3deg); }
.chart { display: flex; align-items: flex-end; gap: 16px; height: 130px; padding-bottom: 6px; border-bottom: 3px solid rgba(42, 42, 45, .3); }
.chart span { width: 40px; border-radius: 8px 8px 0 0; background: var(--accent); }
.chart span:nth-child(odd) { background: var(--inverse); }
.chart span:first-child { background: #FFC24D; }
.pixel { display: grid; gap: 4px; padding: 22px; border-radius: 20px; background: #fff; }
.pixel span { width: 30px; height: 30px; border-radius: 5px; background: rgba(32, 32, 32, .06); }
.pixel span.on { background: var(--accent); }

/* special sections */
.pipeline { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.showcase { display: grid; grid-template-columns: minmax(0, 1fr) auto 340px; gap: 28px; align-items: center; padding: 48px; border-radius: var(--r-xl); background: var(--inverse); }
.showcase .code { font-size: 15px; padding: 28px; border-radius: 24px; }
.run { display: flex; flex-direction: column; align-items: center; gap: 8px; color: #8A8A8A; font: 12px var(--mono); }
.run i { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: #fff; }
.phone { display: flex; flex-direction: column; gap: 10px; padding: 20px 18px; border-radius: 40px; background: #fff; }
.phone__head { display: flex; align-items: center; gap: 10px; padding-bottom: 10px; }
.phone__avatar { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: #fff; }
.phone__head b { display: block; font-size: 16px; }
.phone__head span { font-size: 12px; color: #8A8A8A; }
.msg { max-width: 85%; padding: 10px 14px; border-radius: 16px; background: #F0EEEA; font-size: 15px; font-weight: 500; }
.msg--me { align-self: flex-end; background: var(--accent); color: #fff; }

.rules li { display: flex; align-items: center; gap: 14px; padding-block: 14px; border-bottom: 1px solid #3A3A3E; font-size: 17px; }
.rules li:last-child { border-bottom: 0; }
.rules li::before { content: ""; flex: none; width: 28px; height: 28px; border-radius: 50%; background: var(--accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 12.5l4 4 8-9' fill='none' stroke='%23fff' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 14px no-repeat; }

.cta { position: relative; overflow: hidden; display: grid; grid-template-columns: 1fr 440px; gap: 40px; align-items: center; padding: 56px; border-radius: var(--r-xl); background: var(--accent); color: #fff; }
.cta::before { content: ""; position: absolute; left: 560px; top: 180px; width: 360px; height: 360px; border-radius: 50%; border: 48px solid rgba(255, 255, 255, .18); }
.cta > * { position: relative; }
.cta .lead { color: #fff; opacity: .9; max-width: 520px; }
.cta .form { padding: 28px; box-shadow: none; }
.cta .form .input { height: 56px; }

.sticky-bar { display: none; }

/* ==========================================================
   Responsive
   ========================================================== */
@media (max-width: 1100px) {
  .nav, .header__phone, .header__cta { display: none; }
  .header__actions { display: flex; }
  .hero__grid, .how, .faq, .lead-block, .c-hero, .cta, .block--split { grid-template-columns: 1fr; }
  .hero__main { min-height: 0; }
  .hero__photo { min-height: 360px; }
  .trust { grid-template-columns: 1fr 1fr; }
  .dirs, .stages, .portfolio { grid-template-columns: 1fr 1fr; }
  .course-grid, .blocks, .features, .pipeline { grid-template-columns: 1fr 1fr; }
  .footer__top { grid-template-columns: 1fr 1fr; }
  .showcase { grid-template-columns: 1fr; justify-items: center; }
  .showcase .code { width: 100%; }
  .run i { transform: rotate(90deg); }
  .road { flex-wrap: wrap; }
  .road > .i { display: none; }
  .road__item { flex: 1 1 30%; }
  .timeline { flex-wrap: wrap; }
  .timeline__part { flex: 1 1 30%; }
  .cta::before { left: auto; right: -120px; top: -120px; }
}

@media (max-width: 720px) {
  body { font-size: 15px; }
  .header__inner { padding-block: 12px; }
  .logo img { height: 18px; }
  .logo small { display: none; }

  .hero { padding-top: 4px; }
  .hero__main { padding: 24px; border-radius: var(--r-l); gap: 24px; }
  .hero__ring { display: none; }
  .hero__cta { flex-direction: column; }
  .hero__cta .btn { width: 100%; }
  .hero__photo { min-height: 280px; border-radius: 24px; }
  .badge { left: 14px; bottom: 14px; padding: 12px 16px; }
  .badge b { font-size: 28px; }
  .badge span { font-size: 12px; }
  .hero__minis { gap: 12px; }
  .mini { min-height: 150px; padding: 18px; border-radius: 24px; }
  .mini b { font-size: 20px; }
  .mini span { font-size: 12px; }

  .trust { padding: 8px 0; gap: 0 12px; }
  .trust__item { flex-direction: column; align-items: flex-start; gap: 4px; padding-block: 14px; }
  .trust__item b { font-size: 32px; }
  .trust__item span { font-size: 13px; }

  .section-head { margin-bottom: 24px; }
  .dirs, .stages, .portfolio, .modules { grid-template-columns: 1fr; gap: 12px; }
  .dir { padding: 22px; border-radius: var(--r-l); }
  .dir__visual { height: 170px; }
  .dir__title { font-size: 26px; }

  .filters { flex-direction: column; gap: 8px; margin-inline: calc(var(--gutter) * -1); padding-inline: var(--gutter); }
  .seg { background: none; padding: 0; gap: 6px; }
  .seg button { background: var(--surface); padding: 9px 14px; font-size: 14px; }
  .seg button.is-active { background: var(--inverse); color: #fff; box-shadow: none; }
  .course-grid { grid-template-columns: 1fr; gap: 10px; }
  .course { display: grid; grid-template-columns: 112px 1fr; min-height: 124px; border-radius: 22px; }
  .course:hover { transform: none; }
  .course__photo { height: auto; aspect-ratio: auto; }
  .course__photo img { object-position: 50% 100%; transform: scale(1.7); transform-origin: 75% 90%; }
  .course:hover .course__photo img { transform: scale(1.7); }
  .course__age, .course__tags { display: none; }
  .course__body { padding: 14px 14px 14px 16px; gap: 4px; }
  .course__title { font-size: 17px; }
  .course__price b { display: inline; font-size: 16px; }
  .go { width: 36px; height: 36px; }

  .how__photo { min-height: 260px; border-radius: 179px 179px 28px 28px; }
  .caption { left: 16px; right: 16px; bottom: 16px; padding: 12px 14px; font-size: 15px; border-radius: 16px; }
  .step { padding: 18px; gap: 14px; align-items: flex-start; border-radius: 22px; }
  .step__n { width: 44px; height: 44px; border-radius: 14px; font-size: 16px; }
  .step h3 { font-size: 18px; }
  .step p { font-size: 14px; }

  .block, .lead-block, .cta { padding: 24px; border-radius: var(--r-l); gap: 20px; }
  .block__photo { min-height: 220px; }
  .shape-leaf { border-radius: 110px 20px 110px 20px; }
  .shape-corner { border-radius: 150px 20px 20px 20px; }
  .checks li { font-size: 15px; }
  .res-list li { padding: 14px 16px; }
  .res-list b { font-size: 16px; }

  .faq { gap: 24px; }
  .faq__questions { grid-template-columns: 1fr; }
  .faq--wide > .help-card { grid-template-columns: 1fr; padding: 24px; }
  .help-card__actions { align-items: stretch; }
  .qa summary { font-size: 17px; padding: 16px 0; }
  .qa summary::after { width: 34px; height: 34px; }
  .qa p { padding-right: 0; font-size: 15px; }

  .form { padding: 20px; }
  .input { height: 54px; }

  .map { height: auto; background: none; overflow: visible; border-radius: 0; display: flex; flex-direction: column; gap: 16px; }
  .map iframe { position: static; height: 300px; border-radius: 24px; background: #F1EFEA url("../assets/map.svg") center / cover; }
  .map__card { position: static; width: auto; padding: 0; box-shadow: none; }

  .footer { padding-block: 36px 32px; }
  .footer__top { grid-template-columns: 1fr 1fr; gap: 24px; }
  .footer__brand { grid-column: 1 / -1; }
  .footer__bottom { flex-direction: column; gap: 4px; }

  /* course pages */
  .c-hero__main { padding: 24px; border-radius: var(--r-l); min-height: 0; gap: 18px; }
  .c-hero__photo { position: relative; right: auto; top: auto !important; bottom: auto; width: 100%; height: 280px; border-radius: 155px 155px 20px 20px; }
  .c-hero__photo.shape-capsule { border-radius: 140px; }
  .c-hero__photo img { transform: scale(1.45); }
  .c-hero__ring, .sticker { display: none; }
  .facts { gap: 24px; }
  .facts b { font-size: 24px; }
  .facts span { font-size: 12px; }
  .buy { padding: 24px; border-radius: var(--r-l); }
  .buy__price b { font-size: 40px; }
  .features, .pipeline { gap: 12px; }
  .feature { min-height: 180px; padding: 18px; border-radius: 22px; }
  .feature__icon { width: 44px; height: 44px; border-radius: 14px; }
  .feature h3 { font-size: 17px; }
  .feature p { font-size: 13px; }

  .timeline { flex-direction: column; }
  .timeline__part { flex-direction: row; align-items: center; gap: 12px; }
  .timeline__bar { flex: none; width: 72px; height: calc(48px + var(--min) * 1.4px); font-size: 15px; text-align: center; line-height: 1.1; }
  .timeline__part div { display: flex; flex-direction: column; }
  .levels { grid-template-columns: 1fr; }

  .blocks { grid-template-columns: 1fr; gap: 8px; }
  .pblock { padding: 16px; border-radius: 20px; }
  .pblock h3 { font-size: 18px; }
  .module { padding: 20px; border-radius: 22px; }
  .module__top { flex-wrap: wrap; }
  .module h3 { font-size: 21px; }
  .stage__visual, .pcard__visual { height: 150px; }
  .stage__visual > *, .pcard__visual > * { transform: scale(.8); }
  .road { flex-direction: column; align-items: stretch; padding: 18px; }
  .game { padding: 20px; }
  .showcase { padding: 16px; gap: 12px; border-radius: var(--r-l); }
  .showcase .code { font-size: 11.5px; padding: 18px; }
  .phone { width: 100%; border-radius: 28px; padding: 16px; }
  .rules li { font-size: 15px; }
  .cta .form { padding: 18px; }

  .sticky-bar { position: fixed; z-index: 40; left: 16px; right: 16px; bottom: 16px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 8px 8px 20px; border-radius: 999px; background: var(--inverse); color: #fff; box-shadow: 0 10px 30px rgba(0, 0, 0, .25); }
  .sticky-bar b { display: block; font-size: 16px; }
  .sticky-bar small { font-size: 12px; opacity: .6; }
  .has-sticky .footer { padding-bottom: 110px; }
}

/* clickable direction cards */
.dir { position: relative; transition: transform .2s ease; }
.dir:hover { transform: translateY(-4px); }
.stretched { position: absolute; inset: 0; z-index: 3; border-radius: inherit; }

/* ==========================================================
   Анимации
   ========================================================== */
@keyframes fadeUp { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@keyframes floatTilt { 0%, 100% { transform: rotate(-4deg) translateY(0); } 50% { transform: rotate(-2deg) translateY(-8px); } }
@keyframes ringPulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.06); } }
@keyframes blink { 50% { opacity: 0; } }
@keyframes grow { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes pageOpen { from { opacity: .3; } to { opacity: 1; } }
@keyframes answerOpen { from { opacity: .25; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.js main { animation: pageOpen .28s ease-out both; }
.js .crumbs { animation: fadeUp .4s cubic-bezier(.2,.7,.2,1) both; }

/* Появление при прокрутке (класс .reveal добавляет JS, без JS всё видно) */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .48s cubic-bezier(.2,.7,.2,1), transform .48s cubic-bezier(.2,.7,.2,1); transition-delay: var(--d, 0ms); }
.js .reveal.is-visible, .js .reveal:focus-within { opacity: 1; transform: none; }

/* Первый экран */
.js .hero__main > *, .js .hero__side > *, .js .c-hero__main > .chips, .js .c-hero__main > h1, .js .c-hero__main > .lead, .js .c-hero__main > .facts, .js .c-hero__main > .stage-pills, .js .buy { animation: fadeUp .8s cubic-bezier(.2,.7,.2,1) both; }
.js .hero__side > :nth-child(1), .js .c-hero__main > h1 { animation-delay: .1s; }
.js .hero__side > :nth-child(2), .js .c-hero__main > .lead { animation-delay: .2s; }
.js .c-hero__main > .facts, .js .c-hero__main > .stage-pills { animation-delay: .3s; }
.js .buy { animation-delay: .25s; }
.js .c-hero__photo { animation: fadeIn 1s ease .2s both; }

/* Парение */
.badge { animation: float 5s ease-in-out infinite; }
.sticker { animation: floatTilt 5s ease-in-out infinite; }
.hero__ring, .c-hero__ring { animation: ringPulse 6s ease-in-out infinite; }

/* Шкала занятия */
.timeline__bar { transform-origin: left center; }
.timeline.reveal .timeline__bar { transform: scaleX(0); transition: transform .9s cubic-bezier(.2,.7,.2,1); }
.timeline.reveal.is-visible .timeline__bar { transform: scaleX(1); }
.timeline__part:nth-child(2) .timeline__bar { transition-delay: .1s; }
.timeline__part:nth-child(3) .timeline__bar { transition-delay: .2s; }
.timeline__part:nth-child(4) .timeline__bar { transition-delay: .3s; }
.timeline__part:nth-child(5) .timeline__bar { transition-delay: .4s; }
.timeline__part:nth-child(6) .timeline__bar { transition-delay: .5s; }

/* Микро-взаимодействия */
.btn .i { transition: transform .2s ease; }
.btn:hover .i { transform: translateX(3px); }
.go { transition: transform .2s ease, background-color .2s ease; }
.course:hover .go { transform: translateX(3px); background: var(--accent); }
.course--dark:hover .go { background: #fff; color: var(--ink); }
.feature, .module, .pblock, .pcard, .game, .stage, .step { transition: transform .25s ease, box-shadow .25s ease; }
.feature:hover, .pcard:hover, .game:hover, .stage:hover { transform: translateY(-4px); box-shadow: 0 16px 32px rgba(0, 0, 0, .08); }
.header { transition: box-shadow .25s ease; }
.header.is-scrolled { box-shadow: 0 6px 24px rgba(0, 0, 0, .06); }
.caret { display: inline-block; width: .55em; height: 1.1em; vertical-align: -0.15em; background: var(--accent); margin-left: 2px; animation: blink 1s steps(1) infinite; }
.qa p { animation: fadeIn .35s ease; }
.qa--animated { overflow-anchor: none; }
.qa--animated p { animation: none; }
.qa.is-opening .qa__content { animation: answerOpen .28s ease-out both; }
.toggle button { transition: background-color .2s ease, color .2s ease; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal { opacity: 1; transform: none; }
  .timeline.reveal .timeline__bar { transform: none; }
}

/* Three practical answers before choosing a course. */
.trust--facts { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.trust--facts .trust__item { min-width: 0; flex-direction: column; align-items: flex-start; gap: 8px; text-align: left; }
.trust--facts .trust__item:nth-child(2) { align-items: center; text-align: center; }
.trust--facts .trust__item:nth-child(3) { align-items: flex-end; text-align: right; }
.trust--facts .trust__item b { font-size: clamp(22px, 2.2vw, 30px); line-height: 1.2; white-space: normal; }
.trust--facts .trust__item span { font-size: 15px; color: #45433F; }
.footer__license { margin-top: 16px; color: #E5E5E5; font-size: 14px; line-height: 1.45; }
@media (max-width:720px) {
  .trust--facts { grid-template-columns: 1fr; gap: 0; }
  .trust--facts .trust__item:nth-child(n) { gap: 6px; align-items: flex-start; text-align: left; }
  .trust--facts .trust__item b { font-size: 24px; }
}

/* Clearer text in the hero cards and the sign-up section. */
.hero__minis .mini { min-height: 0; padding: 18px 20px; gap: 0; justify-content: flex-start; }
.hero__minis .mini b { font-size: 22px; line-height: 1.2; }
.hero__minis .mini--dark { background: var(--surface); color: var(--ink); }
.hero__minis .mini span { opacity: 1; }
.hero__minis .mini > div > span { display: block; margin-top: 8px; font-size: 16px; line-height: 1.4; font-weight: 500; }
.hero__minis .mini--accent { color: #fff; }
.lead-block .lead { color: var(--ink); }
.lead-block .lead { font-size: 18px; }
.lead-block .contact b { color: var(--ink); font-size: 20px; }
.lead-block .contact > span:last-child > span { color: #45433F; font-size: 16px; }
.lead-block .contact__icon { color: var(--accent-dark); background: var(--accent-soft); }
.lead-block .input, .lead-block select.input { color: var(--ink); }
.lead-block .input::placeholder { color: #55514C; opacity: 1; }
.lead-block .form small { color: #45433F; }

/* A small zoom and brief wobble, followed by a quiet pause. */
@keyframes trialInvite {
  0%, 90%, 100% { transform: scale(1) rotate(0); }
  28%, 68% { transform: scale(1.04) rotate(0); }
  38% { transform: scale(1.04) rotate(-1deg); }
  46% { transform: scale(1.04) rotate(1deg); }
  54% { transform: scale(1.04) rotate(-.6deg); }
  62% { transform: scale(1.04) rotate(.6deg); }
}
.btn--trial { min-height: 56px; height: 56px; padding: 0 28px; border: 0; color: #fff; background: var(--accent); font-size: 16px; font-weight: 700; line-height: 1.4; white-space: nowrap; text-align: center; transform: none; box-shadow: none; animation: trialInvite 2s ease-in-out infinite; }
.hero__cta .btn--trial { flex: 0 0 auto; width: auto; max-width: 100%; }
.btn--trial:hover, .btn--trial:focus-visible { animation: none; transform: scale(1.04); background: #F06F00; box-shadow: none; }
.btn--trial:focus-visible { outline: 3px solid var(--ink); outline-offset: 6px; }
.btn--trial:active { animation: none; transform: scale(.98); box-shadow: none; }
@media (max-width: 720px) {
  .hero__cta { flex-wrap: nowrap; }
  .hero__minis { grid-template-columns: minmax(0, 1fr); }
  .hero__minis .mini { min-height: 0; padding: 18px 20px; }
  .hero__minis .mini b { font-size: 24px; }
  .hero__minis .mini > div > span { font-size: 16px; }
  .hero__cta .btn--trial { width: 100%; height: auto; min-height: 56px; padding: 14px 20px; white-space: normal; }
  .lead-block .lead { font-size: 17px; }
  #adults .block__content { min-width: 0; }
  #adults .chip { max-width: 100%; white-space: normal; }
}
@media (max-width: 420px) {
  .hero .h1 { font-size: clamp(28px, 8.7vw, 36px); }
}

/* Desktop phone-link copy confirmation. */
.phone-copy-notice { position: fixed; z-index: 600; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); max-width: min(420px, calc(100vw - 32px)); padding: 12px 16px; border: 1px solid #ffffff30; border-radius: 12px; background: var(--inverse); color: #fff; box-shadow: 0 6px 24px #00000026; font-size: 15px; line-height: 1.4; pointer-events: none; }
.phone-copy-notice[hidden] { display: none; }
.phone-copy-notice--error { pointer-events: auto; }
.phone-copy-notice input { display: block; width: 100%; margin-top: 8px; padding: 6px 8px; border: 0; border-radius: 6px; background: #fff; color: var(--ink); font-size: 16px; }
