:root {
  --ink: #0a0a0b;
  --ink-soft: #2a2a2e;
  --paper: #eef1f6;
  --paper-2: #e4e9f2;
  --white: #fbfcfe;
  --line: #c8d0de;
  --muted: #5c6474;
  --blue: #1a6cff;
  --blue-deep: #0d3fb8;
  --shadow: 0 18px 40px rgba(10, 10, 11, 0.08);
  --font-display: "Syne", "Avenir Next", sans-serif;
  --font-body: "Figtree", "Segoe UI", sans-serif;
  --radius: 16px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  min-height: 100dvh;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
  display: grid;
  place-items: center;
  padding: 2rem 1.15rem 2.5rem;
  overflow-x: hidden;
}

.stage {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(900px 520px at 12% -10%, rgba(26, 108, 255, 0.18), transparent 60%),
    radial-gradient(700px 480px at 100% 110%, rgba(13, 63, 184, 0.12), transparent 55%),
    linear-gradient(160deg, #f7f8fb 0%, var(--paper) 42%, var(--paper-2) 100%);
}

.stage::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.35;
  background-image:
    linear-gradient(rgba(10, 10, 11, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(10, 10, 11, 0.035) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse at center, #000 35%, transparent 78%);
}

.shell {
  position: relative;
  z-index: 1;
  width: min(440px, 100%);
  display: grid;
  gap: 1.75rem;
}

.brand {
  text-align: center;
  animation: rise 700ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.brand__logo {
  display: block;
  width: min(340px, 88%);
  height: auto;
  margin: 0 auto 1rem;
  filter: drop-shadow(0 10px 24px rgba(10, 10, 11, 0.08));
}

.brand__line {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.05rem, 2.4vw, 1.2rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink-soft);
}

.gate {
  display: grid;
  gap: 0.95rem;
  padding: 1.35rem 1.25rem 1.25rem;
  background: color-mix(in srgb, var(--white) 88%, transparent);
  border: 1px solid color-mix(in srgb, var(--line) 80%, #fff);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  animation: rise 820ms cubic-bezier(0.22, 1, 0.36, 1) 90ms both;
}

.field {
  display: grid;
  gap: 0.4rem;
}

.field__label {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.field__input {
  width: 100%;
  min-height: 48px;
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--white);
  color: var(--ink);
  font: inherit;
  font-size: 1rem;
  outline: none;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.field__input::placeholder {
  color: #9aa3b2;
}

.field__input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(26, 108, 255, 0.16);
}

.field__input--code {
  letter-spacing: 0.12em;
  font-weight: 600;
}

.submit {
  margin-top: 0.25rem;
  min-height: 50px;
  border: 0;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--blue) 0%, var(--blue-deep) 100%);
  color: #fff;
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  cursor: pointer;
  transition: transform 160ms ease, filter 160ms ease;
}

.submit:hover {
  filter: brightness(1.05);
  transform: translateY(-1px);
}

.submit:active {
  transform: translateY(0);
}

.gate__note {
  margin: 0;
  text-align: center;
  font-size: 0.9rem;
  color: var(--muted);
  animation: fade 280ms ease both;
}

.gate__note.is-visible {
  display: block;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .brand,
  .gate,
  .gate__note {
    animation: none;
  }

  .submit:hover {
    transform: none;
  }
}

@media (max-width: 420px) {
  body { padding: 1.5rem 1rem 2rem; }
  .gate { padding: 1.15rem 1rem 1.1rem; }
}
