/* 
   BigG's Laundromat - Core Design System 
   A clean, modern, and performant CSS architecture.
*/

:root {
    /* Color Palette - Refined & Professional */
    --primary: #1e3a8a;
    --primary-light: #3b82f6;
    --primary-dark: #1e40af;
    --accent: #facc15;
    --success: #16a34a;

    /* Neutrals */
    --white: #ffffff;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;

    /* Shadows - Optimized for rendering performance */
    --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);

    /* Typography */
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-heading: 'Plus Jakarta Sans', sans-serif;
    --font-display: 'Playfair Display', serif;

    /* Layout */
    --header-height: 80px;
    --container-max: 1280px;
    --section-gap: 1.5rem;
    --section-gap-mobile: 1rem;
}

/* 1. Reset & Base (Predictable CSS Cascade) */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    text-size-adjust: 100%;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-sans);
    line-height: 1.6;
    color: var(--gray-700);
    background-color: var(--white);
    overflow-x: hidden;
    min-height: 100vh;
    /* Fixed: use min-height instead of height */
    text-rendering: optimizeSpeed;
    /* Priorities rendering over legibility on scroll */
    -webkit-font-smoothing: antialiased;
}

/* 2. Layout System (Grid & Flexbox) */
.container {
    width: 100%;
    max-width: var(--container-max);
    margin-right: auto;
    margin-left: auto;
    padding-right: 1.5rem;
    padding-left: 1.5rem;
}

.section {
    padding: var(--section-gap) 0;
}

@media (max-width: 768px) {
    .section {
        padding: var(--section-gap-mobile) 0;
    }
}

/* 3. Typography Normalization */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    color: var(--gray-900);
    font-weight: 700;
    line-height: 1.25;
    margin-bottom: 1.5rem;
}

h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
}

h2 {
    font-size: clamp(1.4rem, 4vw, 2.4rem);
    letter-spacing: -0.02em;
}

h3 {
    font-size: clamp(1.5rem, 3vw, 2rem);
}

h4 {
    font-size: 1.25rem;
}

.section-header {
    text-align: center;
    max-width: 900px;
    margin: 0 auto 1.5rem auto;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}

.section-label {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.3em;
    color: var(--white);
    background: var(--primary);
    padding: 0.5rem 1.5rem;
    border-radius: 50px;
    box-shadow: 0 4px 10px rgba(30, 58, 138, 0.2);
}

.section-title {
    font-size: clamp(1.4rem, 4.5vw, 1.85rem);
    color: var(--primary) !important;
    margin: 0;
    line-height: 1.1;
    font-weight: 800;
    letter-spacing: -0.02em;
    text-transform: capitalize;
}

.section-title span {
    color: var(--primary-light);
}

.section-subtitle {
    font-size: clamp(0.95rem, 2vw, 1.1rem);
    color: var(--gray-600);
    line-height: 1.6;
    font-weight: 500;
    max-width: 650px;
    margin: 0;
}

.section-divider {
    width: 80px;
    height: 4px;
    background: var(--accent);
    border-radius: 2px;
    margin-top: 0.5rem;
}

/* Backward compatibility for legacy classes */
.section-title-beautiful {
    font-size: clamp(1.75rem, 5vw, 2.25rem);
    color: var(--primary) !important;
    font-weight: 800;
}

.section-subtitle-beautiful {
    font-size: 1.25rem;
    color: var(--gray-600);
    line-height: 1.6;
}

/* 4. Performance Fixes: Remove Expensive Rendering */
.background-effects,
.bubbles-container,
.water-animation,
.particles-container {
    display: none !important;
    /* Temporarily disabled for performance until streamlined */
}

/* Remove scroll-blocking behaviors */
* {
    touch-action: manipulation;
}

/* Eliminate layout thrashing */
img,
video {
    max-width: 100%;
    height: auto;
    content-visibility: auto;
    /* Modern performance feature */
}

/* Optimization for position: fixed */
.navbar {
    will-change: transform;
    transform: translateZ(0);
    /* Hardware acceleration */
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(8px);
    /* Reduced blur for performance */
    border-bottom: 1px solid var(--gray-200);
}

/* 5. Responsive Stability */
@media (max-width: 576px) {
    .container {
        padding-right: 1rem;
        padding-left: 1rem;
    }
}