/* ===== Цвета и шрифты из UI-кита ===== */
@font-face {
  font-family: "Ambidexter";
  src: url("fonts/ambidexter.woff") format("woff");
  font-display: swap;
}
:root {
  --bg: #d6dfaf;       /* светло-зелёный фон */
  --light: #dce3be;    /* светлый текст на тёмном */
  --olive: #545732;
  --red: #531410;
  --u: min(1px, calc(100vw / 1200)); /* 1 пиксель макета */
  --head: "Ambidexter", Georgia, serif;
  --text: "Didact Gothic", "Trebuchet MS", system-ui, sans-serif;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: calc(130 * var(--u)); }
body {
  background: var(--bg);
  color: var(--red);
  font-family: var(--text);
  font-size: calc(30 * var(--u));
  line-height: 1;
  overflow-x: clip;
}
html { overflow-x: clip; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
ul { list-style: none; }
section { position: relative; width: calc(1200 * var(--u)); margin: 0 auto; }

.h1 {
  font-family: var(--head);
  font-weight: 400;
  font-size: calc(110 * var(--u));
  line-height: 1;
  position: relative;
  z-index: 2;
}
.h2 { font-family: var(--head); font-weight: 400; font-size: calc(60 * var(--u)); line-height: 1.33; }
.title-row { display: flex; align-items: baseline; gap: calc(20 * var(--u)); position: relative; z-index: 2; }
.tag { font-size: calc(27 * var(--u)); }

/* ===== Кнопки ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  height: calc(54 * var(--u)); padding: 0 calc(30 * var(--u));
  border-radius: calc(27 * var(--u));
  font-size: calc(30 * var(--u)); white-space: nowrap;
  transition: transform .15s, background .15s, color .15s;
}
.btn:hover { transform: translateY(-2px); }
.btn--dark { background: var(--red); color: var(--light); }
.btn--light { background: var(--light); color: var(--red); }
.btn--outline { border: 2px solid var(--light); color: var(--light); }
.btn--outline:hover { background: var(--light); color: var(--red); }
.btn--pill { background: var(--light); color: var(--red); border: 2px solid var(--red); }

/* ===== Шапка ===== */
.header {
  position: sticky; top: calc(14 * var(--u)); z-index: 50;
  width: calc(1120 * var(--u)); height: calc(76 * var(--u));
  margin: calc(40 * var(--u)) auto 0;
  padding: 0 calc(30 * var(--u));
  display: flex; align-items: center; justify-content: space-between;
  background: var(--red); color: var(--light);
  border-radius: calc(38 * var(--u));
  font-size: calc(27 * var(--u));
}
.header__nav { display: flex; gap: calc(20 * var(--u)); }
.header__nav a:hover, .footer__nav a:hover { text-decoration: underline; text-underline-offset: 4px; }
.logo-pill {
  position: absolute; left: 50%; transform: translateX(-50%);
  border: 2px solid var(--light); border-radius: calc(21 * var(--u));
  padding: calc(4 * var(--u)) calc(22 * var(--u)) calc(6 * var(--u));
  font-size: calc(30 * var(--u));
}
.burger, .mobile-menu { display: none; }

/* ===== Зона с сеткой (главная + обо мне) ===== */
.topzone {
  position: relative; overflow: hidden;
  margin-top: calc(-116 * var(--u)); padding-top: calc(116 * var(--u));
}
.topzone::before {
  content: ""; position: absolute; inset: -60% -40%;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='292' height='292'%3E%3Cpath d='M0 .5H292M.5 0V292' fill='none' stroke='%23531410' stroke-opacity='.4' stroke-dasharray='12 8'/%3E%3C/svg%3E");
  background-size: calc(292 * var(--u));
  transform: rotate(26deg);
  pointer-events: none;
}

/* ===== 1. Главная ===== */
.hero { height: calc(677 * var(--u)); }
.hero__name {
  position: absolute; top: calc(50 * var(--u)); left: calc(40 * var(--u)); right: calc(40 * var(--u));
  display: flex; justify-content: space-between; align-items: center;
  font-family: var(--head); font-weight: 400; font-size: calc(110 * var(--u)); line-height: 1;
  z-index: 2;
}
.hero__star { width: calc(105 * var(--u)); transform: rotate(-8deg) translateY(calc(6 * var(--u))); }
.hero__center {
  position: absolute; top: calc(190 * var(--u)); left: calc(320 * var(--u)); width: calc(560 * var(--u));
  display: flex; flex-direction: column; align-items: center; z-index: 3;
}
.hero__lead { text-align: center; font-size: calc(30 * var(--u)); line-height: 1; }
.hero__btn { margin-top: calc(20 * var(--u)); width: calc(208 * var(--u)); }

.polaroid {
  position: absolute; z-index: 1;
  box-shadow: 0 calc(6 * var(--u)) calc(18 * var(--u)) rgba(60, 40, 20, .18);
}
.polaroid img { width: 100%; height: auto; padding: 7% 7% 23%; background: #f4f4f2; }
.p-kremlin { left: calc(60 * var(--u));  top: calc(196 * var(--u)); width: calc(250 * var(--u)); transform: rotate(-11deg); }
.p-lab     { left: calc(278 * var(--u)); top: calc(318 * var(--u)); width: calc(215 * var(--u)); transform: rotate(19deg); z-index: 2; }
.p-library { left: calc(932 * var(--u)); top: calc(197 * var(--u)); width: calc(235 * var(--u)); transform: rotate(8deg); }
.p-selfie  { left: calc(735 * var(--u)); top: calc(308 * var(--u)); width: calc(200 * var(--u)); transform: rotate(-12deg); z-index: 2; }

/* ===== 2. Обо мне ===== */
.about { height: calc(860 * var(--u)); }
.about > .h1 { position: absolute; left: calc(33 * var(--u)); top: calc(16 * var(--u)); }
.about__star { position: absolute; z-index: 4; pointer-events: none; }
.about__star--1 { left: calc(40 * var(--u)); top: calc(180 * var(--u)); width: calc(135 * var(--u)); transform: rotate(-12deg); }
.about__star--2 { left: calc(985 * var(--u)); top: calc(580 * var(--u)); width: calc(115 * var(--u)); transform: rotate(10deg); }

.sticker {
  position: absolute; z-index: 3;
  display: flex; align-items: center;
  padding: calc(14 * var(--u)) calc(34 * var(--u)) calc(14 * var(--u)) calc(32 * var(--u));
  white-space: nowrap;
  background: url("img/sticker.webp") center / 100% 100% no-repeat;
  filter: drop-shadow(0 calc(3 * var(--u)) calc(4 * var(--u)) rgba(60, 40, 20, .15));
  font-size: calc(27 * var(--u)); line-height: 1.05;
}
.s1 { left: calc(190 * var(--u)); top: calc(218 * var(--u)); min-height: calc(97 * var(--u)); transform: rotate(2deg); }
.s2 { left: calc(45 * var(--u));  top: calc(300 * var(--u)); min-height: calc(97 * var(--u)); transform: rotate(-2deg); }
.s3 { left: calc(178 * var(--u)); top: calc(385 * var(--u)); min-height: calc(95 * var(--u)); transform: rotate(1.5deg); }
.s4 { left: calc(43 * var(--u));  top: calc(470 * var(--u)); min-height: calc(105 * var(--u)); transform: rotate(-3deg); }
.s5 { left: calc(227 * var(--u)); top: calc(550 * var(--u)); min-height: calc(87 * var(--u)); transform: rotate(1.5deg); }
.s6 { left: calc(65 * var(--u));  top: calc(622 * var(--u)); min-height: calc(83 * var(--u)); transform: rotate(-1deg); }

.about__collage { position: absolute; inset: 0; pointer-events: none; }
.about__tape-black { position: absolute; left: calc(745 * var(--u)); top: calc(150 * var(--u)); width: calc(385 * var(--u)); transform: rotate(6deg); z-index: 1; }
.about__portrait {
  position: absolute; left: calc(785 * var(--u)); top: calc(175 * var(--u)); width: calc(320 * var(--u));
  transform: rotate(9deg); z-index: 2;
  box-shadow: 0 calc(6 * var(--u)) calc(18 * var(--u)) rgba(60, 40, 20, .18);
}
.about__film { position: absolute; left: calc(700 * var(--u)); top: calc(150 * var(--u)); width: calc(480 * var(--u)); opacity: .55; transform: rotate(2deg); z-index: 3; mix-blend-mode: screen; }
.p-about { left: calc(625 * var(--u)); top: calc(440 * var(--u)); width: calc(250 * var(--u)); transform: rotate(-6deg); z-index: 4; }
.about__tape-grey { position: absolute; left: calc(592 * var(--u)); top: calc(445 * var(--u)); width: calc(135 * var(--u)); transform: rotate(-24deg); z-index: 5; }

/* ===== 3. Как проходят уроки ===== */
.lessons {
  width: 100%; max-width: none;
  background: var(--olive); color: var(--light);
  height: calc(799 * var(--u));
  overflow-x: clip; overflow-y: visible;
}
.lessons > .h1 { position: absolute; left: max(calc(40 * var(--u)), calc(50% - 560 * var(--u))); top: calc(30 * var(--u)); }
.slider { position: absolute; left: 50%; top: calc(190 * var(--u)); width: calc(1078 * var(--u)); transform: translateX(-50%); display: flex; align-items: center; gap: calc(30 * var(--u)); }
.window { display: block; background: #fff; border-radius: calc(10 * var(--u)); overflow: hidden; text-align: left; }
.slider__window { width: calc(908 * var(--u)); flex: none; min-width: 0; }
.window__bar {
  position: relative; display: flex; align-items: center; gap: calc(10 * var(--u));
  height: calc(53 * var(--u)); padding: 0 calc(20 * var(--u));
  background: var(--light); color: var(--olive);
}
.dot { width: calc(26.5 * var(--u)); height: calc(26.5 * var(--u)); border-radius: 50%; background: var(--olive); flex: none; }
.dot--red { background: var(--red); }
.dot--light { background: var(--light); }
.slider__title { position: absolute; left: 0; right: 0; text-align: center; font-size: calc(30 * var(--u)); pointer-events: none; }
.slider__viewport { overflow: hidden; height: calc(494 * var(--u)); touch-action: pan-y; }
.slider__track { display: flex; height: 100%; transition: transform .45s ease; }
.slide { flex: 0 0 100%; min-width: 0; height: 100%; padding: calc(14 * var(--u)) calc(20 * var(--u)); display: flex; align-items: center; justify-content: center; }
.slide img { width: 100%; height: 100%; min-width: 0; object-fit: contain; cursor: zoom-in; }
.slider__arrow {
  width: calc(55 * var(--u)); height: calc(55 * var(--u)); flex: none; border-radius: 50%;
  background: var(--light); display: grid; place-items: center;
  transition: opacity .2s, transform .15s;
}
.slider__arrow:hover { transform: scale(1.08); }
.slider__arrow svg { width: 55%; fill: none; stroke: var(--olive); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.slider__arrow[disabled] { opacity: 0; pointer-events: none; }
.slider__dots { display: none; }
.lessons__cat {
  position: absolute; z-index: 5;
  left: calc(50% + 429 * var(--u)); bottom: calc(-10 * var(--u)); width: calc(197 * var(--u));
  pointer-events: none;
}

/* ===== 4. Форматы ===== */
.formats { padding: calc(60 * var(--u)) calc(40 * var(--u)) calc(40 * var(--u)); }
.formats .title-row { margin-bottom: calc(48 * var(--u)); }
.accordion { outline: 2px dashed var(--red); outline-offset: -1px; }
.acc { color: var(--light); outline: 1.5px dashed rgba(220, 227, 190, .35); outline-offset: -3px; }
.acc--red { background: var(--red); }
.acc--olive { background: var(--olive); }
.acc__head {
  width: 100%; min-height: calc(121 * var(--u));
  display: flex; justify-content: space-between; align-items: flex-start;
  padding: calc(10 * var(--u)) calc(20 * var(--u)) calc(10 * var(--u)) calc(30 * var(--u));
  text-align: left;
}
.acc__head .h2 { padding-top: calc(8 * var(--u)); }
.price {
  background: var(--light); color: var(--red);
  min-width: calc(200 * var(--u)); padding: calc(12 * var(--u)) calc(14 * var(--u));
  white-space: nowrap; flex: none;
  margin-top: calc(10 * var(--u));
  font-size: calc(27 * var(--u)); line-height: 1; text-align: center;
}
.acc__body { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .35s ease; }
.acc__body > ul { overflow: hidden; padding: 0 calc(15 * var(--u)); }
.acc.is-open .acc__body { grid-template-rows: 1fr; }
.acc.is-open .acc__body > ul { padding-bottom: calc(28 * var(--u)); }

/* Списки со звёздочками */
.stars li {
  position: relative;
  padding-left: calc(42 * var(--u));
  font-size: calc(27 * var(--u)); line-height: 1.25;
}
.stars li + li { margin-top: calc(18 * var(--u)); }
.stars li::before {
  content: ""; position: absolute; left: 0; top: calc(-1 * var(--u));
  width: calc(34 * var(--u)); height: calc(34 * var(--u));
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 34 34'%3E%3Cpath d='M19.4 0.2 L19.6 13.7 L29.1 12.1 L21.2 17.6 L28.8 26.2 L18.6 20.9 L14.6 33.8 L14.4 20.3 L4.9 21.9 L12.8 16.4 L5.2 7.8 L15.4 13.1Z'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 34 34'%3E%3Cpath d='M19.4 0.2 L19.6 13.7 L29.1 12.1 L21.2 17.6 L28.8 26.2 L18.6 20.9 L14.6 33.8 L14.4 20.3 L4.9 21.9 L12.8 16.4 L5.2 7.8 L15.4 13.1Z'/%3E%3C/svg%3E") center / contain no-repeat;
}
.stars--light { color: var(--light); }
.stars--dark { color: var(--red); }
.stars .hl {
  display: inline-block; background: var(--light); color: var(--red);
  padding-right: calc(10 * var(--u)); margin-left: calc(-2 * var(--u));
  padding-left: calc(44 * var(--u));
}
.stars .hl::before { left: calc(2 * var(--u)); }

/* ===== 5. Курс ===== */
.course { padding: calc(30 * var(--u)) calc(40 * var(--u)) calc(30 * var(--u)); }
.curve { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 0; }
.curve path { fill: none; stroke-width: 2; stroke-dasharray: 8 6; vector-effect: non-scaling-stroke; }
.curve--course path { stroke: var(--olive); }
.curve--reviews path { stroke: var(--red); }
.course .title-row { margin-bottom: calc(46 * var(--u)); }

.course__tabs { display: flex; position: relative; z-index: 2; height: calc(57 * var(--u)); width: calc(918 * var(--u)); }
.tab {
  position: relative; height: calc(57 * var(--u)); width: calc(260 * var(--u));
  font-family: var(--head); font-size: calc(30 * var(--u)); line-height: 1;
  padding-top: calc(6 * var(--u));
}
.tab + .tab { margin-left: calc(-18 * var(--u)); }
.tab::before {
  content: ""; position: absolute; inset: 0 calc(-26 * var(--u)) -2px 0; z-index: -1;
  background: var(--bg);
  border: 2px solid var(--red); border-bottom: 0;
  border-radius: calc(28 * var(--u)) calc(30 * var(--u)) 0 0;
  transform: perspective(calc(80 * var(--u))) rotateX(18deg);
  transform-origin: bottom left;
}
.tab:nth-child(1) { z-index: 3; }
.tab:nth-child(2) { z-index: 2; }
.tab:nth-child(3) { z-index: 1; }
.tab.is-active { color: var(--light); z-index: 4; }
.tab.is-active::before { background: var(--red); }
.tab:not(.is-active):hover { opacity: .75; }

.course__card {
  position: relative; z-index: 1;
  width: calc(918 * var(--u)); min-height: calc(580 * var(--u));
  background: var(--red); color: var(--light);
  border-radius: 0 calc(50 * var(--u)) calc(50 * var(--u)) calc(50 * var(--u));
  padding: calc(30 * var(--u)) calc(40 * var(--u)) calc(130 * var(--u));
}
.tabpane[hidden] { display: none; }
.tabpane .sub { font-size: calc(30 * var(--u)); line-height: 1.1; margin-bottom: calc(22 * var(--u)); max-width: calc(760 * var(--u)); }
.tabpane .stars + .sub { margin-top: calc(34 * var(--u)); }
.tabpane .stars li + li { margin-top: calc(13 * var(--u)); }
.stars.cols { display: grid; grid-template-columns: max-content max-content; grid-template-rows: repeat(3, auto); grid-auto-flow: column; justify-content: start; column-gap: calc(30 * var(--u)); row-gap: calc(13 * var(--u)); }
.stars.cols--geo { grid-template-rows: repeat(2, auto); }
.stars.cols li + li { margin-top: 0; }
.course__btns { display: flex; flex-direction: column; align-items: flex-start; gap: calc(10 * var(--u)); margin-top: calc(32 * var(--u)); }
.course__btns .btn { width: calc(216 * var(--u)); }

.includes {
  position: relative; z-index: 3;
  margin: calc(-129 * var(--u)) 0 0 calc(320 * var(--u)); width: calc(800 * var(--u));
  background: var(--bg); border: 2px solid var(--red); border-radius: calc(12 * var(--u));
}
.includes__head {
  background: var(--red); color: var(--light);
  height: calc(78 * var(--u)); display: flex; align-items: center;
  padding: 0 calc(24 * var(--u)); border-radius: calc(9 * var(--u)) calc(9 * var(--u)) 0 0;
  font-size: calc(30 * var(--u));
}
.includes ul { padding: calc(20 * var(--u)) calc(22 * var(--u)) calc(26 * var(--u)); }
.includes .stars li + li { margin-top: calc(16 * var(--u)); }
.includes__star { position: absolute; left: calc(389 * var(--u)); top: calc(-81 * var(--u)); width: calc(140 * var(--u)); transform: rotate(-6deg); z-index: 2; }

/* ===== 6. Отзывы ===== */
.reviews { height: calc(761 * var(--u)); }
.reviews > .h1 { position: absolute; left: calc(40 * var(--u)); top: calc(40 * var(--u)); }
.reviews__hint { position: absolute; left: calc(816 * var(--u)); top: calc(192 * var(--u)); z-index: 2; }
.reviews__hint span { position: absolute; left: calc(60 * var(--u)); top: 0; font-size: calc(27 * var(--u)); }
.reviews__hint svg { width: calc(50 * var(--u)); height: calc(62 * var(--u)); margin-top: calc(26 * var(--u)); fill: none; stroke: var(--red); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.reviews__stack {
  position: absolute; z-index: 2; left: 0; right: 0;
  top: calc(280 * var(--u)); height: calc(286 * var(--u));
  cursor: pointer; outline: none;
}
.rv {
  position: absolute; left: 50%; top: 50%;
  width: calc(var(--w) * var(--u)); height: auto;
  opacity: 0; pointer-events: none;
  transform: translate(-50%, -50%) translateY(calc(70 * var(--u))) scale(.85) rotate(4deg);
  transition: transform .5s cubic-bezier(.2, .9, .25, 1.15), opacity .35s ease;
  filter: drop-shadow(0 calc(8 * var(--u)) calc(16 * var(--u)) rgba(60, 40, 20, .18));
}
.rv.is-active { opacity: 1; transform: translate(-50%, -50%); }
.rv.is-out {
  opacity: 0;
  transform: translate(-50%, -50%) translate(calc(-260 * var(--u)), calc(-90 * var(--u))) scale(.8) rotate(-14deg);
  transition: transform .45s ease-in, opacity .4s ease-in;
}
.reviews__stack:hover .rv.is-active { transform: translate(-50%, -50%) scale(1.03); }
.reviews__stack:focus-visible .rv.is-active { outline: 3px solid var(--red); outline-offset: 4px; border-radius: 10px; }
.reviews__more { position: absolute; left: calc(888 * var(--u)); top: calc(667 * var(--u)); width: calc(272 * var(--u)); z-index: 2; }

/* ===== 7. Контакты ===== */
.contacts { padding: calc(30 * var(--u)) calc(40 * var(--u)) calc(40 * var(--u)); }
.contacts .h1 { margin-bottom: calc(50 * var(--u)); }
.contacts__list { display: flex; flex-wrap: wrap; gap: calc(20 * var(--u)); max-width: calc(1080 * var(--u)); }
.contact { display: flex; gap: calc(5 * var(--u)); height: calc(70 * var(--u)); transition: transform .15s; }
.contact:hover { transform: translateY(-2px); }
.contact__icon {
  width: calc(70 * var(--u)); height: calc(70 * var(--u)); flex: none;
  background: var(--red); border-radius: calc(8 * var(--u));
  display: grid; place-items: center;
}
.contact__icon svg { width: 66%; height: 66%; fill: var(--light); }
.contact__label {
  display: flex; align-items: center; white-space: nowrap;
  border: 2px solid var(--red); border-radius: calc(8 * var(--u));
  padding: 0 calc(18 * var(--u));
  font-size: calc(27 * var(--u));
}
.contact__label i { font-style: normal; margin-left: calc(12 * var(--u)); }
.contact:hover .contact__label { background: var(--red); color: var(--light); }

/* ===== 8. Футер ===== */
.footer { position: relative; width: calc(1120 * var(--u)); margin: calc(30 * var(--u)) auto calc(40 * var(--u)); padding-top: calc(27 * var(--u)); }
.footer__btn { position: absolute; left: 50%; top: 0; transform: translateX(-50%); width: calc(210 * var(--u)); z-index: 2; }
.footer__btn:hover { transform: translateX(-50%) translateY(-2px); }
.footer__box {
  background: var(--red); color: var(--light); border-radius: calc(16 * var(--u));
  height: calc(285 * var(--u)); padding: calc(30 * var(--u)) calc(30 * var(--u));
  display: flex; flex-direction: column; justify-content: space-between;
}
.footer__nav { display: flex; justify-content: space-between; font-size: calc(27 * var(--u)); }
.footer__nav div { display: flex; gap: calc(20 * var(--u)); }
.footer__bottom { display: flex; justify-content: space-between; align-items: flex-end; }
.footer__logo {
  position: relative; margin-left: calc(6 * var(--u)); margin-bottom: calc(5 * var(--u));
  background: rgba(220, 227, 190, .22);
  padding: 0 calc(22 * var(--u)) calc(4 * var(--u));
  font-size: calc(50 * var(--u)); line-height: 1.1;
}
.footer__logo::before, .footer__logo::after {
  content: ""; position: absolute; width: calc(14 * var(--u)); height: calc(58 * var(--u));
  background:
    radial-gradient(circle, var(--light) 60%, transparent 64%) 50% var(--dot) / calc(14 * var(--u)) calc(14 * var(--u)) no-repeat,
    linear-gradient(var(--light), var(--light)) 50% 0 / 2px 100% no-repeat;
}
.footer__logo::before { --dot: 100%; left: calc(-7 * var(--u)); top: calc(-6 * var(--u)); }
.footer__logo::after { --dot: 0%; right: calc(-7 * var(--u)); bottom: calc(-6 * var(--u)); }
.footer__up { display: flex; align-items: center; gap: calc(8 * var(--u)); font-size: calc(27 * var(--u)); padding-bottom: calc(8 * var(--u)); }
.footer__up svg { width: calc(24 * var(--u)); fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.footer__up:hover { text-decoration: underline; text-underline-offset: 4px; }

/* ===== Лайтбокс ===== */
.lightbox {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(30, 10, 8, .8);
  display: grid; place-items: center; padding: 20px;
  cursor: zoom-out;
}
.lightbox[hidden] { display: none; }
.lightbox img { max-width: min(1400px, 100%); max-height: 90vh; width: 100%; height: auto; object-fit: contain; border-radius: 10px; image-rendering: auto; }
.lightbox__close { position: absolute; top: 10px; right: 18px; color: #fff; font-size: 44px; line-height: 1; }

/* ================================================================
   ТЕЛЕФОНЫ И ПЛАНШЕТЫ (до 760px) — блоки идут друг под другом
   ================================================================ */
@media (max-width: 760px) {
  :root { --u: 1px; }
  body { font-size: 17px; }
  section { width: 100%; padding-left: 16px !important; padding-right: 16px !important; height: auto !important; min-height: 0 !important; }
  .h1 { font-size: clamp(44px, 13vw, 62px); }
  .h2 { font-size: 34px; }
  .tag { font-size: 16px; }
  .btn { height: 46px; font-size: 18px; padding: 0 24px; border-radius: 23px; }
  html { scroll-padding-top: 80px; }

  /* шапка */
  .header { width: calc(100% - 24px); height: 56px; top: 10px; margin-top: 12px; padding: 0 14px; border-radius: 28px; }
  .header__nav { display: none; }
  .logo-pill { position: static; transform: none; font-size: 18px; padding: 4px 16px 6px; border-radius: 18px; }
  .burger { display: flex; flex-direction: column; justify-content: center; gap: 5px; width: 40px; height: 40px; padding: 0 8px; }
  .burger span { display: block; height: 2px; background: var(--light); border-radius: 2px; transition: transform .2s, opacity .2s; }
  .burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .mobile-menu:not([hidden]) {
    display: flex; flex-direction: column; gap: 4px;
    position: fixed; top: 74px; left: 12px; right: 12px; z-index: 49;
    background: var(--red); color: var(--light); border-radius: 20px; padding: 12px 22px 16px;
    font-size: 20px;
  }
  .mobile-menu a { padding: 8px 0; }

  .topzone { margin-top: -68px; padding-top: 68px; }
  .topzone::before { background-size: 180px; }

  /* главная */
  .hero { padding-top: 34px !important; padding-bottom: 30px !important; text-align: center; }
  .hero__name { position: static; flex-direction: column; gap: 0; font-size: clamp(46px, 14vw, 66px); line-height: .95; }
  .hero__star { width: 62px; margin: -6px 0 -2px; }
  .hero__center { position: static; width: auto; }
  .hero__lead { max-width: 340px; margin: 18px auto 0; font-size: 18px; line-height: 1.2; }
  .hero__btn { width: auto; margin-top: 20px; }
  .hero__photos { position: relative; height: 380px; max-width: 380px; margin: 26px auto 0; }
  .p-kremlin { left: 2%;  top: 0;     width: 47%; }
  .p-library { left: 51%; top: 4px;   width: 46%; }
  .p-lab     { left: 6%;  top: 182px; width: 43%; }
  .p-selfie  { left: 52%; top: 196px; width: 41%; }

  /* обо мне */
  .about { padding-top: 10px !important; padding-bottom: 20px !important; display: flex; flex-direction: column; }
  .about > .h1 { position: static; order: 1; }
  .about__collage { order: 2; }
  .stickers { order: 3; position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 0; margin-top: 28px; }
  .sticker + .sticker { margin-top: -6px; }
  .sticker { position: relative; left: auto !important; top: auto !important; min-height: 52px !important; padding: 8px 22px; font-size: 17px; line-height: .95; }
  .sticker:nth-child(even) { align-self: flex-end; }
  .about__star--1 { left: auto; right: 10px; top: 4px; width: 70px; }
  .about__collage { position: relative; inset: auto; width: 100%; height: 400px; max-width: 320px; margin: 22px auto 0; }
  .about__tape-black { left: 14%; top: 0; width: 76%; }
  .about__portrait { left: 22%; top: 16px; width: 62%; }
  .about__film { left: 6%; top: 0; width: 92%; }
  .p-about { left: 0; top: 208px; width: 48%; }
  .about__tape-grey { left: -4%; top: 206px; width: 26%; }
  .about__star--2 { left: 78%; top: 310px; width: 56px; }

  /* как проходят уроки */
  .lessons { padding-top: 30px !important; padding-bottom: 120px !important; }
  .lessons > .h1 { position: static; }
  .slider { position: relative; left: auto; top: auto; transform: none; width: 100%; margin-top: 22px; flex-wrap: wrap; gap: 0; }
  .slider__window { width: 100%; order: 1; }
  .window__bar { height: 40px; padding: 0 12px; gap: 7px; }
  .dot { width: 16px; height: 16px; }
  .slider__title { font-size: 16px; padding-left: 60px; }
  .slider__viewport { height: auto; aspect-ratio: 1736 / 940; }
  .slide { padding: 6px; }
  .slider__arrow { order: 2; width: 44px; height: 44px; margin-top: 14px; }
  .slider__arrow--next { order: 4; }
  .slider__arrow[disabled] { opacity: .3; }
  .slider__dots { order: 3; display: flex; gap: 8px; align-items: center; margin: 14px auto 0; }
  .slider__dots button { width: 9px; height: 9px; border-radius: 50%; background: var(--light); opacity: .35; }
  .slider__dots button.is-active { opacity: 1; }
  .lessons__cat { left: auto; right: 10px; top: auto; bottom: -6px; width: 92px; }

  /* форматы */
  .formats { padding-top: 40px !important; }
  .formats .title-row, .course .title-row { flex-wrap: wrap; margin-bottom: 22px; }
  .acc__head { min-height: 0; padding: 14px 14px; flex-direction: column; gap: 10px; }
  .acc__head .h2 { padding-top: 0; }
  .price { width: auto; min-width: 0; margin-top: 0; padding: 8px 12px; font-size: 16px; text-align: left; }
  .acc__body > ul { padding: 0 14px; }
  .stars li { font-size: 16px; padding-left: 28px; line-height: 1.3; }
  .stars li::before { width: 21px; height: 21px; top: 0; }
  .stars li + li { margin-top: 10px; }
  .stars .hl { padding-left: 30px; padding-right: 8px; }
  .stars .hl::before { left: 3px; }

  /* курс */
  .course { padding-top: 40px !important; padding-bottom: 40px !important; }
  .curve--course { display: none; }
  .course__tabs { width: calc(100% - 26px); height: 40px; }
  .tab { flex: 1; width: auto; height: 40px; padding: 4px 4px 0 2px; font-size: clamp(11px, 3.45vw, 16px); white-space: nowrap; }
  .tab + .tab { margin-left: -4px; padding-left: 12px; }
  .tab::before { right: -14px; border-radius: 14px 16px 0 0; transform: perspective(60px) rotateX(16deg); }
  .course__card { width: 100%; min-height: 0; padding: 20px 16px 100px; border-radius: 0 24px 24px 24px; }
  .tabpane .sub { font-size: 17px; margin-bottom: 14px; max-width: none; }
  .tabpane .stars + .sub { margin-top: 22px; }
  .tabpane .stars li + li { margin-top: 9px; }
  .stars.cols { display: block; }
  .stars.cols li + li { margin-top: 9px; }
  .course__btns { margin-top: 24px; flex-direction: row; flex-wrap: wrap; }
  .course__btns .btn { width: auto; }
  .includes { width: calc(100% - 20px); margin: -54px 0 0 20px; border-radius: 12px; box-shadow: 0 0 0 2px var(--bg); }
  .includes__head { height: 54px; font-size: clamp(15px, 4.6vw, 18px); padding: 0 76px 0 16px; }
  .includes ul { padding: 16px 14px 18px; }
  .includes .stars li + li { margin-top: 10px; }
  .includes__star { left: auto; right: 2px; top: -40px; width: 70px; }

  /* отзывы */
  .reviews { padding-top: 40px !important; padding-bottom: 30px !important; }
  .reviews > .h1 { position: static; }
  .curve--reviews { display: none; }
  .reviews__hint { position: relative; left: auto; top: auto; height: 60px; margin: 10px 0 0 auto; width: 150px; }
  .reviews__hint span { left: 50px; font-size: 17px; }
  .reviews__hint svg { width: 36px; height: 44px; margin-top: 14px; }
  .reviews__stack { position: relative; left: auto; right: auto; top: auto; height: 250px; margin-top: 6px; }
  .rv { width: min(100%, calc(var(--w) * 0.8px)); }
  .reviews__more { position: relative; left: auto; top: auto; width: auto; margin: 26px 0 0 auto; display: flex; max-width: 240px; }

  /* контакты */
  .contacts { padding-top: 40px !important; }
  .contacts .h1 { margin-bottom: 22px; }
  .contacts__list { flex-direction: column; align-items: flex-start; gap: 8px; }
  .contact { height: auto; min-height: 42px; gap: 4px; max-width: 100%; }
  .contact__icon { width: 42px; height: 42px; border-radius: 7px; }
  .contact__label { padding: 4px 10px; font-size: 14px; border-width: 1.5px; border-radius: 7px; min-width: 0; white-space: normal; flex-wrap: wrap; line-height: 1.2; }
  .contact__label i { margin-left: 6px; opacity: .8; }

  /* футер */
  .footer { width: calc(100% - 32px); margin: 30px auto 16px; padding-top: 23px; }
  .footer__btn { width: auto; }
  .footer__box { height: auto; padding: 44px 18px 22px; gap: 34px; }
  .footer__nav { flex-direction: column; gap: 10px; font-size: 17px; }
  .footer__nav div { gap: 16px; flex-wrap: wrap; }
  .footer__bottom { flex-direction: column; align-items: flex-start; gap: 22px; }
  .footer__logo { font-size: 28px; padding: 0 14px 3px; }
  .footer__logo::before, .footer__logo::after { height: 36px; width: 10px; background-size: 10px 10px, 2px 100%; }
  .footer__logo::before { left: -5px; } .footer__logo::after { right: -5px; }
  .footer__up { font-size: 16px; }
  .footer__up svg { width: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
