/* CRITICAL CSS - Above the fold only with OPTIMIZED SCROLLBARS */

/* CSS RESET AND BASE */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    /* CONSOLIDATED: Hide scrollbars globally */
    scrollbar-width: none;
    -ms-overflow-style: none;
}

*::-webkit-scrollbar {
    display: none;
    width: 0;
    background: transparent;
}

/* HTML AND BODY BASE STYLES */
html {
    scroll-behavior: smooth;
    font-size: 16px;
    -webkit-overflow-scrolling: touch;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #1a1a1a;
    cursor: none;
    scroll-behavior: smooth;
}

/* BRAND COLORS */
:root {
    --lima-bean-green: #8DB832;
    --wild-willow: #B8C85A;
    --danube: #6DA4CD;
    --fog: #F8F9FA;
    --picasso: #F4E68C;
    --boulder: #7A7A7A;
    --charcoal: #1a1a1a;
    --white: #ffffff;
    --light-gray: #f5f5f5;
    --medium-gray: #666666;
    
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 25px rgba(0, 0, 0, 0.12);
    --shadow-xl: 0 20px 40px rgba(0, 0, 0, 0.15);
    
    --transition-smooth: cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* ACCESSIBILITY */
.skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    background: var(--charcoal);
    color: var(--white);
    padding: 8px;
    text-decoration: none;
    z-index: 100000;
    border-radius: 4px;
}

.skip-link:focus {
    top: 6px;
}

/* HEADER - Critical above fold */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(250, 250, 250, 0.85);
    backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    z-index: 1000;
    padding: 1rem 0;
    transition: all 0.3s var(--transition-smooth);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: 'Raleway', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--charcoal);
    text-decoration: none;
    letter-spacing: -0.025em;
    transition: all 0.3s var(--transition-smooth);
}

.menu-trigger {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 44px;
    height: 44px;
    background: none;
    border: none;
    cursor: pointer;
    position: relative;
    z-index: 1001;
    transition: all 0.3s var(--transition-smooth);
}

.menu-line {
    width: 20px;
    height: 2px;
    background: var(--charcoal);
    border-radius: 1px;
    transition: all 0.3s var(--transition-smooth);
    transform-origin: center;
}

.menu-line:not(:last-child) {
    margin-bottom: 4px;
}

/* HERO SECTION - Critical above fold */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 8rem 2rem 4rem;
    overflow: hidden;
}

/* Hero Background Picture Element */
.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.hero-bg-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

/* Hero Overlay */
.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.2));
    z-index: 2;
}

.hero-content {
    text-align: center;
    max-width: 900px;
    z-index: 3;
    position: relative;
}

.hero-title {
    font-family: 'Playfair Display', serif;
    font-size: clamp(3rem, 8vw, 5.5rem);
    font-weight: 600;
    color: var(--white);
    margin-bottom: 2rem;
    line-height: 1.1;
    letter-spacing: -0.02em;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.hero-subtitle {
    font-size: clamp(1.1rem, 2.5vw, 1.3rem);
    color: rgba(255, 255, 255, 0.95);
    margin-bottom: 3rem;
    font-weight: 400;
    line-height: 1.7;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}

.hero-cta {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* BUTTONS - Critical for CTA */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 2rem;
    border-radius: 12px;
    text-decoration: none;
    font-family: 'Raleway', sans-serif;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s var(--transition-smooth);
    cursor: pointer;
    border: none;
    position: relative;
    overflow: hidden;
    min-width: 160px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--lima-bean-green), var(--wild-willow));
    color: var(--white);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background: var(--white);
    color: var(--charcoal);
    border: 2px solid var(--white);
    box-shadow: var(--shadow-sm);
}

/* ENHANCED SCROLL PROGRESS INDICATOR (works great with hidden scrollbar) */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: rgba(141, 184, 50, 0.1);
    z-index: 1001;
    transition: opacity 0.3s ease;
}

.scroll-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--lima-bean-green), var(--wild-willow));
    width: 0%;
    transition: width 0.1s ease;
    box-shadow: 0 0 10px rgba(141, 184, 50, 0.3);
}

/* Hide scroll progress on homepage hero (optional) */
.hero-section ~ .scroll-progress {
    opacity: 0;
}

/* Show scroll progress when scrolled past hero */
body.scrolled .scroll-progress {
    opacity: 1;
}

/* BASIC ANIMATIONS - Critical */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s var(--transition-smooth);
    will-change: opacity, transform;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* MOBILE RESPONSIVE - Critical */
@media (max-width: 768px) {
    /* Enhance touch scrolling on iOS */
    body, html {
        -webkit-overflow-scrolling: touch;
        overscroll-behavior-y: none; /* Prevent iOS bounce on main page */
    }
    
    .hero {
        padding: 6rem 1rem 2rem;
        background-attachment: scroll;
    }
    
    .hero-cta {
        flex-direction: column;
        align-items: center;
    }
    
    .btn {
        width: 100%;
        max-width: 300px;
    }
    
    .nav-container {
        padding: 0 1rem;
    }
}

/* HIDE CURSOR ON MOBILE */
@media (hover: none) and (pointer: coarse) {
    body {
        cursor: auto;
    }
}

/* REDUCED MOTION */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
    
    .hero {
        background-attachment: scroll;
    }
    
    .reveal {
        transform: none;
    }
    
    .scroll-progress-bar {
        transition: none;
    }
}

/* HIGH CONTRAST MODE */
@media (prefers-contrast: high) {
    .scroll-progress-bar {
        background: #000;
        box-shadow: none;
    }
}

/* ACCESSIBILITY - Ensure keyboard navigation works with hidden scrollbars */
:focus {
    outline: 2px solid var(--lima-bean-green);
    outline-offset: 2px;
    scroll-margin: 100px; /* Ensure focused elements aren't hidden behind fixed headers */
}

/* ENSURE FOCUS SCROLLING WORKS PROPERLY */
:target {
    scroll-margin-top: 100px; /* Account for fixed header */
}

/* SMOOTH ANCHOR LINK SCROLLING */
html {
    scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
}