/* ==========================================================================
   BASE STYLES - Reset & Global Styles (Brand Colors)
   ========================================================================== */

/* Reset */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
    scroll-padding-top: var(--nav-height);
}

body {
    font-family: var(--font-primary);
    font-size: var(--text-base);
    font-weight: var(--font-regular);
    line-height: var(--leading-normal);
    color: var(--color-navy);
    background-color: var(--color-white);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

/* Typography Base */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: var(--font-bold);
    line-height: var(--leading-tight);
    color: var(--color-navy);
}

h1 {
    font-size: clamp(var(--text-4xl), 5vw, var(--text-6xl));
}

h2 {
    font-size: clamp(var(--text-3xl), 4vw, var(--text-4xl));
}

h3 {
    font-size: clamp(var(--text-xl), 3vw, var(--text-2xl));
}

h4 {
    font-size: var(--text-xl);
}

p {
    margin-bottom: var(--space-4);
    color: var(--color-gray-600);
    text-align: justify;
}

a {
    color: var(--color-red);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--color-red-dark);
}

/* Accessibility Focus States */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 3px solid var(--color-red);
    outline-offset: 2px;
}

/* Skip Link for Accessibility */
.skip-link {
    position: absolute;
    top: -100%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--color-navy);
    color: var(--color-white);
    padding: var(--space-3) var(--space-6);
    border-radius: var(--radius-md);
    z-index: var(--z-tooltip);
    transition: top var(--transition-fast);
}

.skip-link:focus {
    top: var(--space-4);
}

/* Images */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Lists */
ul,
ol {
    list-style: none;
}

/* Buttons */
button {
    font-family: inherit;
    font-size: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

/* Forms */
input,
select,
textarea {
    font-family: inherit;
    font-size: var(--text-base);
}

/* Selection - Brand Color */
::selection {
    background-color: var(--color-red);
    color: var(--color-white);
}

/* Container */
.container {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--space-6);
}

@media (max-width: 768px) {
    .container {
        padding: 0 var(--space-4);
    }
}

/* Section Base */
.section {
    padding: var(--space-24) 0;
    position: relative;
}

.section--dark {
    background-color: var(--color-navy);
    color: var(--color-white);
}

.section--dark h1,
.section--dark h2,
.section--dark h3,
.section--dark h4 {
    color: var(--color-white);
}

.section--dark p {
    color: var(--color-gray-300);
}

.section--gradient {
    background: linear-gradient(135deg, var(--color-navy) 0%, var(--color-navy-dark) 100%);
    color: var(--color-white);
}

/* Section Header */
.section__header {
    text-align: center;
    margin-bottom: var(--space-16);
}

.section__title {
    margin-bottom: var(--space-4);
}

.section__subtitle {
    font-size: var(--text-lg);
    color: var(--color-gray-500);
    max-width: 600px;
    margin: 0 auto;
}

.section--dark .section__subtitle {
    color: var(--color-gray-400);
}

/* Visually Hidden (Accessibility) */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    html {
        scroll-behavior: auto;
    }
}