/* ==========================================================================
   Секции: шапка, hero, кейсы
   ========================================================================== */

/* ---------- Hero ---------- */
.hero {
  position: relative;
  z-index: 1;
  height: 50rem; /* 800 */
  background: linear-gradient(180deg, var(--blue) 16.563%, rgba(7, 151, 255, 0) 100%);
  color: var(--white);
}
.hero__bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}
/* сетка-волна: 1920×638, центрируем и тянем по ширине макета */
.hero__wave {
  position: absolute;
  top: 0;
  left: 50%;
  width: 120rem;
  height: auto;
  transform: translateX(-50%);
  max-width: none;
}
/* зерно */
.hero__noise {
  position: absolute;
  inset: 0;
  opacity: 0.05;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='512' height='512'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 1.4 -0.2'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  background-size: 32rem 32rem;
  /* зерно гаснет к низу hero, чтобы не было шва с белым фоном */
  -webkit-mask-image: linear-gradient(180deg, #000 55%, transparent 100%);
  mask-image: linear-gradient(180deg, #000 55%, transparent 100%);
}

.hero__inner {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6.5rem; /* 104 */
  padding-top: 2rem;
}

/* ---------- Шапка ---------- */
.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}
.header__logo-wrap,
.header__nav,
.header__actions-wrap {
  flex: 1 0 0;
  min-width: 0;
  display: flex;
  align-items: center;
}
.header__nav {
  justify-content: center;
}
.header__actions-wrap {
  justify-content: flex-end;
}
.header__logo {
  display: block;
  width: 6rem; /* 96 */
  height: auto;
}
.header__actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* ---------- Hero: контент ---------- */
.hero__content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3rem;
  width: 66.5rem; /* 1064 */
  max-width: 100%;
}
.hero__title-group {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
  width: 100%;
}
.hero__title {
  text-align: center;
  text-wrap: balance;
}
/* «Ё» набрана как «Е» + две оранжевые звёздочки сверху */
.hero__yo {
  position: relative;
  display: inline-block;
}
.hero__yo::before,
.hero__yo::after {
  content: "";
  position: absolute;
  top: -0.09em;
  width: 1rem;
  height: 1rem;
  background: url("../assets/asterisk.svg") center / contain no-repeat;
}
.hero__yo::before {
  left: calc(50% - 1.125rem);
}
.hero__yo::after {
  left: calc(50% + 0.125rem);
}
.hero__lead {
  width: 46.8125rem; /* 749 */
  max-width: 100%;
  text-align: center;
}

/* ---------- Кейсы ---------- */
/* Пять кейсов подряд: блок «прилипает» к экрану, скролл листает кейсы (см. js/main.js).
   Высота трека = экран + 4 шага скролла; на каждый кейс приходится один шаг. */
.cases {
  position: relative;
  z-index: 2; /* выше hero: видео, въезжающее из hero, должно перекрывать его */
  --case-step: 70vh;
}
.cases__track {
  height: calc(100vh + 4 * var(--case-step));
}
.cases__stage {
  position: sticky;
  top: 0;
  display: flex;
  align-items: center;
  height: 100vh;
}
.cases__inner {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}

/* тексты кейсов лежат друг на друге в одной ячейке, виден активный */
.cases__text {
  position: relative;
  display: grid;
  align-self: stretch;
  flex: none;
  width: 27.625rem; /* 442 */
}
.cases__item {
  grid-area: 1 / 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding-block: 1.5rem 1rem;
  visibility: hidden;
  opacity: 0;
  translate: 0 1.5rem;
}
.cases__item.is-past { translate: 0 -1.5rem; }
.cases__item.is-active {
  visibility: visible;
  opacity: 1;
  translate: 0 0;
}
.cases__head {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}
.cases__label {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1rem;
}
/* подпись «[ Кейсы ]» одна на все кейсы и не двигается при смене; копия внутри кейса лишь держит место */
.cases__kicker {
  position: absolute;
  top: 1.5rem;
  left: 0;
  z-index: 1;
  color: var(--gray);
}
.cases__label-text {
  visibility: hidden;
  color: var(--gray);
}
.cases__logo {
  display: block;
  width: 7.1rem; /* 113.6 */
  height: auto;
}
/* заглушка вместо логотипа, пока нет настоящего */
.cases__logo--ph {
  display: flex;
  align-items: center;
  width: auto;
  height: 2rem;
  padding-inline: 0.5rem;
  white-space: nowrap;
  border: 1px dashed var(--gray);
  color: var(--gray);
  text-transform: uppercase;
}
.cases__title {
  color: var(--black);
}
.cases__desc {
  color: var(--black);
}

/* Слот держит место в потоке; превью внутри двигается transform-ом (см. js/main.js) */
.cases__slot {
  flex: none;
  width: 74.5rem; /* 1192 */
  aspect-ratio: 1192 / 700;
  position: relative;
}
.cases__slot.is-peek { pointer-events: none; }
.cases__preview {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border-radius: var(--r-l); /* 24 → при scale .75 даёт 18, как в макете */
  background: #f4a89c;
  transform-origin: 0 0;
  will-change: transform;
}
.cases__media {
  position: absolute;
  inset: 0;
  visibility: hidden;
  opacity: 0;
}
.cases__media.is-active {
  visibility: visible;
  opacity: 1;
}
.cases__video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* Chrome на Windows при скролле переключает видео между «аппаратным оверлеем» и обычной
     композицией, и цвет на мгновение меняется. Прозрачность 0.999 и свой слой не дают оверлею включиться,
     поэтому цвет всё время один и тот же (как у постера и остальных картинок) */
  opacity: 0.999;
  transform: translateZ(0);
  backface-visibility: hidden;
  /* если кадр на мгновение не успел отрисоваться (перезапуск цикла, возобновление после паузы),
     под ним не плоская заливка, а тот же кадр-постер */
  background: #f4a89c url("../assets/video/rozavam-poster.jpg") center / cover no-repeat;
}
.cases__media--ph {
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.85);
  text-transform: uppercase;
}
.cases__img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.cases__media--orbi {
  background:
    linear-gradient(115deg, transparent 0 8%, #55b6ef 8% 26%, transparent 26% 33%, #f283e8 33% 51%, transparent 51% 62%, #55b6ef 62% 80%, transparent 80%),
    #fff;
}
.cases__media--orbi .orbi-tag {
  padding: 0.5rem 1.5rem 0.75rem;
  border-radius: 1.25rem;
  background: #ff4a0a;
  color: #fff;
  font-size: 5rem;
  line-height: 0.95;
  text-align: center;
  text-transform: none;
  rotate: -3deg;
}
.cases__logo--img {
  width: auto;
  height: 2rem;
}
.cases__logo--brand {
  margin: 0;
  font-size: 2rem;
  line-height: 1;
  color: var(--black);
}

/* Ховер превью (макет 18:193): рифлёное стекло поверх размытого превью, «читать кейс» по центру,
   «на сайт» / «в фигму» слева внизу. Стекло рисует WebGL-шейдер (js/main.js). */
.cases__glass,
.cases__links,
.cases__more {
  opacity: 0;
  pointer-events: none;
}
.cases__glass {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: rgba(0, 0, 0, 0.12);
}
.cases__glass canvas {
  display: block;
  width: 100%;
  height: 100%;
}
/* без WebGL: просто размытие и затемнение */
.cases__glass.is-fallback {
  background: rgba(20, 20, 30, 0.35);
  -webkit-backdrop-filter: blur(24px) saturate(1.4);
  backdrop-filter: blur(24px) saturate(1.4);
}
.cases__glass.is-fallback canvas { display: none; }
.cases__link {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
}
.cases__more {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 3.5rem; /* 56 */
  line-height: 1;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  white-space: nowrap;
}
.cases__links {
  position: absolute;
  left: 2.25rem; /* 36 */
  bottom: 2.25rem;
  z-index: 3;
  display: flex;
  gap: 0.5rem;
}
.cases__links .btn {
  padding-inline: 2rem;
}
@media (hover: hover) {
  .cases__slot:hover .cases__glass,
  .cases__slot:hover .cases__more,
  .cases__slot:hover .cases__links,
  .cases__slot:has(:focus-visible) .cases__glass,
  .cases__slot:has(:focus-visible) .cases__more,
  .cases__slot:has(:focus-visible) .cases__links {
    opacity: 1;
  }
  .cases__slot:hover .cases__links,
  .cases__slot:has(:focus-visible) .cases__links {
    pointer-events: auto;
  }
}
/* на тачскрине стекла нет: превью целиком — ссылка на кейс */
@media (hover: none) {
  .cases__glass, .cases__links, .cases__more { display: none; }
}

/* прогресс по кейсам: 4 сегмента справа, каждый заполняется сверху вниз (--f: 0…1) */
.cases__progress {
  position: absolute;
  top: 1rem;
  right: 1rem;
  bottom: 1rem;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  width: 3px;
  opacity: var(--pg, 1); /* на десктопе main.js держит 0, пока карточка в первом экране */
}
.cases__progress i {
  position: relative;
  flex: 1 0 0;
  min-height: 1px;
  overflow: hidden;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.4);
}
.cases__progress i::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: var(--white);
  transform: scaleY(var(--f, 0));
  transform-origin: 50% 0;
}

/* ---------- Опыт ---------- */
.experience {
  padding-block: 5rem; /* 80 */
}
.experience__inner {
  display: flex;
  flex-direction: column;
  gap: 4rem; /* 64 */
}
.experience__title {
  color: #222;
}
.experience__list {
  display: flex;
  flex-direction: column;
}
/* линия сверху рисуется тенью, чтобы строка осталась ровно 216px */
.exp-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding-top: 1rem;
  box-shadow: inset 0 1px 0 var(--black);
}
.exp-row__date,
.exp-row__desc {
  padding-top: 2rem;
}
.exp-row__date {
  flex: none;
  width: 37.5rem; /* 600 */
  color: var(--black);
}
.exp-row__company {
  display: flex;
  align-items: flex-start;
  gap: 1.5rem;
  flex: none;
  width: 46.875rem; /* 750 */
  color: var(--black);
  white-space: nowrap;
}
.exp-row__tag {
  padding-top: 1.5rem;
  color: #222;
  letter-spacing: -0.02em;
}
.exp-row__desc {
  flex: 1 0 0;
  min-width: 0;
  color: var(--gray);
}

/* ---------- Обо мне ---------- */
.about {
  position: relative;
  z-index: 0;
  padding-block: 5rem; /* 80 */
}
/* голубое свечение за бенто (main__wave-bg в макете) */
.about::before {
  content: "";
  position: absolute;
  z-index: -1;
  left: 10.5%;
  right: 3%;
  top: 19rem;
  height: 31rem;
  border-radius: 8rem;
  background: #bde2ff;
  filter: blur(5rem);
  opacity: 1;
  pointer-events: none;
}
.about__inner {
  display: flex;
  flex-direction: column;
  gap: 4rem; /* 64 */
}
.about__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 5rem;
}
.about__title {
  font-size: 5rem; /* 80 */
  line-height: 1;
  letter-spacing: -0.02em;
  color: #222;
}

/* ряд инструментов: бегущая строка в окне 592×68 с затуханием по краям */
.tools {
  position: relative;
  width: 37rem; /* 592 */
  height: 4.25rem; /* 68 */
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 5.9375rem, #000 calc(100% - 5.9375rem), transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0, #000 5.9375rem, #000 calc(100% - 5.9375rem), transparent 100%);
}
.tools__marquee {
  display: flex;
  align-items: center;
  width: max-content;
  height: 100%;
}
.tools__track {
  display: flex;
  flex: none;
  align-items: center;
  gap: 1rem;
  padding: 0 1rem 0 0; /* хвост = gap, чтобы стык копий был ровным */
  margin: 0;
  list-style: none;
}
.tools__item {
  display: flex;
  align-items: center;
  flex: none;
  gap: 0.5rem;
  padding-inline: 1rem;
}
.tools__item--figma {
  padding-inline: 0; /* в самом SVG уже есть поля */
}
.tools__item img {
  height: auto;
  max-width: none;
}
.tools__item--gemini img:first-child {
  margin-right: 0.0rem;
}

/* ---------- Бенто ---------- */
.bento {
  display: grid;
  grid-template-columns: repeat(3, 37rem); /* 592 × 3 */
  gap: 0.5rem;
  justify-content: space-between;
}
.bento__col {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.bento__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}
.bento__col--right {
  flex-direction: row;
}
.bento__stack {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex: none;
  width: 18.25rem; /* 292 */
}

.card {
  position: relative;
  margin: 0;
  overflow: hidden;
  border-radius: var(--r-l);
  background: var(--white);
  color: var(--black);
}
.card--design {
  height: 18.75rem; /* 300 */
}
.card--voronezh,
.card--years,
.card--business {
  height: 18.25rem; /* 292 */
}
.card--beatles {
  height: 18.75rem;
}
.card--loko {
  flex: none;
  width: 18.25rem;
  height: 37.5rem; /* 600 */
}
.card--photo {
  height: 37.5rem;
  background: #0797ff;
}

.card__text {
  position: absolute;
  left: 2rem;
  right: 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  z-index: 2;
}
.card__text--top {
  top: 2rem;
}
.card__text--bottom {
  bottom: 2rem;
}
.card__title {
  color: #222;
}
.card__desc {
  color: var(--gray);
}
.card--design .card__desc {
  max-width: 26.5rem; /* перенос строк как в макете */
}
.card__desc--voronezh { max-width: 12.25rem; }
.card__desc--business { max-width: 11.25rem; }
.card__desc--loko { max-width: 13.25rem; }
.emoji {
  font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif;
  text-transform: none;
  word-spacing: 0;
}

/* чипы */
.chips {
  position: absolute;
  inset: 0;
}
.chip {
  position: absolute;
  padding: 0.75rem 1.5rem;
  border: 1px solid #c0e4ff;
  border-radius: 1.25rem;
  background: var(--white);
  font-size: 1rem;
  line-height: 1.3;
  letter-spacing: -0.04em;
  white-space: nowrap;
  transform: rotate(var(--r, 0deg));
  transform-origin: 50% 50%;
}
.chip--accent {
  border-color: #ff6b5a;
  background: #ff6b5a;
  color: var(--white);
}

/* из воронежа */
.card__orbits {
  position: absolute;
  top: 0;
  left: 0;
  width: 18.25rem;
  height: auto;
  max-width: none;
  /* затухание сверху (card__fade в макете) */
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 6rem);
  mask-image: linear-gradient(180deg, transparent 0%, #000 6rem);
}
.avatar {
  position: absolute;
  z-index: 2;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  object-fit: cover;
}
.avatar--a { left: 0.75rem; top: 0.6875rem; }
.avatar--b { right: 3.8125rem; top: 5.8125rem; }
.avatar--c { left: 5.5625rem; top: 3.6875rem; }
.avatar--beaver {
  right: 3.25rem;
  top: 0.3125rem;
  display: grid;
  place-items: center;
}
.avatar--beaver img,
.avatar--beaver i {
  grid-area: 1 / 1;
}
.avatar--beaver .avatar__beaver {
  width: 1.25rem;
  height: 1.25rem;
  place-self: center;
}
.avatar--beaver i {
  font-style: normal;
  font-size: 1.25rem;
  line-height: 1;
  font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif;
}

/* годы */
.years-grid {
  position: absolute;
  top: 1.25rem;
  right: 0.5rem;
  display: grid;
  grid-template-columns: repeat(4, 1.375rem);
  grid-auto-rows: 1rem;
  gap: 0.25rem;
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 45%);
  mask-image: linear-gradient(180deg, transparent 0%, #000 45%);
}
.years-grid i {
  border: 0.7px solid #c0e4ff;
  border-radius: 4px;
}
.years-grid i.is-now {
  border-color: #ff6b5a;
  background: #ff6b5a;
}
.years-grid i.is-off {
  opacity: 0;
}
.icon--double-down {
  --icon: url("../assets/caret-double-down.svg");
}
.years {
  position: absolute;
  top: 1.5rem;
  left: 2rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.5rem;
  z-index: 2;
}
.years__num {
  font-size: 3.5rem; /* 56 */
  line-height: 1;
  letter-spacing: -0.02em;
  color: #222;
}
.years__num--now {
  color: #ff6b5a;
}

/* фото */
.card__photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.photo-cap {
  position: absolute;
  top: 2rem;
  left: 2rem;
  width: 12.75rem; /* 204 */
  color: var(--white);
}
.photo-cap__name {
  font-size: 3.5rem;
  line-height: 1;
  letter-spacing: -0.02em;
}
.photo-cap__hi {
  margin-top: 1rem;
  letter-spacing: -0.04em;
}

/* beatles: волна 322×74 по центру карточки (в макете она шире карточки и уходит под белое затухание по краям) */
.wave {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 0;
  width: 20.125rem; /* 322 */
  height: 4.625rem; /* 74 */
  translate: -50% -50%;
}
.wave img {
  width: 100%;
  height: 100%;
  max-width: none;
}
.card--beatles::before,
.card--beatles::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  z-index: 1;
  pointer-events: none;
}
.card--beatles::before {
  left: 0;
  width: 3.75rem; /* 60 */
  background: linear-gradient(90deg, #fff, rgba(255, 255, 255, 0));
}
.card--beatles::after {
  right: 0;
  width: 3.1875rem; /* 51 */
  background: linear-gradient(270deg, #fff, rgba(255, 255, 255, 0));
}
.card--beatles .card__text {
  z-index: 2;
}

/* ИП */
.chart-grid {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 25.125rem;
  height: auto;
  max-width: none;
}
.chart-line {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 17.375rem;
  height: auto;
  max-width: none;
}

/* локомотив */
.loko-logo {
  position: absolute;
  top: 9.125rem;
  left: 50%;
  width: 3.4375rem;
  height: auto;
  transform: translateX(-50%);
}
.year-picker {
  position: absolute;
  top: 13.75rem;
  left: 0;
  right: 0;
  display: flex;
  flex-direction: column;
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 22%, #000 78%, transparent 100%);
  mask-image: linear-gradient(180deg, transparent 0%, #000 22%, #000 78%, transparent 100%);
}
.year-picker li {
  position: relative;
  display: grid;
  place-items: center;
  height: 3.5rem;
  font-size: 1.125rem;
  letter-spacing: -0.04em;
  opacity: 0.7;
}
.year-picker li:nth-child(1),
.year-picker li:nth-child(5) {
  font-size: 0.9rem;
  opacity: 0.5;
}
.year-picker li.is-now {
  font-size: 1.2rem;
  color: #ff6b5a;
  opacity: 1;
}
.year-picker li.is-now::before {
  content: "";
  position: absolute;
  inset: 0.375rem 1rem;
  z-index: -1;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(255, 225, 221, 0.7), rgba(255, 255, 255, 0));
  filter: blur(4px);
}

/* ---------- Подвал ---------- */
.footer {
  position: relative;
  z-index: 0;
  padding-block: 5rem; /* 80 */
}
.footer__grid {
  position: absolute;
  z-index: -1;
  left: 0;
  top: -8rem;
  width: 100%;
  min-width: 120rem;
  height: auto;
  max-width: none;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 30%);
  mask-image: linear-gradient(180deg, transparent 0%, #000 30%);
}
.footer__body {
  position: relative;
}
.footer__nav {
  position: absolute;
  z-index: 2;
  top: 0;
  right: var(--gutter);
  display: flex;
  justify-content: space-between;
  gap: 2.5rem;
  width: 27.625rem; /* 442 */
}
.footer__nav .nav-link {
  padding-inline: 0;
}
.footer__content {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 9.875rem;
}
.footer__contact {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  flex: none;
  width: 27.625rem;
}
.footer__lead {
  display: flex;
  flex-direction: column;
  gap: 4rem;
}
.footer__title {
  font-size: 5rem;
  line-height: 1;
  letter-spacing: -0.02em;
  color: #222;
}
.footer__write {
  width: 18.25rem; /* 292 */
  height: 4.5rem; /* 72 */
  padding-block: 0;
}
.footer__art {
  display: flex;
  flex: none;
  flex-direction: column;
  align-items: center;
  gap: 2.5rem;
  width: 74.5rem; /* 1192 */
}
.footer__letters {
  width: 74.5rem;
  height: auto;
  max-width: none;
}
.footer__squiggle {
  /* svg включает обводку (по 20px с каждой стороны): компенсируем, чтобы высота блока была 48 */
  width: 72.125rem;
  height: auto;
  max-width: none;
  margin-block: -1.25rem;
}

/* ==========================================================================
   Чипы: позиции на десктопе (центры повёрнутых плашек, как в макете 1920)
   ========================================================================== */
.chip--1 { left: 1.821rem; top: 15.8471rem; }
.chip--2 { left: 15.6622rem; top: 11.3808rem; }
.chip--3 { left: 7.9859rem; top: 12.9293rem; }
.chip--4 { left: 25.9913rem; top: 15.3399rem; }
.chip--5 { left: -0.3282rem; top: 13.433rem; }
.chip--6 { left: 9.2872rem; top: 15.8183rem; }
.chip--7 { left: 27.6646rem; top: 11.5124rem; }
.chip--8 { left: 31.0216rem; top: 12.5434rem; }
.chip--9 { left: 23.1857rem; top: 12.4517rem; }
.chip--10 { left: 20.5748rem; top: 15.8724rem; }
.chip--11 { left: 13.9635rem; top: 14.0086rem; }

.card__stage { position: absolute; inset: 0; }
.burger,
.menu { display: none; }

/* ==========================================================================
   АДАПТИВ  <1280px: root = 16px, раскладка перестраивается
   Планшет 768–1279 (макета нет, продумано), мобилка ≤767 — макет 360.
   ========================================================================== */
@media (max-width: 1279px) {
  html { font-size: 16px; }
  .container { padding-inline: 2rem; }

  /* --- hero --- */
  .hero__inner { gap: 5rem; }
  .hero__content { width: 100%; max-width: 66.5rem; }
  .t-h1 { font-size: clamp(4.5rem, 9.5vw, 8rem); }
  .hero__lead { width: 100%; max-width: 46.8rem; font-size: 1.5rem; }

  /* --- кейсы: превью над текстом --- */
  .cases__inner { flex-direction: column; align-items: stretch; gap: 2rem; }
  /* превью не выше экрана: ширина считается от высоты окна */
  .cases__slot { order: -1; width: min(100%, calc((100vh - 25rem) * 1.703)); margin-inline: auto; }
  .cases__text { width: 100%; max-width: 44rem; margin-inline: auto; }
  .cases__item { padding: 0; gap: 1rem; justify-content: flex-start; }
  .cases__kicker { top: 0; }
  .cases__logo { width: 5.325rem; }
  .cases__title { font-size: 3rem; }

  /* --- опыт --- */
  .experience { padding-block: 2.5rem; }
  .experience__inner { gap: 2rem; }
  .experience__title { font-size: 2.5rem; }
  .exp-row {
    display: grid;
    grid-template-columns: 11rem 1fr;
    align-items: start;
    column-gap: 2rem;
    padding: 2rem 0 1rem;
  }
  .exp-row__date,
  .exp-row__desc,
  .exp-row__company { width: auto; padding-top: 0; }
  .exp-row__date { grid-column: 1; grid-row: 1; padding-top: 1.5rem; }
  .exp-row__company {
    grid-column: 2; grid-row: 1;
    font-size: clamp(5.5rem, 12vw, 9rem);
    gap: 1rem;
  }
  .exp-row__tag { padding-top: 0.75rem; font-size: 2rem; }
  .exp-row__desc { grid-column: 2; grid-row: 2; margin-top: 1rem; max-width: 36rem; font-size: 1.25rem; }

  /* --- обо мне --- */
  .about { padding-block: 4rem; }
  .about::before { left: 0; right: 0; top: 9rem; height: auto; bottom: 2rem; filter: blur(3rem); border-radius: 4rem; opacity: 0.8; }
  .about__inner { gap: 2.5rem; }
  .about__head { flex-direction: column; align-items: stretch; height: auto; gap: 2rem; }
  .about__title { font-size: 4rem; }
  .tools { width: 100%; }

  /* бенто: карточки мобильных размеров, 2 колонки на планшете */
  .bento { grid-template-columns: 1fr 1fr; gap: 0.5rem; justify-content: stretch; }
  .bento__col, .bento__row, .bento__stack, .bento__col--right { display: contents; }
  .card--design { grid-column: 1; grid-row: 1; height: 18.75rem; }
  .card--voronezh { grid-column: 1; grid-row: 2; height: 18.25rem; }
  .card--photo { grid-column: 2; grid-row: 1 / span 2; height: auto; min-height: 20.75rem; }
  .card--beatles { grid-column: 1; grid-row: 3; height: 18.75rem; }
  .card--business { grid-column: 1; grid-row: 4; height: 18.25rem; }
  .card--loko { grid-column: 2; grid-row: 3 / span 2; width: auto; height: auto; min-height: 32.5rem; }
  .card--years { grid-column: 1 / -1; grid-row: 5; height: 18.25rem; }

  .card__text { left: 1.5rem; right: 1.5rem; }
  .card__text--top { top: 1.5rem; }
  .card__text--bottom { bottom: 1.5rem; }
  .card__title { font-size: 1.75rem; }
  .card--design .emoji { font-size: 2.5rem; line-height: 0; }
  .card--design .card__desc,
  .card__desc--voronezh,
  .card__desc--business,
  .card__desc--loko { max-width: none; }
  .card--loko .card__title br { display: none; }

  /* чипы: куча лежит на дне карточки — нижний ряд касается края (чуть срезан), выше два ряда внахлёст, как сваленные */
  .chips { inset: 0 auto 0 50%; width: 20.5rem; transform: translateX(-50%); }
  .chip { padding: 0.5rem 1rem; font-size: 0.9375rem; border-radius: 1rem; }
  .chip--1, .chip--4, .chip--5, .chip--7, .chip--8 { display: none; }
  .chip--6 { left: 0.3rem; top: 16.6rem; --r: -3deg !important; z-index: 1; }
  .chip--2 { left: 7.6rem; top: 16.8rem; --r: 2deg !important; z-index: 1; }
  .chip--10 { left: 15.4rem; top: 16.5rem; --r: -5deg !important; z-index: 1; }
  .chip--3 { left: 2.6rem; top: 14.8rem; --r: -9deg !important; z-index: 2; }
  .chip--11 { left: 9.6rem; top: 14.9rem; --r: 6deg !important; z-index: 2; }
  .chip--9 { left: 6.6rem; top: 13rem; --r: -10deg !important; z-index: 3; }

  /* из воронежа: сцена 328px по центру */
  .card__stage { inset: 0 auto 0 50%; width: 20.5rem; transform: translateX(-50%); }
  .card__orbits { left: 2.28rem; }
  .avatar--a { left: 0.75rem; top: 0.6875rem; right: auto; }
  .avatar--b { left: 13.75rem; top: 5.896rem; right: auto; }
  .avatar--c { left: 5.875rem; top: 3.021rem; right: auto; }
  .avatar--beaver { left: 13.3125rem; top: 0.833rem; right: auto; }

  /* годы */
  .years-grid { top: 0; right: 0; }
  .years { top: 1.5rem; left: 1.5rem; gap: 0.4375rem; }
  .years__num { font-size: 3rem; line-height: 0.9; }

  /* фото */
  .photo-cap { top: 1.5rem; left: 1.5rem; width: 9.5625rem; }
  .photo-cap__name { font-size: 2rem; line-height: 1.1; }
  .photo-cap__hi { margin-top: 0.5rem; font-size: 1.125rem; }
  .card__photo { object-position: 62% 40%; }

  /* beatles / ИП */
  .chart-grid { left: -2.3125rem; }
  .chart-line { right: 1rem; bottom: -0.75rem; }

  /* локомотив */
  .loko-logo { top: 5.09rem; width: 3.384rem; }
  .year-picker { top: 10.09rem; gap: 0.25rem; }
  .year-picker li { height: 3.1875rem; }
  .year-picker li:nth-child(1), .year-picker li:nth-child(5) { height: 2.6875rem; }
  .year-picker li.is-now { height: 3.5625rem; }

  /* --- подвал --- */
  .footer { padding-block: 2.5rem; }
  .footer__grid { display: none; }
  .footer__body { display: flex; flex-direction: column; gap: 4rem; }
  .footer__content { display: contents; }
  .footer__contact { order: 1; width: 100%; gap: 2.5rem; justify-content: flex-start; }
  .footer__lead { flex-direction: column-reverse; gap: 1rem; }
  .footer__title { font-size: 5rem; }
  .footer__write { width: 100%; max-width: 24rem; height: 4.5rem; }
  .footer__nav {
    order: 2;
    position: static;
    width: 100%;
    max-width: 30rem;
    justify-content: space-between;
  }
  .footer__art {
    order: 3;
    width: 100%;
    gap: 3.356cqw;
    container-type: inline-size;
  }
  .footer__letters { width: 100%; }
  .footer__squiggle { width: 96.8%; margin-block: -1.678cqw; }
}

/* ---- ≥1024: шапка как на десктопе, анимация видео работает ---- */
@media (min-width: 1024px) and (max-width: 1279px) {
  .header__logo-wrap, .header__actions-wrap { flex: none; }
  .header__nav { flex: 1 1 auto; }
  .about__head { flex-direction: row; align-items: center; height: 5rem; }
  .about__title { font-size: 5rem; }
  .tools { width: 37rem; flex: none; }
}

/* ---- <1024: бургер-меню вместо навигации ---- */
@media (max-width: 1023px) {
  .header__nav, .header__actions { display: none; }
  .burger {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
    width: 5.3125rem;
    height: 3rem;
    border: 1px solid var(--white);
    border-radius: var(--r-s);
    color: var(--white);
    transition: background-color 0.2s;
  }
  .burger:hover { background: rgba(255, 255, 255, 0.15); }
  .burger span {
    display: block;
    width: 1.1875rem;
    height: 2px; /* целое число пикселей: при 1.5px средняя линия сглаживается и выглядит толще */
    border-radius: 1px;
    background: currentColor;
  }
  .header { justify-content: space-between; }
  .header__logo-wrap { flex: none; }

  .menu {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: flex;
    flex-direction: column;
    gap: 3rem;
    padding: 2rem 2rem 2rem; /* верх и бока как у шапки сайта */
    overflow-y: auto;
    color: var(--white);
    background: linear-gradient(180deg, #0797ff 0%, #4db6ff 100%);
  }
  .menu[hidden] { display: none; }
  .menu__top { display: flex; align-items: center; justify-content: space-between; height: 3rem; }
  .menu__logo img { width: 6rem; height: auto; }
  .menu__close {
    position: relative;
    width: 5.3125rem;
    height: 3rem;
    border: 1px solid var(--white);
    border-radius: var(--r-s);
  }
  .menu__close span {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 1.375rem;
    height: 2px;
    border-radius: 1px;
    background: var(--white);
    transform: translate(-50%, -50%) rotate(45deg);
  }
  .menu__close span:last-child { transform: translate(-50%, -50%) rotate(-45deg); }
  .menu__nav { display: flex; flex-direction: column; gap: 0.5rem; }
  .menu__link { font-size: 4.5rem; line-height: 1; letter-spacing: -0.02em; }
  .menu__actions { display: flex; flex-direction: column; gap: 0.5rem; margin-top: auto; }
  .menu__actions .btn { width: 100%; }
  .menu__actions .btn--cta { height: 4rem; }
  body.is-menu-open { overflow: hidden; }
  /* полоса прокрутки зарезервирована (scrollbar-gutter), при открытом меню она пустая: красим её тем же градиентом */
  html.is-menu-open { background: linear-gradient(180deg, #0797ff 0%, #4db6ff 100%) fixed; }
}

/* ==========================================================================
   Мобильная версия (макет 360): ≤767px, 1rem = 16px = 1px макета
   ========================================================================== */
@media (max-width: 767px) {
  .container { padding-inline: 1rem; }

  .hero__inner { gap: 3.5rem; padding-top: 1.5rem; }
  .menu { padding: 1.5rem 1rem 2rem; }
  .t-h1 { font-size: clamp(3rem, 13.33vw, 5.5rem); }
  .hero__title-group { gap: 1.5rem; }
  .hero__lead { font-size: 1.25rem; max-width: 18rem; }
  /* точки над «Ё» — две звёздочки вплотную друг к другу, ровно по ширине буквы, не заходят на строку выше */
  .hero__yo::before, .hero__yo::after { width: 0.24em; height: 0.24em; top: -0.13em; }
  .hero__yo::before { left: calc(50% - 0.235em); }
  .hero__yo::after { left: calc(50% - 0.005em); }
  .hero__content { gap: 2rem; }
  .btn--cta { font-size: 1rem; }
  .hero__content .btn--cta { width: 100%; padding-inline: 1rem; }

  .cases__inner { gap: 1.5rem; }
  .cases__slot { width: 100%; aspect-ratio: 328 / 280; }
  .cases__title { font-size: 2rem; line-height: 1.1; }
  .cases__desc { font-size: 1.125rem; }

  .experience__title { font-size: 1.75rem; }
  .exp-row { display: block; padding: 2rem 0 1rem; }
  .exp-row__date { padding-top: 0; }
  .exp-row__company { display: flex; margin-top: 0.5rem; font-size: 5.5rem; gap: 0.5rem; }
  .exp-row__tag { padding-top: 0.5rem; font-size: 1.75rem; }
  .exp-row__desc { margin-top: 2.5rem; max-width: none; font-size: 1.125rem; }

  .about { padding-block: 2.5rem; }
  .about__inner { gap: 2rem; }
  .about__head { gap: 2rem; }
  .about__title { font-size: 2.5rem; font-weight: 800; }

  .bento { grid-template-columns: 1fr; }
  .card--design, .card--voronezh, .card--photo, .card--beatles,
  .card--business, .card--loko, .card--years { grid-column: 1; grid-row: auto; }
  .card--photo { height: 20.75rem; min-height: 0; }
  .card--loko { height: 32.5rem; min-height: 0; }

  .footer__title { font-size: 2.5rem; font-weight: 800; }
  .footer__write { max-width: none; }
  .footer__nav { max-width: none; }
}

/* ширина 360 и уже: поля как в макете */
@media (max-width: 360px) {
  .container { padding-inline: 1rem; }
}

/* ==========================================================================
   Закреплённая шапка (макет 141:2769): белая, появляется при скролле вверх
   ========================================================================== */
.sticky-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  padding: 2rem 4rem 1rem; /* 32 / 64 / 16 */
  background: var(--white);
  color: var(--black);
  box-shadow: 0 1px 0 rgba(43, 46, 51, 0.06), 0 1rem 2rem -1.25rem rgba(43, 46, 51, 0.25);
  translate: 0 -100%;
  visibility: hidden;
  transition: translate 0.45s cubic-bezier(0.2, 0.7, 0.2, 1), visibility 0s linear 0.45s;
}
.sticky-header.is-shown {
  translate: 0 0;
  visibility: visible;
  transition: translate 0.45s cubic-bezier(0.2, 0.7, 0.2, 1), visibility 0s;
}
.sticky-header .btn--outline {
  border-color: var(--black);
  color: var(--black);
}
.sticky-header .btn--outline:hover {
  background: var(--orange);
  border-color: var(--orange);
  color: var(--white);
}
.sticky-header .burger {
  color: var(--black);
  border-color: var(--black);
}
.sticky-header .burger:hover {
  background: rgba(43, 46, 51, 0.08);
}
@media (prefers-reduced-motion: reduce) {
  .sticky-header,
  .sticky-header.is-shown {
    transition: none;
  }
}
@media (max-width: 1279px) {
  .sticky-header { padding: 1rem 2rem; }
}
@media (max-width: 767px) {
  .sticky-header { padding: 1rem; }
}

/* у кейсов без сайта в превью только «в фигму» */
.cases__site[hidden] { display: none; }

/* узкий телефон: кадр сдвинут так, чтобы человек стоял правее и подпись не налезала на лицо */
@media (max-width: 560px) {
  .card__photo { width: 122%; max-width: none; object-position: 0% 40%; }
}
