@import url("tokens.css");
@import url("fonts.css");

/*
 * Слои вида. Контракт — docs/design-contract.md.
 *   1. reset       обнуление, базовые элементы, фокус
 *   2. base        контейнер, секции, типографика, заголовки
 *   3. primitives  btn, link-arrow, tag, field, eyebrow, crumbs
 *   4. components  оболочка, карточки, cta, подвал, floating
 *   5. patterns    герой, bento, курсы, документы, контакты, медиа
 *   6. utilities   helper-классы, reveal, иконки-фолбэки
 *   7. responsive  @media; брейкпоинты — docs/tokens.md
 *
 * Legacy-хвост в конце файла — замороженные переопределения.
 * Новые правила туда не пишутся; перенос в слой — 004, с computed diff.
 */

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4, p, figure { margin: 0; }
svg { display: block; }

::selection { background: var(--orange-dark); color: var(--white); }

:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 3px;
}

/* ============ base ============ */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.section { padding: 92px 0; position: relative; }
.section--tight { padding: 56px 0; }
.section--paper2 { background: var(--paper-2); }

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -0.02em;
}

h1 { font-size: clamp(40px, 5.6vw, 76px); }
h2 { font-size: clamp(30px, 3.6vw, 52px); }
h3 { font-size: clamp(22px, 2vw, 30px); line-height: 1.2; }
h4 { font-size: 20px; line-height: 1.3; }

.lead {
  font-size: clamp(17px, 1.4vw, 20px);
  line-height: 1.55;
  color: var(--ink-2);
}

.muted { color: var(--ink-3); }
.small { font-size: 13px; line-height: 1.5; }
.hand { font-family: var(--font-hand); font-weight: 600; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.eyebrow::before {
  content: "";
  width: 22px;
  height: 1px;
  background: var(--orange);
}
.eyebrow .num { color: var(--text-accent); font-family: var(--font-display); font-size: 14px; letter-spacing: 0; }

.head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
  margin-bottom: 44px;
}
.head__text { max-width: 720px; }
.head h2 { margin-top: 14px; }
.head__aside { flex: 0 0 auto; max-width: 360px; color: var(--ink-3); font-size: 14px; }

/* ============ buttons ============ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 16px 26px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: var(--ink);
  color: var(--paper);
  font-size: 14px;
  font-weight: 500;
  line-height: 1;
  cursor: pointer;
  transition: transform 0.25s ease, background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}
.btn svg { width: 16px; height: 16px; transition: transform 0.25s ease; }
@media (hover: hover) {
  .btn:hover { background: var(--orange-dark); transform: translateY(-2px); }
  .btn:hover svg { transform: translateX(4px); }
}
.btn--orange { background: var(--orange-dark); color: var(--white-pure); }
@media (hover: hover) {
  .btn--orange:hover { background: var(--orange-deep); }
}
.btn--outline { background: transparent; color: var(--ink); border-color: var(--line-strong); }
@media (hover: hover) {
  .btn--outline:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }
}
.btn--sm { padding: 12px 18px; font-size: 13px; }

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 500;
  border-bottom: 1px solid var(--line-strong);
  padding-bottom: 6px;
  transition: color 0.2s ease, border-color 0.2s ease;
}
.link-arrow svg { width: 15px; height: 15px; transition: transform 0.2s ease; }
@media (hover: hover) {
  .link-arrow:hover { color: var(--orange); border-color: var(--orange); }
  .link-arrow:hover svg { transform: translateX(4px); }
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 13px;
  border-radius: 999px;
  background: var(--orange-soft);
  color: var(--text-accent);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.tag--sage { background: var(--sage-soft); color: var(--sage-ink); }
.tag--ink { background: var(--ink); color: var(--paper); }
a, button, .btn { touch-action: manipulation; }

/* ============ header ============ */
.topbar {
  background: var(--ink);
  color: rgba(247, 241, 230, 0.82);
  font-size: 12.5px;
}
.topbar__in {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 40px;
}
.topbar__group { display: flex; align-items: center; gap: 22px; }
.topbar__item { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.topbar__item svg { width: 14px; height: 14px; opacity: 0.7; }
@media (hover: hover) {
  .topbar a:hover { color: var(--white); }
}

.header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(247, 241, 230, 0.92);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
  transition: box-shadow 0.3s ease;
}
.header.is-scrolled { box-shadow: 0 12px 30px -24px rgba(22, 41, 59, 0.5); }
.header__in {
  display: flex;
  align-items: center;
  gap: 32px;
  min-height: 82px;
}
.brand { display: flex; align-items: center; gap: 12px; flex: 0 0 auto; }
.brand__mark {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  overflow: hidden;
  flex: 0 0 auto;
  background: var(--paper);
  border: 1px solid var(--line);
}
.brand__mark img { width: 100%; height: 100%; object-fit: cover; }
.brand__text { display: flex; flex-direction: column; line-height: 1.12; }
.brand__name { font-family: var(--font-display); font-size: 19px; font-weight: 600; letter-spacing: -0.02em; }
.brand__sub { font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-3); margin-top: 3px; }

.nav { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.nav__item { position: relative; }
.nav__link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 12px 12px;
  font-size: 14px;
  font-weight: 500;
  border-radius: 999px;
  transition: background 0.2s ease, color 0.2s ease;
  white-space: nowrap;
}
.nav__link svg { width: 10px; height: 10px; opacity: 0.55; transition: transform 0.2s ease; }
@media (hover: hover) {
  .nav__link:hover { background: rgba(22, 41, 59, 0.06); }
  .nav__item:hover .nav__link svg { transform: rotate(180deg); }
}
.nav__item.is-active > .nav__link { color: var(--orange); }

.dropdown {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  min-width: 290px;
  padding: 10px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
}
@media (hover: hover) {
  .nav__item:hover .dropdown { opacity: 1; visibility: visible; transform: none; }
}
.dropdown::before { content: ""; position: absolute; left: 0; right: 0; top: -24px; height: 24px; }
.dropdown a {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 9px 12px;
  border-radius: 10px;
  font-size: 13.5px;
  color: var(--ink-2);
}
@media (hover: hover) {
  .dropdown a:hover { background: var(--paper); color: var(--ink); }
}
.dropdown a span { color: var(--ink-3); font-size: 12px; }
.dropdown__label { padding: 10px 12px 4px; font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-3); }
.dropdown--wide { min-width: 420px; display: grid; grid-template-columns: 1fr 1fr; }

.header__cta { display: flex; align-items: center; gap: 14px; flex: 0 0 auto; }
.header__phone { display: flex; flex-direction: column; line-height: 1.2; text-align: right; }
.header__phone a { font-weight: 600; font-size: 14px; white-space: nowrap; }
.header__phone span { font-size: 10.5px; color: var(--ink-3); }

.burger {
  display: none;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  background: transparent;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
}
.burger span { width: 18px; height: 1.5px; background: var(--ink); transition: transform 0.3s ease, opacity 0.3s ease; }
.burger.is-open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.burger.is-open span:nth-child(2) { opacity: 0; }
.burger.is-open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

.mobile-nav {
  display: none;
  position: fixed;
  inset: 0;
  top: 0;
  z-index: 55;
  background: var(--paper);
  padding: 120px var(--gutter) 40px;
  overflow-y: auto;
}
.mobile-nav.is-open { display: block; }
.mobile-nav__group { border-top: 1px solid var(--line); padding: 16px 0; }
.mobile-nav__group a { display: flex; align-items: center; min-height: 24px; font-family: var(--font-display); font-size: 22px; padding: 6px 0; }
.mobile-nav__sub a { font-family: var(--font-sans); font-size: 15px; color: var(--ink-2); padding: 4px 0 4px 16px; }
.mobile-nav__title { font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 6px; }
.mobile-nav__contacts { display: flex; flex-direction: column; gap: 8px; margin-top: 24px; font-size: 15px; }

/* ============ hero (home) ============ */
.hero {
  position: relative;
  overflow: hidden;
  padding: 56px 0 34px;
  background:
    radial-gradient(1100px 520px at 78% -10%, rgba(233, 184, 92, 0.28), transparent 65%),
    radial-gradient(900px 500px at -5% 30%, rgba(125, 144, 112, 0.16), transparent 60%),
    var(--paper);
}
.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(0, 0.98fr);
  align-items: center;
  gap: 52px;
}
.hero__kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px 8px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: rgba(255, 253, 249, 0.5);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.hero__kicker b {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 9px;
  border-radius: 999px;
  background: var(--orange-dark);
  color: var(--white-pure);
  font-size: 10px;
  letter-spacing: 0.06em;
}
.hero h1 { margin: 22px 0 24px; font-size: clamp(38px, 4.5vw, 66px); }
.hero h1 em {
  font-style: italic;
  color: var(--orange);
  position: relative;
  white-space: nowrap;
}
.hero h1 em::after {
  content: "";
  position: absolute;
  left: 2%;
  right: 0;
  bottom: -0.06em;
  height: 0.14em;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='12' viewBox='0 0 200 12'%3E%3Cpath d='M2 8C40 2 80 2 120 6c30 3 55 3 78-2' fill='none' stroke='%23e8602c' stroke-width='3' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat center / 100% 100%;
}
.hero__lead { max-width: 520px; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 30px; }
.hero__stats {
  display: flex;
  gap: 34px;
  margin-top: 44px;
  padding-top: 26px;
  border-top: 1px solid var(--line);
}
.hero__stat b { display: block; font-family: var(--font-display); font-size: 30px; font-weight: 600; letter-spacing: -0.03em; line-height: 1; }
.hero__stat span { display: block; margin-top: 7px; font-size: 12px; color: var(--ink-3); max-width: 120px; line-height: 1.35; }

.hero__visual { position: relative; min-height: 560px; }
.hero__photo {
  position: absolute;
  border-radius: 200px 200px 26px 26px;
  overflow: hidden;
  border: 6px solid var(--white);
  box-shadow: var(--shadow);
}
.hero__photo img { width: 100%; height: 100%; object-fit: cover; }
.hero__photo--main {
  width: 74%;
  height: 92%;
  right: 6%;
  top: 0;
}
.hero__photo--side {
  width: 43%;
  height: 44%;
  left: 0;
  bottom: 4%;
  border-radius: 22px;
  transform: rotate(-4deg);
}
.hero__sticker {
  position: absolute;
  z-index: 3;
  right: -2%;
  bottom: 12%;
  width: 148px;
  height: 148px;
  border-radius: 50%;
  background: var(--orange-dark);
  color: var(--white-pure);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  transform: rotate(8deg);
  box-shadow: 0 18px 40px -20px rgba(232, 96, 44, 0.8);
}
.hero__sticker b { font-family: var(--font-display); font-size: 30px; line-height: 1; }
.hero__sticker span { font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; margin-top: 6px; line-height: 1.35; }
.hero__note {
  position: absolute;
  z-index: 4;
  left: 4%;
  top: 6%;
  font-family: var(--font-hand);
  font-size: 25px;
  color: var(--ink-2);
  transform: rotate(-6deg);
  max-width: 150px;
  line-height: 1.05;
}
.hero__note svg { width: 54px; height: 34px; margin-top: 2px; transform: rotate(140deg); opacity: 0.55; }

/* ============ marquee ============ */
.marquee {
  background: var(--ink);
  color: var(--paper);
  overflow: hidden;
  padding: 16px 0;
  border-top: 1px solid rgba(247, 241, 230, 0.12);
  border-bottom: 1px solid rgba(247, 241, 230, 0.12);
}
.marquee__track { display: flex; gap: 0; width: max-content; animation: marquee 40s linear infinite; }
@media (hover: hover) {
  .marquee:hover .marquee__track { animation-play-state: paused; }
}
.marquee__item {
  display: inline-flex;
  align-items: center;
  gap: 26px;
  padding-right: 26px;
  font-family: var(--font-display);
  font-size: 17px;
  white-space: nowrap;
}
.marquee__item svg { width: 14px; height: 14px; color: var(--gold); flex: 0 0 auto; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ============ intro ============ */
.intro { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 64px; align-items: start; }
.intro__quote {
  position: relative;
  padding: 38px 34px 34px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.intro__quote::before {
  content: "“";
  position: absolute;
  top: -32px;
  left: 24px;
  font-family: var(--font-display);
  font-size: 110px;
  line-height: 1;
  color: var(--orange);
}
.intro__quote p { font-family: var(--font-display); font-size: clamp(20px, 2vw, 27px); line-height: 1.35; }
.intro__quote footer { margin-top: 22px; display: flex; align-items: center; gap: 12px; font-size: 13px; color: var(--ink-3); }
.intro__quote footer b { color: var(--ink); font-weight: 600; }
.intro__body p + p { margin-top: 16px; }
.intro__body .lead { color: var(--ink); }
.intro__sign {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 28px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}
.intro__sign img { width: 52px; height: 52px; border-radius: 50%; object-fit: cover; }
.intro__sign b { display: block; font-size: 14px; }
.intro__sign span { font-size: 12px; color: var(--ink-3); }
.intro__sign .hand { margin-left: auto; font-size: 24px; color: var(--text-accent); transform: rotate(-4deg); }

/* ============ program cards ============ */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }

.card-program {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}
@media (hover: hover) {
  .card-program:hover { transform: translateY(-6px); box-shadow: var(--shadow); border-color: transparent; }
}
.card-program__media { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: var(--paper-2); }
.card-program__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s ease; }
@media (hover: hover) {
  .card-program:hover .card-program__media img { transform: scale(1.05); }
}
.card-program__tag { position: absolute; top: 14px; left: 14px; z-index: 2; }
.card-program__body { display: flex; flex-direction: column; flex: 1; padding: 22px 22px 20px; }
.card-program__body h3 { font-size: 24px; }
.card-program__body p { margin-top: 8px; font-size: 14px; color: var(--ink-3); }
.card-program__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  font-size: 12px;
  color: var(--ink-2);
}
.card-program__meta span { display: inline-flex; align-items: center; gap: 6px; }
.card-program__meta svg { width: 13px; height: 13px; color: var(--orange); }
.card-program__go {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 18px;
  font-size: 13px;
  font-weight: 600;
}
.card-program__go svg { width: 17px; height: 17px; transition: transform 0.25s ease; }
@media (hover: hover) {
  .card-program:hover .card-program__go svg { transform: translateX(4px); }
}

.card-program--mini .card-program__media { aspect-ratio: 16 / 10; }
.card-program--mini .card-program__body h3 { font-size: 20px; }

/* ============ benefits ============ */
.bento {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 18px;
}
.bento__item {
  padding: 30px;
  border-radius: var(--radius);
  background: var(--white);
  border: 1px solid var(--line);
  position: relative;
  overflow: hidden;
}
.bento__item h3 { font-size: 24px; }
.bento__item p { margin-top: 9px; font-size: 14px; color: var(--ink-3); max-width: 34ch; }
.bento__item--a { grid-column: span 5; background: var(--ink); color: var(--paper); }
.bento__item--a p { color: rgba(247, 241, 230, 0.7); }
.bento__item--b { grid-column: span 4; }
.bento__item--c { grid-column: span 3; background: var(--orange-dark); color: var(--white-pure); border-color: transparent; }
.bento__item--c p { color: var(--white-pure); }
.bento__item--d { grid-column: span 4; background: var(--sage-soft); }
.bento__item--e { grid-column: span 4; }
.bento__item--f { grid-column: span 4; background: var(--gold); border-color: transparent; }
.bento__item--f p { color: var(--ink); }
.bento__num {
  display: block;
  font-family: var(--font-display);
  font-size: 46px;
  line-height: 1;
  color: var(--orange);
  margin-bottom: 18px;
}
.bento__item--a .bento__num,
.bento__item--c .bento__num { color: var(--gold); }
.bento__item--f .bento__num { color: var(--ink); }

/* ============ stats strip ============ */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.stats__item { padding: 28px 26px; border-right: 1px solid var(--line); }
.stats__item:last-child { border-right: 0; }
.stats__item b { display: block; font-family: var(--font-display); font-size: clamp(34px, 3.4vw, 48px); font-weight: 600; line-height: 1; letter-spacing: -0.03em; }
.stats__item span { display: block; margin-top: 8px; font-size: 12.5px; color: var(--ink-3); }

/* ============ teachers ============ */

/* ============ gallery strip ============ */
.gallery-strip { overflow: hidden; }
.gallery-strip__track { display: flex; gap: 16px; width: max-content; animation: marquee 60s linear infinite; }
@media (hover: hover) {
  .gallery-strip:hover .gallery-strip__track { animation-play-state: paused; }
}
.gallery-strip__item {
  width: 260px;
  aspect-ratio: 3 / 4;
  border-radius: 18px;
  overflow: hidden;
  flex: 0 0 auto;
  background: var(--paper-2);
}
.gallery-strip__item:nth-child(even) { transform: translateY(22px); }
.gallery-strip__item img { width: 100%; height: 100%; object-fit: cover; }

/* ============ reviews ============ */
.review {
  display: flex;
  flex-direction: column;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
}
.review p { font-size: 14.5px; line-height: 1.6; color: var(--ink-2); }
.review footer { display: flex; align-items: center; gap: 12px; margin-top: auto; padding-top: 22px; }
.review footer img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; }
.review footer b { display: block; font-size: 13.5px; }
.review footer span { font-size: 11.5px; color: var(--ink-3); }

/* ============ news ============ */

/* ============ cta ============ */
.cta {
  position: relative;
  overflow: hidden;
  border-radius: 34px;
  background: var(--ink);
  color: var(--paper);
  padding: 58px;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
}
.cta::before {
  content: "";
  position: absolute;
  width: 420px;
  height: 420px;
  right: -120px;
  top: -160px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(232, 96, 44, 0.45), transparent 65%);
}
.cta h2 { color: var(--paper); }
.cta p { margin-top: 16px; color: rgba(247, 241, 230, 0.72); max-width: 46ch; }
.cta__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

/* ============ forms ============ */

/* ============ inner page hero ============ */
.page-hero {
  position: relative;
  padding: 44px 0 56px;
  overflow: hidden;
  background:
    radial-gradient(900px 400px at 88% -20%, rgba(233, 184, 92, 0.24), transparent 65%),
    var(--paper);
}
.page-hero__grid { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 48px; align-items: center; }
.breadcrumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 11.5px; color: var(--ink-3); margin-bottom: 22px; }
.breadcrumbs a, .crumbs a { display: inline-flex; align-items: center; min-height: 24px; }
main a[href^="tel:"] { display: inline-flex; align-items: center; min-height: 24px; }
@media (hover: hover) {
  .breadcrumbs a:hover { color: var(--orange); }
}
.breadcrumbs svg { width: 9px; height: 9px; opacity: 0.5; }
.page-hero h1 { font-size: clamp(34px, 4.4vw, 60px); margin-bottom: 18px; }
.page-hero .lead { max-width: 58ch; }
.page-hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.page-hero__media {
  position: relative;
  border-radius: 150px 150px 24px 24px;
  overflow: visible;
  aspect-ratio: 4 / 4.3;
  border: 6px solid var(--white);
  box-shadow: var(--shadow);
}
.page-hero__media img { width: 100%; height: 100%; object-fit: cover; }

/* ============ facts row ============ */
.facts {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-top: -28px;
  position: relative;
  z-index: 3;
}
.fact {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 18px 20px;
  box-shadow: var(--shadow-sm);
}
.fact span { display: block; font-size: 10.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-3); }
.fact b { display: block; margin-top: 6px; font-family: var(--font-display); font-size: 22px; font-weight: 600; line-height: 1.15; }
.fact--orange { background: var(--orange-dark); border-color: transparent; color: var(--white-pure); }
.fact--orange span { color: var(--white-pure); }

/* ============ article / course body ============ */
.layout { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 56px; align-items: start; }
.layout--wide { grid-template-columns: minmax(0, 1fr); max-width: 900px; }
.article > * + * { margin-top: 24px; }
.article h2 { font-size: clamp(26px, 2.6vw, 36px); margin-top: 46px; }
.article h3 { margin-top: 34px; }
.article p { color: var(--ink-2); }
.article .lead { color: var(--ink); }
.article ul:not(.clean) { display: grid; gap: 10px; }
.article ul:not(.clean) li { position: relative; padding-left: 24px; color: var(--ink-2); }
.article ul:not(.clean) li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--orange);
}
.article blockquote {
  margin: 32px 0;
  padding: 26px 30px;
  border-left: 3px solid var(--orange);
  background: var(--white);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
.article blockquote p { font-family: var(--font-display); font-size: 22px; line-height: 1.4; color: var(--ink); }
.callout {
  margin: 32px 0;
  padding: 24px 28px;
  border-left: 3px solid var(--orange);
  background: var(--white);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
.callout p { color: var(--ink-2); }
.callout p + p { margin-top: 10px; }
.callout__title {
  font-family: var(--font-sans);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--orange);
  font-weight: 600;
  margin-bottom: 8px;
}

.aside-card {
  position: sticky;
  top: 110px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}
.aside-card h3 { font-size: 20px; }
.aside-card .small { margin-top: 8px; color: var(--ink-3); }
.aside-card__price { display: flex; align-items: baseline; gap: 6px; margin: 16px 0 4px; }
.aside-card__price b { font-family: var(--font-display); font-size: 30px; font-weight: 600; }
.aside-card__price span { font-size: 12px; color: var(--ink-3); }
.aside-card .btn { margin-top: 16px; }
.aside-card__list { display: grid; gap: 10px; margin: 18px 0; padding-top: 16px; border-top: 1px solid var(--line); }
.aside-card__list li { display: flex; justify-content: space-between; gap: 12px; font-size: 12.5px; color: var(--ink-3); }
.aside-card__list b { color: var(--ink); font-weight: 500; text-align: right; }
.aside-card .hand { display: block; margin-top: 12px; font-size: 20px; color: var(--text-accent); transform: rotate(-2deg); }

/* content list with check */
.checklist { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 26px; }
.checklist li { position: relative; padding-left: 30px; font-size: 14.5px; color: var(--ink-2); }
.checklist li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--orange-soft);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M3 6.2 5 8.2 9.2 4' fill='none' stroke='%23c8491c' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-size: 11px;
  background-position: center;
  background-repeat: no-repeat;
}

/* steps */
.steps { display: grid; gap: 0; counter-reset: step; }
.step {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 20px;
  padding: 26px 0;
  border-top: 1px solid var(--line);
  align-items: start;
}
.step:last-child { border-bottom: 1px solid var(--line); }
.step__num {
  font-family: var(--font-display);
  font-size: 44px;
  line-height: 0.9;
  color: var(--orange);
  font-weight: 500;
}
.step h3 { font-size: 21px; }
.step p { margin-top: 6px; font-size: 14px; color: var(--ink-3); max-width: 60ch; }

/* schedule table */
@keyframes fade { from { opacity: 0; transform: translateY(6px); } }

.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--white); }
.table { width: 100%; border-collapse: collapse; min-width: 640px; }
.table th, .table td { padding: 13px 14px; text-align: left; font-size: 13px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table th { background: var(--paper-2); font-weight: 600; font-size: 11.5px; letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink-3); }
.table tr:last-child td { border-bottom: 0; }
.table td:first-child { font-weight: 500; white-space: nowrap; color: var(--ink-3); }
.table--price td:nth-child(2) { color: var(--ink-3); }
.table--price td:last-child { font-weight: 600; white-space: nowrap; }

/* accordion */
.faq { display: grid; gap: 10px; }
.faq details {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0 22px;
  transition: border-color 0.2s ease;
}
.faq details[open] { border-color: var(--line-strong); }
.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 0;
  cursor: pointer;
  font-weight: 500;
  font-size: 15px;
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  font-family: var(--font-display);
  font-size: 24px;
  color: var(--orange);
  line-height: 1;
  transition: transform 0.2s ease;
}
.faq details[open] summary::after { content: "−"; }
.faq details p { padding: 0 0 20px; font-size: 14px; color: var(--ink-3); max-width: 70ch; }

/* price cards */

/* contacts */

/* teachers big */
.teacher-row {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 36px;
  padding: 34px 0;
  border-top: 1px solid var(--line);
  align-items: center;
}
.teacher-row:last-child { border-bottom: 1px solid var(--line); }
.teacher-row__photo { border-radius: 24px; overflow: hidden; aspect-ratio: 4/4.6; }
.teacher-row__photo img { width: 100%; height: 100%; object-fit: cover; }
.teacher-row h3 { font-size: 28px; }
.teacher-row .role { display: block; margin: 6px 0 14px; font-size: 11px; letter-spacing: 0.13em; text-transform: uppercase; color: var(--text-accent); font-weight: 600; }
.teacher-row p { font-size: 14px; color: var(--ink-2); max-width: 68ch; }
.teacher-row p + p { margin-top: 10px; }

/* gallery grid */
.gallery-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.gallery-grid figure { position: relative; border-radius: 16px; overflow: hidden; aspect-ratio: 3/4; background: var(--paper-2); }
.gallery-grid figure:nth-child(6n+1) { grid-column: span 2; grid-row: span 2; aspect-ratio: auto; }
.gallery-grid img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease, filter 0.5s ease; }
@media (hover: hover) {
  .gallery-grid figure:hover img { transform: scale(1.04); }
}
.gallery-grid figcaption {
  position: absolute;
  left: 12px;
  bottom: 12px;
  padding: 6px 10px;
  background: rgba(22, 41, 59, 0.75);
  backdrop-filter: blur(6px);
  color: var(--white-pure);
  font-size: 10px;
  border-radius: 8px;
  opacity: 0;
  transition: opacity 0.3s ease;
}
@media (hover: hover) {
  .gallery-grid figure:hover figcaption { opacity: 1; }
}

/* video grid */
.video-card {
  position: relative;
  border-radius: var(--radius-sm);
  overflow: hidden;
  aspect-ratio: 16/10;
  background: var(--ink);
  display: flex;
  align-items: flex-end;
  padding: 22px;
  color: var(--paper);
}
.video-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0.55; transition: opacity 0.3s ease, transform 0.5s ease; }
@media (hover: hover) {
  .video-card:hover img { opacity: 0.4; transform: scale(1.04); }
}
.video-card__play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(247, 241, 230, 0.94);
  color: var(--ink);
  display: grid;
  place-items: center;
  z-index: 2;
}
.video-card__play svg { width: 18px; height: 18px; margin-left: 3px; }
.video-card h3 { position: relative; z-index: 2; font-size: 20px; }
.video-card span { position: relative; z-index: 2; font-size: 11px; opacity: 0.7; }

/* news list */
.news-row {
  display: grid;
  grid-template-columns: 130px 1fr auto;
  gap: 28px;
  padding: 28px 0;
  border-bottom: 1px solid var(--line);
  align-items: center;
  transition: background 0.2s ease;
}
@media (hover: hover) {
  .news-row:hover { background: rgba(255, 253, 249, 0.6); }
}
.news-row time { font-size: 12px; color: var(--ink-3); }
.news-row h3 { font-size: 23px; }
.news-row p { margin-top: 6px; font-size: 13.5px; color: var(--ink-3); }
.news-row__arrow { width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--line-strong); display: grid; place-items: center; }
.news-row__arrow svg { width: 15px; height: 15px; }
@media (hover: hover) {
  .news-row:hover .news-row__arrow { background: var(--orange); border-color: var(--orange); color: var(--white-pure); }
}

/* documents */
.doc-list { border-top: 1px solid var(--line); }
.doc-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
  font-size: 14.5px;
}
.doc-row a { display: inline-flex; align-items: center; gap: 8px; color: var(--text-accent); font-size: 12.5px; }
.doc-row a svg { width: 14px; height: 14px; }

/* footer */
.footer {
  background: var(--ink);
  color: var(--paper);
  padding: 72px 0 26px;
  margin-top: 0;
}
.footer__top {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr 0.8fr 1fr;
  gap: 40px;
  padding-bottom: 52px;
  border-bottom: 1px solid rgba(247, 241, 230, 0.14);
}
.footer .brand__name { color: var(--paper); }
.footer .brand__sub { color: var(--text-on-dark-muted); }
.footer .brand__mark { border-color: rgba(247, 241, 230, 0.2); }
.footer__about { margin-top: 20px; font-size: 13px; color: rgba(247, 241, 230, 0.6); max-width: 34ch; }
.footer h4 { font-family: var(--font-sans); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-on-dark-muted); font-weight: 600; margin-bottom: 16px; }
.footer__links { display: grid; gap: 9px; }
.footer__links a { font-size: 13.5px; color: rgba(247, 241, 230, 0.82); display: flex; align-items: center; min-height: 24px; }
.footer a[href^="tel:"] { display: inline-flex; align-items: center; min-height: 24px; }
@media (hover: hover) {
  .footer__links a:hover { color: var(--gold); }
}
.footer__contacts { display: grid; gap: 12px; font-size: 13.5px; }
.footer__contacts a { color: var(--paper); }
.footer__contacts .small { color: var(--text-on-dark-muted); }
.footer__socials { display: flex; gap: 8px; margin-top: 18px; }
.footer__socials a {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid rgba(247, 241, 230, 0.2);
  display: grid;
  place-items: center;
  transition: background 0.2s ease, border-color 0.2s ease;
}
@media (hover: hover) {
  .footer__socials a:hover { background: var(--orange); border-color: var(--orange); }
}
.footer__socials svg { width: 16px; height: 16px; }
.footer__bottom {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding-top: 22px;
  font-size: 11.5px;
  color: var(--text-on-dark-muted);
}
@media (hover: hover) {
  .footer__bottom a:hover { color: var(--paper); }
}

/* floating */
.floating {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 50;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.floating a {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  box-shadow: 0 12px 26px -12px rgba(22, 41, 59, 0.5);
  transition: transform 0.2s ease;
}
@media (hover: hover) {
  .floating a:hover { transform: translateY(-3px); }
}
.floating .wa { background: var(--brand-whatsapp); color: var(--white-pure); }
.floating .up { background: var(--paper); color: var(--ink); border: 1px solid var(--line); }
.floating svg { width: 22px; height: 22px; }

/* reveal */
[data-reveal] { opacity: 1; transform: none; transition: opacity 0.7s ease, transform 0.7s ease; }
[data-reveal].is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
  [data-reveal] { opacity: 1; transform: none; }
}

/* helper */
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }
.wrap-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }

/* ===== legacy: визуальный слой v2 (заморожен, 004) ===== */
main { display: block; }
main > .container { display: block; max-width: var(--container); margin: 0 auto; padding: 40px var(--gutter) 32px; }
main > .container > nav { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 11.5px; color: var(--ink-3); margin-bottom: 14px; }
main > .container > .eyebrow { display: inline-flex; margin-bottom: 6px; }

/* фото в хедере: слева текст, справа «книжная» арка */
main > .container + section { clear: both; }

/* секции */
main > section { padding: 80px var(--gutter); display: block; }
main > section:nth-of-type(even) { background: var(--paper-2); }
main > section > div { max-width: var(--container); margin: 0 auto; }
main h1 { font-family: var(--font-display); font-size: clamp(34px, 4.4vw, 58px); line-height: 1.05; letter-spacing: -.02em; margin: 12px 0 16px; }
main h2 { font-family: var(--font-display); font-size: clamp(26px, 2.8vw, 38px); line-height: 1.15; letter-spacing: -.02em; margin: 8px 0 14px; }
main h3 { font-family: var(--font-display); font-size: 21px; margin: 12px 0 6px; }
main p { color: var(--ink-2); font-size: 16px; line-height: 1.65; margin: 0 0 14px; max-width: 74ch; }
main ul { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 8px 24px; margin: 12px 0 18px; }
main ul li { position: relative; padding-left: 22px; font-size: 14.5px; line-height: 1.5; color: var(--ink-2); }
main ul li::before { content: ""; position: absolute; left: 0; top: 9px; width: 6px; height: 6px; border-radius: 50%; background: var(--orange); }

/* сетка с карточками статей */
main > section > div:has(> article) { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 18px; }
main article { background: var(--white); border: 1px solid var(--line); border-radius: 22px; padding: 26px; display: flex; flex-direction: column; }
main article > span:first-child { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); }
main article > span:not(:first-child) { display: none; }

/* сетка цифр (статистика) */
main > section > div:has(> div > b) { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
main > section > div > div > b { display: block; font-family: var(--font-display); font-size: 42px; line-height: 1; letter-spacing: -.02em; }
main > section > div > div > b + span { display: block; margin-top: 6px; font-size: 12.5px; color: var(--ink-3); }

main table { width: 100%; border-collapse: collapse; background: var(--white); font-size: 13.5px; margin: 8px 0 16px; border-radius: 14px; overflow: hidden; border: 1px solid var(--line); }
main th, main td { padding: 12px 14px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
main th { background: var(--paper-2); font-size: 11.5px; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-3); }
main tr:last-child td { border-bottom: 0; }
main td:first-child { color: var(--ink-3); }
main form { display: grid; gap: 12px; max-width: 520px; margin: 16px 0; }
main blockquote { margin: 20px 0; padding: 22px 26px; border-left: 3px solid var(--orange); background: var(--white); border-radius: 0 16px 16px 0; }
main blockquote p { font-family: var(--font-display); font-size: 21px; line-height: 1.4; color: var(--ink); margin: 0; }

@media (max-width: 960px) {
  main > section > div:has(> div > b) { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  main > section { padding: 54px var(--gutter); }
  main > section > div:has(> div > b) { grid-template-columns: 1fr; }
}

/* ============ responsive ============ */
@media (max-width: 1100px) {
  .nav { display: none; }
  .header__in { gap: 12px; }
  .burger { display: inline-flex; margin-left: auto; flex: 0 0 auto; }
  .header__phone { display: none; }
  .hero__grid { gap: 30px; }
  .hero__visual { min-height: 480px; }
  .layout { grid-template-columns: 1fr; }
  .aside-card { position: static; }
  .footer__top { grid-template-columns: 1fr 1fr; }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .gallery-grid { grid-template-columns: repeat(3, 1fr); }
  .bento__item--a { grid-column: span 7; }
  .bento__item--b { grid-column: span 5; }
  .bento__item--c { grid-column: span 4; }
  .bento__item--d { grid-column: span 4; }
  .bento__item--e { grid-column: span 4; }
  .bento__item--f { grid-column: span 12; }
  .cta { grid-template-columns: 1fr; }
}

@media (max-width: 860px) {
  .section { padding: 64px 0; }
  .hero { padding-top: 34px; }
  .hero__grid { grid-template-columns: 1fr; }
  .hero__visual { min-height: 440px; margin-top: 20px; }
  .hero__photo--main { width: 72%; right: 2%; }
  .hero__photo--side { width: 40%; left: 2%; }
  .hero__stats { flex-wrap: wrap; gap: 22px; }
  .intro { grid-template-columns: 1fr; gap: 34px; }
  .head { flex-direction: column; align-items: flex-start; gap: 18px; }
  .head__aside { max-width: none; }
  .page-hero__grid { grid-template-columns: 1fr; }
  .page-hero__media { max-width: 460px; }
  .facts { grid-template-columns: 1fr 1fr; margin-top: 22px; }
  .stats { grid-template-columns: 1fr 1fr; }
  .stats__item:nth-child(2) { border-right: 0; }
  .stats__item:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .grid-2, .checklist { grid-template-columns: 1fr; }
  .teacher-row { grid-template-columns: 1fr; gap: 20px; }
  .teacher-row__photo { max-width: 300px; }
  .news-row { grid-template-columns: 1fr; gap: 10px; }
  .news-row__arrow { display: none; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .gallery-grid figure:nth-child(6n+1) { grid-column: span 2; }
  .cta { padding: 36px 26px; border-radius: 26px; }
  .footer__top { grid-template-columns: 1fr; gap: 28px; }
  .footer__bottom { flex-direction: column; }
  .topbar__in { flex-wrap: wrap; justify-content: center; padding: 8px 0; gap: 8px 18px; }
  .topbar__group--right { display: none; }
  .brand__name { font-size: 17px; }
  .header__cta .btn { display: none; }
}

@media (max-width: 640px) {
  :root { --gutter: 18px; --radius: 22px; }
  h1 { font-size: 38px; }
  .hero__visual { min-height: 380px; }
  .hero__sticker { width: 112px; height: 112px; right: 0; }
  .hero__sticker b { font-size: 24px; }
  .hero__note { font-size: 21px; left: 0; }
  .hero__photo--main { width: 78%; }
  .grid-3, .gallery-grid { grid-template-columns: 1fr; }
  .gallery-grid figure:nth-child(6n+1) { grid-column: auto; }
  .bento__item { grid-column: span 12 !important; }
  .bento__item { padding: 24px; }
  .facts { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr; }
  .stats__item { border-right: 0; border-bottom: 1px solid var(--line); }
  .stats__item:last-child { border-bottom: 0; }
  .step { grid-template-columns: 50px 1fr; gap: 14px; }
  .step__num { font-size: 32px; }
  .footer { padding-top: 48px; }
  .floating a { width: 46px; height: 46px; }
}

/* карточки курсов */
main .grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
main .grid-3 > .card-program { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 0; overflow: hidden; display: flex; flex-direction: column; }
main .grid-3 > .card-program > .card-program__media { width: 100%; }
main .grid-3 > .card-program > .card-program__media img { border-radius: 0; box-shadow: none; width: 100%; height: 100%; object-fit: cover; }
main .card-program__body { padding: 18px 20px 20px; }
main .card-program__meta span { padding-left: 0; font-size: 12px; color: var(--ink-2); }
main .card-program__meta { display: flex; flex-wrap: wrap; gap: 4px 14px; border-top: 1px solid var(--line); padding-top: 12px; margin-top: 12px; }
main .card-program__go { margin-top: auto; padding-top: 14px; font-size: 13px; font-weight: 600; }
main .card-program__body h3 { margin: 0 0 6px; }
main .card-program__body p { font-size: 13.5px; margin-bottom: 10px; }
main .card-program__tag { position: absolute; top: 12px; left: 12px; }
main .card-program__media { position: relative; aspect-ratio: 16/10; }
main .head { display: flex; align-items: flex-end; justify-content: space-between; gap: 32px; margin-bottom: 36px; }
main .head__aside { max-width: 340px; margin: 0; font-size: 14px; }
main .bento { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
main .bento__item { padding: 26px; }
@media (max-width: 1100px) { main .grid-3 { grid-template-columns: repeat(2, 1fr); } main .bento { grid-template-columns: 1fr; } }
@media (max-width: 640px) { main .grid-3 { grid-template-columns: 1fr; } }

/* ===== legacy: финальный слой (заморожен, 004) ===== */
main > .container, main > section.page-hero { max-width: none; }
main > section.page-hero { padding: 36px 0 44px; background: radial-gradient(900px 400px at 88% -20%, rgba(233,184,92,.22), transparent 65%), var(--paper); }
main .page-hero__grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 44px; align-items: center; }
main .page-hero__text h1 { margin: 14px 0 16px; }
main .page-hero__text .lead { max-width: 56ch; }
main .page-hero__media img { width: 100%; aspect-ratio: 4/4.3; object-fit: cover; }
main .breadcrumbs span + span::before { content: ""; }
main section > div > div:has(> a > .card) { display: block; }
main .grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; align-items: start; }
main .card { background: var(--white); border: 1px solid var(--line); border-radius: 22px; padding: 26px; display: flex; flex-direction: column; }
main .card > span:first-child { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); }
main .card h3 { margin: 6px 0 8px; }
main .card p { font-size: 14px; margin-bottom: 12px; }
main .card__price b { font-family: var(--font-display); font-size: 30px; line-height: 1; }
main .card__price span { font-size: 12px; color: var(--ink-3); }
main .card ul { display: block; margin: 12px 0; }
main .card ul li { font-size: 13.5px; margin-bottom: 4px; }
main .card > a { margin-top: auto; padding-top: 10px; font-size: 13px; font-weight: 600; }
main .stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
main .stats__item { padding: 22px 18px; border-right: 1px solid var(--line); }
main .stats__item:last-child { border-right: 0; }
main .stats__item b { display: block; font-family: var(--font-display); font-size: 40px; line-height: 1; }
main .stats__item span { display: block; margin-top: 6px; font-size: 12.5px; color: var(--ink-3); }
main .quote { margin: 22px 0; padding: 24px 28px; border-left: 3px solid var(--orange); background: var(--white); border-radius: 0 16px 16px 0; }
main .quote p { font-family: var(--font-display); font-size: 21px; line-height: 1.4; color: var(--ink); margin: 0; }
@media (max-width: 960px) { main .page-hero__grid { grid-template-columns: 1fr; } main .grid-3 { grid-template-columns: 1fr 1fr; } main .stats { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) { main .grid-3, main .stats { grid-template-columns: 1fr; } }

/* иконки-фолбэки для стрелок, убранных из разметки */
.link-arrow::after, .card-program__go::after { content: "→"; font-size: 15px; line-height: 1; transition: transform .2s ease; }
@media (hover: hover) {
  .link-arrow:hover::after, .card-program:hover .card-program__go::after { transform: translateX(4px); }
}
.news-row__arrow::after { content: "↗"; font-size: 15px; }
.btn::after { content: "→"; font-size: 15px; line-height: 1; }
.footer .link-arrow::after { color: inherit; }
main .card > a::after, main article a::after { content: " →"; }

/* порядок бенто-плиток */
main .bento { display: grid; grid-template-columns: repeat(12, 1fr); gap: 18px; }
main .bento__item { display: block; padding: 28px; border-radius: var(--radius); background: var(--white); border: 1px solid var(--line); }
main .bento__item h3 { margin: 8px 0 8px; font-size: 23px; }
main .bento__item p { font-size: 14px; margin: 0; }
main .bento__item--a { grid-column: span 5; background: var(--ink); color: var(--paper); }
main .bento__item--a h3 { color: var(--paper); }
main .bento__item--a p { color: rgba(247,241,230,.72); }
main .bento__item--b { grid-column: span 4; }
main .bento__item--c { grid-column: span 3; background: var(--orange-dark); color: var(--white-pure); border-color: transparent; }
main .bento__item--c h3 { color: var(--white-pure); }
main .bento__item--c p { color: var(--white-pure); }
main .bento__item--d, main .bento__item--e, main .bento__item--f { grid-column: span 4; }
main .bento__item--d { background: var(--sage-soft); }
main .bento__item--f { background: var(--gold); border-color: transparent; }
main .bento__num { display: block; font-family: var(--font-display); font-size: 42px; line-height: 1; color: var(--orange); }
main .bento__item--a .bento__num, main .bento__item--c .bento__num { color: var(--gold); }
main .news-row { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 22px; }
main .news-row time { grid-column: 1 / -1; }
main .news-row h3 { font-size: 19px; margin: 8px 0 4px; }
main .news-row p { font-size: 13.5px; margin: 0; }
main .news-row__arrow { align-self: center; grid-row: 2 / span 2; grid-column: 2; width: 40px; height: 40px; border: 1px solid var(--line-strong); border-radius: 50%; display: grid; place-items: center; }
main .review footer { display: flex; align-items: center; gap: 10px; margin-top: auto; padding-top: 16px; }
main .review { display: flex; flex-direction: column; }
@media (max-width: 700px) { main .bento__item { grid-column: span 12 !important; } }

/* хедер страниц: фото рядом с текстом */
main .page-hero { padding: 34px 0 40px; }
main .page-hero__text h1 { margin: 12px 0 14px; }
main .page-hero__media { max-width: 100%; margin: 0; }
main .page-hero__media img { border: 5px solid var(--white); }
main form input[type="text"], main form input[type="tel"], main form select { width: 100%; }
main form input, main form select { padding: 12px 14px; border: 1px solid var(--line-strong); border-radius: 12px; font: inherit; font-size: 16px; background: var(--white); }
main form button { padding: 13px 22px; border: 0; border-radius: 999px; background: var(--orange-dark); color: var(--white-pure); font-weight: 500; cursor: pointer; }
main form label { font-size: 12px; color: var(--ink-3); }

/* фикс: текст и фото в хедере страниц */
main .page-hero__grid > .page-hero__text { max-width: 640px; }
main .page-hero__grid > div:not(.page-hero__text) { min-width: 0; }
main .page-hero__grid > div:not(.page-hero__text) img { width: 100%; aspect-ratio: 4/4.1; object-fit: cover; }
main .crumbs { display: flex; gap: 8px; flex-wrap: wrap; font-size: 11.5px; color: var(--ink-3); margin-bottom: 14px; }
@media (hover: hover) {
  main .crumbs a:hover { color: var(--orange); }
}
main .page-hero__text > span:not(.eyebrow) { display: inline-block; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); }
main .page-hero__text h1 { margin: 10px 0 14px; }
main .page-hero__text .lead, main .page-hero__text p { max-width: 54ch; }
main .page-hero__text .page-hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; }

/* фикс: сетка двух колонок на страницах курсов */
main .layout { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 52px; align-items: start; }
main .layout .article { min-width: 0; }
main .layout .article .article > * + * { margin-top: 18px; }
main .aside-card { position: sticky; top: 104px; background: var(--white); border: 1px solid var(--line); border-radius: 24px; padding: 22px; }
main .aside-card p { font-size: 12.5px; color: var(--ink-3); }
main .aside-card ul { display: block; margin: 12px 0 16px; border-top: 1px solid var(--line); padding-top: 12px; }
main .aside-card ul li { display: flex; justify-content: space-between; gap: 10px; font-size: 12.5px; color: var(--ink-3); padding: 4px 0; }
main .aside-card ul li::before { display: none; }
main .aside-card ul li b { color: var(--ink); font-weight: 500; }
main .aside-card > a { display: block; text-align: center; margin-top: 12px; padding: 12px; border-radius: 999px; background: var(--orange-dark); color: var(--white-pure); font-size: 13px; font-weight: 500; }
main .layout .article p { max-width: 68ch; }
main .layout .article h2 { margin-top: 26px; }
main .layout .article ul { grid-template-columns: 1fr 1fr; }
@media (max-width: 960px) { main .aside-card { position: static; } main .layout .article ul { grid-template-columns: 1fr; } }

/* последняя правка: статьи курсов */
main .layout > .article { min-width: 0; }

/* ===== legacy: правки после просмотра (заморожены, 004) ===== */
.hero__photo--main { width: 73%; height: 92%; right: 0; top: 0; }
.hero__photo--side { width: 38%; height: 40%; left: 0; bottom: 0; }
.hero__sticker { right: -3%; bottom: 6%; }
.hero__note { display: block; }

main article > .bento__num {
  font-family: var(--font-display);
  font-size: 42px;
  line-height: 1;
  letter-spacing: -.02em;
  margin-bottom: 14px;
  color: var(--orange);
}
main .bento__item--a .bento__num { color: var(--gold); }
main .bento__item--c .bento__num { color: var(--white-pure); }
main .bento__item--f .bento__num { color: var(--ink); }

/* ===== legacy: адаптив после просмотра (заморожен, 004) ===== */
@media (max-width: 1100px) {
  .topbar__group--right { display: none; }
  .topbar__in { justify-content: center; }
  .hero__stats { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 24px; }
  .hero__stat b { font-size: 26px; white-space: nowrap; }
  .hero__stat span { font-size: 11.5px; max-width: none; }
}

/* шапка на планшете: кнопка ближе к бургеру */
@media (max-width: 1100px) {
  .header__cta { margin-left: auto; }
  .burger { margin-left: 0; }
}
/* мягкие края бегущей строки: ширину и фон переопределяет поздний слой */
.marquee::before, .marquee::after {
  content: ""; position: absolute; top: 0; bottom: 0; width: 56px; z-index: 2; pointer-events: none;
}

/* цифры бенто: специфичнее правила first-child */
main .bento .bento__item > .bento__num {
  font-family: var(--font-display);
  font-size: 42px;
  line-height: 1;
  letter-spacing: -.02em;
  margin-bottom: 14px;
  color: var(--orange);
}
main .bento .bento__item--a > .bento__num { color: var(--gold); }
main .bento .bento__item--c > .bento__num { color: var(--white-pure); }
main .bento .bento__item--f > .bento__num { color: var(--ink); }
@media (max-width: 900px) { main .bento__item { grid-column: span 12 !important; } }

/* бенто на планшете: 7/5 + 4/4/4 вместо вертикальной ленты */
@media (min-width: 701px) and (max-width: 1100px) {
  main .bento { grid-template-columns: repeat(12, 1fr); }
  main .bento .bento__item--a { grid-column: span 7 !important; }
  main .bento .bento__item--b { grid-column: span 5 !important; }
  main .bento .bento__item--c,
  main .bento .bento__item--d,
  main .bento .bento__item--e { grid-column: span 4 !important; }
  main .bento .bento__item--f { grid-column: span 12 !important; }
}

/* крошки и вторичная кнопка */
.breadcrumbs > * + *::before { content: "›"; margin: 0 6px 0 0; color: var(--ink-3); opacity: .55; }
.page-hero__actions .btn--orange + .btn--orange { background: transparent; color: var(--ink); border-color: var(--line-strong); }
@media (hover: hover) {
  .page-hero__actions .btn--orange + .btn--orange:hover { background: var(--ink); color: var(--paper); }
}
@media (max-width: 960px) { main .layout { grid-template-columns: 1fr; } main .aside-card { width: 100%; } }

/* архи и карточка стоимости на страницах курсов */
main .page-hero__media img { border-radius: 144px 144px 18px 18px; }
main .aside-card > span:first-child { font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); }
main .aside-card > div { display: flex; align-items: baseline; gap: 6px; margin: 10px 0 6px; }
main .aside-card > div b { font-family: var(--font-display); font-size: 30px; line-height: 1; }
main .aside-card > div span { font-size: 12px; color: var(--ink-3); }
main .aside-card > p { font-size: 12.5px; color: var(--ink-3); margin: 0 0 8px; }
main .aside-card > ul { display: block; margin: 12px 0; border-top: 1px solid var(--line); padding-top: 10px; }
main .aside-card > ul li { display: flex; justify-content: space-between; gap: 10px; font-size: 12.5px; padding: 3px 0; color: var(--ink-3); }
main .aside-card > ul li::before { display: none; }
main .aside-card > ul li b { color: var(--ink); font-weight: 500; }
main .aside-card > a { display: block; text-align: center; background: var(--orange-dark); color: var(--white-pure); padding: 12px; border-radius: 999px; font-size: 13px; font-weight: 500; margin-top: 12px; }
main .aside-card > p > a { display: block; margin-top: 4px; font-weight: 600; color: var(--ink); }
main .aside-card > span:last-child { display: block; margin-top: 10px; font-family: var(--font-hand); font-size: 20px; color: var(--text-accent); }
@media (min-width: 701px) and (max-width: 1100px) {
  main .grid-3:has(.review) > :last-child:nth-child(3),
  main .grid-3:has(.news-row) > :last-child:nth-child(3) { grid-column: span 2; }
}
.marquee__track { -webkit-mask-image: linear-gradient(90deg, transparent, var(--black) 5%, var(--black) 95%, transparent); mask-image: linear-gradient(90deg, transparent, var(--black) 5%, var(--black) 95%, transparent); }

/* на планшете: арка и карточка стоимости не на всю ширину */
@media (max-width: 960px) {
  main .page-hero__media { max-width: 460px; margin: 0 auto 32px; }
  main .aside-card { max-width: 460px; margin: 0 auto; }
}

/* мобильный топбар и карточки рекомендаций */
@media (max-width: 640px) {
  .topbar__in { flex-wrap: wrap; justify-content: center; padding: 6px 0; gap: 2px 12px; }
  .topbar__group { flex-wrap: wrap; justify-content: center; gap: 2px 12px; }
  .topbar__item { font-size: 10.5px; white-space: normal; }
  .topbar__item svg { width: 12px; height: 12px; }
  .hero__kicker { flex-wrap: wrap; row-gap: 4px; font-size: 10px; padding: 6px 10px; }
}
@media (min-width: 701px) and (max-width: 1100px) {
  main .section--paper2 .grid-3:has(.card-program) { grid-template-columns: repeat(3, 1fr); gap: 16px; }
  main .section--paper2 .grid-3:has(.card-program) .card-program__body { padding: 14px 14px 16px; }
  main .section--paper2 .grid-3:has(.card-program) .card-program__body h3 { font-size: 17px; }
}

/* мобильный топбар: группа на всю ширину, чтобы часы переносились */
@media (max-width: 640px) {
  .topbar__group { width: 100%; max-width: 100%; justify-content: center; flex-wrap: wrap; }
  .topbar__item { flex: 0 1 auto; }
}

/* на телефоне в топбаре оставляем адрес, часы прячем */
@media (max-width: 640px) {
  .topbar__group .topbar__item:nth-child(2) { display: none; }
}
.crumbs > * + *::before { content: "›"; margin-right: 6px; color: var(--ink-3); opacity: .55; }

/* ===== планшет 896–1000: герой и интро в одну колонку ===== */
@media (max-width: 1000px) {
  .hero__grid { grid-template-columns: 1fr; }
  .hero__visual { width: 100%; max-width: 520px; min-height: 440px; margin: 6px auto 0; }
  .hero__photo--main { width: 72%; height: 92%; }
  .hero__photo--side { width: 38%; height: 40%; }
  .hero__sticker { width: 128px; height: 128px; right: 4%; bottom: 8%; }
  .hero__note { left: 0; top: 0; }
  .intro { grid-template-columns: 1fr; gap: 32px; }
  .intro__quote { max-width: 640px; }
  .marquee__track { display: grid; grid-template-columns: repeat(3, auto); justify-content: center; width: auto; animation: none; gap: 6px 26px; padding: 0 18px; }
  .marquee__item { padding-right: 0; font-size: 13.5px; }
  .marquee__item:nth-child(n+7) { display: none; }
}
@media (max-width: 640px) {
  .hero__visual { min-height: 380px; max-width: 100%; }
  .hero__photo--main { width: 76%; }
  .hero__photo--side { width: 42%; }
  .hero__sticker { width: 108px; height: 108px; right: 4%; bottom: 6%; }
  .marquee { display: none; }
}

/* мобильные заголовки секций: текст слева, ссылка справа */
@media (max-width: 700px) {
  main .head { align-items: flex-start; }
  main .head__text { width: 100%; }
  main .head__aside { max-width: 100%; }
  main .head > .link-arrow { align-self: flex-end; }
}
/* три отзыва в ряд на планшете, без широкой третьей карточки */
@media (min-width: 861px) and (max-width: 1100px) {
  main .grid-3:has(.review) { grid-template-columns: repeat(3, 1fr); }
  main .grid-3:has(.review) > :last-child:nth-child(3) { grid-column: auto; }
}
@media (min-width: 861px) and (max-width: 1100px) {
  main .grid-3:has(.news-row) { grid-template-columns: repeat(3, 1fr); }
  main .grid-3:has(.news-row) > :last-child:nth-child(3) { grid-column: auto; }
}
.marquee { position: relative; }
.marquee::before, .marquee::after {
  content: ""; position: absolute; top: 0; bottom: 0; width: 64px; z-index: 2; pointer-events: none;
}
.marquee::before { left: 0; background: linear-gradient(90deg, var(--ink), transparent); }
.marquee::after { right: 0; background: linear-gradient(270deg, var(--ink), transparent); }
.marquee__track { -webkit-mask-image: none; mask-image: none; }

/* Тач: убираем 300 мс задержку двойного тапа, оставляя пинч-зум. */
