:root {
  color-scheme: dark;
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-synthesis-weight: none;
  --blue: #1e6bff;
  --blue-light: #8eb7ff;
  --ink: #03050a;
  --surface: rgba(8, 13, 24, 0.78);
  --text: #eef2fb;
  --muted: #8f9bb2;
  --line: rgba(150, 180, 255, 0.16);
}

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

html, body { min-height: 100%; }

body {
  margin: 0;
  background: var(--ink);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

button, input { font: inherit; }

.gate {
  position: relative;
  min-height: 100svh;
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: clamp(1.25rem, 4vw, 3rem);
  isolation: isolate;
  background:
    radial-gradient(900px 560px at 78% 2%, rgba(30, 107, 255, 0.18), transparent 64%),
    radial-gradient(720px 520px at 3% 84%, rgba(13, 63, 172, 0.15), transparent 65%),
    #03050a;
}

.gate::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -2;
  opacity: 0.55;
  background-image:
    linear-gradient(rgba(150, 180, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(150, 180, 255, 0.035) 1px, transparent 1px);
  background-size: 76px 76px;
  mask-image: radial-gradient(85% 85% at 50% 45%, #000 10%, transparent 84%);
}

.gate::after {
  content: '';
  position: absolute;
  inset: 10% 8%;
  z-index: -1;
  border: 1px solid rgba(30, 107, 255, 0.08);
  border-radius: 50%;
  filter: blur(1px);
}

.gate__ambient span {
  position: absolute;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--blue);
  box-shadow: 0 0 28px 8px rgba(30, 107, 255, 0.32);
  animation: drift 8s ease-in-out infinite alternate;
}

.gate__ambient span:nth-child(1) { left: 16%; top: 22%; }
.gate__ambient span:nth-child(2) { right: 15%; top: 30%; animation-delay: -3s; }
.gate__ambient span:nth-child(3) { right: 28%; bottom: 18%; animation-delay: -6s; }

.gate__panel {
  position: relative;
  width: min(100%, 720px);
  padding: clamp(2rem, 6vw, 4.75rem);
  border: 1px solid var(--line);
  border-radius: clamp(22px, 4vw, 34px);
  background:
    linear-gradient(155deg, rgba(30, 107, 255, 0.09), transparent 34%),
    var(--surface);
  box-shadow: 0 42px 100px -40px rgba(0, 0, 0, 0.95), 0 0 90px -42px rgba(30, 107, 255, 0.65);
  backdrop-filter: blur(22px);
}

.gate__panel::before {
  content: '';
  position: absolute;
  left: 14%;
  right: 14%;
  top: -1px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(142, 183, 255, 0.9), transparent);
}

.gate__brand {
  display: flex;
  align-items: center;
  gap: 1rem;
  width: fit-content;
}

.gate__mark { width: 108px; height: auto; filter: drop-shadow(0 0 22px rgba(30, 107, 255, 0.28)); }
.gate__divider { width: 1px; height: 42px; background: var(--line); }
.gate__wordmark { display: grid; line-height: 1; }
.gate__wordmark strong { font-size: 1rem; letter-spacing: -0.02em; }
.gate__wordmark small { margin-top: 0.42rem; color: var(--muted); font-size: 0.62rem; letter-spacing: 0.18em; text-transform: uppercase; }

.gate__copy { margin-top: clamp(3rem, 8vw, 5.6rem); }
.gate__eyebrow { display: flex; align-items: center; gap: 0.7rem; margin: 0 0 1.1rem; color: var(--blue-light); font-size: 0.68rem; font-weight: 600; letter-spacing: 0.2em; text-transform: uppercase; }
.gate__eyebrow span { width: 28px; height: 1px; background: linear-gradient(90deg, transparent, var(--blue-light)); }

h1 { margin: 0; font-size: clamp(3.15rem, 10vw, 6.2rem); font-weight: 600; line-height: 0.94; letter-spacing: -0.06em; }
h1 em { color: var(--blue-light); font-style: normal; text-shadow: 0 0 48px rgba(30, 107, 255, 0.38); }
.gate__copy > p:last-child { max-width: 58ch; margin: 1.6rem 0 0; color: var(--muted); font-size: clamp(0.95rem, 2vw, 1.06rem); line-height: 1.7; }

.gate__form { margin-top: clamp(2.4rem, 6vw, 3.8rem); }
.gate__form label { display: block; margin-bottom: 0.7rem; color: #b8c2d5; font-size: 0.72rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; }
.gate__field { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0.65rem; }

.gate__field input {
  width: 100%;
  min-height: 54px;
  padding: 0 1.1rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  outline: none;
  background: rgba(255, 255, 255, 0.035);
  color: var(--text);
  transition: border-color 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.gate__field input::placeholder { color: #66738a; }
.gate__field input:focus { border-color: rgba(78, 139, 255, 0.72); background: rgba(30, 107, 255, 0.055); box-shadow: 0 0 0 4px rgba(30, 107, 255, 0.11); }

.gate__field button {
  min-height: 54px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.7rem;
  padding: 0 1.5rem;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, #4d8bff, #1256e0 62%, #0a2c78);
  color: #fff;
  font-size: 0.86rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 14px 34px -14px rgba(30, 107, 255, 0.9), inset 0 1px 0 rgba(255, 255, 255, 0.2);
  transition: transform 180ms ease, box-shadow 180ms ease, opacity 180ms ease;
}

.gate__field button:hover { transform: translateY(-2px); box-shadow: 0 18px 42px -14px rgba(30, 107, 255, 1); }
.gate__field button:disabled { cursor: wait; opacity: 0.68; transform: none; }
.gate__field input:focus-visible, .gate__field button:focus-visible { outline: 2px solid var(--blue-light); outline-offset: 3px; }

.gate__status { min-height: 1.35rem; margin: 0.7rem 0 0; padding-left: 1rem; color: var(--muted); font-size: 0.78rem; }
.gate__status[data-tone='error'] { color: #9fbeff; }
.gate__status[data-tone='success'] { color: #8eb7ff; }

.gate__footer { display: flex; align-items: center; gap: 0.55rem; margin-top: clamp(3rem, 7vw, 4.5rem); color: #59667e; font-size: 0.68rem; letter-spacing: 0.12em; text-transform: uppercase; }

@keyframes drift { to { transform: translate3d(18px, -14px, 0) scale(1.18); opacity: 0.55; } }

@media (max-width: 580px) {
  .gate { padding: 0.8rem; }
  .gate__panel { padding: 1.65rem 1.3rem 1.5rem; }
  .gate__mark { width: 88px; }
  .gate__copy { margin-top: 3.4rem; }
  .gate__field { grid-template-columns: 1fr; }
  .gate__field button { width: 100%; }
  .gate__footer { margin-top: 3rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation: none !important; transition-duration: 0.01ms !important; }
}
