/* ================================================================
   SPpC — Login Page Styles
   css/login.css
   ================================================================
   1. Page layout
   2. Login card
   3. Form & fields
   4. Submit button
   5. Input trailing icon
   6. Toast notification
   7. Reveal animation
   8. Responsive
   ================================================================ */


/* ── 1. Page Layout ───────────────────────────────────────── */
.login-main {
  position: relative;
  z-index: 2;
  flex: 1;
  display: grid;
  place-items: center;
  padding: clamp(18px, 4vw, 56px) clamp(18px, 5vw, 64px) 56px;
}

/* Parallax wrapper — moved by login.js */
.login-wrap {
  position: relative;
  display: inline-block;
  will-change: transform;
}


/* ── 2. Login Card ────────────────────────────────────────── */
.login-card {
  width: min(520px, 100%);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(900px 520px at 50% 10%, rgba(255, 59, 59, .10), transparent 60%),
    linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.02));
  border: 1px solid rgba(255, 255, 255, .12);
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(14px);
  padding: clamp(18px, 3.2vw, 32px);
  position: relative;
  overflow: hidden;
}

/* Decorative corner light */
.login-card::after {
  content: "";
  position: absolute;
  right: -40px;
  top: -40px;
  width: 160px;
  height: 160px;
  border-radius: 50%;
  background: conic-gradient(
    from 90deg,
    rgba(39,  244, 255,  0),
    rgba(39,  244, 255, .35),
    rgba(200, 255,  61,  0),
    rgba(255,  59,  59, .28),
    rgba(39,  244, 255,  0)
  );
  opacity: .65;
  transform: rotate(20deg);
  pointer-events: none;
}

.login-card__title {
  margin: 0 0 6px;
  font-family: var(--font-display);
  font-size: 18px;
  letter-spacing: .16em;
  text-transform: uppercase;
}
.login-card__subtitle {
  margin: 0 0 20px;
  color: var(--color-muted);
  font-size: 13px;
  line-height: 1.5;
}


/* ── 3. Form & Fields ─────────────────────────────────────── */
.login-form {
  display: grid;
  gap: 14px;
}

.form-field {
  display: grid;
  gap: 8px;
}

.form-label {
  font-size: 12px;
  color: rgba(233, 237, 246, .82);
  letter-spacing: .12em;
  text-transform: uppercase;
}

.form-control {
  position: relative;
  display: grid;
  align-items: center;
}

.form-input {
  width: 100%;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, .14);
  background: linear-gradient(180deg, rgba(0,0,0,.38), rgba(0,0,0,.22));
  color: var(--color-ink);
  padding: 14px 48px 14px 14px;
  font-family: var(--font-body);
  font-size: 14.5px;
  outline: none;
  transition: border-color .3s ease, box-shadow .3s ease;
}
.form-input:hover {
  border-color: rgba(200, 255, 61, .60);
  box-shadow: 0 0 8px rgba(200, 255, 61, .40);
}
.form-input:focus {
  border-color: rgba(200, 255, 61, .90);
  box-shadow: 0 0 12px rgba(200, 255, 61, .70);
}


/* ── 4. Submit Button ─────────────────────────────────────── */
.btn-submit {
  border: none;
  cursor: pointer;
  width: 100%;
  border-radius: var(--radius-md);
  padding: 14px 16px;
  color: #081006;
  font-family: var(--font-display);
  letter-spacing: .14em;
  text-transform: uppercase;
  font-weight: 800;
  font-size: 13px;
  background: linear-gradient(90deg, var(--color-acid), rgba(39, 244, 255, .95));
  box-shadow: 0 14px 40px rgba(0,0,0,.45), 0 0 0 1px rgba(200,255,61,.25) inset;
  transition: transform .25s cubic-bezier(.4,0,.2,1), box-shadow .25s ease;
}
.btn-submit:hover {
  transform: scale(1.05);
  box-shadow:
    0 20px 60px rgba(0,0,0,.60),
    0 0 0 1px rgba(200,255,61,.40) inset,
    0 0 30px rgba(39,244,255,.15);
}
.btn-submit:active  { transform: scale(.97); }


/* ── 5. Input Trailing Icon ───────────────────────────────── */
.input-trail {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: rgba(233, 237, 246, .85);
  background: rgba(255, 255, 255, .03);
  border: 1px solid rgba(255, 255, 255, .10);
  backdrop-filter: blur(8px);
  cursor: pointer;
  transition: background .2s ease, border-color .2s ease, color .2s ease;
}
.input-trail:hover {
  background: rgba(200, 255, 61, .10);
  border-color: rgba(200, 255, 61, .30);
  color: rgba(200, 255, 61, .90);
}
.input-trail:active {
  background: rgba(180, 230, 50, .15);
  border-color: rgba(180, 230, 50, .40);
  color: rgba(180, 230, 50, 1);
}


/* ── 6. Toast Notification ────────────────────────────────── */
.form-toast {
  margin-top: 10px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, .12);
  background: rgba(0, 0, 0, .28);
  padding: 10px 12px;
  color: rgba(233, 237, 246, .88);
  font-size: 12.5px;
  line-height: 1.45;
  display: none;
}
.form-toast[data-visible="true"]  { display: block; }
.form-toast--ok   {
  border-color: rgba(200, 255,  61, .26);
  box-shadow: 0 0 0 4px rgba(200, 255,  61, .08);
}
.form-toast--err  {
  border-color: rgba(255,  59,  59, .26);
  box-shadow: 0 0 0 4px rgba(255,  59,  59, .08);
}
.form-toast--info {
  border-color: rgba( 39, 244, 255, .22);
  box-shadow: 0 0 0 4px rgba( 39, 244, 255, .07);
}


/* ── 7. Reveal Animation ──────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(14px);
  animation: rise .9s var(--ease) forwards;
}
.reveal--delay-1 { animation-delay: .08s; }
.reveal--delay-2 { animation-delay: .18s; }
.reveal--delay-3 { animation-delay: .28s; }

@media (prefers-reduced-motion: reduce) {
  .reveal { animation: none; opacity: 1; transform: none; }
}
