/* ============================================================
   Case pages — shared styles for /works/<name>/index.html
   Desktop is laid out on a 1600px design grid: every size is
   N * var(--k), where --k = one design pixel at the current width.
   Mobile (≤760px) uses the 375px design: N * var(--m).
   ============================================================ */

@font-face { font-family: "Suisse Int'l"; src: url("../../assets/fonts/SuisseIntl-Regular.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Suisse Int'l"; src: url("../../assets/fonts/SuisseIntl-Medium.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Suisse Int'l"; src: url("../../assets/fonts/SuisseIntl-SemiBold.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Suisse Int'l"; src: url("../../assets/fonts/SuisseIntl-Bold.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }

:root {
  --bg: #ffffff;
  --fg: #26251f;
  --muted: #c5c5c5;
  --accent: #ff2160;        /* underline under links (from the mockup) */
  --slate: #3d4f57;
  --night: #121317;
  --card: #35363d;
  --copper: #d6a38f;

  --k: calc(min(100vw, 1920px) / 1600);   /* 1 design px (desktop) */
  --pad: calc(58 * var(--k));
  --r: 5px;
  --ease: cubic-bezier(.22, 1, .36, 1);
  --ease-io: cubic-bezier(.76, 0, .24, 1);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--fg);
  font-family: "Suisse Int'l", -apple-system, "Helvetica Neue", Helvetica, Arial, "Segoe UI", Roboto, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
a { color: inherit; text-decoration: none; }
img, video, svg { display: block; }
figure { margin: 0; }
h1, h2, h3, p, dl, dd { margin: 0; }

.wrap { padding-left: var(--pad); padding-right: var(--pad); }

/* ===================== Header (same as the home page) ===================== */
.header {
  position: sticky; top: 0; z-index: 100;
  mix-blend-mode: difference;
}
.header__inner {
  padding-top: 14px; padding-bottom: 14px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.logo__text { font-weight: 600; font-size: 17px; letter-spacing: .01em; color: #fff; }
.contacts { display: flex; align-items: center; gap: clamp(12px, 2.4vw, 34px); flex-wrap: wrap; justify-content: flex-end; }
.contacts__item { color: #fff; font-size: 17px; font-weight: 600; white-space: nowrap; transition: opacity .2s ease; }
.contacts__item:hover { opacity: .6; }
.contacts__item--icon { display: inline-flex; align-items: center; }
.contacts__item--icon svg { width: 19px; height: auto; }
.contacts__phone-icon { display: none; width: 17px; height: auto; }

/* ===================== Entrance / reveal primitives ===================== */
/* fade-up for text */
[data-in] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .9s var(--ease) var(--d, 0s), transform 1.1s var(--ease) var(--d, 0s);
}
[data-in].is-in { opacity: 1; transform: none; }

/* line mask for the big title */
.c-mask { display: block; overflow: hidden; padding: .12em 0 .16em; margin: -.12em 0 -.16em; }
.c-mask__in { display: block; transform: translateY(105%); transition: transform 1.25s var(--ease) .1s; }
.c-title.is-in { opacity: 1; transform: none; }
.c-title.is-in .c-mask__in { transform: none; }

/* image blocks: open up from a clip + settle from a slight zoom */
.c-reveal {
  clip-path: inset(9% 4% 9% 4% round var(--r));
  transition: clip-path 1.4s var(--ease) var(--d, 0s);
}
.c-reveal > img, .c-reveal > video {
  transform: scale(1.14);
  transition: transform 1.8s var(--ease) var(--d, 0s);
}
.c-reveal.is-in { clip-path: inset(0 0 0 0 round var(--r)); }
.c-reveal.is-in > img, .c-reveal.is-in > video { transform: scale(1.0001); }
/* parallax images ride on --py (set by JS), on top of the reveal zoom */
.c-reveal > img[data-speed] { transform: translate3d(0, var(--py, 0px), 0) scale(1.18); }
.c-reveal.is-in > img[data-speed] { transform: translate3d(0, var(--py, 0px), 0) scale(1.12); }
/* gooey cursor layer (case.js, [data-goo]) rides on the same parallax and zoom as its photo */
.c-goo { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; }
.c-reveal > .c-goo { transform: translate3d(0, var(--py, 0px), 0) scale(1.18); transition: transform 1.8s var(--ease) var(--d, 0s); }
.c-reveal.is-in > .c-goo { transform: translate3d(0, var(--py, 0px), 0) scale(1.12); }
[data-goo] { position: relative; }

/* objects that float up into place (laptop) */
.c-rise img { opacity: 0; transform: translateY(80px) scale(.96); transition: opacity 1.1s var(--ease), transform 1.6s var(--ease); }
.c-rise.is-in img { opacity: 1; transform: none; }

/* ===================== Intro ===================== */
.c-intro { padding-top: calc(110 * var(--k)); }
.c-back {
  display: inline-flex; align-items: center; gap: calc(12 * var(--k));
  font-size: max(15px, calc(18 * var(--k))); font-weight: 600; line-height: 1;
}
.c-back__icon { width: max(19px, calc(23 * var(--k))); height: auto; transition: transform .45s var(--ease); }
.c-back:hover .c-back__icon { transform: translateX(-5px); }

.c-title {
  margin-top: calc(52 * var(--k));
  font-size: max(36px, calc(84 * var(--k)));
  font-weight: 600;
  line-height: .85;
  letter-spacing: -.04em;
}

.c-meta {
  margin-top: calc(48 * var(--k));
  display: grid;
  grid-template-columns: 51.4% 25.6% 1fr;
}
.c-meta dt { font-size: max(13px, calc(15 * var(--k))); font-weight: 500; color: var(--muted); line-height: 1.15; }
.c-meta dd { margin-top: calc(14 * var(--k)); font-size: max(15px, calc(18 * var(--k))); font-weight: 500; line-height: 1.2; }

/* link with the pink underline that redraws on hover */
.c-link {
  position: relative; display: inline-block; padding-bottom: calc(5 * var(--k));
}
.c-link::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: calc(-1 * var(--k));
  height: 2px; background: var(--accent);
  transform-origin: right; transition: transform .6s var(--ease-io);
}
.c-link:hover::after { animation: underline-redraw .9s var(--ease-io); }
@keyframes underline-redraw {
  0% { transform: scaleX(1); transform-origin: right; }
  45% { transform: scaleX(0); transform-origin: right; }
  46% { transform: scaleX(0); transform-origin: left; }
  100% { transform: scaleX(1); transform-origin: left; }
}

/* ===================== Hero ===================== */
.c-hero { margin-top: calc(54 * var(--k)); }
.c-hero__media {
  position: relative; overflow: hidden; border-radius: var(--r);
  aspect-ratio: 1484 / 824; background: #1b1512;
}
.c-hero__media .c-video { width: 100%; height: 100%; object-fit: cover; }
.c-hero__media::after {   /* soft vignette so the logo reads on bright frames */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(60% 55% at 50% 50%, rgba(0,0,0,.18), rgba(0,0,0,0) 70%);
}
.c-hero__logo {
  position: absolute; z-index: 1; left: 50%; top: 50%;
  width: calc(494 / 1484 * 100%); height: auto;
  transform: translate(-50%, -50%);
  overflow: visible;
}
.c-hero__logo path {
  fill: #fff;
  opacity: 0;
  transform: translateY(14px);
  transform-box: fill-box;
  filter: blur(6px);
  transition: opacity 1s var(--ease), transform 1.2s var(--ease), filter 1s var(--ease);
  transition-delay: calc(.55s + var(--i) * .055s);
}
.c-hero__media.is-in .c-hero__logo path { opacity: 1; transform: none; filter: blur(0); }

/* until the real video file is in place: the poster breathes slowly */
.is-fallback .c-video { animation: kenburns 18s ease-in-out infinite alternate; }
@keyframes kenburns {
  from { transform: scale(1.0001) translate3d(0, 0, 0); }
  to   { transform: scale(1.08) translate3d(-1.2%, -1%, 0); }
}

/* ===================== Text sections ===================== */
.c-text {
  margin-top: calc(85 * var(--k));
  display: grid; grid-template-columns: 51.4% 1fr;
}
.c-h2 { font-size: max(22px, calc(35 * var(--k))); font-weight: 600; letter-spacing: -.057em; line-height: 1.15; }
.c-text__body { max-width: calc(693 * var(--k) + 2px); padding-top: calc(11 * var(--k)); }
.c-text__body p { font-size: max(16px, calc(20 * var(--k))); line-height: 1.3; font-weight: 400; }
.c-text__body p + p { margin-top: 1.3em; }

/* ===================== Laptop ===================== */
.c-laptop { margin-top: calc(94 * var(--k)); }
.c-laptop img { width: 100%; height: auto; }
/* the laptop grows a little as it scrolls in (--z 0 → 1, case.js [data-zoom]) and its
   screen "wakes up": black glass fades away, then a soft light sweeps across it */
.c-laptop__device { position: relative; transform: scale(calc(.9 + .1 * var(--z, 1))); transform-origin: 50% 85%; will-change: transform; }
.c-laptop__screen { position: absolute; left: 21.14%; top: 8.19%; width: 58.63%; height: 67.6%; overflow: hidden; pointer-events: none; }
/* black glass clears as the laptop reaches the middle of the screen (tied to --z) */
.c-laptop__screen::before { content: ""; position: absolute; inset: 0; background: #0e0e10; opacity: clamp(0, calc((.88 - var(--z, 1)) * 4), 1); }
.c-laptop__screen::after {
  content: ""; position: absolute; top: -10%; bottom: -10%; left: -45%; width: 32%;
  background: linear-gradient(100deg, rgba(255,255,255,0), rgba(255,255,255,.5) 50%, rgba(255,255,255,0));
  transform: skewX(-14deg); opacity: 0;
}
.c-laptop.is-awake .c-laptop__screen::after { animation: screen-sweep 1.8s var(--ease-io) .25s both; }
@keyframes screen-sweep { 0% { left: -45%; opacity: 0; } 20% { opacity: 1; } 100% { left: 125%; opacity: 0; } }

/* ===================== Phones on beige ===================== */
.c-phones { margin-top: calc(73 * var(--k)); }
.c-phones__stage { position: relative; aspect-ratio: 1484 / 906; }
.c-phones__bg { position: absolute; left: 0; right: 0; top: 26.38%; bottom: 0; overflow: hidden; border-radius: var(--r); }
.c-phones__bg img { width: 100%; height: 100%; object-fit: cover; }
.c-phone {
  position: absolute; width: 24.8%; height: auto;
  filter: drop-shadow(0 calc(30 * var(--k)) calc(40 * var(--k)) rgba(60, 35, 15, .18));
  will-change: translate;
}
.c-phone--left   { left: 9.77%;  top: 17.55%; }
.c-phone--center { left: 37.87%; top: 0; z-index: 1; }
.c-phone--right  { left: 66.04%; top: 17.55%; }
/* entrance tied to scroll: the phones rise one after another out of the
   bottom edge of the beige panel and settle in their places (--rise 1 → 0,
   set by case.js). They stay upright and never pass below the panel. */
.c-phones__stage { clip-path: inset(-50% -30% 0 -30%); }
/* the centre phone rises first; the side phones then slide out from behind it to
   their places (sideways and up, no tilt), so all three stay inside the panel */
.c-phone { translate: 0 calc(var(--rise, 0) * 42%); }
.c-phone--left  { --sx: 113%; }
.c-phone--right { --sx: -113%; }
.c-phone--left, .c-phone--right {
  translate: calc(var(--rise, 0) * var(--sx)) calc(var(--rise, 0) * 26%);
  scale: calc(1 - var(--rise, 0) * .08);
}
/* once in place they breathe gently, out of step with each other */
.c-phones.is-in .c-phone { animation: phone-float 7s ease-in-out infinite; }
.c-phones.is-in .c-phone--center { animation-delay: -2.3s; }
.c-phones.is-in .c-phone--right { animation-delay: -4.6s; }
@keyframes phone-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-1.6%); } }
.c-phones__mark {
  position: absolute; left: 48.05%; top: 82.56%; width: 3.77%; height: auto;
  opacity: 0; transform: translateY(10px); transition: opacity 1s var(--ease) .7s, transform 1.2s var(--ease) .7s;
}
.c-phones.is-in .c-phones__mark { opacity: 1; transform: none; }

/* ===================== Velvet / slate / tablet ===================== */
.c-duo { margin-top: calc(13 * var(--k)); position: relative; }
.c-duo::before { content: ""; display: block; aspect-ratio: 1484 / 977; }
.c-duo__velvet, .c-duo__slate {
  position: absolute; top: 0; bottom: 0; overflow: hidden; border-radius: var(--r);
}
.c-duo__velvet { left: var(--pad); width: calc((100% - 2 * var(--pad)) * .4966); }
.c-duo__velvet img { width: 100%; height: 100%; object-fit: cover; }
.c-duo__slate  { right: var(--pad); width: calc((100% - 2 * var(--pad)) * .4953); background: var(--slate); }
.c-tablet {
  position: absolute; z-index: 2;
  left: calc(var(--pad) + (100% - 2 * var(--pad)) * .1988);
  top: 23.95%;
  width: calc((100% - 2 * var(--pad)) * .6018);
  aspect-ratio: 893 / 509;
  padding: calc(11 * var(--k));
  background: #fff;
  border-radius: calc(20 * var(--k));
  box-shadow: 0 calc(40 * var(--k)) calc(80 * var(--k)) rgba(0, 0, 0, .28);
  transform: translate3d(0, calc(70 * var(--k)), 0) scale(.9);
  opacity: 0;
  transition: transform 1.6s var(--ease) .15s, opacity 1s var(--ease) .15s;
}
.c-tablet.is-in { transform: none; opacity: 1; }
/* no inner rounding and a white backing: a rounded clip over the recording left thin
   dark arcs in the corners of the white frame (seen on «Культура дома») */
.c-tablet__screen { width: 100%; height: 100%; overflow: hidden; border-radius: 0; background: #fff; }
.c-tablet__screen .c-video { width: 100%; height: 100%; object-fit: cover; }
/* the «Культура дома» recording has black rounded corners baked into its edges (~4px of 1000):
   enlarge it slightly so the white frame crops them off */
.c-tablet--trim .c-video { scale: 1.025; }

/* ===================== Store ===================== */
.c-store { margin-top: calc(139 * var(--k)); }
.c-store { overflow: hidden; border-radius: var(--r); padding: 0; margin-left: var(--pad); margin-right: var(--pad); aspect-ratio: 1482 / 737; }
.c-store img { width: 100%; height: 100%; object-fit: cover; }

/* ===================== Dark block: moving screens ===================== */
.c-dark {
  margin-top: calc(145 * var(--k));
  background: var(--night);
  padding: calc(125 * var(--k)) 0 0;
  overflow-x: clip;   /* not hidden: the shapes block inside is sticky */
  position: relative;
  padding-bottom: calc(20 * var(--k));
}
/* soft entry: with JS the block itself is see-through and the whole page
   background fades white → night as it comes up, and back to white as it
   leaves (case.js tints .page). Without JS / reduced motion it stays solid. */
.js-fade .c-dark { background: transparent; }
.js-fade .page { transition: none; }
.c-marquee { display: grid; row-gap: calc(92 * var(--k)); }
.c-row { overflow: visible; }
.c-track {
  display: flex; gap: calc(84 * var(--k)); width: max-content;
  transform: translate3d(var(--x, 0px), 0, 0);
  will-change: transform;
}
.c-card {
  flex: none;
  width: calc(475 * var(--k));
  aspect-ratio: 475 / 316;
  padding: calc(5.5 * var(--k));
  background: var(--card);
  border-radius: 10px;
  transition: transform .7s var(--ease), background-color .5s ease;
}
.c-card img { width: 100%; height: 100%; object-fit: cover; border-radius: var(--r); }
.c-row:hover .c-card:hover { transform: translateY(calc(-10 * var(--k))) scale(1.03); background: #4a4b53; }
/* rows drift in from the sides when the block appears */
.c-row { opacity: 0; translate: calc(var(--dir, 1) * 8%) 0; transition: opacity 1.2s var(--ease), translate 1.8s var(--ease); }
.c-row:nth-child(2) { transition-delay: .12s; }
.c-row:nth-child(3) { transition-delay: .24s; }
.c-dark.is-in .c-row { opacity: 1; translate: 0 0; }

/* figures: the screen holds, the figure swaps as you scroll, then the page moves on */
/* the pinned area is just the figure plus a little air, held in the middle of the screen */
.c-shapes { --sh: calc(250 * var(--k)); position: relative; height: calc(var(--sh) + var(--n, 8) * 5vh); margin-top: calc(100 * var(--k)); }
.c-shapes__sticky {
  position: sticky; top: calc(50vh - var(--sh) / 2); height: var(--sh);
  display: flex; align-items: center; justify-content: center;
}
.c-shapes__box { position: relative; width: calc(200 * var(--k)); aspect-ratio: 1; }
.c-shape {
  position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible;
  opacity: 0; transform: scale(.94) rotate(-4deg);
  transition: opacity .12s linear, transform .3s var(--ease);
}
.c-shape.is-active { opacity: 1; transform: none; }
.c-shape path { stroke: var(--copper); stroke-width: 1; vector-effect: non-scaling-stroke; stroke-miterlimit: 10; }
/* the first figure draws itself in with a line when the block appears */
.c-shape:first-child path { stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 2.2s var(--ease-io); }
.c-shapes.is-in .c-shape:first-child path { stroke-dashoffset: 0; }

/* ===================== Hand + flowers ===================== */
.c-pair {
  margin-top: calc(80 * var(--k));
  display: grid; grid-template-columns: 735fr 739fr; column-gap: calc(10 * var(--k));
}
.c-pair > div { position: relative; overflow: hidden; border-radius: var(--r); aspect-ratio: 735 / 726; }
.c-pair__slate { background: var(--slate); }
.c-pair__hand {
  position: absolute; left: 16.3%; bottom: 0; width: 64.6%; height: auto;
  transform: translateY(16%); transition: transform 1.8s var(--ease) .1s;
}
.c-pair__slate.is-in .c-pair__hand { transform: none; }
.c-pair__photo img { width: 100%; height: 100%; object-fit: cover; }
/* the columns differ by a few px; size the photo by the row (set by the slate) so both bottoms line up */
.c-pair__photo { aspect-ratio: auto !important; }
@media (max-width: 760px) { .c-pair__photo { aspect-ratio: 335 / 332 !important; } }

/* ===================== Christmas ===================== */
.c-xmas { margin: calc(11 * var(--k)) var(--pad) 0; padding: 0; overflow: hidden; border-radius: var(--r); aspect-ratio: 1485 / 808; }
.c-xmas img { width: 100%; height: 100%; object-fit: cover; }

/* ===================== Result ===================== */
.c-result { margin-top: calc(111 * var(--k)); }
.c-h3 { font-size: max(22px, calc(35 * var(--k))); font-weight: 600; letter-spacing: -.057em; line-height: 1.17; margin-bottom: calc(24 * var(--k)); max-width: calc(727 * var(--k)); }
.c-result .c-text__body { padding-top: 0; max-width: none; }
.c-result .c-text__body p { max-width: calc(693 * var(--k) + 2px); }
.c-link--big {
  margin-top: calc(40 * var(--k));
  font-size: max(22px, calc(35 * var(--k))); font-weight: 600; letter-spacing: -.057em; line-height: 1.15;
  padding-bottom: calc(4 * var(--k));
}

/* ===================== Next case ===================== */
.c-next { display: block; position: relative; margin-top: calc(146 * var(--k)); margin-bottom: calc(145 * var(--k)); }
.c-next__media { overflow: hidden; border-radius: var(--r); aspect-ratio: 1483 / 443; }
.c-next__media img { width: 100%; height: 100%; object-fit: cover; }
.c-next__media.is-in img { transition: transform 1.4s var(--ease); }
.c-next:hover .c-next__media img { transform: scale(1.04); }
.c-next__text {
  position: absolute; left: calc(var(--pad) + (100% - 2 * var(--pad)) * .513); top: 40.4%;
  display: flex; flex-direction: column; gap: calc(6 * var(--k));
}
.c-next__label { display: inline-flex; align-items: center; gap: calc(14 * var(--k)); font-size: max(15px, calc(18 * var(--k))); font-weight: 600; }
.c-next__arrow { width: max(18px, calc(23 * var(--k))); height: auto; transition: transform .5s var(--ease); }
.c-next:hover .c-next__arrow { transform: translateX(6px); }
.c-next__title { font-size: max(22px, calc(35 * var(--k))); font-weight: 600; letter-spacing: -.057em; line-height: 1.15; }

/* ===================== Mobile (375 design) ===================== */
@media (max-width: 760px) {
  :root { --m: calc(100vw / 375); --pad: calc(19 * var(--m)); }

  .header__inner { flex-wrap: wrap; }
  .contacts { gap: 14px; }
  .contacts__item { font-size: 12px; }
  .contacts__item--phone { display: inline-flex; align-items: center; margin-right: 13px; }
  .contacts__phone-text { display: none; }
  .contacts__phone-icon { display: block; }
  .contacts__item--mail { transform: translateX(-4px); }
  .logo__text { letter-spacing: -0.02em; }

  .c-intro { padding-top: calc(24 * var(--m)); }
  .c-back { font-size: 16px; gap: 10px; }
  .c-back__icon { width: 18px; }
  .c-title { margin-top: calc(50 * var(--m)); font-size: calc(35.3 * var(--m)); letter-spacing: -.04em; line-height: .9; }
  .c-meta { margin-top: calc(18 * var(--m)); grid-template-columns: 1fr auto; row-gap: calc(24 * var(--m)); }
  .c-meta__col--link { grid-column: 1 / -1; }
  .c-meta dt { font-size: 13px; }
  .c-meta dd { margin-top: 4px; font-size: 15px; }
  .c-link { padding-bottom: 3px; }

  .c-hero { margin-top: calc(39 * var(--m)); padding: 0; }
  .c-hero__media { aspect-ratio: 375 / 208; border-radius: 0; }
  .c-hero__logo { width: calc(185 / 375 * 100%); }
  .c-reveal { clip-path: inset(6% 3% 6% 3%); }
  .c-reveal.is-in { clip-path: inset(0 0 0 0); }

  .c-text { margin-top: calc(41 * var(--m)); grid-template-columns: 1fr; row-gap: calc(16 * var(--m)); }
  .c-h2 { font-size: 22px; letter-spacing: -.045em; }
  .c-text__body { padding-top: 0; max-width: none; }
  .c-text__body p { font-size: 17px; line-height: 21px; }
  .c-text__body p + p { margin-top: 21px; }

  .c-laptop { margin-top: calc(40 * var(--m)); padding: 0; overflow: hidden; }
  .c-laptop__device { width: calc(558 * var(--m)); margin-left: calc(-91 * var(--m)); }

  .c-phones { margin-top: calc(26 * var(--m)); padding: 0; }
  .c-phones__stage { aspect-ratio: 375 / 509; overflow-x: clip; overflow-y: visible; }
  .c-phones__bg { top: calc(76 / 509 * 100%); border-radius: 0; }
  .c-phone { filter: drop-shadow(0 12px 18px rgba(60, 35, 15, .18)); }
  .c-phone--center { width: calc(185 / 375 * 100%); left: calc(97 / 375 * 100%); top: 0; }
  .c-phone--left   { width: calc(166 / 375 * 100%); left: calc(-62 / 375 * 100%); top: calc(167 / 509 * 100%); }
  .c-phone--right  { width: calc(166 / 375 * 100%); left: calc(274 / 375 * 100%); top: calc(167 / 509 * 100%); }
  .c-phone--left  { --sx: 96%; }
  .c-phone--right { --sx: -106%; }
  .c-phones__mark { width: calc(40 / 375 * 100%); left: calc(167.5 / 375 * 100%); top: calc(368 / 509 * 100%); }

  .c-duo { margin-top: calc(7 * var(--m)); padding: 0; }
  .c-duo::before { aspect-ratio: 375 / 605; }
  .c-duo__velvet { left: 0; width: 100%; top: 0; bottom: auto; height: calc(322 / 605 * 100%); border-radius: 0; }
  .c-duo__slate  { right: 0; width: 100%; top: auto; bottom: 0; height: calc(283 / 605 * 100%); border-radius: 0; }
  .c-tablet { left: 0; width: 100%; top: calc(209 / 605 * 100%); padding: calc(5 * var(--m)); border-radius: calc(14 * var(--m)); }

  .c-store { margin: calc(10 * var(--m)) 0 0; aspect-ratio: 375 / 265; border-radius: 0; }

  .c-dark { margin-top: calc(9 * var(--m)); padding: calc(99 * var(--m)) 0 calc(20 * var(--m)); }
  .c-marquee { row-gap: calc(39 * var(--m)); }
  .c-track { gap: calc(36 * var(--m)); }
  .c-card { width: calc(206 * var(--m)); padding: calc(2.5 * var(--m)); border-radius: 6px; }
  .c-card img { border-radius: 3px; }
  .c-shapes { --sh: calc(190 * var(--m)); margin-top: calc(50 * var(--m)); }
  .c-shapes__box { width: calc(120 * var(--m)); }

  .c-pair { margin-top: calc(49 * var(--m)); grid-template-columns: 1fr; row-gap: calc(22 * var(--m)); }
  .c-pair > div { aspect-ratio: 335 / 332; }
  .c-pair__hand { width: calc(222 / 335 * 100%); left: calc(57 / 335 * 100%); }

  .c-xmas { margin: calc(57 * var(--m)) 0 0; aspect-ratio: 375 / 507; border-radius: 0; }
  .c-xmas img { object-position: 28% 50%; }

  .c-result { margin-top: calc(49 * var(--m)); row-gap: calc(25 * var(--m)); }
  .c-h3 { font-size: 22px; letter-spacing: -.045em; margin-bottom: 23px; max-width: none; }
  .c-result .c-text__body p { max-width: none; }
  .c-link--big { margin-top: calc(18 * var(--m)); font-size: 22px; letter-spacing: -.045em; }

  .c-next { margin: calc(68 * var(--m)) 0 calc(60 * var(--m)); padding: 0; }
  .c-next__media { aspect-ratio: 375 / 241; border-radius: 0; }
  .c-next__media img { object-position: 56% 50%; }
  .c-next__text { left: 0; right: 0; top: calc(88 / 241 * 100%); align-items: center; gap: 4px; }
  .c-next__label { font-size: 16px; gap: 10px; }
  .c-next__arrow { width: 18px; }
  .c-next__title { font-size: 22px; letter-spacing: -.045em; }
}

/* ===================== Reduced motion ===================== */
@media (prefers-reduced-motion: reduce) {
  [data-in], .c-mask__in, .c-reveal, .c-reveal > img, .c-reveal > video, .c-rise img,
  .c-phone, .c-phones__mark, .c-tablet, .c-row, .c-pair__hand, .c-hero__logo path {
    transition: none !important; opacity: 1 !important; transform: none !important; translate: none !important; clip-path: none !important; filter: none !important;
  }
  .c-laptop__screen { display: none; }
  .c-phone { animation: none !important; scale: none !important; }
  .c-shape:first-child path { stroke-dashoffset: 0; transition: none; }
  .c-shape { transition: none; }
  .is-fallback .c-video { animation: none !important; }
}

/* ===================== Footer (same as the home page) =====================
   The dark footer is fixed behind the white .page; the page gets a bottom
   margin equal to the footer height (set in case.js), so scrolling past the
   last block lifts the white page and uncovers the footer. */
.page { position: relative; z-index: 1; background: var(--bg); display: flow-root; }   /* flow-root keeps the last block's bottom margin white */
.site-footer {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 0;
  background: #111215; color: #f3f2ef;
  visibility: hidden;                 /* shown by JS once the user scrolls (avoids an iOS load flash) */
}
.site-footer.is-visible { visibility: visible; }
.site-footer__inner {
  position: relative; z-index: 1;
  display: flex; flex-direction: column; justify-content: flex-end;
  min-height: 100svh;
}
.statement {
  padding-top: clamp(48px, 6vw, 96px);
  padding-bottom: clamp(40px, 6vw, 90px);
  align-self: stretch;
}
.statement__text {
  margin: 0; max-width: 66.666%;
  font-size: clamp(30px, 4.4vw, 62px);
  font-weight: 600; line-height: 0.75; letter-spacing: -0.02em;
  color: #f3f2ef;
}
.footer__bottom { padding-bottom: clamp(6px, 0.9vw, 12px); align-self: stretch; }
.footer__copy { margin: 0 0 clamp(26px, 4vw, 54px); color: #8b8a83; font-size: 15px; }
.contact { display: flex; align-items: center; justify-content: space-between; gap: clamp(20px, 2.6vw, 44px); flex-wrap: wrap; }
.contact__title {
  margin: 0; font-size: clamp(62px, 11.7vw, 172px);
  font-weight: 700; line-height: 0.9; letter-spacing: -0.03em; color: #f3f2ef;
}
.contact__socials { display: flex; gap: clamp(12px, 1.4vw, 22px); transform: translateY(20px); }   /* desktop: icons a touch below the heading centre (as on the home page) */
.social {
  position: relative; display: flex; align-items: center; justify-content: center;
  width: clamp(64px, 5vw, 92px); height: clamp(64px, 5vw, 92px);
  border-radius: 50%; background: #24252b; color: #f3f2ef;
  overflow: visible; will-change: transform;
  transition: transform .6s cubic-bezier(.34,1.56,.64,1), background .3s ease;
}
.social:hover { background: #2b2c34; }
.social__spark {
  position: absolute; inset: 0; width: 100%; height: 100%;
  overflow: visible; opacity: 0; pointer-events: none; z-index: 2;
  transition: opacity .18s ease;
}
.social__spark circle { fill: none; filter: url(#electricFx); }
.social__spark .spark-glow { stroke: url(#sparkGrad); stroke-width: 3; opacity: .95; }
.social__spark .spark-core { stroke: #ffffff; stroke-width: 1; }
.social:hover .social__spark { opacity: 1; animation: sparkHue 4s linear infinite; }
@keyframes sparkHue { to { filter: hue-rotate(360deg); } }
.social__icon { position: relative; z-index: 1; width: 38%; height: auto; will-change: transform; transition: transform .6s cubic-bezier(.34,1.56,.64,1); }

/* statement text floats up line by line once uncovered */
.reveal-line { display: block; overflow: hidden; padding: 0.26em 0.03em; margin: -0.26em -0.03em; }
.reveal-line__inner { display: block; transform: translateY(120%); transition: transform .95s var(--ease); }
[data-reveal].is-in .reveal-line__inner { transform: translateY(0); }
[data-reveal].reveal-simple { opacity: 0; transform: translateY(26px); transition: opacity .7s ease, transform .85s var(--ease); }
[data-reveal].reveal-simple.is-in { opacity: 1; transform: none; }

@media (max-width: 900px) { .statement__text { max-width: 100%; } }
@media (max-width: 640px) {
  .footer__copy { font-size: 13px; }
  .statement__text { line-height: 1.05; }
  .contact { flex-direction: column; align-items: stretch; gap: clamp(22px, 6vw, 32px); }
  .contact__title { font-size: clamp(39px, 14.5vw, 73px); margin-top: 30px; }
  .contact__socials { width: 100%; justify-content: space-between; transform: none; }
  /* as on the home page: statement + «Свяжитесь» + circles centred, copyright pinned to the bottom */
  .site-footer__inner { justify-content: center; }
  .statement { padding-top: clamp(28px, 8vw, 56px); padding-bottom: clamp(30px, 8vw, 52px); }
  .footer__copy { position: absolute; left: var(--pad); right: var(--pad); bottom: clamp(18px, 5vw, 30px); margin: 0; }
  .social { width: clamp(60px, 17vw, 74px); height: clamp(60px, 17vw, 74px); }
}
/* touch: bigger header tap targets; phone landscape: lift the footer (same as the home page) */
@media (pointer: coarse) {
  .contacts__item { min-height: 44px; padding-block: 8px; display: inline-flex; align-items: center; }
  .contacts__item--icon, .contacts__item--phone { padding-inline: 8px; }
}
@media (orientation: landscape) and (max-height: 500px) {
  .site-footer__inner { padding-bottom: clamp(16px, 6vh, 34px); }
  .contact__socials { transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .social__spark { display: none; }
  .reveal-line__inner, [data-reveal].reveal-simple { transform: none; opacity: 1; transition: none; }
}

/* ===================== Thin custom scrollbar, as on the home page (desktop only, case.js) ===================== */
html.scrollbar-on { scrollbar-width: none; }                     /* Firefox */
html.scrollbar-on::-webkit-scrollbar { width: 0; height: 0; }    /* WebKit */
.scrollbar__thumb {
  position: fixed; top: 0; right: 7px; width: 4px; border-radius: 4px;
  background: #fff; opacity: .5;
  mix-blend-mode: difference;   /* visible on light and dark sections */
  z-index: 2500; pointer-events: none;
  transition: opacity .3s ease;
  will-change: transform, height;
}

/* ===================== Custom cursor, as on the home page (desktop only, case.js) ===================== */
.cursor-dot,
.cursor-ring {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 3000;
  pointer-events: none;
  border-radius: 50%;
  opacity: 0;
  mix-blend-mode: difference;   /* stays visible on light and dark backgrounds */
  will-change: transform;
}
.cursor-ready .cursor-dot { opacity: .65; }   /* brighter centre */
.cursor-ready .cursor-ring { opacity: .16; }  /* lighter halo */

.cursor-dot {
  width: 7px;
  height: 7px;
  margin: -3.5px 0 0 -3.5px;
  background: #fff;
}
.cursor-ring {
  width: 40px;
  height: 40px;
  margin: -20px 0 0 -20px;
  border: 1.5px solid #fff;
  transition: width .28s ease, height .28s ease, margin .28s ease,
              background-color .28s ease, opacity .3s ease;
}
/* grow the trailing ring over interactive elements */
.cursor-hover .cursor-ring {
  width: 64px;
  height: 64px;
  margin: -32px 0 0 -32px;
  background: rgba(255, 255, 255, .14);
}

/* hide the native cursor only when the custom one is active on a fine pointer */
@media (hover: hover) and (pointer: fine) {
  html.cursor-on,
  html.cursor-on * { cursor: none; }
}

/* ===================== «Живой скриншот» (case.js: .live-shot) =====================
   Fills its parent (e.g. .c-tablet__screen). The long screenshot moves only via transform. */
.live-shot {
  position: relative; width: 100%; height: 100%; overflow: hidden;
  background: var(--ls-bg, #fff);          /* site header colour while the picture loads: no white/black flash */
  touch-action: pan-x pan-y;               /* JS decides when a vertical swipe scrolls the picture */
}
.live-shot[data-manual] { cursor: ns-resize; }
.live-shot__track { position: absolute; left: 0; top: 0; width: 100%; will-change: transform; transform: translate3d(0, 0, 0); }
.live-shot__track img { display: block; width: 100%; height: auto; user-select: none; -webkit-user-drag: none; }
/* video inserts: hidden until the video really plays (the screenshot below shows the same frame) */
.live-shot__vid { position: absolute; overflow: hidden; visibility: hidden; pointer-events: none; }
.live-shot__vid.is-on { visibility: visible; }
.live-shot__track .live-shot__vid video,
.live-shot__track .live-shot__vid .live-shot__over { position: absolute; left: 0; top: 0; width: 100%; height: 100%; display: block; object-fit: fill; }

/* iPhone (Low Power Mode): never show the system play button over our muted background videos */
video::-webkit-media-controls-start-playback-button { display: none !important; -webkit-appearance: none; }
video::-webkit-media-controls { display: none !important; }
video::-webkit-media-controls-panel { display: none !important; }
