/* Base styles for the entire website */

/* Reset and base styles */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
    line-height: 1.6;
    color: #2d3748;
    background-color: #ffffff;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Focus styles for accessibility */
*:focus-visible {
    outline: 2px solid #667eea;
    outline-offset: 2px;
    border-radius: 2px;
}

button:focus-visible,
a:focus-visible {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    margin-bottom: 1rem;
    color: #2d3748;
    line-height: 1.2;
}

h1 {
    font-size: clamp(2rem, 5vw, 2.5rem);
}

h2 {
    font-size: clamp(1.75rem, 4vw, 2rem);
}

h3 {
    font-size: clamp(1.25rem, 3vw, 1.5rem);
}

h4 {
    font-size: clamp(1.1rem, 2.5vw, 1.25rem);
}

p {
    margin-bottom: 1rem;
    line-height: 1.7;
}

/* Links */
a {
    color: #667eea;
    text-decoration: none;
    transition: color 0.3s ease, opacity 0.3s ease;
}

a:hover:not(:focus) {
    color: #764ba2;
    opacity: 0.9;
}

a:focus {
    outline: 2px solid #667eea;
    outline-offset: 2px;
    border-radius: 2px;
}

/* Buttons - Base styles (overridden in component files) */
button {
    font-family: inherit;
    font-size: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Forms */
input,
textarea,
select {
    font-family: inherit;
    font-size: inherit;
    line-height: inherit;
}

textarea {
    width: 100%;
    padding: 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    resize: vertical;
    min-height: 200px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Audio elements */
audio {
    width: 100%;
    margin-top: 0.5rem;
}

/* Utility classes */
.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 0;
}

.section {
    padding: 4rem 0;
}

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

/* Responsive adjustments */
@media (max-width: 768px) {
    .container {
        width: 95%;
        padding: 1.5rem 0;
    }
    
    .section {
        padding: 3rem 0;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    a {
        text-decoration: underline;
    }
    
    button,
    .btn-primary,
    .btn-secondary {
        border: 2px solid currentColor;
    }
}