/* ==========================================================================
   Stafford Tech Solutions — design system
   CSS variables live under :root; components are prefixed .st-
   ========================================================================== */

:root {
    --st-navy: #0b1830;
    --st-navy-2: #12203c;
    --st-blue: #2f6fed;
    --st-blue-dark: #1f4fc4;
    --st-blue-light: #eaf1ff;
    --st-ink: #101828;
    --st-body: #475467;
    --st-body-light: #667085;
    --st-border: #e4e7ec;
    --st-bg-soft: #f8fafc;
    --st-white: #ffffff;
    --st-success: #12b76a;
    --st-warning: #f79009;
    --st-radius-sm: 8px;
    --st-radius: 14px;
    --st-radius-lg: 20px;
    --st-shadow: 0 8px 24px rgba(16, 24, 40, 0.08);
    --st-shadow-lg: 0 20px 48px rgba(16, 24, 40, 0.14);
    --st-glow: 0 10px 30px rgba(47, 111, 237, 0.35);
    --st-gradient-primary: linear-gradient(135deg, var(--st-blue) 0%, var(--st-blue-dark) 100%);
    --st-gradient-dark: linear-gradient(135deg, var(--st-navy) 0%, var(--st-navy-2) 55%, #16264a 100%);
    --st-font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* ---------- base ---------- */

body {
    font-family: var(--st-font);
    color: var(--st-body);
    background-color: var(--st-white);
    line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--st-font);
    color: var(--st-ink);
    font-weight: 700;
    letter-spacing: -0.01em;
}

a {
    color: var(--st-blue);
    text-decoration: none;
}

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

.st-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--st-blue);
    margin-bottom: 0.75rem;
}

.st-lead {
    font-size: 1.15rem;
    color: var(--st-body);
}

/* ---------- buttons ---------- */

.btn-st-primary {
    background: var(--st-gradient-primary);
    border-color: var(--st-blue);
    color: var(--st-white);
    font-weight: 600;
    padding: 0.65rem 1.5rem;
    border-radius: var(--st-radius-sm);
    box-shadow: 0 4px 14px rgba(47, 111, 237, 0.3);
    transition: box-shadow 0.2s ease, transform 0.2s ease, filter 0.2s ease;
}

.btn-st-primary:hover,
.btn-st-primary:focus {
    color: var(--st-white);
    box-shadow: var(--st-glow);
    transform: translateY(-2px);
    filter: brightness(1.06);
}

.btn-st-outline {
    background-color: transparent;
    border: 1.5px solid var(--st-border);
    color: var(--st-ink);
    font-weight: 600;
    padding: 0.65rem 1.5rem;
    border-radius: var(--st-radius-sm);
    transition: border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.btn-st-outline:hover {
    border-color: var(--st-blue);
    color: var(--st-blue);
    transform: translateY(-2px);
}

.btn-st-outline-light {
    background-color: transparent;
    border: 1.5px solid rgba(255, 255, 255, 0.35);
    color: var(--st-white);
    font-weight: 600;
    padding: 0.65rem 1.5rem;
    border-radius: var(--st-radius-sm);
    transition: border-color 0.2s ease, background-color 0.2s ease, transform 0.2s ease;
}

.btn-st-outline-light:hover {
    border-color: var(--st-white);
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--st-white);
    transform: translateY(-2px);
}

/* ---------- navbar ---------- */

.st-navbar {
    background-color: var(--st-white);
    border-bottom: 1px solid var(--st-border);
    z-index: 1030;
}

.st-logo {
    display: inline-flex;
    align-items: center;
}

.st-logo-img {
    height: 70px;
    width: auto;
    display: block;
}

.st-logo-on-dark {
    background-color: var(--st-white);
    border-radius: var(--st-radius-sm);
    padding: 6px 12px;
}

.st-navbar .nav-link {
    position: relative;
    color: var(--st-ink);
    font-weight: 600;
    font-size: 0.95rem;
    padding: 0.6rem 1rem;
    transition: color 0.2s ease;
}

.st-navbar .nav-link::before {
    content: '';
    position: absolute;
    left: 1rem;
    right: 1rem;
    bottom: 0.35rem;
    height: 2px;
    background: var(--st-gradient-primary);
    border-radius: 2px;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.25s ease;
}

.st-navbar .nav-link:hover,
.st-navbar .nav-link:focus {
    color: var(--st-blue);
}

.st-navbar .nav-link:hover::before,
.st-navbar .nav-link:focus::before {
    transform: scaleX(1);
}

.st-navbar .dropdown-toggle::after {
    vertical-align: 0.1em;
}

.st-nav-cta {
    margin-left: 0.5rem;
}

/* ---------- mega menu ---------- */

.st-mega-dropdown {
    position: static;
}

.st-mega-menu {
    display: none;
    width: 100%;
    border: none;
    border-top: 1px solid var(--st-border);
    border-radius: 0;
    box-shadow: var(--st-shadow-lg);
    padding: 2rem 0 0;
    margin-top: 0.85rem;
}

.st-mega-dropdown.show .st-mega-menu {
    display: block;
}

.st-mega-menu-inner {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.75rem;
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.st-mega-col-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
    color: var(--st-ink);
    font-size: 0.95rem;
    margin-bottom: 0.85rem;
}

.st-mega-col-title i {
    color: var(--st-blue);
}

.st-mega-col-title:hover {
    color: var(--st-blue);
}

.st-mega-col-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

.st-mega-col-list a {
    display: inline-block;
    color: var(--st-body);
    font-size: 0.9rem;
    transition: color 0.2s ease, transform 0.2s ease;
}

.st-mega-col-list a:hover {
    color: var(--st-blue);
    transform: translateX(4px);
}

.st-mega-menu-footer {
    max-width: 1140px;
    margin: 1.5rem auto 0;
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--st-border);
}

.st-mega-menu-footer a {
    font-weight: 600;
    font-size: 0.9rem;
}

@media (max-width: 991.98px) {
    .st-mega-menu {
        box-shadow: none;
        padding: 0.5rem 0 0.5rem 1rem;
        border-top: none;
        margin-top: 0;
        background-color: var(--st-bg-soft);
        border-radius: var(--st-radius-sm);
    }

    .st-mega-dropdown.show .st-mega-menu {
        display: block;
    }

    .st-mega-menu-inner {
        grid-template-columns: 1fr;
        padding: 0.5rem 0;
        gap: 1.25rem;
    }

    .st-mega-menu-footer {
        margin-top: 0.5rem;
        padding: 0.75rem 0;
    }
}

/* ---------- hero / lattice ---------- */

.st-hero {
    position: relative;
    background: var(--st-gradient-dark);
    color: var(--st-white);
    overflow: hidden;
    padding: 5.5rem 0;
}

.st-hero::before,
.st-page-hero::before {
    content: '';
    position: absolute;
    z-index: 0;
    top: -140px;
    right: -100px;
    width: 440px;
    height: 440px;
    background: radial-gradient(circle, rgba(47, 111, 237, 0.35), transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.st-hero::after,
.st-page-hero::after {
    content: '';
    position: absolute;
    z-index: 0;
    bottom: -160px;
    left: -110px;
    width: 380px;
    height: 380px;
    background: radial-gradient(circle, rgba(47, 111, 237, 0.2), transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.st-hero .st-lead {
    color: rgba(255, 255, 255, 0.78);
}

.st-hero h1,
.st-hero h2 {
    color: var(--st-white);
}

.st-lattice {
    position: absolute;
    inset: 0;
    z-index: 0;
    width: 100%;
    height: 100%;
    color: rgba(255, 255, 255, 0.06);
    pointer-events: none;
}

.st-hero > .container,
.st-page-hero > .container {
    position: relative;
    z-index: 1;
}

.st-page-hero {
    position: relative;
    background: var(--st-gradient-dark);
    color: var(--st-white);
    overflow: hidden;
    padding: 4rem 0;
}

.st-page-hero h1,
.st-page-hero h2 {
    color: var(--st-white);
}

.st-page-hero .st-lead {
    color: rgba(255, 255, 255, 0.78);
}

/* ---------- sections ---------- */

.st-section {
    padding: 5rem 0;
}

.st-section-alt {
    background-color: var(--st-bg-soft);
}

.st-section-header {
    max-width: 640px;
    margin-bottom: 3rem;
}

.st-section-header.text-center {
    margin-left: auto;
    margin-right: auto;
}

/* ---------- cards ---------- */

.st-card {
    position: relative;
    background-color: var(--st-white);
    border: 1px solid var(--st-border);
    border-radius: var(--st-radius);
    padding: 1.75rem;
    height: 100%;
    overflow: hidden;
    transition: box-shadow 0.25s ease, transform 0.25s ease, border-color 0.25s ease;
}

.st-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--st-gradient-primary);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.st-card:hover {
    box-shadow: var(--st-shadow-lg);
    transform: translateY(-6px);
    border-color: transparent;
}

.st-card:hover::before {
    transform: scaleX(1);
}

.st-card-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--st-radius-sm);
    background: linear-gradient(135deg, var(--st-blue-light), #dbe8ff);
    color: var(--st-blue);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    margin-bottom: 1.1rem;
    transition: background 0.25s ease, color 0.25s ease, transform 0.25s ease;
}

.st-card:hover .st-card-icon {
    background: var(--st-gradient-primary);
    color: var(--st-white);
    transform: scale(1.08) rotate(-4deg);
}

.st-card-title {
    font-size: 1.1rem;
    margin-bottom: 0.6rem;
}

.st-card-title a {
    color: var(--st-ink);
}

.st-card-title a:hover {
    color: var(--st-blue);
}

.st-card-link {
    font-weight: 600;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.st-card-media {
    border-radius: var(--st-radius);
    aspect-ratio: 16 / 10;
    background: linear-gradient(135deg, var(--st-blue-light), var(--st-white));
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--st-blue);
    font-size: 2.2rem;
    margin-bottom: 1.25rem;
    overflow: hidden;
}

/* ---------- carousels ---------- */

.st-services-carousel {
    position: relative;
    padding: 0 3.5rem;
}

.st-services-carousel .carousel-inner {
    overflow: visible;
}

.st-services-carousel .carousel-item {
    padding: 6px 6px 18px;
    margin: -6px -6px -18px;
}

.st-services-carousel .carousel-control-prev,
.st-services-carousel .carousel-control-next {
    width: 3rem;
    opacity: 1;
}

.st-services-carousel .carousel-control-prev {
    left: -3.5rem;
}

.st-services-carousel .carousel-control-next {
    right: -3.5rem;
}

.st-carousel-arrow {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background-color: var(--st-white);
    border: 1px solid var(--st-border);
    box-shadow: var(--st-shadow);
    color: var(--st-ink);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.st-services-carousel .carousel-control-prev:hover .st-carousel-arrow,
.st-services-carousel .carousel-control-next:hover .st-carousel-arrow,
.st-services-carousel .carousel-control-prev:focus .st-carousel-arrow,
.st-services-carousel .carousel-control-next:focus .st-carousel-arrow {
    background: var(--st-gradient-primary);
    border-color: transparent;
    color: var(--st-white);
    transform: scale(1.1);
    box-shadow: var(--st-glow);
}

@media (max-width: 767.98px) {
    .st-services-carousel {
        padding: 0 2.5rem;
    }

    .st-services-carousel .carousel-control-prev {
        left: -2rem;
    }

    .st-services-carousel .carousel-control-next {
        right: -2rem;
    }

    .st-carousel-arrow {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
}

/* ---------- stats ---------- */

.st-stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1;
    background: linear-gradient(135deg, #ffffff 0%, #a9c6ff 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: var(--st-white);
}

.st-stat-label {
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

.st-stat-number.st-stat-dark {
    background: linear-gradient(135deg, var(--st-ink) 0%, var(--st-blue) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: var(--st-ink);
}

.st-stat-label.st-stat-label-dark {
    color: var(--st-body-light);
}

/* ---------- badges / pills ---------- */

.st-pill {
    display: inline-flex;
    align-items: center;
    border: 1.5px solid var(--st-border);
    background-color: var(--st-white);
    color: var(--st-body);
    border-radius: 999px;
    padding: 0.45rem 1.1rem;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
}

.st-pill:hover {
    border-color: var(--st-blue);
    color: var(--st-blue);
}

.st-pill.is-active {
    background: var(--st-gradient-primary);
    border-color: transparent;
    color: var(--st-white);
    box-shadow: 0 4px 12px rgba(47, 111, 237, 0.3);
}

.st-badge {
    display: inline-block;
    background-color: var(--st-blue-light);
    color: var(--st-blue-dark);
    border-radius: 999px;
    padding: 0.3rem 0.85rem;
    font-size: 0.78rem;
    font-weight: 700;
}

/* ---------- testimonials ---------- */

.st-testimonial {
    background-color: var(--st-white);
    border: 1px solid var(--st-border);
    border-left: 3px solid var(--st-blue);
    border-radius: var(--st-radius-lg);
    padding: 2rem;
    height: 100%;
    transition: box-shadow 0.25s ease, transform 0.25s ease;
}

.st-testimonial:hover {
    box-shadow: var(--st-shadow-lg);
    transform: translateY(-4px);
}

.st-testimonial-quote {
    font-size: 1.05rem;
    color: var(--st-ink);
    margin-bottom: 1.25rem;
}

.st-testimonial-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background-color: var(--st-blue-light);
    color: var(--st-blue-dark);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    flex-shrink: 0;
}

/* ---------- team ---------- */

.st-team-photo {
    width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: var(--st-radius);
    background: linear-gradient(135deg, var(--st-blue-light), var(--st-bg-soft));
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--st-blue);
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

/* ---------- forms ---------- */

.st-form-card {
    background-color: var(--st-white);
    border: 1px solid var(--st-border);
    border-radius: var(--st-radius-lg);
    padding: 2.25rem;
    box-shadow: var(--st-shadow);
}

.form-label {
    font-weight: 600;
    color: var(--st-ink);
    font-size: 0.9rem;
}

.form-control,
.form-select {
    border-radius: var(--st-radius-sm);
    border-color: var(--st-border);
    padding: 0.65rem 0.9rem;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--st-blue);
    box-shadow: 0 0 0 3px var(--st-blue-light);
}

/* ---------- footer ---------- */

.st-footer {
    position: relative;
    background-color: var(--st-navy);
    color: rgba(255, 255, 255, 0.7);
    padding: 4.5rem 0 2rem;
    overflow: hidden;
}

.st-footer::before {
    content: '';
    position: absolute;
    z-index: 0;
    top: -220px;
    left: 50%;
    transform: translateX(-50%);
    width: 640px;
    height: 420px;
    background: radial-gradient(ellipse, rgba(47, 111, 237, 0.18), transparent 70%);
    pointer-events: none;
}

.st-footer > .container {
    position: relative;
    z-index: 1;
}

.st-footer-blurb {
    font-size: 0.92rem;
    color: rgba(255, 255, 255, 0.6);
    max-width: 320px;
}

.st-footer-heading {
    color: var(--st-white);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 1.1rem;
}

.st-footer-links,
.st-footer-contact {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
    font-size: 0.9rem;
}

.st-footer-links a,
.st-footer-contact a {
    color: rgba(255, 255, 255, 0.65);
}

.st-footer-links a:hover {
    color: var(--st-white);
}

.st-footer-contact li {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    color: rgba(255, 255, 255, 0.65);
}

.st-footer-social {
    display: flex;
    gap: 0.75rem;
}

.st-footer-social a {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--st-white);
}

.st-footer-social a:hover {
    background-color: var(--st-blue);
    border-color: var(--st-blue);
}

.st-footer-divider {
    border-color: rgba(255, 255, 255, 0.12);
    margin: 2.5rem 0 1.5rem;
}

.st-footer-bottom {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 0.75rem;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.5);
}

.st-footer-bottom a {
    color: rgba(255, 255, 255, 0.5);
}

.st-footer-bottom a:hover {
    color: var(--st-white);
}

/* ---------- scroll reveal ---------- */

.st-reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.st-reveal.st-reveal-visible {
    opacity: 1;
    transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
    .st-reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
}

/* ---------- misc ---------- */

.st-divider-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background-color: var(--st-blue-light);
    color: var(--st-blue);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.st-timeline-marker {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: var(--st-blue);
    flex-shrink: 0;
    margin-top: 0.35rem;
}

.st-flash {
    border-radius: var(--st-radius-sm);
    padding: 1rem 1.25rem;
    font-size: 0.92rem;
    margin-bottom: 1.5rem;
}

.st-detail-sidebar {
    position: sticky;
    top: 100px;
}

@media (max-width: 767.98px) {
    .st-hero,
    .st-page-hero {
        padding: 3.5rem 0;
    }

    .st-section {
        padding: 3.25rem 0;
    }
}
