/* ============================================================
   Лейла Бабаева — портфолио. Desktop-first (mobile added later).
   ============================================================ */

:root {
  --bg: #000000;
  --white: #ffffff;               /* logo + active nav only */
  --text: rgba(255, 255, 255, 0.72);   /* main body text (muted, not pure white) */
  --heading: #e7e7e7;             /* project headings */
  --dim: rgba(255, 255, 255, 0.4);      /* inactive nav, secondary */
  --dim-2: rgba(255, 255, 255, 0.28);   /* faintest text */
  --radius: 20px;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --wrap: min(1520px, 90vw);
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: "Montserrat", system-ui, sans-serif;
  font-weight: 400;
  line-height: 1.5;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, video { display: block; max-width: 100%; }
/* videos behave like GIFs — no tapping / no player UI */
video { pointer-events: none; }
a { color: inherit; text-decoration: none; }
em { font-style: italic; }

/* Lenis */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }

/* ------------------------- Gradient mask ------------------------- */
/* Content dissolves into black at the top edge as it scrolls up. */
.top-mask {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 26vh;
  z-index: 60;
  pointer-events: none;
  transition: opacity 0.5s var(--ease);
  background: linear-gradient(
    to bottom,
    #000 0%,
    #000 34%,
    rgba(0, 0, 0, 0.82) 58%,
    rgba(0, 0, 0, 0.45) 80%,
    rgba(0, 0, 0, 0) 100%
  );
}
.top-mask.is-hidden { opacity: 0; }

/* White counterpart of the top mask — shown while the white P8 is under the header,
   so content rising up dissolves cleanly into white instead of clashing with the nav */
.top-mask-light {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 24vh;
  z-index: 60;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.5s var(--ease);
  background: linear-gradient(
    180deg,
    #ffffff 0%,
    #ffffff 46%,
    rgba(255, 255, 255, 0.9) 66%,
    rgba(255, 255, 255, 0) 100%
  );
}
.top-mask-light.is-visible { opacity: 1; }

/* ---------------------------- Header ----------------------------- */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 26px;
  padding: 28px 0 0;
  pointer-events: none;
}
.site-header > * { pointer-events: auto; }

.logo { display: block; }
.logo img { width: 62px; height: auto; transition: filter 0.5s var(--ease); }

/* When a light section (P8) is under the header, flip the header to dark ink */
.site-header.on-light .logo img { filter: invert(1); }
.site-header.on-light .nav__item { color: rgba(0, 0, 0, 0.4); }
.site-header.on-light .nav__item:hover { color: rgba(0, 0, 0, 0.7); }
.site-header.on-light .nav__item.is-active { color: #000; }
.site-header.on-light .nav__progress { background: rgba(0, 0, 0, 0.15); }
.site-header.on-light .nav__progress-fill { background: #000; }

.nav {
  display: flex;
  align-items: flex-start;
  gap: clamp(40px, 6vw, 88px);
}
.nav__item {
  position: relative;
  color: var(--dim);
  font-size: 20px;
  font-weight: 500;
  letter-spacing: 0.01em;
  padding-bottom: 14px;
  transition: color 0.5s var(--ease);
}
.nav__item:hover { color: rgba(255, 255, 255, 0.7); }
.nav__item.is-active { color: var(--white); }

/* progress line under "Проекты" */
.nav__progress {
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 190px;
  height: 2px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.14);
  opacity: 0;
  transition: opacity 0.6s var(--ease);
  overflow: hidden;
}
.nav__item.is-active .nav__progress { opacity: 1; }
.nav__progress-fill {
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 0%;
  background: var(--white);
  border-radius: 2px;
}

/* ---------------------------- Sections --------------------------- */
.section { position: relative; }
.wrap { width: var(--wrap); margin: 0 auto; }

/* Reveal animation base state (GSAP animates to visible) */
.reveal { will-change: transform, opacity; }

/* =============================== HOME ============================ */
.home-panel {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.home-hero .hero-bg {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}
.home-hero .hero-bg img {
  width: min(48vw, 760px);
  height: auto;
  transform: translateY(6%);
}

.hero-title {
  position: relative;
  z-index: 2;
  text-align: center;
  color: var(--heading);
  line-height: 1.32;
}
.hero-title { font-weight: 700; font-size: clamp(28px, 3vw, 44px); letter-spacing: 0.04em; text-wrap: balance; }
.hero-title em {
  font-weight: 500;
  font-style: italic;
  letter-spacing: 0.06em;
  color: var(--text);
}

.intro { text-align: center; }
.intro-strong {
  color: var(--heading);
  font-weight: 600;
  font-size: clamp(20px, 1.8vw, 30px);
  line-height: 1.6;
  text-wrap: balance;
}
.intro-soft {
  margin-top: 2.2em;
  color: var(--text);
  font-size: clamp(17px, 1.4vw, 24px);
  line-height: 1.7;
  text-wrap: balance;
}
.intro-soft em { font-style: italic; }

/* ============================= PROJECTS ========================= */
.project { position: relative; }

/* shared frame */
.frame { border-radius: var(--radius); overflow: hidden; }
.frame img, .frame video { width: 100%; height: 100%; object-fit: cover; }

/* shared side text (right column) */
.side-text { align-self: center; }
.side-text h2 {
  color: var(--heading);
  font-weight: 500;
  font-size: clamp(24px, 1.9vw, 32px);
  margin-bottom: 1.3em;
  letter-spacing: 0.01em;
}
.side-text p {
  color: var(--text);
  font-size: clamp(16px, 1.15vw, 20px);
  line-height: 1.55;
  max-width: 34ch;
  text-wrap: pretty;
}
.p6-text p, .p7-head p, .p8-head p { text-wrap: pretty; }
.side-text p + p { margin-top: 1.5em; }
.p7-head p + p,
.p8-head p + p { margin-top: 1.1em; }

/* Centered minimalist section labels between projects (small gray capitals) */
.project-label {
  text-align: center;
  color: var(--dim);
  font-size: 12.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  padding: 15vh 6vw 0;
  text-wrap: balance;
}

/* ---------------------------- Preloader ---------------------------- */
.preloader {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
}
.preloader__logo {
  width: 116px;
  height: auto;
  opacity: 0;
  will-change: transform, opacity;
}

/* ---------- P1 : three post cards ---------- */
.p1-row {
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: clamp(16px, 2vw, 38px);
  padding: 13vh 0 5vh;
}
.post {
  height: min(70vh, 760px);
  width: auto;
  aspect-ratio: 389 / 768;
  border-radius: var(--radius);
  overflow: hidden;
  background: #0a0a0a;
}
.post img, .post video { width: 100%; height: 100%; object-fit: cover; }

/* ---------- P2 : Telegram feed ---------- */
/* Background is fixed to the viewport: it fades in in place, holds while the
   feed scrolls over it, then fades out — it never moves with the content. */
.p2-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  opacity: 0;
  pointer-events: none;
  transition: opacity 1.3s ease;
}
.p2-bg.is-visible { opacity: 0.2; }
.p2-bg video { width: 100%; height: 100%; object-fit: cover; }

.p2-feed {
  position: relative;
  z-index: 1;
  width: 360px;
  margin: 0 auto;
  padding: 8vh 0 16vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 34px;
}
.tg-post { width: 100%; height: auto; }

.tg-circle {
  position: relative;
  width: 100%;
  height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.tg-circle__vid {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 208px;
  height: 208px;
  border-radius: 50%;
  object-fit: cover;
}
.tg-circle__icons {
  position: absolute;
  left: 50%;
  top: calc(50% + 30px); /* nudged further down, still over the video */
  transform: translate(-50%, -50%);
  width: 118%;
  height: auto;
  pointer-events: none;
}

/* ---------- P3 : 2x2 videos + text ---------- */
.p3-grid {
  width: min(1060px, 90vw);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr; /* videos take ~2/3, text the last third */
  gap: clamp(36px, 4vw, 72px);
  align-items: start;
  padding: 5vh 0 9vh;
}
.p3-media {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.vid-cell {
  position: relative;
  aspect-ratio: 9 / 16;
  border-radius: var(--radius);
  overflow: hidden;
  background: #0a0a0a;
}
.vid-cell video { width: 100%; height: 100%; object-fit: cover; }
.sound {
  position: absolute;
  right: 16px;
  bottom: 16px;
  width: 44px;
  height: 44px;
  border: none;
  background: transparent;
  cursor: pointer;
  padding: 0;
  transition: transform 0.3s var(--ease);
}
.sound img { width: 100%; height: 100%; }
.sound:hover { transform: scale(1.06); }
.p3-grid .side-text { position: sticky; top: 30vh; }

/* ---------- P4 : renders + text ---------- */
.p4-grid {
  width: min(1180px, 92vw);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: clamp(40px, 5vw, 90px);
  align-items: start;
  padding: 5vh 0 9vh;
}
.frame--wide { aspect-ratio: 2313 / 1299; }
.p4-sub {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  margin-top: 22px;
}
.p4-sub .frame { aspect-ratio: 1 / 1; }
.p4-grid .side-text { position: sticky; top: 36vh; }

/* ---------- P5 : boxes & manuals ---------- */
.p5-grid {
  width: min(1180px, 92vw);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: clamp(40px, 5vw, 90px);
  align-items: start;
  padding: 5vh 0 9vh;
}
.p5-media {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  align-items: start;
}
.p5-col { display: flex; flex-direction: column; gap: 22px; }
.p5-col:nth-child(2) { margin-top: 46px; }
.p5-grid .side-text { position: sticky; top: 34vh; }

/* ---------- P6 : board game collage ---------- */
.p6-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  opacity: 0;
  pointer-events: none;
  transition: opacity 1.4s ease;
}
.p6-bg.is-visible { opacity: 0.2; }
.p6-bg img { width: 100%; height: 100%; object-fit: cover; }
.p6-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  grid-auto-rows: auto;
  gap: 22px;
  padding: 6vh 0 14vh;
  align-items: start;
}
.p6-a { grid-column: 1 / 5;  grid-row: 1 / 4; }
.p6-b { grid-column: 5 / 8;  grid-row: 1 / 2; }
.p6-c { grid-column: 8 / 13; grid-row: 1 / 2; }
.p6-d { grid-column: 5 / 8;  grid-row: 2 / 4; }
.p6-text { grid-column: 8 / 12; grid-row: 2 / 3; align-self: center; padding-left: 8px; }
.p6-e { grid-column: 8 / 11; grid-row: 3 / 4; }
.p6-text h2 {
  color: var(--heading);
  font-weight: 500;
  font-size: clamp(22px, 1.7vw, 30px);
  margin-bottom: 1em;
}
.p6-text p { color: var(--text); font-size: clamp(15px, 1.1vw, 19px); max-width: 26ch; }

/* ---------- P7 : posters (Dare) ---------- */
.p7 { background: #000; }
.p7-head {
  width: min(1200px, 90vw);
  margin: 0 auto;
  padding: 4vh 0 5vh;
}
.p7-head h2 {
  color: var(--heading);
  font-weight: 500;
  font-size: clamp(22px, 1.6vw, 28px);
  margin-bottom: 0.9em;
}
.p7-head p { color: var(--text); font-size: clamp(15px, 1.2vw, 20px); max-width: 50ch; line-height: 1.55; }

/* 7_1 spans the full screen width */
.p7-full { position: relative; width: 100%; border-radius: 0; }
.p7-full img { width: 100%; height: auto; display: block; }
/* top: the image rises smoothly out of the black background */
.p7-full::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 26%;
  background: linear-gradient(180deg, #000 0%, rgba(0, 0, 0, 0) 100%);
  pointer-events: none;
}
/* bottom: the image melts into the navy of the gradient below (smooth handoff) */
.p7-full::after {
  content: "";
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 20%;
  background: linear-gradient(0deg, #0a032d 0%, rgba(10, 3, 45, 0) 100%);
  pointer-events: none;
}

/* Everything after 7_1 sits on the blue Dare gradient, starting from that same navy */
.p7-lower {
  background: linear-gradient(180deg, #0a032d 0%, #003978 79%, #000912 100%);
  padding: 9vh 0 14vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.p7-wide { width: min(1280px, 92vw); }
.p7-row {
  width: min(1280px, 92vw);
  margin-top: 2.5vh;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(20px, 3vw, 46px);
  align-items: start;
}
.p7-row .frame { aspect-ratio: 1 / 1; }
/* middle store mock-up sits lower than the two beside it */
.p7-mid { margin-top: clamp(40px, 8vh, 120px); }

/* ---------- P8 : Гипнопедия (white background, full-width videos) ---------- */
.p8 { position: relative; background: #ffffff; }
/* Smooth hand-off from the dark end of P7 into the white of P8 */
.p8::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 20vh;
  background: linear-gradient(180deg, #000912 0%, #0a0d18 22%, #ffffff 100%);
  z-index: 0;
  pointer-events: none;
}
.p8-inner {
  position: relative;
  z-index: 1;
  width: 100%;
  margin: 0 auto;
  padding: 18vh 0 12vh;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.p8-head {
  width: min(1200px, 90vw);
  margin: 0 auto 6vh;
}
.p8-head h2 {
  color: #141414;
  font-weight: 500;
  font-size: clamp(20px, 1.5vw, 26px);
  margin-bottom: 0.9em;
}
.p8-head p { color: rgba(0, 0, 0, 0.55); font-size: clamp(13px, 0.95vw, 16px); line-height: 1.5; }
.p8-inner > .frame { width: 100%; border-radius: 0; }
.p8-inner .frame video { width: 100%; height: auto; display: block; object-fit: cover; }
/* Гипнопедия hero — vertical 9:16 film, centered (other P8 videos are landscape) */
.p8-inner > .frame.p8-hero {
  width: min(420px, 42vw);
  aspect-ratio: 9 / 16;
  border-radius: var(--radius);
  margin: 0 auto 2vh;
}
.p8-inner > .frame.p8-hero video { height: 100%; }

/* ============================ CONTACTS ========================== */
#contacts {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}
.contacts { text-align: center; padding: 16vh 0 7vh; }
.contacts__name {
  color: var(--heading);
  font-weight: 500;
  font-size: clamp(21px, 1.5vw, 27px);
  letter-spacing: 0.01em;
}
.contacts__role {
  margin-top: 0.5em;
  color: var(--dim);
  font-style: italic;
  font-size: clamp(13px, 1vw, 16px);
}
.contacts__lines {
  margin-top: 2.6em;
  display: flex;
  flex-direction: column;
  gap: 0.45em;
  font-size: clamp(14px, 1.05vw, 18px);
  color: var(--text);
}
.contacts__lines a { transition: color 0.4s var(--ease); }
.contacts__lines a:hover { color: var(--white); }
.contacts__social {
  margin-top: 2em;
  display: flex;
  flex-direction: column;
  gap: 0.35em;
  font-size: clamp(14px, 1.05vw, 18px);
  color: var(--text);
}
.contacts__social a { transition: color 0.4s var(--ease); }
.contacts__social a:hover { color: var(--white); }
.contacts__footer { margin-top: 4.5em; }
.link-privacy {
  background: none;
  border: none;
  color: var(--dim);
  font-family: inherit;
  font-size: 13px;
  cursor: pointer;
  transition: color 0.4s var(--ease);
}
.link-privacy:hover { color: rgba(255, 255, 255, 0.7); }
.copyright { margin-top: 0.9em; color: var(--dim-2); font-size: 12.5px; }

/* ============================= MODAL ============================ */
.modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.5s var(--ease), visibility 0s linear 0.5s;
}
.modal.is-open { visibility: visible; opacity: 1; transition: opacity 0.5s var(--ease); }
.modal__overlay { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.7); backdrop-filter: blur(4px); }
.modal__dialog {
  position: relative;
  width: min(680px, 90vw);
  max-height: 84vh;
  background: #070707;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  overflow: hidden;
  transform: translateY(18px);
  transition: transform 0.6s var(--ease);
}
.modal.is-open .modal__dialog { transform: translateY(0); }
.modal__close {
  position: absolute;
  top: 16px; right: 20px;
  z-index: 3;
  width: 40px; height: 40px;
  background: none; border: none;
  color: var(--dim);
  font-size: 30px; line-height: 1;
  cursor: pointer;
  transition: color 0.3s var(--ease);
}
.modal__close:hover { color: var(--white); }
.modal__scroll {
  max-height: 84vh;
  overflow-y: auto;
  padding: 54px clamp(28px, 5vw, 64px) 44px;
}
.doc-logo { display: flex; justify-content: center; }
.doc-logo img { width: 46px; }
.doc-title {
  margin-top: 22px;
  text-align: center;
  color: var(--white);
  font-weight: 700;
  font-size: clamp(22px, 2.4vw, 32px);
}
.doc-divider { display: block; width: 210px; height: 1px; margin: 22px auto 30px; background: rgba(255, 255, 255, 0.18); }
.doc-lead { color: var(--text); font-size: 15px; line-height: 1.6; }
.doc-h {
  margin: 26px 0 8px;
  color: var(--heading);
  font-weight: 600;
  font-size: 16px;
}
.doc-h span { color: var(--white); margin-right: 8px; }
.modal__scroll p { color: var(--dim); font-size: 14.5px; line-height: 1.6; }
.doc-meta {
  margin-top: 34px;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  justify-content: space-between;
  color: var(--dim-2);
  font-size: 13px;
}

/* scrollbar inside modal */
.modal__scroll::-webkit-scrollbar { width: 8px; }
.modal__scroll::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.14); border-radius: 8px; }

/* ============================================================
   MOBILE  (≤ 768px) — single-column, touch-friendly layout
   ============================================================ */
@media (max-width: 768px) {
  :root { --radius: 16px; }

  /* Header */
  .site-header { gap: 15px; padding-top: 18px; }
  .logo img { width: 42px; }
  .nav { gap: 20px; }
  .nav__item { font-size: 15px; padding-bottom: 11px; }
  .nav__progress { width: 118px; }

  .top-mask { height: 22vh; }
  .top-mask-light { height: 22vh; }

  .project-label { padding: 12vh 7vw 0; font-size: 12px; }
  .preloader__logo { width: 92px; }

  /* Home */
  .home-hero .hero-bg img { width: 84vw; transform: translateY(4%); }
  .hero-title { font-size: 26px; letter-spacing: 0.03em; padding: 0 9vw; line-height: 1.4; }
  .hero-title em { font-size: 0.6em; }
  .intro { padding: 0 10vw; }
  .intro-strong { font-size: 19px; }
  .intro-soft { font-size: 15px; margin-top: 1.9em; }

  /* P1 — stack the three posts */
  .p1-row { flex-direction: column; min-height: auto; padding: 7vh 0 9vh; gap: 20px; }
  .post { width: min(76vw, 340px); height: auto; }

  /* P2 — Telegram feed */
  .p2-feed { width: min(320px, 86vw); padding: 7vh 0 12vh; gap: 26px; }
  .tg-circle { height: 250px; }
  .tg-circle__vid { width: 168px; height: 168px; }
  .tg-circle__icons { top: calc(50% + 22px); width: 124%; }

  /* P3 / P4 / P5 — one column, description first, media below (no sticky) */
  .p3-grid, .p4-grid, .p5-grid {
    width: 86vw;
    display: flex;
    flex-direction: column;
    gap: 24px;
    padding: 5vh 0 8vh;
  }
  .p3-grid .side-text,
  .p4-grid .side-text,
  .p5-grid .side-text { position: static; top: auto; order: -1; }
  .side-text p { max-width: none; }
  .side-text h2 { margin-bottom: 0.75em; }
  .p3-media { gap: 10px; }
  .p4-sub { gap: 10px; margin-top: 10px; }
  .p5-media { gap: 10px; }
  .p5-col { gap: 10px; }
  .p5-col:nth-child(2) { margin-top: 0; }

  /* P6 — two photos per row (tap to view full), text spans the top */
  .p6-grid {
    width: 86vw;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    padding: 6vh 0 12vh;
    align-items: start;
  }
  .p6-grid .frame { grid-column: auto; grid-row: auto; aspect-ratio: 1; }
  .p6-grid .frame img { height: 100%; object-fit: cover; }
  .p6-text { order: -1; grid-column: 1 / -1; padding-left: 0; margin-bottom: 4px; }
  .p6-text p { max-width: none; }

  /* P7 — full-width lead image, everything else stacked */
  .p7-head { width: 86vw; padding: 4vh 0 4vh; }
  .p7-full::before { height: 20%; }
  .p7-full::after { height: 16%; }
  .p7-lower { padding: 5vh 0 10vh; }
  .p7-wide { width: 86vw; }
  .p7-row { width: 86vw; grid-template-columns: 1fr; gap: 16px; margin-top: 4vh; }
  .p7-mid { margin-top: 0; }

  /* P8 — hero + full-width films */
  .p8-head { width: 86vw; }
  .p8-inner > .frame.p8-hero { width: min(78vw, 320px); margin: 0 auto 12px; }

  /* Contacts */
  .contacts { padding: 15vh 0 7vh; }
  .contacts__name { font-size: 21px; }
  .contacts__role { font-size: 13px; }
  .contacts__lines { margin-top: 2.2em; font-size: 15px; }
  .contacts__social { margin-top: 1.8em; font-size: 15px; }
  .contacts__footer { margin-top: 3.6em; }

  /* Privacy modal */
  .modal__dialog { width: 92vw; max-height: 88vh; }
  .modal__scroll { padding: 44px 22px 34px; max-height: 88vh; }
  .doc-title { font-size: 22px; }
  .doc-divider { width: 160px; }
}

/* ====================== Fullscreen image viewer ====================== */
.p4-media img,
.p6-grid .frame img { cursor: zoom-in; }
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 250;
  background: rgba(0, 0, 0, 0.94);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4vmin;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s var(--ease), visibility 0s linear 0.35s;
}
.lightbox.is-open { opacity: 1; visibility: visible; transition: opacity 0.35s var(--ease); }
.lightbox__img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 8px;
  transform: scale(0.97);
  transition: transform 0.4s var(--ease);
}
.lightbox.is-open .lightbox__img { transform: scale(1); }
.lightbox__close {
  position: absolute;
  top: 18px;
  right: 22px;
  width: 44px;
  height: 44px;
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.75);
  font-size: 34px;
  line-height: 1;
  cursor: pointer;
  transition: color 0.3s var(--ease);
}
.lightbox__close:hover { color: #fff; }

/* --------------------- reduced motion --------------------- */
@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; }
}
