@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:ital,wght@0,400;0,500;0,600;0,700;0,800&display=swap');

/* ── Grid-pattern background with green bloom ─────────────────────────── */
.auth-shell::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(1200px 700px at 50% 36%, oklch(from var(--primary) l c h / 0.08), transparent 65%),
    radial-gradient(900px 520px at 84% 10%, oklch(from var(--primary) l c h / 0.04), transparent 60%),
    linear-gradient(oklch(from var(--primary) l c h / 0.03) 1px, transparent 1px),
    linear-gradient(90deg, oklch(from var(--primary) l c h / 0.03) 1px, transparent 1px),
    linear-gradient(oklch(from var(--primary) l c h / 0.06) 1px, transparent 1px),
    linear-gradient(90deg, oklch(from var(--primary) l c h / 0.06) 1px, transparent 1px);
  background-size:
    auto, auto,
    32px 32px,
    32px 32px,
    128px 128px,
    128px 128px;
}

[data-bs-theme="dark"] .auth-shell::before {
  background:
    radial-gradient(1200px 700px at 50% 36%, oklch(0.55 0.15 162 / 0.13), transparent 65%),
    radial-gradient(900px 520px at 84% 10%, oklch(0.45 0.12 162 / 0.05), transparent 60%),
    linear-gradient(oklch(0.92 0.04 165 / 0.014) 1px, transparent 1px),
    linear-gradient(90deg, oklch(0.92 0.04 165 / 0.014) 1px, transparent 1px),
    linear-gradient(oklch(0.92 0.04 165 / 0.035) 1px, transparent 1px),
    linear-gradient(90deg, oklch(0.92 0.04 165 / 0.035) 1px, transparent 1px),
    radial-gradient(ellipse at 50% 50%, transparent 42%, oklch(0.13 0.012 164 / 0.55) 100%);
  background-size:
    auto, auto,
    32px 32px, 32px 32px,
    128px 128px, 128px 128px,
    auto;
}

/* ── Terminal window panels with corner brackets ──────────────────────── */
.auth-card {
  position: relative;
  border-radius: 12px;
}

.auth-card::before,
.auth-card::after {
  content: '';
  position: absolute;
  width: 13px;
  height: 13px;
  pointer-events: none;
}
.auth-card::before {
  top: 9px;
  left: 9px;
  border-top: 2px solid var(--primary);
  border-left: 2px solid var(--primary);
  border-top-left-radius: 4px;
}
.auth-card::after {
  bottom: 9px;
  right: 9px;
  border-bottom: 2px solid var(--muted-foreground);
  border-right: 2px solid var(--muted-foreground);
  border-bottom-right-radius: 4px;
}

[data-bs-theme="dark"] .auth-card::before {
  filter: drop-shadow(0 0 4px oklch(0.755 0.185 162 / 0.6));
}

@media (max-width: 600px) {
  .auth-card::before,
  .auth-card::after {
    width: 10px;
    height: 10px;
  }
}

/* ── "> LOG IN ▍" heading with blinking cursor ────────────────────────── */
.auth-card h2 {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 0.95rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.16em;
}
.auth-card h2::before {
  content: '> ';
  color: var(--primary);
}
.auth-card h2::after {
  content: '\258D';
  margin-left: 2px;
  color: var(--primary);
  animation: login-cursor-blink 1.1s steps(1) infinite;
}
@keyframes login-cursor-blink {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0; }
}

/* ── Entry animations ──────────────────────────────────────────────────── */
.top-action-corner,
.faq-trigger {
  animation: login-fade-in 0.45s ease 0.05s both;
}
.auth-header {
  animation: login-rise-in 0.55s cubic-bezier(0.22, 0.61, 0.36, 1) both;
}
.auth-split {
  animation: login-rise-in 0.6s cubic-bezier(0.22, 0.61, 0.36, 1) 0.1s both;
}
.auth-status {
  animation: login-fade-in 0.5s ease 0.32s both;
}
.auth-credit {
  animation: login-fade-in 0.45s ease 0.55s both;
}
@keyframes login-rise-in {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes login-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ── Reduced motion ────────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .top-action-corner,
  .faq-trigger,
  .auth-header,
  .auth-split,
  .auth-status,
  .auth-credit {
    animation: none;
  }
  .auth-card h2::after {
    animation: none;
  }
}

/* ── Brand mark glow ───────────────────────────────────────────────────── */
.brand-mark {
  transition: filter 0.25s ease;
  filter: drop-shadow(0 0 10px oklch(from var(--primary) l c h / 0.45));
}
.auth-header a:hover .brand-mark {
  filter: drop-shadow(0 0 18px oklch(from var(--primary) l c h / 0.55));
}

/* ── Wordmark glow: shadow tracks each letter's own hue-wave color ──────── */
.matrix-title span {
  text-shadow: 0 0 10px currentColor;
}

/* ── Grid animation card dark chart well ───────────────────────────────── */
[data-bs-theme="dark"] .grid-anim-canvas-wrap {
  box-shadow: inset 0 2px 12px oklch(0.02 0.01 164 / 0.5);
}