:root {
  --white: #fff;
  --hill: #3c4a22;
  --radius: 20px;
  --font: "Datatype", ui-monospace, monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  height: 100%;
  overflow: hidden;            /* один екран — сторінка не скролиться */
  background: #6aa9ef;
  font-family: var(--font);
  color: var(--white);
}

.sky {
  position: fixed;
  inset: 0;
  background: url("assets/sky.webp") center / cover no-repeat;
}

/* ---------- сцена ---------- */
.stage {
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 1728px;
  height: 1117px;
  transform-origin: 50% 100%;
  transform: translateX(-50%) scale(var(--s, 1));
}

.layer {
  position: absolute;
  /* на ширших за макет екранах колаж зсувається ліворуч на половину запасу —
     решту місця займає будинок між колажем і роботами */
  translate: calc(var(--pad, 0px) * -.5) 0;
  pointer-events: none;
  will-change: transform;
  transition: transform .6s cubic-bezier(.2, .7, .3, 1);
}
/* рожева квітка: на екранах як макет — над нижнім дахом біля тебе,
   на широких (є запас --pad) — їде вгору-праворуч на дах високої вежі,
   яку там уже не закриває блок робіт */
.l-pink-top {
  left: calc(530px + min(var(--pad, 0px), 250px) * .92);
  top: calc(296px - min(var(--pad, 0px), 250px) * .84);
}

/* ти й квіти «на тобі» — по центру лівої частини (між краєм екрана й роботами).
   Блок робіт на широких екранах не ширший за 1150px, тож центр цієї частини —
   x≈275 на сцені, а твій центр без зсуву — 321: звідси -46px на широких екранах */
.l-ira, .l-red-top, .l-orange-small, .l-orange-stem {
  translate: calc(min(var(--pad, 0px), 250px) * -.186) -30px;
}

/* рожева квітка збоку — прив'язана до лівого краю екрана */
.l-pink-left { translate: calc(var(--pad, 0px) * -1) 0; margin-left: -6px; }   /* кінчик стебла — за краєм екрана */

.layer img { display: block; width: 100%; height: 100%; object-fit: cover; }

/* ---------- анімації ---------- */
.sway { animation: sway 6s ease-in-out infinite; }
.sway--a { animation-duration: 5.2s; }
.sway--b { animation-duration: 6.8s; animation-delay: -2s; --amp: 5deg; }
.sway--c { animation-duration: 4.6s; animation-delay: -1s; --amp: 6deg; }

@keyframes sway {
  0%, 100% { transform: rotate(calc(var(--amp, 4deg) * -1)); }
  50%      { transform: rotate(var(--amp, 4deg)); }
}

/* будинки погойдуються від низу — край завжди лишається під травою */
.building { transform-origin: 50% 100%; animation: building 6s ease-in-out infinite; }
.building--left { animation-duration: 7.5s; animation-delay: -3s; --tilt: -2.2deg; }
@keyframes building {
  0%, 100% { transform: translateY(6px) rotate(calc(var(--tilt, 2deg) * -1)); }
  50%      { transform: translateY(22px) rotate(var(--tilt, 2deg)); }
}

/* ---------- галерея ---------- */
.gallery {
  position: absolute;
  /* притиснута до правого краю; на широких екранах росте максимум до 1150px, не більше */
  right: calc(var(--pad, 0px) * -1 + 28px);
  width: min(calc(980px + 2 * var(--pad, 0px)), 1150px);
  top: 118px;            /* над роботами — вкладки */
  height: 882px;
  padding: 14px 0 260px;
  overflow-y: auto;
  scrollbar-width: none;
  overscroll-behavior: contain;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 14px);
          mask-image: linear-gradient(to bottom, transparent 0, #000 14px);
}

.pane.is-entering { animation: pane-in .45s cubic-bezier(.2, .7, .3, 1); }
.pane[hidden] { display: none; }
@keyframes pane-in {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}
.pane__empty {
  padding: 120px 0;
  text-align: center;
  font-size: 28px;
  font-weight: 900;
  color: #fff;
  text-shadow: 0 2px 12px rgba(20, 40, 80, .25);
}

/* ---------- вкладки: шматки скотчу ---------- */
.tabs {
  position: absolute;
  right: calc(var(--pad, 0px) * -1 + 28px);
  width: min(calc(980px + 2 * var(--pad, 0px)), 1150px);
  top: 22px;
  display: flex;
  align-items: flex-start;
  gap: 4px;
  padding-left: 10px;
}
.tab {
  position: relative;
  isolation: isolate;
  border: 0;
  background: none;
  padding: 16px 26px 18px 22px;
  font: 900 20px/20px var(--font);
  color: #181a15;
  text-align: left;
  white-space: nowrap;
  cursor: pointer;
  transform: rotate(var(--rot, 0deg));
  transition: transform .25s cubic-bezier(.2, .7, .3, 1);
}
/* неактивна — сірий напівпрозорий скотч (дзеркально, як у макеті), текст на 50% */
.tab::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: url("assets/tape-grey.webp") center / 100% 100% no-repeat;
  transform: scaleY(-1);
}
.tab span { display: block; opacity: .5; transition: opacity .2s; }
.tab span + span { padding-left: var(--indent, 2.2em); }   /* друге слово зсунуте вправо */
.tab:hover { transform: rotate(var(--rot, 0deg)) translateY(-3px); }
.tab:hover span { opacity: .8; }
/* активна — жовтий скотч */
.tab.is-active::before { background-image: url("assets/tape-yellow.webp"); transform: none; }
.tab.is-active span { opacity: 1; }
.tab:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.gallery::-webkit-scrollbar { display: none; }

.row {
  display: grid;
  grid-template-columns: 558.25fr 341.1fr;
  gap: 31px;
  margin-bottom: 26px;
}
.row--flip { grid-template-columns: 341.1fr 558.25fr; }

.work {
  position: relative;
  height: 404.39px;
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  background: rgba(255, 255, 255, .55);
  transition: transform .4s cubic-bezier(.2, .7, .3, 1);
}
.work:hover { transform: scale(1.015) rotate(-.4deg); }
.work img, .work video { width: 100%; height: 100%; object-fit: cover; display: block; }

/* два відео 16:9 одне під одним + сторіс 9:16 збоку.
   Колонки 128:81 — тоді висота сторіс ≈ висоті двох відео */
.block-story {
  display: grid;
  grid-template-columns: 128fr 81fr;
  gap: 31px;
  margin-bottom: 26px;
}
.block-story--flip { grid-template-columns: 81fr 128fr; }
.block-story--flip .work--story { order: -1; }
.block-story__stack { display: flex; flex-direction: column; gap: 26px; }
.block-story .work { height: auto; aspect-ratio: 16 / 9; }
.block-story .work--story { aspect-ratio: auto; }

/* ряд з різних форматів однакової висоти */
.row-mixed {
  display: grid;
  gap: 31px;
  align-items: start;
  margin-bottom: 26px;
}
.row-mixed .work { height: auto; }

/* ряд сторіс */
.row-stories {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  justify-content: center;
  gap: 31px;
  margin-bottom: 26px;
}
.row-stories .work { height: auto; aspect-ratio: 9 / 16; }

/* сітка постів для інсти: по 5 в ряд, формат 4:5 */
.grid-posts {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
  margin-bottom: 26px;
}
.grid-posts .work { height: auto; aspect-ratio: 4 / 5; border-radius: 14px; }
.grid-posts .work--empty { font-size: 16px; }

/* сторіс 9:16 зліва на висоту трьох рядів постів 4:5:
   3 × 5/4 × 9/16 ≈ 2.11 + запас на проміжки між рядами = 2.2 */
.grid-posts--story { grid-template-columns: 2.2fr repeat(3, 1fr); }
.grid-posts--story .work--story { grid-row: span 3; aspect-ratio: auto; border-radius: var(--radius); }

/* YouTube показуємо цілим 16:9 — ряд з ним підлаштовує висоту під відео */
.row--yt .work { height: auto; }
.work--yt { background: #000; aspect-ratio: 16 / 9; }
.work--yt iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  pointer-events: none;   /* наведення й клік ловить сама картка */
}

/* ---------- стос вирізок ---------- */
.pile {
  position: relative;
  margin: 0 0 26px;
  transition: height .7s cubic-bezier(.2, .8, .2, 1);
}
.pile__head {
  position: absolute;
  right: 0;
  top: 0;
  z-index: 999;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
  pointer-events: none;
}
.pile__head > * { pointer-events: auto; }
.pile__title {
  font: 900 22px/1 var(--font);
  color: #fff;
  text-shadow: 0 2px 12px rgba(20, 40, 80, .3);
}
.pile + .pile { margin-top: 40px; }
.pile__btn {
  padding: 8px 16px 9px;
  border: 0;
  border-radius: 999px;
  background: #fff;
  color: #1d2610;
  font: 900 16px/1 var(--font);
  letter-spacing: .02em;
  cursor: pointer;
  box-shadow: 0 6px 14px rgba(20, 40, 80, .18);
  transition: transform .25s;
}
.pile__btn:hover { transform: rotate(-3deg) scale(1.05); }

.scrap {
  position: absolute;
  width: 200px;
  padding: 8px 8px 10px;
  background: #fbfaf5;
  border-radius: 3px;
  box-shadow: 0 10px 22px rgba(20, 30, 50, .28);
  transform: rotate(var(--r, 0deg));
  cursor: grab;
  touch-action: none;
  user-select: none;
  transition: left .7s cubic-bezier(.2, .8, .2, 1), top .7s cubic-bezier(.2, .8, .2, 1),
              transform .3s, box-shadow .3s;
}
.scrap img { display: block; width: 100%; height: auto; pointer-events: none; }
/* шматочок скотчу */
.scrap--tape::before {
  content: "";
  position: absolute;
  top: -11px;
  left: 50%;
  width: 74px;
  height: 24px;
  transform: translateX(-50%) rotate(var(--tape, -4deg));
  background: rgba(236, 226, 196, .8);
  box-shadow: 0 1px 2px rgba(0, 0, 0, .08);
}
.scrap:hover {
  transform: rotate(var(--r, 0deg)) translateY(-8px) scale(1.04);
  box-shadow: 0 18px 32px rgba(20, 30, 50, .32);
}
.scrap.is-drag {
  transition: transform .2s, box-shadow .2s;   /* left/top без затримки — вирізка йде за мишкою */
  transform: rotate(calc(var(--r, 0deg) * .4)) scale(1.07);
  box-shadow: 0 26px 40px rgba(20, 30, 50, .35);
  cursor: grabbing;
}

/* скріни телефонів рядами, трохи в різні боки */
.tilted {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 40px 34px;
  padding: 30px 10px 40px;
}
.tilted__item {
  width: 168px;
  transform: translateY(var(--y)) rotate(var(--r));
  transition: transform .4s cubic-bezier(.2, .7, .3, 1);
}
.tilted__item img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 15% / 7.4%;
}
.tilted__item.is-link { cursor: pointer; }
.tilted__item:hover { transform: translateY(calc(var(--y) - 10px)) rotate(0deg) scale(1.06); }
/* на телефоні — по 4 в ряд */
.is-narrow .tilted { gap: 22px 3vw; padding: 16px 0 24px; }
.is-narrow .tilted__item { width: calc((100% - 9vw) / 4); }

/* скріни телефонів у купці: без паперу, кути як у телефона */
.scrap--phone { width: 170px; padding: 0; background: none; box-shadow: none; }
.scrap--phone img { border-radius: 15% / 7.4%; filter: drop-shadow(0 12px 18px rgba(20, 30, 50, .3)); }
.scrap--phone:hover, .scrap--phone.is-drag { box-shadow: none; }

/* ---------- прозорі png на небі ---------- */
.floating {
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: 10px 0 30px;
  margin-bottom: 26px;
}
.floater { height: 380px; cursor: pointer; animation: bob 6s ease-in-out infinite; }
.floater img {
  height: 100%;
  width: auto;
  display: block;
  filter: drop-shadow(0 14px 22px rgba(20, 40, 80, .28));
  transition: transform .4s cubic-bezier(.2, .7, .3, 1);
}
.floater:hover img { transform: scale(1.05) rotate(-2deg); }
@keyframes bob {
  0%, 100% { transform: translateY(0) rotate(-1.5deg); }
  50%      { transform: translateY(-14px) rotate(1.5deg); }
}

/* ---------- мокапи: ноутбук і айфон ---------- */
.devices {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: flex-end;
  gap: 48px;
  padding: 20px 0 10px;
  margin-bottom: 30px;
}
.devices--laptop { padding: 40px 0 20px; overflow-x: clip; }
.chips {
  flex-basis: 100%;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: flex-start;
  gap: 4px 2px;
  margin-top: 26px;
}
.device--laptop { rotate: -4deg; }   /* трохи повернутий */

/* плашки навколо ноутбука: вилітають з боків, потім погойдуються */
.chip {
  position: relative;
  left: 0;
  top: 0;
  transition: left .35s ease-out, top .35s ease-out;   /* відштовхування від курсора */
  padding: 10px 18px 11px;
  border-radius: 999px;
  background: #fff;
  color: #1d2610;
  font: 900 18px/1 var(--font);
  white-space: nowrap;
  box-shadow: 0 8px 18px rgba(20, 40, 80, .2);
  pointer-events: none;
  animation: chip-in .9s cubic-bezier(.2, .9, .3, 1.2) var(--d) both,
             chip-bob 5s ease-in-out calc(var(--d) + .9s) infinite;
}
@keyframes chip-in {
  from { translate: var(--from) 0; opacity: 0; }
  to   { translate: 0 0; opacity: 1; }
}
@keyframes chip-bob {
  0%, 100% { transform: translateY(0) rotate(var(--r)); }
  50%      { transform: translateY(-8px) rotate(calc(var(--r) * -.6)); }
}
.chip { transform: rotate(var(--r)); }
.device { cursor: pointer; transition: transform .4s cubic-bezier(.2, .7, .3, 1); }
.device:hover { transform: translateY(-6px); }
.device__screen {
  position: relative;
  overflow: hidden;
  background: radial-gradient(circle at 50% 40%, #2b3140, #0c0d10);
}
.device__screen video { display: block; width: 100%; height: 100%; object-fit: cover; }
.device__soon {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font: 900 22px/1 var(--font);
  color: rgba(255, 255, 255, .55);
}

/* повзунок для прокрутки відео на ноутбуці */
.device--laptop { cursor: default; }
.device--laptop:hover { transform: none; }
.scrub {
  position: absolute;
  left: 50%;
  bottom: 6%;
  width: min(62%, 460px);
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 11px 18px;
  border-radius: 999px;
  background: #fff;
  color: #1d2610;
  font: 900 15px/1 var(--font);
  box-shadow: 0 8px 20px rgba(20, 40, 80, .25);
  cursor: ew-resize;
  touch-action: none;
  opacity: 0;
  transform: translate(-50%, 12px);
  transition: opacity .3s, transform .3s;
}
.device--laptop:hover .scrub, .scrub.is-drag { opacity: 1; transform: translate(-50%, 0); }
@media (hover: none) { .scrub { opacity: 1; transform: translate(-50%, 0); } }   /* на телефоні видно завжди */
.scrub__label { white-space: nowrap; }
.scrub__track { position: relative; flex: 1; height: 6px; border-radius: 3px; background: #dcdcd6; }
.scrub__fill { position: relative; height: 100%; width: 0; border-radius: 3px; background: #1d2610; }
.scrub__fill::after {
  /* бігунок */
  content: "";
  position: absolute;
  right: -8px;
  top: 50%;
  width: 16px;
  height: 16px;
  margin-top: -8px;
  border-radius: 50%;
  background: #f2d330;
  box-shadow: 0 0 0 2px #1d2610;
}
.is-narrow .scrub { padding: 7px 12px; gap: 8px; font-size: 11px; bottom: 5%; width: 76%; }

/* ноутбук */
.device--laptop { width: min(86%, 820px); }
.device--laptop .device__body {
  position: relative;
  padding: 2.6% 2.6% 3.4%;
  background: #1b1c1f;
  border-radius: 22px 22px 6px 6px;
  box-shadow: inset 0 0 0 2px #3a3c41, 0 24px 40px rgba(20, 40, 80, .25);
}
.device--laptop .device__body::before {
  /* камера */
  content: "";
  position: absolute;
  top: 1.1%;
  left: 50%;
  width: 7px;
  height: 7px;
  margin-left: -3.5px;
  border-radius: 50%;
  background: #34373d;
}
.device--laptop .device__screen { aspect-ratio: 16 / 10; border-radius: 4px; }
.device__base {
  position: relative;
  width: 114%;
  margin-left: -7%;
  height: 20px;
  background: linear-gradient(#eceef0, #b9bcc0 70%, #8f9296);
  border-radius: 2px 2px 16px 16px / 2px 2px 12px 12px;
  box-shadow: 0 18px 26px rgba(20, 40, 80, .25);
}
.device__base::before {
  /* виїмка, щоб відкривати кришку */
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  width: 16%;
  height: 7px;
  transform: translateX(-50%);
  background: #c6c9cd;
  border-radius: 0 0 10px 10px;
}

/* айфон */
.device--phone { width: 290px; rotate: -14deg; margin: 40px 0 50px; }  /* трохи по діагоналі */
.device--phone .device__body {
  position: relative;
  padding: 11px;
  background: #121316;
  border-radius: 52px;
  box-shadow: inset 0 0 0 2px #3a3c41, 0 24px 40px rgba(20, 40, 80, .28);
}
.device--phone .device__body::after {
  /* dynamic island */
  content: "";
  position: absolute;
  z-index: 2;
  top: 24px;
  left: 50%;
  width: 31%;
  height: 26px;
  transform: translateX(-50%);
  background: #000;
  border-radius: 20px;
}
.device--phone .device__screen { aspect-ratio: 9 / 19.5; border-radius: 41px; }

/* ---------- 3D-коло зі скрінів телефонів ---------- */
.carousel {
  --pw: 225px;                       /* ширина одного телефона */
  position: relative;
  display: grid;
  place-items: center;
  height: calc(var(--pw) * 2.05 + 90px);
  perspective: 1700px;
  perspective-origin: 50% 35%;
  touch-action: pan-y;
  cursor: grab;
  user-select: none;
  overflow-x: clip;
  margin-bottom: 30px;
}
.carousel.is-drag { cursor: grabbing; }
.carousel__ring {
  position: relative;
  width: var(--pw);
  height: calc(var(--pw) * 2.05);
  transform-style: preserve-3d;
}
.carousel__card { position: absolute; inset: 0; backface-visibility: hidden; }
.carousel__card img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 15% / 7.4%;          /* кути як у телефона — ховають темні кутики jpg */
  filter: drop-shadow(0 18px 22px rgba(20, 40, 80, .3));
  pointer-events: none;
  animation: phone-bob 5s ease-in-out infinite;
}
@keyframes phone-bob {
  0%, 100% { translate: 0 0; }
  50%      { translate: 0 -12px; }
}
.is-narrow .carousel { --pw: 118px; perspective: 1000px; height: calc(var(--pw) * 2.05 + 90px); }

/* картинка з прозорим фоном — без рамки, ціла, прямо на небі */
.grid-posts .work.work--clear,
.work.work--clear { background: none; border-radius: 0; overflow: visible; }
.work--clear img { object-fit: contain; filter: drop-shadow(0 10px 18px rgba(20, 40, 80, .25)); }

/* заглушка, поки немає робіт */
.work--empty {
  background:
    repeating-conic-gradient(#e9e9e9 0 25%, #fafafa 0 50%) 0 0 / 40px 40px;
  display: grid;
  place-items: center;
  color: #b9b9b9;
  font-size: 22px;
  font-weight: 900;
}

/* ---------- пагорби та текст ---------- */
.hills {
  position: absolute;
  left: calc(var(--pad, 0px) * -1);
  right: calc(var(--pad, 0px) * -1);
  top: 750px;
  bottom: 0;
  pointer-events: none;
}
.hills img { width: 100%; height: 100%; object-fit: cover; object-position: center top; display: block; }

/* текст розкладений по всій ширині вікна */
.info {
  position: absolute;
  left: calc(var(--pad, 0px) * -1);
  right: calc(var(--pad, 0px) * -1);
  bottom: 0;
  padding: 0 48px 44px;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  pointer-events: none;
}
.info a { pointer-events: auto; color: inherit; text-decoration: none; border-bottom: 1px solid rgba(255,255,255,.5); }
.info a:hover { border-color: #fff; }

.socials { display: flex; gap: 15px; margin-bottom: 15px; }
.info .socials a { border: 0; display: block; width: 26px; height: 26px; transition: transform .25s, opacity .25s; }
.socials a:hover { transform: translateY(-3px) rotate(-6deg); opacity: .8; }
.socials svg { width: 100%; height: 100%; display: block; }

.info h1 { font-size: 31px; font-weight: 900; line-height: normal; }
.info .tag { margin-top: 2px; font-size: 18px; font-weight: 900; white-space: nowrap; }

.info__col { white-space: nowrap; }
.info__col--about { width: 350px; white-space: normal; }
.info h2 { font-size: 18px; font-weight: 900; line-height: normal; margin-bottom: 7px; }
.info__col p { font-size: 17px; font-weight: 300; line-height: 22px; }

/* ---------- підпис біля курсора ---------- */
.caption {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 5;
  padding: 7px 12px 8px;
  border-radius: 10px;
  background: #fff;
  color: #1d2610;
  font-size: 16px;
  font-weight: 500;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity .2s;
}
.caption.is-on { opacity: 1; }

/* ---------- лайтбокс ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: grid;
  place-items: center;
  background: rgba(20, 28, 12, .85);
  backdrop-filter: blur(6px);
}
.lightbox[hidden] { display: none; }
.lightbox__body img, .lightbox__body video {
  max-width: 90vw;
  max-height: 88vh;
  border-radius: var(--radius);
  display: block;
}
.lightbox__yt {
  width: min(90vw, calc(80vh * 16 / 9));
  aspect-ratio: 16 / 9;
  border: 0;
  border-radius: var(--radius);
  display: block;
}
.lightbox__caption { margin-top: 14px; text-align: center; font-size: 18px; font-weight: 300; }
.lightbox__close {
  position: absolute;
  top: 16px;
  right: 24px;
  background: none;
  border: 0;
  color: #fff;
  font: 300 48px/1 var(--font);
  cursor: pointer;
}

/* =====================================================================
   Вертикальна версія: телефони, планшети, вузькі вікна (клас від script.js)
   1) перший екран — колаж, знизу трава з імʼям
   2) далі — роботи на зеленому, «в траві»
   3) внизу — About / Services / Clients / Press
   Колаж має свою систему координат 800×1100 (--u), щоб пропорції не залежали від екрана.
   ===================================================================== */
html.is-portrait,
html.is-portrait body { height: auto; overflow-x: hidden; overflow-y: auto; }

.is-portrait .stage {
  --u: min(calc(100vw / 800), calc(100svh / 1100));
  --hx: calc((100vw - var(--u) * 800) / 2);   /* колаж по центру, якщо екран ширший */
  --hero: calc(var(--u) * 1100);
  position: relative;
  left: 0;
  bottom: auto;
  width: 100%;
  height: auto;
  transform: none;
  padding-top: var(--hero);
  background: linear-gradient(to bottom, transparent var(--hero), var(--hill) var(--hero));
}
.is-portrait .layer { translate: none; transition: none; }
.is-portrait .l-pink-left { margin-left: 0; }

/* розкладка колажу в одиницях --u: left, top, width, height */
.is-portrait .l-red-top      { left: calc(var(--hx) + var(--u) *  30) !important; top: calc(var(--u) * -40) !important; width: calc(var(--u) * 230) !important; height: calc(var(--u) * 263) !important; }
.is-portrait .l-pink-top     { left: calc(var(--hx) + var(--u) * 620) !important; top: calc(var(--u) * 210) !important; width: calc(var(--u) * 228) !important; height: calc(var(--u) * 221) !important; }
.is-portrait .l-bld-right    { left: calc(var(--hx) + var(--u) * 440) !important; top: calc(var(--u) * 300) !important; width: calc(var(--u) * 455) !important; height: calc(var(--u) * 590) !important; }
.is-portrait .l-bld-left     { left: calc(var(--hx) + var(--u) * -90) !important; top: calc(var(--u) * 420) !important; width: calc(var(--u) * 380) !important; height: calc(var(--u) * 535) !important; }
.is-portrait .l-orange-small { left: calc(var(--hx) + var(--u) * 600) !important; top: calc(var(--u) * 470) !important; width: calc(var(--u) * 157) !important; height: calc(var(--u) * 172) !important; }
.is-portrait .l-ira          { left: calc(var(--hx) + var(--u) * 110) !important; top: calc(var(--u) * 190) !important; width: calc(var(--u) * 560) !important; height: calc(var(--u) * 805) !important; }
.is-portrait .l-orange-stem  { left: calc(var(--hx) + var(--u) * 370) !important; top: calc(var(--u) * 740) !important; width: calc(var(--u) * 194) !important; height: calc(var(--u) * 304) !important; }
.is-portrait .l-pink-left    { left: calc(var(--u) * -20) !important;   /* впритул до лівого краю екрана, без --hx */ top: calc(var(--u) * 640) !important; width: calc(var(--u) * 162) !important; height: calc(var(--u) * 149) !important; }

/* трава внизу першого екрана */
.is-portrait .hills {
  left: 0;
  right: 0;
  top: calc(var(--hero) - var(--u) * 330);
  bottom: auto;
  height: calc(var(--u) * 331);
}

/* імʼя й соцмережі — на траві першого екрана */
/* низ блоку — за 20px над краєм трави, тож увесь блок завжди на траві */
.is-portrait .info__name {
  position: absolute;
  left: max(20px, calc(var(--hx) + var(--u) * 40));
  top: calc(var(--hero) - 20px);
  transform: translateY(-100%);
}
/* на телефоні трава вища — щоб і іконки, і імʼя стояли на ній */
.is-narrow .hills {
  top: calc(var(--hero) - var(--u) * 450);
  height: calc(var(--u) * 451);
}
/* і ти разом із квітками біля тебе — вище, щоб трава не закривала */
.is-narrow .l-ira,
.is-narrow .l-orange-small { translate: 0 calc(var(--u) * -150); }
.is-narrow .l-orange-stem  { translate: 0 calc(var(--u) * -250); }   /* квітка в руках — над травою */
.is-narrow .info h1 { font-size: 26px; }
.is-narrow .info .tag { font-size: 15px; }
.is-narrow .socials { gap: 12px; margin-bottom: 10px; }
.is-narrow .info .socials a { width: 22px; height: 22px; }

/* вкладки — над роботами, стрічкою, що гортається вбік */
.is-portrait .tabs {
  position: static;
  width: auto;
  display: flex;
  gap: 2px;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 26px 12px 4px;
}
.is-portrait .tabs::-webkit-scrollbar { display: none; }
.is-portrait .tab { flex: 0 0 auto; }
.is-narrow .tab { font-size: 15px; line-height: 16px; padding: 12px 18px 14px 16px; }
/* на телефоні всі 4 вкладки видно одразу — по дві в ряд, без гортання вбік */
.is-narrow .tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 4px; overflow: visible; }
/* текст — блоком по центру скотчу, рядки між собою як на десктопі */
.is-narrow .tab { display: grid; justify-content: center; align-content: center; text-align: left; padding-inline: 14px; }

/* роботи — звичайним потоком під першим екраном */
.is-portrait .gallery {
  position: relative;
  left: auto;
  right: auto;
  width: auto;
  top: auto;
  height: auto;
  overflow: visible;
  padding: 28px 16px 12px;
  -webkit-mask-image: none;
          mask-image: none;
}
.is-portrait .row-mixed,
.is-portrait .row-stories,
.is-portrait .pile { margin-bottom: 16px; }
.is-portrait .row-mixed { gap: 16px; }
.is-narrow .row-mixed { grid-template-columns: 1fr !important; }

/* сторіс — стрічкою, що гортається пальцем убік */
.is-portrait .row-stories {
  display: flex !important;
  gap: 12px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: 16px;
  margin: 0 -16px 16px;
  padding: 0 16px 4px;
  scrollbar-width: none;
}
.is-portrait .row-stories::-webkit-scrollbar { display: none; }
.is-portrait .row-stories .work { flex: 0 0 min(42vw, 260px); scroll-snap-align: start; }
.is-portrait .work:hover { transform: none; }

.is-narrow .scrap { width: 42vw; padding: 6px 6px 8px; }
.is-narrow .scrap--phone { width: 34vw; padding: 0; }

/* About / Services / Clients / Press — внизу, колонкою */
.is-portrait .info {
  position: static;   /* щоб імʼя (absolute) рахувалось від сцени, а не від цього блоку */
  left: auto;
  right: auto;
  bottom: auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 28px 32px;
  padding: 28px 20px 48px;
  background: var(--hill);
}
.is-portrait .info__col,
.is-portrait .info__col--about { width: auto; white-space: normal; }
.is-portrait .info__col p { font-size: 16px; }

@media (prefers-reduced-motion: reduce) {
  .sway, .building, .floater, .chip, .carousel__card img { animation: none; }
  .layer { transition: none; }
}

/* мокапи на телефоні */
.is-narrow .device--laptop { width: 82%; }   /* з основою й нахилом не вилазить за краї */
.is-narrow .devices--laptop { padding: 24px 0 10px; }
.is-narrow .chips { gap: 2px 0; margin-top: 10px; }
.is-narrow .chip { font-size: 13px; padding: 7px 12px 8px; }
.is-narrow .device--laptop .device__body { border-radius: 12px 12px 4px 4px; }
.is-narrow .device__base { height: 12px; }
.is-narrow .device--phone { width: 62vw; }
.is-narrow .device--phone .device__body { border-radius: 38px; padding: 8px; }
.is-narrow .device--phone .device__screen { border-radius: 31px; }
.is-narrow .device--phone .device__body::after { top: 17px; height: 20px; }
