/* Одностраничное портфолио: два цвета — кремовый и чёрный, блоки во всю ширину, чередуются */
:root {
  --cream: #fbf9f4;
  --black: #1d1d1d;
  --muted: #6f6c68;
  --muted-on-black: #bdbab5;
  --line: #e3dfd7;
  --side: clamp(20px, 5vw, 64px);     /* боковой отступ */
  --pad: clamp(56px, 8vw, 110px);     /* вертикальный отступ блока */
  --max: 1180px;                      /* ширина содержимого */
  --radius: 16px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 56px; -webkit-text-size-adjust: 100%; }
body { font-family: "Montserrat", system-ui, sans-serif; color: var(--black); background: var(--black); line-height: 1.55; -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; }
a { color: inherit; }
figure { margin: 0; }

.script { font-family: "Marck Script", cursive; font-weight: 400; text-transform: none; letter-spacing: 0; }

/* ---------- Блоки ---------- */
.sec { padding: var(--pad) var(--side); }
.cream { background: var(--cream); color: var(--black); }
.black { background: var(--black); color: var(--cream); }
.in { max-width: var(--max); margin: 0 auto; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 80px); align-items: center; }
.center { text-align: center; }

/* ---------- Типографика ---------- */
.h2 { font-weight: 800; text-transform: uppercase; letter-spacing: -.02em; line-height: 1.02; font-size: clamp(30px, 4.4vw, 56px); }
.h3 { font-weight: 700; font-size: clamp(16px, 1.5vw, 19px); letter-spacing: .02em; text-transform: uppercase; }
.pre { display: block; font-size: clamp(22px, 2.2vw, 28px); line-height: 1; margin-bottom: 6px; }
.lead { font-size: clamp(16px, 1.45vw, 19px); line-height: 1.6; margin-top: clamp(16px, 2vw, 24px); max-width: 540px; }
.text { font-size: clamp(15px, 1.25vw, 17px); line-height: 1.6; }
.black .lead, .black .text { color: #e7e4df; }
.sub { font-weight: 700; font-size: clamp(17px, 1.8vw, 22px); }
.sub .script { font-size: 1.35em; }

/* ---------- Навигация ---------- */
.nav { position: sticky; top: 0; z-index: 30; background: var(--black); }
.nav-in { max-width: var(--max); margin: 0 auto; display: flex; justify-content: space-between; gap: 18px; padding: 16px var(--side); overflow-x: auto; scrollbar-width: none; }
.nav-in::-webkit-scrollbar { display: none; }
.nav-in a { color: #fff; text-decoration: none; text-transform: uppercase; font-weight: 600; font-size: 14px; letter-spacing: .06em; white-space: nowrap; padding-bottom: 2px; border-bottom: 2px solid transparent; transition: border-color .2s; }
.nav-in a:hover { border-color: #fff; }

/* ---------- Кнопки и иконки ---------- */
.btn { display: inline-block; text-decoration: none; text-transform: uppercase; font-weight: 700; letter-spacing: .04em; font-size: clamp(13px, 1.1vw, 15px); padding: 14px 30px; border-radius: 12px; border: 1.5px solid currentColor; transition: background .2s, color .2s, transform .2s; }
.cream .btn { background: var(--black); color: var(--cream); border-color: var(--black); }
.cream .btn:hover { background: transparent; color: var(--black); }
.black .btn { background: var(--cream); color: var(--black); border-color: var(--cream); }
.black .btn:hover { background: transparent; color: var(--cream); }
.btn:hover { transform: translateY(-2px); }

.icons { display: flex; justify-content: center; gap: 16px; margin-top: clamp(22px, 2.6vw, 32px); }
.icons a { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; transition: transform .2s, background .2s; }
.icons svg { width: 24px; height: 24px; }
.cream .icons a { background: var(--black); color: #fff; }
.black .icons a { color: #fff; border: 1.5px solid #fff; }
.black .icons a:hover { background: rgba(255,255,255,.12); }
.icons a:hover { transform: scale(1.08); }

/* ---------- Телефон-рамка ---------- */
.phone { aspect-ratio: 9 / 16; border: 4px solid var(--black); border-radius: 20px; overflow: hidden; background: var(--black); box-shadow: 0 10px 26px rgba(0,0,0,.18); }
.black .phone { border-color: #3a3a3a; }
.phone img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- 1. Первый экран ---------- */
.hero { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: clamp(28px, 5vw, 72px); align-items: center; }
.hero-photo { border: 1.5px solid var(--black); border-radius: var(--radius); overflow: hidden; aspect-ratio: 4 / 5; max-width: 460px; width: 100%; justify-self: center; }
.hero-photo img { width: 100%; height: 100%; object-fit: cover; }
.hero-text { text-align: center; }
.name { position: relative; display: inline-block; text-align: left; font-size: clamp(54px, 9vw, 128px); line-height: .9; margin-bottom: .55em; }
.name .big { display: block; font-weight: 700; text-transform: uppercase; letter-spacing: -.045em; }
.name .sign { position: absolute; left: -.28em; top: .62em; font-family: "Mrs Saint Delafield", cursive; font-weight: 400; font-size: 1.05em; transform: rotate(-8deg); white-space: nowrap; }
.name .tag { display: block; text-align: right; font-size: max(13px, .16em); font-weight: 600; letter-spacing: .03em; text-transform: uppercase; margin-top: .35em; }

/* ---------- 2. Привет ---------- */
#about .h2 { font-size: clamp(32px, 4.6vw, 60px); }
.collage { --ph: clamp(170px, 19vw, 260px); position: relative; height: calc(var(--ph) * 1.18); max-width: calc(var(--ph) * 1.75); width: 100%; margin: 0 auto; }
.collage .phone { position: absolute; height: var(--ph); width: auto; }
.collage .phone:nth-of-type(1) { left: 0; top: 14%; transform: rotate(-6deg); }
.collage .phone:nth-of-type(2) { left: 50%; top: 2%; transform: translateX(-50%); z-index: 2; }
.collage .phone:nth-of-type(3) { right: 0; top: 16%; transform: rotate(6deg); }
.sticker { position: absolute; left: -4%; top: -2%; z-index: 3; background: #fff; color: var(--black); font-weight: 800; text-transform: uppercase; font-size: clamp(11px, 1vw, 14px); line-height: 1.15; padding: 7px 11px; border-radius: 8px; transform: rotate(-6deg); box-shadow: 0 4px 12px rgba(0,0,0,.25); }

/* ---------- 3. С кем успела поработать ---------- */
.logos { display: grid; grid-template-columns: repeat(6, 1fr); gap: clamp(16px, 2.2vw, 26px) 0; align-items: center; }
.logos span { grid-column: span 2; text-align: center; line-height: 1.15; padding: 0 6px; font-size: clamp(14px, 1.45vw, 19px); }
.logos span:nth-child(5n+1) { grid-column: 1 / span 2; }
.logos span:nth-child(5n+2) { grid-column: 3 / span 2; }
.logos span:nth-child(5n+3) { grid-column: 5 / span 2; }
.logos span:nth-child(5n+4) { grid-column: 2 / span 2; }
.logos span:nth-child(5n)   { grid-column: 4 / span 2; }
.lg-sans { font-weight: 800; }
.lg-caps { font-weight: 900; letter-spacing: .12em; font-size: .85em !important; }
.lg-serif { font-family: Georgia, "Times New Roman", serif; font-style: italic; font-weight: 400; }
.lg-light { font-weight: 500; letter-spacing: .08em; }
.lg-black { font-weight: 900; letter-spacing: -.01em; }
.brands-head { text-align: center; }
.stacked { display: flex; flex-direction: column; align-items: center; }
.stacked .script { font-size: .95em; transform: rotate(-4deg); margin: -.05em 0 0; line-height: 1.1; }
.brands-head .text { margin: 22px auto 0; max-width: 440px; color: var(--muted); }

/* ---------- 4. Ниши и услуги ---------- */
.pills { display: grid; gap: 12px; justify-items: center; margin-top: clamp(22px, 2.6vw, 32px); }
.pill { background: var(--cream); color: var(--black); text-decoration: none; font-weight: 600; font-size: clamp(14px, 1.2vw, 16px); padding: 11px 22px; border-radius: 12px; min-width: 240px; text-align: center; transition: transform .2s, background .2s; }
.pill:nth-child(odd) { margin-right: 44px; }
.pill:nth-child(even) { margin-left: 44px; }
.pill:hover { background: #fff; transform: translateX(4px); }
.side-photo { border-radius: var(--radius); overflow: hidden; border: 1.5px solid #444; aspect-ratio: 4 / 5; max-height: 520px; width: 100%; max-width: 440px; justify-self: center; }
.side-photo.wide { aspect-ratio: 4 / 3; max-width: none; }
.side-photo img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- 5. Статистика ---------- */
.perf-head { display: grid; grid-template-columns: auto 1fr; gap: clamp(24px, 4vw, 60px); align-items: end; }
.perf-head .h2 { max-width: 420px; }
.perf-head .script { font-size: 1em; }
.nums { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.nums div { text-align: center; }
.nums b { display: block; font-weight: 500; letter-spacing: -.02em; line-height: 1; font-size: clamp(30px, 3.6vw, 48px); }
.nums small { display: block; margin-top: 6px; font-size: 13px; color: var(--muted); line-height: 1.3; }
.charts { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(14px, 2vw, 24px); margin-top: clamp(30px, 4vw, 48px); }
.chart { border: 1.5px solid var(--black); border-radius: 12px; padding: 16px; display: flex; flex-direction: column; aspect-ratio: 5 / 4; background: var(--cream); }
.chart svg { flex: 1; width: 100%; min-height: 0; }
.chart figcaption { text-align: center; font-size: 13px; font-weight: 600; color: var(--muted); margin-top: 10px; }
.note { margin-top: clamp(22px, 3vw, 32px); }

/* ---------- 6–7. Видео и фото ---------- */
.sec-head { display: flex; justify-content: center; align-items: baseline; gap: 18px 36px; flex-wrap: wrap; text-align: center; }
.groups { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 4vw, 56px); margin-top: clamp(30px, 4vw, 48px); }
.group .h3 { text-align: center; margin-bottom: 16px; }
.cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(12px, 1.6vw, 20px); }
.cards.wide { grid-template-columns: repeat(6, minmax(0, 1fr)); margin-top: clamp(30px, 4vw, 48px); }
.card figcaption { text-align: center; font-weight: 600; font-size: clamp(12px, 1vw, 14px); margin-top: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.more { display: flex; justify-content: center; margin-top: clamp(30px, 4vw, 48px); }

/* ---------- 8. Сотрудничество ---------- */
.collab-title { position: relative; display: inline-block; padding-top: .95em; font-size: clamp(36px, 5.2vw, 68px); }
.collab-title .script { position: absolute; left: 30%; top: -.15em; font-size: .85em; transform: rotate(-6deg); white-space: nowrap; }

.footer { background: var(--black); color: var(--muted-on-black); text-align: center; font-size: 13px; padding: 24px var(--side); border-top: 1px solid #2c2c2c; }

/* ---------- Появление при прокрутке ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .reveal { opacity: 1; transform: none; transition: none; } }

/* ================= Планшет ================= */
@media (max-width: 1024px) {
  .groups { grid-template-columns: 1fr; max-width: 640px; margin-left: auto; margin-right: auto; }
  .cards.wide { grid-template-columns: repeat(3, minmax(0, 1fr)); max-width: 640px; margin-left: auto; margin-right: auto; }
  .perf-head { grid-template-columns: 1fr; text-align: center; }
  .perf-head .h2 { max-width: none; }
}

/* ================= Узкий планшет / большой телефон ================= */
@media (max-width: 820px) {
  .hero, .split { grid-template-columns: 1fr; }
  .hero-photo { max-width: 380px; }
  #about .split > div:first-child { text-align: center; }
  .lead { margin-left: auto; margin-right: auto; }
  .brands .brands-head { order: -1; }
  .nums { grid-template-columns: repeat(2, 1fr); row-gap: 26px; }
  .charts { grid-template-columns: 1fr 1fr; }
  .charts .chart:last-child { grid-column: span 2; max-width: 50%; justify-self: center; width: 100%; }
  .side-photo { max-height: 420px; }
  .nav-in { justify-content: flex-start; gap: 26px; }
}

/* ================= Телефон ================= */
@media (max-width: 560px) {
  .nav-in { padding: 14px 20px; gap: 22px; }
  .nav-in a { font-size: 13px; }
  .name { font-size: clamp(46px, 15vw, 64px); }
  .name .sign { left: -.12em; }
  .btn { width: 100%; max-width: 320px; text-align: center; }
  .logos { grid-template-columns: repeat(4, 1fr); }
  .logos span:nth-child(n) { grid-column: auto / span 2; }
  .logos span:nth-child(3n+1) { grid-column: 2 / span 2; }
  .pill { min-width: 0; width: 100%; max-width: 300px; }
  .pill:nth-child(odd), .pill:nth-child(even) { margin: 0; }
  .charts { grid-template-columns: 1fr; max-width: 340px; margin-left: auto; margin-right: auto; }
  .charts .chart:last-child { grid-column: auto; max-width: none; }
  /* карточки листаются пальцем */
  .cards, .cards.wide { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 44%; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 8px; margin-right: calc(-1 * var(--side)); padding-right: var(--side); scrollbar-width: none; }
  .cards::-webkit-scrollbar { display: none; }
  .card { scroll-snap-align: start; }
  .collab-title .script { left: 18%; }
}

/* телефон: всё меню помещается в одну строку, фото пониже */
@media (max-width: 560px) {
  .nav-in { justify-content: space-between; gap: 10px; padding: 14px 16px; }
  .nav-in a { font-size: 11.5px; letter-spacing: .02em; }
  .side-photo { max-height: 340px; aspect-ratio: 1; }
  .side-photo.wide { aspect-ratio: 4 / 3; }
}
@media (max-width: 360px) { .nav-in a { font-size: 10.5px; } }

/* кнопка всегда под именем */
.hero-text { display: flex; flex-direction: column; align-items: center; }
@media (max-width: 820px) and (min-width: 561px) { .nav-in { justify-content: space-between; } }

/* Reels и Истории — отдельные блоки по 4 карточки */
.cards.four { max-width: 860px; margin: clamp(30px, 4vw, 48px) auto 0; }
.cream .side-photo { border-color: var(--black); }
@media (max-width: 560px) { .nav-in a { font-size: 10.5px; } .nav-in { gap: 8px; } }

/* «чем я занимаюсь» крупнее; кнопки услуг подсвечиваются при наведении */
#services .pre { font-size: clamp(30px, 3.2vw, 42px); margin-bottom: 10px; }
.pill { transition: transform .25s, background .25s, color .25s, box-shadow .25s; }
.pill:hover, .pill:focus-visible {
  background: var(--black); color: var(--cream);
  box-shadow: 0 0 0 2px var(--cream), 0 0 26px rgba(251, 249, 244, .45);
  transform: translateX(4px) scale(1.03);
}

/* Коллаж «Привет»: без наклейки, телефоны крупнее, слегка заходят друг на друга;
   при наведении телефон чуть увеличивается и выходит на первый план */
.collage { --ph: clamp(220px, 24vw, 320px); height: calc(var(--ph) * 1.14); max-width: calc(var(--ph) * 1.42); }
.collage .phone { transform: none; transition: scale .3s ease, box-shadow .3s ease; cursor: pointer; }
.collage .phone:nth-of-type(1) { left: 0; top: 10%; rotate: -6deg; z-index: 1; }
.collage .phone:nth-of-type(2) { left: 50%; top: 0; translate: -50% 0; rotate: 0deg; z-index: 2; }
.collage .phone:nth-of-type(3) { left: auto; right: 0; top: 12%; rotate: 6deg; z-index: 1; }
.collage .phone:hover { scale: 1.08; z-index: 5; box-shadow: 0 18px 40px rgba(0,0,0,.45); }
@media (max-width: 560px) { .collage { --ph: clamp(170px, 50vw, 220px); } }
.collage .phone:nth-of-type(1), .collage .phone:nth-of-type(2), .collage .phone:nth-of-type(3) { transform: none; }

/* «немного обо мне» крупнее; все проекты жирные, порядок перемешан */
#about .pre { font-size: clamp(30px, 3.2vw, 42px); margin-bottom: 10px; }
.logos span { font-weight: 800; }
.lg-serif { font-weight: 700; }
.lg-light { font-weight: 800; letter-spacing: .06em; }
.lg-caps, .lg-black { font-weight: 900; }

/* «который» чуть ниже, чтобы запятая не касалась Й */
#stats .perf-head .h2 { line-height: 1.18; }


/* «Видео для брендов» целиком рукописным, чуть левее */
.sub.script-all { font-family: "Marck Script", cursive; font-weight: 400; font-size: clamp(24px, 2.4vw, 30px); position: relative; left: -24px; }
@media (max-width: 560px) { .sub.script-all { left: 0; } }


.sub.script-all.right { left: 24px; }
@media (max-width: 560px) { .sub.script-all.right { left: 0; } }


/* проекты: часть тонким, часть жирным вперемешку */
.logos span.w-thin { font-weight: 300; }
.logos span.w-bold { font-weight: 900; }
.logos span.lg-serif.w-thin { font-weight: 400; }

/* «успела» крупнее и под небольшим наклоном между строками */
.stacked .script { font-size: 1.35em; transform: rotate(-10deg); margin: -.12em 0 -.18em; line-height: 1.05; }


/* иконки на светлом фоне: при наведении остаются только чёрный круг-обводка и чёрная иконка */
.cream .icons a { border: 1.5px solid var(--black); }
.cream .icons a:hover { background: transparent; color: var(--black); }


/* «успела» правее и выше, без наложения на строки */
.stacked .script { transform: translateX(.45em) rotate(-10deg); margin: .02em 0 .14em; }

.stacked .script { margin: .22em 0 .3em; }


/* «работает» чуть выше */
#stats .perf-head .h2 .script { position: relative; top: -.18em; }


/* Карточки Reels, Историй и Фото: при наведении приподнимаются, по нажатию открываются крупно */
.card .phone { cursor: zoom-in; transition: transform .3s ease, box-shadow .3s ease; }
.card:hover .phone { transform: translateY(-6px) scale(1.04); box-shadow: 0 18px 38px rgba(0,0,0,.32); }
.card .phone img { transition: transform .4s ease; }
.card:hover .phone img { transform: scale(1.06); }

.lightbox { position: fixed; inset: 0; z-index: 100; background: rgba(17,17,17,.92); display: none; align-items: center; justify-content: center; padding: 56px 72px; }
.lightbox.open { display: flex; }
.lightbox figure { display: flex; flex-direction: column; align-items: center; max-width: 100%; max-height: 100%; }
.lightbox img { max-height: calc(100vh - 140px); max-width: min(100%, 720px); width: auto; border-radius: 14px; box-shadow: 0 20px 60px rgba(0,0,0,.5); background: #000; }
.lightbox figcaption { color: var(--cream); font-weight: 600; margin-top: 14px; font-size: 15px; text-align: center; }
.lb-btn { position: absolute; width: 48px; height: 48px; border-radius: 50%; border: 1.5px solid var(--cream); background: transparent; color: var(--cream); font-size: 22px; line-height: 1; cursor: pointer; display: grid; place-items: center; transition: background .2s, color .2s; }
.lb-btn:hover { background: var(--cream); color: var(--black); }
.lb-close { top: 18px; right: 18px; }
.lb-prev { left: 18px; top: 50%; translate: 0 -50%; }
.lb-next { right: 18px; top: 50%; translate: 0 -50%; }
@media (max-width: 560px) {
  .lightbox { padding: 64px 12px 72px; }
  .lb-prev, .lb-next { top: auto; bottom: 14px; translate: none; }
  .lb-prev { left: calc(50% - 60px); } .lb-next { right: calc(50% - 60px); }
}
@media (hover: none) { .card:hover .phone, .card:hover .phone img { transform: none; } }

/* крупный просмотр: картинка растягивается на высоту экрана, даже если исходник маленький */
.lightbox img { height: min(calc(100vh - 140px), 960px); width: auto; max-width: 100%; object-fit: contain; }
@media (max-width: 560px) { .lightbox img { height: auto; width: 100%; max-height: calc(100vh - 150px); } }


/* Видео в карточках Reels: играют без звука, курсором — перемотка, нажатие — крупно со звуком */
.phone video { width: 100%; height: 100%; object-fit: cover; display: block; background: #000; }
.video-card .phone { position: relative; cursor: default; }
.scrub { position: absolute; left: 10px; right: 10px; bottom: 3px; height: 18px; cursor: pointer; touch-action: none; }
.scrub::before, .scrub i { content: ''; position: absolute; left: 0; top: 7px; height: 4px; border-radius: 4px; transition: height .15s, top .15s; }
.scrub::before { right: 0; background: rgba(255,255,255,.35); }
.scrub i { width: 0; background: #fff; }
.scrub:hover::before, .scrub:hover i { height: 6px; top: 6px; }
.vtime { position: absolute; left: 10px; bottom: 24px; font-size: 11px; font-weight: 600; color: #fff; background: rgba(0,0,0,.55); padding: 2px 8px; border-radius: 10px; font-variant-numeric: tabular-nums; pointer-events: none; }
.sound-hint { position: absolute; left: 50%; top: 12px; translate: -50% 0; background: rgba(0,0,0,.55); color: #fff; font-size: 11px; font-weight: 600; padding: 4px 10px; border-radius: 20px; white-space: nowrap; opacity: 0; transition: opacity .2s; pointer-events: none; }
.video-card:hover .sound-hint { opacity: 1; }
.card:hover .phone video { transform: scale(1.04); transition: transform .4s ease; }
.lightbox video { height: min(calc(100vh - 140px), 960px); width: auto; max-width: 100%; border-radius: 14px; background: #000; box-shadow: 0 20px 60px rgba(0,0,0,.5); }
@media (max-width: 560px) { .lightbox video { height: auto; width: 100%; max-height: calc(100vh - 150px); } .sound-hint { opacity: 1; } }

/* Фото по проектам: 3 альбома, обложка «стопкой» и счётчик фото */
.cards.three { grid-template-columns: repeat(3, minmax(0, 1fr)); max-width: 760px; margin: clamp(30px, 4vw, 48px) auto 0; gap: clamp(18px, 2.4vw, 32px); }
.album .phone { position: relative; overflow: visible; }
.album .phone::before, .album .phone::after { content: ''; position: absolute; inset: 0; border-radius: inherit; background: rgba(251,249,244,.18); z-index: -1; transition: transform .3s ease; }
.album .phone::before { transform: translate(7px, -7px) rotate(3deg); }
.album .phone::after { transform: translate(13px, -12px) rotate(6deg); background: rgba(251,249,244,.09); }
.album:hover .phone::before { transform: translate(11px, -10px) rotate(5deg); }
.album:hover .phone::after { transform: translate(20px, -16px) rotate(9deg); }
.album .phone img { border-radius: inherit; }
.album .count { position: absolute; right: 10px; top: 10px; background: rgba(0,0,0,.6); color: #fff; font-size: 11px; font-weight: 600; padding: 3px 10px; border-radius: 20px; pointer-events: none; }
@media (max-width: 560px) { .cards.three { grid-template-columns: none; max-width: none; margin-top: 30px; } }

/* Кружок загрузки на месте фото и роликов */
.cards .phone, .lightbox figure { position: relative; }
.spin { position: absolute; left: 50%; top: 50%; width: 40px; height: 40px; margin: -20px 0 0 -20px; border-radius: 50%; border: 3px solid rgba(255,255,255,.25); border-top-color: #fff; background: rgba(29,29,29,.45); box-shadow: 0 0 0 5px rgba(29,29,29,.45); animation: spin .8s linear infinite; opacity: 0; transition: opacity .2s; pointer-events: none; z-index: 3; }
.loading > .spin { opacity: 1; }
.lightbox figure .spin { top: calc(50% - 20px); }
@keyframes spin { to { rotate: 360deg; } }

/* Услуги — просто плашки, без перехода по нажатию */
.pill { cursor: default; user-select: none; }

/* «С кем» ближе к «успела» */
.stacked .script { margin-top: -.1em; }

/* Стрелки и крестик просмотра: тонкие линии; на телефоне — полупрозрачные кнопки по бокам фото */
.lb-btn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.lb-btn { z-index: 2; }
@media (max-width: 560px) {
  .lightbox { padding: 60px 12px 24px; }
  .lb-btn { width: 40px; height: 40px; border: none; background: rgba(29,29,29,.55); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
  .lb-btn:hover { background: rgba(29,29,29,.55); color: var(--cream); }
  .lb-btn svg { width: 20px; height: 20px; }
  .lb-close { top: 12px; right: 12px; }
  .lb-prev, .lb-next { top: 50%; bottom: auto; translate: 0 -50%; }
  .lb-prev { left: 18px; } .lb-next { right: 18px; }
}

/* Телефон: кнопка и иконки в шапке чуть ниже */
@media (max-width: 560px) { #top .btn { margin-top: 20px; } #top .icons { margin-top: 30px; } }

/* Телефон: во всех заголовках блоков подпись прописью сверху, название под ней */
@media (max-width: 560px) { .sec-head { flex-direction: column; align-items: center; gap: 2px; } .sec-head .sub { order: -1; } }

/* Ряды карточек по кругу: копии нужны только на телефоне; ряд на всю ширину экрана, карточка в центре */
@media (min-width: 561px) { .cards .clone { display: none; } }
@media (max-width: 560px) {
  .cards, .cards.wide, .cards.four, .cards.three { margin-left: calc(-1 * var(--side)); margin-right: calc(-1 * var(--side)); padding-left: 0; padding-right: 0; max-width: none; grid-auto-columns: 46%; }
  .card { scroll-snap-align: center; }
}

/* Альбомы на светлом фоне: «стопка» тёмная */
.cream .album .phone::before { background: rgba(29,29,29,.16); }
.cream .album .phone::after { background: rgba(29,29,29,.08); }

/* Коллаж: у телефонов своя ширина (9:16) ещё до загрузки фото — иначе Safari на iPad видит пустой блок нулевой ширины и не грузит картинку */
.collage .phone { aspect-ratio: 9 / 16; }
.collage .phone img { width: 100%; height: 100%; object-fit: cover; }
