/**
 * Pure Planning - Base Styles
 * Reset, Typography, Foundation
 */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Playfair+Display:ital,wght@0,400;0,500;0,600;0,700;1,400;1,500&display=swap');

*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

body {
    font-family: var(--font-sans);
    font-size: var(--text-base);
    line-height: var(--leading-normal);
    color: var(--text-body);
    background-color: var(--bg-cream);
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-serif);
    color: var(--text-dark);
    line-height: var(--leading-tight);
    letter-spacing: var(--tracking-tight);
    font-weight: 600;
}

h1 { font-size: var(--text-hero); }
h2 { font-size: var(--text-5xl); }
h3 { font-size: var(--text-3xl); }
h4 { font-size: var(--text-2xl); }
h5 { font-size: var(--text-xl); }
h6 { font-size: var(--text-lg); }

p {
    margin-bottom: 1em;
    line-height: var(--leading-relaxed);
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: color var(--duration-fast) var(--ease-out);
}
a:hover { color: var(--accent-dark); }

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

ul, ol { list-style: none; }

.tagline {
    font-family: var(--font-sans);
    font-size: var(--text-sm);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: var(--tracking-widest);
    color: var(--accent);
}

.tagline--warm { color: var(--warm); }
.tagline--light { color: var(--warm-light); }

.lead {
    font-size: var(--text-xl);
    line-height: var(--leading-relaxed);
    color: var(--text-body);
    max-width: 680px;
}

.lead--centered {
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}

.section-title {
    margin-bottom: var(--space-lg);
}

.section-title::after {
    content: '';
    display: block;
    width: 50px;
    height: 2px;
    background: var(--warm);
    margin-top: var(--space-lg);
}

.section-title--centered::after {
    margin-left: auto;
    margin-right: auto;
}

::selection {
    background: var(--accent);
    color: var(--text-light);
}

::placeholder {
    color: var(--text-muted);
    opacity: 0.7;
}

::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg-dark-alt); }
::-webkit-scrollbar-thumb { background: var(--primary-light); border-radius: var(--radius-full); }
::-webkit-scrollbar-thumb:hover { background: var(--accent-dark); }

/* ===== Mobile Typography ===== */
@media (max-width: 768px) {
    h1 { font-size: clamp(1.8rem, 6vw, 2.5rem); }
    h2 { font-size: clamp(1.5rem, 5vw, 2rem); }
    h3 { font-size: clamp(1.2rem, 4vw, 1.5rem); }
    h4 { font-size: var(--text-lg); }

    .lead {
        font-size: var(--text-base);
    }

    .section-title {
        margin-bottom: var(--space-md);
    }
    .section-title::after {
        margin-top: var(--space-md);
    }

    .tagline {
        font-size: var(--text-xs);
        letter-spacing: var(--tracking-wider);
    }
}

@media (max-width: 480px) {
    body {
        font-size: var(--text-sm);
    }
    h2 { font-size: clamp(1.3rem, 5vw, 1.8rem); }
    h3 { font-size: clamp(1.1rem, 4vw, 1.3rem); }

    .lead {
        font-size: var(--text-sm);
    }
}

/* ===== Touch-friendly targets ===== */
@media (pointer: coarse) {
    a, button, .btn, .filter-tab, .nav__link, .nav__dropdown-link {
        min-height: 44px;
        display: inline-flex;
        align-items: center;
    }
}
