/* =============================================
   MailVault — Premium Email Landing Page
   Global Stylesheet
   ============================================= */

/* ---------- CSS Variables ---------- */
:root {
    --bg-base:        #060912;
    --bg-deep:        #08091a;
    --glass-bg:       rgba(255, 255, 255, 0.045);
    --glass-border:   rgba(255, 255, 255, 0.10);
    --glass-shadow:   0 32px 80px rgba(0, 0, 0, 0.65), 0 0 0 1px rgba(255,255,255,0.06);
    --accent:         #6366f1;
    --accent-2:       #818cf8;
    --accent-glow:    rgba(99, 102, 241, 0.45);
    --accent-hover:   #4f52e0;
    --text-primary:   #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted:     #475569;
    --input-bg:       rgba(255, 255, 255, 0.055);
    --input-border:   rgba(255, 255, 255, 0.10);
    --input-focus:    rgba(99, 102, 241, 0.6);
    --divider:        rgba(255, 255, 255, 0.08);
    --badge-bg:       rgba(255, 255, 255, 0.04);
    --badge-border:   rgba(255, 255, 255, 0.08);
    --radius-sm:      8px;
    --radius-md:      12px;
    --radius-lg:      20px;
    --radius-xl:      28px;
    --font:           'Inter', system-ui, -apple-system, sans-serif;
    --transition:     0.22s cubic-bezier(0.4, 0, 0.2, 1);
    --nav-height:     64px;
}

/* ---------- Reset & Base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }

body {
    font-family: var(--font);
    background-color: var(--bg-base);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
ul { list-style: none; }
button { font-family: var(--font); cursor: pointer; }
input  { font-family: var(--font); }

/* ---------- Background Mesh / Orbs ---------- */
body::before,
body::after {
    content: '';
    position: fixed;
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
}

body::before {
    width: 720px;
    height: 720px;
    top: -200px;
    left: -200px;
    background: radial-gradient(ellipse at center,
        rgba(99, 102, 241, 0.22) 0%,
        rgba(139, 92, 246, 0.12) 40%,
        transparent 70%);
    filter: blur(60px);
    animation: orb-drift-a 18s ease-in-out infinite alternate;
}

body::after {
    width: 600px;
    height: 600px;
    bottom: -150px;
    right: -150px;
    background: radial-gradient(ellipse at center,
        rgba(56, 189, 248, 0.18) 0%,
        rgba(99, 102, 241, 0.10) 45%,
        transparent 70%);
    filter: blur(70px);
    animation: orb-drift-b 22s ease-in-out infinite alternate;
}

.bg-orb-mid {
    position: fixed;
    width: 400px;
    height: 400px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: radial-gradient(ellipse at center,
        rgba(99, 102, 241, 0.08) 0%,
        transparent 70%);
    filter: blur(80px);
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
    animation: orb-drift-c 14s ease-in-out infinite alternate;
}

@keyframes orb-drift-a {
    0%   { transform: translate(0, 0) scale(1); }
    100% { transform: translate(60px, 80px) scale(1.1); }
}
@keyframes orb-drift-b {
    0%   { transform: translate(0, 0) scale(1); }
    100% { transform: translate(-50px, -60px) scale(1.08); }
}
@keyframes orb-drift-c {
    0%   { opacity: 0.6; transform: translate(-50%, -50%) scale(1); }
    100% { opacity: 1;   transform: translate(-50%, -50%) scale(1.15); }
}

/* ---------- Noise Overlay ---------- */
.noise-overlay {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    opacity: 0.025;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
    background-size: 200px 200px;
}

/* ---------- Navigation ---------- */
.site-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--nav-height);
    z-index: 100;
    background: rgba(6, 9, 18, 0.75);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--divider);
}

.nav-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 9px;
    font-size: 17px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.02em;
    transition: opacity var(--transition);
}
.nav-logo:hover { opacity: 0.75; }

.logo-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    border-radius: 8px;
    color: #fff;
    flex-shrink: 0;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 4px;
}

.nav-links a {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    padding: 7px 14px;
    border-radius: var(--radius-sm);
    transition: color var(--transition), background var(--transition);
}
.nav-links a:hover {
    color: var(--text-primary);
    background: rgba(255,255,255,0.06);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    padding: 6px;
    border-radius: 6px;
}
.nav-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--text-secondary);
    border-radius: 2px;
    transition: transform var(--transition), opacity var(--transition);
}
.nav-toggle.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.active span:nth-child(2) { opacity: 0; }
.nav-toggle.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Page Wrapper ---------- */
.page-wrapper {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.main-content {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: calc(var(--nav-height) + 40px) 20px 60px;
}

/* ---------- Login Section ---------- */
.login-section {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 32px;
}

/* Eyebrow / Status badge above card */
.eyebrow-badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: rgba(99, 102, 241, 0.12);
    border: 1px solid rgba(99, 102, 241, 0.28);
    border-radius: 999px;
    padding: 6px 14px;
    font-size: 12px;
    font-weight: 600;
    color: var(--accent-2);
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.eyebrow-dot {
    width: 7px;
    height: 7px;
    background: var(--accent-2);
    border-radius: 50%;
    animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%       { opacity: 0.5; transform: scale(0.8); }
}

/* ---------- Glass Card ---------- */
.glass-card {
    width: 100%;
    max-width: 420px;
    background: var(--glass-bg);
    backdrop-filter: blur(28px);
    -webkit-backdrop-filter: blur(28px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    box-shadow: var(--glass-shadow);
    padding: 44px 40px 40px;
    position: relative;
    overflow: hidden;
}

/* Subtle top shimmer line */
.glass-card::before {
    content: '';
    position: absolute;
    top: 0; left: 10%; right: 10%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.22), transparent);
}

/* Inner glow at card center top */
.glass-card::after {
    content: '';
    position: absolute;
    top: -80px; left: 50%;
    transform: translateX(-50%);
    width: 300px; height: 160px;
    background: radial-gradient(ellipse at center,
        rgba(99, 102, 241, 0.18) 0%,
        transparent 70%);
    filter: blur(20px);
    pointer-events: none;
}

/* ---------- Card Header ---------- */
.card-header {
    text-align: center;
    margin-bottom: 36px;
}

.card-logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    border-radius: 14px;
    margin-bottom: 22px;
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.45);
    color: #fff;
}

.card-logo svg { width: 26px; height: 26px; }

.card-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.03em;
    margin-bottom: 8px;
    line-height: 1.2;
}

.card-subtitle {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* ---------- Login Form ---------- */
.login-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group label {
    font-size: 12.5px;
    font-weight: 600;
    color: var(--text-secondary);
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 14px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color var(--transition);
    pointer-events: none;
    z-index: 2;
}
.input-icon svg { width: 16px; height: 16px; }

.form-input {
    width: 100%;
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: var(--radius-md);
    padding: 12px 14px 12px 42px;
    font-size: 14.5px;
    font-weight: 400;
    color: var(--text-primary);
    outline: none;
    transition:
        border-color var(--transition),
        box-shadow var(--transition),
        background var(--transition);
    -webkit-appearance: none;
}

.form-input::placeholder { color: var(--text-muted); }

.form-input:focus {
    border-color: var(--accent);
    background: rgba(99, 102, 241, 0.06);
    box-shadow:
        0 0 0 3px var(--accent-glow),
        0 2px 8px rgba(0,0,0,0.3);
}

.form-input:focus + .input-icon,
.input-wrapper:focus-within .input-icon {
    color: var(--accent-2);
}

/* Password row — label + forgot link */
.password-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2px;
}

.forgot-link {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-muted);
    transition: color var(--transition);
}
.forgot-link:hover { color: var(--accent-2); }

/* ---------- Sign In Button ---------- */
.btn-signin {
    width: 100%;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: #fff;
    border: none;
    border-radius: var(--radius-md);
    padding: 13px 20px;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: -0.01em;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition:
        transform var(--transition),
        box-shadow var(--transition),
        filter var(--transition);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
    margin-top: 4px;
}

.btn-signin::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg,
        rgba(255,255,255,0.15) 0%,
        transparent 60%);
    opacity: 0;
    transition: opacity var(--transition);
}

.btn-signin:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 32px rgba(99, 102, 241, 0.55);
    filter: brightness(1.08);
}
.btn-signin:hover::before { opacity: 1; }

.btn-signin:active {
    transform: translateY(0);
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.35);
}

.btn-signin-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.btn-signin-inner svg { width: 16px; height: 16px; }

/* ---------- Divider ---------- */
.divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 4px 0;
}

.divider-line {
    flex: 1;
    height: 1px;
    background: var(--divider);
}

.divider-text {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-muted);
    white-space: nowrap;
}

/* ---------- Invite-Only Badge ---------- */
.invite-badge {
    width: 100%;
    background: var(--badge-bg);
    border: 1px solid var(--badge-border);
    border-radius: var(--radius-md);
    padding: 14px 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    cursor: default;
    user-select: none;
    position: relative;
    overflow: hidden;
}

.invite-badge::before {
    content: '';
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
        -45deg,
        transparent,
        transparent 8px,
        rgba(255,255,255,0.012) 8px,
        rgba(255,255,255,0.012) 10px
    );
}

.invite-icon {
    display: flex;
    align-items: center;
    color: var(--text-muted);
    flex-shrink: 0;
}
.invite-icon svg { width: 15px; height: 15px; }

.invite-text {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-muted);
    letter-spacing: 0.01em;
    text-align: center;
}

.invite-text strong {
    color: var(--text-secondary);
    font-weight: 600;
}

/* ---------- Below Card — subtle tagline ---------- */
.below-card-text {
    text-align: center;
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.6;
    max-width: 380px;
}
.below-card-text a {
    color: var(--accent-2);
    transition: opacity var(--transition);
}
.below-card-text a:hover { opacity: 0.75; }

/* ---------- Features Strip (below card) ---------- */
.features-strip {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 28px;
    flex-wrap: wrap;
    max-width: 500px;
    width: 100%;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 12.5px;
    color: var(--text-muted);
    font-weight: 500;
}

.feature-item svg { width: 14px; height: 14px; color: var(--accent-2); flex-shrink: 0; }

/* ---------- Footer ---------- */
.site-footer {
    position: relative;
    z-index: 1;
    border-top: 1px solid var(--divider);
    background: rgba(6, 9, 18, 0.6);
    padding: 32px 24px;
}

.footer-inner {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    text-align: center;
}

.footer-brand { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.footer-logo  { font-size: 15px; }

.footer-tagline {
    font-size: 13px;
    color: var(--text-muted);
}

.footer-links {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
    justify-content: center;
}

.footer-links a {
    font-size: 13px;
    color: var(--text-muted);
    padding: 4px 10px;
    border-radius: 6px;
    transition: color var(--transition), background var(--transition);
}
.footer-links a:hover {
    color: var(--text-secondary);
    background: rgba(255,255,255,0.05);
}

.footer-copy {
    font-size: 12px;
    color: var(--text-muted);
}

/* ---------- Legal Pages ---------- */
.legal-page {
    max-width: 760px;
    margin: 0 auto;
    padding: calc(var(--nav-height) + 60px) 24px 80px;
    position: relative;
    z-index: 1;
}

.legal-badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: rgba(99, 102, 241, 0.10);
    border: 1px solid rgba(99, 102, 241, 0.22);
    border-radius: 999px;
    padding: 5px 14px;
    font-size: 11.5px;
    font-weight: 600;
    color: var(--accent-2);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin-bottom: 22px;
}

.legal-title {
    font-size: 38px;
    font-weight: 800;
    letter-spacing: -0.04em;
    color: var(--text-primary);
    margin-bottom: 10px;
    line-height: 1.1;
}

.legal-updated {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 48px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--divider);
}

.legal-section {
    margin-bottom: 40px;
}

.legal-section h2 {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.02em;
    margin-bottom: 12px;
    padding-left: 14px;
    border-left: 3px solid var(--accent);
}

.legal-section p {
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 12px;
}

.legal-section ul {
    list-style: none;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.legal-section ul li {
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.7;
    padding-left: 20px;
    position: relative;
}

.legal-section ul li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 10px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent);
    opacity: 0.7;
}

.legal-section a {
    color: var(--accent-2);
    transition: opacity var(--transition);
}
.legal-section a:hover { opacity: 0.75; text-decoration: underline; }

.legal-highlight-box {
    background: rgba(99, 102, 241, 0.07);
    border: 1px solid rgba(99, 102, 241, 0.18);
    border-radius: var(--radius-md);
    padding: 20px 22px;
    margin-bottom: 16px;
}

.legal-highlight-box p {
    margin-bottom: 0;
    font-size: 14.5px;
    color: var(--text-secondary);
}

/* ---------- Scrollbar ---------- */
::-webkit-scrollbar       { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-base); }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.2); }

/* ---------- Selection ---------- */
::selection {
    background: rgba(99, 102, 241, 0.35);
    color: #fff;
}

/* ---------- Animations ---------- */
@keyframes fade-up {
    from { opacity: 0; transform: translateY(24px); }
    to   { opacity: 1; transform: translateY(0);    }
}

.animate-fade-up      { animation: fade-up 0.55s cubic-bezier(0.16,1,0.3,1) both; }
.animate-delay-1      { animation-delay: 0.10s; }
.animate-delay-2      { animation-delay: 0.20s; }
.animate-delay-3      { animation-delay: 0.32s; }
.animate-delay-4      { animation-delay: 0.44s; }
.animate-delay-5      { animation-delay: 0.56s; }
.animate-delay-6      { animation-delay: 0.68s; }
.animate-delay-7      { animation-delay: 0.80s; }

/* ---------- Media Queries ---------- */
@media (max-width: 768px) {
    .nav-toggle { display: flex; }

    .nav-links {
        display: none;
        position: absolute;
        top: var(--nav-height);
        left: 0; right: 0;
        background: rgba(6, 9, 18, 0.97);
        backdrop-filter: blur(20px);
        flex-direction: column;
        align-items: stretch;
        padding: 12px 16px 20px;
        border-bottom: 1px solid var(--divider);
        gap: 2px;
    }

    .nav-links.open { display: flex; }

    .nav-links a {
        padding: 11px 14px;
        border-radius: 8px;
    }

    .glass-card {
        padding: 36px 28px 32px;
        border-radius: var(--radius-lg);
        max-width: 100%;
    }

    .card-title   { font-size: 21px; }
    .legal-title  { font-size: 28px; }

    .features-strip { gap: 16px; }

    .main-content {
        padding: calc(var(--nav-height) + 28px) 16px 48px;
    }
}

@media (max-width: 480px) {
    .glass-card { padding: 30px 20px 28px; }
    .card-title { font-size: 19px; }
    .legal-title { font-size: 24px; }

    .features-strip {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }
}