/* ==========================================================================
   Sign in / create account — split screen: the sleeping kraken (and the deck
   you asked for) on the left, the form on the right. Element IDs are the ones
   google-sign-in-script.js drives; don't rename them.
   ========================================================================== */

body.auth-page { background: var(--abyss-1); }

.auth {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  min-height: 100svh;
}

/* ---------- the art side ---------- */

.auth__art {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 40px;
  padding: 28px clamp(24px, 4vw, 56px) clamp(28px, 5vh, 56px);
  overflow: hidden;
  isolation: isolate;
}
.auth__art img {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 62%;
}
.auth__glow {
  mix-blend-mode: screen;
  animation: auth-glow 7s ease-in-out infinite;
}
@keyframes auth-glow { 0%, 100% { opacity: 0.35; } 50% { opacity: 0.95; } }
.auth__veil {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(3, 10, 18, 0.55) 0%, transparent 22%, transparent 42%, rgba(3, 10, 18, 0.78) 78%, rgba(3, 10, 18, 0.94) 100%),
    linear-gradient(90deg, transparent 70%, rgba(3, 10, 18, 0.6) 100%);
}

.auth__top { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.auth__back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-2);
  text-decoration: none;
  transition: color 0.2s;
}
.auth__back .i { width: 18px; height: 18px; }
.auth__back:hover { color: var(--ink); }

/* the pitch (no pending deck) */
.pitch h1 { font-size: clamp(48px, 5.4vw, 84px); line-height: 0.95; letter-spacing: -0.032em; }
.pitch ul { display: flex; flex-direction: column; gap: 12px; margin: 26px 0 0; padding: 0; list-style: none; }
.pitch li { display: flex; align-items: center; gap: 10px; font-size: 16px; color: var(--ink-2); }
.pitch li .i { flex: none; width: 18px; height: 18px; color: var(--glow); stroke-width: 2; }

/* the deck you asked for on the homepage */
.waiting {
  max-width: 560px;
  padding: 24px 24px 22px;
  border: 1px solid rgba(var(--glow-rgb), 0.28);
  border-radius: var(--r-xl);
  background: rgba(4, 14, 25, 0.66);
  -webkit-backdrop-filter: blur(16px) saturate(1.2);
  backdrop-filter: blur(16px) saturate(1.2);
  box-shadow: var(--shadow-deep), 0 0 60px -24px rgba(var(--glow-rgb), 0.55);
  animation: waiting-in 0.9s var(--ease-out) both;
}
@keyframes waiting-in { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.waiting__prompt {
  margin-top: 14px;
  font: 500 clamp(22px, 2.2vw, 30px)/1.2 var(--font-display);
  letter-spacing: -0.012em;
  color: var(--ink);
  overflow-wrap: anywhere;
}
.waiting__meta { display: flex; align-items: center; gap: 14px; margin-top: 14px; }
.waiting__format {
  padding: 6px 9px;
  border: 1px solid rgba(var(--glow-rgb), 0.3);
  border-radius: 7px;
  background: rgba(var(--glow-rgb), 0.1);
  font: 500 10px/1 var(--font-mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--glow-hi);
}
.waiting__edit { font-size: 14px; font-weight: 600; color: var(--ink-2); text-decoration: none; border-bottom: 1px solid var(--line-2); }
.waiting__edit:hover { color: var(--ink); border-color: var(--line-3); }
.waiting__steps { display: flex; flex-direction: column; gap: 10px; margin: 20px 0 0; padding: 18px 0 0; border-top: 1px solid var(--line); list-style: none; }
.waiting__steps li { display: flex; align-items: center; gap: 12px; font-size: 14.5px; color: var(--ink-3); }
.waiting__steps .dot {
  flex: none;
  display: grid;
  place-items: center;
  width: 22px; height: 22px;
  border: 1px solid var(--line-2);
  border-radius: 50%;
  font: 500 10px/1 var(--font-mono);
  color: var(--ink-3);
}
.waiting__steps .dot .i { width: 13px; height: 13px; stroke-width: 2.4; }
.waiting__steps .is-done { color: var(--ink-2); }
.waiting__steps .is-done .dot { border-color: rgba(var(--glow-rgb), 0.5); background: rgba(var(--glow-rgb), 0.14); color: var(--glow-hi); }
.waiting__steps .is-now { color: var(--ink); font-weight: 600; }
.waiting__steps .is-now .dot { border-color: var(--lure); color: var(--lure); box-shadow: 0 0 14px -2px rgba(var(--lure-rgb), 0.7); }

/* ---------- the form side ---------- */

.auth__panel {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 26px;
  padding: 48px clamp(24px, 5vw, 72px);
  border-left: 1px solid var(--line);
  background:
    radial-gradient(ellipse 70% 45% at 50% 0%, rgba(23, 68, 99, 0.25), transparent 70%),
    var(--abyss-1);
}
.auth__box { width: min(400px, 100%); }

.auth__box h2 { font-size: clamp(28px, 2.3vw, 34px); letter-spacing: -0.02em; line-height: 1.1; }
.auth__sub { margin-top: 10px; font-size: 15.5px; color: var(--ink-3); }

.btn-google {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  height: 52px;
  margin-top: 28px;
  border: 0;
  border-radius: 12px;
  background: #fff;
  color: #1f1f1f;
  font: 650 15.5px/1 var(--font-ui);
  cursor: pointer;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.5) inset, 0 10px 30px -14px rgba(0, 0, 0, 0.9);
  transition: transform 0.2s var(--ease-out), box-shadow 0.3s;
}
.btn-google:hover { transform: translateY(-1px); box-shadow: 0 1px 0 rgba(255, 255, 255, 0.5) inset, 0 14px 34px -12px rgba(0, 0, 0, 0.9), 0 0 0 4px rgba(255, 255, 255, 0.08); }
.btn-google svg { width: 20px; height: 20px; }

.or { display: flex; align-items: center; gap: 14px; margin: 24px 0; font: 500 10px/1 var(--font-mono); letter-spacing: 0.2em; text-transform: uppercase; color: var(--ink-4); }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line-2); }

#emailPasswordForm { display: flex; flex-direction: column; gap: 10px; }
.auth input[type="email"],
.auth input[type="password"],
.auth input[type="text"],
#resetEmail,
#displayNameInput {
  width: 100%;
  height: 50px;
  padding: 0 16px;
  border: 1px solid var(--line-2);
  border-radius: 12px;
  outline: none;
  background: rgba(1, 6, 12, 0.6);
  color: var(--ink);
  font-size: 16px;
  transition: border-color 0.2s, box-shadow 0.2s, background-color 0.2s;
}
.auth input::placeholder, #displayNameInput::placeholder { color: var(--ink-4); }
.auth input:focus, #displayNameInput:focus {
  border-color: rgba(var(--glow-rgb), 0.6);
  background: rgba(1, 8, 16, 0.85);
  box-shadow: 0 0 0 4px rgba(var(--glow-rgb), 0.12);
}

#formSubmitButton, #sendResetButton, #submitDisplayName {
  width: 100%;
  height: 50px;
  margin-top: 6px;
  border: 0;
  border-radius: 12px;
  background: linear-gradient(180deg, #ffc868 0%, #ffab37 100%);
  color: var(--lure-ink);
  font: 700 15.5px/1 var(--font-ui);
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255, 240, 210, 0.7), 0 10px 30px -12px rgba(var(--lure-rgb), 0.65);
  transition: transform 0.2s var(--ease-out), box-shadow 0.3s, filter 0.2s;
}
#formSubmitButton:hover, #sendResetButton:hover, #submitDisplayName:hover { transform: translateY(-1px); filter: brightness(1.05); }
#sendResetButton:disabled { opacity: 0.6; cursor: default; transform: none; }

#forgotPasswordText, #toggleText, #backToSignInText { margin-top: 16px; font-size: 14.5px; color: var(--ink-3); text-align: center; }
#forgotPasswordText { margin-top: 14px; }
.auth__box a, .modal-content a { color: var(--glow-hi); font-weight: 600; text-decoration: none; }
.auth__box a:hover { text-decoration: underline; text-underline-offset: 3px; }

#resetView h2 { margin-bottom: 10px; }
.reset-help { margin-bottom: 22px; font-size: 15px; color: var(--ink-3); }
#resetView #sendResetButton { margin-top: 12px; }
.reset-status { margin-top: 14px; font-size: 14px; line-height: 1.5; }

.auth__legal { max-width: 400px; font-size: 12.5px; line-height: 1.6; color: var(--ink-4); text-align: center; }
.auth__legal a { color: var(--ink-3); }

/* ---------- display-name modal (Google sign-ups) ---------- */

.modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 60;
  padding: 20px;
  background: rgba(1, 4, 9, 0.74);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  opacity: 0;
  transition: opacity 0.3s;
}
.modal-content {
  position: relative;
  width: min(420px, 100%);
  margin: min(18vh, 160px) auto 0;
  padding: 30px 28px 28px;
  border: 1px solid var(--line-2);
  border-radius: var(--r-xl);
  background: linear-gradient(180deg, rgba(12, 32, 52, 0.96), rgba(5, 16, 28, 0.98));
  box-shadow: var(--shadow-deep), 0 0 60px -26px rgba(var(--glow-rgb), 0.6);
}
.modal-content h2 { font-size: 28px; letter-spacing: -0.02em; }
.modal-content p { margin: 10px 0 20px; font-size: 15px; color: var(--ink-3); }
.modal-content #submitDisplayName { margin-top: 12px; }
.close-button {
  position: absolute;
  top: 14px; right: 16px;
  font-size: 24px;
  line-height: 1;
  color: var(--ink-3);
  cursor: pointer;
}
.close-button:hover { color: var(--ink); }

/* reCAPTCHA v3 badge (App Check): keep it, keep it out of the way */
.grecaptcha-badge { opacity: 0.35; transition: opacity 0.3s; }
.grecaptcha-badge:hover { opacity: 1; }

/* ---------- phones ---------- */

@media (max-width: 900px) {
  .auth { grid-template-columns: 1fr; }
  .auth__art { min-height: 0; padding-bottom: 28px; gap: 120px; }
  .auth__art img { object-position: 50% 70%; }
  .pitch h1 { font-size: clamp(44px, 12vw, 64px); }
  .pitch ul { margin-top: 18px; }
  .auth__panel { border-left: 0; border-top: 1px solid var(--line); padding: 40px 20px 32px; justify-content: flex-start; }
  .waiting { padding: 20px 18px 18px; }
  .waiting__steps { display: none; }
}
@media (max-width: 480px) {
  .auth__back span { display: none; }
  .auth__art { gap: 88px; }
}
