/* ── Login page layout ── */
.login-page {
  display: flex;
  min-height: 100vh;
  overflow: hidden;
  position: relative;
  background: var(--bg-0);
}

/* Full-page particle canvas — behind both panels */
.login-particles {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

/* Full-page ambient glows */
.login-page::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 45% 55% at 15% 35%, hsla(0,90%,50%,0.1) 0%, transparent 65%),
    radial-gradient(ellipse 35% 45% at 85% 70%, hsla(0,80%,40%,0.07) 0%, transparent 65%);
  pointer-events: none;
  z-index: 0;
}

/* Full-page grid overlay */
.login-page::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: radial-gradient(ellipse 80% 80% at 30% 50%, black 0%, transparent 80%);
  pointer-events: none;
  z-index: 0;
  opacity: 0.45;
}

/* Full-page "SENTINEL" background word */
.login-bignword {
  position: absolute;
  bottom: 6%;
  left: -1%;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(80px, 13vw, 180px);
  letter-spacing: -0.04em;
  color: var(--ink);
  opacity: 0.02;
  line-height: 1;
  pointer-events: none;
  user-select: none;
  z-index: 0;
  white-space: nowrap;
}

/* ── Left atmospheric panel ── */
.login-left {
  flex: 0 0 55%;
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Soft vertical separator */
.login-left::after {
  content: '';
  position: absolute;
  top: 10%;
  right: 0;
  bottom: 10%;
  width: 1px;
  background: linear-gradient(180deg,
    transparent 0%,
    var(--line-strong) 30%,
    hsla(0, 70%, 60%, 0.18) 50%,
    var(--line-strong) 70%,
    transparent 100%
  );
  pointer-events: none;
}

.login-brand {
  position: relative;
  z-index: 2;
  padding: 60px;
  /* subtle left-side vignette so text stays legible over particles */
  background: radial-gradient(ellipse 100% 80% at 40% 50%, hsla(0,20%,4%,0.4) 0%, transparent 100%);
  border-radius: 4px;
}

.login-brand-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 18px;
  letter-spacing: 0.08em;
  color: var(--ink);
  text-transform: uppercase;
  margin-bottom: 64px;
}

.login-tagline {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(42px, 5.5vw, 72px);
  line-height: 1.0;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin: 0 0 32px;
}

.login-tagline .accent {
  color: var(--blue-bright);
}

.login-tagline-sub {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 18px;
  color: var(--ink-dim);
  margin: 0 0 48px;
  max-width: 340px;
  line-height: 1.6;
}

.login-stat-chips {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.login-stat-chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--ink-dim);
  text-transform: uppercase;
}

.login-stat-chip::before {
  content: '';
  display: block;
  width: 28px;
  height: 1px;
  background: var(--blue-bright);
  opacity: 0.5;
}

.login-stat-val {
  color: var(--blue-bright);
  font-weight: 600;
}

/* ── Right panel ── */
.login-right {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 1;
  padding: 40px 24px;
  /* subtle darkening vignette so card reads clearly against particles */
  background: radial-gradient(ellipse 90% 80% at 50% 50%, hsla(0,20%,4%,0.55) 0%, transparent 100%);
}

/* ── Login card ── */
.login-card {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 420px;
  padding: 52px 44px 44px;
  border-radius: 20px;
  background: linear-gradient(160deg, hsla(0,40%,6%,0.97) 0%, hsla(0,50%,3%,0.99) 100%);
  border: 1px solid var(--line-strong);
  overflow: hidden;
}

.login-card::before {
  content: '';
  position: absolute;
  top: -1px;
  left: 20%;
  right: 20%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--blue-bright), transparent);
  opacity: 0.6;
}

/* scan sweep on load */
.login-card-scan {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    hsla(0,100%,80%,0) 0%,
    hsla(0,100%,80%,0.06) 50%,
    hsla(0,100%,80%,0) 100%
  );
  height: 30%;
  width: 100%;
  animation: loginScan 4s linear forwards;
  pointer-events: none;
}

@keyframes loginScan {
  0%   { transform: translateY(-100%); opacity: 1; }
  80%  { opacity: 1; }
  100% { transform: translateY(450%); opacity: 0; }
}

/* ── Card content ── */
.login-eyebrow {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--blue-bright);
  text-transform: uppercase;
  margin-bottom: 20px;
}

.login-eyebrow .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--blue-bright);
  animation: pulse 2s infinite;
  flex-shrink: 0;
}

.login-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(34px, 4vw, 44px);
  letter-spacing: -0.02em;
  color: var(--ink);
  line-height: 1.05;
  margin: 0 0 10px;
}

.login-sub {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 17px;
  color: var(--ink-dim);
  margin: 0 0 36px;
}

/* ── OAuth buttons ── */
.oauth-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 32px;
}

.oauth-btn {
  width: 100%;
  height: 56px;
  border-radius: 12px;
  border: 1px solid;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 20px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, background 0.18s ease;
  text-transform: uppercase;
  position: relative;
  overflow: hidden;
}

.oauth-btn:hover {
  transform: translateY(-2px);
}

.oauth-btn svg {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
}

.oauth-btn-label {
  flex: 1;
  text-align: center;
  margin-right: 20px; /* optically re-center accounting for icon */
}

/* Discord */
.oauth-discord {
  background: hsla(235, 86%, 25%, 0.15);
  border-color: hsla(235, 86%, 65%, 0.25);
  color: #c9d1f5;
}

.oauth-discord:hover {
  background: hsla(235, 86%, 25%, 0.28);
  border-color: #5865F2;
  box-shadow: 0 0 28px hsla(235, 86%, 65%, 0.25), 0 4px 16px hsla(235, 86%, 40%, 0.2);
}

/* GitHub */
.oauth-github {
  background: hsla(0, 0%, 100%, 0.04);
  border-color: hsla(0, 0%, 100%, 0.14);
  color: var(--ink);
}

.oauth-github:hover {
  background: hsla(0, 0%, 100%, 0.08);
  border-color: hsla(0, 0%, 100%, 0.5);
  box-shadow: 0 0 24px hsla(0, 0%, 100%, 0.08), 0 4px 16px hsla(0, 0%, 0%, 0.3);
}

/* Google */
.oauth-google {
  background: hsla(0, 0%, 100%, 0.03);
  border-color: hsla(0, 0%, 100%, 0.1);
  color: var(--ink);
}

.oauth-google:hover {
  background: hsla(0, 0%, 100%, 0.06);
  border-color: hsla(0, 0%, 100%, 0.3);
  box-shadow:
    -4px 0 16px hsla(4, 90%, 58%, 0.15),
    4px 0 16px hsla(217, 90%, 61%, 0.15),
    0 4px 16px hsla(122, 39%, 49%, 0.1),
    0 -4px 16px hsla(45, 93%, 47%, 0.1);
}

/* ── Divider ── */
.login-divider {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 32px;
}

.login-divider::before,
.login-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--line);
}

.login-divider span {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  color: var(--ink-mute);
  text-transform: uppercase;
  white-space: nowrap;
  text-align: center;
}

@media (max-width: 520px) {
  .login-divider span {
    white-space: normal;
  }
}

/* ── Bottom link ── */
.login-footer-link {
  text-align: center;
  font-family: var(--font-sans);
  font-size: 13px;
  color: var(--ink-mute);
  margin: 0;
}

.login-footer-link a {
  color: var(--blue-bright);
  text-decoration: none;
  font-weight: 500;
  transition: opacity 0.15s;
}

.login-footer-link a:hover {
  opacity: 0.75;
}

/* ── Card reveal animation ── */
.login-card {
  animation: cardReveal 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

@keyframes cardReveal {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

.login-brand {
  animation: brandReveal 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) 0.1s both;
}

@keyframes brandReveal {
  from { opacity: 0; transform: translateX(-20px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* ── Divider text: allow wrapping on narrow cards ── */
.login-divider span {
  white-space: normal;
  text-align: center;
}

/* ── Tablet (≤1100px): shrink left panel typography ── */
@media (max-width: 1100px) {
  .login-brand {
    padding: 40px;
  }

  .login-tagline {
    font-size: clamp(36px, 4.5vw, 56px);
  }

  .login-card {
    padding: 44px 36px 36px;
  }
}

/* ── Stack below 860px ── */
@media (max-width: 860px) {
  .login-page {
    flex-direction: column;
    min-height: 100vh;
  }

  /* Compact left strip with just logo + tagline */
  .login-left {
    flex: 0 0 auto;
    min-height: 220px;
    padding: 0;
  }

  .login-brand {
    padding: 32px 24px 28px;
    text-align: center;
    width: 100%;
  }

  .login-brand-logo {
    justify-content: center;
    margin-bottom: 16px;
  }

  .login-tagline {
    font-size: clamp(28px, 7vw, 40px);
    margin-bottom: 0;
  }

  .login-tagline-sub,
  .login-stat-chips {
    display: none;
  }

  .login-bignword {
    font-size: clamp(60px, 18vw, 100px);
    bottom: -5%;
    opacity: 0.018;
  }

  /* Right panel fills remaining space */
  .login-right {
    flex: 1;
    padding: 32px 16px 48px;
    align-items: flex-start;
    padding-top: 36px;
  }

  .login-card {
    max-width: 100%;
    width: 100%;
    padding: 36px 28px 32px;
    border-radius: 16px;
  }
}

/* ── Small phones (≤480px) ── */
@media (max-width: 480px) {
  .login-left {
    min-height: 160px;
  }

  .login-brand {
    padding: 24px 16px 20px;
  }

  .login-brand-logo {
    font-size: 16px;
  }

  .login-tagline {
    font-size: clamp(24px, 8vw, 34px);
  }

  .login-right {
    padding: 24px 12px 40px;
  }

  .login-card {
    padding: 28px 20px 28px;
    border-radius: 14px;
  }

  .login-title {
    font-size: clamp(28px, 8vw, 36px);
  }

  .oauth-btn {
    height: 52px;
    font-size: 13px;
    gap: 10px;
    padding: 0 14px;
  }

  .oauth-btn-label {
    margin-right: 14px;
  }

  .login-divider span {
    font-size: 9px;
  }
}
