:root {
  --bg: #05050a;
  --line: rgba(255, 255, 255, 0.15);
  --text: #f7f7fb;
  --muted: #a8adbe;
  --violet: #8b5cf6;
  --pink: #c026d3;
  --blue: #1fb6ff;
  --cyan: #5eead4;
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  color: var(--text);
  background:
    radial-gradient(circle at 18% 16%, rgba(139, 92, 246, 0.28), transparent 30rem),
    radial-gradient(circle at 82% 30%, rgba(31, 182, 255, 0.18), transparent 28rem),
    linear-gradient(135deg, #030306 0%, #090912 52%, #0d0b16 100%);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a {
  color: inherit;
  text-decoration: none;
}

.access-particles {
  position: fixed;
  inset: 0;
  z-index: -3;
  width: 100%;
  height: 100%;
  opacity: 0.6;
}

.ambient {
  position: fixed;
  z-index: -2;
  width: 32rem;
  height: 32rem;
  border-radius: 999px;
  filter: blur(86px);
  opacity: 0.24;
  pointer-events: none;
  animation: drift 11s ease-in-out infinite alternate;
}

.ambient-one {
  top: 8%;
  left: -10rem;
  background: var(--violet);
}

.ambient-two {
  right: -10rem;
  bottom: 12%;
  background: var(--blue);
  animation-delay: -4s;
}

.access-page {
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: 32px 16px;
}

.access-card {
  position: relative;
  width: min(100%, 500px);
  padding: clamp(26px, 6vw, 44px);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 28px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.13), rgba(255, 255, 255, 0.035)),
    rgba(8, 9, 17, 0.72);
  box-shadow: 0 30px 100px rgba(0, 0, 0, 0.48);
  backdrop-filter: blur(24px);
  animation: rise 720ms ease both;
}

.access-card::before {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.28), transparent 42%, rgba(31, 182, 255, 0.2));
  content: "";
  opacity: 0.72;
  pointer-events: none;
}

.access-card > * {
  position: relative;
  z-index: 1;
}

.access-brand {
  display: inline-flex;
  align-items: center;
  margin-bottom: 34px;
}

.access-brand img {
  display: block;
  width: 132px;
  height: auto;
}

.access-kicker {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  margin: 0 0 16px;
  padding: 0 13px;
  border: 1px solid rgba(94, 234, 212, 0.22);
  border-radius: 999px;
  color: #d5fff8;
  background: rgba(94, 234, 212, 0.08);
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
}

h1 {
  margin: 0 0 14px;
  font-size: clamp(2.7rem, 12vw, 4.8rem);
  line-height: 0.94;
  letter-spacing: 0;
}

.access-copy {
  max-width: 390px;
  margin: 0 0 30px;
  color: var(--muted);
  font-size: 1.02rem;
  line-height: 1.6;
}

.access-form {
  display: grid;
  gap: 12px;
}

label {
  color: rgba(247, 247, 251, 0.82);
  font-size: 0.9rem;
  font-weight: 700;
}

.password-field {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  min-height: 56px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  transition:
    border-color 220ms ease,
    box-shadow 220ms ease;
}

.password-field:focus-within {
  border-color: rgba(94, 234, 212, 0.46);
  box-shadow: 0 0 0 4px rgba(94, 234, 212, 0.08);
}

input {
  width: 100%;
  min-width: 0;
  border: 0;
  padding: 0 0 0 20px;
  color: #fff;
  background: transparent;
  font: inherit;
  outline: 0;
}

input::placeholder {
  color: rgba(168, 173, 190, 0.72);
}

.ghost-button {
  min-height: 44px;
  margin-right: 6px;
  border: 0;
  border-radius: 999px;
  padding: 0 16px;
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  cursor: pointer;
  font-weight: 800;
  transition:
    background 220ms ease,
    transform 220ms ease;
}

.ghost-button:hover {
  background: rgba(255, 255, 255, 0.14);
  transform: translateY(-1px);
}

.form-message {
  min-height: 22px;
  margin: 0;
  color: #ffb4c6;
  font-size: 0.9rem;
}

.form-message.success {
  color: var(--cyan);
}

.access-button {
  position: relative;
  isolation: isolate;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 56px;
  margin-top: 2px;
  overflow: hidden;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, var(--violet), var(--blue));
  box-shadow: 0 18px 50px rgba(139, 92, 246, 0.32);
  cursor: pointer;
  font: inherit;
  font-weight: 900;
  transition:
    transform 220ms ease,
    box-shadow 220ms ease;
}

.access-button::before {
  position: absolute;
  inset: -2px;
  z-index: -1;
  background: linear-gradient(110deg, var(--violet), var(--blue), var(--pink), var(--cyan));
  background-size: 240% 240%;
  content: "";
  animation: gradientFlow 7s ease infinite;
}

.access-button:hover {
  transform: translateY(-3px);
  box-shadow: 0 24px 64px rgba(31, 182, 255, 0.22);
}

.back-link {
  display: inline-flex;
  margin-top: 24px;
  color: var(--muted);
  font-size: 0.92rem;
  transition:
    color 220ms ease,
    transform 220ms ease;
}

.back-link:hover {
  color: #fff;
  transform: translateX(-2px);
}

.access-form.has-error {
  animation: shake 260ms ease;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(26px) scale(0.98);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes shake {
  0%,
  100% {
    transform: translateX(0);
  }

  25% {
    transform: translateX(-6px);
  }

  75% {
    transform: translateX(6px);
  }
}

@keyframes drift {
  to {
    transform: translate3d(7%, -5%, 0) scale(1.1);
  }
}

@keyframes gradientFlow {
  0%,
  100% {
    background-position: 0% 50%;
  }

  50% {
    background-position: 100% 50%;
  }
}

@media (max-width: 520px) {
  .access-brand img {
    width: 112px;
  }

  .password-field {
    border-radius: 22px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
