/* Access-code screen. Colours and font follow the main site. */
@font-face {
  font-family: "Inter";
  src: url("/access/inter.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --bg: #04060c;
  --bg-raised: #080c17;
  --brand: #2f6bff;
  --brand-bright: #6b9bff;
  --ice: #a9d6ff;
  --line: #a0beff21;
  --line-strong: #a0beff4d;
  --surface: #96b4ff0d;
  --text: #eef3ff;
  --text-dim: #a7b3cf;
  --text-faint: #7684a4;
  --signal: #ff4326;
}

* { box-sizing: border-box; }

html, body { height: 100%; margin: 0; }

body {
  background: var(--bg);
  color: var(--text);
  font: 15px/1.5 "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

.gate {
  position: relative;
  min-height: 100%;
  display: grid;
  place-items: center;
  padding: 24px 16px;
  overflow: hidden;
  background:
    radial-gradient(60rem 40rem at 50% -10%, #2f6bff26, transparent 60%),
    radial-gradient(40rem 30rem at 90% 110%, #6b9bff14, transparent 60%),
    var(--bg);
}

/* faint grid, like the site's hero */
.gate::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse at center, #000 30%, transparent 75%);
  opacity: .5;
  pointer-events: none;
}

.glow {
  position: absolute;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  background: radial-gradient(circle, #2f6bff40, transparent 65%);
  filter: blur(20px);
  animation: drift 12s ease-in-out infinite alternate;
  pointer-events: none;
}

.card {
  position: relative;
  width: 100%;
  max-width: 420px;
  padding: 36px 32px 28px;
  border-radius: 20px;
  background: linear-gradient(180deg, #0b1122e6, #070b16f2);
  border: 1px solid var(--line-strong);
  box-shadow: 0 30px 80px -30px #000c, 0 0 0 1px #ffffff08 inset;
  backdrop-filter: blur(12px);
  animation: rise .7s cubic-bezier(.16, 1, .3, 1) both;
}

.logo {
  display: block;
  width: 56px;
  height: 56px;
  border-radius: 14px;
  margin-bottom: 20px;
  box-shadow: 0 10px 30px -10px #2f6bffaa;
}

.eyebrow {
  margin: 0 0 6px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--brand-bright);
}

h1 {
  margin: 0;
  font-size: 26px;
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: -.02em;
}

.lead { margin: 10px 0 0; color: var(--text-dim); font-size: 14px; }
.lead.de { margin-top: 4px; color: var(--text-faint); font-size: 13px; }

label {
  display: block;
  margin: 26px 0 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-dim);
}

.field {
  position: relative;
  display: flex;
  align-items: center;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  transition: border-color .2s, box-shadow .2s, background .2s;
}

.field:focus-within {
  border-color: var(--brand-bright);
  background: #96b4ff14;
  box-shadow: 0 0 0 4px #2f6bff26;
}

.field.has-error { border-color: #ff432699; animation: shake .4s ease; }

.field svg {
  width: 18px;
  height: 18px;
  margin-left: 14px;
  fill: none;
  stroke: var(--text-faint);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: none;
}

input[type="password"] {
  flex: 1;
  width: 100%;
  height: 50px;
  padding: 0 14px 0 10px;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 18px;
  letter-spacing: .2em;
}

input:disabled { opacity: .5; }

.msg {
  min-height: 20px;
  margin: 8px 0 0;
  font-size: 13px;
  color: #ff8a73;
}

button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  height: 50px;
  margin-top: 10px;
  border: 0;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--brand), #5b5cff);
  color: #fff;
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 14px 30px -12px #2f6bffcc;
  transition: transform .15s, box-shadow .2s, filter .2s;
}

button svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform .2s; }
button:hover { transform: translateY(-1px); filter: brightness(1.08); box-shadow: 0 18px 36px -12px #2f6bffee; }
button:hover svg { transform: translateX(3px); }
button:active { transform: translateY(0); }
button:focus-visible { outline: 2px solid var(--ice); outline-offset: 3px; }
button:disabled { opacity: .5; cursor: not-allowed; transform: none; }

.foot {
  margin: 18px 0 0;
  text-align: center;
  font-size: 12px;
  color: var(--text-faint);
}

@keyframes rise { from { opacity: 0; transform: translateY(16px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes drift { from { transform: translate(-80px, -40px); } to { transform: translate(80px, 50px); } }
@keyframes shake { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }

@media (prefers-reduced-motion: reduce) {
  .card, .glow, .field.has-error { animation: none; }
}

@media (max-width: 420px) {
  .card { padding: 28px 22px 22px; border-radius: 16px; }
  h1 { font-size: 23px; }
}
