:root {
  --bg: #07090e;
  --ink: #eef2f9;
  --muted: #9aa3b5;
  --line: rgba(255, 255, 255, 0.09);
  --accent: #7fe6c4;
  --accent-soft: rgba(127, 230, 196, 0.14);
  --radius: 999px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
    Arial, "Noto Sans", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  height: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  background:
    radial-gradient(1100px 700px at 50% -15%, #101d26 0%, rgba(16, 29, 38, 0) 65%),
    var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

::selection {
  background: rgba(127, 230, 196, 0.28);
}

/* ------------------------------------------------------------------ */
/*  Декоративный фон                                                   */
/* ------------------------------------------------------------------ */

#field {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.glow {
  position: fixed;
  inset: -20vmax;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(closest-side at 38% 42%, rgba(127, 230, 196, 0.16), transparent 70%),
    radial-gradient(closest-side at 62% 58%, rgba(143, 139, 255, 0.14), transparent 70%);
  filter: blur(30px);
  animation: drift 26s ease-in-out infinite alternate;
}

@keyframes drift {
  from {
    transform: translate3d(-2%, -1%, 0) scale(1);
  }
  to {
    transform: translate3d(2%, 2%, 0) scale(1.08);
  }
}

.grain {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.05;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ------------------------------------------------------------------ */
/*  Шапка и подвал                                                     */
/* ------------------------------------------------------------------ */

.top {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: clamp(18px, 3vw, 32px) clamp(20px, 4vw, 44px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-decoration: none;
  transition: opacity 0.2s ease;
}

.brand svg {
  width: 24px;
  height: 24px;
  color: var(--accent);
}

.brand:hover {
  opacity: 0.85;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.pill i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse 2.4s ease-out infinite;
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(127, 230, 196, 0.45);
  }
  70% {
    box-shadow: 0 0 0 7px rgba(127, 230, 196, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(127, 230, 196, 0);
  }
}

.bottom {
  position: relative;
  z-index: 3;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 24px;
  padding: clamp(18px, 3vw, 32px) clamp(20px, 4vw, 44px);
  font-size: 13px;
  color: #78829a;
}

.bottom a {
  color: #9aa3b5;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.bottom a:hover {
  color: var(--ink);
  border-color: var(--line);
}

/* ------------------------------------------------------------------ */
/*  Главный блок                                                       */
/* ------------------------------------------------------------------ */

.hero {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 820px;
  margin: 0 auto;
  padding: clamp(24px, 6vh, 72px) clamp(20px, 5vw, 32px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.eyebrow {
  margin: 0 0 clamp(14px, 2.5vh, 22px);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.eyebrow::before,
.eyebrow::after {
  content: "";
  width: 22px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--line));
}

.eyebrow::after {
  transform: scaleX(-1);
}

h1 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(52px, 13vw, 124px);
  font-weight: 650;
  line-height: 0.92;
  letter-spacing: -0.045em;
}

@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  h1 {
    background: linear-gradient(180deg, #ffffff 0%, #d5deee 55%, #93a3bd 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
  }
}

.tagline {
  margin: clamp(18px, 3vh, 26px) 0 0;
  color: #dbe3f0;
  font-size: clamp(17px, 2.2vw, 21px);
  font-weight: 500;
  letter-spacing: -0.01em;
}

.lede {
  margin: 14px 0 0;
  max-width: 54ch;
  color: var(--muted);
  font-size: clamp(14px, 1.6vw, 16px);
  line-height: 1.65;
}

/* ------------------------------------------------------------------ */
/*  Форма                                                              */
/* ------------------------------------------------------------------ */

.signup {
  margin: clamp(26px, 4vh, 38px) 0 0;
  width: 100%;
  max-width: 520px;
  display: flex;
  gap: 8px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.035);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, opacity 0.3s ease;
}

.signup:focus-within {
  border-color: rgba(127, 230, 196, 0.45);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

.signup input[type="email"] {
  flex: 1;
  min-width: 0;
  padding: 12px 16px;
  border: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 15px;
  outline: none;
}

.signup input::placeholder {
  color: #6d778c;
}

.signup button {
  flex: none;
  padding: 12px 22px;
  border: 0;
  border-radius: var(--radius);
  background: var(--accent);
  color: #04140f;
  font: inherit;
  font-size: 14px;
  font-weight: 650;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: transform 0.15s ease, filter 0.15s ease, opacity 0.2s ease;
}

.signup button:hover {
  filter: brightness(1.06);
}

.signup button:active {
  transform: scale(0.985);
}

.signup button:disabled {
  opacity: 0.6;
  cursor: progress;
}

.signup.is-sent {
  opacity: 0.45;
  pointer-events: none;
}

.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.status {
  min-height: 1.4em;
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 14px;
  transition: color 0.2s ease;
}

.status.error {
  color: #ff9f9f;
}

.status.ok {
  color: var(--accent);
}

.count {
  margin: 10px 0 0;
  color: #7f8a9f;
  font-size: 13px;
}

.count[hidden] {
  display: none;
}

/* ------------------------------------------------------------------ */
/*  Служебное и анимация появления                                     */
/* ------------------------------------------------------------------ */

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

.hero > * {
  animation: rise 0.8s cubic-bezier(0.22, 0.7, 0.2, 1) both;
}

.hero > :nth-child(1) { animation-delay: 0.04s; }
.hero > :nth-child(2) { animation-delay: 0.10s; }
.hero > :nth-child(3) { animation-delay: 0.16s; }
.hero > :nth-child(4) { animation-delay: 0.22s; }
.hero > :nth-child(5) { animation-delay: 0.28s; }
.hero > :nth-child(6) { animation-delay: 0.34s; }
.hero > :nth-child(7) { animation-delay: 0.38s; }
.hero > :nth-child(8) { animation-delay: 0.42s; }

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@media (max-width: 560px) {
  .signup {
    flex-direction: column;
    padding: 10px;
    border-radius: 20px;
  }

  .signup button {
    width: 100%;
  }

  .bottom {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }

  .glow {
    animation: none;
  }

  .hero > * {
    opacity: 1;
    transform: none;
  }
}
