/* Публичная страница контактов — неон 24/7 */
:root {
  --bg: #04040f;
  --cyan: #3ee8ff;
  --violet: #b44cff;
  --text: #f3f5ff;
  --muted: rgba(222, 228, 255, .66);
  --hero-max: 720px;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

/* предпросмотр в админке: без полосы прокрутки, как на телефоне */
html.is-preview { scrollbar-width: none; }
html.is-preview::-webkit-scrollbar { display: none; }

body {
  position: relative;
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
  color: var(--text);
  font: 16px/1.45 Inter, "Segoe UI", Roboto, -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ---------- фон ---------- */
.ambient { display: none; }

.hero {
  position: absolute;
  top: 0;
  left: 50%;
  z-index: 0;
  width: min(100%, var(--hero-max));
  transform: translateX(-50%);
  pointer-events: none;
  user-select: none;
}

.hero__img {
  display: block;
  width: 100%;
  height: auto;
  -webkit-mask-image: linear-gradient(to bottom, #000 60%, transparent 97%);
  mask-image: linear-gradient(to bottom, #000 60%, transparent 97%);
  animation: neon-on 1.7s ease-out backwards;
}

@media (min-width: 760px) {
  .ambient {
    display: block;
    position: fixed;
    inset: -12%;
    z-index: 0;
    background-position: center 22%;
    background-repeat: no-repeat;
    background-size: cover;
    filter: blur(80px) saturate(1.3);
    opacity: .38;
    pointer-events: none;
  }
  .hero__img {
    -webkit-mask-image:
      linear-gradient(to bottom, #000 50%, transparent 95%),
      linear-gradient(to right, transparent 0%, #000 20%, #000 80%, transparent 100%);
    -webkit-mask-composite: source-in;
    mask-image:
      linear-gradient(to bottom, #000 50%, transparent 95%),
      linear-gradient(to right, transparent 0%, #000 20%, #000 80%, transparent 100%);
    mask-composite: intersect;
  }
}

/* ---------- компьютер: горизонтальный фон на весь экран, блок с кнопками сбоку ---------- */
.scene { display: none; }

@media (min-width: 1100px) and (min-aspect-ratio: 5/4) {
  .has-wide .hero,
  .has-wide .ambient { display: none; }

  .has-wide .scene {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 0;
    background-color: var(--bg);
    background-repeat: no-repeat;
    background-size: cover;
    background-position: 72% center;
    animation: neon-on 1.7s ease-out backwards;
  }
  /* затемнение под текстом, чтобы он читался поверх картинки */
  .has-wide .scene::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(4, 4, 15, .82) 0%, rgba(4, 4, 15, .55) 32%, rgba(4, 4, 15, 0) 58%);
  }
  .has-wide.align-right .scene { background-position: 28% center; }
  .has-wide.align-right .scene::after {
    background: linear-gradient(270deg, rgba(4, 4, 15, .82) 0%, rgba(4, 4, 15, .55) 32%, rgba(4, 4, 15, 0) 58%);
  }
  .has-wide.align-center .scene { background-position: center; }
  .has-wide.align-center .scene::after {
    background: radial-gradient(ellipse 50% 75% at 50% 50%, rgba(4, 4, 15, .72), rgba(4, 4, 15, .25) 70%, rgba(4, 4, 15, .1));
  }

  .has-wide .page {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 100vh;
    max-width: 460px;
    margin: 0 auto 0 clamp(40px, 7vw, 150px);
    padding: 56px 0;
  }
  .has-wide.align-right .page { margin: 0 clamp(40px, 7vw, 150px) 0 auto; }
  .has-wide.align-center .page { margin: 0 auto; }

  .has-wide:not(.align-center) .intro,
  .has-wide:not(.align-center) .notice,
  .has-wide:not(.align-center) .footer { text-align: left; }
  .has-wide:not(.align-center) .subtitle,
  .has-wide:not(.align-center) .notice { margin-left: 0; }
  .has-wide:not(.align-center) .chips { justify-content: flex-start; }
  .has-wide .headline { font-size: 40px; }
  .has-wide .subtitle { max-width: none; }
}

/* ---------- колонка с контентом ---------- */
.page {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  /* отступ сверху считается от ширины картинки, поэтому текст встаёт под надпись на любом экране */
  padding:
    calc(min(100%, var(--hero-max)) * var(--offset, 56) / 100)
    max(18px, env(safe-area-inset-right))
    calc(34px + env(safe-area-inset-bottom))
    max(18px, env(safe-area-inset-left));
}

.intro { text-align: center; }

.status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 14px;
  padding: 6px 13px 6px 11px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  color: #a7ffd6;
  background: rgba(46, 255, 168, .08);
  border: 1px solid rgba(46, 255, 168, .28);
  box-shadow: 0 0 22px -8px rgba(46, 255, 168, .6);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  animation: fade-up .7s .25s backwards;
}

.status__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #2effa8;
  animation: ping 2s ease-out infinite;
}

.headline {
  margin: 0;
  font-size: clamp(27px, 7.6vw, 36px);
  line-height: 1.12;
  font-weight: 800;
  letter-spacing: -.02em;
  text-wrap: balance;
  background: linear-gradient(92deg, #dcfaff 0%, #ffffff 48%, #efd9ff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 22px rgba(120, 140, 255, .35));
  animation: fade-up .7s .32s backwards;
}

@supports not ((-webkit-background-clip: text) or (background-clip: text)) {
  .headline { color: #fff; background: none; }
}

.subtitle {
  margin: 10px auto 0;
  max-width: 36ch;
  color: var(--muted);
  font-size: 15.5px;
  text-wrap: balance;
  animation: fade-up .7s .38s backwards;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
  animation: fade-up .7s .44s backwards;
}

.chips li {
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 13px;
  color: rgba(235, 240, 255, .82);
  background: rgba(255, 255, 255, .05);
  border: 1px solid rgba(255, 255, 255, .1);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

/* ---------- кнопки-контакты ---------- */
.links {
  display: grid;
  gap: 12px;
  margin-top: 24px;
}

.link {
  --c: var(--cyan);
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 68px;
  padding: 12px 16px 12px 12px;
  border-radius: 20px;
  color: var(--text);
  text-decoration: none;
  background: linear-gradient(180deg, rgba(24, 26, 62, .74), rgba(12, 12, 34, .74));
  border: 1px solid rgba(255, 255, 255, .09);
  box-shadow: 0 12px 30px -18px rgba(0, 0, 0, .9), inset 0 1px 0 rgba(255, 255, 255, .05);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  -webkit-tap-highlight-color: transparent;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
  animation: fade-up .6s backwards;
  animation-delay: calc(.5s + var(--i, 0) * .07s);
}

.link__icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  color: var(--c);
  background: rgba(62, 232, 255, .12);
  background: color-mix(in srgb, var(--c) 13%, transparent);
  border: 1px solid color-mix(in srgb, var(--c) 32%, transparent);
  box-shadow: inset 0 0 14px -6px var(--c);
}

.link__icon svg {
  display: block;
  width: 22px;
  height: 22px;
  filter: drop-shadow(0 0 5px color-mix(in srgb, var(--c) 75%, transparent));
}

.link__text {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-width: 0;
}

.link__title {
  font-size: 16px;
  font-weight: 600;
  line-height: 1.25;
}

.link__sub {
  margin-top: 2px;
  overflow: hidden;
  font-size: 13.5px;
  color: var(--muted);
  white-space: nowrap;
  text-overflow: ellipsis;
}

.link__arrow {
  flex: none;
  width: 20px;
  height: 20px;
  fill: none;
  stroke: rgba(255, 255, 255, .45);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform .18s ease, stroke .18s ease;
}

.link--primary {
  border-color: transparent;
  background:
    linear-gradient(180deg, rgba(24, 20, 66, .9), rgba(14, 10, 40, .9)) padding-box,
    linear-gradient(100deg, var(--cyan), var(--violet)) border-box;
  box-shadow: 0 0 26px -8px rgba(62, 232, 255, .55), 0 0 34px -10px rgba(180, 76, 255, .6);
}

.link--static { cursor: default; }

a.link:focus-visible {
  outline: 2px solid var(--c);
  outline-offset: 3px;
}

a.link:active { transform: scale(.985); }

@media (hover: hover) {
  a.link:hover {
    transform: translateY(-2px);
    border-color: color-mix(in srgb, var(--c) 55%, transparent);
    box-shadow:
      0 0 0 1px color-mix(in srgb, var(--c) 22%, transparent),
      0 14px 34px -14px color-mix(in srgb, var(--c) 75%, transparent);
  }
  a.link--primary:hover {
    border-color: transparent;
    box-shadow: 0 0 32px -6px rgba(62, 232, 255, .7), 0 0 42px -8px rgba(180, 76, 255, .75);
  }
  a.link:hover .link__arrow {
    transform: translateX(3px);
    stroke: var(--c);
  }
}

/* ---------- низ страницы ---------- */
.notice {
  margin: 24px auto 0;
  max-width: 40ch;
  text-align: center;
  font-size: 14.5px;
  color: var(--muted);
  white-space: pre-line;
  text-wrap: pretty;
  animation: fade-up .6s backwards;
  animation-delay: calc(.55s + var(--i, 0) * .07s);
}

.footer {
  margin-top: 28px;
  text-align: center;
  font-size: 12.5px;
  color: rgba(220, 225, 255, .38);
}

/* ---------- 404 ---------- */
.nf {
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(600px 400px at 30% 20%, rgba(62, 232, 255, .12), transparent 60%),
    radial-gradient(600px 400px at 70% 20%, rgba(180, 76, 255, .14), transparent 60%);
}
.nf__box { width: 100%; max-width: 420px; text-align: center; }
.nf__code {
  margin: 0;
  font-size: 88px;
  font-weight: 800;
  line-height: 1;
  color: #e9fcff;
  text-shadow: 0 0 12px var(--cyan), 0 0 36px var(--cyan), 0 0 60px var(--violet);
}
.nf__text { margin: 14px 0 26px; color: var(--muted); }
.nf__link { text-align: left; }

/* ---------- анимации ---------- */
@keyframes fade-up {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}

@keyframes neon-on {
  0% { opacity: 0; }
  8% { opacity: .85; }
  11% { opacity: .12; }
  17% { opacity: 1; }
  20% { opacity: .35; }
  27% { opacity: 1; }
  100% { opacity: 1; }
}

@keyframes ping {
  0% { box-shadow: 0 0 0 0 rgba(46, 255, 168, .65); }
  70% { box-shadow: 0 0 0 9px rgba(46, 255, 168, 0); }
  100% { box-shadow: 0 0 0 0 rgba(46, 255, 168, 0); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
}
