/* Custom styles for the refreshed Flying Squirrel site */

:root {
    --fs-nav-height: 80px;
    --fs-surface: #e3eaf7;
    --fs-section-contrast: #ffffff;
    --fs-heading-font: "Nunito", "Montserrat", "Lato", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

@media (prefers-reduced-motion: no-preference) {
    html {
        scroll-behavior: smooth;
    }

    .btn,
    .project-card,
    .highlight-card,
    .client-logo,
    .contact-card {
        transition: transform 0.25s ease, box-shadow 0.25s ease;
    }

    .btn:hover,
    .btn:focus {
        transform: translateY(-2px);
        box-shadow: 0 14px 32px rgba(18, 38, 63, 0.18);
    }

    .client-logo:hover,
    .client-logo:focus {
        transform: translateY(-6px);
    }

    [data-animate] {
        opacity: 0;
        transform: var(--animate-transform-initial, translateY(24px));
        transition: opacity 0.7s ease, transform 0.7s ease;
        will-change: opacity, transform;
    }

    [data-animate].animate-in {
        opacity: 1;
        transform: none;
    }

    [data-animate="fade-up"] {
        --animate-transform-initial: translateY(28px);
    }

    [data-animate="fade-down"] {
        --animate-transform-initial: translateY(-28px);
    }

    [data-animate="fade-left"] {
        --animate-transform-initial: translateX(-32px);
    }

    [data-animate="fade-right"] {
        --animate-transform-initial: translateX(32px);
    }

    [data-animate="zoom-in"] {
        --animate-transform-initial: scale(0.9);
    }

    .hero .masthead-avatar.animate-in {
        animation: hero-avatar-pop 1.2s ease forwards;
    }

    .highlight-card.animate-in {
        animation: card-lift 6s ease-in-out infinite 0.8s;
    }

    @keyframes hero-avatar-pop {
        0% {
            transform: scale(0.9) translateY(24px);
        }
        60% {
            transform: scale(1.03);
        }
        100% {
            transform: scale(1);
        }
    }

    @keyframes card-lift {
        0%,
        100% {
            transform: translateY(0);
        }
        50% {
            transform: translateY(-8px);
        }
    }
}

@media (prefers-reduced-motion: reduce) {
    [data-animate] {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
        animation: none !important;
    }
}

body {
    background: var(--fs-surface);
}

h1,
.h1,
h2,
.h2,
h3,
.h3,
h4,
.h4,
h5,
.h5,
h6,
.h6,
.masthead-heading,
.page-section-heading,
.project-card__title,
.feature-card .h5,
.publication-card__header h3,
.client-logo__label,
.contact-card .h5,
.footer-heading {
    font-family: var(--fs-heading-font);
    font-weight: 700;
}

#mainNav .navbar-brand,
#mainNav .nav-link,
#mainNav .navbar-toggler {
    font-family: var(--fs-heading-font);
    font-weight: 700;
    letter-spacing: 0.08em;
}

.page-section,
.masthead,
.footer {
    scroll-margin-top: calc(var(--fs-nav-height) + 24px);
}

.page-section {
    background: var(--fs-section-contrast);
}

.page-section:nth-of-type(even):not([class*="bg-"]) {
    background: var(--fs-surface);
}

#mainNav {
    padding: 1.25rem 0;
    background: rgba(10, 20, 34, 0.92);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    transition: padding 0.3s ease, background 0.3s ease, box-shadow 0.3s ease;
}

#mainNav .navbar-brand img {
    height: 54px;
    width: auto;
    transition: transform 0.3s ease;
}

#mainNav .navbar-brand:focus img,
#mainNav .navbar-brand:hover img {
    transform: translateY(-2px);
}

#mainNav .nav-link {
    color: rgba(255, 255, 255, 0.82);
    transition: color 0.2s ease, transform 0.2s ease;
}

#mainNav .nav-link:hover,
#mainNav .nav-link:focus,
#mainNav .nav-link.active {
    color: #fff;
    transform: translateY(-1px);
}

#mainNav.navbar-shrink {
    padding: 0.65rem 0;
    background: rgba(10, 20, 34, 0.97);
    box-shadow: 0 10px 30px rgba(12, 21, 35, 0.45);
}

.hero {
    position: relative;
    padding-top: calc(var(--fs-nav-height) + 5.5rem);
    padding-bottom: 6.5rem;
    overflow: hidden;
    text-align: center;
}

.hero .container {
    z-index: 1;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(12, 21, 35, 0.55) 0%, rgba(12, 21, 35, 0.72) 50%, rgba(12, 21, 35, 0.82) 100%);
}

.hero-highlights {
    margin-top: 1rem;
}

.hero-scroll {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    margin-top: 3.5rem;
    color: rgba(255, 255, 255, 0.72);
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.2em;
}

.hero-scroll .chevron {
    display: inline-flex;
    flex-direction: column;
    line-height: 1;
}

.hero-scroll .chevron span {
    display: block;
    font-size: 0.9rem;
}

.hero-scroll:hover,
.hero-scroll:focus {
    color: #fff;
    text-decoration: none;
    transform: translateY(4px);
}

.highlight-card {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 0.75rem;
    padding: 1.5rem 1.25rem;
    height: 100%;
    backdrop-filter: blur(6px);
}

.highlight-icon {
    font-size: 1.75rem;
    margin-bottom: 0.75rem;
    color: var(--bs-primary);
}

.section-lead {
    max-width: 680px;
    margin: 0 auto;
    color: var(--bs-gray-700);
}

.project-card {
    display: flex;
    position: relative;
    flex-direction: column;
    border-radius: 1rem;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 12px 30px rgba(18, 38, 63, 0.08);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.project-card:hover,
.project-card:focus-within {
    transform: translateY(-6px);
    box-shadow: 0 16px 40px rgba(18, 38, 63, 0.14);
}

.project-card .btn {
    width: 100%;
}

.project-card__logo {
    background: var(--bs-light);
    padding: 1.75rem;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 200px;
}

.project-card__logo img {
    max-width: min(80%, 220px);
    height: auto;
}

.project-card__body {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 1.75rem;
}

.project-card__title {
    margin-bottom: 0;
}

.project-card__summary {
    flex-grow: 1;
    color: var(--bs-gray-700);
}

.project-card__body .btn-outline-dark {
    color: var(--bs-gray-800);
    border-color: rgba(18, 38, 63, 0.22);
}

.project-card__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 0;
    margin: 0;
    list-style: none;
}

.project-card__tags li {
    background: rgba(var(--bs-primary-rgb), 0.12);
    color: var(--bs-primary);
    font-size: 0.75rem;
    text-transform: uppercase;
    font-weight: 500;
    letter-spacing: 0.05em;
    padding: 0.35rem 0.6rem;
    border-radius: 999px;
}

.feature-card {
    background: #fff;
    border-radius: 1rem;
    padding: 2rem 1.75rem;
    box-shadow: 0 12px 30px rgba(12, 21, 35, 0.08);
}

.feature-card__icon {
    font-size: 1.75rem;
    margin-bottom: 1rem;
    color: var(--bs-primary);
}

.publication-card {
    border-radius: 1rem;
    padding: 1.75rem;
    margin-bottom: 1.5rem;
    background: #fff;
    box-shadow: 0 12px 30px rgba(18, 38, 63, 0.08);
}

.modal-copy {
    color: var(--bs-gray-700);
}

.publication-card__header {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

@media (min-width: 768px) {
    .publication-card__header {
        flex-direction: row;
        align-items: center;
        justify-content: flex-start;
    }

    .publication-card__header .badge {
        margin-right: 0.75rem;
    }
}

.clients-intro {
    max-width: 640px;
    margin: 0 auto 2.5rem;
    text-align: center;
}

.clients-intro__text {
    color: var(--bs-gray-600);
    margin: 0;
    font-size: 1.05rem;
}

.clients-grid {
    margin-top: 1rem;
}

.client-logo {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    padding: 1.75rem 1.5rem;
    border-radius: 1.25rem;
    background: #ffffff;
    box-shadow: 0 20px 38px rgba(15, 37, 63, 0.08);
    text-decoration: none;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    min-height: 220px;
}

.client-logo img {
    max-height: 74px;
    width: auto;
    filter: grayscale(100%);
    opacity: 0.7;
    transition: filter 0.25s ease, opacity 0.25s ease;
}

.client-logo__label {
    font-weight: 600;
    color: var(--bs-gray-800);
    text-align: center;
}

.client-logo__meta {
    font-size: 0.85rem;
    color: var(--bs-gray-600);
    text-align: center;
}

.client-logo::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 1.25rem;
    border: 1px solid rgba(102, 126, 234, 0.22);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.25s ease;
}

.client-logo:hover,
.client-logo:focus {
    transform: translateY(-8px);
    box-shadow: 0 28px 50px rgba(15, 37, 63, 0.12);
}

.client-logo:hover::after,
.client-logo:focus::after {
    opacity: 1;
}

.client-logo:hover img,
.client-logo:focus img {
    filter: grayscale(0%);
    opacity: 1;
}

.contact-card {
    position: relative;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 1.1rem;
    padding: 2rem 1.75rem;
    height: 100%;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.contact-card:hover,
.contact-card:focus-within {
    transform: translateY(-4px);
    background: rgba(255, 255, 255, 0.16);
    box-shadow: 0 18px 38px rgba(0, 0, 0, 0.2);
}

.contact-card a {
    color: #fff;
    font-weight: 600;
}

.contact-card__icon {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    color: var(--bs-primary);
}

.btn-social {
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.footer {
    position: relative;
    overflow: hidden;
    padding: 4rem 0;
    background: linear-gradient(135deg, #132030 0%, #1e3348 55%, #27405b 100%);
}

.footer::before {
    content: "";
    position: absolute;
    top: -140px;
    left: 50%;
    transform: translateX(-50%);
    width: 420px;
    height: 420px;
    background: radial-gradient(circle, rgba(120, 141, 160, 0.22) 0%, rgba(120, 141, 160, 0) 70%);
    opacity: 0.6;
}

.footer-inner {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2.75rem;
    text-align: center;
}

.footer-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    color: rgba(255, 255, 255, 0.75);
    max-width: 320px;
}

.footer-logo {
    width: 88px;
    height: auto;
}

.footer-heading {
    font-size: 1rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    margin-bottom: 1rem;
    color: rgba(255, 255, 255, 0.8);
}

.footer-links,
.footer-social {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    max-width: 320px;
}

.footer-contact {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.footer-contact li {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    color: rgba(255, 255, 255, 0.75);
    font-weight: 500;
}

.footer-contact i {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.65);
    width: 1.5rem;
    text-align: center;
}

.footer-contact a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-contact a:hover,
.footer-contact a:focus {
    color: #ffffff;
}

.footer-social__text {
    color: rgba(255, 255, 255, 0.65);
    margin: 0;
}

.footer-social__list {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.footer-social__link {
    width: 44px;
    height: 44px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.08);
    transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.footer-social__link:hover,
.footer-social__link:focus {
    transform: translateY(-3px);
    background: rgba(255, 255, 255, 0.18);
    border-color: rgba(255, 255, 255, 0.4);
}

@media (min-width: 992px) {
    .footer-inner {
        flex-direction: row;
        align-items: flex-start;
        justify-content: space-between;
        text-align: left;
    }

    .footer-brand,
    .footer-links,
    .footer-social {
        align-items: flex-start;
    }
}

@media (max-width: 767.98px) {
    #mainNav {
        background: rgba(10, 20, 34, 0.96);
    }

    #mainNav .navbar-brand img {
        height: 48px;
    }

    .hero {
        padding-top: calc(var(--fs-nav-height) + 2.5rem);
        padding-bottom: 4rem;
    }

    .hero-highlights {
        margin-top: 2rem;
    }

    .project-card__logo {
        min-height: 160px;
    }

    .project-card__body {
        padding: 1.5rem;
    }

    .feature-card {
        margin-bottom: 1.5rem;
    }
}
