/* ============================================
   DURABILITY SCORE - STYLES
   Ascension Strategy Solutions LLC
   ============================================ */

/* ============================================
   1. CSS VARIABLES
   ============================================ */
:root {
    /* Brand Colors */
    --olive: #878c58;
    --olive-dark: #6b6f47;
    --olive-light: #a3a876;
    --gold: #c9a227;
    --gold-light: #d4b44a;
    --dark: #2c2e24;
    --dark-light: #3d4035;
    --cream: #f5f4ef;
    --cream-dark: #e8e7e2;
    --white: #ffffff;
    
    /* Semantic Colors */
    --success: #16a34a;
    --success-light: #dcfce7;
    --warning: #d97706;
    --warning-light: #fef3c7;
    --danger: #dc2626;
    --danger-light: #fee2e2;
    
    /* Typography */
    --font-heading: 'Georgia', serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    
    /* Spacing */
    --container-max: 1200px;
    --container-padding: 1.5rem;
    
    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-normal: 300ms ease;
}

/* ============================================
   2. RESET & BASE
   ============================================ */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    font-weight: 400;
    line-height: 1.6;
    color: var(--dark);
    background-color: var(--white);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Reduced motion */
@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;
    }
}

.reduce-motion *, .reduce-motion *::before, .reduce-motion *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
}

/* ============================================
   3. TYPOGRAPHY
   ============================================ */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
    color: var(--dark);
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }

p {
    margin-bottom: 1rem;
}

a {
    color: var(--olive);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--olive-dark);
}

a:focus {
    outline: 2px solid var(--olive);
    outline-offset: 2px;
}

/* ============================================
   4. LAYOUT
   ============================================ */
.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--container-padding);
}

/* ============================================
   5. ACCESSIBILITY
   ============================================ */
.skip-link {
    position: absolute;
    top: -100px;
    left: 0;
    padding: 0.75rem 1.5rem;
    background: var(--dark);
    color: var(--white);
    font-weight: 600;
    z-index: 9999;
    transition: top var(--transition-fast);
}

.skip-link:focus {
    top: 0;
    outline: 2px solid var(--gold);
    outline-offset: 2px;
}

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

/* ============================================
   6. HEADER
   ============================================ */
.header {
    background: var(--white);
    border-bottom: 1px solid var(--cream-dark);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.header__brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
}

.header__brand:hover .header__wordmark {
    color: var(--olive);
}

.header__brand img {
    height: 28px;
    width: auto;
}

.header__wordmark {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--dark);
    transition: color 0.2s;
}

.header__right {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.header__tagline {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--olive);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.header__main-site {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--dark);
    opacity: 0.7;
    text-decoration: none;
    transition: opacity 0.2s, color 0.2s;
    white-space: nowrap;
}

.header__main-site:hover {
    opacity: 1;
    color: var(--olive);
}

/* ============================================
   7. FOOTER
   ============================================ */
.footer {
    background: var(--dark);
    color: rgba(255, 255, 255, 0.85);
    padding: 3rem 0 1.5rem;
    margin-top: auto;
}

.footer__content {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-start;
    gap: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer__brand {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.footer__brand-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
}

.footer__brand-link img {
    height: 22px;
    width: auto;
}

.footer__brand-link span {
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.9);
    transition: color 0.2s;
}

.footer__brand-link:hover span {
    color: var(--gold);
}

.footer__tagline {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.6);
    max-width: 250px;
    margin: 0;
    line-height: 1.5;
}

.footer__contact {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.footer__contact a {
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.875rem;
}

.footer__contact a:hover {
    color: var(--gold);
}

.footer__address {
    font-style: normal;
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.5;
    margin-top: 0.25rem;
}

.footer__legal {
    display: flex;
    gap: 1.5rem;
}

.footer__legal a {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.875rem;
}

.footer__legal a:hover {
    color: var(--gold);
}

.footer__bottom {
    padding-top: 1.5rem;
    text-align: center;
}

.footer__bottom p {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.5);
    margin: 0;
}

/* ============================================
   8. ASSESSMENT CONTAINER
   ============================================ */
#assessment-root {
    min-height: calc(100vh - 180px);
}

/* ============================================
   9. BUTTONS (for PHP pages)
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.875rem 1.75rem;
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 700;
    line-height: 1;
    text-decoration: none;
    border-radius: 0.5rem;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all var(--transition-fast);
    min-height: 44px;
}

.btn--primary {
    background: var(--olive);
    color: var(--white);
    border-color: var(--olive);
}

.btn--primary:hover {
    background: var(--olive-dark);
    border-color: var(--olive-dark);
    color: var(--white);
}

.btn--secondary {
    background: transparent;
    color: var(--olive);
    border-color: var(--olive);
}

.btn--secondary:hover {
    background: var(--cream);
}

.btn--gold {
    background: var(--gold);
    color: var(--dark);
    border-color: var(--gold);
}

.btn--gold:hover {
    background: var(--gold-light);
    border-color: var(--gold-light);
}

.btn:focus {
    outline: 2px solid var(--olive);
    outline-offset: 2px;
}

/* ============================================
   10. FORMS (for PHP pages)
   ============================================ */
.form__group {
    margin-bottom: 1.25rem;
}

.form__label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 0.5rem;
}

.form__required {
    color: var(--danger);
}

.form__input,
.form__select,
.form__textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    font-family: var(--font-body);
    font-size: 1rem;
    color: var(--dark);
    background: var(--white);
    border: 2px solid var(--cream-dark);
    border-radius: 0.5rem;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.form__input:focus,
.form__select:focus,
.form__textarea:focus {
    outline: none;
    border-color: var(--olive);
    box-shadow: 0 0 0 3px rgba(135, 140, 88, 0.15);
}

.form__input::placeholder {
    color: rgba(44, 46, 36, 0.4);
}

.form__error {
    font-size: 0.8rem;
    color: var(--danger);
    margin-top: 0.25rem;
}

/* ============================================
   11. LEGAL PAGES
   ============================================ */
.legal-page {
    padding: 4rem 0;
}

.legal-page h1 {
    margin-bottom: 0.5rem;
}

.legal-page .last-updated {
    font-size: 0.875rem;
    color: rgba(44, 46, 36, 0.6);
    margin-bottom: 2rem;
}

.legal-page h2 {
    font-size: 1.25rem;
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.legal-page p,
.legal-page li {
    color: rgba(44, 46, 36, 0.85);
    line-height: 1.8;
}

.legal-page ul {
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}

.legal-page li {
    margin-bottom: 0.5rem;
}

/* ============================================
   12. MOBILE STYLES
   ============================================ */
@media (max-width: 767px) {
    body {
        font-weight: 600;
    }
    
    p, li, a {
        font-weight: 600;
    }
    
    h1, h2, h3, h4 {
        font-weight: 800;
    }
    
    h1 { font-size: 2rem; }
    h2 { font-size: 1.5rem; }
    h3 { font-size: 1.25rem; }
    
    .header__wordmark {
        display: none;
    }
    
    .header__right {
        flex-direction: column;
        align-items: flex-end;
        gap: 0.25rem;
    }
    
    .header__tagline {
        font-size: 0.7rem;
    }
    
    .header__main-site {
        font-size: 0.7rem;
    }
    
    .footer__content {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .footer__tagline {
        max-width: none;
    }
    
    .footer__legal {
        flex-direction: column;
        gap: 0.75rem;
    }
}

@media (min-width: 768px) {
    .container {
        padding: 0 2rem;
    }
}

@media (min-width: 1024px) {
    h1 { font-size: 3rem; }
    h2 { font-size: 2.25rem; }
}
