/* ============ Шрифты (лежат на сайте, без Google Fonts) ============ */
@font-face { font-family: 'IBM Plex Serif'; font-style: italic; font-weight: 500; font-display: swap; src: url('assets/fonts/IBMPlexSerif-italic-500-cyrillic.woff2') format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'IBM Plex Serif'; font-style: italic; font-weight: 500; font-display: swap; src: url('assets/fonts/IBMPlexSerif-italic-500-latin.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'IBM Plex Serif'; font-style: italic; font-weight: 600; font-display: swap; src: url('assets/fonts/IBMPlexSerif-italic-600-cyrillic.woff2') format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'IBM Plex Serif'; font-style: italic; font-weight: 600; font-display: swap; src: url('assets/fonts/IBMPlexSerif-italic-600-latin.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Manrope'; font-style: normal; font-weight: 400 700; font-display: swap; src: url('assets/fonts/Manrope-normal-400-cyrillic.woff2') format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Manrope'; font-style: normal; font-weight: 400 700; font-display: swap; src: url('assets/fonts/Manrope-normal-400-latin.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

/* ============ Основа ============ */
:root {
  --bg: #f7f3ee;
  --ink: #111111;
  --text: #2b2b2b;
  --muted: #696969;
  --soft: #b9b2a8;
  --gold: #c3b07e;
  --beige: #e1d5ba;
  --panel: rgba(239, 230, 214, .55);
  --card: rgba(232, 221, 201, .55);
  --pill-dark: #494949;

  --serif: 'IBM Plex Serif', Georgia, serif;
  --sans: 'Manrope', Arial, sans-serif;

  --radius: 24px;

  /* Сетка сайта — та же, что на главном экране:
     внешние линии = внутренние края карточки главного экрана,
     правая колонка = колонка с цитатой и цифрами. */
  --frame: 1440px;
  --page-pad: 24px;
  --gutter: clamp(24px, 4vw, 60px);
  --aside: clamp(260px, 25vw, 354px);
  --col-gap: clamp(32px, 5vw, 72px);
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 90px; }

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.45;
  color: var(--text);
  background: var(--bg) url('assets/img/noise.jpg') center top / 1680px auto repeat;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, p, figure, blockquote { margin: 0; }

.container {
  width: 100%;
  max-width: calc(var(--frame) + 2 * var(--page-pad));
  margin: 0 auto;
  padding: 0 calc(var(--page-pad) + var(--gutter));
}

.section { padding: clamp(64px, 9vw, 120px) 0 0; }

/* Заголовки — фирменный курсив с засечками */
.h2, .h3 {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.01em;
}
.h2 { font-size: clamp(34px, 4vw, 52px); color: #5f5c58; }
.h3 { font-size: clamp(26px, 2.8vw, 38px); color: var(--soft); }
.h3--small { font-size: clamp(22px, 2vw, 28px); }

.eyebrow {
  font-size: 15px;
  color: var(--ink);
  margin-bottom: 10px;
}

/* Выделение текста — как в исходном дизайне: бежевая плашка с золотыми точками */
mark {
  position: relative;
  color: inherit;
  background: rgba(225, 213, 186, .55);
  padding: 0 3px;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

/* ============ Кнопки и плашки ============ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 42px;
  padding: 0 28px;
  border-radius: 999px;
  font: 600 15px/1 var(--sans);
  cursor: pointer;
  border: 1.5px solid transparent;
  transition: background-color .25s, color .25s, border-color .25s, transform .25s;
}
.btn:hover { transform: translateY(-2px); }
.btn--dark { background: var(--ink); color: #fff; }
.btn--dark:hover { background: #333; }
.btn--outline { border-color: var(--ink); color: var(--ink); }
.btn--outline:hover { background: var(--ink); color: #fff; }
.btn--white { background: #fff; color: var(--ink); }
.btn--glass { border-color: rgba(255, 255, 255, .85); color: #fff; }
.btn--glass:hover { background: rgba(255, 255, 255, .15); }
.btn--wide { width: 100%; }

.pills { display: flex; flex-wrap: wrap; gap: 6px; }
.pills li {
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--beige);
  color: var(--ink);
  font-size: 12px;
  font-weight: 500;
}
.pills--dark li { background: var(--pill-dark); color: #fff; }

/* ============ Фиксированное меню ============ */
.topbar {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 14px max(calc(var(--page-pad) + var(--gutter)), calc((100vw - var(--frame)) / 2 + var(--gutter)));
  background: rgba(247, 243, 238, .82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transform: translateY(-100%);
  transition: transform .45s cubic-bezier(.2, .7, .2, 1);
}
.topbar.is-shown { transform: none; }
.topbar__logo { font-size: 18px; color: var(--muted); }
.topbar__nav { display: flex; align-items: center; gap: 36px; font-size: 18px; color: var(--muted); }
.topbar__nav > a:not(.btn):hover { color: var(--ink); }
.topbar__nav .btn { height: 40px; padding: 0 40px; }
.topbar__nav .btn--outline { margin-left: 20px; margin-right: -24px; }
.topbar__toggle { display: none; }

/* ============ Главный экран ============ */
.hero { padding: 40px var(--page-pad) 0; }

.hero__card {
  --title-fs: clamp(32px, 3.6vw, 54px);
  position: relative;
  max-width: var(--frame);
  margin: 0 auto;
  padding: 36px var(--gutter);
  border-radius: var(--radius);
  overflow: hidden;
  color: var(--ink);
  /* фон чуть выше карточки — нижняя тёмная полоса обрезается */
  background: #e9e9e7 url('assets/img/hero-bg.jpg') center top / auto 112% no-repeat;
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--aside);
  grid-template-rows: auto auto auto;
  grid-template-areas:
    "skills ."
    "intro  quote"
    "nav    stats";
  column-gap: var(--col-gap);
}

/* Бегущая строка */
.hero__skills {
  grid-area: skills;
  overflow: hidden;
  padding: 10px 0 16px;
  border-bottom: 1px solid rgba(0, 0, 0, .45);
  font-size: clamp(14px, 1.2vw, 17px);
  color: #5c5c5c;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}
.marquee { display: flex; width: max-content; }
.marquee li { display: flex; white-space: nowrap; }
.marquee li::after { content: '/'; margin: 0 clamp(28px, 4.5vw, 72px); color: #6f6f6f; }
.marquee.is-running { animation: marquee var(--marquee-duration, 20s) linear infinite; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* Фото + имя слева, цитата справа: значок цитаты = верх фото,
   имя и текст цитаты — по середине фото */
.hero__intro {
  grid-area: intro;
  display: flex;
  align-items: center;
  gap: clamp(16px, 2vw, 28px);
  margin-top: clamp(40px, 5vw, 70px);
}
.hero__portrait {
  width: clamp(110px, 13vw, 190px);
  border-radius: 20px;
  flex-shrink: 0;
}
.hero__title {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 600;
  line-height: 1;
  font-size: var(--title-fs);
}
.hero__first, .hero__last { color: #c4c4c4; white-space: nowrap; }
.hero__role { display: block; white-space: nowrap; color: #696969; }

.hero__quote {
  grid-area: quote;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 14px;
  margin-top: clamp(40px, 5vw, 70px);
  font-size: clamp(14px, 1.15vw, 17px);
  line-height: 1.25;
  letter-spacing: -0.02em;
}
/* Текст цитаты занимает ту же высоту, что и заголовок, и прижат к низу —
   последняя строка стоит на одной линии с «marketing brand designer» */
.hero__quote p {
  display: flex;
  align-items: flex-end;
  min-height: calc(2 * var(--title-fs));
}
.hero__quote img {
  position: absolute;
  top: 0;
  left: 0;
  width: 46px;
  height: 46px;
  padding: 8px;
  border-radius: 8px;
  background: #fff;
}

.hero__nav {
  grid-area: nav;
  align-self: end;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 12px 10px 40px;
  border-radius: 999px;
  background: rgba(70, 70, 60, .28);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: #fff;
  font-size: clamp(15px, 1.25vw, 18px);
}
.hero__links { display: flex; gap: clamp(20px, 3.5vw, 50px); }
.hero__links a { opacity: .95; transition: opacity .2s; }
.hero__links a:hover { opacity: .7; }
.hero__buttons { display: flex; gap: 12px; }
.hero__buttons .btn { padding: 0 clamp(24px, 3.5vw, 50px); }
.hero__menu { display: none; }

/* Цифры лесенкой: каждая плашка в своей колонке, края не заходят друг на друга */
.hero__stats {
  grid-area: stats;
  align-self: end;
  display: grid;
  /* плотная лесенка: плашка с инвестициями забирает остаток ширины */
  grid-template-columns: max-content max-content minmax(0, 1fr);
  grid-template-rows: repeat(3, auto);
  gap: 6px;
  margin-top: 28px;
}
.stat {
  display: flex;
  flex-direction: column;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, .22);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #fff;
}
.stat b { font-size: clamp(18px, 1.7vw, 24px); font-weight: 500; line-height: 1; }
.stat--years b { white-space: nowrap; }
.stat--years { width: clamp(84px, 7.6vw, 110px); }
.stat--projects { width: clamp(76px, 6.4vw, 92px); }
.stat span { font-size: 10px; font-weight: 600; line-height: 1.15; margin-top: 3px; }
.stat--years { grid-column: 1; grid-row: 1; }
.stat--projects { grid-column: 2; grid-row: 2; }
.stat--light { grid-column: 3; grid-row: 3; background: rgba(240, 240, 240, .8); color: var(--muted); }
.hero__birds {
  grid-column: 1;
  grid-row: 3;
  align-self: end;
  width: 70px;
  height: 70px;
  border-radius: 14px;
  background: #fff;
}
.hero__birds img { width: 100%; height: 100%; }

/* ============ Опыт ============ */
/* Все двухколоночные блоки — по сетке главного экрана */
.experience__top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--aside);
  gap: var(--col-gap);
}
.experience__main .h2 { margin-bottom: 22px; }
.lead {
  max-width: 560px;
  font-size: clamp(17px, 1.5vw, 20px);
  line-height: 1.4;
  color: var(--ink);
}

.facts { margin-top: 40px; border-top: 1px solid rgba(0, 0, 0, .12); }
.fact {
  display: flex;
  gap: 24px;
  padding: 20px 0;
  border-bottom: 1px solid rgba(0, 0, 0, .12);
}
.fact__num {
  flex: 0 0 auto;
  font-family: var(--serif);
  font-style: italic;
  font-size: 20px;
  color: var(--gold);
}
.fact b { display: block; font-size: 19px; font-weight: 600; color: var(--ink); margin-bottom: 2px; }
.fact p { font-size: 15px; color: var(--muted); }

.experience__photo { width: 100%; border-radius: var(--radius); }
.strengths { margin-top: 24px; }
.strengths .h3 { margin-bottom: 12px; }

.process { margin-top: clamp(64px, 8vw, 110px); }
.process .h3 { margin-bottom: 28px; }
.process__steps {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 16px;
}
.process__steps li {
  position: relative;
  padding-top: 22px;
  border-top: 1px solid rgba(0, 0, 0, .2);
  font-size: 16px;
  font-weight: 500;
  color: var(--ink);
  line-height: 1.3;
}
.process__steps li::before {
  content: '';
  position: absolute;
  top: -4px;
  left: 0;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--gold);
}
.process__steps span {
  display: block;
  margin-bottom: 8px;
  font-family: var(--serif);
  font-style: italic;
  font-size: 15px;
  color: var(--gold);
}

.difference {
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--aside);
  gap: var(--col-gap);
  margin-top: clamp(64px, 8vw, 110px);
}
.difference__list .h3 { margin-bottom: 20px; }
.diff li {
  padding: 18px 0;
  border-bottom: 1px solid rgba(0, 0, 0, .12);
  color: var(--muted);
  font-size: 15px;
}
.diff li:first-child { border-top: 1px solid rgba(0, 0, 0, .12); }
.diff b {
  display: block;
  margin-bottom: 2px;
  color: var(--ink);
  font-size: 17px;
  font-weight: 600;
}

.quote-card {
  padding: 28px;
  border-radius: var(--radius);
  background: var(--panel);
}
.quote-card img {
  width: 34px;
  height: 34px;
  padding: 6px;
  margin-bottom: 16px;
  border-radius: 8px;
  background: #fff;
}
.quote-card p {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(19px, 1.7vw, 23px);
  line-height: 1.3;
  color: #4a4744;
}

.clients { margin-top: 36px; }
.clients .h3 { margin-bottom: 10px; }
.clients > p { font-size: 15px; color: var(--muted); margin-bottom: 16px; }
.clients__logos { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.clients__logos img { width: 54px; height: 54px; border-radius: 12px; }
.clients__more a {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  line-height: 1.15;
  color: var(--muted);
  max-width: 160px;
}
.clients__more span {
  display: grid;
  place-items: center;
  flex: 0 0 54px;
  height: 54px;
  border-radius: 12px;
  background: var(--beige);
  font-size: 26px;
  color: var(--muted);
  transition: background-color .25s;
}
.clients__more a:hover span { background: var(--gold); color: #fff; }

/* ============ Проекты ============ */
.m-br { display: none; }
.projects__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--aside);
  gap: var(--col-gap);
}
.panel {
  padding: 28px 20px;
  border-radius: var(--radius);
  background: var(--panel);
}
.projects__main .h2 { margin: 0 0 22px 4px; }
.projects__web { margin-top: 56px !important; }

.cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px 12px 18px;
  border-radius: 20px;
  background: var(--card);
  transition: background-color .3s;
}
.card:hover { background: rgba(225, 213, 186, .75); }
.card__img { overflow: hidden; border-radius: 14px; aspect-ratio: 1000 / 422; }
.card__img img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s cubic-bezier(.2, .7, .2, 1); }
.card:hover .card__img img { transform: scale(1.04); }
.card__title { margin-top: 8px; padding: 0 6px; font-size: 18px; font-weight: 600; color: var(--ink); }
.card__text { padding: 0 6px; font-size: 16px; color: #3a3a3a; }
.card .pills { padding: 0 6px; margin-top: 4px; }
.card .pills li { padding: 4px 10px; font-size: 11.5px; }

.projects__side {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 40px;
  text-align: right;
}
/* обёртка кончается ровно за gap (40px) до блока отзывов: липкий текст дальше не уходит */
.projects__intro-wrap { flex: 1; }
.projects__intro { position: sticky; top: 100px; }
.projects__intro p:not(.eyebrow) { font-size: 16px; color: var(--ink); margin-bottom: 18px; }
.projects__intro .eyebrow { margin-bottom: 30px; }

.reviews { text-align: center; }
.reviews img { margin: 0 auto 6px; width: 85%; }
.reviews .h3 { font-size: clamp(24px, 2.2vw, 30px); color: #5f5c58; margin-bottom: 18px; }

/* ============ Обо мне ============ */
.about__head { max-width: 640px; margin-bottom: 36px; }
.about__head .h2 { margin-bottom: 16px; }
.about__text { font-size: 16px; color: var(--ink); }

.about__grid {
  display: grid;
  grid-template-columns: 1fr 1.6fr 1.15fr;
  gap: 16px;
  align-items: start;
}
.tile__tag {
  display: inline-block;
  margin-bottom: 10px;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--pill-dark);
  color: #fff;
  font-size: 12px;
  font-weight: 500;
}
.tile__img {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  aspect-ratio: 3 / 4;
}
.tile--wide .tile__img { aspect-ratio: 4 / 3.05; }
.tile__img img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s cubic-bezier(.2, .7, .2, 1); }
.tile:hover .tile__img img { transform: scale(1.04); }
.tile figcaption { margin-top: 12px; font-size: 13px; line-height: 1.35; color: var(--muted); }

@media (min-width: 901px) {
  .about__grid { --tile-h: clamp(380px, 32vw, 470px); }
  .tile__img, .tile--wide .tile__img { aspect-ratio: auto; height: var(--tile-h); }
}

.slideshow { cursor: pointer; }
.slideshow img { position: absolute; inset: 0; opacity: 0; transition: opacity 1s ease, transform .6s cubic-bezier(.2, .7, .2, 1); }
.slideshow img.is-active { opacity: 1; }

/* ============ Подвал ============ */
.footer { margin-top: clamp(80px, 10vw, 140px); padding: 28px 0 36px; border-top: 1px solid rgba(0, 0, 0, .08); }
.footer__inner { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; font-size: 14px; color: var(--muted); }
.footer__links { display: flex; gap: 24px; }
.footer__links a:hover { color: var(--ink); }

/* ============ Галерея отзывов ============ */
.lightbox {
  width: min(92vw, 640px);
  max-height: 92vh;
  padding: 0;
  border: 0;
  border-radius: 20px;
  background: transparent;
  overflow: visible;
}
.lightbox::backdrop { background: rgba(20, 18, 15, .78); backdrop-filter: blur(6px); }
.lightbox__img { max-height: 84vh; width: auto; margin: 0 auto; border-radius: 16px; }
.lightbox__close, .lightbox__arrow {
  position: absolute;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, .92);
  color: var(--ink);
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
}
.lightbox__close { top: -12px; right: -12px; }
.lightbox__arrow { top: 50%; transform: translateY(-50%); }
.lightbox__arrow--prev { left: -60px; }
.lightbox__arrow--next { right: -60px; }
.lightbox__counter { margin-top: 10px; text-align: center; color: #fff; font-size: 14px; }

/* ============ Анимации: плавное появление ============ */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .9s cubic-bezier(.2, .7, .2, 1), transform .9s cubic-bezier(.2, .7, .2, 1);
  transition-delay: var(--d, 0s);
}
.js [data-reveal].is-visible { opacity: 1; transform: none; }

/* ============ Анимации: пишущая машинка ============ */
.tw-word { display: inline-block; white-space: nowrap; }
.tw-char { opacity: 0; }
.tw-char.is-typed { opacity: 1; }
.tw-caret {
  display: inline-block;
  width: 0;
  height: .9em;
  margin-right: -2px;
  border-left: 2px solid currentColor;
  vertical-align: -0.08em;
  animation: tw-blink .8s steps(1) infinite;
}
@keyframes tw-blink { 50% { opacity: 0; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js [data-reveal] { opacity: 1; transform: none; transition: none; }
  .tw-char { opacity: 1; }
  .tw-caret { display: none; }
}

/* ============ Адаптив ============ */
@media (max-width: 1100px) {
  .process__steps { grid-template-columns: repeat(3, 1fr); row-gap: 32px; }
}

@media (max-width: 900px) {
  .topbar { padding: 12px 20px; }
  .topbar__toggle {
    display: inline-flex;
    align-items: center;
    height: 38px;
    padding: 0 20px;
    border: 1.5px solid var(--ink);
    border-radius: 999px;
    background: transparent;
    font: 600 15px var(--sans);
    color: var(--ink);
    cursor: pointer;
  }
  .topbar__nav {
    position: absolute;
    top: 100%;
    left: 12px;
    right: 12px;
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    padding: 16px;
    border-radius: 20px;
    background: rgba(247, 243, 238, .97);
    box-shadow: 0 20px 40px rgba(0, 0, 0, .08);
    display: none;
  }
  .topbar__nav.is-open { display: flex; }
  .topbar__nav > a:not(.btn) { padding: 8px 4px; }
  .topbar__nav .btn--outline { margin: 8px 0 0; }

  /* Главный экран — как на макете «мобилка» */
  .hero { padding: 12px 12px 0; }
  .hero__card {
    /* высота зависит от ширины экрана: линия гор всегда ниже заголовка */
    min-height: calc(122.7vw + 300px);
    padding: 20px 16px 16px;
    /* Горы опущены: картинка по ширине прижата к низу, над ней — продолжение неба
       (градиент скрывает верхний край картинки), заголовок стоит на светлом фоне */
    background:
      linear-gradient(#eaeaea calc(100% - 181.5vw + 114px), rgba(234, 234, 234, 0) calc(100% - 181.5vw + 160px)),
      url('assets/img/hero-bg-mobile.jpg') center bottom -30px / 100% auto no-repeat,
      #eaeaea;
    grid-template-columns: 1fr;
    grid-template-rows: auto auto 1fr auto auto;
    grid-template-areas: "skills" "intro" "stats" "quote" "nav";
    row-gap: 22px;
  }
  .hero__skills { padding: 4px 0 10px; font-size: 13px; }
  .marquee li::after { margin: 0 22px; }

  /* «Алёна» и «marketing» — правым краем к левому краю фото,
     «brand designer» — правым краем к правому краю фото */
  .hero__intro {
    --photo-right: 14vw;
    --photo-w: clamp(96px, 28vw, 150px);
    position: relative;
    display: block;
    margin-top: 40px;
    padding-top: 34px;
  }
  .hero__portrait { position: absolute; top: -10px; right: calc(var(--photo-right) - 10px); width: var(--photo-w); } /* фото на 10px вправо и вверх */
  .hero__title {
    position: relative;
    display: flex;
    flex-direction: column;
    font-size: clamp(30px, 8.6vw, 40px);
    line-height: 1.05;
  }
  .hero__first { order: 1; align-self: flex-end; margin-right: calc(var(--photo-right) + var(--photo-w) + 8px); }
  .hero__role { order: 2; white-space: normal; text-align: right; padding-right: var(--photo-right); }
  .hero__role .tw-word:first-child { margin-right: calc(var(--photo-w) + 8px); }
  .hero__last { order: 3; align-self: flex-end; margin-right: 2%; }
  .hero__role .tw-break { display: block; height: 0; }

  /* Плашки как на макете «мобилка»: инвестиции слева, ниже справа — годы и проекты */
  .hero__stats {
    align-self: end;
    grid-template-columns: auto 1fr auto auto;
    grid-template-rows: auto auto;
    gap: 8px;
    margin-top: 0;
  }
  .stat b { font-size: 22px; white-space: nowrap; }
  .stat span { white-space: nowrap; }
  .m-br { display: inline; }
  .stat--light { grid-column: 1; grid-row: 1; }
  .stat--years { grid-column: 3; grid-row: 2; width: auto; }
  .stat--projects { grid-column: 4; grid-row: 2; width: auto; }
  .hero__birds { display: none; }
  .hero__stats { position: relative; top: -40px; } /* плашки выше на 40px (значок цитаты не двигается) */
  .hero__quote { gap: 8px; } /* как между плашками */
  /* значок цитаты стоит прямо над словом «бренд» в описании */
  .hero__quote img { display: none; }
  .hero__quote-anchor { position: relative; }
  .hero__quote-anchor::before {
    content: ""; position: absolute; bottom: calc(100% + 6px); left: 50%; margin-left: -23px;
    width: 46px; height: 46px; border-radius: 8px;
    background: #fff url('assets/img/quote.png') center / 28px 28px no-repeat;
  }

  .hero__quote {
    align-items: center;
    margin-top: 0;
    text-align: center;
    color: #fff;
    font-size: 16px;
  }
  .hero__quote p { max-width: 340px; }

  /* Меню-пилюля: смайлик «меню» + «связаться»; по нажатию — крестик и разделы */
  .hero__nav { padding: 8px 8px 8px 14px; background: rgba(120, 120, 120, .55); }
  .hero__menu {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 0;
    border: 0;
    background: none;
    color: #ededed;
    font: 400 16px var(--sans);
    cursor: pointer;
  }
  .hero__menu-icon { flex: 0 0 auto; }
  .hero__menu-icon--close { display: none; }
  .hero__links { display: none; }
  .hero__buttons .btn--glass { display: none; }
  .hero__buttons .btn--white { height: 46px; padding: 0 clamp(36px, 15vw, 64px); }

  .hero__nav.is-open { justify-content: flex-start; }
  .hero__nav.is-open .hero__menu-icon--open,
  .hero__nav.is-open .hero__menu-label,
  .hero__nav.is-open .hero__buttons { display: none; }
  .hero__nav.is-open .hero__menu-icon--close { display: block; }
  .hero__nav.is-open .hero__links { display: flex; gap: 20px; height: 46px; align-items: center; font-size: 15px; }

  .experience__top, .difference { grid-template-columns: 1fr; }
  .projects__grid { grid-template-columns: 1fr; }
  /* на мобильной версии блок «проекты» (с отзывами) идёт перед кейсами, Nomad — первый */
  .projects__side { text-align: left; order: -1; }
  .projects__main { display: flex; flex-direction: column; }
  .projects__intro { position: static; }
  .reviews { max-width: 420px; margin: 0 auto; }
}

@media (max-width: 640px) {
  .container { padding: 0 16px; }
  .cards { grid-template-columns: 1fr; }
  .process__steps { grid-template-columns: repeat(2, 1fr); }
  .about__grid { grid-template-columns: repeat(2, 1fr); }
  .tile--wide { grid-column: span 2; order: 1; }
  .lightbox__arrow--prev { left: 8px; }
  .lightbox__arrow--next { right: 8px; }
  .lightbox__close { top: 8px; right: 8px; }
}

/* Плашки: принудительный перенос строки на мобильной версии */
.pills .pills__br { display: none; }
@media (max-width: 640px) {
  .pills .pills__br { display: block; flex-basis: 100%; height: 0; padding: 0; margin: -6px 0 0; background: none; }
}

/* Описания: без одного слова на последней строке */
.card__text, .projects__intro p, .clients p, .about__text, .diff li { text-wrap: pretty; }
