﻿/**
 * ============================================================================
 * File: wwwroot/css/dps.css
 * Purpose: Global branding, accessibility, footer, and navbar styles
 * Last Updated: May 2026
 * Author: Jessie Martin
 *
 * SCOPE: This file owns:
 *   - CSS custom properties (color + font tokens)
 *   - Global resets (html, body, overflow-wrapper)
 *   - Skip link (WCAG 2.4.1)
 *   - Global focus states (WCAG 2.4.11)
 *   - Minimum touch targets (WCAG 2.5.8)
 *   - Navbar brand (header-logo, header-title-v2, header-subtitle-v2)
 *   - Footer
 *   - section-title (legacy, used in _InstagramFeed)
 *
 * DOES NOT OWN: Hero, calculators, career cards, stat numbers,
 *   Instagram layout — those live in scoped page CSS files.
 * ============================================================================
 */


/* ============================================
   1. CSS VARIABLES
   ============================================ */
:root {
    /* Core colors */
    --dps-white:      #FFFFFF;
    --dps-navy:       #11294B;
    --dps-dark-navy:  #0B1424;
    --dps-blue:       #1F419B;
    --dps-orange:     #DB4F30;
    --dps-red:        #A22237;
    --dps-grey:       #D7D5CF;
    --dps-black:      #000000;
    --dps-yellow:     #EADC75;

    /* Backwards-compat aliases */
    --dps-royal-blue: var(--dps-blue);
    --dps-blue-dark:  var(--dps-navy);
    --dps-gold:       var(--dps-orange);
    --dps-dark-gold:  #B8401A;
    --dps-gray:       #6c757d;
    --dps-light-gray: #f8f9fa;

    /* GSP theme */
    --gsp-blue:        var(--dps-blue);
    --gsp-blue-dark:   var(--dps-navy);
    --gsp-grey:        var(--dps-grey);
    --gsp-grey-light:  #E8E6E1;
    --gsp-orange:      var(--dps-orange);
    --gsp-orange-dark: var(--dps-dark-gold);

    /* CVE theme */
    --cve-black:       var(--dps-black);
    --cve-black-light: #2c2c2c;
    --cve-yellow:      var(--dps-yellow);
    --cve-yellow-dark: #D4C660;

    /* Capitol theme */
    --capitol-grey:      var(--dps-grey);
    --capitol-grey-dark: #A8A59E;
    --capitol-white:     var(--dps-white);
    --capitol-white-off: #F5F5F5;

    /* Fonts */
    --font-primary:    'Montserrat', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-modern:     'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-condensed:  'Oswald', 'Arial Narrow', sans-serif;
    --font-elegant:    'Cormorant', Georgia, serif;
    --font-script:     'Great Vibes', cursive;
    --font-serif:      Georgia, 'Times New Roman', serif;

    /* Font weights */
    --font-regular:  400;
    --font-medium:   500;
    --font-semibold: 600;
    --font-bold:     700;
    --font-strong:   900;
}


/* ============================================
   2. GLOBAL RESET
   ============================================ */
html, body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    max-width: 100%;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.overflow-wrapper {
    overflow-x: hidden;
    overflow-y: visible;
    width: 100%;
    min-height: 100vh;
}

*:focus {
    scroll-margin-top: 80px;
}


/* ============================================
   3. SECTION TITLE (legacy — _InstagramFeed)
   ============================================ */
.section-title {
    color: var(--dps-royal-blue);
    font-weight: 700;
}


/* ============================================
   4. SKIP LINK — WCAG 2.4.1
   ============================================ */
.skip-link {
    position: absolute;
    top: -999px;
    left: 0;
    padding: 0.75rem 1.5rem;
    background: var(--dps-blue);
    color: #FFFFFF;
    font-family: var(--font-condensed);
    font-weight: 700;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    text-decoration: none;
    z-index: 9999;
    border-radius: 0 0 6px 0;
}

.skip-link:focus-visible {
    top: 0;
    outline: 3px solid #FFFFFF;
    outline-offset: -3px;
}


/* ============================================
   5. GLOBAL FOCUS STATES — WCAG 2.4.11
   ============================================ */
*:focus {
    outline: none;
}

*:focus-visible {
    outline: 3px solid var(--dps-blue);
    outline-offset: 3px;
}

.btn:focus-visible,
.btn-close:focus-visible,
.btn-link:focus-visible,
.nav-link:focus-visible,
.dropdown-item:focus-visible,
.navbar-toggler:focus-visible {
    outline: 3px solid var(--dps-blue);
    outline-offset: 3px;
    box-shadow: 0 0 0 5px rgba(31, 65, 155, 0.25);
}

.form-select:focus-visible,
.form-control:focus-visible,
.form-check-input:focus-visible {
    border-color: var(--dps-blue);
    outline: 3px solid var(--dps-blue);
    outline-offset: 2px;
    box-shadow: 0 0 0 4px rgba(31, 65, 155, 0.20);
}

.social-icon:focus-visible,
.hero-nav-icon:focus-visible,
.hero-nav-circle:focus-visible {
    outline: 3px solid var(--dps-blue);
    outline-offset: 3px;
    border-radius: 50%;
}

a:focus-visible {
    outline: 3px solid var(--dps-blue);
    outline-offset: 2px;
    border-radius: 2px;
}

.footer-section a:focus-visible,
.footer-phone-link:focus-visible,
.footer-email-link:focus-visible,
.footer-bottom a:focus-visible {
    outline: 3px solid #FFFFFF;
    outline-offset: 2px;
    border-radius: 2px;
}

.accordion-button:focus-visible {
    outline: 3px solid var(--dps-blue);
    outline-offset: -2px;
    box-shadow: none;
}

.carousel-control-prev:focus-visible,
.carousel-control-next:focus-visible,
.carousel-indicators [data-bs-target]:focus-visible {
    outline: 3px solid #FFFFFF;
    outline-offset: 2px;
}


/* ============================================
   6. TOUCH TARGETS — WCAG 2.5.5 / 2.5.8
   ============================================ */
.navbar-toggler {
    min-width: 44px;
    min-height: 44px;
    padding: 0.5rem;
}

.nav-link {
    min-height: 44px;
    display: flex;
    align-items: center;
}

.hero-nav-circle {
    min-width: 44px;
    min-height: 44px;
}

.carousel-control-prev,
.carousel-control-next {
    min-width: 44px;
}

.accordion-button {
    min-height: 44px;
}

.dropdown-item {
    min-height: 44px;
    display: flex;
    align-items: center;
}


/* ============================================
   7. FOOTER
   ============================================ */
.footer {
    background: #000000;
    color: var(--dps-white);
    padding: 3rem 2rem;
    border-top: 1px solid rgba(31, 65, 155, 0.40);
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.footer-section h3,
.footer-section__heading {
    font-family: 'Oswald', 'Arial Narrow', sans-serif;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.85rem;
    margin-bottom: 1.25rem;
    color: var(--dps-grey);
    border-bottom: 1px solid rgba(31, 65, 155, 0.35);
    padding-bottom: 0.5rem;
}

.footer-section ul {
    padding: 0;
    margin: 0;
    list-style: none;
}

.footer-section li {
    margin-bottom: 0.5rem;
}

.footer-section p,
.footer-section a {
    color: #9CA3AF;
    font-size: 0.9rem;
    line-height: 1.8;
    text-decoration: none;
}

.footer-section a:hover {
    color: var(--dps-white);
}

.footer-phone-link,
.footer-email-link {
    color: #9CA3AF;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-phone-link:hover,
.footer-email-link:hover {
    color: var(--dps-white);
    text-decoration: underline;
}

.footer-phone-link:active,
.footer-email-link:active,
.footer-section ul a:active,
.footer-section p > a:active,
.footer-bottom a:active {
    color: var(--dps-grey) !important;
    transition: none !important;
}

.social-icons {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.social-icon {
    width: 44px;
    height: 44px;
    background: #1A1A1A;
    border: 1px solid rgba(31, 65, 155, 0.40);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: all 0.3s;
    cursor: pointer;
    color: var(--dps-grey);
    text-decoration: none;
}

.social-icon:hover {
    background: var(--dps-blue);
    border-color: var(--dps-blue);
    color: var(--dps-white);
    transform: translateY(-3px);
}

.social-icon:active {
    background: var(--dps-navy);
    border-color: var(--dps-navy);
    transform: translateY(-1px) scale(0.95);
}

.footer-bottom {
    max-width: 1200px;
    margin: 2rem auto 0;
    padding-top: 2rem;
    border-top: 1px solid rgba(31, 65, 155, 0.45);
    text-align: center;
    color: #94a3b8;
    font-size: 0.85rem;
    font-family: 'Oswald', 'Arial Narrow', sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

/* WCAG AA: #b0b8c4 on #000 = ~5.1:1 contrast ratio */
.footer-bottom__link {
    color: #b0b8c4;
    text-decoration: underline;
}

.footer-bottom__link:hover,
.footer-bottom__link:focus {
    color: var(--dps-white);
}

.footer-bottom a:focus-visible {
    outline: 3px solid #FFFFFF;
    outline-offset: 2px;
    border-radius: 2px;
}



/* ============================================
   8. RESPONSIVE BREAKPOINTS
   ============================================ */

/* Mobile: < 576px */
@media (max-width: 575.98px) {
    /* Navbar brand */
    .header-logo {
        height: 35px;
    }

    .header-title-v2 {
        font-size: 0.80rem;
        letter-spacing: 0.04em;
    }

    .header-subtitle-v2 {
        font-size: 0.68rem;
        letter-spacing: 0.03em;
    }

    /* Footer */
    .footer {
        padding: 2rem 1rem;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

/* Landscape phones: 576px–767px */
@media (min-width: 576px) and (max-width: 767.98px) {
    .header-logo {
        height: 40px;
    }

    .header-title-v2 {
        font-size: 0.90rem;
    }

    .header-subtitle-v2 {
        font-size: 0.72rem;
    }

    .footer {
        padding: 2rem 1rem;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

/* Tablets: 768px–991px */
@media (min-width: 768px) and (max-width: 991.98px) {
    .header-logo {
        height: 45px;
    }

    .footer-content {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Tight laptops: 992px–1200px
   Navbar is crowded here — shrink brand text, keep subtitle visible */
@media (min-width: 992px) and (max-width: 1200px) {
    .header-title-v2 {
        font-size: 0.95rem;
    }

    .header-subtitle-v2 {
        font-size: 0.68rem;
        display: block; /* explicitly keep visible */
    }

    .navbar-nav .nav-link {
        padding-left: 0.25rem;
        padding-right: 0.25rem;
        font-size: 0.48rem;
        letter-spacing: 0.03em;
    }

    .btn-apply-nav {
        padding-left: 0.6rem !important;
        padding-right: 0.6rem !important;
        font-size: 0.68rem;
    }

    .ms-lg-3 {
        margin-left: 0.35rem !important;
    }

    .navbar-nav {
        flex-wrap: nowrap;
    }
}

/* Desktops: 1201px–1400px */
@media (min-width: 1201px) and (max-width: 1400px) {
    .header-title-v2 {
        font-size: 1rem;
    }

    .header-subtitle-v2 {
        font-size: 0.75rem;
        display: block;
    }
}