/* ============================================================================
   BASE.CSS - Foundation for all pages
   
   Contains:
   - CSS Reset
   - CSS Variables (colors, typography scale, spacing)
   - Global typography defaults
   - Typography utility classes
   - Background/color utilities
   ============================================================================ */

/* === RESET === */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* === CSS VARIABLES === */
:root {
    /* Colors */
    --color-bg: #f8f8f8;
    --color-bg-alt: white;
    --color-text: #2c2c2c;
    --color-text-light: #666;
    --color-accent: #3a3a3a;
    --color-border: #ddd;
    
    /* Typography Scale */
    --text-xs: 0.75rem;
    --text-sm: 0.85rem;
    --text-base: 1rem;
    --text-md: 1.05rem;
    --text-lg: 1.1rem;
    --text-xl: 1.25rem;
    --text-2xl: 1.8rem;
    --text-3xl: 2.5rem;
    --text-4xl: 3.5rem;
    
    /* Spacing Scale */
    --space-xs: 0.5rem;
    --space-sm: 1rem;
    --space-md: 2rem;
    --space-lg: 3rem;
    --space-xl: 4rem;
    
    /* Layout Widths */
    --max-width: 1200px;
    --content-width: 1100px;
    --content-narrow: 800px;
}

/* === DARK MODE === */
:root.dark {
    --color-bg: #121212;
    --color-bg-alt: #1e1e1e;
    --color-text: #e4e4e4;
    --color-text-light: #b0b0b0;
    --color-accent: #ffffff;
    --color-border: #333;
}


/* === GLOBAL TYPOGRAPHY === */
body {
/* 
	font-family: "Noto Sans", "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
 */
    font-family: 'Lato', sans-serif;
    font-size: var(--text-base);
    color: var(--color-text);
    background: var(--color-bg);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Headings */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Playfair Display', serif;
    font-weight: 600;
    line-height: 1.3;
}

h1 { font-size: var(--text-4xl); }
h2 { font-size: var(--text-2xl); }
h3 { font-size: var(--text-xl); }
h4 { font-size: var(--text-lg); }
h5 { font-size: var(--text-base); }
h6 { font-size: var(--text-sm); }

/* Paragraphs */
p {
    line-height: 1.8;
    margin-bottom: var(--space-md);
}

p:last-child {
    margin-bottom: 0;
}

/* Links */
a {
    color: inherit;
    /*
    text-decoration: none;
    */
}

a:hover {
    opacity: 0.8;
}

/* Lists */
ul, ol {
    list-style: inside;  /* vs outside or none */
}



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

/* === TYPOGRAPHY UTILITIES === */
/* Size utilities - apply to any element */
.text-xs { font-size: var(--text-xs); }
.text-sm { font-size: var(--text-sm); }
.text-base { font-size: var(--text-base); }
.text-md { font-size: var(--text-md); }
.text-lg { font-size: var(--text-lg); }
.text-xl { font-size: var(--text-xl); }
.text-2xl { font-size: var(--text-2xl); }
.text-3xl { font-size: var(--text-3xl); }
.text-4xl { font-size: var(--text-4xl); }

/* Color utilities */
.text-light { color: var(--color-text-light); }
.text-normal { color: var(--color-text); }
.text-accent { color: var(--color-accent); }
.text-white { color: white; }

/* Weight utilities */
.font-light { font-weight: 300; }
.font-normal { font-weight: 400; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }

/* Common text combinations */
.text-small-muted {
    font-size: var(--text-sm);
    color: var(--color-text-light);
    line-height: 1.6;
}

.text-help {
    font-size: var(--text-sm);
    color: var(--color-text-light);
    font-weight: 300;
}

/* Alignment utilities */
.text-left { text-align: left; }
.text-center { text-align: center; }
.text-right { text-align: right; }

/* Text transform */
.uppercase { text-transform: uppercase; }
.lowercase { text-transform: lowercase; }
.capitalize { text-transform: capitalize; }

/* === BACKGROUND UTILITIES === */
.bg-white { background: var(--color-bg-alt); }
.bg-gray { background: var(--color-bg); }
.bg-dark { background: var(--color-accent); }

/* === RESPONSIVE TYPOGRAPHY === */
@media (max-width: 768px) {
    :root {
        --text-3xl: 2rem;
        --text-4xl: 2.5rem;
    }
}

@media (max-width: 480px) {
    :root {
        --text-4xl: 2rem;
        --text-xl: 1rem;
    }
}
