/*
 * ┌─────────────────────────────────────────────────────────────────┐
 * │  STEP 2 of 13 — css/base.css                                    │
 * │                                                                 │
 * │  Every page starts here. This file defines the design tokens    │
 * │  (CSS custom properties on :root) and the global reset that     │
 * │  erases browser defaults so we start from a clean slate.        │
 * │                                                                 │
 * │  KEY CONCEPT: CSS custom properties (--name: value) are like    │
 * │  variables. Define them once in :root, use them everywhere       │
 * │  with var(--name). Changing one token (e.g. --primary-color)    │
 * │  ripples through the entire site instantly — no find/replace.   │
 * │                                                                 │
 * │  KEY CONCEPT: clamp(min, preferred, max) is fluid typography.   │
 * │  Instead of media queries for every font size, the browser      │
 * │  interpolates smoothly between breakpoints.                     │
 * │                                                                 │
 * │  The @keyframes animations at the bottom are used by the hero   │
 * │  section (fadeInUp) and the scroll indicator (bounce).          │
 * │                                                                 │
 * │  ▶  Next: See css/layout.css (Step 3)                          │
 * └─────────────────────────────────────────────────────────────────┘
 */

:root {
    /* Colors */
    --primary-color: #2c3e50;
    --secondary-color: #3498db;
    --accent-color: #e74c3c;
    --text-color: #333;
    --text-light: #666;
    --bg-color: #ffffff;
    --bg-alt: #f8f9fa;
    --border-color: #e0e0e0;

    /* Typography */
    --font-primary: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    --font-secondary: Georgia, 'Times New Roman', serif;

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

    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-medium: 0.3s ease;

    /* Shadows */
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 20px rgba(0,0,0,0.15);
}

/* ===================================
   Reset & Base Styles
   =================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    /* Fluid typography: scales from 14px on mobile to 16px on desktop */
    font-size: clamp(14px, 0.875rem + 0.5vw, 16px);
}

body {
    font-family: var(--font-primary);
    color: var(--text-color);
    line-height: 1.6;
    background-color: var(--bg-color);
}

h1, h2, h3, h4, h5, h6 {
    line-height: 1.2;
    margin-bottom: var(--spacing-sm);
    font-weight: 600;
}

/* Fluid typography for headings */
h1 { font-size: clamp(2rem, 1.5rem + 2vw, 2.5rem); }
h2 { font-size: clamp(1.5rem, 1.25rem + 1.5vw, 2rem); }
h3 { font-size: clamp(1.25rem, 1rem + 1vw, 1.5rem); }
h4 { font-size: clamp(1.1rem, 0.95rem + 0.5vw, 1.25rem); }

p {
    margin-bottom: var(--spacing-sm);
}

a {
    color: var(--secondary-color);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--primary-color);
}

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

ul {
    list-style-position: inside;
}

/* ===================================
   Animations
   =================================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}
