/* ================================
   BUILDYOUR.QUEST - MAIN STYLES
   Design System & Global Styles
   ================================ */

/* CSS Custom Properties (Design Tokens) */
:root {
    /* Colors - Purple/Blue Theme */
    --color-primary: #6B4EFF;
    --color-primary-light: #8B6FFF;
    --color-primary-dark: #4B2EDF;
    --color-secondary: #3B82F6;
    --color-secondary-light: #60A5FA;
    --color-accent: #F59E0B;
    --color-accent-light: #FCD34D;

    /* Neutrals */
    --color-dark: #1A1D2E;
    --color-dark-alt: #2A2D3E;
    --color-gray: #6B7280;
    --color-gray-light: #9CA3AF;
    --color-gray-lighter: #E5E7EB;
    --color-white: #FFFFFF;
    --color-off-white: #F9FAFB;

    /* Gradients */
    --gradient-primary: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
    --gradient-accent: linear-gradient(135deg, var(--color-accent) 0%, var(--color-primary) 100%);
    --gradient-dark: linear-gradient(135deg, var(--color-dark) 0%, var(--color-dark-alt) 100%);

    /* Typography */
    --font-heading: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-body: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-mono: 'Courier New', monospace;

    /* Font Sizes */
    --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 */
    --text-6xl: 3.75rem;
    /* 60px */
    --text-7xl: 4.5rem;
    /* 72px */

    /* Spacing (8px scale) */
    --space-1: 0.5rem;
    /* 8px */
    --space-2: 1rem;
    /* 16px */
    --space-3: 1.5rem;
    /* 24px */
    --space-4: 2rem;
    /* 32px */
    --space-6: 3rem;
    /* 48px */
    --space-8: 4rem;
    /* 64px */
    --space-12: 6rem;
    /* 96px */
    --space-16: 8rem;
    /* 128px */

    /* Border Radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-2xl: 1.5rem;
    --radius-full: 9999px;

    /* 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);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    --shadow-glow: 0 0 20px rgba(107, 78, 255, 0.3);

    /* Transitions */
    --transition-fast: 150ms ease-in-out;
    --transition-base: 300ms ease-in-out;
    --transition-slow: 500ms ease-in-out;

    /* Z-index */
    --z-base: 1;
    --z-dropdown: 10;
    --z-sticky: 20;
    --z-navbar: 30;
    --z-modal: 40;
    --z-cursor: 2000;
    /* Above navbar */
    --z-loader: 60;
}

/* Reset & Base Styles */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-body);
    font-size: var(--text-base);
    line-height: 1.7;
    color: var(--color-dark);
    background: var(--color-off-white);
    overflow-x: hidden;
    position: relative;
}

/* Smooth scroll for all anchor links */
html.lenis {
    height: auto;
}

.lenis.lenis-smooth {
    scroll-behavior: auto;
}

.lenis.lenis-smooth [data-lenis-prevent] {
    overscroll-behavior: contain;
}

.lenis.lenis-stopped {
    overflow: hidden;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: var(--space-3);
    color: var(--color-dark);
}

h1 {
    font-size: clamp(var(--text-4xl), 5vw, var(--text-7xl));
}

h2 {
    font-size: clamp(var(--text-3xl), 4vw, var(--text-5xl));
}

h3 {
    font-size: clamp(var(--text-2xl), 3vw, var(--text-4xl));
}

h4 {
    font-size: clamp(var(--text-xl), 2.5vw, var(--text-3xl));
}

p {
    margin-bottom: var(--space-3);
}

p.lead {
    font-size: var(--text-xl);
    font-weight: 500;
    color: var(--color-gray);
}

strong {
    font-weight: 600;
    color: var(--color-dark);
}

a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color var(--transition-base);
}

a:hover {
    color: var(--color-primary-light);
}

ul,
ol {
    list-style: none;
}

img,
video {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Container */
.container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 var(--space-4);
}

@media (max-width: 768px) {
    .container {
        padding: 0 var(--space-2);
    }
}

/* Section Spacing */
.section {
    padding: var(--space-16) 0;
    position: relative;
}

@media (max-width: 768px) {
    .section {
        padding: var(--space-8) 0;
    }
}

/* Section Headers */
.section-header {
    text-align: center;
    margin-bottom: var(--space-12);
}

/* Specific Header Spacing Overrides */
.services .section-header,
.showcase .section-header,
.process .section-header,
.contact .section-header {
    margin-bottom: var(--space-6); /* Reduced padding under descriptions */
}

.section-tag {
    display: inline-block;
    font-size: var(--text-sm);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-primary);
    margin-bottom: var(--space-2);
}

.section-title {
    margin-bottom: var(--space-3);
}

.section-description {
    font-size: var(--text-lg);
    color: var(--color-gray);
    max-width: 600px;
    margin: 0 auto;
}

/* Gradient Text */
.gradient-text {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Utility Classes */
.hidden {
    display: none !important;
}

.opacity-0 {
    opacity: 0;
}

.pointer-events-none {
    pointer-events: none;
}

/* Loading Screen */
.loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--gradient-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: var(--z-loader);
    transition: opacity var(--transition-base), visibility var(--transition-base);
}

.loader.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.loader-content {
    text-align: center;
    width: 90%;
    max-width: 500px;
}

.loader-content video {
    width: 100%;
    max-width: 400px;
    margin: 0 auto var(--space-4);
}

.loader-bar {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.loader-progress {
    height: 100%;
    background: var(--gradient-primary);
    border-radius: var(--radius-full);
    width: 0%;
    transition: width var(--transition-base);
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: var(--space-3) 0;
    background: transparent;
    z-index: var(--z-navbar);
    transition: background var(--transition-base), padding var(--transition-base), backdrop-filter var(--transition-base);
}

.navbar.scrolled {
    background: rgba(26, 29, 46, 0.8);
    backdrop-filter: blur(10px);
    padding: var(--space-2) 0;
    box-shadow: var(--shadow-lg);
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    font-size: var(--text-xl);
    font-weight: 700;
    color: var(--color-white);
    transition: transform var(--transition-base);
}

.logo:hover {
    transform: scale(1.05);
}

.logo img {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: var(--space-6);
}

.nav-link {
    font-size: var(--text-base);
    font-weight: 500;
    color: var(--color-white);
    position: relative;
    padding: var(--space-1) 0;
    transition: color var(--transition-base);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-primary);
    transition: width var(--transition-base);
}

.nav-link:hover::after {
    width: 100%;
}

.nav-link:hover {
    color: var(--color-primary-light);
}

/* Get Started nav button — no gradient background */
.nav-link.btn-primary {
    background: transparent;
    box-shadow: none;
    border: 2px solid var(--color-primary-light);
    color: var(--color-white);
    padding: 0.4rem 1.1rem;
    border-radius: var(--radius-lg);
}

.nav-link.btn-primary:hover {
    background: rgba(107, 78, 255, 0.15);
    box-shadow: none;
    color: var(--color-white);
    transform: none;
}

.nav-link.btn-primary::after {
    display: none;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 6px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: var(--space-1);
    z-index: 1100; /* Must be above nav-links overlay (999) */
    position: relative;
}

.mobile-menu-toggle span {
    width: 28px;
    height: 3px;
    background: var(--color-white);
    border-radius: var(--radius-full);
    transition: all var(--transition-base);
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: flex;
    }

    .nav-links {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background: rgba(15, 16, 30, 0.97);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: var(--space-2);
        padding: var(--space-8) var(--space-6);
        transition: opacity 0.35s ease, visibility 0.35s ease;
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        z-index: 999;
        right: 0;
    }

    .nav-links.active {
        opacity: 1;
        visibility: visible;
        pointer-events: all;
        right: 0;
    }

    /* Gradient accent bar at top */
    .nav-links::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 4px;
        background: var(--gradient-primary);
    }

    .nav-link {
        font-size: 1.6rem;
        font-weight: 700;
        width: auto;
        text-align: center;
        color: rgba(255,255,255,0.6);
        padding: var(--space-3) 0;
        border-bottom: none;
        letter-spacing: 0.02em;
        transition: color 0.2s ease, transform 0.2s ease;
    }

    .nav-link:hover,
    .nav-link.active {
        color: var(--color-white);
        transform: scale(1.05);
    }

    .nav-link.active {
        color: var(--color-primary-light);
    }

    /* Get Started button in mobile menu */
    .nav-link.btn-primary {
        margin-top: var(--space-4);
        font-size: var(--text-base);
        padding: 0.8rem 2.2rem;
        background: var(--gradient-primary);
        color: var(--color-white);
        border-radius: var(--radius-full);
        border: none;
        box-shadow: 0 4px 20px rgba(107, 78, 255, 0.4);
    }

    .nav-link.btn-primary:hover {
        background: var(--gradient-primary);
        transform: scale(1.05);
        box-shadow: 0 6px 30px rgba(107, 78, 255, 0.55);
    }
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    padding-top: 80px;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.hero-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.3;
}

.hero-gradient {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, rgba(26, 29, 46, 0.7) 0%, rgba(26, 29, 46, 0.95) 100%);
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    color: var(--color-white);
}

.hero-text {
    max-width: 900px;
    margin: 0 auto;
}

.hero-title {
    font-size: clamp(2.5rem, 8vw, 5rem);
    margin-bottom: var(--space-3);
    line-height: 1.1;
}

.title-line {
    display: block;
}

.hero-subtitle {
    font-size: clamp(var(--text-lg), 2.5vw, var(--text-2xl));
    color: var(--color-gray-light);
    margin-bottom: var(--space-6);
    font-weight: 400;
}

.hero-cta {
    display: flex;
    gap: var(--space-3);
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: var(--space-12);
}

.hero-stats {
    display: flex;
    gap: var(--space-8);
    justify-content: center;
    flex-wrap: wrap;
}

.stat {
    text-align: center;
}

.stat-number {
    font-size: var(--text-5xl);
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: var(--space-1);
}

.stat-label {
    font-size: var(--text-sm);
    color: var(--color-gray-light);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: var(--space-6);
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-2);
    color: var(--color-white);
    opacity: 0.7;
    animation: float 3s ease-in-out infinite;
}

.scroll-indicator span {
    font-size: var(--text-sm);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.scroll-line {
    width: 2px;
    height: 40px;
    background: linear-gradient(to bottom, var(--color-primary), transparent);
    animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes scrollPulse {

    0%,
    100% {
        opacity: 0;
        transform: translateY(-10px);
    }

    50% {
        opacity: 1;
        transform: translateY(10px);
    }
}

/* Hide scroll indicator on mobile so it doesn't overlap stats */
@media (max-width: 768px) {
    .scroll-indicator {
        display: none;
    }
}

/* About Section */
.about {
    background: var(--color-white);
    position: relative;
}

.parallax-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 20% 50%, rgba(107, 78, 255, 0.05) 0%, transparent 50%);
    pointer-events: none;
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-8);
    align-items: center;
}

@media (max-width: 968px) {
    .about-content {
        grid-template-columns: 1fr;
        gap: var(--space-6);
    }
}

.about-text p {
    color: var(--color-gray);
}

.about-values {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-4);
    margin-top: var(--space-6);
}

@media (max-width: 768px) {
    .about-values {
        grid-template-columns: 1fr;
    }
}

.value-card {
    text-align: center;
    padding: var(--space-4);
    background: var(--color-off-white);
    border-radius: var(--radius-lg);
    transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.value-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.value-icon {
    font-size: var(--text-5xl);
    margin-bottom: var(--space-2);
}

.value-card h3 {
    font-size: var(--text-xl);
    margin-bottom: var(--space-1);
}

.value-card p {
    font-size: var(--text-sm);
    color: var(--color-gray);
    margin: 0;
}

.about-video {
    border-radius: var(--radius-2xl);
    overflow: hidden;
    box-shadow: var(--shadow-2xl);
}

.about-video video {
    width: 100%;
    height: auto;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    html {
        font-size: 14px;
    }

    .hero {
        min-height: 90vh;
    }

    .hero-cta {
        flex-direction: column;
        align-items: stretch;
    }

    .hero-stats {
        gap: var(--space-4);
    }

    .stat-number {
        font-size: var(--text-4xl);
    }
}