/* =========================================================
   yunusovael — portfolio
   Цвета и шрифты — по UI Kit
   ========================================================= */
:root {
  --bg: #FEFCFC;
  --ink: #2A2A2A;
  --ink2: #4B4C50;
  --mute: #85878C;
  --white: #FFFFFF;
  --ghost: #E9E7E8;
  --font: "Helvetica Neue", "HelveticaNeue", Helvetica, Arial, sans-serif;
  --metal: url(../assets/metal.webp);
  --r: 10px;

  --pad: clamp(16px, 2.78vw, 40px);
  --section: clamp(96px, 14vw, 220px);
  --ghost-size: clamp(52px, 11.1vw, 210px);
  --ease: cubic-bezier(.2, .8, .2, 1);
  --ease-io: cubic-bezier(.7, 0, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; overflow-x: clip; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
ul { list-style: none; }
::selection { background: var(--ink); color: var(--white); }

main, .footer, .nav { position: relative; z-index: 1; }
.nav { position: fixed; }

/* =========================================================
   Фоновые тени
   ========================================================= */
.bg-shadows { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.bg-shadows i {
  position: absolute; left: 0; top: 0;
  width: 62vmax; height: 62vmax; margin: -31vmax 0 0 -31vmax; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(176, 182, 192, .34), rgba(186, 191, 200, .18) 45%, rgba(200, 204, 211, .08) 72%, rgba(200, 204, 211, 0));
  will-change: transform;
}
.bg-shadows i:nth-child(2n) { width: 48vmax; height: 48vmax; margin: -24vmax 0 0 -24vmax; }
.bg-shadows i:nth-child(3) { background: radial-gradient(closest-side, rgba(150, 156, 168, .34), rgba(170, 176, 186, .16) 50%, rgba(170, 176, 186, 0)); }

/* =========================================================
   Металл
   ========================================================= */
@keyframes metalShift { 0% { background-position: 0% 30%; } 100% { background-position: 100% 70%; } }
.metal-text, .metal .w, .ghost .c, .stat__num .inf {
  background-image: var(--metal); background-size: 220% 220%; background-position: 20% 40%;
  -webkit-background-clip: text; background-clip: text;
  color: transparent; -webkit-text-fill-color: transparent;
}
.metal-text, .metal .w { animation: metalShift 9s ease-in-out infinite alternate; }
.metal-mask {
  display: block; background-image: var(--metal); background-size: 220% 220%;
  -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
  -webkit-mask-size: 100% 100%; mask-size: 100% 100%;
  animation: metalShift 9s ease-in-out infinite alternate;
}
/* Блик-переливание (кнопки, плашки, логотип) */
.sheen { position: relative; overflow: hidden; }
.sheen::after, .glass::after {
  content: ""; position: absolute; inset: -2px; z-index: 0; pointer-events: none;
  background: linear-gradient(110deg, rgba(255,255,255,0) 28%, rgba(255,255,255,.18) 40%, rgba(255,255,255,.75) 49%, rgba(255,255,255,.2) 57%, rgba(255,255,255,0) 70%);
  transform: translateX(-115%);
}
.sheen:hover::after, .sheen.is-shine::after, .glass.is-shine::after {
  transform: translateX(115%); transition: transform 1.2s cubic-bezier(.3, .6, .2, 1);
}
.metal-bg { background: var(--metal) center / 220% 220%; animation: metalShift 9s ease-in-out infinite alternate; }

/* line reveal */
.line { display: block; overflow: hidden; padding-bottom: .08em; margin-bottom: -.08em; }
.line__in { display: block; will-change: transform; }

/* split helpers */
.w { display: inline-block; white-space: nowrap; }
.c { display: inline-block; will-change: transform; }

/* =========================================================
   Cursor
   ========================================================= */
.cursor {
  position: fixed; left: 0; top: 0; z-index: 200;
  width: 12px; height: 12px; margin: -6px 0 0 -6px;
  border-radius: 50%; background: #fff;
  mix-blend-mode: difference; pointer-events: none;
  display: grid; place-items: center;
  opacity: 0; transition: width .35s var(--ease), height .35s var(--ease), margin .35s var(--ease), opacity .3s;
}
.cursor__label {
  font-size: 11px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase;
  color: #000; opacity: 0; transition: opacity .2s; white-space: nowrap;
}
.cursor.is-big { width: 64px; height: 64px; margin: -32px 0 0 -32px; }
.cursor.is-label { width: 78px; height: 78px; margin: -39px 0 0 -39px; }
.cursor.is-label .cursor__label { opacity: 1; }
@media (hover: none), (pointer: coarse) { .cursor { display: none; } }

/* =========================================================
   Nav
   ========================================================= */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 60;
  display: flex; justify-content: flex-end; gap: clamp(18px, 2.2vw, 32px);
  padding: clamp(18px, 2.4vw, 32px) var(--pad);
  mix-blend-mode: difference; color: #fff; pointer-events: none;
}
.nav__link {
  pointer-events: auto;
  font-weight: 400; font-size: clamp(13px, 1.1vw, 16px);
  text-transform: uppercase; letter-spacing: .01em;
}

/* Letter roll (letter swap) */
.roll { display: inline-flex; overflow: hidden; line-height: 1.25; height: 1.25em; }
.roll .c { position: relative; transition: transform .55s var(--ease-io); transition-delay: calc(var(--i) * 22ms); }
.roll .c::after { content: attr(data-c); position: absolute; left: 0; top: 100%; }
.roll:hover .c { transform: translateY(-100%); }

/* =========================================================
   Ghost headings
   ========================================================= */
.ghost {
  font-weight: 500; font-size: var(--ghost-size); line-height: .92;
  text-transform: uppercase; letter-spacing: -.02em;
  white-space: nowrap; user-select: none; pointer-events: none;
  perspective: 900px; position: relative; z-index: 0; opacity: .3;
}
.ghost .c { transform-origin: 50% 100%; padding: 0 .01em; }
.ghost--center { text-align: center; }
.ghost--wrap { white-space: normal; }

/* =========================================================
   1. HERO
   ========================================================= */
.hero { position: relative; height: 100vh; height: 100svh; min-height: 560px; overflow: hidden; }
.hero__brand {
  position: absolute; left: 50%; top: 40%; transform: translate(-50%, -50%);
  display: flex; flex-direction: column; align-items: center; gap: clamp(10px, 1.3vw, 20px);
  z-index: 1; width: 100%;
}
.logo { display: flex; align-items: center; gap: clamp(10px, 2.4vw, 36px); width: clamp(250px, 38vw, 660px); }
.logo__mark { width: 10.4%; flex: none; aspect-ratio: 1; }
.logo__word-wrap { flex: 1; overflow: hidden; padding-bottom: 2%; }
.logo__word { width: 100%; aspect-ratio: 281 / 58; }
.hero__roles { font-size: clamp(12px, 1.1vw, 16px); color: var(--mute); text-align: center; padding: 0 var(--pad); }

.hero__physics { position: absolute; inset: 0; z-index: 2; touch-action: pan-y; }
.phys {
  position: absolute; left: 0; top: 0; opacity: 0;
  will-change: transform; user-select: none; -webkit-user-select: none;
  cursor: grab;
}
.phys:active { cursor: grabbing; }
.phys--img {
  width: var(--s, 136px); height: var(--s, 136px);
  border-radius: var(--r); overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .10);
  background: #ddd;
}
.phys--img img { width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.phys--pill {
  height: calc(var(--s, 136px) * .38);
  padding: 0 calc(var(--s, 136px) * .2);
  border-radius: 999px; background: var(--c);
  display: flex; align-items: center; white-space: nowrap;
  color: var(--white); font-weight: 400; font-size: calc(var(--s, 136px) * .18); letter-spacing: -.01em;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .10);
}
/* fallback без физики */
.hero__physics.is-static {
  display: flex; flex-wrap: wrap; justify-content: center; align-items: center; align-content: flex-end;
  gap: 10px; padding: 0 var(--pad) 7vh;
}
.hero__physics.is-static .phys { position: relative; opacity: 1; transform: rotate(var(--r, 0deg)); }

/* =========================================================
   2. Manifesto
   ========================================================= */
.manifesto {
  min-height: 100vh; min-height: 100svh; padding: 80px var(--pad);
  display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center;
}
.manifesto__title {
  font-weight: 500; font-size: clamp(21px, 2.8vw, 44px); line-height: 1.22; letter-spacing: -.02em;
  text-transform: uppercase; max-width: 19em; margin: 0 auto; perspective: 700px;
}
.manifesto__text {
  font-size: clamp(14px, 1.12vw, 17px); line-height: 1.45; max-width: 36em;
  margin: clamp(18px, 2.2vw, 32px) auto 0;
}

/* =========================================================
   3. Services
   ========================================================= */
.services { position: relative; padding: var(--section) var(--pad) 0; text-align: center; }
.services__list {
  position: relative; z-index: 1;
  margin-top: calc(var(--ghost-size) * -.42);
  perspective: 900px;
}
.service__name {
  font-weight: 500; font-size: clamp(25px, 3.9vw, 66px); line-height: 1.36; letter-spacing: -.02em;
  text-transform: uppercase; color: var(--ink); cursor: default;
  transition: color .45s var(--ease), opacity .45s;
}
.services__list.is-hovering .service__name { color: var(--mute); }
.services__list.is-hovering .service.is-active .service__name { color: var(--ink); }

/* glass card */
.glass {
  position: relative; isolation: isolate; overflow: hidden;
  background: rgba(0, 0, 0, .05);
  -webkit-backdrop-filter: blur(30px);
  backdrop-filter: blur(30px);
  border: 1px solid rgba(255, 255, 255, .6);
  box-shadow: 0 24px 60px rgba(0, 0, 0, .12), inset 0 1px 0 rgba(255, 255, 255, .8);
}
/* металлическая плашка — та же текстура, что и у кнопок */
.glass::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(160deg, rgba(255,255,255,.22), rgba(255,255,255,.06)), var(--metal) center / 220% 220%;
  animation: metalShift 9s ease-in-out infinite alternate;
}
.glass > * { position: relative; z-index: 1; }
.card { border-radius: 12px; padding: clamp(18px, 1.5vw, 24px); text-align: left; color: var(--ink); }
.card__title { font-size: clamp(17px, 1.3vw, 20px); font-weight: 500; text-transform: uppercase; }
.card__desc { font-size: 13px; line-height: 1.4; margin-top: 12px; max-width: 30em; }
.card__label { font-size: 11.5px; font-weight: 500; text-transform: uppercase; margin-top: 16px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.chips span { background: var(--white); border-radius: 999px; padding: 7px 12px; font-size: 11.5px; white-space: nowrap; }
.card__foot { display: flex; justify-content: space-between; align-items: flex-end; margin-top: 6px; gap: 12px; }
.dots { display: flex; gap: 4px; margin-top: 6px; }
.dots i { width: 10px; height: 10px; border-radius: 50%; border: 1.3px solid var(--ink); }
.dots i.on { background: var(--ink); }
.price { font-size: clamp(16px, 1.3vw, 20px); font-weight: 500; white-space: nowrap; }

.svc-float {
  position: fixed; left: 0; top: 0; z-index: 45; pointer-events: none;
  width: clamp(320px, 26vw, 420px);
  opacity: 0; visibility: hidden;
}
.svc-float .card { transform-origin: 0 50%; }

/* инлайн-плашка — для тач-устройств */
.service__card { display: none; }
@media (hover: none), (pointer: coarse) {
  .service__name { cursor: pointer; }
  .service__card { display: block; height: 0; overflow: hidden; max-width: 520px; margin: 0 auto; }
  .service__card .card { margin: 10px 0 18px; }
  .svc-float { display: none; }
}

/* =========================================================
   4. Portfolio — accordion stack
   ========================================================= */
.portfolio { position: relative; padding: calc(var(--section) * .6) var(--pad) 0; }
.portfolio .ghost { margin-bottom: calc(var(--ghost-size) * -.22); }
.cases {
  --ch: 58vh; --ch: 58svh; --ratio: calc(1360 / 770); --fade: 80px;
  position: relative; z-index: 1; container-type: inline-size;
  width: min(100%, 64vw, calc(var(--ch) * var(--ratio))); margin: 0 auto;
  height: 900px; overflow: hidden;
  /* мягко растворяем карточки у верхнего и нижнего края ленты */
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 var(--fade), #000 calc(100% - var(--fade) * .8), transparent 100%);
  mask-image: linear-gradient(to bottom, transparent 0, #000 var(--fade), #000 calc(100% - var(--fade) * .8), transparent 100%);
}
.case { position: absolute; left: 0; right: 0; top: 0; will-change: transform, opacity; }
.case__card { will-change: transform; }
.case__card {
  position: relative;
  aspect-ratio: 1360 / 770;
  border-radius: var(--r); overflow: hidden;
  transform-origin: 50% 0;
  background: #111;
  box-shadow: 0 -14px 40px rgba(0, 0, 0, .22);
  cursor: pointer;
  backface-visibility: hidden;
}
.case__card img { width: 100%; height: 100%; object-fit: cover; object-position: 70% 50%; transition: transform 1.2s var(--ease); }
.case.is-open .case__card img { transform: scale(1.03); }
.case__shade {
  position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(90deg, rgba(0,0,0,.55) 0%, rgba(0,0,0,.15) 40%, rgba(0,0,0,0) 60%),
    linear-gradient(180deg, rgba(0,0,0,.35) 0%, rgba(0,0,0,0) 30%),
    linear-gradient(0deg, rgba(0,0,0,.35) 0%, rgba(0,0,0,0) 25%);
}
.case__info { position: absolute; left: clamp(14px, 4.4cqw, 44px); top: clamp(10px, 2.6cqw, 28px); color: var(--white); pointer-events: none; }
.case__title { font-size: clamp(22px, 4.6cqw, 48px); font-weight: 500; line-height: 1.05; letter-spacing: -.03em; }
.case__sub, .case__year { font-size: clamp(12px, 1.5cqw, 15px); margin-top: .45em; max-width: 18em; line-height: 1.25; }
.case__more {
  position: absolute; left: clamp(14px, 4.4cqw, 44px); bottom: clamp(14px, 3.6cqw, 34px);
  background: var(--metal) center / 220% 220%; color: var(--white); border-radius: 999px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, .25); box-shadow: inset 0 1px 0 rgba(255,255,255,.5), 0 6px 18px rgba(0,0,0,.25);
  padding: clamp(9px, 1.6cqw, 15px) clamp(16px, 3cqw, 26px);
  font-size: clamp(13px, 1.9cqw, 17px); font-weight: 500;
  overflow: hidden;
  opacity: 0; transform: translateY(24px); pointer-events: none;
  transition: opacity .5s var(--ease), transform .6s var(--ease);
  animation: metalShift 9s ease-in-out infinite alternate;
}
.case.is-open .case__more { transform: none; pointer-events: auto; }
.case__more { transition: transform .8s var(--ease); }


/* =========================================================
   5. Stats
   ========================================================= */
.stats {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px;
  padding: var(--section) var(--pad) 0; text-align: center;
}
.stat__num {
  font-weight: 500; font-size: clamp(56px, 8.3vw, 140px); line-height: 1; letter-spacing: -.04em;
  font-variant-numeric: tabular-nums; white-space: nowrap; padding-bottom: .04em;
}
.stat__num { position: relative; display: inline-flex; justify-content: center; align-items: flex-start; }
.odo { display: inline-flex; }
.odo__col { display: inline-block; height: 1em; overflow: hidden; }
.odo__strip { display: flex; flex-direction: column; will-change: transform; }
.odo__d, .odo__suf {
  display: block; height: 1em; line-height: 1;
  background-image: var(--metal); background-size: 220% 220%; background-position: 30% 40%;
  -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent;
}
.odo__suf { display: inline-block; }
.stat__num .inf { position: absolute; left: 0; right: 0; top: 0; text-align: center; line-height: 1; transform-origin: 50% 55%; }
.stat__label {
  font-weight: 500; font-size: clamp(13px, 1.5vw, 22px); line-height: 1.2; letter-spacing: -.01em;
  text-transform: uppercase; margin-top: clamp(4px, .6vw, 10px);
}

/* =========================================================
   6. About
   ========================================================= */
.about { position: relative; padding: var(--section) var(--pad) 0; }
.about .ghost { line-height: .95; }
.about__person {
  position: relative; z-index: 1; text-align: center;
  margin-top: calc(var(--ghost-size) * -1.3);
  display: flex; flex-direction: column; align-items: center;
}
.sticker {
  --p: 0px;
  position: relative; width: clamp(200px, 21.4vw, 340px); aspect-ratio: 1;
  cursor: grab; touch-action: none; user-select: none;
  filter: drop-shadow(0 18px 30px rgba(0, 0, 0, .18));
}
.sticker:active { cursor: grabbing; }
.sticker__inner {
  position: absolute; inset: 0; overflow: hidden; border-radius: var(--r);
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - var(--p)), calc(100% - var(--p)) 100%, 0 100%);
}
.sticker__inner img { width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.sticker__shine {
  position: absolute; inset: -20%; pointer-events: none;
  background: linear-gradient(115deg, transparent 35%, rgba(255,255,255,.55) 50%, transparent 65%);
  transform: translateX(-120%);
}
.sticker__peel {
  position: absolute; right: 0; bottom: 0; width: var(--p); height: var(--p);
  background: linear-gradient(135deg, #f4f3f3 0%, #ffffff 45%, #d9d7d8 50%, rgba(0,0,0,0) 50.5%);
  border-radius: 0 0 0 0;
  filter: drop-shadow(-2px -2px 3px rgba(0, 0, 0, .18));
  pointer-events: none;
}
.about__name { font-weight: 500; font-size: clamp(18px, 1.66vw, 24px); text-transform: uppercase; margin-top: clamp(20px, 2.4vw, 34px); }
.about__bio { font-size: clamp(14px, 1.12vw, 17px); line-height: 1.45; max-width: 37em; margin-top: 16px; }

/* =========================================================
   7. Lab
   ========================================================= */
.lab { padding: var(--section) 0 0; text-align: center; overflow: hidden; }
.lab__head { padding: 0 var(--pad); }
.lab__title { font-weight: 500; font-size: clamp(24px, 2.8vw, 44px); text-transform: uppercase; letter-spacing: -.02em; }
.lab__text { font-size: clamp(14px, 1.12vw, 17px); line-height: 1.4; max-width: 34em; margin: 14px auto 0; }
.lab__rows {
  display: flex; flex-direction: column; gap: clamp(10px, 1.4vw, 20px);
  margin-top: clamp(36px, 4.4vw, 64px); padding: 30px 0;
}
.lab__row { position: relative; }
.lab__row:hover { z-index: 3; }
.lab__track { display: flex; gap: clamp(10px, 1.4vw, 20px); width: max-content; will-change: transform; }
.lab__item { flex: none; width: clamp(78px, 6.6vw, 112px); aspect-ratio: 1; position: relative; }
.lab__item:hover { z-index: 3; }
.lab__pic {
  width: 100%; height: 100%; border-radius: var(--r); overflow: hidden;
  transition: transform .55s var(--ease), box-shadow .55s var(--ease);
  background: #e7e5e6;
}
.lab__pic img { width: 100%; height: 100%; object-fit: cover; }
.lab__item:hover .lab__pic { transform: scale(1.6); box-shadow: 0 22px 44px rgba(0, 0, 0, .28); }

/* =========================================================
   8. FAQ
   ========================================================= */
.faq { padding: var(--section) var(--pad) 0; }
.faq .ghost { margin-bottom: calc(var(--ghost-size) * -.28); }
.faq__grid { position: relative; z-index: 1; display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: start; }
.faq__item { position: relative; overflow: hidden; background: var(--ink); color: var(--white); isolation: isolate; border-radius: var(--r); }
.faq__q {
  position: relative; z-index: 1; width: 100%;
  min-height: clamp(72px, 6.8vw, 98px);
  color: var(--white); text-align: left;
  padding: clamp(16px, 1.8vw, 24px) clamp(18px, 2.1vw, 30px);
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  font-size: clamp(15px, 1.66vw, 24px); font-weight: 500; line-height: 1.2; text-transform: uppercase; letter-spacing: -.01em;
}
.faq__blob {
  position: absolute; z-index: 0; left: 0; top: 0; width: 10px; height: 10px; border-radius: 50%;
  background: var(--ink2); pointer-events: none; transform: translate(-50%, -50%) scale(0);
}
.faq__txt { position: relative; z-index: 1; }
.faq__icon { position: relative; z-index: 1; flex: none; width: 18px; height: 18px; transition: transform .5s var(--ease); }
.faq__icon::before, .faq__icon::after { content: ""; position: absolute; left: 0; top: 50%; width: 100%; height: 2px; margin-top: -1px; background: currentColor; }
.faq__icon::after { transform: rotate(90deg); transition: transform .5s var(--ease); }
.faq__item.is-open .faq__icon { transform: rotate(180deg); }
.faq__item.is-open .faq__icon::after { transform: rotate(0deg); }
.faq__a { position: relative; z-index: 1; height: 0; overflow: hidden; }
.faq__a p {
  padding: 0 clamp(18px, 2.1vw, 30px) clamp(18px, 2vw, 26px);
  font-size: clamp(14px, 1.12vw, 16px); line-height: 1.6; max-width: 40em;
  color: rgba(255, 255, 255, .78);
}

/* =========================================================
   9. CTA
   ========================================================= */
.cta { padding: var(--section) var(--pad) 0; text-align: center; }
.cta__title {
  position: relative; z-index: 1;
  font-weight: 500; font-size: clamp(22px, 2.8vw, 44px); line-height: 1.22; text-transform: uppercase; letter-spacing: -.02em;
  margin-top: calc(var(--ghost-size) * -.62); perspective: 700px;
}
.btn {
  position: relative; overflow: hidden; display: inline-flex; align-items: center; justify-content: center;
  margin-top: clamp(24px, 2.2vw, 34px);
  background: var(--metal) center / 220% 220%; color: var(--white); border-radius: 999px;
  padding: clamp(15px, 1.3vw, 20px) clamp(24px, 2.1vw, 32px);
  font-size: clamp(15px, 1.4vw, 20px); font-weight: 400;
  text-shadow: 0 1px 2px rgba(0, 0, 0, .2);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .55), 0 10px 30px rgba(0, 0, 0, .12);
  animation: metalShift 9s ease-in-out infinite alternate;
  will-change: transform;
}
.btn__fill { position: absolute; left: 0; top: 0; width: 10px; height: 10px; border-radius: 50%; background: rgba(42, 42, 42, .55); transform: translate(-50%, -50%) scale(0); pointer-events: none; }
.btn__label { position: relative; z-index: 1; display: inline-block; }
.cta__action { display: flex; justify-content: center; }

/* =========================================================
   Footer
   ========================================================= */
.footer { padding: var(--section) var(--pad) 22px; text-align: center; }
.footer__brand { display: flex; flex-direction: column; align-items: center; }
.logo--footer { width: clamp(220px, 23.4vw, 340px); gap: clamp(10px, 1.4vw, 20px); }
.logo--footer .logo__word { flex: 1; min-width: 0; }
.logo--footer .logo__mark { width: 10.4%; transition: rotate 1s var(--ease); }
.logo--footer:hover .logo__mark { rotate: 180deg; }
.footer__name { font-weight: 500; font-size: clamp(17px, 1.4vw, 20px); margin-top: 30px; }
.footer__roles { font-size: clamp(14px, 1.12vw, 16px); line-height: 1.35; margin-top: 22px; }
.socials { display: flex; gap: 18px; margin-top: 26px; }
.socials a { width: 30px; height: 30px; color: var(--ink); transition: transform .4s var(--ease), color .3s; }
.socials a:hover { transform: translateY(-4px) rotate(-8deg); color: var(--ink2); }
.socials svg { width: 100%; height: 100%; display: block; }
.footer__bottom {
  display: flex; justify-content: space-between; gap: 16px;
  margin-top: clamp(120px, 17vw, 240px); padding-top: 14px;
  border-top: 1px solid var(--ink); font-size: clamp(13px, 1.12vw, 16px);
}

/* =========================================================
   Modal
   ========================================================= */
.modal { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: clamp(10px, 3vw, 40px); visibility: hidden; }
.modal.is-open { visibility: visible; }
.modal__backdrop {
  position: absolute; inset: 0; background: rgba(20, 20, 22, .45);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); opacity: 0;
}
.modal__panel {
  position: relative; width: min(1160px, 100%); max-height: 100%;
  overflow: auto; overscroll-behavior: contain;
  background: var(--white); border-radius: var(--r);
  padding: clamp(22px, 2.6vw, 32px) clamp(18px, 2.6vw, 30px) clamp(26px, 3vw, 36px);
  clip-path: inset(100% 0 0 0 round 10px);
}
.modal__close { position: sticky; top: 0; float: right; width: 44px; height: 44px; border-radius: 50%; background: var(--ink); z-index: 3; transition: transform .5s var(--ease); }
.modal__close:hover { transform: rotate(90deg); }
.modal__close span { position: absolute; left: 13px; right: 13px; top: 50%; height: 2px; margin-top: -1px; background: #fff; transform: rotate(45deg); }
.modal__close span + span { transform: rotate(-45deg); }
.modal__meta { display: flex; gap: clamp(40px, 8vw, 110px); font-size: clamp(13px, 1.12vw, 15px); color: var(--ink); }
.modal__title { letter-spacing: -.03em; font-weight: 500; font-size: clamp(34px, 4.2vw, 56px); line-height: 1.05; margin-top: 10px; }
.modal__gallery {
  display: grid; grid-template-columns: 1.445fr 1fr; grid-template-rows: 1fr 1fr;
  gap: clamp(10px, 1.5vw, 17px); margin-top: clamp(22px, 2.6vw, 32px);
  aspect-ratio: 1095 / 507;
}
.modal__pic { margin: 0; overflow: hidden; border-radius: var(--r); background: #eceaea; }
.modal__pic:first-child { grid-row: span 2; }
.modal__pic img { width: 100%; height: 100%; object-fit: cover; display: block; }
.modal__desc { margin-top: clamp(24px, 2.6vw, 34px); font-size: clamp(13px, 1.05vw, 14.5px); line-height: 1.35; max-width: 76em; }
.modal__desc p + p { margin-top: 1.9em; }
.modal__done { margin-top: clamp(24px, 2.6vw, 34px); }
.modal__done-title { font-size: clamp(15px, 1.2vw, 17px); font-weight: 500; }
.modal__list { list-style: disc; padding-left: 24px; margin-top: 12px; font-size: clamp(14px, 1.2vw, 16px); font-weight: 500; line-height: 1.3; }
.modal__action:not(:empty) { margin-top: clamp(24px, 2.6vw, 34px); }
.modal__btn { margin-top: 0; }

/* =========================================================
   Полноэкранные «слайды» (desktop): блок замирает, объекты сменяются
   ========================================================= */
@media (min-width: 761px) and (min-height: 560px) {
  .slide {
    min-height: 100vh; min-height: 100svh;
    display: flex; flex-direction: column; justify-content: center;
    padding-top: 90px; padding-bottom: 60px;
  }
  .stats.slide { display: grid; align-content: center; }
  .lab.slide { padding-left: 0; padding-right: 0; }
}

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 1024px) {
  .card__desc { font-size: 13px; }
}
@media (max-width: 760px) {
  .hero__brand { top: 30%; }
  .hero .logo { width: min(78vw, 360px); }
  .stats { grid-template-columns: 1fr 1fr; row-gap: 56px; }
  .cases { width: 100%; }
  .faq__grid { grid-template-columns: 1fr; gap: 12px; }
  .cases { --ratio: calc(4 / 5); }
  .case__card { aspect-ratio: 4 / 5; }
  .case__card img { object-position: 62% 50%; }
  .case__shade {
    background:
      linear-gradient(180deg, rgba(0,0,0,.6) 0%, rgba(0,0,0,0) 35%),
      linear-gradient(0deg, rgba(0,0,0,.45) 0%, rgba(0,0,0,0) 30%);
  }
  .about__person { margin-top: calc(var(--ghost-size) * -.9); }
  .ghost--wrap { font-size: clamp(44px, 14vw, 120px); }
  .footer__bottom { font-size: 12px; }
  .modal__gallery { grid-template-columns: 1fr 1fr; grid-template-rows: auto auto; aspect-ratio: auto; }
  .modal__pic:first-child { grid-column: span 2; grid-row: auto; aspect-ratio: 1911 / 1521; }
  .modal__pic { aspect-ratio: 1323 / 738; }
}
@media (max-width: 420px) {
  :root { --ghost-size: 15vw; }
  .service__name { font-size: 7vw; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
