/* ==================== CSS RESET ==================== */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

html, body {
    height: 100%;
    overflow-x: hidden;
}

body {
    font-family: 'Raleway', sans-serif;
    background: var(--bg-dark);
    color: var(--text-white);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img, picture, video, canvas, svg {
    display: block;
    max-width: 100%;
}

input, button, textarea, select {
    font: inherit;
}

a {
    color: inherit;
    text-decoration: none;
}

ul, ol {
    list-style: none;
}

/* ==================== CSS VARIABLES ==================== */
:root {
    /* Platform Colors */
    --soulmate-red: #E53935;
    --soulmate-red-hover: #C62828;
    --soulmate-red-light: rgba(229, 57, 53, 0.15);

    --creator-orange: #FF9800;
    --creator-orange-hover: #F57C00;
    --creator-orange-light: rgba(255, 152, 0, 0.15);

    --ai-silver: #E8E8E8;
    --ai-silver-hover: #D0D0D0;
    --ai-silver-light: rgba(232, 232, 232, 0.15);

    /* AI Gold - for ADDUSK and gold-themed elements */
    --ai-gold: #FFD700;
    --ai-gold-hover: #E6C200;
    --ai-gold-light: rgba(255, 215, 0, 0.15);

    /* Talk SE Gold */
    --talkse-gold: #C9A84C;
    --talkse-gold-hover: #B8973F;
    --talkse-gold-light: rgba(201, 168, 76, 0.15);

    --professional-blue: #0066FF;
    --professional-blue-hover: #0055DD;
    --professional-blue-light: rgba(0, 102, 255, 0.15);

    /* Professional Yellow - for yellow button variant */
    --professional-yellow: #FFEB3B;
    --professional-yellow-hover: #FDD835;
    --professional-yellow-light: rgba(255, 235, 59, 0.15);

    --fitness-emerald: #059669;
    --fitness-emerald-hover: #047857;
    --fitness-emerald-light: rgba(5, 150, 105, 0.15);

    /* Background Colors - Maps to SE theme for dark/light mode */
    --bg-dark: var(--se-bg, #0a0a0f);
    --bg-section: var(--se-bg-elevated, #111118);
    --bg-card: var(--se-bg-card, #16161d);
    --bg-input: var(--se-bg-input, #1a1a22);
    --bg-hover: var(--se-bg-elevated, #1f1f28);

    /* Text Colors - Maps to SE theme for dark/light mode */
    --text-white: var(--se-text, #FFFFFF);
    --text-gray: var(--se-text-secondary, #9CA3AF);
    --text-dim: var(--se-text-muted, #6B7280);
    --text-muted: var(--se-text-muted, #4B5563);

    /* Border Colors - Maps to SE theme for dark/light mode */
    --border-default: var(--se-border-card, rgba(255, 255, 255, 0.1));
    --border-hover: var(--se-border, rgba(255, 255, 255, 0.2));
    --border-active: rgba(255, 255, 255, 0.3);

    /* Overlay Colors - for modals, dropdowns, etc. */
    --overlay-dark-95: rgba(0, 0, 0, 0.95);
    --overlay-dark-90: rgba(0, 0, 0, 0.9);
    --overlay-dark-85: rgba(0, 0, 0, 0.85);
    --overlay-dark-80: rgba(0, 0, 0, 0.8);
    --overlay-dark-70: rgba(0, 0, 0, 0.7);
    --overlay-dark-60: rgba(0, 0, 0, 0.6);
    --overlay-dark-50: rgba(0, 0, 0, 0.5);

    /* Status Colors */
    --success: #10B981;
    --success-light: rgba(16, 185, 129, 0.15);
    --error: #EF4444;
    --error-hover: #dc2626;
    --error-light: rgba(239, 68, 68, 0.15);
    --warning: #F59E0B;
    --warning-light: rgba(245, 158, 11, 0.15);
    --info: #3B82F6;
    --info-light: rgba(59, 130, 246, 0.15);

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-glow: 0 0 20px rgba(255, 255, 255, 0.1);

    /* Spacing */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    --space-3xl: 4rem;

    /* Border Radius */
    --radius-sm: 0.25rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-2xl: 1.5rem;
    --radius-full: 9999px;

    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-normal: 300ms ease;
    --transition-slow: 500ms ease;

    /* Z-Index Scale */
    --z-dropdown: 100;
    --z-sticky: 200;
    --z-fixed: 300;
    --z-modal-backdrop: 400;
    --z-modal: 500;
    --z-popover: 600;
    --z-toast: 700;

    /* Typography */
    --font-heading: 'Cinzel', serif;
    --font-body: 'Raleway', sans-serif;

    --text-xs: 0.75rem;
    --text-sm: 0.875rem;
    --text-base: 1rem;
    --text-lg: 1.125rem;
    --text-xl: 1.25rem;
    --text-2xl: 1.5rem;
    --text-3xl: 1.875rem;
    --text-4xl: 2.25rem;
    --text-5xl: 3rem;

    /* Container */
    --container-sm: 640px;
    --container-md: 768px;
    --container-lg: 1024px;
    --container-xl: 1280px;
}

/* ==================== TYPOGRAPHY ==================== */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 600;
    line-height: 1.2;
    color: var(--text-white);
}

h1 { font-size: var(--text-4xl); }
h2 { font-size: var(--text-3xl); }
h3 { font-size: var(--text-2xl); }
h4 { font-size: var(--text-xl); }
h5 { font-size: var(--text-lg); }
h6 { font-size: var(--text-base); }

p {
    color: var(--text-gray);
    line-height: 1.7;
}

.text-white { color: var(--text-white); }
.text-gray { color: var(--text-gray); }
.text-dim { color: var(--text-dim); }
.text-muted { color: var(--text-muted); }

.text-soulmate { color: var(--soulmate-red); }
.text-creator { color: var(--creator-orange); }
.text-ai { color: var(--ai-silver); }
.text-professional { color: var(--professional-blue); }
.text-fitness { color: var(--fitness-teal); }

.text-success { color: var(--success); }
.text-error { color: var(--error); }
.text-warning { color: var(--warning); }
.text-info { color: var(--info); }

/* ==================== UTILITIES ==================== */
.container {
    width: 100%;
    max-width: var(--container-xl);
    margin: 0 auto;
    padding: 0 var(--space-md);
}

.container-sm { max-width: var(--container-sm); }
.container-md { max-width: var(--container-md); }
.container-lg { max-width: var(--container-lg); }

.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-sm { gap: var(--space-sm); }
.gap-md { gap: var(--space-md); }
.gap-lg { gap: var(--space-lg); }

.hidden { display: none !important; }
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ==================== FOCUS STYLES ==================== */
:focus-visible {
    outline: 2px solid var(--fitness-teal);
    outline-offset: 2px;
}

/* ==================== SCROLLBAR ==================== */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-dark);
}

::-webkit-scrollbar-thumb {
    background: var(--border-hover);
    border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--border-active);
}

/* ==================== SELECTION ==================== */
::selection {
    background: var(--fitness-teal);
    color: var(--text-white);
}

/* ==================== ANIMATIONS ==================== */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

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

.animate-fade-in { animation: fadeIn var(--transition-normal) ease-out; }
.animate-fade-in-up { animation: fadeInUp var(--transition-normal) ease-out; }
.animate-fade-in-down { animation: fadeInDown var(--transition-normal) ease-out; }
.animate-slide-in-right { animation: slideInRight var(--transition-normal) ease-out; }
.animate-slide-in-left { animation: slideInLeft var(--transition-normal) ease-out; }
.animate-pulse { animation: pulse 2s infinite; }
.animate-spin { animation: spin 1s linear infinite; }

/* ==================== LOADING SKELETON ==================== */
.skeleton {
    background: linear-gradient(
        90deg,
        var(--bg-input) 25%,
        var(--bg-hover) 50%,
        var(--bg-input) 75%
    );
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: var(--radius-md);
}

/* ==================== RESPONSIVE UTILITIES ==================== */

/* Mobile Menu Toggle - Site-wide */
.mobile-menu-toggle {
    display: none;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 8px;
    background: rgba(255,255,255,0.05);
    cursor: pointer;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    flex-shrink: 0;
}

.mobile-menu-toggle span {
    display: block;
    width: 18px;
    height: 2px;
    background: #FFD700;
    border-radius: 1px;
    transition: all 0.3s ease;
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(4px, 4px);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(4px, -4px);
}

/* Mobile Nav Overlay */
.mobile-nav-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.9);
    z-index: 99;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.mobile-nav-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Mobile Nav Menu */
.mobile-nav-menu {
    position: fixed;
    top: 60px;
    left: 0;
    right: 0;
    background: var(--bg-dark);
    border-bottom: 1px solid var(--border-default);
    padding: 1rem;
    z-index: 101;
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    transition: transform 0.3s ease, opacity 0.3s ease, visibility 0.3s ease;
    max-height: calc(100vh - 60px);
    overflow-y: auto;
}

.mobile-nav-menu.active {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
}

.mobile-nav-menu a,
.mobile-nav-menu button {
    display: block;
    width: 100%;
    padding: 0.875rem 1rem;
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-white);
    text-decoration: none;
    background: none;
    border: none;
    border-radius: 8px;
    text-align: left;
    cursor: pointer;
    transition: background 0.2s ease;
}

.mobile-nav-menu a:hover,
.mobile-nav-menu button:hover {
    background: rgba(255,255,255,0.1);
}

.mobile-nav-divider {
    height: 1px;
    background: var(--border-default);
    margin: 0.5rem 0;
}

/* Collapsible nav items */
.nav-collapsible {
    display: inline-flex;
}

/* Talk SE Nav Link - Gold text */
.talkse-nav-link {
    font-family: 'Raleway', sans-serif;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    color: #FFD700 !important;
    text-decoration: none;
    padding: 0 0.75rem;
    height: 32px;
    display: inline-flex;
    align-items: center;
    transition: all 0.3s ease;
}

.talkse-nav-link:hover {
    color: #FFEB3B !important;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

/* ==================== ALWAYS VISIBLE ELEMENTS ==================== */
/* These elements must NEVER be hidden at any viewport width */

/* Get Everything / CTA buttons - always visible */
.price-btn-wrapper,
.signup-btn,
.cta-btn-wrapper {
    display: inline-flex !important;
    flex-shrink: 0;
}

/* TTS/Mic buttons - always visible as perfect circles */
#ttsToggle,
#voiceToggle {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    min-width: 36px;
    min-height: 36px;
    border-radius: 50%;
    flex-shrink: 0 !important;
}

/* SE Star logo - always visible */
.se-logo-wrapper,
.se-logo-star {
    display: inline-flex !important;
    flex-shrink: 0;
}

/* Hamburger menu - always visible when shown */
.mobile-menu-toggle {
    flex-shrink: 0;
}

/* ==================== RESPONSIVE BREAKPOINTS ==================== */

/* Desktop - 1025px+: HAMBURGER HIDDEN, NAV VISIBLE */
@media (min-width: 1025px) {
    .mobile-menu-toggle {
        display: none !important;
    }

    .mobile-nav-overlay,
    .mobile-nav-menu {
        display: none !important;
    }

    .nav-collapsible {
        display: inline-flex !important;
    }
}

/* Tablet/Split-screen - 1024px: Hamburger activates here */
@media (max-width: 1024px) {
    .mobile-menu-toggle {
        display: flex;
    }

    .mobile-nav-overlay {
        display: block;
    }

    .nav-collapsible {
        display: none !important;
    }
}

/* Tablet Portrait - 768px and below */
@media (max-width: 768px) {
    /* Typography scaling */
    h1 { font-size: var(--text-3xl); }
    h2 { font-size: var(--text-2xl); }
    h3 { font-size: var(--text-xl); }
    h4 { font-size: var(--text-lg); }

    .container {
        padding: 0 var(--space-sm);
    }
}

/* Mobile - 480px and below */
@media (max-width: 480px) {
    html {
        font-size: 14px;
    }

    h1 { font-size: var(--text-2xl); }
    h2 { font-size: var(--text-xl); }
    h3 { font-size: var(--text-lg); }

    /* Ensure touch targets are at least 44px */
    button, a, input[type="button"], input[type="submit"] {
        min-height: 44px;
    }
}

/* Small Mobile - 375px and below */
@media (max-width: 375px) {
    .mobile-menu-toggle {
        width: 32px;
        height: 32px;
    }

    #ttsToggle, #voiceToggle {
        width: 32px !important;
        height: 32px !important;
        min-width: 32px;
    }

    #ttsToggle svg, #voiceToggle svg {
        width: 16px !important;
        height: 16px !important;
    }
}
