@font-face {
  font-family: "Outfit";
  src: url("fonts/outfit-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --fg: #fff;
  --fg-soft: rgba(255, 255, 255, .9);
  --err: #f6cdc8;
  --bg: #0d0f10;
  --fade: 1.2s;
}

* { box-sizing: border-box; }

/* Заливка только у html: заливка body легла бы поверх фона с z-index:-1 и спрятала видео */
html { background: var(--bg); }
html, body { margin: 0; min-height: 100%; color: var(--fg); }

body {
  font-family: "Outfit", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-weight: 300;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  grid-template-rows: 1fr auto;
}

/* Фон: заставка, поверх два видео по очереди, поверх затемнение как в макете */
.bg {
  position: fixed; inset: 0; z-index: -1;
  background: var(--bg) center / cover no-repeat;
}
.bg video {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; opacity: 0;
  transition: opacity var(--fade) ease-in-out;
}
.bg video.on { opacity: 1; }
.shade {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse at center, rgba(0, 0, 0, .28) 0%, rgba(0, 0, 0, .5) 100%),
    rgba(8, 10, 12, .34);
}

.hero {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center;
  /* сверху больше, чем снизу: в макете группа стоит чуть ниже середины экрана */
  padding: 140px 16px 24px;
}

h1 { margin: 0; line-height: 0; }
.logo { width: clamp(250px, 37.5vw, 560px); height: auto; }

.tagline {
  margin: clamp(14px, 2.2vw, 26px) 0 0;
  max-width: 640px;
  font-size: clamp(13px, 1.32vw, 20px);
  line-height: 1.38;
  letter-spacing: .01em;
  text-transform: uppercase;
  text-wrap: balance;
  color: var(--fg-soft);
}

.gate { position: relative; margin: clamp(22px, 2.6vw, 34px) 0 0; display: flex; flex-direction: column; align-items: center; }
.gate input {
  width: 256px; max-width: 100%; height: 40px;
  padding: 0 20px;
  border: 1px solid rgba(255, 255, 255, .92); border-radius: 999px;
  background: rgba(255, 255, 255, 0);
  color: var(--fg);
  font: inherit; font-size: 17px; text-align: center; letter-spacing: .02em;
  outline: none;
  transition: background-color .2s ease, border-color .2s ease;
}
.gate input::placeholder { color: var(--fg); opacity: .95; }
.gate input:focus { background: rgba(255, 255, 255, .08); }
.gate input:focus::placeholder { opacity: .5; }
.gate.bad input { border-color: var(--err); }

.err {
  /* под полем, но места в раскладке не занимает — группа не прыгает при ошибке */
  position: absolute; top: 100%; left: 50%; transform: translateX(-50%);
  white-space: nowrap; margin: 12px 0 0;
  font-size: 15px; letter-spacing: .02em; color: var(--err);
}

.shake { animation: shake .42s cubic-bezier(.36, .07, .19, .97); }
@keyframes shake {
  20%, 60% { transform: translateX(-8px); }
  40%, 80% { transform: translateX(8px); }
}

.foot {
  display: flex; justify-content: space-between; align-items: flex-end; gap: 24px;
  padding: 0 36px 30px;
  padding-bottom: max(30px, env(safe-area-inset-bottom));
  font-size: clamp(15px, 1.4vw, 20px);
}
.mail { color: inherit; text-decoration: none; }
.mail:hover, .mail:focus-visible { text-decoration: underline; text-underline-offset: 4px; }

.sr {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

@media (max-width: 640px) {
  .hero { padding-top: 88px; }
  .logo { width: min(300px, 100%); }
  .foot { flex-direction: column; align-items: center; gap: 6px; padding: 0 16px 24px; font-size: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  .shake { animation: none; }
  .bg video { transition: none; }
}
