/* ============================================================================
   ELDERASSIST MARKETING WEBSITE - BASE STYLES
   Universal styles, CSS reset, basic typography, and utilities
   ============================================================================ */

/* ========== CSS RESET ========== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    line-height: 1.15;
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    font-family: var(--font-family-primary);
    font-size: var(--font-size-base);
    line-height: var(--line-height-base);
    color: var(--color-text);
    background-color: var(--color-background);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ========== TYPOGRAPHY ========== */
h1, h2, h3, h4, h5, h6 {
    margin: 0;
    font-family: var(--font-family-heading);
    font-weight: 300;                   /* Light weight for elegant, airy feel */
    line-height: var(--line-height-tight);
    color: var(--color-heading);
}

h1 {
    font-size: var(--font-size-5xl);
    margin-bottom: var(--spacing-lg);
}

h2 {
    font-size: var(--font-size-4xl);
    margin-bottom: var(--spacing-md);
}

h3 {
    font-size: var(--font-size-3xl);
    margin-bottom: var(--spacing-md);
}

h4 {
    font-size: var(--font-size-2xl);
    margin-bottom: var(--spacing-sm);
}

h5 {
    font-size: var(--font-size-xl);
    margin-bottom: var(--spacing-sm);
}

h6 {
    font-size: var(--font-size-lg);
    margin-bottom: var(--spacing-sm);
}

p {
    margin: 0 0 var(--spacing-md) 0;
}

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

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

/* ========== LAYOUT UTILITIES ========== */
.container {
    width: 100%;
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 0 var(--container-padding);
}

.section {
    padding: var(--section-spacing) 0;
}

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

/* ========== FLEXBOX UTILITIES ========== */
.flex {
    display: flex;
}

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

.items-center {
    align-items: center;
}

.justify-center {
    justify-content: center;
}

.justify-between {
    justify-content: space-between;
}

.gap-sm {
    gap: var(--spacing-sm);
}

.gap-md {
    gap: var(--spacing-md);
}

.gap-lg {
    gap: var(--spacing-lg);
}

/* ========== GRID UTILITIES ========== */
.grid {
    display: grid;
}

.grid-cols-2 {
    grid-template-columns: repeat(2, 1fr);
}

.grid-cols-3 {
    grid-template-columns: repeat(3, 1fr);
}

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

/* ========== TEXT UTILITIES ========== */
.text-center {
    text-align: center;
}

.text-left {
    text-align: left;
}

.text-right {
    text-align: right;
}

.text-muted {
    color: var(--color-text-muted);
}

/* ========== SPACING UTILITIES ========== */
.mt-0 { margin-top: 0; }
.mt-sm { margin-top: var(--spacing-sm); }
.mt-md { margin-top: var(--spacing-md); }
.mt-lg { margin-top: var(--spacing-lg); }
.mt-xl { margin-top: var(--spacing-xl); }

.mb-0 { margin-bottom: 0; }
.mb-sm { margin-bottom: var(--spacing-sm); }
.mb-md { margin-bottom: var(--spacing-md); }
.mb-lg { margin-bottom: var(--spacing-lg); }
.mb-xl { margin-bottom: var(--spacing-xl); }

/* ========== RESPONSIVE DESIGN ========== */
@media (max-width: 768px) {
    h1 {
        font-size: var(--font-size-3xl);
    }

    h2 {
        font-size: var(--font-size-2xl);
    }

    h3 {
        font-size: var(--font-size-xl);
    }

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

    .container {
        padding: 0 var(--spacing-md);
    }
}

/* ========== VISIBILITY UTILITIES ========== */
.hidden {
    display: none !important;
}

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