/* ============================================
   DBM WEBSITE - BASE STYLES
   Foundation styles, CSS reset, and typography
   
   Purpose: Core document styles that apply globally
   Includes: Reset, body defaults, headings, accessibility
   
   File size: ~4 KB
   ============================================ */

/* ============================================
   CSS RESET
   Remove default browser styling
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ============================================
   ACCESSIBILITY ENHANCEMENTS
   Skip links, focus states, reduced motion
   ============================================ */

/* Skip Navigation Link - Hidden until focused */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--enterprise-green-light);
    color: var(--pure-white);
    padding: 8px 16px;
    text-decoration: none;
    font-weight: 600;
    z-index: 1001;
    transition: top 0.3s;
}

.skip-link:focus {
    top: 0;
}

/* Visible Focus States for Keyboard Navigation */
*:focus-visible {
    outline: 3px solid var(--bronze);
    outline-offset: 2px;
}

/* Remove default outlines (replaced with custom) */
*:focus:not(:focus-visible) {
    outline: none;
}

/* 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;
        scroll-behavior: auto !important;
    }
}

/* ============================================
   GLOBAL BODY STYLES
   Default font, background, and color
   ============================================ */
body {
    font-family: var(--font-primary);
    background: var(--pure-white);
    color: var(--charcoal);
}

/* Body state when mobile menu is open - prevent background scroll */
body.mobile-menu-open {
    overflow: hidden;
    position: fixed;
    width: 100%;
    height: 100%;
}

/* ============================================
   TYPOGRAPHY - DBM Style Guide v1.3
   All heading and text sizes per official style guide
   Desktop sizes listed, mobile responsive in responsive.css
   ============================================ */

/* H1 - Main headline (44px desktop, 42px mobile) */
h1 {
    font-family: var(--font-primary);
    font-weight: 700;
    font-size: 44px; /* Adjusted: 44px desktop, 42px mobile */
    line-height: 1.15;
    color: var(--bronze);
    margin-bottom: 32px;
    letter-spacing: -1px;
    width: 100%;
    max-width: 100%;
}

/* H2 - Section headings (38px desktop, 32px mobile) */
h2 {
    font-family: var(--font-primary);
    font-weight: 700;
    font-size: 38px; /* Style Guide v1.3: 38px desktop, 32px mobile */
    line-height: 1.3; /* Style Guide v1.3: 1.3 line-height */
    color: var(--bronze);
    margin-bottom: 24px;
    letter-spacing: -0.5px;
}

/* H3 - Card titles, subsection headings (18px) */
h3 {
    font-family: var(--font-primary);
    font-weight: 600;
    font-size: 18px; /* Style Guide v1.3: 18px */
    line-height: 1.4; /* Style Guide v1.3: 1.4 line-height */
    color: var(--charcoal);
    margin-bottom: 12px;
}

/* H4 - Minor subheadings */
h4 {
    font-family: var(--font-primary);
    font-weight: 600;
    font-size: 16px;
    line-height: 1.4;
    color: var(--charcoal);
    margin-bottom: 12px;
}

/* H5 - Small headings */
h5 {
    font-family: var(--font-primary);
    font-weight: 600;
    font-size: 14px;
    line-height: 1.4;
    color: var(--charcoal);
    margin-bottom: 10px;
}

/* H6 - Smallest headings */
h6 {
    font-family: var(--font-primary);
    font-weight: 600;
    font-size: 13px;
    line-height: 1.4;
    color: var(--charcoal);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Paragraphs */
p {
    font-family: var(--font-primary);
    font-weight: 400;
    font-size: 15px;
    line-height: 1.65;
    color: var(--charcoal);
    margin-bottom: 16px;
}

/* Links */
a {
    color: var(--link-color);
    text-decoration: underline;
    transition: color 0.3s;
}

a:hover {
    color: var(--link-hover);
}

/* Strong/Bold text */
strong,
b {
    font-weight: 600;
}

/* Emphasis/Italic text */
em,
i {
    font-style: italic;
}

/* Lists */
ul,
ol {
    margin-bottom: 16px;
    padding-left: 24px;
}

li {
    margin-bottom: 8px;
    line-height: 1.6;
}

/* ============================================
   MOBILE TYPOGRAPHY ADJUSTMENTS
   Responsive breakpoint: max-width 1024px
   ============================================ */
@media (max-width: 1024px) {
    /* H1 - Mobile size per Style Guide v1.3 */
    h1 {
        font-size: 42px; /* Style Guide v1.3: 42px mobile */
    }

    /* H2 - Mobile size per Style Guide v1.3 */
    h2 {
        font-size: 32px; /* Style Guide v1.3: 32px mobile */
    }

    /* Slightly smaller body text on mobile */
    p {
        font-size: 15px;
    }
}

/* ============================================
   TABLET TYPOGRAPHY ADJUSTMENTS
   Responsive breakpoint: max-width 768px
   ============================================ */
@media (max-width: 768px) {
    /* H1 - Tablet size */
    h1 {
        font-size: 38px;
        margin-bottom: 28px;
        letter-spacing: -0.5px;
    }

    /* H2 - Tablet size */
    h2 {
        font-size: 28px;
        margin-bottom: 20px;
    }

    /* H3 - Tablet size */
    h3 {
        font-size: 17px;
        margin-bottom: 10px;
    }

    /* Lists - Tighter spacing */
    ul,
    ol {
        margin-bottom: 14px;
        padding-left: 20px;
    }

    li {
        margin-bottom: 6px;
    }
}

/* ============================================
   SMALL PHONE TYPOGRAPHY ADJUSTMENTS
   Responsive breakpoint: max-width 480px
   ============================================ */
@media (max-width: 480px) {
    /* H1 - Small phone size */
    h1 {
        font-size: 32px;
        margin-bottom: 24px;
        letter-spacing: -0.25px;
    }

    /* H2 - Small phone size */
    h2 {
        font-size: 24px;
        margin-bottom: 16px;
        letter-spacing: 0;
    }

    /* H3 - Small phone size */
    h3 {
        font-size: 16px;
        margin-bottom: 8px;
    }

    /* H4 - Small phone size */
    h4 {
        font-size: 15px;
        margin-bottom: 8px;
    }

    /* H5 - Small phone size */
    h5 {
        font-size: 13px;
        margin-bottom: 6px;
    }

    /* H6 - Small phone size */
    h6 {
        font-size: 12px;
        margin-bottom: 6px;
    }

    /* Paragraphs - Small phone size */
    p {
        font-size: 14px;
        margin-bottom: 12px;
        line-height: 1.6;
    }

    /* Lists - Compact spacing for small screens */
    ul,
    ol {
        margin-bottom: 12px;
        padding-left: 18px;
    }

    li {
        margin-bottom: 5px;
        line-height: 1.5;
    }
}

/* ============================================
   UTILITY CLASSES
   Commonly needed text styling
   ============================================ */
.text-center {
    text-align: center;
}

.text-left {
    text-align: left;
}

.text-right {
    text-align: right;
}

.text-bronze {
    color: var(--bronze);
}

.text-charcoal {
    color: var(--charcoal);
}

.text-slate {
    color: var(--slate-gray);
}
