/* ============================================================
   MISSION PLANNER — macOS Light Glass Theme
   Shared styles for index.html (landing) and auth.html
   ============================================================ */

* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    /* ---- Light glass palette ---- */
    --bg-base:        #f7f9fc;   /* matches drone_survey_bg_v3.svg base */
    --bg-surface:     rgba(255, 255, 255, 0.55);
    --bg-surface2:    rgba(255, 255, 255, 0.7);
    --bg-card:        rgba(255, 255, 255, 0.5);
    --bg-card2:       rgba(255, 255, 255, 0.72);
    --bg-input:       rgba(255, 255, 255, 0.65);

    --accent:         #2563eb;   /* aligns with the SVG waypoint blue */
    --accent-dim:     #1d4ed8;
    --accent-soft:    #3b82f6;
    --accent-glow:    rgba(37, 99, 235, 0.12);
    --accent-green:   #1f9d55;

    --text-primary:   #0f172a;
    --text-secondary: #475569;
    --text-muted:     #94a3b8;

    --border:         rgba(15, 23, 42, 0.08);
    --border-strong:  rgba(15, 23, 42, 0.12);
    --border-accent:  rgba(37, 99, 235, 0.35);

    --shadow-glass:   0 10px 40px rgba(30, 58, 138, 0.12), 0 2px 8px rgba(15, 23, 42, 0.05);
    --shadow-soft:    0 6px 20px rgba(30, 58, 138, 0.08);

    --radius-md:      10px;
    --radius-lg:      14px;
    --radius-xl:      18px;
}

html { scroll-behavior: smooth; }

body {
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    color: var(--text-primary);
    background: var(--bg-base);
    min-height: 100vh;
    overflow-x: hidden;
}

/* ---------- Background SVG layer ----------
   Rendered as an <img> with object-fit:cover so the SVG reliably fills the
   whole viewport and simply crops the overflow on odd / ultra-wide ratios.
   (The SVG has no height attribute, so a CSS background can't resolve an
   intrinsic size to "cover" against — an <img> avoids that problem.) */
.bg-scene {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    pointer-events: none;
    background-color: var(--bg-base);
}

.bg-scene img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}



/* Soft tint + edge fade so foreground glass cards stay legible. */
.bg-overlay {
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background:
        radial-gradient(ellipse at 50% 32%, rgba(37, 99, 235, 0.05), transparent 60%),
        radial-gradient(ellipse at 50% 100%, rgba(247, 249, 252, 0.85), transparent 70%);
}

/* ---------- Glass primitives ---------- */
.glass {
    background: var(--bg-surface);
    backdrop-filter: blur(26px) saturate(180%);
    -webkit-backdrop-filter: blur(26px) saturate(180%);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-glass);
}

/* ---------- Top bar ---------- */
.topbar {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 22px clamp(20px, 5vw, 56px);
    z-index: 5;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 600;
    letter-spacing: -0.3px;
    font-size: 16px;
}

.brand-icon {
    width: 34px;
    height: 34px;
    background: var(--accent);
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
    flex-shrink: 0;
}

.brand-icon svg { width: 20px; height: 20px; stroke: #fff; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.topbar-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    padding: 9px 16px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-strong);
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: all 0.2s ease;
}

.topbar-link:hover { color: var(--accent); border-color: var(--border-accent); background: var(--bg-card2); }

/* ---------- Hero ---------- */
.hero {
    min-height: calc(100vh - 80px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 40px clamp(20px, 5vw, 56px) 80px;
}

.hero-card {
    max-width: 640px;
    padding: clamp(28px, 5vw, 48px);
    text-align: center;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    color: var(--accent);
    background: var(--accent-glow);
    border: 1px solid var(--border-accent);
    padding: 6px 12px;
    border-radius: 999px;
    margin-bottom: 22px;
}

.hero h1 {
    font-size: clamp(30px, 6vw, 46px);
    font-weight: 700;
    letter-spacing: -1px;
    line-height: 1.1;
    margin-bottom: 16px;
}

.hero h1 .accent { color: var(--accent); }

.hero p.lead {
    font-size: clamp(15px, 2.4vw, 18px);
    color: var(--text-secondary);
    max-width: 520px;
    margin: 0 auto 30px;
}

.cta-row {
    display: flex;
    gap: 14px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 13px 26px;
    border-radius: var(--radius-md);
    font-size: 15px;
    font-weight: 600;
    letter-spacing: -0.2px;
    text-decoration: none;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.2s ease;
}

.btn:active { transform: scale(0.97); }

.btn-primary {
    background: var(--accent);
    color: #fff;
    box-shadow: 0 4px 16px rgba(37, 99, 235, 0.3);
}

.btn-primary:hover { background: var(--accent-dim); box-shadow: 0 6px 22px rgba(37, 99, 235, 0.42); }

.btn-ghost {
    background: var(--bg-card2);
    color: var(--text-primary);
    border-color: var(--border-strong);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.btn-ghost:hover { background: #fff; border-color: var(--border-accent); color: var(--accent); }

.scroll-hint {
    margin-top: 48px;
    color: var(--text-muted);
    font-size: 12px;
    letter-spacing: 0.4px;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.scroll-hint:hover { color: var(--text-secondary); }

.scroll-hint svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; animation: bob 1.8s ease-in-out infinite; }

@keyframes bob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(5px); } }

/* ---------- Info / Features section ---------- */
.info {
    max-width: 1080px;
    margin: 0 auto;
    padding: 20px clamp(20px, 5vw, 56px) 100px;
}

.info-intro {
    text-align: center;
    max-width: 720px;
    margin: 0 auto 48px;
}

.info-intro h2 {
    font-size: clamp(24px, 4vw, 32px);
    font-weight: 700;
    letter-spacing: -0.5px;
    margin-bottom: 16px;
}

.info-intro p {
    color: var(--text-secondary);
    font-size: 16px;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 18px;
}

.feature {
    padding: 24px;
    border-radius: var(--radius-lg);
    background: var(--bg-card);
    border: 1px solid var(--border);
    backdrop-filter: blur(18px) saturate(160%);
    -webkit-backdrop-filter: blur(18px) saturate(160%);
    box-shadow: var(--shadow-soft);
    transition: all 0.2s ease;
}

.feature:hover { border-color: var(--border-accent); transform: translateY(-3px); background: var(--bg-card2); }

.feature-icon {
    width: 42px;
    height: 42px;
    border-radius: 11px;
    background: var(--accent-glow);
    border: 1px solid var(--border-accent);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
}

.feature-icon svg { width: 22px; height: 22px; stroke: var(--accent); fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.feature h3 { font-size: 16px; font-weight: 600; margin-bottom: 8px; letter-spacing: -0.2px; }

.feature p { color: var(--text-secondary); font-size: 13.5px; }

/* ---------- Bottom CTA ---------- */
.cta-band {
    max-width: 760px;
    margin: 0 auto 100px;
    padding: clamp(32px, 5vw, 52px) clamp(20px, 5vw, 56px);
    text-align: center;
}

.cta-band h2 { font-size: clamp(22px, 4vw, 30px); font-weight: 700; letter-spacing: -0.5px; margin-bottom: 12px; }
.cta-band p { color: var(--text-secondary); margin-bottom: 26px; font-size: 15px; }

/* ---------- Footer ---------- */
footer {
    border-top: 1px solid var(--border);
    padding: 28px clamp(20px, 5vw, 56px);
    text-align: center;
    color: var(--text-muted);
    font-size: 12.5px;
}

footer a { color: var(--text-secondary); text-decoration: none; }
footer a:hover { color: var(--accent); }

@media (max-width: 600px) {
    .topbar { padding: 18px 20px; }
    .cta-row { flex-direction: column; width: 100%; }
    .btn { width: 100%; }
}

/* ============================================================
   AUTH PAGE (auth.html)
   ============================================================ */
.auth-body {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.auth-card {
    width: 100%;
    max-width: 400px;
    padding: 36px 32px;
    background: var(--bg-surface2);
    backdrop-filter: blur(30px) saturate(180%);
    -webkit-backdrop-filter: blur(30px) saturate(180%);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-glass);
}

.auth-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 8px;
}

.auth-card .brand-icon { width: 38px; height: 38px; border-radius: 10px; }
.auth-card .brand-icon svg { width: 22px; height: 22px; }
.auth-brand span { font-size: 18px; font-weight: 600; letter-spacing: -0.3px; }

.auth-sub {
    text-align: center;
    color: var(--text-secondary);
    font-size: 13px;
    margin-bottom: 24px;
}

/* ---------- Segmented toggle (Login / Sign up) ---------- */
.segmented {
    position: relative;
    display: grid;
    grid-template-columns: 1fr 1fr;
    background: rgba(15, 23, 42, 0.05);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 3px;
    margin-bottom: 24px;
}

.segmented-thumb {
    position: absolute;
    top: 3px;
    left: 3px;
    width: calc(50% - 3px);
    height: calc(100% - 6px);
    background: #fff;
    border: 1px solid var(--border-strong);
    border-radius: calc(var(--radius-md) - 3px);
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.1);
}
.segmented.signup .segmented-thumb { transform: translateX(100%); }

.segmented button {
    position: relative;
    z-index: 1;
    padding: 9px;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: color 0.2s ease;
}
.segmented button.active { color: var(--accent); font-weight: 600; }

/* ---------- Form ---------- */
.form-group { margin-bottom: 16px; }

.form-group label {
    display: block;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.form-group input {
    width: 100%;
    padding: 11px 13px;
    background: var(--bg-input);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 14px;
    transition: all 0.2s ease;
}
.form-group input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.18);
    background: #fff;
}
.form-group input::placeholder { color: var(--text-muted); }

.btn-submit {
    width: 100%;
    padding: 12px 16px;
    margin-top: 4px;
    background: var(--accent);
    color: #fff;
    border: 1px solid transparent;
    border-radius: var(--radius-md);
    font-size: 15px;
    font-weight: 600;
    letter-spacing: -0.2px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 16px rgba(37, 99, 235, 0.3);
}
.btn-submit:hover:not(:disabled) { background: var(--accent-dim); box-shadow: 0 6px 22px rgba(37, 99, 235, 0.42); }
.btn-submit:active { transform: scale(0.98); }
.btn-submit:disabled { opacity: 0.6; cursor: not-allowed; }

/* ---------- Status message ---------- */
.auth-msg {
    font-size: 13px;
    padding: 11px 14px;
    border-radius: var(--radius-md);
    margin-bottom: 16px;
    display: none;
    line-height: 1.4;
}
.auth-msg.show { display: block; }
.auth-msg.error { background: rgba(220, 38, 38, 0.1); border: 1px solid rgba(220, 38, 38, 0.3); color: #b91c1c; }
.auth-msg.success { background: rgba(31, 157, 85, 0.1); border: 1px solid rgba(31, 157, 85, 0.3); color: #15803d; }
.auth-msg.info { background: var(--accent-glow); border: 1px solid var(--border-accent); color: var(--accent-dim); }

.auth-foot {
    text-align: center;
    margin-top: 22px;
    font-size: 12.5px;
    color: var(--text-muted);
}
.auth-foot a { color: var(--text-secondary); text-decoration: none; }
.auth-foot a:hover { color: var(--accent); }

/* loading spinner on button */
.btn-submit.loading { color: transparent; position: relative; }
.btn-submit.loading::after {
    content: "";
    position: absolute;
    width: 16px; height: 16px;
    top: 50%; left: 50%;
    margin: -8px 0 0 -8px;
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
