/* websites/shared/css/base.css
 * ============================================================================
 * RESET, TYPOGRAPHY, LAYOUT UTILITIES
 * Shared across all BeWell IT websites.
 * ============================================================================ */

/* --- Reset --- */

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

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

body {
    font-family: var(--font-body);
    font-size: var(--text-base);
    line-height: var(--leading-normal);
    color: var(--color-on-surface);
    background-color: var(--color-surface);
}

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

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

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

a:focus-visible {
    outline: 2px solid var(--brand-primary);
    outline-offset: 2px;
    border-radius: 2px;
}

ul, ol {
    list-style: none;
}

/* --- Accessibility --- */

.skip-link {
    position: absolute;
    top: -100%;
    left: var(--space-md);
    background: var(--color-on-surface);
    color: var(--color-surface);
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius-sm);
    font-size: var(--text-sm);
    font-weight: 500;
    z-index: 100;
}

.skip-link:focus {
    top: var(--space-md);
    color: var(--color-surface);
}

.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;
}

/* --- Layout --- */

.container {
    width: 100%;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--space-lg);
}

.container--narrow {
    max-width: var(--container-narrow);
}

/* --- Typography --- */

h1, h2, h3 {
    color: var(--color-on-surface);
    line-height: var(--leading-tight);
    letter-spacing: var(--tracking-tight);
}

/* --- Section utility --- */

.section {
    padding: var(--space-5xl) 0;
}

.section--muted {
    background: var(--color-surface-secondary);
}

.section__header {
    max-width: 560px;
    margin-bottom: var(--space-3xl);
}

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

.section__label {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: var(--text-xs);
    font-weight: 600;
    letter-spacing: var(--tracking-wide);
    text-transform: uppercase;
    color: var(--brand-primary);
    margin-bottom: var(--space-md);
}

.section__title {
    font-family: var(--font-display);
    font-size: var(--text-3xl);
    font-weight: 400;
    line-height: var(--leading-tight);
    letter-spacing: var(--tracking-tight);
    color: var(--color-on-surface);
    margin-bottom: var(--space-md);
}

.section__title em {
    font-style: italic;
    color: var(--brand-primary);
}

.section__subtitle {
    font-size: var(--text-md);
    line-height: var(--leading-normal);
    color: var(--color-on-surface-secondary);
}

/* --- Divider --- */

.divider {
    width: 100%;
    height: 1px;
    background: var(--color-border-subtle);
    border: none;
}

/* --- Animations --- */

@media (prefers-reduced-motion: no-preference) {
    .fade-in {
        opacity: 0;
        transform: translateY(16px);
        animation: fadeIn var(--duration-slow) var(--ease-out) forwards;
    }

    .fade-in--delay-1 { animation-delay: 80ms; }
    .fade-in--delay-2 { animation-delay: 160ms; }
    .fade-in--delay-3 { animation-delay: 240ms; }
    .fade-in--delay-4 { animation-delay: 320ms; }

    @keyframes fadeIn {
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }
}

/* --- Responsive --- */

@media (max-width: 480px) {
    .container {
        padding: 0 var(--space-md);
    }
}
