:root {
  --bg: #07080c;
  --ink: #f4f1ea;
  --muted: #a5a2b2;
  --accent: hsl(38 74% 64%);
  --line: rgba(255, 255, 255, 0.12);
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(90% 70% at 50% 110%, color-mix(in srgb, var(--accent) 18%, transparent), transparent 70%),
    radial-gradient(70% 50% at 50% -10%, rgba(255, 255, 255, 0.06), transparent 70%),
    linear-gradient(180deg, #04050a, #08090f 55%, #0a0b11);
  color: var(--ink);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.3;
  mix-blend-mode: soft-light;
  background-image: url("/assets/grain.svg");
  background-size: 220px 220px;
}

.gate {
  width: min(380px, 100%);
  text-align: center;
  animation: rise 0.9s cubic-bezier(.16, 1, .3, 1);
}

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

.gate__line {
  position: relative;
  height: 1px;
  margin: 0 0 34px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.35), transparent);
}

.gate__line span {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 11px; height: 11px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 5px color-mix(in srgb, var(--accent) 16%, transparent), 0 0 26px var(--accent);
  animation: beat 3.2s ease-in-out infinite;
}

@keyframes beat {
  0%, 100% { box-shadow: 0 0 0 5px color-mix(in srgb, var(--accent) 14%, transparent), 0 0 22px var(--accent); }
  50% { box-shadow: 0 0 0 9px color-mix(in srgb, var(--accent) 8%, transparent), 0 0 40px var(--accent); }
}

h1 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 500;
  font-size: 46px;
  letter-spacing: -0.01em;
  background: linear-gradient(180deg, #fff, color-mix(in srgb, var(--accent) 45%, #cfc7bb));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.gate__claim {
  margin: 6px 0 30px;
  color: var(--muted);
  font-size: 13px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

form { display: grid; gap: 10px; }

input {
  padding: 14px 16px;
  border-radius: 13px;
  border: 1px solid var(--line);
  background: rgba(16, 18, 26, 0.72);
  color: var(--ink);
  font: inherit;
  font-size: 16px;
  text-align: center;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input:focus {
  border-color: color-mix(in srgb, var(--accent) 60%, transparent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 14%, transparent);
}

button {
  padding: 13px 16px;
  border-radius: 13px;
  border: 0;
  background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 92%, white), var(--accent));
  color: #17130a;
  font: inherit;
  font-weight: 600;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: transform 0.2s ease, filter 0.2s ease;
}

button:hover { transform: translateY(-1px); filter: brightness(1.05); }
button[disabled] { opacity: 0.6; cursor: progress; transform: none; }

.gate__error {
  margin: 4px 0 0;
  color: #ff9a8a;
  font-size: 13.5px;
  min-height: 1.2em;
}

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

/* ------------------------------------------------------- Passkey-Bereich -- */

.gate__passkey {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  margin-bottom: 14px;
}

.gate__passkey svg {
  width: 20px; height: 20px;
  fill: currentColor;
}

.gate__passkey.is-busy { opacity: 0.7; cursor: progress; }

.gate__fallback {
  text-align: left;
  border-radius: 13px;
  border: 1px solid var(--line);
  background: rgba(14, 16, 24, 0.5);
  overflow: hidden;
}

.gate__fallback summary {
  padding: 11px 16px;
  color: var(--muted);
  font-size: 13.5px;
  text-align: center;
  cursor: pointer;
  list-style: none;
}

.gate__fallback summary::-webkit-details-marker { display: none; }
.gate__fallback summary:hover { color: var(--ink); }
.gate__fallback[open] summary { border-bottom: 1px solid var(--line); }
.gate__fallback form { padding: 14px; gap: 9px; }
