/* ==========================================================================
   OutfitScore — Design System v1.0
   Single source of truth for all design tokens and shared components.
   Load order: AFTER tailwind-custom.css (overrides where needed)
   ========================================================================== */


/* ==========================================================================
   1. DESIGN TOKENS (CSS Custom Properties)
   ========================================================================== */

:root {
    /* --- Brand Colors --- */
    --brand-50: #eef2ff;
    --brand-100: #e0e7ff;
    --brand-200: #c7d2fe;
    --brand-400: #818cf8;
    --brand-500: #6366f1;
    /* primary */
    --brand-600: #4f46e5;
    /* primary dark / hover */
    --brand-700: #4338ca;
    --brand-900: #1e1b4b;

    /* --- Brand Gradient (single source — use everywhere) --- */
    --gradient-brand: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-brand-hover: linear-gradient(135deg, #5a6fd6 0%, #6a3f94 100%);

    /* --- Analysis-type accent colors --- */
    --outfit-500: #6366f1;
    --outfit-glow: rgba(99, 102, 241, 0.55);
    --makeup-500: #db2777;
    --makeup-glow: rgba(219, 39, 119, 0.55);
    --accessories-500: #059669;
    --accessories-glow: rgba(5, 150, 105, 0.55);

    /* --- Neutral palette --- */
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;

    /* --- Semantic colors --- */
    --color-success: #10b981;
    --color-success-bg: #d1fae5;
    --color-warning: #f59e0b;
    --color-warning-bg: #fef3c7;
    --color-danger: #ef4444;
    --color-danger-bg: #fee2e2;
    --color-info: #3b82f6;
    --color-info-bg: #dbeafe;

    /* --- Typography scale --- */
    --font-sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
        Roboto, "Helvetica Neue", Arial, sans-serif,
        "Apple Color Emoji", "Segoe UI Emoji";

    --text-xs: 0.75rem;
    /* 12px */
    --text-sm: 0.875rem;
    /* 14px */
    --text-base: 1rem;
    /* 16px */
    --text-lg: 1.125rem;
    /* 18px */
    --text-xl: 1.25rem;
    /* 20px */
    --text-2xl: 1.5rem;
    /* 24px */
    --text-3xl: 1.875rem;
    /* 30px */
    --text-4xl: 2.25rem;
    /* 36px */
    --text-5xl: 3rem;
    /* 48px */

    /* --- Spacing scale --- */
    --space-1: 0.25rem;
    /* 4px  */
    --space-2: 0.5rem;
    /* 8px  */
    --space-3: 0.75rem;
    /* 12px */
    --space-4: 1rem;
    /* 16px */
    --space-5: 1.25rem;
    /* 20px */
    --space-6: 1.5rem;
    /* 24px */
    --space-8: 2rem;
    /* 32px */
    --space-10: 2.5rem;
    /* 40px */
    --space-12: 3rem;
    /* 48px */
    --space-16: 4rem;
    /* 64px */

    /* --- Radius scale --- */
    --radius-sm: 0.375rem;
    /* 6px  */
    --radius-md: 0.5rem;
    /* 8px  */
    --radius-lg: 0.75rem;
    /* 12px */
    --radius-xl: 1rem;
    /* 16px */
    --radius-2xl: 1.5rem;
    /* 24px */
    --radius-full: 9999px;

    /* --- Shadows --- */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08), 0 2px 4px rgba(0, 0, 0, 0.04);
    --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.10), 0 4px 8px rgba(0, 0, 0, 0.04);
    --shadow-brand: 0 8px 24px rgba(99, 102, 241, 0.35);

    /* --- Transitions --- */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 400ms cubic-bezier(0.4, 0, 0.2, 1);

    /* --- Layout --- */
    --max-width-content: 1280px;
    --nav-height: 64px;
}


/* ==========================================================================
     2. GLOBAL RESETS / BASE (supplements Tailwind preflight)
     ========================================================================== */

html {
    overflow-x: hidden;
    width: 100%;
    position: relative;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    background-color: var(--gray-50);
    color: var(--gray-900);
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main {
    flex: 1;
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
}

section,
article {
    overflow-x: hidden;
    max-width: 100%;
}

pre,
code,
table {
    max-width: 100%;
    overflow-x: auto;
}

/* Hide JSON-LD scripts from layout */
script[type="application/ld+json"] {
    display: none !important;
}

[x-cloak] {
    display: none !important;
}


/* ==========================================================================
     3. NAVIGATION
     ========================================================================== */

.modern-nav {
    position: sticky;
    top: 0;
    z-index: 9999;
    height: var(--nav-height);
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(99, 102, 241, 0.08);
    box-shadow: 0 1px 8px rgba(0, 0, 0, 0.04);
    transition: box-shadow var(--transition-base);
}

.modern-nav.scrolled {
    box-shadow: var(--shadow-sm);
}

.nav-container {
    max-width: var(--max-width-content);
    margin: 0 auto;
    padding: 0 var(--space-5);
    height: 100%;
}

.nav-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

/* Logo */
.nav-logo {
    flex-shrink: 0;
}

.logo-link {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    text-decoration: none;
    transition: opacity var(--transition-fast);
}

.logo-link:hover {
    opacity: 0.8;
}

.logo-icon {
    font-size: 1.75rem;
    line-height: 1;
    flex-shrink: 0;
}

/* FIXED: was width:250% height:250% — broken on all viewports */
.logo-image {
    width: auto;
    height: 56px;
    max-height: 56px;
    object-fit: contain;
    display: block;
    flex-shrink: 0;
}

.logo-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.logo-main {
    font-size: 1.25rem;
    font-weight: 800;
    background: var(--gradient-brand);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.02em;
}

.logo-sub {
    font-size: 0.65rem;
    color: var(--gray-500);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

/* Desktop nav */
.nav-desktop {
    display: none;
    align-items: center;
    gap: var(--space-8);
}

@media (min-width: 768px) {
    .nav-desktop {
        display: flex;
    }
}

.nav-links {
    display: flex;
    align-items: center;
    gap: var(--space-1);
}

.nav-link {
    color: var(--gray-600) !important;
    font-weight: 500;
    padding: 0.5rem 0.875rem !important;
    border-radius: var(--radius-lg);
    transition: all var(--transition-fast);
    text-decoration: none !important;
    font-size: var(--text-sm);
    white-space: nowrap;
}

.nav-link:hover {
    color: var(--brand-600) !important;
    background-color: var(--brand-50);
}

.nav-link.active {
    color: var(--brand-600) !important;
    background-color: var(--brand-50);
}

/* Nav dropdown */
.nav-dropdown {
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    min-width: 220px;
    padding: var(--space-2);
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-3) var(--space-4);
    border-radius: var(--radius-lg);
    color: var(--gray-700);
    font-size: var(--text-sm);
    font-weight: 500;
    text-decoration: none;
    transition: background-color var(--transition-fast);
}

.dropdown-item:hover {
    background-color: var(--brand-50);
    color: var(--brand-600);
}

/* Mobile nav */
.mobile-menu-button {
    display: flex;
    padding: var(--space-2);
    border-radius: var(--radius-md);
    color: var(--gray-700);
    transition: background-color var(--transition-fast);
}

.mobile-menu-button:hover {
    background-color: var(--gray-100);
}

@media (min-width: 768px) {
    .mobile-menu-button {
        display: none;
    }
}

.hamburger {
    width: 20px;
    height: 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
}

.hamburger-line {
    height: 1.5px;
    background: currentColor;
    transition: all var(--transition-base);
}

.mobile-menu {
    background: white;
    border-top: 1px solid var(--gray-200);
    padding: var(--space-4) 0;
}

.mobile-nav-link {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-3) var(--space-4);
    border-radius: var(--radius-lg);
    text-decoration: none;
    transition: background-color var(--transition-fast);
    margin: 0 var(--space-3);
}

.mobile-nav-link:hover {
    background-color: var(--gray-50);
}

.mobile-link-icon {
    font-size: 1.25rem;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.mobile-link-title {
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--gray-900);
}

.mobile-link-desc {
    font-size: var(--text-xs);
    color: var(--gray-500);
}

.mobile-auth-section {
    border-top: 1px solid var(--gray-200);
    padding-top: var(--space-6);
    margin-top: var(--space-4);
    padding-left: var(--space-4);
    padding-right: var(--space-4);
}

.mobile-user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--gradient-brand);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 1rem;
    flex-shrink: 0;
}

@media (max-width: 480px) {
    .nav-container {
        padding: 0 var(--space-4);
    }

    .logo-main {
        font-size: 1.1rem;
    }
}


/* ==========================================================================
     4. HERO GRADIENT BACKGROUND
     FIXED: removed background-attachment:fixed (causes CLS + mobile jank)
     ========================================================================== */

.gradient-bg {
    background: var(--gradient-brand);
    position: relative;
    overflow: hidden;
    /* NO background-attachment: fixed — removed intentionally for Core Web Vitals */
}

.gradient-bg::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 20% 30%, rgba(255, 255, 255, 0.10) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(255, 255, 255, 0.05) 0%, transparent 50%);
    pointer-events: none;
}

.gradient-bg>div {
    position: relative;
    z-index: 1;
}


/* ==========================================================================
     5. HERO CTA BUTTONS
     ========================================================================== */

.hero-cta-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.875rem 2rem;
    border-radius: var(--radius-full);
    font-size: var(--text-base);
    font-weight: 700;
    text-decoration: none;
    transition: all var(--transition-base);
    cursor: pointer;
    white-space: nowrap;
    letter-spacing: -0.01em;
    border: none;
}

/* Outfit — indigo-to-violet */
.hero-cta-outfit {
    background: linear-gradient(135deg, #6366f1 0%, #7c3aed 100%);
    color: #fff;
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.55),
        0 1px 0 rgba(255, 255, 255, 0.15) inset;
}

.hero-cta-outfit:hover {
    box-shadow: 0 10px 36px rgba(99, 102, 241, 0.70),
        0 1px 0 rgba(255, 255, 255, 0.15) inset;
    transform: translateY(-1px);
}

/* Makeup — pink-to-rose */
.hero-cta-makeup {
    background: linear-gradient(135deg, #db2777 0%, #be185d 100%);
    color: #fff;
    box-shadow: 0 4px 20px rgba(219, 39, 119, 0.55),
        0 1px 0 rgba(255, 255, 255, 0.15) inset;
}

.hero-cta-makeup:hover {
    box-shadow: 0 10px 36px rgba(219, 39, 119, 0.70),
        0 1px 0 rgba(255, 255, 255, 0.15) inset;
    transform: translateY(-1px);
}

/* Accessories — emerald-to-teal */
.hero-cta-accessories {
    background: linear-gradient(135deg, #059669 0%, #0d9488 100%);
    color: #fff;
    box-shadow: 0 4px 20px rgba(5, 150, 105, 0.55),
        0 1px 0 rgba(255, 255, 255, 0.15) inset;
}

.hero-cta-accessories:hover {
    box-shadow: 0 10px 36px rgba(5, 150, 105, 0.70),
        0 1px 0 rgba(255, 255, 255, 0.15) inset;
    transform: translateY(-1px);
}

/* Ghost — secondary / on dark bg */
.hero-cta-ghost {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    border: 1.5px solid rgba(255, 255, 255, 0.45);
    backdrop-filter: blur(4px);
}

.hero-cta-ghost:hover {
    background: rgba(255, 255, 255, 0.18);
    border-color: rgba(255, 255, 255, 0.75);
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.15);
    transform: translateY(-1px);
}

@media (max-width: 640px) {
    .hero-cta-btn {
        width: 100%;
        padding: 1rem 1.75rem;
    }
}

@media (min-width: 641px) and (max-width: 1024px) {
    .hero-cta-btn {
        padding: 0.9375rem 1.75rem;
    }
}

/* Hero text responsive overrides */
@media (max-width: 640px) {
    .gradient-bg>div {
        min-height: auto !important;
        aspect-ratio: auto !important;
        padding: 3rem 1rem !important;
    }

    .gradient-bg h1 {
        font-size: 1.875rem !important;
        line-height: 1.2 !important;
        margin-bottom: 1rem !important;
    }

    .gradient-bg h2 {
        font-size: 1.25rem !important;
        line-height: 1.4 !important;
        margin-bottom: 1.5rem !important;
    }

    .gradient-bg p {
        font-size: 0.9375rem !important;
        line-height: 1.6 !important;
    }
}


/* ==========================================================================
     6. BUTTONS (global system)
     ========================================================================== */

/* Primary filled button */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding: 0.75rem 1.5rem;
    background: var(--gradient-brand);
    color: white;
    font-weight: 700;
    font-size: var(--text-sm);
    border-radius: var(--radius-full);
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: all var(--transition-base);
    box-shadow: var(--shadow-brand);
    white-space: nowrap;
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 12px 32px rgba(99, 102, 241, 0.45);
}

.btn-primary:active:not(:disabled) {
    transform: translateY(0);
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Secondary outlined button */
.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding: 0.75rem 1.5rem;
    background: transparent;
    color: var(--brand-600);
    font-weight: 600;
    font-size: var(--text-sm);
    border-radius: var(--radius-full);
    border: 1.5px solid var(--brand-400);
    cursor: pointer;
    text-decoration: none;
    transition: all var(--transition-fast);
    white-space: nowrap;
}

.btn-secondary:hover {
    background: var(--brand-50);
    border-color: var(--brand-600);
}

/* Login/Register primary button (replaces .btn-primary.login-register) */
.btn-auth {
    width: 100%;
    padding: 1rem 1.5rem;
    background: var(--gradient-brand);
    color: white;
    font-weight: 700;
    font-size: var(--text-base);
    border-radius: var(--radius-xl);
    border: none;
    cursor: pointer;
    transition: all var(--transition-base);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    position: relative;
    overflow: hidden;
}

.btn-auth:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.5);
}

.btn-auth:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}


/* ==========================================================================
     7. CARDS
     ========================================================================== */

.card {
    background: white;
    border-radius: var(--radius-xl);
    border: 1px solid var(--gray-200);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.card-hover {
    transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.card-hover:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.card-gradient-top {
    height: 3px;
    background: var(--gradient-brand);
    border-radius: var(--radius-full) var(--radius-full) 0 0;
}


/* ==========================================================================
     8. FORMS (replaces input.css form styles)
     ========================================================================== */

.form-group {
    margin-bottom: var(--space-5);
}

.form-label {
    display: block;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: var(--space-2);
    font-size: var(--text-sm);
}

.input-wrapper {
    position: relative;
}

.form-input {
    width: 100%;
    padding: 1rem 1.25rem;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-xl);
    font-size: var(--text-base);
    color: var(--gray-900);
    background: #fafbfc;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
    font-family: var(--font-sans);
}

.form-input:focus {
    outline: none;
    border-color: var(--brand-500);
    background: white;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.form-input:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.form-input::placeholder {
    color: var(--gray-400);
}

.input-icon {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    font-weight: 700;
    pointer-events: none;
}

.success-icon {
    color: var(--color-success);
}

.error-icon {
    color: var(--color-danger);
}

.password-toggle {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: var(--gray-500);
    padding: 0;
    font-size: 1.1rem;
}

/* Alert / feedback */
.alert {
    padding: 1rem 1.25rem;
    border-radius: var(--radius-xl);
    margin-bottom: var(--space-6);
    display: flex;
    align-items: flex-start;
    gap: var(--space-3);
    font-size: var(--text-sm);
}

.alert-success {
    background: linear-gradient(135deg, #f0fdf4 0%, #ecfdf5 100%);
    border: 1px solid #bbf7d0;
    color: #166534;
}

.alert-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #dc2626;
}

.alert-icon {
    font-size: 1.1rem;
    flex-shrink: 0;
    margin-top: 1px;
}

.alert-content h3 {
    font-weight: 600;
    margin-bottom: 2px;
}

.alert-content p {
    margin: 0;
    line-height: 1.4;
}

/* Password requirements grid */
.password-requirements {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-2);
    margin-top: var(--space-3);
}

.requirement {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    font-size: var(--text-xs);
    color: var(--gray-500);
    transition: color var(--transition-fast);
}

.requirement.met {
    color: var(--color-success);
}

.requirement-icon {
    font-size: 0.9rem;
}


/* ==========================================================================
     9. AUTH PAGES (replaces .brand-side / .form-side from input.css)
     ========================================================================== */

.auth-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: stretch;
    background: var(--gray-50);
}

.auth-container {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr;
    max-width: var(--max-width-content);
    margin: 0 auto;
    min-height: 100vh;
}

@media (min-width: 1024px) {
    .auth-container.register-layout {
        grid-template-columns: 2fr 3fr;
    }

    .auth-container.login-layout {
        grid-template-columns: 1fr 1fr;
    }
}

/* Brand side */
.brand-side {
    background: var(--gradient-brand);
    color: white;
    padding: var(--space-12);
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.brand-side::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.10) 1px, transparent 1px),
        radial-gradient(circle at 70% 80%, rgba(255, 255, 255, 0.10) 1px, transparent 1px);
    background-size: 60px 60px;
    animation: float 25s ease-in-out infinite;
}

.brand-logo {
    font-size: 3rem;
    margin-bottom: var(--space-3);
    position: relative;
    z-index: 2;
}

.brand-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: var(--space-5);
    letter-spacing: -0.02em;
    position: relative;
    z-index: 2;
    line-height: 1.15;
}

.brand-subtitle {
    font-size: 1.2rem;
    opacity: 0.9;
    margin-bottom: var(--space-10);
    max-width: 300px;
    position: relative;
    z-index: 2;
}

.benefits-list {
    margin-bottom: var(--space-10);
    position: relative;
    z-index: 2;
}

.benefit-item {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    margin-bottom: var(--space-4);
    font-size: var(--text-sm);
    background: rgba(255, 255, 255, 0.10);
    padding: 0.75rem 1rem;
    border-radius: var(--radius-xl);
    backdrop-filter: blur(10px);
}

.benefit-icon {
    font-size: 1.1rem;
    flex-shrink: 0;
}

.brand-social-proof {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    background: rgba(255, 255, 255, 0.10);
    backdrop-filter: blur(10px);
    padding: 0.875rem 1.5rem;
    border-radius: var(--radius-full);
    font-size: var(--text-sm);
    position: relative;
    z-index: 2;
}

/* Form side */
.form-side {
    padding: var(--space-16) var(--space-10);
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: white;
    overflow-y: auto;
}

.form-header {
    text-align: center;
    margin-bottom: var(--space-8);
}

.form-title {
    font-size: var(--text-3xl);
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: var(--space-2);
}

.form-subtitle {
    color: var(--gray-500);
    font-size: var(--text-base);
}

.form-subtitle a {
    color: var(--brand-600);
    text-decoration: none;
    font-weight: 600;
}

.form-subtitle a:hover {
    text-decoration: underline;
}

.form-divider {
    text-align: center;
    margin: var(--space-5) 0;
    position: relative;
}

.form-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--gray-200);
}

.form-divider span {
    background: white;
    padding: 0 var(--space-5);
    color: var(--gray-500);
    font-size: var(--text-sm);
    position: relative;
}

.form-terms {
    text-align: center;
    margin-bottom: var(--space-5);
}

.form-terms p {
    color: var(--gray-500);
    font-size: var(--text-xs);
    line-height: 1.5;
}

.form-terms a {
    color: var(--brand-600);
    text-decoration: none;
    font-weight: 500;
}

.form-footer {
    text-align: center;
    margin-top: var(--space-6);
}

.form-footer p {
    color: var(--gray-500);
    font-size: var(--text-sm);
    margin-bottom: var(--space-3);
}

.form-footer a {
    color: var(--brand-600);
    text-decoration: none;
    font-weight: 600;
}

/* Social sign-in */
.social-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-3);
    padding: 0.875rem 1.25rem;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-xl);
    background: white;
    color: var(--gray-700);
    font-weight: 500;
    font-size: var(--text-sm);
    cursor: pointer;
    transition: all var(--transition-fast);
    margin-bottom: var(--space-3);
    font-family: var(--font-sans);
}

.social-btn:hover:not(:disabled) {
    border-color: var(--gray-300);
    box-shadow: var(--shadow-sm);
}

.social-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.social-note {
    text-align: center;
    color: var(--gray-400);
    font-size: var(--text-xs);
    margin: 0;
}

@media (max-width: 1023px) {
    .brand-side {
        padding: var(--space-10) var(--space-8);
    }

    .brand-title {
        font-size: 2rem;
    }

    .form-side {
        padding: var(--space-10) var(--space-8);
    }

    .benefits-list {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: var(--space-3);
        margin-bottom: var(--space-8);
    }
}

@media (max-width: 640px) {
    .brand-side {
        display: none;
    }

    .form-side {
        padding: var(--space-8) var(--space-5);
    }
}


/* ==========================================================================
     10. TRUST / SOCIAL PROOF (replaces pricing.css .trust-section)
     ========================================================================== */

.trust-section {
    text-align: center;
    padding: var(--space-10) 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-5);
}

.trust-headline {
    font-size: var(--text-xl);
    font-weight: 600;
    color: white;
    max-width: 480px;
    opacity: 0.95;
}

.trust-indicators {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: var(--space-8);
    flex-wrap: wrap;
}

.trust-item {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    color: rgba(255, 255, 255, 0.85);
    font-size: var(--text-sm);
    font-weight: 500;
}

.trust-icon {
    width: 18px;
    height: 18px;
    color: var(--color-success);
    flex-shrink: 0;
}

/* On light backgrounds */
.trust-indicators.light .trust-item {
    color: var(--gray-600);
}

.trust-indicators.light .trust-icon {
    color: var(--color-success);
}


/* ==========================================================================
     11. PRICING CARDS (replaces pricing.css .plan-card / .cta-button)
     ========================================================================== */

.plan-card {
    background: white;
    border-radius: var(--radius-2xl);
    border: 1px solid var(--gray-200);
    overflow: hidden;
    transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.plan-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.plan-card.featured {
    border: 2px solid var(--brand-500);
    box-shadow: var(--shadow-brand);
}

.plan-card.featured:hover {
    box-shadow: 0 16px 48px rgba(99, 102, 241, 0.35);
}

.plan-header {
    padding: var(--space-8);
    border-bottom: 1px solid var(--gray-100);
}

.plan-badge {
    display: inline-block;
    padding: 0.25rem 0.875rem;
    border-radius: var(--radius-full);
    font-size: var(--text-xs);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: var(--space-4);
}

.plan-badge.popular {
    background: var(--brand-50);
    color: var(--brand-600);
    border: 1px solid var(--brand-200);
}

.plan-price {
    display: flex;
    align-items: baseline;
    gap: var(--space-1);
    margin-bottom: var(--space-2);
}

.price-currency {
    font-size: var(--text-2xl);
    font-weight: 700;
    color: var(--brand-600);
}

.price-amount {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1;
    color: var(--brand-600);
}

.price-period {
    font-size: var(--text-lg);
    color: var(--gray-500);
}

/* CTA buttons for pricing (replaces .cta-button.primary/secondary/featured) */
.cta-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 1rem 1.5rem;
    border-radius: var(--radius-full);
    font-weight: 700;
    font-size: var(--text-base);
    text-decoration: none;
    cursor: pointer;
    border: none;
    transition: all var(--transition-base);
    letter-spacing: -0.01em;
}

.cta-button.primary {
    background: var(--gradient-brand);
    color: white;
    box-shadow: var(--shadow-brand);
}

.cta-button.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(99, 102, 241, 0.45);
}

.cta-button.secondary {
    background: transparent;
    color: var(--brand-600);
    border: 2px solid var(--brand-400);
}

.cta-button.secondary:hover {
    background: var(--brand-50);
    border-color: var(--brand-600);
    transform: translateY(-2px);
}

.cta-button.featured {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.35);
    backdrop-filter: blur(4px);
}

.cta-button.featured:hover {
    background: white;
    color: var(--brand-600);
    transform: translateY(-2px);
}


/* ==========================================================================
     12. TESTIMONIALS (replaces pricing.css .testimonial)
     ========================================================================== */

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-5);
}

.testimonial {
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-xl);
    padding: var(--space-6);
    box-shadow: var(--shadow-sm);
}

/* On dark gradient backgrounds */
.testimonial.dark {
    background: rgba(255, 255, 255, 0.10);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.20);
    color: white;
}

.testimonial-stars {
    display: flex;
    gap: 2px;
    margin-bottom: var(--space-4);
    color: #fbbf24;
    font-size: var(--text-sm);
}

.testimonial-text {
    font-style: italic;
    color: var(--gray-700);
    margin-bottom: var(--space-4);
    font-size: var(--text-sm);
    line-height: 1.65;
}

.testimonial.dark .testimonial-text {
    color: rgba(255, 255, 255, 0.90);
}

.testimonial-author {
    font-weight: 600;
    font-size: var(--text-sm);
    color: var(--gray-900);
}

.testimonial.dark .testimonial-author {
    color: white;
}

.testimonial-role {
    font-size: var(--text-xs);
    color: var(--gray-500);
    margin-top: 2px;
}

.testimonial.dark .testimonial-role {
    color: rgba(255, 255, 255, 0.60);
}


/* ==========================================================================
     13. UPLOAD COMPONENT — light redesign (replaces dark #0e0b1d card)
     ========================================================================== */

.upload-panel {
    background: white;
    border: 1.5px solid var(--gray-200);
    border-radius: var(--radius-2xl);
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.upload-area {
    border: 2px dashed var(--gray-300);
    border-radius: var(--radius-xl);
    padding: var(--space-8);
    text-align: center;
    background: var(--gray-50);
    min-height: 200px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: border-color var(--transition-fast), background-color var(--transition-fast);
    cursor: pointer;
}

.upload-area:hover,
.upload-area.drag-over {
    border-color: var(--brand-400);
    background: var(--brand-50);
}

@media (min-width: 768px) {
    .upload-area {
        padding: var(--space-10);
        min-height: 220px;
    }
}

/* Quota pill */
.quota-pill {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: 0.375rem 0.875rem;
    border-radius: var(--radius-full);
    font-size: var(--text-xs);
    font-weight: 600;
}

.quota-pill.active {
    background: rgba(16, 185, 129, 0.10);
    border: 1px solid rgba(16, 185, 129, 0.25);
    color: #065f46;
}

.quota-pill.exhausted {
    background: rgba(239, 68, 68, 0.10);
    border: 1px solid rgba(239, 68, 68, 0.25);
    color: #991b1b;
}

.quota-pulse {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    flex-shrink: 0;
}

.quota-pulse.active {
    background: var(--color-success);
    animation: pulse 2s infinite;
}

.quota-pulse.exhausted {
    background: var(--color-danger);
}


/* ==========================================================================
     14. FOOTER
     ========================================================================== */

.site-footer {
    background: white;
    border-top: 1px solid var(--gray-200);
    padding: var(--space-12) 0 var(--space-8);
    margin-top: auto;
}

.footer-container {
    max-width: var(--max-width-content);
    margin: 0 auto;
    padding: 0 var(--space-5);
}

.footer-brand p {
    font-size: var(--text-sm);
    color: var(--gray-500);
    line-height: 1.65;
    max-width: 280px;
}

.footer-heading {
    font-size: var(--text-xs);
    font-weight: 700;
    color: var(--gray-900);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: var(--space-4);
}

.footer-link {
    display: block;
    font-size: var(--text-sm);
    color: var(--gray-500);
    text-decoration: none;
    padding: var(--space-1) 0;
    transition: color var(--transition-fast);
}

.footer-link:hover {
    color: var(--brand-600);
}

.footer-bottom {
    border-top: 1px solid var(--gray-200);
    margin-top: var(--space-10);
    padding-top: var(--space-6);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: var(--space-4);
}

.footer-copy {
    font-size: var(--text-xs);
    color: var(--gray-500);
}


/* ==========================================================================
     15. ANIMATIONS
     ========================================================================== */

@keyframes float {

    0%,
    100% {
        transform: translateY(0) rotate(0deg);
    }

    33% {
        transform: translateY(-10px) rotate(1deg);
    }

    66% {
        transform: translateY(5px) rotate(-1deg);
    }
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.7;
        transform: scale(1.15);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(16px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-16px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes shimmer {
    0% {
        background-position: -200% center;
    }

    100% {
        background-position: 200% center;
    }
}

.animate-fade-in-up {
    animation: fadeInUp 0.45s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.animate-slide-in-left {
    animation: slideInLeft 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Shimmer skeleton loader */
.skeleton {
    background: linear-gradient(90deg, var(--gray-100) 25%, var(--gray-200) 50%, var(--gray-100) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: var(--radius-md);
}


/* ==========================================================================
     16. SCORE DISPLAY
     ========================================================================== */

.score-circle {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: conic-gradient(var(--brand-500) calc(var(--score, 0) * 1%), var(--gray-100) 0%);
}

.score-value {
    font-size: 3rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1;
    background: var(--gradient-brand);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.score-label {
    font-size: var(--text-xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--gray-500);
}

/* Progress bar */
.progress-bar {
    width: 100%;
    height: 6px;
    background: var(--gray-100);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    border-radius: var(--radius-full);
    background: var(--gradient-brand);
    transition: width 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.progress-fill.green {
    background: linear-gradient(90deg, #10b981, #059669);
}

.progress-fill.amber {
    background: linear-gradient(90deg, #f59e0b, #d97706);
}

.progress-fill.red {
    background: linear-gradient(90deg, #ef4444, #dc2626);
}


/* ==========================================================================
     17. UTILITIES
     ========================================================================== */

/* Brand gradient text */
.text-gradient {
    background: var(--gradient-brand);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Section spacing */
.section-py {
    padding-top: var(--space-16);
    padding-bottom: var(--space-16);
}

.section-px {
    padding-left: var(--space-5);
    padding-right: var(--space-5);
}

.section-container {
    max-width: var(--max-width-content);
    margin: 0 auto;
}

/* Blur overlay for locked/Pro content */
.blur-lock {
    filter: blur(5px);
    pointer-events: none;
    user-select: none;
}

.blur-overlay-container {
    position: relative;
    overflow: hidden;
}

.blur-overlay-cta {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(2px);
    z-index: 2;
}