/* ==========================================================================
   Сайт-визитка: Екатерина Геннадьевна
   Тема: бумага, чернила и красная ручка учителя
   ========================================================================== */

:root {
  --paper: #f5efe4;
  --paper-2: #ece3d3;
  --card: #fbf8f2;
  --ink: #221d18;
  --ink-soft: #5d544a;
  --muted: #8b8176;
  --red: #d2442b;
  --red-rgb: 210, 68, 43;
  --red-soft: rgba(var(--red-rgb), .14);
  --blue: #2f5ea8;
  --gold: #c39a4e;
  --line: rgba(34, 29, 24, .12);
  --serif: "Cormorant Garamond", Georgia, serif;
  --sans: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  --hand: "Caveat", "Comic Sans MS", cursive;
  --radius: 24px;
  --gutter: clamp(16px, 4vw, 56px);
  --ease: cubic-bezier(.2, .8, .2, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 17px/1.65 var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* лёгкое зерно бумаги */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 100;
  opacity: .35;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.13 0 0 0 0 0.11 0 0 0 0 0.09 0 0 0 .07 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

[hidden] { display: none !important; }
img { display: block; max-width: 100%; height: auto; }
/* повёрнутая бегущая строка шире экрана; clip (в отличие от hidden) не ломает sticky
   и не даёт прокрутить страницу вбок на телефоне */
main { overflow-x: clip; }
@supports not (overflow: clip) { main { overflow-x: hidden; } }

picture { display: block; }
.h2, .h3, h3, .qa summary { text-wrap: balance; }
p { text-wrap: pretty; }

/* текст только для поисковиков и экранных дикторов */
.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;
}

/* без JavaScript всё показываем сразу */
.no-js [data-reveal] { opacity: 1; translate: none; }
.no-js [data-reveal="clip"]::after, .no-js .loader { display: none; }
a { color: inherit; }
h1, h2, h3 { margin: 0; font-weight: 500; }
p { margin: 0 0 1em; }
::selection { background: var(--red); color: #fff; }

.hand { font-family: var(--hand); font-weight: 500; line-height: 1.1; }

.section { padding: clamp(52px, 7vw, 96px) var(--gutter); max-width: 1320px; margin: 0 auto; }

.eyebrow {
  font-size: 13px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--red);
  font-weight: 600;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.eyebrow::before { content: ""; width: 28px; height: 1px; background: currentColor; }

.h2 {
  font-family: var(--serif);
  font-size: clamp(40px, 6vw, 76px);
  line-height: 1;
  letter-spacing: -.01em;
  margin-bottom: 28px;
}
.h2 em, .footer__big em, .hero__title .line--italic { font-style: italic; color: var(--red); }
.h3 { font-family: var(--serif); font-size: clamp(28px, 3.4vw, 40px); margin: 56px 0 24px; }

/* «красная ручка»: подчёркивание рисуется при появлении */
mark.pen {
  background: none;
  color: inherit;
  position: relative;
  white-space: nowrap;
  background-image: linear-gradient(var(--red), var(--red));
  background-repeat: no-repeat;
  background-position: 0 92%;
  background-size: 0 2px;
  transition: background-size 1s var(--ease-out) .5s;
}
.is-in mark.pen, mark.pen.is-in, [data-reveal].is-in mark.pen { background-size: 100% 2px; }

/* ---------- кнопки ---------- */
.btn {
  --mx: 0px; --my: 0px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px 30px;
  border-radius: 999px;
  font: 600 16px/1 var(--sans);
  text-decoration: none;
  border: 1px solid var(--ink);
  cursor: pointer;
  position: relative;
  overflow: hidden;
  isolation: isolate;
  transform: translate(var(--mx), var(--my));
  transition: transform .35s var(--ease), color .35s, border-color .35s;
}
.btn--primary { background: var(--ink); color: var(--paper); }
.btn--primary::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--red);
  border-radius: inherit;
  transform: translateY(101%);
  transition: transform .45s var(--ease-out);
  z-index: -1;
}
@media (hover: hover) { .btn--primary:hover { border-color: var(--red); } }
@media (hover: hover) { .btn--primary:hover::before { transform: none; } }
.btn--ghost { background: transparent; color: var(--ink); }
@media (hover: hover) { .btn--ghost:hover { background: var(--ink); color: var(--paper); } }
.btn--sm { padding: 11px 20px; font-size: 14px; }
.btn:focus-visible, .link:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 3px;
}

.link {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

/* ---------- заставка ---------- */
.loader {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  background: var(--ink);
  transition: clip-path 1s var(--ease-out) .2s;
  clip-path: inset(0 0 0 0);
  /* страховка: если JS не сработал, заставка всё равно исчезнет */
  animation: loader-fallback 0s 4s forwards;
}
@keyframes loader-fallback { to { visibility: hidden; } }
.loader__mark { width: 120px; fill: none; stroke: var(--paper); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.loader__mark path { stroke-dasharray: 200; stroke-dashoffset: 200; animation: draw 1.1s var(--ease) forwards; }
.loader__mark path:nth-child(2) { animation-delay: .35s; stroke: var(--red); }
body:not(.is-loading) .loader { clip-path: inset(0 0 100% 0); pointer-events: none; }

@keyframes draw { to { stroke-dashoffset: 0; } }

/* ---------- шапка ---------- */
.header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px var(--gutter);
  /* вырезы экрана (iPhone в горизонтальной ориентации) */
  padding-left: max(var(--gutter), env(safe-area-inset-left));
  padding-right: max(var(--gutter), env(safe-area-inset-right));
  transition: padding .4s var(--ease), background .4s, box-shadow .4s, transform .5s var(--ease);
}
.header.is-scrolled {
  padding-top: 12px;
  padding-bottom: 12px;
  background: rgba(245, 239, 228, .82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 1px 0 var(--line);
}
.header.is-hidden { transform: translateY(-100%); }

.logo { font: 600 28px/1 var(--serif); text-decoration: none; letter-spacing: .02em; }
.logo span { color: var(--red); }

.nav { display: flex; align-items: center; gap: 24px; font-size: 15px; font-weight: 500; }
.nav a { text-decoration: none; position: relative; }
.nav a:not(.nav__cta)::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -4px;
  height: 1.5px;
  background: var(--red);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform .4s var(--ease);
}
.nav a.is-active::after { transform: scaleX(1); transform-origin: left; }
@media (hover: hover) { .nav a:not(.nav__cta):hover::after { transform: scaleX(1); transform-origin: left; } }
.nav__cta { padding: 10px 20px; border-radius: 999px; background: var(--ink); color: var(--paper); transition: background .3s; }
.nav .nav__cta { max-width: 180px; white-space: normal; text-align: center; line-height: 1.25; }
@media (hover: hover) { .nav__cta:hover { background: var(--red); } }

.burger { display: none; width: 44px; height: 44px; border: 0; background: none; cursor: pointer; position: relative; z-index: 2; }
.burger span { position: absolute; left: 10px; right: 10px; height: 2px; background: var(--ink); transition: transform .4s var(--ease), top .4s var(--ease); }
.burger span:first-child { top: 17px; }
.burger span:last-child { top: 25px; }
.nav-open .burger span:first-child { top: 21px; transform: rotate(45deg); }
.nav-open .burger span:last-child { top: 21px; transform: rotate(-45deg); }

/* ---------- первый экран ---------- */
.hero {
  min-height: 100vh;   /* старые браузеры */
  min-height: 100svh;  /* мобильные: без учёта выезжающей адресной строки */
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  align-items: center;
  gap: clamp(24px, 5vw, 80px);
  padding: 120px var(--gutter) 80px;
  max-width: 1320px;
  margin: 0 auto;
  position: relative;
}
.hero__kicker { font-size: clamp(24px, 2.6vw, 32px); color: var(--ink-soft); margin-bottom: 18px; }
.rotator { display: inline-grid; vertical-align: bottom; perspective: 700px; }
.rotator b {
  grid-area: 1 / 1;
  position: relative;
  padding-bottom: .16em;
  font-weight: 700;
  color: var(--red);
  white-space: nowrap;
  opacity: 0;
  transform: rotateX(-90deg);
  transform-origin: 50% 50% -.6em;
  backface-visibility: hidden;
  transition: opacity .4s, transform .9s var(--ease-out);
}
.rotator b.is-on { opacity: 1; transform: none; transition-delay: .12s; }
.rotator b.is-off { opacity: 0; transform: rotateX(90deg); }
.rotator .rotator__alt { color: var(--blue); font: italic 600 1.08em/1.05 var(--serif); letter-spacing: .01em; }
.rotator b::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: .2em;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 8'%3E%3Cpath d='M0 4c5-4 10-4 15 0s10 4 15 0' fill='none' stroke='%23000' stroke-width='2.4' stroke-linecap='round'/%3E%3C/svg%3E") left center / auto 100% repeat-x;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 8'%3E%3Cpath d='M0 4c5-4 10-4 15 0s10 4 15 0' fill='none' stroke='%23000' stroke-width='2.4' stroke-linecap='round'/%3E%3C/svg%3E") left center / auto 100% repeat-x;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .8s var(--ease) .6s;
}
.rotator b.is-on::after { transform: scaleX(1); }
.no-js .rotator b:first-child { opacity: 1; transform: none; }
.no-js .rotator b:first-child::after { transform: none; }

.hero__title {
  font-family: var(--serif);
  /* «Геннадьевна» с отступом ≈ 5.6em — размер подобран так, чтобы строка влезала в колонку */
  font-size: clamp(48px, 7.4vw, 124px);
  line-height: .92;
  letter-spacing: -.02em;
  margin-bottom: 32px;
}
/* буквы — inline-block, без nowrap браузер переносит слово по буквам */
.hero__title .line { display: block; white-space: nowrap; }
.hero__title .line--italic { padding-left: .6em; }

[data-split] .ch { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .08em; margin-bottom: -.08em; }
[data-split] .ch > span {
  display: inline-block;
  transform: translateY(110%) rotate(6deg);
  transition: transform 1s var(--ease-out);
  transition-delay: calc(var(--i) * 40ms + .7s);
}
body:not(.is-loading) [data-split] .ch > span { transform: none; }

.hero__lead { font-size: clamp(17px, 1.5vw, 20px); color: var(--ink-soft); max-width: 540px; margin-bottom: 36px; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; }
.hero__also { font-size: 14.5px; color: var(--muted); max-width: 520px; margin: 22px 0 0; }
.hero__cabinet { display: flex; align-items: center; gap: 16px; width: fit-content; max-width: 540px; padding: 16px 20px; margin: -8px 0 28px; border: 1px solid rgba(var(--red-rgb), .3); border-left: 3px solid var(--red); border-radius: 0 16px 16px 0; background: var(--red-soft); text-decoration: none; color: var(--ink); transition: background .25s; }
.hero__cabinet-icon { flex: 0 0 28px; color: var(--red); }
.hero__cabinet strong { display: block; font-size: 16px; line-height: 1.4; }
.hero__cabinet strong span { color: var(--red); margin-left: 6px; }
.hero__cabinet small { display: block; font-size: 13px; line-height: 1.6; color: var(--ink-soft); margin-top: 4px; }
@media (hover: hover) { .hero__cabinet:hover { background: rgba(var(--red-rgb), .22); } }

.hero__visual { position: relative; justify-self: center; width: min(100%, 440px); }
.arch { border-radius: 999px 999px 28px 28px; overflow: hidden; position: relative; z-index: 1; background: var(--paper-2); }
.arch img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; transform: scale(1.08); transition: transform 1.6s var(--ease-out); }
.is-in .arch img, .arch.is-in img { transform: scale(1); }
.arch-outline {
  position: absolute;
  inset: -18px 18px 18px -18px;
  border: 1.5px solid var(--gold);
  border-radius: 999px 999px 28px 28px;
}
.badge {
  position: absolute;
  width: 150px;
  right: -46px;
  top: 14%;
  z-index: 2;
  animation: spin 22s linear infinite;
  /* текст короче окружности с запасом, textLength в разметке равномерно растягивает его по кругу */
  font: 600 14px var(--sans);
  letter-spacing: .1em;
  text-transform: uppercase;
  fill: var(--ink);
  background: var(--paper);
  border-radius: 50%;
}
@keyframes spin { to { transform: rotate(360deg); } }

.note {
  position: absolute;
  left: -64px;
  bottom: 9%;
  z-index: 2;
  background: #fffaf0;
  padding: 16px 22px 14px 18px;
  border-radius: 6px;
  box-shadow: 0 18px 40px -18px rgba(34, 29, 24, .35);
  display: flex;
  align-items: center;
  gap: 12px;
  rotate: -4deg;
}
.note__num { font: 600 52px/1 var(--serif); color: var(--red); position: relative; z-index: 1; }
.note .hand { font-size: 22px; color: var(--ink-soft); }
/* обводка лежит внутри .note__num и центрируется по цифрам */
.note__circle {
  position: absolute;
  left: 50%; top: 52%;
  translate: -52% -50%;
  width: 1.9em;
  overflow: visible;
  z-index: -1;
  fill: none;
  stroke: var(--red);
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-dasharray: 340;
  stroke-dashoffset: 340;
  transition: stroke-dashoffset 1.2s var(--ease) 1.8s;
}
.is-in .note__circle { stroke-dashoffset: 0; }

.scroll-hint {
  position: absolute;
  left: 50%;
  bottom: 24px;
  width: 26px; height: 42px;
  border: 1.5px solid var(--ink-soft);
  border-radius: 20px;
  translate: -50% 0;
}
.scroll-hint span { position: absolute; left: 50%; top: 8px; width: 3px; height: 8px; border-radius: 2px; background: var(--red); translate: -50% 0; animation: wheel 1.8s var(--ease) infinite; }
@keyframes wheel { 0% { opacity: 0; transform: translateY(0); } 30% { opacity: 1; } 100% { opacity: 0; transform: translateY(14px); } }

/* ---------- бегущая строка ---------- */
.marquee {
  overflow: hidden;
  border-block: 1px solid var(--line);
  background: var(--ink);
  color: var(--paper);
  padding: 18px 0;
  rotate: -1.2deg;
  margin: 20px -20px;
}
.marquee__track { display: flex; gap: 32px; width: max-content; animation: marquee 32s linear infinite; font: italic 500 clamp(24px, 3vw, 36px)/1 var(--serif); white-space: nowrap; }
.marquee__track i { color: var(--red); font-style: normal; font-size: .6em; align-self: center; }
@media (hover: hover) { .marquee:hover .marquee__track { animation-play-state: paused; } }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- цифры ---------- */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  max-width: 1320px;
  margin: 0 auto;
  padding: clamp(48px, 6vw, 80px) var(--gutter) 0;
  gap: 24px;
}
.stat { padding-top: 18px; position: relative; }

/* разделительные линии — отдельным слоем, чтобы их можно было «прочертить» при прокрутке */
.stat::before, .steps li::before, .tl::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: var(--line);
  transform-origin: left;
  transition: background .4s;
}
.stat::before { background: var(--ink); }
.stat b { display: block; font: 500 clamp(44px, 5.4vw, 72px)/1 var(--serif); margin-bottom: 10px; }
.stat p { color: var(--ink-soft); font-size: 15px; max-width: 220px; }

/* ---------- обо мне ---------- */
.about { display: grid; grid-template-columns: .8fr 1fr; gap: clamp(32px, 7vw, 110px); align-items: center; }
.about__photo { position: relative; }
.about__photo .arch img { aspect-ratio: 4 / 5; }
.about__caption { position: absolute; right: -24px; bottom: -30px; font-size: 25px; color: var(--red); rotate: -5deg; z-index: 2; text-align: right; background: var(--paper); padding: 8px 14px 10px; border-radius: 6px; box-shadow: 0 14px 30px -18px rgba(34, 29, 24, .4); margin: 0; }
.about__text p { font-size: 18px; color: var(--ink-soft); max-width: 580px; }
.about__sign { font-size: 40px; color: var(--ink); margin-top: 18px; rotate: -3deg; }

/* ---------- карточки ---------- */
.subjects__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 16px; }
.card {
  --rx: 0deg; --ry: 0deg;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 34px 30px 30px;
  position: relative;
  overflow: hidden;
  transform: perspective(900px) rotateX(var(--rx)) rotateY(var(--ry));
  transition: transform .5s var(--ease), box-shadow .5s, border-color .5s;
}
@media (hover: hover) { .card:hover { box-shadow: 0 30px 60px -30px rgba(34, 29, 24, .35); border-color: transparent; } }
.card__letter {
  position: absolute;
  right: 18px; top: -6px;
  font: italic 500 110px/1 var(--serif);
  color: var(--red-soft);
  transition: transform .8s var(--ease-out), color .5s;
  pointer-events: none;
}
@media (hover: hover) { .card:hover .card__letter { transform: translateY(10px) rotate(-6deg); color: rgba(var(--red-rgb), .26); } }
.card h3 { font: 600 32px/1.1 var(--serif); margin-bottom: 20px; position: relative; }
.card p { color: var(--ink-soft); }
.card__note { font-size: 14px; border-top: 1px dashed var(--line); padding-top: 14px; margin: 18px 0 0; }
.card--check { background: var(--ink); color: var(--paper); }
.card--check p, .card--check .ticks li { color: rgba(245, 239, 228, .78); }
.card--check .card__letter { color: rgba(var(--red-rgb), .35); font-style: normal; }

/* главное направление — крупная карточка во всю ширину */
.card--main {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px clamp(32px, 5vw, 72px);
  margin-top: 16px;
  padding: clamp(34px, 4.5vw, 56px);
  border-color: rgba(var(--red-rgb), .35);
  box-shadow: 0 30px 60px -44px rgba(var(--red-rgb), .55);
}
.card--main::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: var(--red); }
.card--main .card__letter { font-size: clamp(130px, 14vw, 200px); right: 28px; top: auto; bottom: -.32em; }
.card--main h3 { font-size: clamp(36px, 4.2vw, 54px); margin-bottom: 18px; }
.card--main .card__head p { font-size: 18px; max-width: 460px; }
.card--main .card__body { position: relative; align-self: center; }
.card--main .ticks { gap: 14px; font-size: 17.5px; }
.card--main .ticks b { color: var(--ink); }
.card__tag { display: inline-block; font-size: 26px; line-height: 1; color: var(--red); rotate: -3deg; margin-bottom: 10px; position: relative; }

/* дополнительные направления — компактнее и тише главного */
.subjects__more { font: 600 13px/1 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin: clamp(40px, 5vw, 64px) 0 0; display: flex; align-items: center; gap: 16px; }
.subjects__more::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.subjects__more em { font-style: normal; color: inherit; }
.subjects__grid--extra .card { padding: 28px 26px 24px; }
.subjects__grid--extra .card h3 { font-size: 26px; margin-bottom: 14px; }
.subjects__grid--extra .card__letter { font-size: 72px; top: -2px; }
.subjects__grid--extra .ticks { gap: 9px; font-size: 15.5px; }
.subjects__grid--extra .card__note { font-size: 13.5px; }

.ticks { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.ticks li { padding-left: 30px; position: relative; color: var(--ink-soft); }
.ticks li::before {
  content: "";
  position: absolute;
  left: 2px; top: .5em;
  width: 14px; height: 8px;
  border-left: 2px solid var(--red);
  border-bottom: 2px solid var(--red);
  transform: rotate(-45deg);
}
.ticks b { color: inherit; font-weight: 700; }
.card--ru .ticks b, .card--en .ticks b { color: var(--ink); }

/* ---------- методика ---------- */
.method__head { max-width: 760px; }
.method__lead { font-size: 19px; color: var(--ink-soft); }
.cabinet { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 32px; margin-top: 36px; padding: clamp(26px, 4vw, 48px); border-radius: var(--radius); background: var(--ink); color: var(--paper); border-top: 4px solid var(--red); }
.cabinet__eyebrow { font: 600 12px/1.6 var(--sans); letter-spacing: .1em; text-transform: uppercase; color: #eac3a7; margin: 0 0 12px; }
.cabinet__title { font: 500 clamp(32px, 4vw, 48px)/1.1 var(--serif); color: var(--paper); margin: 0 0 16px; }
.cabinet__text { max-width: 640px; font-size: 16px; line-height: 1.7; color: var(--paper-2); margin: 0; }
.cabinet__points { display: flex; flex-wrap: wrap; gap: 10px 24px; list-style: none; padding: 0; margin: 24px 0 0; font-size: 13px; color: var(--paper); }
.cabinet__points li { display: flex; align-items: baseline; gap: 8px; }
.cabinet__points li::before { content: "✓"; color: #eac3a7; }
.cabinet__action { text-align: center; }
.cabinet__button { background: var(--paper); color: var(--ink); border-color: var(--paper); white-space: nowrap; }
.cabinet__action p { font-size: 12px; color: var(--paper-2); margin: 12px 0 0; }
@media (hover: hover) { .cabinet__button:hover { background: var(--paper-2); border-color: var(--paper-2); } }
@media (max-width: 860px) { .cabinet { grid-template-columns: 1fr; gap: 24px; } .cabinet__action { text-align: left; } }
@media (max-width: 560px) { .hero__cabinet { padding: 14px; gap: 12px; } .cabinet__button { width: 100%; white-space: normal; line-height: 1.4; } .cabinet__action p { text-align: center; } .cabinet__points { flex-direction: column; } }
.method__body { display: grid; grid-template-columns: 1.2fr .8fr; gap: clamp(32px, 6vw, 90px); margin-top: 40px; align-items: start; }
.steps { list-style: none; margin: 0; padding: 0; }
.steps li { display: grid; grid-template-columns: 80px 1fr; gap: 16px; padding: 28px 0; position: relative; }
.steps li:last-child { border-bottom: 1px solid var(--line); }
/* сдвиг через translate, а не padding: ширина колонки не меняется и текст не переносится заново */
.steps li > * { transition: translate .45s var(--ease); }
@media (hover: hover) { .steps li:hover > * { translate: 12px 0; } }
@media (hover: hover) { .steps li:hover::before { background: var(--red); } }
.steps__n { font: italic 500 44px/1 var(--serif); color: var(--red); }
.steps h3 { font: 600 22px/1.25 var(--sans); margin-bottom: 6px; }
.steps p { color: var(--ink-soft); margin: 0; }
.method__photo { border-radius: var(--radius); overflow: hidden; position: sticky; top: 110px; }
.method__photo img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; scale: 1.1; }

/* ---------- мини-игра ---------- */
.game__box {
  background:
    linear-gradient(90deg, transparent 54px, rgba(var(--red-rgb), .5) 54px, rgba(var(--red-rgb), .5) 56px, transparent 56px),
    repeating-linear-gradient(transparent 0 35px, rgba(60, 110, 170, .16) 35px 36px),
    #fffdf7;
  border-radius: var(--radius);
  padding: clamp(36px, 6vw, 70px) clamp(24px, 6vw, 90px) clamp(32px, 5vw, 56px) clamp(76px, 9vw, 130px);
  box-shadow: 0 40px 80px -50px rgba(34, 29, 24, .45);
  text-align: center;
}
.game__box .eyebrow { justify-content: center; }
.game__hint { color: var(--ink-soft); max-width: 520px; margin: 0 auto 32px; }
.game__word {
  font: 500 clamp(52px, 10vw, 120px)/1.3 var(--serif);
  min-height: 1.4em;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  -webkit-user-select: none;
  user-select: none;
}
.game__word span { display: inline-block; position: relative; animation: letter-in .6s var(--ease-out) backwards; animation-delay: calc(var(--i) * 35ms); }
.game__word button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0 .02em;
  cursor: pointer;
  position: relative;
  border-radius: 10px;
  transition: color .2s, background .2s;
}
@media (hover: hover) { .game__word button:hover { color: var(--red); background: var(--red-soft); } }
.game__word button.is-right { color: #2f8a4c; background: none; }
.game__word button.is-right::after {
  content: "´";
  position: absolute;
  left: 50%; top: -.28em;
  translate: -40% 0;
  animation: drop .4s var(--ease-out);
}
.game__word button.is-wrong { color: var(--red); animation: shake .45s; text-decoration: line-through; text-decoration-thickness: 3px; }
.game__word.is-done button { pointer-events: none; }
.game__result { font: 500 30px/1.2 var(--hand); color: var(--red); min-height: 1.3em; margin: 6px 0 24px; }
.game__result.ok { color: #2f8a4c; }
.game__footer { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; border-top: 1px dashed var(--line); padding-top: 22px; }
.game__score { color: var(--ink-soft); font-size: 15px; }

/* «Вставьте букву» */
.letters__tabs { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: -10px 0 28px; }
.letters__word {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: baseline;
  min-height: 1.4em;
  font: 500 clamp(44px, 8.5vw, 100px)/1.3 var(--serif);
  overflow-wrap: anywhere;
}
.letters__gap {
  display: inline-block;
  min-width: .62em;
  margin: 0 .03em;
  border-bottom: 3px dashed rgba(60, 110, 170, .55);
  color: rgba(60, 110, 170, .55);
  text-align: center;
  line-height: 1.05;
}
.letters__gap.is-right, .letters__gap.is-fixed { border-bottom-style: solid; animation: drop .45s var(--ease-out); }
.letters__gap.is-right { color: #2f8a4c; border-color: #2f8a4c; }
.letters__gap.is-fixed { color: var(--red); border-color: var(--red); }
.letters__opts { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; margin: 22px 0 6px; }
.letters__opt {
  min-width: 78px;
  height: 78px;
  padding: 0 20px;
  border: 1px solid var(--ink);
  border-radius: 18px;
  background: #fffdf7;
  color: var(--ink);
  font: 500 42px/1 var(--serif);
  cursor: pointer;
  box-shadow: 0 14px 26px -20px rgba(34, 29, 24, .5);
  transition: background .25s, color .25s, border-color .25s, transform .3s var(--ease);
}
@media (hover: hover) { .letters__opt:not(:disabled):hover { background: var(--ink); color: var(--paper); transform: translateY(-3px) rotate(-2deg); } }
.letters__opt:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; }
.letters__opt:disabled { cursor: default; opacity: .45; }
.letters__opt.is-right { opacity: 1; border-color: #2f8a4c; background: #e6f3ea; color: #1f5f33; }
.letters__opt.is-wrong { opacity: 1; border-color: var(--red); background: var(--red-soft); color: var(--red); text-decoration: line-through; animation: shake .45s; }
.letters__note { max-width: 580px; min-height: 3.2em; margin: 14px auto 18px; color: var(--ink-soft); }
.letters__note b { font: 500 26px/1.1 var(--hand); margin-right: 4px; }
.letters__note.ok b { color: #2f8a4c; }
.letters__note.no b { color: var(--red); }

@keyframes letter-in { from { opacity: 0; transform: translateY(40%); } }
@keyframes drop { from { opacity: 0; transform: translateY(-.3em); } }
@keyframes shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }

/* ---------- цены ---------- */
.prices__sub { color: var(--ink-soft); margin: -12px 0 40px; }
.prices__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.prices__grid--2 { grid-template-columns: repeat(2, 1fr); max-width: 880px; }
.prices__grid--1 { grid-template-columns: minmax(0, 440px); }

/* вкладки групп цен */
.ptabs {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 5px;
  margin-bottom: 30px;
  background: var(--paper-2);
  border-radius: 999px;
}
.ptabs__tab {
  border: 0;
  background: none;
  padding: 11px 22px;
  border-radius: 999px;
  font: 600 15px/1.2 var(--sans);
  color: var(--ink-soft);
  cursor: pointer;
  transition: background .35s var(--ease), color .35s;
}
.ptabs__tab.is-active { background: var(--ink); color: var(--paper); }
@media (hover: hover) { .ptabs__tab:not(.is-active):hover { color: var(--red); } }
.pgroup .prices__sub { margin: 0 0 28px; }
.pgroup + .pgroup { margin-top: 48px; }
.pgroup__title { font: 600 30px/1.2 var(--serif); margin: 0 0 10px; }
/* с JavaScript группы показываются по одной, без — все подряд с заголовками */
.js .ptabs + .pgroup, .js .pgroup + .pgroup { margin-top: 0; }
.js .ptabs ~ .pgroup:not(.is-active) { display: none; }
.js .ptabs ~ .pgroup .pgroup__title { display: none; }
.js .pgroup.is-entering { animation: pgroup-in .55s var(--ease-out); }
@keyframes pgroup-in { from { opacity: 0; translate: 0 18px; } }
.price__value small { font: 500 15px/1 var(--sans); color: var(--muted); margin-left: 8px; white-space: nowrap; }
.price--accent .price__value small { color: rgba(245, 239, 228, .6); }
.price {
  --rx: 0deg; --ry: 0deg;
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  padding: 34px 30px;
  position: relative;
  background: var(--paper);
  transform: perspective(900px) rotateX(var(--rx)) rotateY(var(--ry));
  transition: transform .5s var(--ease), background .4s;
}
@media (hover: hover) { .price:hover { background: var(--card); } }
.price__name { font-weight: 600; text-transform: uppercase; letter-spacing: .12em; font-size: 13px; color: var(--muted); }
.price__value { font: 500 clamp(54px, 6vw, 80px)/1 var(--serif); margin: 6px 0 18px; }
.price p:last-of-type { color: var(--ink-soft); margin: 0; }
.price--accent { background: var(--ink); color: var(--paper); border-color: var(--ink); }
@media (hover: hover) { .price--accent:hover { background: #2c2620; } }
.price--accent .price__name { color: rgba(245, 239, 228, .6); }
.price--accent p:last-of-type { color: rgba(245, 239, 228, .75); }
.price__tag { position: absolute; top: -18px; right: 26px; background: var(--red); color: #fff; font-size: 24px; padding: 4px 16px 6px; border-radius: 6px; rotate: 6deg; }
.prices__extra { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 28px; }
.extra { display: flex; gap: 16px; align-items: center; padding: 18px 0; border-bottom: 1px dashed var(--line); }
.extra b { font: 600 30px/1 var(--serif); color: var(--red); min-width: 92px; }
.extra p { margin: 0; color: var(--ink-soft); font-size: 15px; }

/* ---------- опыт ---------- */
.timeline { display: grid; gap: 0; }
.tl { display: grid; grid-template-columns: 160px 1fr auto; gap: 24px; padding: 30px 0; align-items: start; position: relative; }
.tl:last-child { border-bottom: 1px solid var(--line); }
.tl__when { font: italic 500 34px/1 var(--serif); color: var(--red); }
.tl h3 { font: 600 22px/1.3 var(--sans); margin-bottom: 6px; }
.tl p { color: var(--ink-soft); margin: 0; max-width: 640px; }

/* шашечная доска с прыгающей шашкой */
.board { display: grid; grid-template-columns: repeat(3, 22px); grid-auto-rows: 22px; position: relative; border: 1px solid var(--ink); }
.board i:nth-child(odd) { background: var(--ink); }
.board i:nth-child(even) { background: var(--card); }
.piece {
  position: absolute;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--red);
  box-shadow: inset 0 0 0 3px rgba(255, 255, 255, .35);
  left: 3px; top: 47px;
  animation: hop 3.2s var(--ease) infinite;
}
@keyframes hop {
  0%, 15% { transform: translate(0, 0); }
  35%, 50% { transform: translate(22px, -22px) scale(1); }
  42% { transform: translate(11px, -30px) scale(1.15); }
  70%, 85% { transform: translate(44px, -44px); }
  100% { transform: translate(0, 0); }
}

.certs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.cert {
  --rx: 0deg; --ry: 0deg;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 24px 22px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transform: perspective(900px) rotateX(var(--rx)) rotateY(var(--ry));
  transition: transform .5s var(--ease), box-shadow .5s;
}
@media (hover: hover) { .cert:hover { box-shadow: 0 24px 50px -30px rgba(34, 29, 24, .35); } }
.cert__hours { font: 600 30px/1 var(--serif); color: var(--red); }
.cert p { margin: 0; flex: 1; font-weight: 500; }
.cert__year { font-size: 14px; color: var(--muted); }
.cert__year.hand { font-size: 22px; color: var(--red); }
.cert--now { border-style: dashed; border-color: var(--red); }

/* ---------- доверие ---------- */
.trust { padding-top: 0; }
.trust__inner {
  display: flex;
  gap: 28px;
  align-items: center;
  background: var(--paper-2);
  border-radius: var(--radius);
  padding: clamp(28px, 4vw, 48px);
}
.trust__icon { width: 64px; flex: none; fill: none; stroke: var(--red); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.trust h3 { font: 600 28px/1.2 var(--serif); margin-bottom: 8px; }
.trust p { margin: 0; color: var(--ink-soft); max-width: 760px; }

/* ---------- запись: тетрадный лист ---------- */
.contact-way__note { flex-basis: 100%; margin: 4px 0 0; font-size: 14px; color: var(--ink-soft); }
.contact-way__note b { color: var(--ink); }
.chips.is-invalid legend { color: var(--red); }
.chips.is-invalid span { border-color: var(--red); }
.signup { display: grid; grid-template-columns: .8fr 1.2fr; gap: clamp(28px, 5vw, 70px); align-items: center; }
.signup__photo { position: relative; border-radius: 999px 999px 28px 28px; }
.signup__photo img { border-radius: 999px 999px 28px 28px; aspect-ratio: 3 / 4; object-fit: cover; width: 100%; }
.signup__bubble {
  position: absolute;
  right: -24px; top: 12%;
  background: var(--red);
  color: #fff;
  font-size: 28px;
  padding: 14px 22px 16px;
  border-radius: 24px 24px 24px 4px;
  rotate: 6deg;
  animation: bob 4s ease-in-out infinite;
}
@keyframes bob { 50% { transform: translateY(-10px); } }

.notebook {
  --rule: 44px;
  background:
    linear-gradient(90deg, transparent 46px, rgba(var(--red-rgb), .5) 46px, rgba(var(--red-rgb), .5) 48px, transparent 48px),
    #fffdf7;
  border-radius: var(--radius);
  padding: clamp(32px, 4.5vw, 56px) clamp(22px, 4.5vw, 56px) clamp(32px, 4.5vw, 56px) clamp(64px, 7vw, 96px);
  box-shadow: 0 40px 80px -50px rgba(34, 29, 24, .45);
  position: relative;
}
.notebook__lead { color: var(--ink-soft); margin-top: -10px; }

.form { display: grid; gap: 18px; margin-top: 26px; }
.form__row { display: grid; grid-template-columns: 1.4fr 1fr; gap: 18px; }
.field { display: grid; gap: 2px; position: relative; }
.field > span, .chips legend { font-size: 13px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.field input, .field select, .field textarea {
  font: 500 22px/1.5 var(--hand);
  font-size: 26px;
  color: #22457a;
  background: transparent;
  border: 0;
  border-bottom: 1.5px solid rgba(60, 110, 170, .3);
  border-radius: 0;
  padding: 6px 2px;
  width: 100%;
  transition: border-color .3s;
  resize: vertical;
  appearance: none;
}
.field select {
  cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 14px) 55%, calc(100% - 8px) 55%;
  background-size: 6px 6px;
  background-repeat: no-repeat;
}
.field input::placeholder, .field textarea::placeholder { color: rgba(34, 69, 122, .35); }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--red); }
.field.is-invalid input { border-color: var(--red); }
.field input:disabled { cursor: not-allowed; border-bottom-style: dashed; opacity: .55; }
.field:has(input:disabled) > span { opacity: .55; }
.field.is-invalid > span { color: var(--red); }

.chips { border: 0; padding: 0; margin: 0; display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.chips legend { margin-bottom: 8px; float: left; width: 100%; }
.chips label { cursor: pointer; }
.chips input { position: absolute; opacity: 0; }
.chips span { display: inline-block; padding: 8px 18px; border-radius: 999px; border: 1px solid var(--line); font-size: 15px; font-weight: 500; transition: background .3s, color .3s, border-color .3s; }
.chips input:checked + span { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.chips input:focus-visible + span { outline: 2px solid var(--red); outline-offset: 2px; }

.agree { display: flex; gap: 12px; align-items: flex-start; font-size: 14px; color: var(--ink-soft); cursor: pointer; }
.agree input { width: 20px; height: 20px; accent-color: var(--red); margin: 1px 0 0; flex: none; }
.agree.is-invalid { color: var(--red); }

.form__submit { justify-self: start; margin-top: 6px; }
.form__submit.is-loading { pointer-events: none; }
.form__submit.is-loading span { opacity: .4; }
.form__submit.is-loading::after {
  content: "";
  position: absolute;
  width: 20px; height: 20px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
.form__error { color: var(--red); font-weight: 500; min-height: 1.2em; margin: 0; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

.success { text-align: center; padding: 30px 0 10px; }
.success:not([hidden]) { animation: letter-in .6s var(--ease-out); }
.success__mark { width: 160px; margin: 0 auto 8px; fill: none; stroke: var(--red); stroke-width: 5; stroke-linecap: round; stroke-linejoin: round; }
.success__mark path { stroke-dasharray: 500; stroke-dashoffset: 500; animation: draw 1.2s var(--ease) forwards; }
.success__mark .success__five { animation-delay: .7s; stroke-width: 7; }
.success h3 { font: 600 40px/1.1 var(--serif); margin-bottom: 8px; }
.success p { color: var(--ink-soft); }

/* ---------- подвал ---------- */
.footer {
  background: var(--ink);
  color: var(--paper);
  padding: clamp(64px, 9vw, 120px) var(--gutter) calc(28px + env(safe-area-inset-bottom));
  margin-top: 40px;
}
.footer address { font-style: normal; }
.footer__big { font: 500 clamp(54px, 11vw, 170px)/.9 var(--serif); letter-spacing: -.02em; max-width: 1320px; margin: 0 auto; }
.footer__contacts { display: flex; flex-wrap: wrap; gap: 14px; max-width: 1320px; margin: 48px auto 72px; }
.footer__contacts a { text-decoration: none; padding: 14px 24px; border: 1px solid rgba(245, 239, 228, .25); border-radius: 999px; transition: background .3s, color .3s, border-color .3s; }
@media (hover: hover) { .footer__contacts a:hover { background: var(--red); border-color: var(--red); } }
.footer__bottom { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; max-width: 1320px; margin: 0 auto; padding-top: 22px; border-top: 1px solid rgba(245, 239, 228, .15); font-size: 14px; color: rgba(245, 239, 228, .6); }

/* ---------- политика ---------- */
.policy { max-width: 620px; width: calc(100% - 32px); border: 0; border-radius: var(--radius); padding: 40px 36px 28px; background: var(--card); color: var(--ink); }
.policy::backdrop { background: rgba(34, 29, 24, .55); backdrop-filter: blur(4px); }
.policy[open] { animation: letter-in .4s var(--ease-out); }
.policy h3 { font: 600 30px/1.15 var(--serif); margin-bottom: 18px; padding-right: 30px; }
.policy p { color: var(--ink-soft); font-size: 15px; }
.policy__close { position: absolute; right: 18px; top: 14px; border: 0; background: none; font-size: 32px; line-height: 1; cursor: pointer; color: var(--ink); }

/* ---------- отзывы (включаются в конструкторе) ---------- */
.reviews__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 20px; }
.review {
  --rx: 0deg; --ry: 0deg;
  margin: 0;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 34px 30px 28px;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 22px;
  transform: perspective(900px) rotateX(var(--rx)) rotateY(var(--ry));
  transition: transform .5s var(--ease), box-shadow .5s;
}
.review::before { content: "“"; position: absolute; top: -10px; right: 24px; font: 500 110px/1 var(--serif); color: var(--red-soft); }
.review blockquote { margin: 0; color: var(--ink-soft); flex: 1; position: relative; }
.review figcaption { display: grid; gap: 2px; border-top: 1px dashed var(--line); padding-top: 16px; }
.review figcaption b { font: 600 22px/1.2 var(--serif); }
.review figcaption span { font-size: 14px; color: var(--muted); }
@media (hover: hover) { .review:hover { box-shadow: 0 24px 50px -30px rgba(34, 29, 24, .35); } }

/* ---------- текстовый блок (добавляется в конструкторе) ---------- */
.textblock__body { max-width: 760px; }
.textblock__body p { font-size: 18px; color: var(--ink-soft); }
.textblock__body .btn { margin-top: 12px; }
.textblock--photo { display: grid; grid-template-columns: .8fr 1fr; gap: clamp(32px, 6vw, 90px); align-items: center; }
.textblock__photo { position: relative; border-radius: var(--radius); overflow: hidden; }
.textblock__photo img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
@media (max-width: 860px) {
  .textblock--photo { grid-template-columns: 1fr; }
  .textblock__photo { max-width: 440px; }
}

/* ---------- частые вопросы ---------- */
.faq__list { max-width: 920px; border-top: 1px solid var(--ink); }
.qa { border-bottom: 1px solid var(--line); }
.qa summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding: 24px 0;
  font: 600 clamp(17px, 1.7vw, 21px)/1.35 var(--sans);
  transition: color .3s;
}
.qa summary::-webkit-details-marker { display: none; }
.qa summary::after {
  content: "";
  flex: none;
  width: 38px; height: 38px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background:
    linear-gradient(var(--ink), var(--ink)) center / 12px 1.5px no-repeat,
    linear-gradient(var(--ink), var(--ink)) center / 1.5px 12px no-repeat;
  transition: rotate .45s var(--ease), background-color .3s, border-color .3s;
}
.qa[open] summary::after {
  rotate: 135deg;
  border-color: var(--red);
  background:
    linear-gradient(#fff, #fff) center / 12px 1.5px no-repeat,
    linear-gradient(#fff, #fff) center / 1.5px 12px no-repeat,
    var(--red);
}
.qa summary:focus-visible { outline: 2px solid var(--red); outline-offset: 4px; }
@media (hover: hover) { .qa summary:hover { color: var(--red); } }
.qa__body p { color: var(--ink-soft); max-width: 740px; margin: 0; padding: 0 62px 26px 0; }
.qa[open] .qa__body { animation: letter-in .5s var(--ease-out); }

/* плавное раскрытие там, где браузер умеет анимировать height: auto */
@supports (interpolate-size: allow-keywords) {
  .faq { interpolate-size: allow-keywords; }
  .qa::details-content {
    block-size: 0;
    overflow: hidden;
    transition: block-size .45s var(--ease), content-visibility .45s allow-discrete;
  }
  .qa[open]::details-content { block-size: auto; }
  .qa[open] .qa__body { animation: none; }
}

/* ---------- появление при прокрутке ----------
   Базовый вариант (и для первого экрана): одноразовый переход по классу .is-in.
   Сдвиг — свойством translate, а не transform: transform занят наклоном карточек. */
[data-reveal] { opacity: 0; translate: 0 36px; transition: opacity .9s var(--ease-out), translate 1.1s var(--ease-out); transition-delay: var(--d, 0s); }
[data-reveal].is-in { opacity: 1; translate: none; }
/* фото открывается «шторкой» цвета бумаги. Не clip-path: полностью обрезанный
   элемент IntersectionObserver и lazy-загрузка считают невидимым */
[data-reveal="clip"] { opacity: 1; translate: none; }
[data-reveal="clip"]::after {
  content: "";
  position: absolute;
  inset: -40px -2px -2px;
  background: var(--paper);
  transform-origin: top;
  transition: transform 1.3s var(--ease-out) var(--d, 0s);
  z-index: 3;
  pointer-events: none;
}
[data-reveal="clip"].is-in::after { transform: scaleY(0); }

/* Где браузер умеет (Chrome, Edge, Safari 26+), анимация привязана к прокрутке:
   начинается, как только блок показался снизу, и заканчивается, когда его верх
   поднялся на ~38% высоты экрана.
   --rs — сдвиг начала для «лесенки» (выставляет JS из --d). */
.progress { display: none; }

@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    section:not(.hero) [data-reveal]:not([data-reveal="clip"]) {
      opacity: 1;
      translate: none;
      transition: none;
      animation: sr-rise linear both;
      animation-timeline: view();
      animation-range: entry calc(var(--rs, 0) * 1vh) entry calc(38vh + var(--rs, 0) * 1vh);
    }
    /* :not(.x) только поднимает специфичность до уровня правила выше */
    section:not(.hero) .h2[data-reveal]:not(.x) { animation-name: sr-title; }
    section:not(.hero) :is(.card, .price, .cert, .review, .tcard)[data-reveal]:not(.x) { animation-name: sr-card; }
    section:not(.hero) :is(.steps li, .tl)[data-reveal]:not(.x) { animation-name: sr-left; }

    section:not(.hero) [data-reveal="clip"] { view-timeline: --photo; }
    section:not(.hero) [data-reveal="clip"]::after {
      transition: none;
      animation: sr-curtain linear both;
      animation-timeline: --photo;
      animation-range: entry 0% entry 50vh;
    }

    /* линии-разделители прочерчиваются слева направо */
    .stat, .steps li, .tl { view-timeline: --row; }
    .stat::before, .steps li::before, .tl::before {
      animation: sr-line linear both;
      animation-timeline: --row;
      animation-range: entry 5% entry 45vh;
    }
    .eyebrow::before { animation: sr-line linear both; animation-timeline: view(); animation-range: entry 0% entry 30vh; transform-origin: left; }

    /* тонкая красная полоса прогресса чтения сверху */
    .progress {
      display: block;
      position: fixed;
      top: 0; left: 0; right: 0;
      height: 2px;
      background: var(--red);
      transform-origin: left;
      z-index: 60;
      animation: sr-line linear both;
      animation-timeline: scroll(root);
    }
  }
}

@keyframes sr-rise { from { opacity: 0; translate: 0 70px; } }
@keyframes sr-title { from { opacity: 0; translate: -60px 0; filter: blur(8px); } }
@keyframes sr-card { from { opacity: 0; translate: 0 110px; scale: .9; } }
@keyframes sr-left { from { opacity: 0; translate: -60px 0; } }
@keyframes sr-curtain { from { transform: scaleY(1); } to { transform: scaleY(0); } }
@keyframes sr-line { from { scale: 0 1; } }

/* ---------- тренажёры: блок на главной ---------- */
.practice__head { max-width: 760px; }
.practice__lead { font-size: 18px; color: var(--ink-soft); }
.practice__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 380px), 1fr)); gap: 22px; margin-top: 36px; }
.tcard {
  --rx: 0deg; --ry: 0deg;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-decoration: none;
  color: inherit;
  padding: 30px 28px 24px 76px;
  border-radius: var(--radius);
  background:
    linear-gradient(90deg, transparent 50px, rgba(var(--red-rgb), .45) 50px, rgba(var(--red-rgb), .45) 52px, transparent 52px),
    repeating-linear-gradient(transparent 0 33px, rgba(60, 110, 170, .12) 33px 34px),
    #fffdf7;
  box-shadow: 0 30px 60px -45px rgba(34, 29, 24, .5);
  transform: perspective(900px) rotateX(var(--rx)) rotateY(var(--ry));
  transition: transform .5s var(--ease), box-shadow .5s;
}
.tcard__kind { position: absolute; top: 16px; right: 22px; font-size: 22px; color: var(--red); rotate: 4deg; }
.tcard__emoji { font-size: 46px; line-height: 1; align-self: flex-start; transition: transform .6s var(--ease-out); }
.tcard__meta { font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.tcard__title { font: 600 clamp(28px, 3vw, 36px)/1.05 var(--serif); }
.tcard__title em { color: var(--red); }
.tcard p { color: var(--ink-soft); margin: 0; flex: 1; }
.tcard__foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; border-top: 1px dashed var(--line); padding-top: 14px; margin-top: 6px; font-size: 14px; color: var(--muted); }
.tcard__go { display: inline-flex; gap: 8px; font-weight: 600; color: var(--ink); }
.tcard__go i { font-style: normal; color: var(--red); transition: translate .4s var(--ease); }
.tcard:focus-visible { outline: 2px solid var(--red); outline-offset: 4px; }
@media (hover: hover) {
  .tcard:hover { box-shadow: 0 44px 70px -40px rgba(34, 29, 24, .55); }
  .tcard:hover .tcard__emoji { transform: rotate(-10deg) scale(1.1); }
  .tcard:hover .tcard__go i { translate: 6px 0; }
}

/* ---------- страница тренажёра ---------- */
.header--page .nav--page { gap: 24px; }
.trainer { padding-top: 120px; }
.trainer__back { display: inline-block; font-size: 15px; font-weight: 500; color: var(--ink-soft); text-decoration: none; margin-bottom: 26px; transition: color .3s, translate .3s var(--ease); }
@media (hover: hover) { .trainer__back:hover { color: var(--red); translate: -4px 0; } }
.trainer__head { position: relative; max-width: 1000px; padding-right: 150px; margin-bottom: 34px; }
.trainer__head .h2 { font-size: clamp(42px, 6.4vw, 84px); margin-bottom: 18px; }
.trainer__lead { font-size: 18px; color: var(--ink-soft); max-width: 680px; margin: 0; }
.trainer__emoji { position: absolute; right: 0; top: 6px; font-size: 96px; line-height: 1; rotate: 8deg; animation: bob 5s ease-in-out infinite; }
.muted { color: var(--muted); }

.cards-app__nojs { color: var(--ink-soft); }
.tr-top { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 24px; margin-bottom: 18px; }
.tr-decks { margin: 0; }
.ptabs__tab small { margin-left: 7px; font-weight: 500; opacity: .55; }
.tr-groups { display: flex; flex-wrap: wrap; gap: 8px; }
.tr-chip {
  border: 1px solid var(--line);
  background: none;
  border-radius: 999px;
  padding: 8px 16px;
  font: 500 14px/1.2 var(--sans);
  color: var(--ink-soft);
  cursor: pointer;
  transition: background .3s, color .3s, border-color .3s;
}
.tr-chip small { margin-left: 6px; color: var(--muted); }
.tr-chip.is-on { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.tr-chip.is-on small { color: rgba(245, 239, 228, .6); }
@media (hover: hover) { .tr-chip:not(.is-on):hover { border-color: var(--ink); color: var(--ink); } }

.tr-modes { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 28px; }
.tr-mode {
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 12px;
  align-items: center;
  text-align: left;
  padding: 14px 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--card);
  font: inherit;
  color: var(--ink);
  cursor: pointer;
  transition: border-color .3s, background .3s, color .3s, transform .35s var(--ease), box-shadow .35s;
}
.tr-mode__ico { grid-row: 1 / 3; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; background: var(--red-soft); color: var(--red); transition: background .3s, color .3s; }
.tr-mode__ico svg, .btn__ico svg { width: 20px; height: 20px; display: block; }
.btn__ico svg { width: 16px; height: 16px; }
.tr-mode b { font-size: 16px; font-weight: 700; line-height: 1.2; }
.tr-mode small { font-size: 13px; line-height: 1.3; color: var(--muted); }
.tr-mode.is-on { background: var(--ink); border-color: var(--ink); color: var(--paper); box-shadow: 0 22px 40px -26px rgba(34, 29, 24, .7); }
.tr-mode.is-on small { color: rgba(245, 239, 228, .6); }
.tr-mode.is-on .tr-mode__ico { background: var(--red); color: #fff; }
@media (hover: hover) { .tr-mode:not(.is-on):hover { border-color: var(--ink); transform: translateY(-2px); } }
.tr-mode:focus-visible, .tr-chip:focus-visible, .ptabs__tab:focus-visible, .fc__nav-btn:focus-visible,
.quiz__opt:focus-visible, .match__tile:focus-visible, .ans:focus-visible, .lesson__dots button:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; }
.tr-stage.is-entering { animation: pgroup-in .55s var(--ease-out); }
.tr-keys { text-align: center; font-size: 13px; color: var(--muted); margin: 18px 0 0; }

/* карточка с переворотом */
.fc-wrap { max-width: 720px; margin: 0 auto; }
.fc {
  display: block;
  width: 100%;
  height: clamp(300px, 40vw, 380px);
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  color: inherit;
  cursor: pointer;
  perspective: 1400px;
  touch-action: pan-y;
  -webkit-user-select: none;
  user-select: none;
}
.fc__inner { position: relative; display: block; width: 100%; height: 100%; transform-style: preserve-3d; transition: transform .75s var(--ease-out); }
.fc.is-flipped .fc__inner { transform: rotateY(180deg); }
.fc__face {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 48px 28px;
  border-radius: var(--radius);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  box-shadow: 0 40px 80px -50px rgba(34, 29, 24, .55);
}
.fc__face--front {
  background:
    linear-gradient(transparent 58px, rgba(var(--red-rgb), .45) 58px, rgba(var(--red-rgb), .45) 60px, transparent 60px),
    repeating-linear-gradient(transparent 0 35px, rgba(60, 110, 170, .13) 35px 36px),
    #fffdf7;
}
.fc__face--back { transform: rotateY(180deg); background: var(--ink); color: var(--paper); }
.fc:focus-visible .fc__face { outline: 2px solid var(--red); outline-offset: 4px; }
.fc__tag { position: absolute; top: 20px; left: 24px; font-size: 12px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--red); }
.fc__face--back .fc__tag { color: rgba(245, 239, 228, .5); }
.fc__emoji { font-size: clamp(48px, 7vw, 66px); line-height: 1; }
.fc__word { font: 500 clamp(40px, 6.4vw, 68px)/1.05 var(--serif); text-align: center; overflow-wrap: anywhere; }
.fc__sub { font-size: 17px; color: var(--muted); text-align: center; }
.fc__face--back .fc__sub { color: rgba(245, 239, 228, .65); }
.fc__back { font: 700 clamp(40px, 6.4vw, 64px)/1.05 var(--hand); text-align: center; overflow-wrap: anywhere; }
.fc__forms { display: flex; flex-wrap: wrap; justify-content: center; align-items: baseline; gap: 14px; font: 500 clamp(34px, 5.6vw, 58px)/1.1 var(--serif); }
.fc__forms b { font-weight: 500; opacity: .45; }
.fc__forms span + span::before { content: "·"; color: var(--red); margin-right: 14px; }
.fc__hint { position: absolute; bottom: 18px; font-size: 13px; color: var(--muted); }
.fc.is-in-next { animation: fc-in-next .5s var(--ease-out); }
.fc.is-in-prev { animation: fc-in-prev .5s var(--ease-out); }
@keyframes fc-in-next { from { opacity: 0; translate: 60px 0; rotate: 2deg; } }
@keyframes fc-in-prev { from { opacity: 0; translate: -60px 0; rotate: -2deg; } }
.fc__controls { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 14px; margin-top: 24px; }
.fc__nav-btn {
  width: 52px; height: 52px;
  display: grid;
  place-items: center;
  padding: 0 0 4px;
  border: 1px solid var(--ink);
  border-radius: 50%;
  background: none;
  color: var(--ink);
  font: 400 30px/1 var(--serif);
  cursor: pointer;
  transition: background .3s, color .3s;
}
@media (hover: hover) { .fc__nav-btn:hover { background: var(--ink); color: var(--paper); } }
.fc__count { min-width: 76px; text-align: center; font-weight: 600; font-variant-numeric: tabular-nums; }

/* тест */
.quiz, .match, .spell { max-width: 820px; margin: 0 auto; }
.quiz { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(24px, 4vw, 44px); }
.quiz__top, .spell__top { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 12px; font-size: 12px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.quiz__score { color: #2f8a4c; }
.quiz__track { height: 3px; margin-bottom: 34px; border-radius: 3px; background: var(--line); overflow: hidden; }
.quiz__track span { display: block; width: 0; height: 100%; background: var(--red); transition: width .5s var(--ease-out); }
.quiz__label { text-align: center; color: var(--ink-soft); margin-bottom: 6px; }
.quiz__q { display: block; text-align: center; font: 500 clamp(36px, 5.6vw, 60px)/1.1 var(--serif); margin-bottom: 32px; overflow-wrap: anywhere; }
.quiz__opts { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.quiz__opt {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--paper);
  font: 500 18px/1.3 var(--sans);
  color: var(--ink);
  cursor: pointer;
  transition: border-color .25s, background .25s, color .25s, transform .3s var(--ease);
}
.quiz__num { flex: none; width: 28px; height: 28px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 50%; font-size: 13px; color: var(--muted); transition: inherit; }
@media (hover: hover) { .quiz__opt:not(:disabled):hover { border-color: var(--ink); transform: translateY(-2px); } }
.quiz__opt:disabled { cursor: default; }
.quiz__opt.is-right { border-color: #2f8a4c; background: #e6f3ea; color: #1f5f33; }
.quiz__opt.is-right .quiz__num { border-color: #2f8a4c; background: #2f8a4c; color: #fff; }
.quiz__opt.is-wrong { border-color: var(--red); background: var(--red-soft); color: var(--red); animation: shake .45s; }
.quiz__opt.is-wrong .quiz__num { border-color: var(--red); background: var(--red); color: #fff; }
.quiz__body.is-entering, .spell.is-entering { animation: letter-in .45s var(--ease-out); }

/* пары */
.match__info { text-align: center; color: var(--ink-soft); margin-bottom: 20px; }
.match__grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(12px, 3vw, 40px); }
.match__col { display: grid; gap: 12px; align-content: start; }
.match__tile {
  min-height: 64px;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--card);
  font: 500 17px/1.25 var(--sans);
  color: var(--ink);
  cursor: pointer;
  transition: border-color .25s, background .25s, color .25s, opacity .4s, transform .3s var(--ease);
}
.match__col:first-child .match__tile { font: 500 24px/1.1 var(--serif); }
@media (hover: hover) { .match__tile:not(:disabled):not(.is-picked):hover { border-color: var(--ink); transform: translateY(-2px); } }
.match__tile.is-picked { border-color: var(--ink); background: var(--ink); color: var(--paper); transform: translateY(-2px); }
.match__tile.is-done { border-color: #2f8a4c; background: #e6f3ea; color: #1f5f33; opacity: .5; transform: scale(.97); cursor: default; }
.match__tile.is-wrong { border-color: var(--red); animation: shake .45s; }

/* письмо */
.spell {
  text-align: center;
  padding: clamp(28px, 4vw, 44px) clamp(20px, 4vw, 44px) clamp(28px, 4vw, 40px) clamp(64px, 8vw, 96px);
  border-radius: var(--radius);
  background:
    linear-gradient(90deg, transparent 46px, rgba(var(--red-rgb), .45) 46px, rgba(var(--red-rgb), .45) 48px, transparent 48px),
    #fffdf7;
  box-shadow: 0 40px 80px -50px rgba(34, 29, 24, .45);
}
.spell__emoji { display: block; font-size: 56px; line-height: 1; margin: 8px 0 10px; }
.spell__prompt { display: block; font: 500 clamp(32px, 5vw, 52px)/1.1 var(--serif); overflow-wrap: anywhere; }
.spell__hint { color: var(--ink-soft); margin: 6px 0 22px; }
.spell__input {
  display: block;
  width: min(100%, 460px);
  margin: 0 auto;
  padding: 4px 6px;
  border: 0;
  border-bottom: 2px solid rgba(60, 110, 170, .35);
  border-radius: 0;
  background: transparent;
  text-align: center;
  font: 500 36px/1.3 var(--hand);
  color: #22457a;
  outline: none;
  transition: border-color .3s, color .3s;
}
.spell__input::placeholder { color: rgba(34, 69, 122, .3); }
.spell__input:focus { border-color: var(--red); }
.spell__input.is-right { border-color: #2f8a4c; color: #2f8a4c; }
.spell__input.is-wrong { border-color: var(--red); color: var(--red); text-decoration: line-through; animation: shake .45s; }
.spell__feedback { min-height: 1.6em; margin: 14px 0 18px; font-weight: 600; color: var(--ink-soft); }
.spell__feedback.is-right { color: #2f8a4c; }
.spell__feedback.is-wrong { color: var(--red); }
.spell__feedback b { font: 700 26px/1 var(--hand); color: var(--ink); margin-left: 4px; }
.spell__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }

/* итог раунда */
.tr-result { text-align: center; padding: 16px 0 4px; }
.tr-result__mark { position: relative; display: grid; place-items: center; width: 180px; height: 150px; margin: 0 auto 8px; }
.tr-result__ring { position: absolute; inset: 0; }
.tr-result__ring svg { width: 100%; height: 100%; fill: none; stroke: var(--red); stroke-width: 4; stroke-linecap: round; stroke-dasharray: 500; stroke-dashoffset: 500; animation: draw 1.2s var(--ease) .2s forwards; }
.tr-result__mark .hand { font-size: 58px; font-weight: 700; color: var(--red); rotate: -4deg; }
.tr-result h3 { font: 600 clamp(32px, 4vw, 42px)/1.1 var(--serif); margin-bottom: 8px; }
.tr-result p { color: var(--ink-soft); }
.tr-result__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 18px; }

/* словарик под тренажёром */
.glossary { max-width: 820px; margin: 56px auto 0; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--line); }
.glossary summary { justify-content: flex-start; gap: 8px; }
.glossary summary::after { margin-left: auto; }
.glossary summary .muted { font-weight: 500; }
.glossary__scroll { overflow-x: auto; padding-bottom: 20px; }
.glossary__table { width: 100%; border-collapse: collapse; font-size: 16px; }
.glossary__table td, .glossary__table th { padding: 10px 14px 10px 0; border-bottom: 1px dashed var(--line); text-align: left; vertical-align: top; }
.glossary__table td:first-child { width: 36px; }
.glossary__table b { font-weight: 600; }
.glossary__sep th { padding-top: 28px; font: 600 24px/1.2 var(--serif); border-bottom-color: var(--ink); }

/* урок по шагам */
.lesson__bar { display: flex; align-items: center; gap: 18px; max-width: 980px; margin: 0 auto 22px; }
.lesson__track { flex: 1; height: 4px; border-radius: 4px; background: var(--line); overflow: hidden; }
.lesson__track span { display: block; width: 0; height: 100%; background: var(--red); transition: width .6s var(--ease-out); }
.lesson__count { font-size: 14px; font-weight: 600; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.lesson { display: grid; gap: 28px; max-width: 980px; margin: 0 auto; }
.step {
  position: relative;
  padding: clamp(28px, 4vw, 46px) clamp(20px, 4vw, 46px) clamp(28px, 4vw, 42px) clamp(76px, 8vw, 100px);
  border-radius: var(--radius);
  background:
    linear-gradient(90deg, transparent 56px, rgba(var(--red-rgb), .45) 56px, rgba(var(--red-rgb), .45) 58px, transparent 58px),
    #fffdf7;
  box-shadow: 0 40px 80px -50px rgba(34, 29, 24, .45);
  scroll-margin-top: 100px;
}
.step.is-enter-next { animation: step-in-next .6s var(--ease-out); }
.step.is-enter-prev { animation: step-in-prev .6s var(--ease-out); }
@keyframes step-in-next { from { opacity: 0; translate: 60px 0; } }
@keyframes step-in-prev { from { opacity: 0; translate: -60px 0; } }
/* номер шага — на полях */
.step__num { position: absolute; left: 0; top: clamp(32px, 4.4vw, 52px); width: 56px; text-align: center; font: italic 500 30px/1 var(--serif); color: var(--red); }
.step__head { display: grid; grid-template-columns: 1fr auto; gap: 18px; align-items: start; }
.step__badge { font-size: 12px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--red); margin-bottom: 8px; }
.step__title { font: 500 clamp(32px, 4.4vw, 52px)/1.05 var(--serif); }
.step__title em { color: var(--red); }
.step__time { font-size: 24px; color: var(--muted); rotate: -4deg; white-space: nowrap; }
.step > .step__text, .step > .vocab, .step > .rules, .step > .tasks { margin-top: 24px; }
.step__text p { font-size: 18px; color: var(--ink-soft); max-width: 720px; }
.step__text p:last-child { margin-bottom: 0; }
.step__text em { font-style: normal; font-weight: 600; color: var(--red); }
.step__text b { color: var(--ink); }
.vocab { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr)); gap: 12px; }
.vcard { display: grid; gap: 2px; padding: 16px 18px; border: 1px solid var(--line); border-radius: 16px; background: var(--card); transition: transform .35s var(--ease), box-shadow .35s; }
@media (hover: hover) { .vcard:hover { transform: translateY(-3px) rotate(-.6deg); box-shadow: 0 20px 40px -28px rgba(34, 29, 24, .5); } }
.vcard__emoji { font-size: 28px; line-height: 1.2; }
.vcard b { font: 600 24px/1.1 var(--serif); }
.vcard__tr { font-size: 14px; color: var(--muted); }
.vcard__ru { font: 500 23px/1.15 var(--hand); color: var(--red); }
.rules { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 14px; }
.rule { padding: 22px 22px 18px; border: 1px solid var(--line); border-radius: 18px; background: var(--card); }
.rule h3 { font: 600 23px/1.2 var(--serif); margin-bottom: 12px; }
.rule h3 em { color: var(--red); }
.rule ul { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.rule li { position: relative; padding-left: 18px; line-height: 1.5; color: var(--ink-soft); }
.rule li::before { content: ""; position: absolute; left: 0; top: .62em; width: 7px; height: 7px; border: 1.5px solid var(--red); border-radius: 50%; }
.rule li b { color: var(--ink); }
.tasks__title { font: 600 26px/1.2 var(--serif); margin-bottom: 8px; }
.tasks__list { display: grid; margin: 0; padding: 0; list-style: none; counter-reset: task; }
.tasks__list li { position: relative; padding: 12px 0 12px 46px; border-bottom: 1px dashed var(--line); font-size: 18px; line-height: 1.9; counter-increment: task; }
.tasks__list li::before { content: counter(task); position: absolute; left: 0; top: 15px; width: 28px; height: 28px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 50%; font: 600 13px/1 var(--sans); color: var(--muted); }
.tasks__list s { text-decoration-color: var(--red); text-decoration-thickness: 2px; color: var(--muted); }
.task__arrow { color: var(--muted); }
/* пропуск с ответом: открывается по нажатию */
.ans {
  position: relative;
  display: inline-block;
  max-width: 100%;
  min-width: 3em;
  margin: 0 .12em;
  padding: 0 .3em;
  border: 0;
  border-bottom: 2px dashed rgba(60, 110, 170, .5);
  border-radius: 6px 6px 0 0;
  background: rgba(60, 110, 170, .07);
  font: 700 1.3em/1.25 var(--hand);
  color: var(--red);
  text-align: center;
  vertical-align: baseline;
  cursor: pointer;
  transition: background .3s, border-color .3s;
}
.ans__text { visibility: hidden; }
.ans::after { content: "?"; position: absolute; inset: 0; display: grid; place-items: center; font: 700 15px/1 var(--sans); color: rgba(60, 110, 170, .65); }
.ans.is-open { background: none; border-bottom-color: transparent; }
.ans.is-open::after { content: none; }
.ans.is-open .ans__text { visibility: visible; animation: ans-in .45s var(--ease-out); }
@keyframes ans-in { from { opacity: 0; filter: blur(6px); translate: 0 6px; } }
@media (hover: hover) { .ans:not(.is-open):hover { background: rgba(60, 110, 170, .16); } }
.no-js .ans__text { visibility: visible; }
.no-js .ans::after, .no-js [data-reveal-all], .no-js .tasks__hint { display: none; }
.tasks__foot { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; margin-top: 18px; }
.tasks__hint { font-size: 14px; color: var(--muted); }
.step__note { margin: 24px 0 0; padding: 16px 20px; border-left: 3px solid var(--red); border-radius: 0 14px 14px 0; background: var(--red-soft); }
.lesson__nav { display: flex; justify-content: space-between; align-items: center; gap: 16px; max-width: 980px; margin: 28px auto 0; }
.lesson__prev:disabled { opacity: .3; pointer-events: none; }
.lesson__dots { display: flex; flex-wrap: wrap; justify-content: center; gap: 7px; }
.lesson__dots button { width: 10px; height: 10px; padding: 0; border: 0; border-radius: 50%; background: var(--line); cursor: pointer; transition: background .3s, transform .3s var(--ease); }
.lesson__dots button.is-done { background: rgba(var(--red-rgb), .4); }
.lesson__dots button[aria-current] { background: var(--red); transform: scale(1.45); }

/* конец страницы тренажёра: запись и другие тренажёры */
.trainer-end { padding-top: clamp(24px, 4vw, 48px); }
.trainer-end__cta { text-align: center; padding: clamp(40px, 6vw, 72px) clamp(22px, 5vw, 60px); border-radius: var(--radius); background: var(--ink); color: var(--paper); }
.trainer-end__cta .hand { font-size: 30px; color: var(--red); margin-bottom: 6px; rotate: -3deg; }
.trainer-end__cta .h2 { margin-bottom: 14px; }
.trainer-end__cta p:not(.hand) { max-width: 560px; margin: 0 auto 26px; color: rgba(245, 239, 228, .75); }
.trainer-end__cta .btn--primary { background: var(--paper); color: var(--ink); border-color: var(--paper); }
@media (hover: hover) { .trainer-end__cta .btn--primary:hover { color: #fff; border-color: var(--red); } }
.trainer-end__cta + .h3 { margin-top: 72px; }
.trainer-end .practice__grid { margin-top: 0; }

/* ==========================================================================
   Адаптив
   ========================================================================== */
@media (max-width: 1080px) {
  .subjects__grid, .prices__grid--3 { grid-template-columns: 1fr 1fr; }
  .card--check { grid-column: 1 / -1; }
  .card--main { grid-template-columns: 1fr; }
  .prices__grid--3 .price:last-child { grid-column: 1 / -1; }
  .certs { grid-template-columns: 1fr 1fr; }
  .badge { right: -20px; width: 130px; }
  .nav { gap: 8px; font-size: 14px; }
  .nav a { white-space: nowrap; }
  .nav .nav__cta { max-width: 140px; }
  .note { left: -30px; }
}

@media (max-width: 860px) {
  body { font-size: 16px; }
  .burger { display: block; }
  .nav {
    position: fixed;
    inset: 0;
    flex-direction: column;
    justify-content: center;
    gap: 22px;
    background: var(--paper);
    font: 500 34px/1.1 var(--serif);
    clip-path: circle(0 at calc(100% - 38px) 38px);
    transition: clip-path .7s var(--ease-out);
    visibility: hidden;
  }
  .nav-open .nav { clip-path: circle(150% at calc(100% - 38px) 38px); visibility: visible; }
  .nav__cta { font: 600 17px/1 var(--sans); padding: 16px 30px; margin-top: 10px; }
  .nav .nav__cta { max-width: calc(100vw - 48px); }
  .nav-open { overflow: hidden; }
  /* backdrop-filter делает шапку контейнером для fixed-меню — на время меню убираем */
  .nav-open .header { backdrop-filter: none; -webkit-backdrop-filter: none; background: transparent; box-shadow: none; }

  .hero { grid-template-columns: 1fr; padding-top: 100px; text-align: left; gap: 48px; }
  .hero__title { font-size: clamp(44px, 12.5vw, 110px); }
  .hero__visual { width: min(82%, 380px); }
  .scroll-hint { display: none; }
  .stats { grid-template-columns: 1fr 1fr; }
  .about, .signup, .method__body { grid-template-columns: 1fr; }
  .about__photo { width: min(85%, 400px); margin: 0 auto; }
  .method__photo { position: relative; top: 0; max-width: 420px; }
  .signup__photo { width: min(70%, 320px); margin: 0 auto; }
  .signup__bubble { right: -30px; }
  .prices__extra { grid-template-columns: 1fr; gap: 0; }
  .tl { grid-template-columns: 1fr; gap: 8px; }
  .tl .board { justify-self: start; margin-top: 10px; }

  /* на страницах тренажёров меню из двух ссылок — остаётся в шапке */
  .header--page .nav--page { position: static; flex-direction: row; gap: 16px; clip-path: none; visibility: visible; background: none; font: 500 15px/1 var(--sans); }
  .header--page .nav__cta { margin: 0; padding: 10px 16px; font-size: 14px; }
  .trainer { padding-top: 96px; }
  .trainer__head { padding-right: 0; }
  .trainer__emoji { position: static; display: block; width: max-content; font-size: 58px; margin-bottom: 14px; rotate: -6deg; animation: none; }
  .tr-modes { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 560px) {
  .subjects__grid, .prices__grid, .certs { grid-template-columns: 1fr; }
  .card--check, .price:last-child { grid-column: auto; }
  .ptabs { display: flex; border-radius: 22px; }
  .ptabs__tab { flex: 1 1 auto; padding: 10px 14px; font-size: 14px; }
  .hero__title .line--italic { padding-left: .3em; }
  .hero__actions .btn { flex: 1 1 100%; }
  .badge { width: 104px; right: -14px; top: 6%; }
  .note { left: -14px; padding: 12px 16px 10px 14px; }
  .note__num { font-size: 42px; }
  .note .hand { font-size: 19px; }
  .stats { gap: 28px 18px; }
  .steps li { grid-template-columns: 54px 1fr; }
  .steps__n { font-size: 34px; }
  .form__row { grid-template-columns: 1fr; }
  .notebook { padding-left: 58px; background: linear-gradient(90deg, transparent 38px, rgba(var(--red-rgb), .5) 38px, rgba(var(--red-rgb), .5) 40px, transparent 40px), #fffdf7; }
  .game__box { padding-left: 62px; padding-right: 20px; background: linear-gradient(90deg, transparent 40px, rgba(var(--red-rgb), .5) 40px, rgba(var(--red-rgb), .5) 42px, transparent 42px), repeating-linear-gradient(transparent 0 35px, rgba(60, 110, 170, .16) 35px 36px), #fffdf7; }
  .game__footer { justify-content: center; }
  .letters__opt { min-width: 66px; height: 66px; font-size: 36px; }
  .trust__inner { flex-direction: column; align-items: flex-start; }
  .qa__body p { padding-right: 0; }
  .qa summary { padding: 20px 0; }
  .marquee { rotate: -2deg; }

  .tcard { padding: 26px 20px 22px 58px; background: linear-gradient(90deg, transparent 36px, rgba(var(--red-rgb), .45) 36px, rgba(var(--red-rgb), .45) 38px, transparent 38px), repeating-linear-gradient(transparent 0 33px, rgba(60, 110, 170, .12) 33px 34px), #fffdf7; }
  .tcard__kind { font-size: 19px; top: 12px; right: 16px; }
  .tr-top { gap: 12px; }
  .tr-decks { width: 100%; }
  .tr-mode { grid-template-columns: 1fr; justify-items: center; row-gap: 6px; padding: 12px 10px; text-align: center; }
  .tr-mode__ico { grid-row: auto; width: 36px; height: 36px; }
  .tr-mode small { display: none; }
  .fc { height: 300px; }
  .fc__face { padding: 44px 18px; }
  .fc__controls .fc__shuffle { flex-basis: 100%; max-width: 220px; }
  .quiz__opts { grid-template-columns: 1fr; }
  .quiz__opt { padding: 14px; font-size: 17px; }
  .match__tile { min-height: 56px; padding: 10px; font-size: 15px; }
  .match__col:first-child .match__tile { font-size: 19px; }
  .spell { padding-left: 52px; padding-right: 16px; background: linear-gradient(90deg, transparent 34px, rgba(var(--red-rgb), .45) 34px, rgba(var(--red-rgb), .45) 36px, transparent 36px), #fffdf7; }
  .spell__input { font-size: 30px; }
  .step { padding-left: 50px; padding-right: 18px; background: linear-gradient(90deg, transparent 36px, rgba(var(--red-rgb), .45) 36px, rgba(var(--red-rgb), .45) 38px, transparent 38px), #fffdf7; }
  .step__num { width: 36px; font-size: 21px; }
  .step__head { grid-template-columns: 1fr; gap: 6px; }
  .step__time { justify-self: start; font-size: 21px; }
  .step__text p, .tasks__list li { font-size: 16px; }
  .tasks__list li { padding-left: 38px; }
  .tasks__list li::before { width: 26px; height: 26px; top: 14px; }
  .lesson__bar { gap: 12px; }
  .lesson__dots { display: none; }
  .lesson__nav .btn { flex: 1 1 0; padding-inline: 14px; }
  .glossary__table { font-size: 15px; }
}

/* совсем узкие телефоны (iPhone SE 1-го поколения, старые Android) */
@media (max-width: 380px) {
  .hero__kicker { font-size: 21px; }
  .rotator b { white-space: nowrap; }
  .btn { padding: 15px 22px; }
  .notebook { padding-right: 18px; }
}

/* телефон в горизонтальной ориентации: меню не помещается по высоте */
@media (max-width: 860px) and (max-height: 520px) {
  .nav { font-size: 24px; gap: 12px; justify-content: safe center; overflow-y: auto; padding: 70px 0 24px; }
  .hero { padding-top: 90px; }
}

/* предпросмотр в конструкторе: без анимаций появления и «зерна» бумаги — меньше нагрузка при частых правках */
body.is-preview::before { display: none; }
body.is-preview [data-reveal] { opacity: 1; translate: none; animation: none !important; transition: none; }
body.is-preview [data-reveal="clip"]::after { display: none; }

@media print {
  body::before, .loader, .progress, .header, .marquee, .scroll-hint, .badge, .game, .lesson__nav, .lesson__bar, .tasks__foot, .trainer-end,
  .signup__photo, .form, .footer__contacts a[href^="https"] { display: none !important; }
  body { background: #fff; }
  [data-reveal] { opacity: 1 !important; translate: none !important; animation: none !important; }
  [data-reveal="clip"]::after { display: none !important; }
  .footer { background: #fff; color: var(--ink); }
  .hero { min-height: 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; transition-delay: 0s !important; }
  html { scroll-behavior: auto; }
}
