/* =======================================================================
   403 — ПРОМОАКЦИЯ БЕСКОНЕЧНОЙ ЖИЗНИ · ПаБЖ
   Холодная ночная дымка из постера + концепция «запретной системы 403».
   ======================================================================= */

:root {
  /* --- палитра, снятая с постера --- */
  --void: #07080d;        /* холодный почти-чёрный */
  --night: #10131f;       /* глубокий сине-чёрный */
  --haze: #9aa0b3;        /* серо-лавандовая дымка (основной текст) */
  --frost: #cdc8d8;       /* бледная лаванда (заголовки) */
  --pink-frost: #c3a3b4;  /* розовый туман */
  --amber: #d2a468;       /* тусклый янтарь огней города */
  --bloom: #eef1f8;       /* холодный белый bloom */
  --blood: #8a2525;       /* приглушённый оксблад (403 / тревога) */

  /* --- шрифты --- */
  --font-serif: 'EB Garamond', Georgia, 'Times New Roman', serif;
  --font-mono: 'Space Mono', ui-monospace, 'Courier New', monospace;
  --font-crt: 'VT323', 'Space Mono', monospace;

  /* --- размеры (используем dvh/svh ради мобильных адресных баров) --- */
  --vh: 100svh;

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

html {
  background: var(--void);
}

body {
  position: relative;
  background:
    radial-gradient(120% 80% at 50% 8%, rgba(48, 40, 64, 0.35), transparent 60%),
    radial-gradient(140% 90% at 50% 110%, rgba(210, 164, 104, 0.10), transparent 55%),
    var(--void);
  color: var(--haze);
  font-family: var(--font-mono);
  overflow-x: hidden;
  /* отступы под «чёлку» / safe-area на мобильных */
  padding:
    env(safe-area-inset-top)
    env(safe-area-inset-right)
    env(safe-area-inset-bottom)
    env(safe-area-inset-left);
}

/* во время экрана входа блокируем скролл */
body.is-locked {
  overflow: hidden;
  height: 100svh;
}

/* спрятать системный курсор только там, где есть наш кастомный (десктоп с мышью) */
@media (hover: hover) and (pointer: fine) {
  body.has-cursor,
  body.has-cursor * {
    cursor: none;
  }
}

/* =======================================================================
   ГЛОБАЛЬНЫЕ СЛОИ: зерно, дымка, курсор
   ======================================================================= */
#grain {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 90;
  pointer-events: none;
  opacity: 0.05;
  mix-blend-mode: overlay;
}

.haze {
  position: fixed;
  inset: 0;
  z-index: 80;
  pointer-events: none;
  background:
    radial-gradient(130% 100% at 50% 50%, transparent 55%, rgba(7, 8, 13, 0.7) 100%);
  mix-blend-mode: multiply;
}

#cursor {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 120;
  width: 10px;
  height: 10px;
  margin: -5px 0 0 -5px;
  border-radius: 50%;
  background: var(--bloom);
  box-shadow:
    0 0 8px 2px rgba(238, 241, 248, 0.6),
    0 0 28px 8px rgba(195, 163, 180, 0.45);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s, transform 0.12s var(--ease);
  display: none;
}
/* курсор только на устройствах с настоящей мышью */
@media (hover: hover) and (pointer: fine) {
  #cursor { display: block; }
}

/* =======================================================================
   ПЕРЕКЛЮЧАТЕЛЬ ЗВУКА
   ======================================================================= */
.audio-toggle {
  position: fixed;
  top: calc(env(safe-area-inset-top) + 14px);
  right: calc(env(safe-area-inset-right) + 14px);
  z-index: 110;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  min-height: 44px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--haze);
  background: rgba(7, 8, 13, 0.4);
  border: 1px solid rgba(154, 160, 179, 0.25);
  backdrop-filter: blur(4px);
  opacity: 0.55;
  transition: opacity 0.3s, border-color 0.3s, color 0.3s;
}
.audio-toggle:hover { opacity: 1; }
.audio-toggle[aria-pressed='true'] {
  color: var(--frost);
  border-color: rgba(210, 164, 104, 0.5);
  opacity: 0.85;
}
.audio-toggle__bars {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 14px;
}
.audio-toggle__bars i {
  width: 2px;
  height: 4px;
  background: currentColor;
  opacity: 0.5;
}
.audio-toggle[aria-pressed='true'] .audio-toggle__bars i {
  animation: eq 1.1s ease-in-out infinite;
}
.audio-toggle__bars i:nth-child(2) { animation-delay: 0.2s; }
.audio-toggle__bars i:nth-child(3) { animation-delay: 0.4s; }
.audio-toggle__bars i:nth-child(4) { animation-delay: 0.1s; }
@keyframes eq {
  0%, 100% { height: 4px; opacity: 0.5; }
  50%      { height: 14px; opacity: 1; }
}

/* =======================================================================
   ЭКРАН ВХОДА / BOOT
   ======================================================================= */
.gate {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 24px;
  background: var(--void);
  overflow: hidden;                 /* scanlines/виньетка не должны вылезать */
  transition: opacity 1.2s var(--ease);
}
.gate.is-gone {
  opacity: 0;
  pointer-events: none;
}

/* --- CRT-монитор: scanlines + бегущая развёртка, виньетка тубуса, мерцание --- */
.gate::before {
  content: '';
  position: absolute;               /* absolute → не становится grid-элементом */
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(rgba(205, 200, 216, 0.06), rgba(205, 200, 216, 0.06))
      0 0 / 100% 26px no-repeat,     /* мягкая бегущая строка развёртки */
    repeating-linear-gradient(0deg,
      rgba(0, 0, 0, 0.30) 0 1px,
      transparent 1px 3px);          /* статичные scanlines */
  animation: crt-scan 7.5s linear infinite;
}
.gate::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(120% 120% at 50% 50%, transparent 56%, rgba(0, 0, 0, 0.6) 100%);
}
@keyframes crt-scan {
  0%   { background-position: 0 -8%, 0 0; }
  100% { background-position: 0 108%, 0 0; }
}

.gate__inner {
  position: relative;
  z-index: 2;                        /* контент над scanlines */
  width: min(560px, 100%);
  text-align: left;
  /* включение монитора, затем лёгкое мерцание фосфора */
  animation:
    crt-on 0.9s var(--ease) both,
    crt-flicker 4.5s steps(48) 0.9s infinite;
}
@keyframes crt-on {
  0%   { transform: scaleY(0.004); opacity: 0; filter: brightness(6); }
  45%  { transform: scaleY(0.02);  opacity: 1; filter: brightness(3); }
  60%  { transform: scaleY(1);     filter: brightness(1.6); }
  100% { transform: scaleY(1);     opacity: 1; filter: brightness(1); }
}
@keyframes crt-flicker {
  0%, 100% { opacity: 1; }
  3%  { opacity: 0.86; }
  6%  { opacity: 1; }
  50% { opacity: 0.92; }
  53% { opacity: 1; }
}
.boot {
  font-family: var(--font-crt);
  font-size: clamp(16px, 4.5vw, 22px);
  line-height: 1.35;
  color: var(--haze);
  white-space: pre-wrap;
  /* свечение фосфора + лёгкая хроматическая аберрация (RGB-сдвиг) */
  text-shadow:
    0 0 6px rgba(154, 160, 179, 0.45),
    0.5px 0 1px rgba(99, 155, 195, 0.45),
   -0.5px 0 1px rgba(138, 37, 37, 0.4);
  min-height: 9.5em;
}
.boot .ok { color: var(--amber); }
.boot .bad { color: var(--blood); text-shadow: 0 0 8px rgba(138, 37, 37, 0.6); }
.boot .cursor-blink {
  animation: blink 1.05s step-end infinite;
}
@keyframes blink { 50% { opacity: 0; } }

.enter {
  margin-top: 28px;
  font-family: var(--font-mono);
  font-size: clamp(14px, 3.6vw, 17px);
  letter-spacing: 0.12em;
  color: var(--frost);
  padding: 14px 6px;
  min-height: 48px;
  text-shadow: 0 0 14px rgba(205, 200, 216, 0.4);
  animation: breathe 3.4s ease-in-out infinite;
  transition: color 0.3s, letter-spacing 0.4s var(--ease);
}
.enter:hover,
.enter:focus-visible {
  color: var(--bloom);
  letter-spacing: 0.2em;
}
.enter__bracket { color: var(--amber); }
.enter__text { padding: 0 0.5em; }

@keyframes breathe {
  0%, 100% { opacity: 0.55; }
  50%      { opacity: 1; }
}

/* =======================================================================
   КОНТЕНТ (появляется после входа)
   ======================================================================= */
.content {
  opacity: 0;
  transition: opacity 1.6s var(--ease);
}
.content.is-revealed {
  opacity: 1;
}

/* =======================================================================
   HERO
   ======================================================================= */
.hero {
  position: relative;
  min-height: 100svh;
  display: grid;
  place-items: center;
  overflow: hidden;
  isolation: isolate;
}
.hero__poster {
  position: absolute;
  inset: -6%;
  z-index: -2;
}
.hero__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.7) brightness(0.78) blur(2px);
  opacity: 0.92;
  animation: drift 38s ease-in-out infinite alternate;
}
@keyframes drift {
  0%   { transform: scale(1.08) translate(0, 0); }
  100% { transform: scale(1.16) translate(-2%, -2.5%); }
}
.hero__veil {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(80% 60% at 50% 45%, rgba(16, 19, 31, 0.15), rgba(7, 8, 13, 0.82) 100%),
    linear-gradient(180deg, rgba(7, 8, 13, 0.55) 0%, transparent 30%, rgba(7, 8, 13, 0.85) 100%);
}

.hero__center {
  position: relative;
  text-align: center;
  padding: 24px;
  width: 100%;
}

/* призрачная «403» */
.ghost-403 {
  position: relative;
  font-family: var(--font-serif);
  font-weight: 300;
  font-size: clamp(110px, 38vw, 360px);
  line-height: 0.9;
  color: rgba(205, 200, 216, 0.16);
  letter-spacing: 0.02em;
  user-select: none;
  text-shadow:
    0 0 40px rgba(195, 163, 180, 0.25),
    0 0 90px rgba(238, 241, 248, 0.12);
  animation: ghostpulse 6s ease-in-out infinite;
}
/* двойная экспозиция / смазанные дубли как на постере */
.ghost-403::before,
.ghost-403::after {
  content: attr(data-glitch);
  position: absolute;
  inset: 0;
  color: rgba(205, 200, 216, 0.1);
  filter: blur(3px);
}
.ghost-403::before { transform: translate(4px, -3px); }
.ghost-403::after  { transform: translate(-5px, 4px); }

@keyframes ghostpulse {
  0%, 100% { opacity: 0.85; }
  50%      { opacity: 1; }
}

.hero__title {
  margin-top: -0.15em;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4em;
}
.hero__brand {
  position: relative;
  display: inline-block;
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(38px, 12vw, 104px);
  letter-spacing: 0.06em;
  /* многослойная заливка глифов: иней → розовый туман → янтарь */
  background: linear-gradient(180deg,
    var(--bloom) 0%, var(--frost) 38%, var(--pink-frost) 72%, var(--amber) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  /* свечение по форме глифов (text-shadow на прозрачном тексте не виден) */
  filter:
    drop-shadow(0 0 18px rgba(238, 241, 248, 0.35))
    drop-shadow(0 0 42px rgba(195, 163, 180, 0.30));
}
/* призрачный дубль за логотипом — двойная экспозиция, как у «403» */
.hero__brand::before {
  content: 'ПаБЖ';
  position: absolute;
  inset: 0;
  z-index: -1;
  color: rgba(195, 163, 180, 0.22);
  -webkit-text-fill-color: rgba(195, 163, 180, 0.22);
  filter: blur(6px);
  transform: translate(2px, 3px);
}
/* комплексная типографика serif: лигатуры/кернинг/оптическая читаемость */
.hero__brand,
.reveal,
.agreement__title,
.accepted__title,
.field__input {
  font-feature-settings: 'liga' 1, 'kern' 1;
  text-rendering: optimizeLegibility;
}
.hero__campaign {
  font-family: var(--font-mono);
  font-size: clamp(10px, 2.6vw, 14px);
  text-transform: uppercase;
  letter-spacing: 0.42em;
  color: var(--haze);
  text-indent: 0.42em;
}
.hero__tagline {
  margin-top: 1.6em;
  font-family: var(--font-mono);
  font-size: clamp(13px, 3.4vw, 18px);
  letter-spacing: 0.18em;
  color: var(--amber);
  min-height: 1.4em;
}

.scroll-hint {
  position: absolute;
  bottom: calc(env(safe-area-inset-bottom) + 22px);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: rgba(154, 160, 179, 0.6);
}
.scroll-hint__arrow {
  font-size: 16px;
  animation: bob 2.4s ease-in-out infinite;
}
@keyframes bob {
  0%, 100% { transform: translateY(0); opacity: 0.5; }
  50%      { transform: translateY(6px); opacity: 1; }
}

/* =======================================================================
   МАНИФЕСТ
   ======================================================================= */
.manifest {
  padding: clamp(80px, 18vh, 200px) 24px;
  display: grid;
  place-items: center;
}
.manifest__wrap {
  width: min(720px, 100%);
  display: flex;
  flex-direction: column;
  gap: clamp(40px, 9vh, 90px);
  text-align: center;
}
.reveal {
  font-family: var(--font-serif);
  font-weight: 300;
  font-size: clamp(22px, 5.4vw, 40px);
  line-height: 1.35;
  color: var(--haze);
  opacity: 0;
  transform: translateY(22px);
  filter: blur(6px);
  transition: opacity 1.4s var(--ease), transform 1.4s var(--ease), filter 1.4s var(--ease);
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
  filter: blur(0);
}
.reveal.big {
  font-size: clamp(30px, 8vw, 64px);
  color: var(--frost);
}
.reveal.dim { color: rgba(154, 160, 179, 0.5); }

/* =======================================================================
   СОГЛАШЕНИЕ
   ======================================================================= */
.agreement {
  padding: clamp(60px, 12vh, 140px) 20px;
  display: grid;
  place-items: center;
}
.agreement__panel {
  width: min(640px, 100%);
  background: linear-gradient(180deg, rgba(16, 19, 31, 0.7), rgba(7, 8, 13, 0.7));
  border: 1px solid rgba(154, 160, 179, 0.2);
  box-shadow:
    0 0 0 1px rgba(7, 8, 13, 0.6),
    0 30px 80px rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(6px);
  padding: clamp(22px, 5vw, 40px);
}
.agreement__head {
  border-bottom: 1px solid rgba(154, 160, 179, 0.18);
  padding-bottom: 18px;
  margin-bottom: 20px;
}
.agreement__code {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.2em;
  color: var(--blood);
  text-shadow: 0 0 10px rgba(138, 37, 37, 0.4);
}
.agreement__title {
  margin-top: 10px;
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(26px, 7vw, 44px);
  color: var(--frost);
  letter-spacing: 0.01em;
}
.agreement__sub {
  margin-top: 6px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: rgba(154, 160, 179, 0.7);
}

.agreement__doc {
  max-height: min(46vh, 360px);
  overflow-y: auto;
  padding: 4px 14px 4px 2px;
  margin-bottom: 22px;
  border: 1px solid rgba(154, 160, 179, 0.12);
  background: rgba(7, 8, 13, 0.35);
  scrollbar-width: thin;
  scrollbar-color: rgba(154, 160, 179, 0.4) transparent;
  -webkit-overflow-scrolling: touch;
}
.agreement__doc::-webkit-scrollbar { width: 8px; }
.agreement__doc::-webkit-scrollbar-track { background: transparent; }
.agreement__doc::-webkit-scrollbar-thumb {
  background: rgba(154, 160, 179, 0.35);
}
.clause {
  font-family: var(--font-mono);
  font-size: clamp(12px, 3.2vw, 14px);
  line-height: 1.7;
  color: var(--haze);
  padding: 12px;
}
.clause + .clause { border-top: 1px solid rgba(154, 160, 179, 0.08); }
.clause__n {
  display: inline-block;
  min-width: 2.6em;
  color: var(--amber);
}
.clause--final {
  color: var(--frost);
  text-shadow: 0 0 14px rgba(195, 163, 180, 0.3);
}
.clause--final .clause__n { color: var(--pink-frost); }

/* форма */
.agreement__form {
  display: flex;
  flex-direction: column;
  gap: 22px;
}
.field { display: flex; flex-direction: column; gap: 8px; }
.field__label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(154, 160, 179, 0.7);
}
.field__input {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(18px, 5vw, 24px);
  color: var(--frost);
  padding: 8px 2px;
  border-bottom: 1px solid rgba(154, 160, 179, 0.3);
  transition: border-color 0.3s, box-shadow 0.3s;
}
.field__input::placeholder { color: rgba(154, 160, 179, 0.3); font-style: italic; }
.field__input:focus {
  outline: none;
  border-color: var(--amber);
  box-shadow: 0 1px 0 0 rgba(210, 164, 104, 0.4);
}

/* кастомный чекбокс с увеличенной тач-зоной */
.check {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  min-height: 44px;
  cursor: pointer;
  opacity: 0.45;
  transition: opacity 0.4s;
}
.check:has(.check__box:not(:disabled)) { opacity: 1; }
.check__box {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}
.check__mark {
  flex: 0 0 auto;
  width: 26px;
  height: 26px;
  margin-top: 1px;
  border: 1px solid rgba(154, 160, 179, 0.5);
  display: grid;
  place-items: center;
  transition: border-color 0.25s, background 0.25s, box-shadow 0.25s;
}
.check__mark::after {
  content: '✕';
  font-family: var(--font-mono);
  font-size: 16px;
  color: var(--bloom);
  opacity: 0;
  transform: scale(0.4);
  transition: opacity 0.2s, transform 0.2s var(--ease);
}
.check__box:checked + .check__mark {
  border-color: var(--amber);
  background: rgba(210, 164, 104, 0.12);
  box-shadow: 0 0 16px rgba(210, 164, 104, 0.3);
}
.check__box:checked + .check__mark::after { opacity: 1; transform: scale(1); }
.check__box:focus-visible + .check__mark { outline: 1px solid var(--amber); outline-offset: 3px; }
.check__text {
  font-family: var(--font-mono);
  font-size: clamp(13px, 3.6vw, 15px);
  line-height: 1.5;
  color: var(--frost);
}

.agreement__lock {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: rgba(210, 164, 104, 0.65);
  transition: opacity 0.4s;
}
.agreement__lock.is-hidden { opacity: 0; height: 0; margin: 0; overflow: hidden; }

.accept-btn {
  font-family: var(--font-mono);
  font-size: clamp(15px, 4.2vw, 18px);
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--haze);
  padding: 18px;
  min-height: 56px;
  border: 1px solid rgba(154, 160, 179, 0.3);
  background: rgba(7, 8, 13, 0.4);
  transition: all 0.35s var(--ease);
}
.accept-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}
.accept-btn:not(:disabled) {
  color: var(--frost);
  border-color: rgba(210, 164, 104, 0.5);
  box-shadow: 0 0 28px rgba(210, 164, 104, 0.12);
  animation: breathe 3.4s ease-in-out infinite;
}
.accept-btn:not(:disabled):hover,
.accept-btn:not(:disabled):focus-visible {
  color: var(--void);
  background: var(--amber);
  letter-spacing: 0.4em;
  box-shadow: 0 0 50px rgba(210, 164, 104, 0.5);
  animation: none;
}

/* =======================================================================
   РЕВИЛ / ПОСЛЕ ПРИНЯТИЯ
   ======================================================================= */
.accepted {
  position: fixed;
  inset: 0;
  z-index: 105;
  display: grid;
  place-items: center;
  padding: 24px;
  /* плотный фон + блюр: текст ревила не сливается с hero за ним */
  background:
    radial-gradient(120% 90% at 50% 45%, rgba(16, 19, 31, 0.96), rgba(7, 8, 13, 0.99) 75%);
  backdrop-filter: blur(10px) saturate(0.9);
  -webkit-backdrop-filter: blur(10px) saturate(0.9);
  opacity: 0;
  /* важно: .accepted задаёт display:grid и перебивает [hidden]. Без этого
     прозрачный оверлей блокировал бы клики, а ссылки внутри ловились бы Tab'ом.
     visibility:hidden делает секцию полностью инертной до показа. */
  visibility: hidden;
  pointer-events: none;
  transition: opacity 1.4s var(--ease);
}
.accepted.is-shown { opacity: 1; visibility: visible; pointer-events: auto; }
.accepted__center { text-align: center; width: min(620px, 100%); }
.ghost-403--small {
  font-size: clamp(80px, 26vw, 200px);
  margin-bottom: 0.1em;
}
.accepted__title {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(28px, 8vw, 56px);
  color: var(--frost);
  letter-spacing: 0.02em;
  min-height: 1.2em;
  text-shadow: 0 0 30px rgba(195, 163, 180, 0.3);
}
.accepted__line {
  margin-top: 0.8em;
  font-family: var(--font-mono);
  font-size: clamp(14px, 4vw, 18px);
  letter-spacing: 0.08em;
  color: var(--frost);
  text-shadow: 0 1px 14px rgba(7, 8, 13, 0.85);
}
.accepted__line.dim { color: rgba(205, 200, 216, 0.72); }
.accepted__timer {
  margin-top: 2.2em;
  font-family: var(--font-mono);
  font-size: clamp(13px, 3.4vw, 16px);
  letter-spacing: 0.1em;
  color: rgba(154, 160, 179, 0.7);
}
.accepted__timer-num { color: var(--amber); }
.accepted__links {
  margin-top: 2.4em;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 14px 28px;
}
.accepted__link {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--frost);
  padding: 12px 18px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(154, 160, 179, 0.25);
  transition: all 0.3s var(--ease);
}
.accepted__link:hover,
.accepted__link:focus-visible {
  color: var(--amber);
  border-color: rgba(210, 164, 104, 0.5);
  box-shadow: 0 0 24px rgba(210, 164, 104, 0.15);
}
.accepted__link[data-placeholder] { opacity: 0.6; }
.accepted__note {
  margin-top: 1.4em;
  font-size: 11px;
  letter-spacing: 0.12em;
  color: rgba(154, 160, 179, 0.4);
}

/* =======================================================================
   ГЛИТЧ (точечно, класс .is-glitching)
   ======================================================================= */
[data-glitch].is-glitching::before {
  color: rgba(138, 37, 37, 0.55);
  animation: glitch-r 0.42s steps(2, end) 2;
}
[data-glitch].is-glitching::after {
  color: rgba(99, 155, 195, 0.5);
  animation: glitch-b 0.42s steps(2, end) 2;
}
@keyframes glitch-r {
  0%   { transform: translate(4px, -3px); clip-path: inset(0 0 70% 0); }
  25%  { transform: translate(-6px, 2px); clip-path: inset(40% 0 20% 0); }
  50%  { transform: translate(5px, 4px); clip-path: inset(10% 0 60% 0); }
  75%  { transform: translate(-4px, -2px); clip-path: inset(60% 0 5% 0); }
  100% { transform: translate(4px, -3px); clip-path: inset(0 0 70% 0); }
}
@keyframes glitch-b {
  0%   { transform: translate(-5px, 4px); clip-path: inset(50% 0 20% 0); }
  25%  { transform: translate(6px, -3px); clip-path: inset(10% 0 60% 0); }
  50%  { transform: translate(-4px, -4px); clip-path: inset(70% 0 5% 0); }
  75%  { transform: translate(5px, 2px); clip-path: inset(30% 0 40% 0); }
  100% { transform: translate(-5px, 4px); clip-path: inset(50% 0 20% 0); }
}

/* короткий полноэкранный сбой при принятии */
.screen-glitch {
  position: fixed;
  inset: 0;
  z-index: 130;
  pointer-events: none;
  background:
    repeating-linear-gradient(0deg, rgba(238,241,248,0.04) 0 2px, transparent 2px 4px);
  mix-blend-mode: screen;
  opacity: 0;
}
.screen-glitch.fire { animation: screenflash 0.7s steps(3, end) 1; }
@keyframes screenflash {
  0%   { opacity: 0; transform: translateX(0); }
  20%  { opacity: 0.8; transform: translateX(-6px); }
  40%  { opacity: 0.2; transform: translateX(8px); }
  60%  { opacity: 0.9; transform: translateX(-4px); }
  100% { opacity: 0; transform: translateX(0); }
}

/* символы скрэмбла чуть приглушены */
.scramble-char { color: var(--pink-frost); opacity: 0.8; }

/* =======================================================================
   ПАСХАЛКА: мимолётный «шёпот» по центру экрана
   ======================================================================= */
.whisper {
  position: fixed;
  left: 50%;
  top: 50%;
  z-index: 140;
  transform: translate(-50%, -50%) scale(0.96);
  max-width: min(80vw, 560px);
  text-align: center;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(20px, 5vw, 34px);
  line-height: 1.4;
  color: var(--frost);
  text-shadow:
    0 0 24px rgba(195, 163, 180, 0.5),
    0 2px 18px rgba(7, 8, 13, 0.9);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
}
.whisper.is-on {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

/* =======================================================================
   МОБИЛЬНАЯ ОПТИМИЗАЦИЯ
   ======================================================================= */

/* планшеты и узкие экраны */
@media (max-width: 640px) {
  /* меньше блюра на постере — дешевле для GPU телефона */
  .hero__img { filter: saturate(0.72) brightness(0.8) blur(1px); }
  .agreement__panel { backdrop-filter: blur(3px); }
  /* блюр ревила дешевле на телефоне (фон уже плотный) */
  .accepted {
    backdrop-filter: blur(5px) saturate(0.9);
    -webkit-backdrop-filter: blur(5px) saturate(0.9);
  }
  /* зерно чуть заметнее, чтобы не пропадало на маленьком экране */
  #grain { opacity: 0.07; }
  .ghost-403 { text-shadow: 0 0 24px rgba(195, 163, 180, 0.25); }
  /* на узких экранах двойная экспозиция ближе, чтобы не вылезала за края */
  .ghost-403::before { transform: translate(2px, -2px); }
  .ghost-403::after  { transform: translate(-3px, 2px); }
  .hero__campaign { letter-spacing: 0.3em; text-indent: 0.3em; }
}

/* очень маленькие телефоны */
@media (max-width: 380px) {
  .agreement__panel { padding: 18px 14px; }
  .agreement__doc { max-height: 50vh; }
  .check__text { font-size: 13px; }
  .accepted__links { gap: 10px; }
}

/* тач-устройства: убираем мышиную механику, усиливаем зоны нажатия */
@media (hover: none), (pointer: coarse) {
  #cursor { display: none !important; }
  .enter { padding: 18px 10px; }            /* крупнее тап */
  .scroll-hint { font-size: 10px; }
  /* hover-эффекты не залипают на тач — даём «активные» версии */
  .accept-btn:not(:disabled):active {
    color: var(--void);
    background: var(--amber);
  }
  .accepted__link:active { color: var(--amber); }
}

/* пейзажная ориентация на телефоне — ужимаем вертикальные отступы */
@media (max-height: 480px) and (orientation: landscape) {
  .manifest { padding: 60px 24px; }
  .manifest__wrap { gap: 40px; }
  .ghost-403 { font-size: clamp(90px, 22vh, 180px); }
  .agreement__doc { max-height: 38vh; }
}

/* экраны высокой плотности — зерно не должно «жечь» батарею (логика в JS),
   тут просто слегка снижаем непрозрачность */
@media (min-resolution: 2dppx) and (max-width: 640px) {
  #grain { opacity: 0.06; }
}

/* =======================================================================
   ДОСТУПНОСТЬ: уважаем «меньше движения»
   ======================================================================= */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .hero__img { animation: none; transform: scale(1.08); }
  #grain { display: none; }
  .enter, .accept-btn:not(:disabled) { animation: none; opacity: 1; }
  .scroll-hint__arrow { animation: none; }
  .reveal { opacity: 1; transform: none; filter: none; }
  /* CRT: без включения/мерцания/бегущей развёртки */
  .gate__inner { animation: none !important; transform: none; opacity: 1; filter: none; }
  .gate::before { animation: none; }
  .whisper { transition: opacity 0.001ms; }
}
