/* ============================================
   Crumplete.AI Website — Main Styles
   ============================================ */

/* CSS Custom Properties */
:root {
    /* Colors */
    --color-primary: #005078;
    --color-secondary: #008CA0;
    --color-neutral: #B2B2B2;
    --color-light-gray: #E8E8E8;
    --color-white: #FFFFFF;
    --color-dark: #0A1628;
    --color-dark-blue: #003d5c;
    
    /* Gradients */
    --gradient-hero: linear-gradient(135deg, #005078 0%, #008CA0 100%);
    --gradient-dark: linear-gradient(180deg, rgba(10,22,40,0.95) 0%, rgba(0,80,120,0.9) 100%);
    --gradient-card-glow: radial-gradient(circle at 50% 0%, rgba(0,140,160,0.12) 0%, transparent 60%);
    
    /* Typography */
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    
    --text-display: 4rem;
    --text-h1: 3rem;
    --text-h2: 2rem;
    --text-h3: 1.5rem;
    --text-body: 1.125rem;
    --text-small: 0.875rem;
    --text-tiny: 0.75rem;
    
    --weight-light: 300;
    --weight-normal: 400;
    --weight-medium: 500;
    --weight-semibold: 600;
    --weight-bold: 700;
    --weight-extrabold: 800;
    
    /* Spacing */
    --space-xs: 0.5rem;
    --space-sm: 1rem;
    --space-md: 2rem;
    --space-lg: 4rem;
    --space-xl: 6rem;
    --space-2xl: 8rem;
    
    /* Layout */
    --container-max: 1200px;
    --nav-height: 72px;
    
    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 20px 40px rgba(0, 80, 120, 0.12);
    --shadow-glow: 0 8px 24px rgba(0, 140, 160, 0.3);
    
    /* Borders */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    
    /* Transitions */
    --transition-fast: 0.3s ease;
    --transition-normal: 0.5s ease;
    --transition-slow: 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    --transition-smooth: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    
    /* Z-index */
    --z-background: -1;
    --z-content: 1;
    --z-card-hover: 10;
    --z-nav: 100;
    --z-mobile-menu: 200;
    --z-loader: 9999;
}

/* Reset & Base */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

/* Lenis smooth-scroll compatibility (classes added by Lenis at runtime) */
html.lenis, html.lenis body {
    height: auto;
}

.lenis.lenis-smooth {
    scroll-behavior: auto !important;
}

.lenis.lenis-stopped {
    overflow: hidden;
}

body {
    font-family: var(--font-family);
    font-size: var(--text-body);
    line-height: 1.6;
    color: var(--color-dark);
    background: var(--color-white);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

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

ul, ol {
    list-style: none;
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

/* Container */
.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--space-md);
}

/* Section Headers */
.section-header {
    text-align: center;
    max-width: 800px;
    margin: 0 auto var(--space-lg);
}

.section-tag {
    display: inline-block;
    font-size: var(--text-tiny);
    font-weight: var(--weight-semibold);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--color-secondary);
    margin-bottom: var(--space-sm);
    padding: var(--space-xs) var(--space-sm);
    background: rgba(0, 140, 160, 0.08);
    border-radius: var(--radius-sm);
}

.section-title {
    font-size: var(--text-h1);
    font-weight: var(--weight-bold);
    color: var(--color-primary);
    line-height: 1.2;
    margin-bottom: var(--space-sm);
}

.section-subtitle {
    font-size: var(--text-body);
    color: var(--color-neutral);
    max-width: 600px;
    margin: 0 auto;
}

/* Parallax Background Base */
.parallax-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 120%;
    background-size: cover;
    background-position: center;
    will-change: transform;
    z-index: var(--z-background);
}

/* Scroll Progress */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: rgba(0, 80, 120, 0.1);
    z-index: calc(var(--z-nav) + 1);
}

.progress-bar {
    height: 100%;
    background: var(--gradient-hero);
    width: 0%;
    transition: width 0.1s linear;
}

/* Section Dots */
.section-dots {
    position: fixed;
    right: var(--space-md);
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    z-index: 50;
}

.section-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--color-light-gray);
    transition: all var(--transition-fast);
    position: relative;
}

.section-dot::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid transparent;
    transition: all var(--transition-fast);
}

.section-dot.active {
    background: var(--color-secondary);
}

.section-dot.active::before {
    border-color: rgba(0, 140, 160, 0.3);
}

.section-dot:hover {
    background: var(--color-primary);
    transform: scale(1.2);
}

/* Responsive */
@media (max-width: 1024px) {
    :root {
        --text-display: 3rem;
        --text-h1: 2.5rem;
        --text-h2: 1.75rem;
        --text-h3: 1.25rem;
    }
}

@media (max-width: 768px) {
    :root {
        --text-display: 2.5rem;
        --text-h1: 2rem;
        --text-h2: 1.5rem;
        --space-xl: 4rem;
        --space-2xl: 5rem;
    }
    
    .section-dots {
        display: none;
    }
    
    .section-header {
        margin-bottom: var(--space-md);
    }
}

@media (max-width: 480px) {
    :root {
        --text-display: 2rem;
        --text-h1: 1.75rem;
        --text-body: 1rem;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
}
