/* Prevent layout shift when scrollbar appears/disappears */
html { overflow-y: scroll; }

@supports (scrollbar-gutter: stable) {
  html { overflow-y: auto; scrollbar-gutter: stable; }
}

/* =============================================================================================================================
   RESET / BASE
========================= */
*{ box-sizing:border-box; }
html,body{ height:100%; }
body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, "Noto Sans", "Apple Color Emoji","Segoe UI Emoji";
  background:#050505;
  color:rgba(255,255,255,.92);
  line-height:1.5;
  overflow-x:hidden;
}

a{ color:inherit; text-decoration:none; }
img{ max-width:100%; display:block; }
button{ font:inherit; color:inherit; }

:root{
  --header-h: 76px;
  --shadow: 0 18px 70px rgba(0,0,0,.55);
  --mx: 50vw; /* ambient pointer x */
  --my: 45vh; /* ambient pointer y */
}

.container{
  width:min(1100px, 92vw);
  margin:0 auto;
}

.section{
  padding: 92px 0;
  background: transparent;
}
.section.dark{
  background: #070707;
  border-top: 1px solid rgba(255,255,255,.06);
  border-bottom: 1px solid rgba(255,255,255,.06);
}

h1,h2,h3{ margin:0 0 12px; line-height:1.1; }
h2{ font-size: clamp(28px, 3.2vw, 46px); letter-spacing: -0.02em; }
h3{ font-size: 18px; letter-spacing: 0.01em; }
.muted{ color: rgba(255,255,255,.64); }

.grid{
  margin-top: 18px;
  display:grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 14px;
}
.card{
  padding: 18px 16px;
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 16px;
  background: rgba(255,255,255,.03);
  box-shadow: 0 18px 60px rgba(0,0,0,.32);
}

/* Reveal */
.js .reveal{
  opacity:0;
  transform: translateY(14px);
  transition: opacity .6s ease, transform .6s ease;
}
.js .reveal.is-visible{ opacity:1; transform:none; }

/* ========================================================================================================================================================================================================
   HEADER
========================= */
.site-header{
  position:fixed;
  inset: 0 0 auto 0;
  height: var(--header-h);
  display:flex;
  align-items:center;
  justify-content: space-between;
  gap: 18px;
  padding: 0 clamp(16px, 4vw, 40px);
  z-index: 1000;
  background: linear-gradient(180deg, rgba(0,0,0,.62), rgba(0,0,0,0));
  transition: background .25s ease, backdrop-filter .25s ease;
}
.site-header.scrolled{
  background: rgba(0,0,0,.75);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255,255,255,.07);
}

.brand{
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-size: 12px;
  opacity:.92;
}

.nav{ display:block; }
.nav-list{
  display:flex;
  align-items:center;
  gap: 22px;
  list-style:none;
  margin:0;
  padding:0;
}
.nav-list a{
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: .84;
  position: relative;
}
.nav-list a::after{
  content:"";
  position:absolute;
  left:0; right:0; bottom:-8px;
  height:2px;
  background: linear-gradient(90deg, rgba(255,236,200,.0), rgba(255,236,200,.7), rgba(255,236,200,.0));
  transform: scaleX(0);
  transform-origin: 50% 50%;
  transition: transform .25s ease;
  opacity:.9;
}
.nav-list a:hover{ opacity:1; }
.nav-list a:hover::after{ transform: scaleX(1); }

.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 999px;
  padding: 10px 14px;
  background: rgba(255,255,255,.04);
}
.btn-cta{
  padding: 10px 16px;
  background:
    radial-gradient(120px 80px at 30% 30%, rgba(255, 220, 155, 0.22), transparent 60%),
    linear-gradient(135deg, rgba(0,0,0,.65), rgba(0,0,0,.20));
  border-color: rgba(255, 220, 160, 0.26);
  box-shadow: 0 16px 60px rgba(0,0,0,.45);
}

.nav-toggle{
  display:none;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.16);
  background: rgba(255,255,255,.04);
  padding: 10px;
  cursor:pointer;
}
.nav-toggle span{
  display:block;
  height:2px;
  width:100%;
  background: rgba(255,255,255,.82);
  margin: 6px 0;
  border-radius: 2px;
}
.sr-only{
  position:absolute;
  width:1px;height:1px;
  padding:0;margin:-1px;
  overflow:hidden;clip:rect(0,0,0,0);
  white-space:nowrap;border:0;
}

/* mobile nav */
@media (max-width: 920px){
  .nav-toggle{ display:inline-flex; align-items:center; justify-content:center; }
  .nav{
    position: fixed;
    inset: var(--header-h) 0 auto 0;
    background: rgba(0,0,0,.78);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(255,255,255,.07);
    transform: translateY(-10px);
    opacity: 0;
    pointer-events:none;
    transition: opacity .2s ease, transform .2s ease;
  }
  .site-header.nav-open .nav{
    opacity: 1;
    transform:none;
    pointer-events:auto;
  }
  .nav-list{
    flex-direction: column;
    align-items:flex-start;
    padding: 18px 18px 22px;
    gap: 14px;
  }
  .btn-cta{ display:none; }
  .grid{ grid-template-columns: 1fr; }
}

/* ========================================================================================================================================================================================================
   AMBIENT GLOW (global)
========================= */
#ambientGlow{
  position: fixed;
  inset: 0;
  pointer-events:none;
  z-index: 1;
  mix-blend-mode: screen;
  opacity: .70;
  background:
    radial-gradient(520px 420px at var(--mx) var(--my),
      rgba(255, 190, 110, .14),
      rgba(255, 160, 80, .07) 42%,
      rgba(0,0,0,0) 70%);
  filter: blur(1px);
}
body.glow-boost #ambientGlow{
  opacity: .92;
}

/* ========================================================================================================================================================================================================
   CUSTOM CURSOR (beam)
========================= */
#custom-cursor{
  display:none;
  position: fixed;
  top:0; left:0;
  width: 18px; height: 18px;
  pointer-events:none;
  transform: translate(-50%,-50%);
  z-index: 10000;
  --angle: 0deg;
}
body.cursor-on #custom-cursor{ display:block; }
body.cursor-on, body.cursor-on a, body.cursor-on button{ cursor:none; }

#custom-cursor .core{
  position:absolute;
  inset:0;
  border-radius: 999px;
  background: rgba(255, 236, 200, 0.95);
  box-shadow:
    0 0 10px rgba(255, 220, 160, 0.55),
    0 0 30px rgba(255, 200, 120, 0.22),
    0 0 80px rgba(255, 170, 80, 0.14);
  opacity: .92;
}
#custom-cursor .beam{
  position:absolute;
  left: 0;
  top: 50%;
  width: 560px;
  height: 360px;
  transform-origin: 0% 50%;
  transform: translateY(-50%) rotate(var(--angle));
  clip-path: polygon(0 50%, 100% 0, 100% 100%);
  opacity: .72;
  mix-blend-mode: screen;
  pointer-events: none;
}

#custom-cursor .beam::before{
  content:"";
  position:absolute;
  inset:0;
  background:
    radial-gradient(closest-side at 0% 50%,
      rgba(255, 214, 140, 0.30),
      rgba(255, 194, 110, 0.16) 35%,
      rgba(255, 170, 80, 0.07) 60%,
      rgba(255, 160, 70, 0.00) 100%),
    linear-gradient(90deg,
      rgba(255, 200, 120, 0.18),
      rgba(255, 170, 80, 0.00) 70%);
  filter: blur(2px);
  transform: translateZ(0);
  will-change: filter, transform;
}

/* hover-усиление — теперь blur на ::before, не на .beam */
body.hovered #custom-cursor .beam{ opacity: .88; }
body.hovered #custom-cursor .beam::before{ filter: blur(1.6px); }
body.hovered #custom-cursor .core{ opacity: 1; }


@media (hover:none), (pointer:coarse){
  #custom-cursor{ display:none !important; }
  body, a, button{ cursor:auto !important; }
}

/* ========================================================================================================================================================================================================
   HERO (no frame, BIG)
========================= */
.hero.hero-cold{
  min-height: 100svh;
  padding-top: calc(var(--header-h) + 8px);
  display:flex;
  align-items:flex-start;
  justify-content:center;
  position: relative;
  overflow:hidden;
}

.hero-stage{
  --reveal-x: 50%;
  --reveal-y: 50%;
  --reveal-r: 0px;

  width: min(2100px, 98vw);
  height: min(980px, 86vh);
  position: relative;
  margin-top: 6px;
}

/* logo */
.hero-logo{
  position:absolute;
  inset: 0;
  display:grid;
  place-items:center;
  transform: translateY(-8px);
  pointer-events:auto;
}
.hero-logo{ z-index: 6; }
.hero-hud{ position:absolute; inset:0; z-index: 8; pointer-events:none; }
.hero-notes{ position:absolute; inset:0; z-index: 4; pointer-events:none; }

.logo-layer{
  position:absolute;
  width: min(2000px, 98vw);  /* большое */
  height:auto;
  pointer-events:none;
}

.logo-layer.base{
  opacity: .92;
  filter: drop-shadow(0 30px 90px rgba(0,0,0,0.75));
}

/* reveal mask */
.logo-layer.reveal{
  opacity: .98;
  mix-blend-mode: screen;
  filter: drop-shadow(0 0 90px rgba(255,160,70,.12)) saturate(1.06) contrast(1.08);

   -webkit-mask-image: radial-gradient(circle var(--reveal-r) at var(--reveal-x) var(--reveal-y),
     rgba(255,255,255,1) 0%,
     rgba(255,255,255,1) 42%,
     rgba(255,255,255,.55) 72%,
     rgba(255,255,255,0) 100%);
   mask-image: radial-gradient(circle var(--reveal-r) at var(--reveal-x) var(--reveal-y),
     rgba(255,255,255,1) 0%,
     rgba(255,255,255,1) 42%,
     rgba(255,255,255,.55) 72%,
     rgba(255,255,255,0) 100%);
}

/* warm halo on reveal */
.reveal-glow{
  position:absolute;
  inset:0;
  opacity: 0;
  transition: opacity .25s ease;
  pointer-events:none;

  background: radial-gradient(circle 320px at var(--reveal-x) var(--reveal-y),
    rgba(255, 210, 140, .14),
    rgba(255, 170, 90, .08) 40%,
    rgba(0,0,0,0) 70%);
  mix-blend-mode: screen;
  filter: blur(2px);

     /* мягко гасим свечение к краям, чтобы не было резкого “среза” */
  -webkit-mask-image: radial-gradient(ellipse at 50% 50%,
    rgba(0,0,0,1) 0%,
    rgba(0,0,0,1) 72%,
    rgba(0,0,0,0) 100%);
  mask-image: radial-gradient(ellipse at 50% 50%,
    rgba(0,0,0,1) 0%,
    rgba(0,0,0,1) 72%,
    rgba(0,0,0,0) 100%);
}
.hero-stage.is-hover{ --reveal-r: 280px; }
.hero-stage.is-hover .reveal-glow{ opacity: 1; }

@media (prefers-reduced-motion: reduce){
  .hero-stage.is-hover{ --reveal-r: 260px; }
}

/* HUD */
.hero-hud .hud{
  position:absolute;
  opacity:.92;
  filter: drop-shadow(0 18px 50px rgba(0,0,0,.75));
}
.hero-hud .rec{ left: 3.2vw; top: 10vh; width: 120px; animation: recBlink 1.6s steps(1) infinite; }
.hero-hud .fps{
  right: 5vw;
  top: 10vh;
  width: 100px;
  opacity: .78;
  filter:
    drop-shadow(0 18px 50px rgba(0,0,0,.75))
    drop-shadow(0 0 14px rgba(255,255,255,.30));
}
.hero-hud .iso{
  left: 3.2vw;
  bottom: 9vh;
  width: 100px;
  opacity: .72;
  filter:
    drop-shadow(0 18px 50px rgba(0,0,0,.75))
    drop-shadow(0 0 14px rgba(255,255,255,.28));
}
.hero-hud .tc{ right: 5vw; bottom: 3vh; width: 230px; opacity:.85; }

@keyframes recBlink{
  0%, 49%{ opacity: 1; }
  50%, 100%{ opacity: .15; }
}

/* NOTES / tapes (большие, хаос) */
.hero-notes .note{
  position:absolute;
  opacity: .88;
  filter: drop-shadow(0 26px 70px rgba(0,0,0,.72));
}

.note.tape1{
  left: -8%;
  top: 16%;
  width: clamp(260px, 28vw, 520px);
  transform: rotate(-18deg);
  opacity: .85;
}
.note.tape2{
  right: -6%;
  left: auto;
  bottom: -6%;
  width: clamp(320px, 34vw, 680px);
  transform: rotate(7deg);
  opacity: .78;
}
.note.keep{
  left: 7%;
  top: 58%;
  width: clamp(200px, 16vw, 320px);
  transform: rotate(-10deg);
  opacity: .70;
}
.note.night{
  right: 9%;
  top: 22%;
  width: clamp(200px, 16vw, 360px);
  transform: rotate(10deg);
  opacity: .72;
}

.note.cine{
  right: clamp(18px, 6vw, 90px);
  left: auto;
  top: 10vh;
  width: clamp(320px, 30vw, 640px);
  transform: rotate(8deg);
  opacity: .16;
  filter: drop-shadow(0 20px 60px rgba(0,0,0,.85));
}

.hero-hint{
  position:absolute;
  left: 50%;
  bottom: 12vh;
  transform: translateX(-50%);
  display:flex;
  flex-direction:column;
  align-items:center;
  text-align:center;
  gap: 6px;
  opacity: .95;
  color: rgba(255, 214, 140, 0.95); /* тёплый “ламповый” */
  pointer-events:none;
  z-index: 9;
}

.hero-hint::before{
  content:"";
  position:absolute;
  inset: -18px -22px;
  background: radial-gradient(circle at 50% 50%,
    rgba(255, 190, 90, .22),
    rgba(0,0,0,0) 70%);
  filter: blur(10px);
  opacity: .85;
  z-index: -1;
}
.hint-main{
  font-size: 12px;
  letter-spacing: .26em;
  text-transform: uppercase;
  font-weight: 900;
  animation: signalFlicker 3.6s infinite;
  text-shadow:
    0 0 10px rgba(255, 200, 120, .35),
    0 0 28px rgba(255, 170, 80, .22);
}

.hint-sub{
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
  opacity: .72;
  text-shadow: 0 0 14px rgba(255, 210, 150, .18);
}

@keyframes signalFlicker{
  0%{ opacity:.9; }
  6%{ opacity:.22; }
  8%{ opacity:.95; }
  13%{ opacity:.55; }
  14%{ opacity:.92; }
  24%{ opacity:.18; }
  26%{ opacity:.88; }
  34%{ opacity:.38; }
  35%{ opacity:.96; }
  58%{ opacity:.62; }
  59%{ opacity:.12; }
  61%{ opacity:.92; }
  76%{ opacity:.44; }
  77%{ opacity:.98; }
  100%{ opacity:.86; }
}

/* mobile: меньше шума */
@media (max-width: 880px){
  .hero-stage{ height: min(900px, 82vh); }
  .hero-hud .fps, .hero-hud .iso{ display:none; }
  .note.tape1, .note.tape2{ opacity:.45; }
   .note.tape1{ display:none; }      /* убираем верхний шум */
  .note.cine{ opacity:.12; }        /* плёнка — мягким фоном */
  .hero-hint{ bottom: 10vh; }       /* чуть выше */
}
@media (max-width: 520px){
  .note.keep, .note.night, .note.cine{ display:none; }
}

/* =========================
/* ===== CLEAN BETWEEN RIG + CLAPPER POSITION ===== */
.between-rig{
  position: relative;
  height: 420px;
  margin-top: 120px;
  z-index: 20;
  overflow: visible;
}

.between-left{
  position:absolute;
  left: 6vw;
  bottom: 0;
  width: 44vw;
  height: 280px;
  pointer-events:none;
}

/* хлопушка справа внизу, а не сверху */
.clap.dock {
  --clapAngle: 0deg;
  position: absolute;
  right: 6vw;
  bottom: -10px;
  width: clamp(280px, 20vw, 480px);
  aspect-ratio: 1.18 / 1;
  border: 0;
  background: transparent;
  padding: 0;
  cursor: pointer;
  z-index: 20;
  filter: drop-shadow(0 26px 80px rgba(0,0,0,0.75));
}
.clap.dock img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
}
.clap.dock .clap-top {
  transform-origin: 22% 72%;
  transform: rotate(var(--clapAngle));
  transition: transform .18s linear;
}


/* ========================================================================================================================================================================================================
   SHOWREEL
========================= */
.showreel-head{
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: end;
  gap: 14px;
}

.showreel-spacer{ height: 1px; }

/* центр */
.showreel-title-imgwrap{ display:flex; justify-content:center; }
.showreel-title-img{ display:block; width: min(520px, 78vw); height:auto; margin:0 auto; }

.showreel-sub{
  margin: 10px 0 0;
  font-size: 12px;
  letter-spacing: .12em;
  text-transform: uppercase;
  opacity: .68;
}

.showreel-kicker{
  display:inline-flex;
  align-items:center;
  gap: 10px;
  justify-content: center;
  width: 100%;

  letter-spacing:.28em;
  text-transform:uppercase;
  font-size: 11px;
  opacity: .86;
  margin-bottom: 10px;
}

.showreel-dot{
  width:8px; height:8px;
  border-radius:999px;
  background: rgba(255,214,140,.95);
  box-shadow: 0 0 18px rgba(255,190,90,.45);
}


.showreel-window{
  position: relative;
  margin-top: 18px;

  border-radius: 28px;
  padding: 14px;                 /* больше подложка */
  overflow: hidden;

  border: 1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.035);
  backdrop-filter: blur(16px);

  box-shadow: 0 55px 170px rgba(0,0,0,.78);
  transform: rotate(-0.35deg);
}

.showreel-window::before{
  content:"";
  position:absolute;
  inset: 10px;
  border-radius: 22px;
  border: 1px solid rgba(255,255,255,.12);
  pointer-events:none;
  opacity: .9;
}

.showreel-video{
  width:100%;
  height:auto;
  display:block;
  aspect-ratio: 16 / 9;
  object-fit: cover;

  border-radius: 18px;
  border: 1px solid rgba(255,255,255,.12);
}

.showreel-sticker{
  position:absolute;
  left: 14px; top: 14px;
  font-size: 11px;
  letter-spacing: .18em;
  text-transform: uppercase;
  padding: 8px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.16);
  background: rgba(0,0,0,.35);
  backdrop-filter: blur(10px);
  z-index: 2;
  opacity:.9;
}

.showreel-video{
  width:100%;
  height:auto;
  display:block;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.grain{
  position:absolute; inset:0;
  pointer-events:none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)' opacity='.18'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
  opacity:.25;
}
.scanlines{
  position:absolute; inset:0;
  pointer-events:none;
  background: repeating-linear-gradient(
    to bottom,
    rgba(255,255,255,.06) 0px,
    rgba(255,255,255,.06) 1px,
    rgba(0,0,0,0) 3px,
    rgba(0,0,0,0) 6px
  );
  opacity:.08;
}

.grain, .scanlines{
  inset: 14px;
  border-radius: 18px;
}

/* =========================
   SOUND BLOB (glass, no glow)
========================= */
.sound-blob{
  position: relative;
  display:inline-flex;
  align-items:center;
  gap: 10px;

  padding: 16px 22px;
  border: 0;
  background: transparent;
  cursor:pointer;

  color: rgba(255, 245, 225, 0.92);
  border-radius: 999px;
  user-select:none;
  transition: transform .18s ease;
}

.sound-blob:hover{ transform: translateY(-1px); }
.sound-blob:active{ transform: scale(0.98); }

.sound-blob:disabled{
  opacity: .55;
  cursor: not-allowed;
}

.sound-blob__bg{
  position:absolute;
  inset:-2px;
  z-index:0;
  border-radius: inherit;
  background:
    radial-gradient(140px 90px at 30% 30%, rgba(255,255,255,0.10), transparent 60%),
    linear-gradient(135deg, rgba(255,255,255,0.08), rgba(0,0,0,0.18));
  border: 1px solid rgba(255,255,255,0.18);
  backdrop-filter: blur(14px);
}

.sound-blob__shine{
  position:absolute;
  inset:-40%;
  z-index:0;
  border-radius: inherit;
  background: radial-gradient(circle at 30% 30%, rgba(255,255,255,.18), rgba(0,0,0,0) 60%);
  opacity: .35;
  filter: blur(14px);
  pointer-events:none;
}

.sound-blob__dot{
  width: 11px;
  height: 11px;
  border-radius: 999px;
  background: rgba(255, 236, 200, 0.70);
  box-shadow: none; /* убрали glow */
  z-index:1;
  flex: 0 0 auto;
}

.sound-blob__text{
  z-index: 1;
  font-weight: 900;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  font-size: 12px;
}

/* OFF/ON */
.sound-blob.is-on .sound-blob__dot{
  background: rgba(255, 214, 140, 0.95);
}

/* jelly остаётся (она красивая) */
@keyframes blobJelly{
  0%{ transform: scale(1); }
  30%{ transform: scaleX(1.18) scaleY(0.86); }
  55%{ transform: scaleX(0.88) scaleY(1.16); }
  75%{ transform: scaleX(1.06) scaleY(0.94); }
  100%{ transform: scale(1); }
}
.sound-blob.jelly{ animation: blobJelly 520ms cubic-bezier(.2,1,.2,1); }

.sound-blob:focus-visible{
  outline: 2px solid rgba(255, 236, 200, 0.55);
  outline-offset: 4px;
}

@media (prefers-reduced-motion: reduce){
  .sound-blob.jelly{ animation: none !important; }
}
#soundToggle{
  justify-self: end;
  align-self: end;
}

@media (max-width: 820px){
  .showreel-head{
    grid-template-columns: 1fr;
    justify-items: center;
    text-align:center;
  }
  #soundToggle{ justify-self: center; margin-top: 12px; }

  .showreel-window{
    transform: none;
    border-radius: 20px;
    padding: 10px;
  }
  .showreel-window::before{
    inset: 8px;
    border-radius: 16px;
  }
  .showreel-video{ border-radius: 14px; }
  .grain, .scanlines{
    inset: 10px;
    border-radius: 14px;
  }
  .showreel-title-img{ width: min(440px, 86vw); }
  .showreel-sub{ font-size: 11px; letter-spacing: .10em; }
}

/* ========================================================================================================================================================================================================
   FOOTER
========================= */
.site-footer{
  padding: 28px 0;
  border-top: 1px solid rgba(255,255,255,.06);
}
.site-footer .container{
  display:flex;
  justify-content:space-between;
  gap: 18px;
}

/* === CLAPPER: ниже + меньше (override) === */

/* важно: чтобы absolute считался от between-rig, а не от страницы */
.between-rig{
  position: relative;
  height: 520px;
  margin-top: 140px;
  z-index: 20;
  overflow: visible;
}

/* позиция хлопушки */
.between-rig .clap.dock{
  top: auto !important;       /* убираем любые старые top */
  bottom: -600px !important;   /* опускаем ниже */
  right: calc(clamp(24px, 7vw, 140px) + 300px) !important;      /* вправо, но в пределах экрана */
  width: clamp(210px, 14vw, 340px) !important; /* меньше */
}

/* === CLAPPER: фикс "уезжает при открытии" === */

/* 1) КНОПКА: делаем квадратную область под твои PNG (они 400x400) */
.between-rig #clapButton.clap.dock{
  aspect-ratio: 1 / 1 !important;
}

/* 2) ВЕРХНЯЯ ПЛАНКА: правильная точка вращения + стабильный трансформ */
.between-rig #clapButton .clap-top{
  transform-origin: 20% 33% !important; /* петля слева сверху */
  transform: translate3d(0, 0, 0) rotate(var(--clapAngle)) !important;
  will-change: transform;
}

/* === CLAPPER LAYERING: top behind base + hide corner === */

.between-rig #clapButton{
  position: absolute;
  overflow: visible;
  z-index: 50;
}


/* порядок слоёв */
.between-rig #clapButton .clap-top{
  z-index: 1 !important; /* ВЕРХНЯЯ ПЛАНКА СЗАДИ */
}

.between-rig #clapButton .clap-base{
  z-index: 3 !important; /* БАЗА СПЕРЕДИ */
}

/* делаем базу “маской” — она будет прятать угол планки */
.between-rig #clapButton .clap-base{
  position: relative !important;
  display: block;
}

/* полоса-маска сверху базы (прячет то, что "лезет") */
.between-rig #clapButton .clap-base::after{
  content: "";
  position: absolute;
  left: 0;
  top: 0;

  width: 100%;
  height: 22%;               /* сколько прятать сверху (подгони) */
  background: rgba(0,0,0,0.98); /* фон почти чёрный, как у базы */
  pointer-events: none;
  z-index: 10;
  filter: blur(0.2px);
}

#showreel{
  position: relative;
  z-index: 1;
}

/* TEMP: спрятали декор, вернём позже */
.note.tape1,
.note.tape2,
.note.cine,
.note.night{
  display: none !important;
}

/* === FORCE CLAPPER OVER NEXT SECTION === */

/* HERO должен быть выше #showreel, иначе фон showreel его перекрывает */
.hero.hero-cold{
  position: relative;
  z-index: 50 !important;
  overflow: visible !important;
}

/* следующий блок специально опускаем ниже по слоям */
#showreel{
  position: relative;
  z-index: 1 !important;
}

/* и на всякий случай саму хлопушку поднимаем ещё выше */
.between-rig{ z-index: 60 !important; }
#clapButton{ z-index: 80 !important; }


/* ========================================================================================================================================================================================================
   SERVICES DECK (WOW)
========================= */

.section-deck{
  padding-top: clamp(70px, 9vh, 140px);
  padding-bottom: clamp(50px, 7vh, 110px);
}

.deck-head{
  text-align: center;
  margin-bottom: clamp(18px, 3.5vh, 34px);
}

.deck-kicker{
  display:inline-flex;
  align-items:center;
  gap:10px;
  letter-spacing:.28em;
  text-transform:uppercase;
  font-size: 11px;
  opacity:.86;
}

.deck-dot{
  width:8px; height:8px;
  border-radius:999px;
  background: rgba(255, 214, 140, 0.95);
  box-shadow: 0 0 18px rgba(255, 190, 90, .45);
}

.deck-title{
  margin-top: 14px;
  font-size: clamp(30px, 3.8vw, 62px);
  line-height: 1.03;
  letter-spacing: .07em;
  text-transform: uppercase;
  font-weight: 900;
}

.deck-accent{
  color: rgba(255, 214, 140, 0.98);
  text-shadow:
    0 0 16px rgba(255, 190, 90, .25),
    0 0 44px rgba(255, 170, 80, .18);
}

.deck-sub{
  margin: 14px auto 0;
  max-width: 62ch;
  font-size: 14px;
  line-height: 1.6;
  opacity: .76;
}

/* deck stage */
.service-deck{
  position: relative;
  height: clamp(520px, 78vh, 860px);
  perspective: 1100px;
  isolation: isolate;
}

.deck-card{
  --dx: 0px;
  --dy: 0px;
  --rot: 0deg;
  --z: 1;
  --cut: 22px;
  --radius: 28px 16px 40px 18px;
  --a1: rgba(255, 214, 140, .26);
  --a2: rgba(255, 214, 140, 0);

  position:absolute;
  left:50%;
  top:50%;
  width: clamp(340px, 74vw, 920px);
  aspect-ratio: 16/7;
  min-height: 230px;

  border-radius: var(--radius);
  clip-path: polygon(0 0, calc(100% - var(--cut)) 0, 100% var(--cut), 100% 100%, 0 100%);
  border: 1px solid rgba(255,255,255,.12);
  box-shadow: 0 30px 90px rgba(0,0,0,.70);

  background:
    radial-gradient(1000px 420px at 10% 0%, rgba(255,255,255,.06), rgba(0,0,0,0) 60%),
    radial-gradient(560px 340px at 0% 60%, var(--a1), var(--a2) 70%),
    linear-gradient(180deg, rgba(255,255,255,.03), rgba(0,0,0,0));

  color: inherit;
  text-decoration: none;
  overflow: hidden;
  transform-style: preserve-3d;

  opacity: 0;
  transform: translate(-50%, -50%) scale(.90) rotate(0deg);
  transition:
    opacity .65s ease,
    transform .95s cubic-bezier(.2,.9,.2,1),
    border-color .25s ease,
    box-shadow .25s ease,
    filter .25s ease;
  transition-delay: var(--delay, 0ms);

  z-index: var(--z);
}

/* when section becomes visible (IntersectionObserver adds .is-visible) */
.service-deck.is-visible .deck-card{
  opacity: 1;
  transform:
    translate(-50%, -50%)
    translate(var(--dx), var(--dy))
    rotate(var(--rot))
    rotateX(var(--tilt-x, 0deg))
    rotateY(var(--tilt-y, 0deg));
}

.deck-card::before{
  content:"";
  position:absolute;
  inset:-2px;
  background:
    radial-gradient(420px 260px at var(--px, 50%) var(--py, 50%),
      rgba(255,255,255,.26),
      rgba(255,255,255,.10) 26%,
      rgba(0,0,0,0) 62%);
  opacity: 0;
  transition: opacity .20s ease;
  mix-blend-mode: screen;
  pointer-events:none;
}

.deck-card::after{
  content:"";
  position:absolute;
  inset:0;
  background:
    repeating-linear-gradient(90deg,
      rgba(255,255,255,.045) 0px,
      rgba(255,255,255,.045) 1px,
      rgba(0,0,0,0) 6px,
      rgba(0,0,0,0) 10px);
  opacity: .12;
  pointer-events:none;
}

.dc-big{
  position:absolute;
  right: 16px;
  top: 10px;
  font-weight: 900;
  font-size: clamp(70px, 10vw, 140px);
  letter-spacing: .08em;
  opacity: .09;
  transform: translateZ(30px);
  pointer-events:none;
}

.dc-inner{
  position:absolute;
  inset: 18px 18px 16px;
  display:flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 10px;
  transform: translateZ(40px);
}

.dc-top{
  display:flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 2px;
}

.dc-code{
  font-size: 10px;
  letter-spacing: .28em;
  text-transform: uppercase;
  opacity: .78;
}

.dc-chip{
  font-size: 10px;
  letter-spacing: .22em;
  text-transform: uppercase;
  opacity: .78;
  border: 1px solid rgba(255,255,255,.16);
  padding: 6px 9px;
  border-radius: 999px;
  background: rgba(0,0,0,.18);
}

.dc-title{
  margin:0;
  font-weight: 900;
  letter-spacing: .06em;
  text-transform: uppercase;
  font-size: clamp(16px, 2.2vw, 22px);
}

.dc-desc{
  margin:0;
  max-width: 60ch;
  font-size: 13px;
  line-height: 1.55;
  opacity: .78;
}

.dc-foot{
  margin-top: auto;
  display:flex;
  align-items:center;
  justify-content: space-between;
  gap: 12px;
}

.dc-badge{
  font-size: 11px;
  letter-spacing: .18em;
  text-transform: uppercase;
  opacity: .72;
}

.dc-arrow{
  font-size: 18px;
  opacity: .82;
  transform: translateX(0);
  transition: transform .2s ease, opacity .2s ease;
}

@media (hover:hover){
  .service-deck:hover .deck-card{ filter: brightness(.92) saturate(.95); }
  .service-deck:hover .deck-card:hover{ filter: none; }

  .deck-card:hover{
    z-index: 50;
    border-color: rgba(255,255,255,.24);
    box-shadow: 0 45px 120px rgba(0,0,0,.78);
  }
  .deck-card:hover::before{ opacity: 1; }
  .deck-card:hover .dc-arrow{ opacity: 1; transform: translateX(6px); }

  .service-deck.is-visible .deck-card:hover{
    transform:
      translate(-50%, -50%)
      translate(var(--dx), calc(var(--dy) - 10px))
      rotate(0deg)
      rotateX(var(--tilt-x, 0deg))
      rotateY(var(--tilt-y, 0deg))
      scale(1.04)
      translateZ(70px);
  }
}

/* === DECK OPEN ON HOVER: даём доступ нижним карточкам === */
@media (hover:hover){
  .service-deck:hover .deck-card{
    /* если заданы --dx-open/--dy-open/--rot-open — используем их */
    --dx: var(--dx-open, var(--dx));
    --dy: var(--dy-open, var(--dy));
    --rot: var(--rot-open, var(--rot));
  }
}

/* individuality: each card has its own “character” */
.dc-commercial{
  --dx: -260px; --dy: -170px; --rot: -10deg; --z: 1;
  --dx-open: -420px; --dy-open: -260px; --rot-open: -16deg;
  --a1: rgba(0, 220, 255, .26);
  --radius: 28px 16px 44px 18px; --cut: 26px; --delay: 0ms;
}

.dc-clips{
  --dx: -120px; --dy: -60px; --rot: -6deg; --z: 2;
  --dx-open: -250px; --dy-open: -110px; --rot-open: -10deg;
  --a1: rgba(190, 110, 255, .24);
  --radius: 34px 14px 28px 18px; --cut: 18px; --delay: 90ms;
}

.dc-live{
  --dx: 10px; --dy: 80px; --rot: 2deg; --z: 3;
  --dx-open: -40px; --dy-open: 140px; --rot-open: 3deg;
  --a1: rgba(140, 255, 120, .20);
  --radius: 18px 28px 42px 16px; --cut: 22px; --delay: 170ms;
}

.dc-producing{
  --dx: 160px; --dy: -40px; --rot: 7deg; --z: 4;
  --dx-open: 260px; --dy-open: -80px; --rot-open: 12deg;
  --a1: rgba(255, 190, 90, .24);
  --radius: 28px 18px 34px 14px; --cut: 24px; --delay: 240ms;
}

.dc-graphics{
  --dx: 280px; --dy: 150px; --rot: 12deg; --z: 5;
  --dx-open: 440px; --dy-open: 240px; --rot-open: 18deg;
  --a1: rgba(255, 90, 190, .18);
  --radius: 18px 34px 28px 16px; --cut: 16px; --delay: 310ms;
}

/* responsive: уменьшаем разлёт на средних экранах */
@media (max-width: 1100px){
  .dc-commercial{ --dx: -200px; --dy: -150px; }
  .dc-graphics{ --dx: 220px; --dy: 130px; }
}

/* mobile: превращаем в свайп-колоду */
@media (max-width: 820px){
  .service-deck{
    height: auto;
    perspective: none;
    display:flex;
    gap: 14px;
    overflow-x:auto;
    padding: 10px 2px 22px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
  }
  .deck-card{
    position: relative;
    left:auto; top:auto;
    transform: none !important;
    opacity: 1 !important;
    min-width: 84vw;
    scroll-snap-align: center;
  }
}

/* respect reduced motion */
@media (prefers-reduced-motion: reduce){
  .deck-card{ transition: none; }
  .deck-card::before{ transition: none; }
}

/* === Fix: center title image === */
.deck-head{
  display: flex;
  flex-direction: column;
  align-items: center;
}

.deck-title-imgwrap{
  width: 100%;
  display: flex;
  justify-content: center;
}

.deck-title-img{
  display: block;
  width: 100%;
  max-width: 980px; /* можешь подогнать */
  height: auto;
  margin: 0;
}

/* ========================================================================================================================================================================================================
   Title Lamp Flicker
========================= */

#deckTitleLamp{
  opacity: .18; /* почти в темноте */
  filter:
    brightness(.55)
    contrast(1.08)
    saturate(.92)
    drop-shadow(0 0 0 rgba(0,0,0,0));
  transition: opacity .35s ease, filter .35s ease;
  will-change: opacity, filter;
}

/* мягкая “аура” позади — включается только когда лампа зажглась */
.deck-title-imgwrap{
  position: relative;
}
.deck-title-imgwrap::after{
  content:"";
  position:absolute;
  left:50%;
  top:50%;
  width: min(980px, 92vw);
  height: 120%;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle at 50% 55%,
    rgba(255, 200, 120, .22),
    rgba(255, 160, 70, .10) 40%,
    rgba(0,0,0,0) 72%);
  filter: blur(18px);
  opacity: 0;
  transition: opacity .35s ease;
  pointer-events:none;
  z-index: 0;
}

/* чтобы картинка была над аурой */
.deck-title-img{
  position: relative;
  z-index: 1;
}

#deckTitleLamp.lamp-lit{
  opacity: 1;
  filter:
    brightness(1.08)
    contrast(1.06)
    saturate(1.03)
    drop-shadow(0 0 22px rgba(255, 210, 140, .30))
    drop-shadow(0 0 70px rgba(255, 170, 80, .18));
  animation: lampFlicker 1.25s ease-out 1 forwards;
}

/* включаем “ауру” только когда зажглась */
.deck-title-imgwrap.lamp-lit::after{
  opacity: 1;
}

@keyframes lampFlicker{
  0%   { opacity:.10; filter: brightness(.35) contrast(1.10) saturate(.85); }
  10%  { opacity:.95; filter: brightness(1.18) contrast(1.05) saturate(1.05); }
  14%  { opacity:.22; filter: brightness(.55) contrast(1.10) saturate(.90); }
  22%  { opacity:1;   filter: brightness(1.12) contrast(1.06) saturate(1.03); }
  26%  { opacity:.40; filter: brightness(.70) contrast(1.10) saturate(.95); }
  34%  { opacity:1;   filter: brightness(1.10) contrast(1.06) saturate(1.03); }
  38%  { opacity:.62; filter: brightness(.78) contrast(1.08) saturate(.98); }
  46%  { opacity:1;   filter: brightness(1.09) contrast(1.06) saturate(1.03); }
  60%  { opacity:.92; filter: brightness(1.03) contrast(1.06) saturate(1.02); }
  100% { opacity:1;   filter: brightness(1.08) contrast(1.06) saturate(1.03); }
}

@media (prefers-reduced-motion: reduce){
  #deckTitleLamp{ opacity: 1; filter: none; animation: none; }
  .deck-title-imgwrap::after{ opacity: 1; }
}

/* === Deck should overlap ABOVE the next section (showreel) === */
#services-deck{
  position: relative;
  z-index: 60 !important;
  overflow: visible !important;
}

#services-deck .container,
#services-deck .service-deck{
  overflow: visible !important;
}

/* showreel ниже по слоям, чтобы не перекрывал карточки */
#showreel{
  position: relative;
  z-index: 1 !important;
}

/* =========================
   LAYERS: HERO/CLAP > DECK > SHOWREEL
========================= */

/* хлопушка и hero — всегда сверху */
.hero.hero-cold{
  position: relative;
  z-index: 90 !important;
  overflow: visible !important;
}
.between-rig{
  position: relative;
  z-index: 95 !important;
}
#clapButton{
  z-index: 100 !important;
}

/* колода — выше шоу-рила, но ниже хлопушки */
#services-deck{
  position: relative;
  z-index: 60 !important;
  overflow: visible !important;
}

/* шоу-рил — самый нижний из трёх */
#showreel{
  position: relative;
  z-index: 1 !important;
}

/* SAFETY: если JS сломался, не прячем контент намертво */
html:not(.js) .reveal{
  opacity: 1;
  transform: none;
}

/* =========================
   DOSSIER INDEX — 16:9 VIDEO FORMAT
========================= */

/* главный экран всегда 16:9 */
.dx-view-img{
  height: auto !important;
  aspect-ratio: 16 / 9;
}

/* рамка/оверлеи пусть тянутся по размеру изображения */
.dx-view-frame{ display: grid; gap: 0; }
.dx-view-frame > *{ grid-area: 1 / 1; }

/* мини-улики тоже 16:9 */
.dx-thumb{
  width: clamp(150px, 18vw, 240px);
  height: auto !important;
  aspect-ratio: 16 / 9;
}

.dx-thumb img{
  width: 100%;
  height: 100%;
  object-fit: cover;
}


/* =========================
   DOSSIER INDEX — FAT MODE (more punch)
========================= */

/* сильнее постерность заголовка */
.dx-title-ghost{
  opacity: .095 !important;
  letter-spacing: .32em !important;
  filter: blur(.2px);
}

.dx-title-main{
  letter-spacing: .36em !important;
  text-shadow:
    0 0 22px rgba(255, 190, 90, .14),
    0 0 60px rgba(255, 170, 80, .08);
}

/* левый блок как “терминал”: плотнее, контрастнее */
.dx-left{
  border-color: rgba(255,255,255,.16) !important;
  box-shadow: 0 45px 140px rgba(0,0,0,.78) !important;
}

.dx-left-top{
  background: linear-gradient(180deg, rgba(255,255,255,.05), rgba(0,0,0,0));
}

/* элементы списка — жирнее и агрессивнее */
.dx-item{
  border-radius: 24px !important;
  border-color: rgba(255,255,255,.14) !important;
  box-shadow: 0 24px 80px rgba(0,0,0,.55) !important;
}

.dx-item.is-active{
  transform: translateY(-6px) rotate(-.35deg) scale(1.01) !important;
  border-color: rgba(255,255,255,.28) !important;
}

.dx-item.is-active::after{
  opacity: .62 !important;
}

.dx-no{
  font-size: 13px !important;
  opacity: .92 !important;
}

.dx-name{
  font-size: 18px !important;
  letter-spacing: .12em !important;
}

/* правый viewer — больше “кино-монитор” */
.dx-view{
  border-color: rgba(255,255,255,.16) !important;
  box-shadow: 0 55px 170px rgba(0,0,0,.80) !important;
}

/* “двойная рамка” + акцент по цвету кейса */
.dx-view-frame::after{
  content:"";
  position:absolute;
  inset: 10px;
  border-radius: 22px;
  pointer-events:none;
  border: 1px solid rgba(255,255,255,.16);
  box-shadow:
    inset 0 0 0 1px rgba(0,0,0,.25),
    0 0 0 1px rgba(0,0,0,.15);
}

/* делаем “акцентную кромку” под выбранный кейс */
.dx-view-frame::before{
  content:"";
  position:absolute;
  inset: 10px;
  border-radius: 22px;
  pointer-events:none;
  background: radial-gradient(520px 220px at 22% 0%,
    var(--accent, rgba(255,190,90,.75)),
    rgba(0,0,0,0) 70%);
  opacity: .22;
  mix-blend-mode: screen;
}

/* красные пины/нить — смелее */
.dx-pin{
  width: 12px !important;
  height: 12px !important;
  box-shadow: 0 0 26px rgba(255,70,70,.34) !important;
}

.dx-string{
  border-right-width: 3px !important;
  border-top-width: 3px !important;
  opacity: .88 !important;
  filter: saturate(1.2);
}

/* “царапка”/скан на viewer — чуть заметнее */
.dx-scan{
  opacity: .28 !important;
}

/* лента улик — более “плёночная” */
.dx-strip{
  background: rgba(0,0,0,.18) !important;
}

.dx-thumb{
  border-color: rgba(255,255,255,.14) !important;
  box-shadow: 0 22px 80px rgba(0,0,0,.62) !important;
}

@media (hover:hover){
  .dx-thumb:hover{
    transform: translateY(-3px) rotate(-.2deg);
    transition: transform .18s ease;
  }
}

/* ===============================================================================================================================================================================
   DOSSIER / INDEX — BASE + 16:9 + FAT
========================= */

.dossier-index{
  position: relative;
  overflow: hidden;
  isolation: isolate;
  padding-top: clamp(74px, 10vh, 140px);
  padding-bottom: clamp(74px, 10vh, 140px);
}

.dossier-index::before{
  content:"";
  position:absolute;
  inset:-2px;
  background:
    radial-gradient(900px 520px at 50% 0%, rgba(255,255,255,.06), rgba(0,0,0,0) 62%),
    radial-gradient(820px 520px at var(--mx, 50%) var(--my, 35%), rgba(255,190,90,.10), rgba(0,0,0,0) 60%),
    repeating-linear-gradient(0deg, rgba(255,255,255,.020) 0px, rgba(255,255,255,.020) 1px, rgba(0,0,0,0) 10px, rgba(0,0,0,0) 16px),
    radial-gradient(circle at 50% 50%, rgba(0,0,0,0) 0%, rgba(0,0,0,.58) 72%, rgba(0,0,0,.75) 100%);
  opacity: .9;
  pointer-events:none;
}

.dossier-index .container{ position: relative; z-index: 1; }

.dx-head{ text-align:center; }
.dx-kicker{
  display:inline-flex;
  align-items:center;
  gap:10px;
  letter-spacing:.28em;
  text-transform:uppercase;
  font-size:11px;
  opacity:.84;
}
.dx-dot{
  width:8px;height:8px;border-radius:999px;
  background: rgba(255,214,140,.95);
  box-shadow: 0 0 18px rgba(255,190,90,.45);
}
.dx-title{ margin-top: 14px; position: relative; }
.dx-title-ghost{
  position:absolute;
  left:50%; top:-22px;
  transform: translateX(-50%);
  font-weight:900;
  letter-spacing:.32em;
  text-transform: uppercase;
  font-size: clamp(56px, 10vw, 170px);
  opacity:.095;
  white-space: nowrap;
  pointer-events:none;
  filter: blur(.2px);
}
.dx-title-main{
  font-weight:900;
  letter-spacing:.36em;
  text-transform:uppercase;
  font-size: clamp(30px, 4.1vw, 68px);
  text-shadow:
    0 0 22px rgba(255, 190, 90, .14),
    0 0 60px rgba(255, 170, 80, .08);
}
.dx-rule{
  margin: 10px auto 0;
  display:flex;
  gap: 12px;
  justify-content:center;
  flex-wrap: wrap;
  font-size: 12px;
  letter-spacing: .14em;
  text-transform: uppercase;
  opacity: .84;
}
.dx-rule-a{ color: rgba(255,210,150,.95); text-shadow: 0 0 18px rgba(255,190,90,.18); }
.dx-rule-b{ opacity: .92; }

.dx-grid{
  margin-top: clamp(18px, 4vh, 32px);
  display:grid;
  grid-template-columns: minmax(320px, 420px) 1fr;
  gap: clamp(16px, 3vw, 34px);
  align-items:start;
}

/* LEFT */
.dx-left{
  position: relative;
  border-radius: 26px;
  border: 1px solid rgba(255,255,255,.16);
  background:
    radial-gradient(720px 420px at 15% 0%, rgba(255,255,255,.06), rgba(0,0,0,0) 60%),
    rgba(0,0,0,.18);
  box-shadow: 0 45px 140px rgba(0,0,0,.78);
  overflow:hidden;
}
.dx-left-top{
  display:flex;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 14px 10px;
  border-bottom: 1px solid rgba(255,255,255,.10);
  background: linear-gradient(180deg, rgba(255,255,255,.05), rgba(0,0,0,0));
}
.dx-label{
  font-size:10px;
  letter-spacing:.28em;
  text-transform:uppercase;
  opacity:.78;
}
.dx-hint{
  font-size:10px;
  letter-spacing:.18em;
  text-transform:uppercase;
  opacity:.52;
}
.dx-list{
  list-style:none;
  margin:0;
  padding: 10px;
  display:grid;
  gap: 10px;
}
.dx-item{
  --ac: rgba(255,190,90,.35);
  width:100%;
  text-align:left;
  cursor:pointer;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 24px;
  padding: 14px 14px 12px;
  background:
    radial-gradient(520px 240px at 10% 0%, rgba(255,255,255,.06), rgba(0,0,0,0) 60%),
    rgba(255,255,255,.03);
  box-shadow: 0 24px 80px rgba(0,0,0,.55);
  color: inherit;
  position: relative;
  overflow:hidden;
  transition: transform .22s ease, border-color .22s ease, box-shadow .22s ease, filter .22s ease;
}
.dx-item::after{
  content:"";
  position:absolute;
  inset:-1px;
  background: radial-gradient(520px 220px at 20% 0%, var(--ac), rgba(0,0,0,0) 70%);
  opacity: 0;
  transition: opacity .22s ease;
  pointer-events:none;
}
.dx-item.is-active{
  transform: translateY(-6px) rotate(-.35deg) scale(1.01);
  border-color: rgba(255,255,255,.28);
}
.dx-item.is-active::after{ opacity: .62; }

.dx-no{ font-weight:900; letter-spacing:.18em; font-size: 13px; opacity:.92; }
.dx-name{ display:block; margin-top: 6px; font-weight:900; text-transform: uppercase; letter-spacing:.12em; font-size: 18px; }

.dx-tags{ display:flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.dx-tag{
  font-style: normal;
  font-size: 10px;
  letter-spacing: .22em;
  text-transform: uppercase;
  padding: 6px 9px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(0,0,0,.14);
  opacity: .86;
}
.dx-tag.dim{ opacity: .58; }
.dx-tag.hot{
  color: rgba(255, 214, 140, 0.98);
  border-color: rgba(255, 190, 90, .36);
  box-shadow: 0 0 26px rgba(255, 190, 90, .14);
}
.dx-note{ display:block; margin-top: 10px; font-size: 13px; line-height: 1.5; opacity: .72; }

@media (hover:hover){
  .dx-item:hover{
    transform: translateY(-6px) rotate(-.2deg);
    border-color: rgba(255,255,255,.22);
    box-shadow: 0 28px 90px rgba(0,0,0,.62);
    filter: saturate(1.05);
  }
  .dx-item:hover::after{ opacity: .35; }
}

/* RIGHT */
.dx-view{
  --accent: rgba(255,190,90,.92);
  border-radius: 28px;
  border: 1px solid rgba(255,255,255,.16);
  background: rgba(0,0,0,.12);
  box-shadow: 0 55px 170px rgba(0,0,0,.80);
  overflow:hidden;
}

.dx-view-frame{
  position: relative;
  border-radius: 28px;
  padding: 10px;
  background:
    radial-gradient(900px 520px at 30% 0%, rgba(255,255,255,.06), rgba(0,0,0,0) 60%),
    rgba(0,0,0,.22);
  display: grid;
}
.dx-view-frame > *{ grid-area: 1 / 1; }

.dx-view-frame::after{
  content:"";
  position:absolute;
  inset: 10px;
  border-radius: 22px;
  pointer-events:none;
  border: 1px solid rgba(255,255,255,.16);
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.25);
}
.dx-view-frame::before{
  content:"";
  position:absolute;
  inset: 10px;
  border-radius: 22px;
  pointer-events:none;
  background: radial-gradient(520px 220px at 22% 0%, var(--accent), rgba(0,0,0,0) 70%);
  opacity: .22;
  mix-blend-mode: screen;
}

/* 16:9 main viewer */
.dx-view-img{
  width:100%;
  height:auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display:block;
  border-radius: 22px;
  border: 1px solid rgba(255,255,255,.10);
  filter: contrast(1.10) saturate(1.04);
  transform: scale(1.02);
}

/* scan */
.dx-scan{
  border-radius: 22px;
  margin: 10px;
  background: repeating-linear-gradient(0deg, rgba(255,255,255,.020) 0px, rgba(255,255,255,.020) 1px, rgba(0,0,0,0) 10px, rgba(0,0,0,0) 18px);
  opacity: .28;
  pointer-events:none;
}

.dx-strip{
  padding: 12px 14px 14px;
  border-top: 1px solid rgba(255,255,255,.10);
  background: rgba(0,0,0,.18);
}
.dx-strip-label{
  font-size: 10px;
  letter-spacing: .28em;
  text-transform: uppercase;
  opacity: .68;
  margin-bottom: 10px;
}
.dx-thumbs{
  display:flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 4px;
  scroll-snap-type: x mandatory;
}
.dx-thumb{
  width: clamp(150px, 18vw, 240px);
  height:auto;
  aspect-ratio: 16 / 9;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,.14);
  overflow:hidden;
  background: rgba(0,0,0,.20);
  box-shadow: 0 22px 80px rgba(0,0,0,.62);
  cursor: pointer;
  flex: 0 0 auto;
  scroll-snap-align: start;
  position: relative;
}
.dx-thumb img{
  width:100%;
  height:100%;
  object-fit: cover;
  display:block;
  transform: scale(1.04);
  filter: contrast(1.10) saturate(1.03);
}

.dx-brief{
  padding: 14px;
  border-top: 1px solid rgba(255,255,255,.10);
  background: rgba(0,0,0,.10);
  display:grid;
  gap: 10px;
}
.dx-brief-row{
  display:grid;
  grid-template-columns: 120px 1fr;
  gap: 10px;
  align-items: baseline;
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 18px;
  padding: 10px 10px 9px;
  background: rgba(255,255,255,.03);
}
.dx-brief-row .k{
  font-size: 10px;
  letter-spacing: .28em;
  text-transform: uppercase;
  opacity: .62;
}
.dx-brief-row .v{
  font-size: 13px;
  line-height: 1.5;
  opacity: .86;
}

@media (max-width: 980px){
  .dx-grid{ grid-template-columns: 1fr; }
}

/* Keep brief rows stable height (prevents reflow on hover preview) */
.dx-brief-row .v{
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2; /* максимум 2 строки */
  overflow: hidden;
}

.dx-brief-row{
  min-height: 58px; /* одинаковая высота строк */
}

/* Make left column width stable */
.dx-grid{
  grid-template-columns: clamp(320px, 34vw, 420px) 1fr;
}

/* === Dossier Index: stop right column resizing === */
.dx-grid{
  /* важно: второй столбец должен уметь сжиматься */
  grid-template-columns: clamp(320px, 34vw, 420px) minmax(0, 1fr) !important;
}

.dx-right,
.dx-view,
.dx-strip,
.dx-thumbs{
  min-width: 0;
}

/* лента миниатюр — строго одна строка + горизонтальный скролл */
.dx-thumbs{
  flex-wrap: nowrap !important;
  overflow-x: auto !important;
}

.dx-strip{
  overflow: hidden; /* чтобы “лишнее” не раздвигало блок */
}

.dx-thumb{
  flex: 0 0 auto;
}

/* === Evidence strip: hide ugly scrollbar but keep scrolling === */
.dx-thumbs{
  scrollbar-width: none;      /* Firefox */
  -ms-overflow-style: none;   /* old Edge */
}
.dx-thumbs::-webkit-scrollbar{
  height: 0;
}

/* ===============================================================================================================================================================================
   EVIDENCE STRIP (clean): no pseudo circles, only real arrow buttons
========================= */

.dx-strip{
  padding: 12px 14px 14px;
  border-top: 1px solid rgba(255,255,255,.10);
  background: rgba(0,0,0,.18);
}

.dx-strip-label{
  font-size: 10px;
  letter-spacing: .28em;
  text-transform: uppercase;
  opacity: .68;
  margin-bottom: 10px;
}

.dx-strip-body{
  position: relative;
}

/* thumbs row */
.dx-thumbs{
  display:flex;
  gap: 10px;
  flex-wrap: nowrap;
  overflow-x: auto;
  scroll-snap-type: x mandatory;

  padding: 0 50px 4px; /* место под стрелки слева/справа */
  min-width: 0;

  scrollbar-width: none;      /* Firefox */
  -ms-overflow-style: none;   /* old Edge */
}
.dx-thumbs::-webkit-scrollbar{ height: 0; }

.dx-thumb{
  width: clamp(150px, 18vw, 240px);
  aspect-ratio: 16 / 9;
  height: auto;
  flex: 0 0 auto;

  border-radius: 16px;
  border: 1px solid rgba(255,255,255,.14);
  overflow:hidden;
  background: rgba(0,0,0,.20);
  box-shadow: 0 22px 80px rgba(0,0,0,.62);
  cursor: pointer;

  scroll-snap-align: start;
  position: relative;
}

.dx-thumb img{
  width:100%;
  height:100%;
  object-fit: cover;
  display:block;
  transform: scale(1.04);
  filter: contrast(1.10) saturate(1.03);
}

/* arrows */
.dx-arrow{
  position: absolute;
  top: 50%;
  transform: translateY(-50%);

  width: 36px;
  height: 36px;
  padding: 0;

  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(0,0,0,.38);
  color: rgba(255,255,255,.90);

  display: flex;
  align-items: center;
  justify-content: center;

  box-shadow: 0 18px 60px rgba(0,0,0,.45);
  backdrop-filter: blur(6px);

  font-size: 22px;
  line-height: 1;
  cursor: pointer;

  z-index: 5;
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s ease, transform .18s ease, background .18s ease;
}

.dx-arrow-left{ left: 10px; }
.dx-arrow-right{ right: 10px; }

/* оптическая коррекция символа */
.dx-arrow > span{
  display:block;
  transform: translateY(-3px);
}

.dx-strip.has-left .dx-arrow-left,
.dx-strip.has-right .dx-arrow-right{
  opacity: .92;
  pointer-events: auto;
}

@media (hover:hover){
  .dx-arrow:hover{
    background: rgba(0,0,0,.52);
    transform: translateY(calc(-50% - 1px));
  }
}

/* чтобы стрелки не мешали клику по превью — добавим паддинги внутри скролла */
.dx-thumbs{
  padding-left: 50px;
  padding-right: 50px;
}

/* === DOSSIER title image === */
.dx-title-imgwrap{
  margin-top: 10px;
  width: 100%;
  display: flex;
  justify-content: center;
}

.dx-title-img{
  display: block;
  width: min(240px, 28vw);   /* было ~980px — стало меньше */
  max-width: 100%;
  height: auto;
  margin: 0 auto;
  filter: drop-shadow(0 18px 55px rgba(0,0,0,.65));
}
