/* ==========================================================================
   Layout - Grid, Spacing, Responsive
   ========================================================================== */

/* Reset & Base */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

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

body {
    font-family: var(--font-body);
    font-size: var(--text-base);
    line-height: var(--leading-normal);
    color: var(--text-primary);
    background-color: var(--brand-white);
    min-height: 100vh;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: var(--font-bold);
    line-height: var(--leading-tight);
    color: var(--text-primary);
}

h1 { font-size: var(--text-5xl); }
h2 { font-size: var(--text-4xl); }
h3 { font-size: var(--text-lg); }
h4 { font-size: var(--text-base); }

p {
    line-height: var(--leading-normal);
}

a {
    color: var(--brand-blue);
    text-decoration: none;
    transition: color var(--transition);
}

a:hover {
    color: var(--blue-800);
}

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

/* Container */
.wh-container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--space-6);
}

/* Section */
.wh-section {
    padding: var(--space-24) 0;
}

.wh-section--alt {
    background-color: var(--gray-50);
}

/* Section Header */
.wh-section__header {
    text-align: center;
    max-width: var(--container-form);
    margin: 0 auto var(--space-16);
}

.wh-section__title {
    font-size: var(--text-4xl);
    margin-bottom: var(--space-4);
}

.wh-section__subtitle {
    font-size: var(--text-xl);
    color: var(--text-secondary);
}

/* Grid */
.wh-grid {
    display: grid;
    gap: var(--space-6);
}

.wh-grid--2 { grid-template-columns: 1fr; }
.wh-grid--3 { grid-template-columns: 1fr; }
.wh-grid--4 { grid-template-columns: 1fr; }

/* Flex Utilities */
.wh-flex {
    display: flex;
}

.wh-flex--center {
    align-items: center;
    justify-content: center;
}

.wh-flex--between {
    align-items: center;
    justify-content: space-between;
}

.wh-flex--col {
    flex-direction: column;
}

/* Text Utilities */
.wh-text-center { text-align: center; }
.wh-text-sm { font-size: var(--text-sm); }
.wh-text-xs { font-size: var(--text-xs); }
.wh-text-lg { font-size: var(--text-lg); }
.wh-text-xl { font-size: var(--text-xl); }
.wh-text-secondary { color: var(--text-secondary); }
.wh-text-white { color: var(--text-white); }

/* Spacing Utilities */
.wh-mb-2 { margin-bottom: var(--space-2); }
.wh-mb-3 { margin-bottom: var(--space-3); }
.wh-mb-4 { margin-bottom: var(--space-4); }
.wh-mb-6 { margin-bottom: var(--space-6); }
.wh-mb-8 { margin-bottom: var(--space-8); }
.wh-mb-12 { margin-bottom: var(--space-12); }
.wh-mb-16 { margin-bottom: var(--space-16); }
.wh-mt-20 { margin-top: var(--space-20); }

/* Responsive */
@media (min-width: 640px) {
    .wh-grid--2 { grid-template-columns: repeat(2, 1fr); }
    .wh-grid--4 { grid-template-columns: repeat(2, 1fr); }

    h1 { font-size: var(--text-6xl); }
    h2 { font-size: var(--text-5xl); }

    .wh-section__title {
        font-size: var(--text-5xl);
    }
}

@media (min-width: 768px) {
    .wh-grid--3 { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 1024px) {
    .wh-container {
        padding: 0 var(--space-12);
    }

    .wh-grid--4 { grid-template-columns: repeat(4, 1fr); }

    h1 { font-size: var(--text-7xl); }
}

/* Screen reader only */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
