/* ==========================================================================
   IQScore - Main Stylesheet & Light Theme Design System
   Optimized for Crisp Visibility, Light Mode Glassmorphism & Mobile UX
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

:root {
    --bg-dark: #f8fafc;
    --bg-card: #ffffff;
    --bg-card-hover: #f1f5f9;
    --border-color: #e2e8f0;
    --border-hover: rgba(99, 102, 241, 0.6);
    
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #64748b;
    
    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --secondary: #06b6d4;
    --accent-gold: #d97706;
    --accent-green: #059669;
    
    --gradient-primary: linear-gradient(135deg, #6366f1 0%, #06b6d4 100%);
    --gradient-glow: linear-gradient(135deg, rgba(99, 102, 241, 0.15) 0%, rgba(6, 182, 212, 0.15) 100%);
    --gradient-card: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05), 0 1px 2px rgba(0, 0, 0, 0.03);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.06), 0 2px 4px -1px rgba(0, 0, 0, 0.04);
    --shadow-lg: 0 14px 28px rgba(15, 23, 42, 0.06), 0 8px 10px rgba(15, 23, 42, 0.04);
    --shadow-glow: 0 8px 30px rgba(99, 102, 241, 0.15);
    
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-full: 9999px;
    
    --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-normal: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    overflow-x: clip;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    touch-action: manipulation;
}

body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    overflow-x: clip;
    position: relative;
    background-color: var(--bg-dark);
    color: var(--text-primary);
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    line-height: 1.5;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    touch-action: manipulation;
}

/* Eliminate iOS Double-Tap Zoom and auto-zoom on input focus */
button, a, input, select, textarea, .text-option, .option-card, .stat-card, .step-card {
    touch-action: manipulation;
}

input, select, textarea {
    font-size: 16px !important;
}

.container {
    width: 100%;
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 16px;
}

@media (max-width: 480px) {
    .container {
        padding: 0 14px;
    }
}

/* Background Ambient Glow Orbs - Enclosed in viewport wrapper to prevent iOS horizontal overflow */
.bg-orbs-container {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
    z-index: -1;
}

.bg-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    pointer-events: none;
}
.bg-orb-1 {
    top: -50px;
    left: -50px;
    width: 320px;
    height: 320px;
    background: rgba(99, 102, 241, 0.09);
}
.bg-orb-2 {
    top: 300px;
    right: -50px;
    width: 300px;
    height: 300px;
    background: rgba(6, 182, 212, 0.08);
}

.gradient-text {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

/* NAVBAR */
.navbar {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    padding: 12px 0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

.nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--text-primary);
    text-decoration: none;
    letter-spacing: -0.02em;
}

.logo-icon {
    width: 36px;
    height: 36px;
    background: var(--gradient-primary);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.25);
    flex-shrink: 0;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 24px;
}

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

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    padding: 6px 2px;
    transition: var(--transition-fast);
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--primary);
}

.mobile-start-btn {
    display: none !important;
}

.desktop-start-btn {
    display: inline-flex !important;
}

/* HIGH-CONTRAST START IQ TEST BUTTON */
.start-btn,
.start-btn:link,
.start-btn:visited {
    background: linear-gradient(135deg, #6366f1 0%, #06b6d4 100%);
    color: #ffffff !important;
    border: none;
    min-height: 42px;
    padding: 10px 22px;
    border-radius: var(--radius-full);
    font-weight: 700;
    font-size: 0.92rem;
    letter-spacing: 0.01em;
    cursor: pointer;
    transition: var(--transition-normal);
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.35);
    text-decoration: none !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    white-space: nowrap;
    line-height: 1;
}

.start-btn:hover {
    color: #ffffff !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.5);
    background: linear-gradient(135deg, #4f46e5 0%, #0891b2 100%);
}

.start-btn:active {
    color: #ffffff !important;
    transform: scale(0.97);
}

.menu-toggle {
    display: none;
    background: #ffffff;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    font-size: 1.3rem;
    width: 42px;
    height: 42px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-sm);
    flex-shrink: 0;
}

/* BUTTONS */
.primary-btn {
    background: var(--gradient-primary);
    color: #ffffff !important;
    border: none;
    min-height: 52px;
    padding: 14px 28px;
    border-radius: var(--radius-full);
    font-weight: 700;
    font-size: 1.05rem;
    cursor: pointer;
    transition: var(--transition-normal);
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.3);
    text-decoration: none !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.primary-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 28px rgba(99, 102, 241, 0.4);
    color: #ffffff !important;
}

.primary-btn:active {
    transform: scale(0.98);
}

.secondary-btn {
    background: #ffffff;
    color: var(--text-primary) !important;
    border: 1px solid var(--border-color);
    min-height: 52px;
    padding: 14px 28px;
    border-radius: var(--radius-full);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition-normal);
    box-shadow: var(--shadow-sm);
    text-decoration: none !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.secondary-btn:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
    transform: translateY(-2px);
}

/* FOOTER */
.footer {
    margin-top: auto;
    background: #ffffff;
    border-top: 1px solid var(--border-color);
    padding: 32px 0 40px 0;
}

.footer-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 18px;
    color: var(--text-secondary);
    font-size: 0.85rem;
}

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

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 500;
    transition: var(--transition-fast);
    padding: 4px 6px;
}

.footer-links a:hover {
    color: var(--primary);
}

/* MOBILE DRAWER NAVIGATION */
@media (max-width: 980px) {
    .desktop-start-btn {
        display: none !important;
    }

    .mobile-only-link {
        display: block !important;
    }

    .mobile-start-btn {
        display: inline-flex !important;
    }

    .menu-toggle {
        display: flex;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: calc(100% + 12px);
        left: 0;
        right: 0;
        width: 100%;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(24px);
        -webkit-backdrop-filter: blur(24px);
        flex-direction: column;
        padding: 16px;
        gap: 10px;
        border-radius: var(--radius-md);
        border: 1px solid var(--border-color);
        box-shadow: 0 16px 32px rgba(15, 23, 42, 0.1);
        max-height: calc(100vh - 75px);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    .nav-links.show-menu {
        display: flex;
    }

    .nav-links a {
        width: 100%;
        padding: 12px 16px;
        background: #ffffff;
        border: 1px solid var(--border-color);
        border-radius: var(--radius-md);
        text-align: center;
        font-size: 0.95rem;
        color: var(--text-primary);
        box-shadow: var(--shadow-sm);
    }

    .mobile-start-btn {
        width: 100%;
        min-height: 48px;
        margin-top: 6px;
    }
}
