/* ============================================================
   SPOT auth + landing design system
   Implemented from the Claude Design handoff (SPOT Landing.dc.html).
   Shared by: login (landing), signup, forgot-password,
   reset-password, verify, signup-success.
   ============================================================ */

/* ---- Overpass (self-hosted) ---- */
@font-face { font-family:'Overpass'; src:url('/fonts/overpass-v18-latin-300.woff2') format('woff2'); font-weight:300; font-display:swap; }
@font-face { font-family:'Overpass'; src:url('/fonts/overpass-v18-latin-regular.woff2') format('woff2'); font-weight:400; font-display:swap; }
@font-face { font-family:'Overpass'; src:url('/fonts/overpass-v18-latin-700.woff2') format('woff2'); font-weight:700; font-display:swap; }
@font-face { font-family:'Overpass'; src:url('/fonts/overpass-v18-latin-900.woff2') format('woff2'); font-weight:900; font-display:swap; }

:root {
    --bg: #08080b;
    --accent: #5548FF;          /* Motivf purple */
    --accent-hover: #6F62FF;    /* lighten(accent, +26) */
    --accent-glow: rgba(85,72,255,.45);
    --accent-ring: rgba(85,72,255,.28);
    --data: #6FD2F7;            /* cyan trajectory accent */
    --text: #ffffff;
    --text-dim: #c6c6ce;
    --text-muted: #9a9aa2;
    --label: #85858d;
    --card-bg: rgba(16,16,20,.62);
    --card-border: rgba(255,255,255,.1);
    --field-bg: rgba(255,255,255,.05);
    --field-border: rgba(255,255,255,.14);
    --error-red: #DC3545;
    --success-green: #28a745;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    background: var(--bg);
}

body {
    min-height: 100vh;
    font-family: 'Overpass', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--text);
    -webkit-font-smoothing: antialiased;
}

/* ---- Animations ---- */
@keyframes spotZoom { from { transform: scale(1); } to { transform: scale(1.08); } }
@keyframes spotPing { 0% { transform: scale(.6); opacity:.9; } 70% { transform: scale(2.2); opacity:0; } 100% { opacity:0; } }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---- Atmospheric map background (fixed) ---- */
.auth-bg { position: fixed; inset: 0; overflow: hidden; z-index: 0; background: var(--bg); }
.auth-bg-img {
    position: absolute; inset: -4%;
    width: 108%; height: 108%;
    object-fit: cover; object-position: center;
    animation: spotZoom 34s ease-in-out infinite alternate;
}
.auth-bg-grad {
    position: absolute; inset: 0;
    background: linear-gradient(180deg, rgba(8,8,11,.9) 0%, rgba(8,8,11,.52) 36%, rgba(8,8,11,.6) 68%, rgba(8,8,11,.96) 100%);
}
.auth-bg-glow {
    position: absolute; inset: 0;
    background: radial-gradient(85% 70% at 26% 44%, rgba(85,72,255,.18) 0%, transparent 56%);
}
/* Form pages (not the landing) get a heavier veil so long forms stay legible */
.auth-bg--veiled .auth-bg-grad {
    background: linear-gradient(180deg, rgba(8,8,11,.92) 0%, rgba(8,8,11,.8) 45%, rgba(8,8,11,.95) 100%);
}

/* ---- Shell + top bar ---- */
.auth-shell {
    position: relative; z-index: 2;
    min-height: 100vh;
    display: flex; flex-direction: column;
}

.spot-topbar {
    display: flex; align-items: center; justify-content: space-between;
    gap: 18px; padding: 30px 56px; flex-wrap: wrap;
}

.spot-lockup { display: flex; align-items: center; gap: 14px; text-decoration: none; color: inherit; }

.spot-mark {
    position: relative; display: inline-flex; align-items: center; justify-content: center;
    width: 34px; height: 34px; flex: 0 0 auto;
}
.spot-mark .ring-static { position: absolute; width: 34px; height: 34px; border-radius: 50%; border: 1.5px solid rgba(111,210,247,.5); }
.spot-mark .ring-ping   { position: absolute; width: 34px; height: 34px; border-radius: 50%; border: 1.5px solid var(--data); animation: spotPing 3.4s ease-out infinite; }
.spot-mark .ring-inner  { position: absolute; width: 17px; height: 17px; border-radius: 50%; border: 2px solid var(--data); }
.spot-mark .dot         { position: absolute; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 10px var(--accent-glow); }

.spot-wordmark { display: flex; flex-direction: column; line-height: 1; }
.spot-name { font-weight: 900; font-size: 20px; letter-spacing: .18em; }
.spot-sub  { font-weight: 300; font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--text-muted); margin-top: 6px; white-space: nowrap; }

.spot-poweredby { display: inline-flex; align-items: center; gap: 9px; text-decoration: none; opacity: .78; transition: opacity .18s; }
.spot-poweredby:hover { opacity: 1; }
.spot-poweredby span { font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: #8e8e96; }
.spot-poweredby img { height: 22px; width: auto; filter: brightness(0) invert(1); }

/* ---- Centered form area (non-landing pages) ---- */
.auth-main {
    flex: 1; display: flex; align-items: center; justify-content: center;
    padding: 16px 24px 48px;
}

/* ---- Glass card ---- */
.glass-card {
    padding: 34px 32px;
    background: var(--card-bg);
    backdrop-filter: blur(22px);
    -webkit-backdrop-filter: blur(22px);
    border: 1px solid var(--card-border);
    border-radius: 18px;
    box-shadow: 0 30px 70px rgba(0,0,0,.5);
    width: 100%;
}
.glass-card--narrow { max-width: 460px; }
.glass-card--wide   { max-width: 520px; }

.card-title { font-weight: 900; font-size: 18px; letter-spacing: .01em; margin: 0 0 4px; }
.card-sub   { font-weight: 300; font-size: 13px; color: var(--text-muted); margin: 0 0 24px; }
.card-center { text-align: center; }

/* ---- Forms ---- */
.auth-form { display: flex; flex-direction: column; gap: 14px; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field-row { display: flex; align-items: center; justify-content: space-between; }

label,
.field-label {
    font-weight: 700; font-size: 10px; letter-spacing: .14em;
    text-transform: uppercase; color: var(--label);
}
.required::after { content: ' *'; color: var(--error-red); }

input[type="email"],
input[type="password"],
input[type="text"],
select,
textarea {
    width: 100%;
    padding: 14px 16px;
    font-family: inherit; font-size: 15px;
    color: var(--text);
    background: var(--field-bg);
    border: 1px solid var(--field-border);
    border-radius: 9px;
    outline: none;
    transition: border-color .18s, box-shadow .18s;
}
textarea { min-height: 96px; resize: vertical; line-height: 1.5; }
select {
    cursor: pointer; appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%239a9aa2' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 14px center; padding-right: 38px;
}
input:focus, select:focus, textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-ring);
}
input::placeholder, textarea::placeholder { color: #6c6c76; }

.password-hint { font-size: 12px; color: #6c6c76; margin: 0; }

/* Inline forgot link inside a field-row */
.link-accent { font-size: 12px; color: var(--data); text-decoration: none; font-weight: 500; }
.link-accent:hover { text-decoration: underline; }

/* ---- Buttons ---- */
.btn {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 15px; font-family: inherit;
    font-weight: 700; font-size: 13px; letter-spacing: .1em; text-transform: uppercase;
    color: #fff; background: var(--accent);
    border: none; border-radius: 9px; cursor: pointer;
    text-decoration: none;
    transition: background .18s, box-shadow .2s, transform .1s;
}
.btn:hover:not(:disabled) { background: var(--accent-hover); box-shadow: 0 8px 26px var(--accent-glow); }
.btn:active:not(:disabled) { transform: scale(.99); }
.btn:disabled { background: #2c2c34; color: #74747e; cursor: not-allowed; }
.btn-block { width: 100%; }
.btn-secondary {
    background: transparent; border: 1px solid var(--field-border); color: var(--text);
}
.btn-secondary:hover:not(:disabled) { background: rgba(255,255,255,.06); box-shadow: none; }
.btn--mt { margin-top: 6px; }

/* Button loading spinner (text is cleared by JS while loading) */
.btn.loading { position: relative; pointer-events: none; }
.btn.loading::after {
    content: ''; position: absolute; top: 50%; left: 50%;
    width: 20px; height: 20px; margin: -10px 0 0 -10px;
    border: 2px solid transparent; border-top-color: #fff; border-radius: 50%;
    animation: spin .8s linear infinite;
}

/* ---- Messages (login/signup/reset/forgot use .message; verify uses .status-message) ---- */
.message, .status-message {
    padding: 12px 16px; border-radius: 9px; font-size: 14px; display: none;
}
.message { margin-bottom: 18px; }
.message.show, .status-message:not(.hidden) { display: block; }
.message.error, .status-message.error {
    background: rgba(220,53,69,.15); border: 1px solid var(--error-red); color: #ff6b7a;
}
.message.success, .status-message.success {
    background: rgba(40,167,69,.15); border: 1px solid var(--success-green); color: #5dd879;
}
.message.info, .status-message.loading {
    background: rgba(85,72,255,.16); border: 1px solid var(--accent); color: #b9b2ff;
}
.status-message.hidden { display: none; }

/* ---- Card divider / footer ---- */
.card-divider {
    margin-top: 20px; padding-top: 18px;
    border-top: 1px solid rgba(255,255,255,.08);
    font-size: 13px; color: var(--text-muted);
}
.footer-links {
    text-align: center; margin-top: 22px; font-size: 14px; color: var(--text-muted);
}
.footer-links a, .card-divider a {
    color: #fff; text-decoration: none; font-weight: 600;
    border-bottom: 1px solid var(--accent); padding-bottom: 1px;
}
.footer-links a:hover, .card-divider a:hover { border-bottom-color: var(--accent-hover); }

/* ---- Section title (signup groups) ---- */
.section-title {
    font-weight: 700; font-size: 11px; letter-spacing: .18em; text-transform: uppercase;
    color: var(--data);
    margin: 26px 0 14px; padding-bottom: 8px;
    border-bottom: 1px solid rgba(255,255,255,.1);
}

/* ---- Turnstile ---- */
.turnstile-wrapper { display: flex; justify-content: center; margin-top: 18px; }

/* ---- Status icons / spinners (verify, reset, signup-success) ---- */
.status-icon { font-size: 56px; margin-bottom: 20px; line-height: 1; }
.big-spinner {
    width: 40px; height: 40px; margin: 0 auto 22px;
    border: 3px solid rgba(255,255,255,.14); border-top-color: var(--accent);
    border-radius: 50%; animation: spin 1s linear infinite;
}
.muted-text { font-size: 14px; color: var(--text-muted); line-height: 1.6; }
.hidden { display: none; }

/* ---- Signup-success: progress stepper + steps ---- */
.progress-stepper { display: flex; justify-content: space-between; margin-bottom: 30px; position: relative; }
.progress-stepper::before {
    content: ''; position: absolute; top: 16px; left: 20%; right: 20%; height: 2px;
    background: rgba(255,255,255,.12); z-index: 0;
}
.step { display: flex; flex-direction: column; align-items: center; flex: 1; position: relative; z-index: 1; }
.step-number {
    width: 32px; height: 32px; border-radius: 50%;
    background: rgba(255,255,255,.08); color: #888;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 14px; margin-bottom: 8px;
}
.step.completed .step-number { background: var(--success-green); color: #fff; }
.step.active .step-number { background: var(--accent); color: #fff; box-shadow: 0 0 0 4px var(--accent-ring); }
.step-label { font-size: 11px; letter-spacing: .04em; color: #666; text-align: center; }
.step.completed .step-label, .step.active .step-label { color: #ccc; }

.email-display { font-size: 16px; color: var(--data); word-break: break-all; }

.steps { margin: 22px 0; }
.step-item { display: flex; align-items: flex-start; margin-bottom: 16px; }
.step-item:last-child { margin-bottom: 0; }
.step-num {
    min-width: 28px; height: 28px;
    background: var(--accent-ring); border: 1px solid var(--accent);
    color: #cfc9ff; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 13px; font-weight: 700; margin-right: 14px; flex-shrink: 0;
}
.step-text { padding-top: 3px; }
.step-text strong { font-size: 15px; color: #eee; font-weight: 700; }
.step-detail { font-size: 13px; color: #888; margin-top: 2px; }
.timeline { text-align: center; font-size: 13px; color: #666; margin: 18px 0 0; }
.resend-section { margin-top: 26px; padding-top: 22px; border-top: 1px solid rgba(255,255,255,.1); text-align: center; }
.resend-section p { font-size: 14px; color: #888; margin: 0 0 12px; }
.resend-hint { font-size: 12px; color: #666; margin-top: 10px; }

/* ---- Responsive ---- */
@media (max-width: 1040px) {
    .spot-topbar { padding: 26px 36px; }
}
@media (max-width: 780px) {
    .spot-topbar { padding: 20px 22px; }
    .spot-sub { display: none; }
    .auth-main { padding: 8px 18px 40px; }
    .glass-card { padding: 28px 22px; }
}
@media (max-width: 440px) {
    .spot-poweredby { display: none; }
}
