:root {
  --bg: #050505;
  --fg: rgba(255, 255, 255, 0.92);
  --muted: rgba(255, 255, 255, 0.62);
  --dim: rgba(255, 255, 255, 0.35);
  --stroke: rgba(255, 255, 255, 0.12);
  --stroke2: rgba(255, 255, 255, 0.08);
  --glass: rgba(0, 0, 0, 0.45);
  --glass2: rgba(0, 0, 0, 0.25);
  --shadow: 0 12px 40px rgba(0, 0, 0, 0.55);
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--fg);
  overflow: hidden;
}

/* Background video */
.bg {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: contrast(1.05) brightness(0.7) saturate(0.9);
  transform: scale(1.02);
}

/* Overlays */
.vignette {
  position: fixed;
  inset: 0;
  background:
    radial-gradient(65% 55% at 50% 40%, rgba(0,0,0,0.15), rgba(0,0,0,0.72) 70%, rgba(0,0,0,0.92));
  pointer-events: none;
}

.grain {
  position: fixed;
  inset: -20%;
  background-image:
    repeating-linear-gradient(0deg, rgba(255,255,255,0.02), rgba(255,255,255,0.02) 1px, transparent 1px, transparent 3px);
  opacity: 0.18;
  mix-blend-mode: overlay;
  transform: rotate(2deg);
  pointer-events: none;
  animation: drift 10s linear infinite;
}

@keyframes drift {
  0% { transform: translate3d(0,0,0) rotate(2deg); }
  100% { transform: translate3d(-2%, 1%, 0) rotate(2deg); }
}

/* Layout */
.wrap {
  position: relative;
  z-index: 2;
  height: 100%;
  display: grid;
  place-items: center;
  padding: 24px;
}

.card {
  width: min(560px, 92vw);
  background: linear-gradient(180deg, var(--glass), var(--glass2));
  border: 1px solid var(--stroke);
  border-radius: 22px;
  box-shadow: var(--shadow);
  padding: 28px 26px 18px;
  backdrop-filter: blur(10px);
}

/* Sigil */
.sigil {
  position: relative;
  display: grid;
  place-items: center;
  margin: 6px 0 18px;
}

.sigil img {
  width: min(360px, 75vw);
  max-width: 360px;
  height: auto;
  display: block;
  filter: drop-shadow(0 10px 35px rgba(0,0,0,0.65));
  transform: translateZ(0);
  opacity: 0.96;
}

.halo {
  position: absolute;
  width: 320px;
  height: 320px;
  border-radius: 999px;
  background: radial-gradient(circle at 50% 50%, rgba(255,255,255,0.10), rgba(255,255,255,0.0) 62%);
  filter: blur(2px);
  opacity: 0.55;
  animation: pulse 5.5s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(0.98); opacity: 0.45; }
  50% { transform: scale(1.03); opacity: 0.62; }
}

/* Copy */
.titleblock { text-align: center; }
.kicker {
  letter-spacing: 0.22em;
  font-size: 12px;
  color: var(--dim);
  margin-bottom: 8px;
}

h1 {
  font-size: 28px;
  line-height: 1.15;
  margin: 0 0 10px;
  font-weight: 650;
}

p {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 14.5px;
  line-height: 1.5;
}

/* Form */
.form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
}

input {
  height: 46px;
  border-radius: 14px;
  border: 1px solid var(--stroke2);
  background: rgba(0,0,0,0.42);
  color: var(--fg);
  padding: 0 14px;
  outline: none;
}

input::placeholder { color: rgba(255,255,255,0.35); }

input:focus {
  border-color: rgba(255,255,255,0.22);
  box-shadow: 0 0 0 4px rgba(255,255,255,0.06);
}

button {
  height: 46px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.16);
  background: rgba(255,255,255,0.08);
  color: var(--fg);
  padding: 0 14px;
  cursor: pointer;
  transition: transform 0.12s ease, background 0.12s ease, border-color 0.12s ease;
  white-space: nowrap;
}

button:hover {
  background: rgba(255,255,255,0.12);
  border-color: rgba(255,255,255,0.22);
  transform: translateY(-1px);
}

button:active { transform: translateY(0px); }

button.loading {
  opacity: 0.85;
}

button.done {
  background: rgba(255,255,255,0.14);
  border-color: rgba(255,255,255,0.26);
}

.arrow { margin-left: 8px; opacity: 0.8; }

/* Status + footer */
.status {
  margin-top: 10px;
  min-height: 18px;
  text-align: center;
  font-size: 12.5px;
  color: rgba(255,255,255,0.55);
}

.foot {
  margin-top: 16px;
  display: flex;
  justify-content: center;
  gap: 10px;
  color: rgba(255,255,255,0.35);
  font-size: 11px;
  letter-spacing: 0.12em;
}

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

/* Mobile */
@media (max-width: 520px) {
  .form { grid-template-columns: 1fr; }
  button { width: 100%; }
  h1 { font-size: 24px; }
}