:root {
  color-scheme: dark;
  --bg: #0d0e11;
  --panel: #121318;
  --panel-raised: #17191f;
  --line: #292c34;
  --line-soft: #1d2026;
  --text: #f0f1f4;
  --muted: #8b909c;
  --dim: #5f6470;
  --accent: #e8f34b;
  --accent-deep: #b7c21b;
  --danger: #ff626c;
  --mono: "SFMono-Regular", "Cascadia Code", "Liberation Mono", monospace;
  --sans: "Avenir Next", "Helvetica Neue", sans-serif;
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }

body {
  margin: 0;
  background:
    radial-gradient(circle at 50% 42%, rgb(232 243 75 / 5%), transparent 24rem),
    linear-gradient(rgb(255 255 255 / 1.6%) 1px, transparent 1px),
    linear-gradient(90deg, rgb(255 255 255 / 1.6%) 1px, transparent 1px),
    var(--bg);
  background-size: auto, 44px 44px, 44px 44px, auto;
  color: var(--text);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}

body::before {
  position: fixed;
  inset: 0;
  pointer-events: none;
  content: "";
  background: linear-gradient(115deg, transparent 20%, rgb(255 255 255 / 1.5%) 48%, transparent 52%);
  transform: translateX(-100%);
  animation: ambient-scan 10s ease-in-out infinite;
}

.gate-shell {
  display: grid;
  min-height: 100vh;
  min-height: 100svh;
  place-items: center;
  padding: 28px;
}

.gate-panel {
  position: relative;
  width: min(430px, 100%);
  overflow: hidden;
  border: 1px solid var(--line);
  background: linear-gradient(155deg, rgb(255 255 255 / 2.5%), transparent 35%), var(--panel);
  box-shadow: 0 30px 90px rgb(0 0 0 / 45%);
  animation: panel-in 500ms cubic-bezier(.2,.8,.2,1) both;
}

.gate-panel::before {
  position: absolute;
  top: 0;
  left: 0;
  width: 84px;
  height: 2px;
  content: "";
  background: var(--accent);
  box-shadow: 0 0 18px rgb(232 243 75 / 45%);
}

.gate-brand {
  display: flex;
  align-items: center;
  height: 58px;
  padding: 0 22px;
  border-bottom: 1px solid var(--line-soft);
  gap: 12px;
}

.gate-brand img { width: 34px; height: auto; }
.gate-brand > span { width: 1px; height: 18px; background: var(--line); }
.gate-brand strong { font-size: 13px; font-weight: 650; letter-spacing: -.01em; }

.gate-visual {
  position: relative;
  height: 190px;
  overflow: hidden;
  border-bottom: 1px solid var(--line-soft);
  background:
    linear-gradient(90deg, transparent 49.8%, rgb(232 243 75 / 8%) 50%, transparent 50.2%),
    linear-gradient(transparent 49.8%, rgb(232 243 75 / 8%) 50%, transparent 50.2%),
    radial-gradient(circle, rgb(232 243 75 / 5%), transparent 62%);
}

.radar-ring, .radar-core, .radar-sweep {
  position: absolute;
  top: 50%;
  left: 50%;
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.radar-ring { border: 1px solid rgb(232 243 75 / 13%); }
.ring-one { width: 70px; height: 70px; }
.ring-two { width: 126px; height: 126px; }
.ring-three { width: 184px; height: 184px; }

.radar-sweep {
  width: 148px;
  height: 148px;
  background: conic-gradient(from 10deg, transparent 0 305deg, rgb(232 243 75 / 20%) 344deg, transparent 360deg);
  animation: sweep 4.5s linear infinite;
}

.radar-core {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border: 1px solid rgb(232 243 75 / 38%);
  background: rgb(232 243 75 / 5%);
  box-shadow: 0 0 32px rgb(232 243 75 / 8%);
}

.radar-core span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 14px var(--accent);
}

.signal {
  position: absolute;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--muted);
  box-shadow: 0 0 8px rgb(255 255 255 / 20%);
}

.signal-a { top: 52px; left: 118px; }
.signal-b { right: 104px; bottom: 48px; }
.signal-c { top: 72px; right: 72px; }
.gate-copy { padding: 28px 28px 20px; }

.gate-kicker {
  display: flex;
  align-items: center;
  margin-bottom: 10px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .12em;
  text-transform: uppercase;
  gap: 8px;
}

.gate-kicker span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 9px rgb(232 243 75 / 55%);
}

h1 {
  margin: 0;
  font-size: clamp(30px, 7vw, 40px);
  font-weight: 620;
  letter-spacing: -.045em;
  line-height: 1;
}

.gate-copy p {
  max-width: 340px;
  margin: 13px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.gate-form { padding: 0 28px 28px; }

.gate-form label {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.password-field { position: relative; }

.password-field input {
  width: 100%;
  height: 48px;
  border: 1px solid var(--line);
  border-radius: 0;
  outline: none;
  background: var(--panel-raised);
  color: var(--text);
  font-family: var(--mono);
  font-size: 16px;
  letter-spacing: .08em;
  padding: 0 72px 0 14px;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.password-field input:focus {
  border-color: var(--accent-deep);
  box-shadow: 0 0 0 3px rgb(232 243 75 / 7%);
}

.field-status {
  position: absolute;
  top: 50%;
  right: 14px;
  color: var(--dim);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .18em;
  transform: translateY(-50%);
}

.gate-error {
  margin: 10px 0 0;
  color: var(--danger);
  font-family: var(--mono);
  font-size: 11px;
  line-height: 1.4;
}

.gate-form button {
  display: flex;
  width: 100%;
  height: 48px;
  align-items: center;
  justify-content: space-between;
  margin-top: 14px;
  padding: 0 16px;
  border: 1px solid var(--accent);
  border-radius: 0;
  background: var(--accent);
  color: #101107;
  cursor: pointer;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 700;
  transition: background 140ms ease, transform 140ms ease;
}

.gate-form button:hover:not(:disabled) { background: #f2fb6c; transform: translateY(-1px); }
.gate-form button:disabled { cursor: wait; opacity: .7; }
.gate-form button svg { width: 18px; height: 18px; }
.gate-form button.is-loading svg { animation: nudge 700ms ease-in-out infinite alternate; }

.gate-meta {
  display: flex;
  min-height: 42px;
  align-items: center;
  padding: 0 22px;
  border-top: 1px solid var(--line-soft);
  color: var(--dim);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: .05em;
  text-transform: uppercase;
  gap: 14px;
}

.gate-meta span + span::before { margin-right: 14px; content: "·"; }

@keyframes panel-in {
  from { opacity: 0; transform: translateY(12px) scale(.99); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes sweep { to { transform: translate(-50%, -50%) rotate(360deg); } }
@keyframes ambient-scan { 0%, 58% { transform: translateX(-110%); } 82%, 100% { transform: translateX(110%); } }
@keyframes nudge { to { transform: translateX(4px); } }

@media (max-width: 520px) {
  .gate-shell { padding: 14px; }
  .gate-copy { padding: 24px 22px 18px; }
  .gate-form { padding: 0 22px 22px; }
  .gate-meta { flex-wrap: wrap; padding-block: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; }
}
