/* =======================================================================
   CSS RESET & NORMALIZATION
   =======================================================================
   Basic reset and normalization styles for consistent cross-browser rendering.
   ======================================================================= */

/* ============================================
   BOX SIZING & BASIC RESETS
   ============================================ */
*,
*::before,
*::after {
    box-sizing: border-box;
}

* {
    margin: 0;
    padding: 0;
}

/* ============================================
   HTML & BODY SETUP
   ============================================ */
html {
    height: 100%;
    scroll-behavior: smooth;
}

body {
    min-height: 100%; /* Changed from height: 100% to allow content to grow beyond viewport */
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-color);
}

/* ============================================
   MEDIA ELEMENTS
   ============================================ */
img,
picture,
video,
canvas,
svg {
    display: block;
    max-width: 100%;
    height: auto;
}

/* ============================================
   FORM ELEMENTS
   ============================================ */
input,
button,
textarea,
select {
    font: inherit;
    color: inherit;
}

button {
    cursor: pointer;
    border: none;
    background: none;
}

/* ============================================
   TYPOGRAPHY ELEMENTS
   ============================================ */
p,
h1,
h2,
h3,
h4,
h5,
h6 {
    overflow-wrap: break-word;
    hyphens: auto;
}

/* ============================================
   ACCESSIBILITY
   ============================================ */

/* Remove outline for mouse users but keep for keyboard users */
:focus {
    outline: 2px solid transparent;
    outline-offset: 2px;
}

:focus-visible {
    outline: 2px solid var(--brand-accent-orange);
    outline-offset: 2px;
}

/* Improve readability for users who prefer high contrast */
@media (prefers-contrast: high) {
    :root {
        --border-color: currentColor;
    }
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* ============================================
   UTILITY CLASSES
   ============================================ */

/* Screen reader only content */
.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;
}

/* Skip to main content link */
.skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    background: var(--brand-primary-dark);
    color: var(--brand-white);
    padding: 8px;
    text-decoration: none;
    border-radius: var(--radius-sm);
    z-index: var(--z-toast);
    transition: top 0.3s;
}

.skip-link:focus {
    top: 6px;
} 