/* ============================================
   Alberta Tradesman Services - Base Styles
   Foundation CSS for all pages
   ============================================ */

/* CSS Reset & Base */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-primary);
    font-size: var(--text-base);
    line-height: 1.6;
    color: var(--color-charcoal);
    background-color: var(--gray-50);
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: var(--font-weight-bold);
    line-height: 1.2;
    color: var(--color-dark-gray);
    margin-bottom: var(--space-md);
}

h1 {
    font-size: var(--text-4xl);
    letter-spacing: -0.025em;
    font-weight: var(--font-weight-extrabold);
}

h2 {
    font-size: var(--text-3xl);
    letter-spacing: -0.02em;
}

h3 {
    font-size: var(--text-2xl);
    letter-spacing: -0.015em;
}

h4 {
    font-size: var(--text-xl);
}

h5 {
    font-size: var(--text-lg);
}

h6 {
    font-size: var(--text-base);
}

p {
    margin-bottom: var(--space-md);
}

a {
    color: var(--color-sky-blue);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--color-blue-dark);
}

a:focus-visible {
    outline: 3px solid var(--color-sky-blue);
    outline-offset: 2px;
    border-radius: var(--radius-sm);
}

/* Lists */
ul, ol {
    margin-left: var(--space-xl);
    margin-bottom: var(--space-md);
}

li {
    margin-bottom: var(--space-xs);
}

/* Images */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Buttons Base */
button {
    cursor: pointer;
    font-family: inherit;
    font-size: inherit;
    border: none;
    background: none;
}

/* Forms Base */
input,
textarea,
select {
    font-family: inherit;
    font-size: inherit;
    width: 100%;
}

/* Accessibility */
.skip-link {
    position: absolute;
    top: -100px;
    left: 0;
    background: var(--color-sky-blue);
    color: white;
    padding: var(--space-sm) var(--space-md);
    text-decoration: none;
    z-index: var(--z-tooltip);
    border-radius: var(--radius-md);
}

.skip-link:focus {
    top: var(--space-sm);
}

/* Screen Reader Only */
.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;
}

/* Container */
.container {
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 0 var(--container-padding);
}

/* Section Spacing */
section {
    padding: var(--space-3xl) 0;
}

/* Utility Classes */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.font-normal { font-weight: var(--font-weight-normal); }
.font-medium { font-weight: var(--font-weight-medium); }
.font-semibold { font-weight: var(--font-weight-semibold); }
.font-bold { font-weight: var(--font-weight-bold); }
.font-extrabold { font-weight: var(--font-weight-extrabold); }

.text-primary { color: var(--color-sky-blue); }
.text-secondary { color: var(--color-burnt-orange); }
.text-dark { color: var(--color-dark-gray); }
.text-light { color: var(--gray-400); }

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

/* Reduced Motion Support */
@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;
    }
}