/* ============================================
   ImproveTT Design System
   ============================================ */

:root {
    /* T&T-inspired palette */
    --itt-red: #C8102E;
    --itt-red-dark: #A00D24;
    --itt-red-light: #F9E8EB;
    --itt-black: #1A1A1A;
    --itt-charcoal: #1E1E24;
    --itt-charcoal-light: #2A2A32;
    --itt-gray: #4A4A4A;
    --itt-gray-light: #6B6B6B;
    --itt-gray-muted: #9B9B9B;
    --itt-off-white: #F8F7F4;
    --itt-white: #FFFFFF;
    --itt-border: #EDEBE7;
    --itt-border-hover: #E5E2DC;
    --itt-gold: #D4A843;

    /* Typography */
    --itt-font-body: "Source Serif 4", Georgia, "Times New Roman", serif;
    --itt-font-heading: "DM Sans", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

    /* Spacing */
    --itt-section-py: 4rem;
    --itt-section-py-sm: 2.5rem;
}

/* ---- Base ---- */

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

body {
    font-family: var(--itt-font-body);
    color: var(--itt-gray);
    line-height: 1.65;
    background-color: var(--itt-white);
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--itt-font-heading);
    font-weight: 700;
    color: var(--itt-black);
    line-height: 1.25;
}

h1 { font-size: 2.75rem; font-weight: 800; }
h2 { font-size: 2rem; margin-bottom: 1rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }

p {
    margin-bottom: 1.25rem;
}

a {
    color: var(--itt-red);
    text-decoration: none;
    transition: color 0.12s ease;
}

a:hover {
    color: var(--itt-red-dark);
    text-decoration: underline;
}

/* ---- Buttons ---- */

.btn-itt-primary {
    display: inline-block;
    padding: 0.75rem 2rem;
    background: linear-gradient(135deg, #C8102E, #A00D24);
    color: var(--itt-white) !important;
    border: 2px solid var(--itt-red);
    border-radius: 8px;
    font-family: var(--itt-font-heading);
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    transition: all 0.15s ease;
    cursor: pointer;
}

.btn-itt-primary:hover {
    background: linear-gradient(135deg, #A00D24, #85091C);
    border-color: var(--itt-red-dark);
    color: var(--itt-white) !important;
    text-decoration: none;
    transform: scale(1.03);
}

.btn-itt-outline {
    display: inline-block;
    padding: 0.75rem 2rem;
    background-color: transparent;
    color: var(--itt-red) !important;
    border: 2px solid var(--itt-red);
    border-radius: 8px;
    font-family: var(--itt-font-heading);
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    transition: all 0.15s ease;
    cursor: pointer;
}

.btn-itt-outline:hover {
    background-color: var(--itt-red);
    color: var(--itt-white) !important;
    text-decoration: none;
    transform: scale(1.03);
}

.btn-itt-outline-light {
    display: inline-block;
    padding: 0.75rem 2rem;
    background-color: transparent;
    color: var(--itt-white) !important;
    border: 2px solid rgba(255, 255, 255, 0.6);
    border-radius: 8px;
    font-family: var(--itt-font-heading);
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    transition: all 0.15s ease;
    cursor: pointer;
}

.btn-itt-outline-light:hover {
    background-color: var(--itt-white);
    color: var(--itt-charcoal) !important;
    border-color: var(--itt-white);
    text-decoration: none;
    transform: scale(1.03);
}

/* ---- Sections ---- */

.section-padding {
    padding: var(--itt-section-py) 0;
}

.section-padding-sm {
    padding: var(--itt-section-py-sm) 0;
}

.section-bg-light {
    background-color: var(--itt-off-white);
}

.section-bg-dark {
    background-color: var(--itt-charcoal);
    color: var(--itt-off-white);
}

.section-bg-dark h2,
.section-bg-dark h3,
.section-bg-dark h4 {
    color: var(--itt-white);
}

.section-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.section-header h2 {
    position: relative;
    display: inline-block;
    padding-bottom: 1rem;
}

.section-header h2::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 48px;
    height: 3px;
    background: var(--itt-red);
    border-radius: 2px;
}

.section-header p {
    font-family: var(--itt-font-heading);
    font-size: 1.125rem;
    color: var(--itt-gray-light);
    max-width: 640px;
    margin: 0.75rem auto 0;
}

/* ---- Section Divider ---- */

.section-padding + .section-bg-light,
.section-bg-light + .section-padding,
.section-padding + .section-bg-dark,
.section-bg-dark + .section-padding {
    position: relative;
}

.section-padding + .section-bg-light::before,
.section-bg-light + .section-padding::before {
    content: "";
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: min(90%, 1200px);
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--itt-border-hover), transparent);
}

/* ---- Container Narrow ---- */

.container-narrow {
    max-width: 720px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

/* ---- Cards ---- */

.itt-card {
    background: var(--itt-white);
    border: 1px solid var(--itt-border);
    border-radius: 12px;
    padding: 1.5rem;
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
    height: 100%;
}

.itt-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.08);
    border-color: var(--itt-border-hover);
}

.itt-card .card-icon {
    font-size: 2rem;
    color: var(--itt-red);
    margin-bottom: 1rem;
    transition: transform 0.15s ease;
}

.itt-card:hover .card-icon {
    transform: scale(1.1);
}

.itt-card .card-title {
    font-family: var(--itt-font-heading);
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--itt-black);
    margin-bottom: 0.5rem;
}

.itt-card .card-text {
    font-family: var(--itt-font-heading);
    font-size: 0.95rem;
    color: var(--itt-gray);
    line-height: 1.6;
    margin-bottom: 0;
}

/* ---- Hero ---- */

.hero-section {
    background: linear-gradient(160deg, var(--itt-charcoal) 0%, var(--itt-charcoal-light) 50%, var(--itt-charcoal) 100%);
    color: var(--itt-white);
    padding: 5.5rem 0 4.5rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 50% 0%, rgba(200, 16, 46, 0.08) 0%, transparent 70%);
    pointer-events: none;
}

.hero-section h1 {
    color: var(--itt-white);
    font-family: var(--itt-font-heading);
    font-size: 3.25rem;
    font-weight: 800;
    margin-bottom: 1.25rem;
    letter-spacing: -0.5px;
    animation: heroFadeUp 0.4s ease-out both;
}

.hero-section .hero-accent {
    display: block;
    width: 48px;
    height: 3px;
    background: var(--itt-red);
    margin: 0 auto 1.5rem;
    border-radius: 2px;
    animation: heroFadeUp 0.4s 0.1s ease-out both;
}

.hero-section .hero-subtitle {
    font-family: var(--itt-font-heading);
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.75);
    max-width: 640px;
    margin: 0 auto 2rem;
    line-height: 1.65;
    animation: heroFadeUp 0.4s 0.15s ease-out both;
}

.hero-section .hero-ctas {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    animation: heroFadeUp 0.4s 0.2s ease-out both;
}

.hero-section .hero-ctas a {
    min-width: 220px;
    text-align: center;
}

@keyframes heroFadeUp {
    from {
        opacity: 0;
        transform: translateY(16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ---- CTA Section ---- */

.cta-section {
    background: linear-gradient(160deg, var(--itt-charcoal) 0%, var(--itt-charcoal-light) 100%);
    color: var(--itt-white);
    padding: 3.5rem 0;
    text-align: center;
}

.cta-section h2 {
    color: var(--itt-white);
    margin-bottom: 1rem;
}

.cta-section p {
    font-family: var(--itt-font-heading);
    color: rgba(255, 255, 255, 0.75);
    font-size: 1.125rem;
    max-width: 540px;
    margin: 0 auto 1.5rem;
}

/* ---- Action List ---- */

.action-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.action-item .action-icon {
    font-size: 1.25rem;
    color: var(--itt-red);
    flex-shrink: 0;
    margin-top: 0.2rem;
}

.action-item .action-text {
    font-family: var(--itt-font-heading);
    font-size: 1.05rem;
    color: var(--itt-gray);
}

/* ---- Mission Callout ---- */

.mission-callout {
    border-left: 4px solid var(--itt-red);
    padding: 1.5rem 2rem;
    background-color: var(--itt-off-white);
    border-radius: 0 8px 8px 0;
    margin: 1.5rem 0;
}

.mission-callout p {
    font-size: 1.15rem;
    font-style: italic;
    color: var(--itt-black);
    margin-bottom: 0;
    line-height: 1.65;
}

/* ---- Forms ---- */

.form-control:focus,
.form-select:focus {
    border-color: var(--itt-red);
    box-shadow: 0 0 0 0.2rem rgba(200, 16, 46, 0.15);
}

.form-label {
    font-family: var(--itt-font-heading);
    font-weight: 600;
    color: var(--itt-black);
    margin-bottom: 0.4rem;
}

.form-control,
.form-select {
    font-family: var(--itt-font-heading);
}

/* ---- Alert ---- */

.alert-itt-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    border-radius: 8px;
    padding: 1.25rem 1.5rem;
}

/* ---- Navbar ---- */

.navbar .navbar-brand {
    font-family: var(--itt-font-heading);
}

.navbar .nav-link {
    transition: color 0.12s ease, background-color 0.12s ease;
    border-radius: 6px;
    padding: 0.5rem 0.85rem !important;
    font-family: var(--itt-font-heading);
    font-weight: 500;
    font-size: 0.95rem;
}

.navbar .nav-link:hover {
    background-color: var(--itt-off-white);
}

.navbar .nav-link.active {
    color: var(--itt-red) !important;
}

/* ---- Footer ---- */

.site-footer {
    background-color: var(--itt-charcoal);
    color: rgba(255, 255, 255, 0.7);
    padding: 3.5rem 0 2rem;
    font-family: var(--itt-font-heading);
}

.site-footer h5 {
    color: var(--itt-white);
    font-family: var(--itt-font-heading);
    font-size: 0.875rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.site-footer a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: color 0.12s ease;
}

.site-footer a:hover {
    color: var(--itt-white);
    text-decoration: none;
}

.site-footer .footer-brand {
    font-family: var(--itt-font-heading);
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--itt-white);
}

.site-footer .footer-tagline {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.45);
    margin-top: 0.5rem;
}

.site-footer .footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: 1.5rem;
    margin-top: 2.5rem;
    font-size: 0.875rem;
}

.site-footer .social-links a {
    font-size: 1.25rem;
    margin-right: 1rem;
    transition: color 0.12s ease, transform 0.12s ease;
}

.site-footer .social-links a:hover {
    transform: translateY(-2px);
}

.site-footer .footer-nav a {
    display: block;
    padding: 0.2rem 0;
}

/* ---- Page Header ---- */

.page-header {
    padding: 3.5rem 0 2.5rem;
    text-align: center;
    background-color: var(--itt-off-white);
}

.page-header h1 {
    font-size: 2.75rem;
    margin-bottom: 0.75rem;
}

.page-header p {
    font-family: var(--itt-font-heading);
    font-size: 1.15rem;
    color: var(--itt-gray-light);
    max-width: 600px;
    margin: 0 auto;
}

/* ---- Scroll Reveal ---- */

.reveal {
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.3s ease-out, transform 0.3s ease-out;
}

.reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* ---- Accessibility ---- */

*:focus-visible {
    outline: 2px solid var(--itt-red);
    outline-offset: 2px;
}

/* ---- Reduced Motion ---- */

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }

    html {
        scroll-behavior: auto;
    }

    .reveal {
        opacity: 1;
        transform: none;
    }
}

/* ---- Responsive ---- */

@media (max-width: 1024px) and (min-width: 769px) {
    .col-lg-4 {
        flex: 0 0 50%;
        max-width: 50%;
    }
}

@media (max-width: 768px) {
    :root {
        --itt-section-py: 2.5rem;
        --itt-section-py-sm: 2rem;
    }

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

    .hero-section {
        padding: 3.5rem 0 3rem;
    }

    .hero-section h1 {
        font-size: 2.5rem;
    }

    .hero-section .hero-subtitle {
        font-size: 1.1rem;
    }

    .hero-section .hero-ctas a {
        min-width: unset;
        width: 100%;
    }

    .page-header {
        padding: 2.5rem 0 1.5rem;
    }

    .page-header h1 {
        font-size: 2rem;
    }

    .section-header {
        margin-bottom: 2rem;
    }
}
