:root {
    /* Dark theme */
    --lc-bg: #000000;
    --lc-navbar: #10151a;
    --lc-surface: #1d242c;
    --lc-surface-raised: #252d36;
    --lc-footer: #101419;
    --lc-text: #f1f5f9;
    --lc-muted: #a9b5c2;
    --lc-border: rgba(226, 232, 240, 0.12);

    /* Brand colors */
    --lc-accent: #4da3c7;
    --lc-accent-hover: #69b7d4;
    --lc-button: #1f5d85;
    --lc-button-hover: #2877a5;
    --lc-button-border: #397fa8;

    /* Light sections and cards */
    --lc-light-bg: #eef1f4;
    --lc-light-bg-alt: #ffffff;
    --lc-light-text: #18202a;
    --lc-light-heading: #13293d;
    --lc-light-muted: #4b5563;
    --lc-card-border: #d9e0e7;
    --lc-card-header-bg: #eef3f7;
    --lc-card-accent: #217ba3;
    --lc-card-gap: 1.5rem;
    --lc-card-radius: 0.75rem;
    --lc-section-padding: clamp(5rem, 8vw, 8rem);

    /* Shadows */
    --lc-shadow: 0 16px 38px rgba(0, 0, 0, 0.34);
    --lc-shadow-hover: 0 20px 46px rgba(0, 0, 0, 0.44);
    --lc-card-shadow: 0 0.85rem 2rem rgba(15, 23, 42, 0.16);
}

[data-bs-theme="dark"] {
    --bs-body-bg: var(--lc-bg);
    --bs-body-color: var(--lc-text);
    --bs-secondary-color: var(--lc-muted);
    --bs-border-color: var(--lc-border);
    --bs-link-color: var(--lc-accent);
    --bs-link-hover-color: var(--lc-accent-hover);
}

/* Document and typography */

html {
    background-color: var(--lc-bg);
    color-scheme: dark;
    scroll-behavior: smooth;
}

body {
    background-color: var(--lc-bg);
    color: var(--lc-text);
    font-family:
        Inter,
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;
    line-height: 1.65;
}

a {
    color: var(--lc-accent);
    text-decoration-thickness: 0.08em;
    text-underline-offset: 0.18em;
}

a:hover {
    color: var(--lc-accent-hover);
}

h1,
h2,
h3,
h4,
h5,
h6 {
    color: var(--lc-text);
    font-weight: 650;
    letter-spacing: -0.025em;
    line-height: 1.18;
}

/* Navigation */

.site-navbar {
    background:
        linear-gradient(
            180deg,
            rgba(255, 255, 255, 0.02),
            transparent
        ),
        var(--lc-navbar);
    border-bottom: 1px solid var(--lc-border);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    padding-block: 0.8rem;
}

.navbar-brand {
    display: flex;
    flex-direction: column;
    margin-right: 2rem;
    text-decoration: none;
}

.brand-name {
    color: var(--lc-text);
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: -0.025em;
    line-height: 1.05;
}

.brand-tagline {
    color: var(--lc-muted);
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    margin-top: 0.25rem;
    text-transform: uppercase;
}

.navbar-nav {
    gap: 0.2rem;
}

.navbar-nav .nav-link {
    border-radius: 0.45rem;
    color: var(--lc-muted);
    font-size: 0.95rem;
    font-weight: 550;
    padding: 0.55rem 0.75rem;
    text-decoration: none;
    transition:
        background-color 160ms ease,
        color 160ms ease;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link:focus,
.navbar-nav .nav-link.active {
    background-color: rgba(77, 163, 199, 0.1);
    color: var(--lc-text);
}

.dropdown-menu {
    background-color: var(--lc-surface-raised);
    border: 1px solid var(--lc-border);
    border-radius: 0.7rem;
    box-shadow: var(--lc-shadow);
    padding: 0.55rem;
}

.dropdown-item {
    border-radius: 0.4rem;
    color: var(--lc-muted);
    padding: 0.55rem 0.75rem;
    text-decoration: none;
}

.dropdown-item:hover,
.dropdown-item:focus,
.dropdown-item.active {
    background-color: rgba(77, 163, 199, 0.14);
    color: var(--lc-text);
}

.dropdown-divider {
    border-color: var(--lc-border);
}

/* Buttons */

.btn-primary {
    --bs-btn-bg: var(--lc-button);
    --bs-btn-border-color: var(--lc-button-border);
    --bs-btn-hover-bg: var(--lc-button-hover);
    --bs-btn-hover-border-color: #4b91b8;
    --bs-btn-active-bg: var(--lc-button-hover);
    --bs-btn-active-border-color: #4b91b8;
    --bs-btn-color: #ffffff;
    --bs-btn-hover-color: #ffffff;

    box-shadow: 0 8px 20px rgba(40, 107, 135, 0.25);
    font-weight: 650;
}

.nav-call-button {
    white-space: nowrap;
}

/* Main content and hero */

#main-content {
    min-height: 55vh;
}

.hero-section {
    isolation: isolate;
    overflow: hidden;
    padding-bottom: clamp(10rem, 14vw, 14rem);
    padding-top: clamp(5rem, 6vw, 6rem);
    position: relative;
}

.hero-section::before {
    background-image: url("../images/network-map.png");
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    content: "";
    inset: 0;
    mix-blend-mode: screen;
    opacity: 0.26;
    pointer-events: none;
    position: absolute;
    z-index: 0;
}

.hero-section > * {
    position: relative;
    z-index: 1;
}

/* Shared light-section structure */

.ways-section,
.technology-areas-section {
    color: var(--lc-light-text);
    padding-block: var(--lc-section-padding);
}

.ways-section {
    background-color: var(--lc-light-bg);
}

.technology-areas-section {
    background-color: var(--lc-light-bg-alt);
}

.ways-section .section-title,
.technology-areas-title {
    color: var(--lc-light-text);
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    margin-bottom: 1rem;
    text-align: center;
}

.ways-section .section-intro,
.technology-areas-intro {
    color: var(--lc-light-muted);
    font-size: 1.125rem;
    line-height: 1.7;
    margin-bottom: 3rem;
    margin-inline: auto;
    max-width: 52rem;
    text-align: center;
}

.ways-section .section-intro p:last-child,
.technology-areas-intro p:last-child {
    margin-bottom: 0;
}

/* Shared card grids */

.ways-card-grid,
.technology-area-grid {
    align-items: stretch;
    display: flex;
    flex-wrap: wrap;
    gap: var(--lc-card-gap);
    justify-content: center;
}

.ways-card-grid > .card,
.technology-area-grid > .card {
    align-self: stretch !important;
    background-color: #ffffff;
    border: 1px solid var(--lc-card-border);
    border-radius: var(--lc-card-radius) !important;
    border-top: 4px solid var(--lc-card-accent);
    box-shadow: var(--lc-card-shadow);
    color: var(--lc-light-text);
    height: auto !important;
    overflow: hidden;
}

.ways-card-grid .card-header,
.technology-area-grid .card-header {
    align-items: flex-start;
    background-color: var(--lc-card-header-bg);
    border-bottom: 1px solid var(--lc-card-border);
    display: flex;
    min-height: 6.25rem;
    padding: 1.5rem 1.75rem 1.1rem;
}

.ways-card-grid .card-header h3,
.ways-card-grid .ways-card-title,
.technology-area-grid .card-header h3,
.technology-area-grid .technology-area-title {
    color: var(--lc-light-heading) !important;
    font-size: 1.4rem;
    font-weight: 700;
    line-height: 1.25;
    margin: 0;
}

.ways-card-grid .card-body,
.technology-area-grid .card-body,
.technology-area-grid .technology-area-body {
    padding: 0.5rem 1.75rem 1.75rem;
}

.ways-card-grid .card-body p,
.technology-area-grid .card-body p,
.technology-area-grid .technology-area-body p {
    color: var(--lc-light-text);
    line-height: 1.65;
}

.ways-card-grid .card-body p:last-child,
.technology-area-grid .card-body p:last-child,
.technology-area-grid .technology-area-body p:last-child {
    margin-bottom: 0;
}

/* Section-specific card counts */

.ways-card-grid > .card {
    flex: 0 0 calc((100% - 3rem) / 3);
    max-width: calc((100% - 3rem) / 3);
}

.technology-area-grid > .card {
    flex: 0 0 calc((100% - 4.5rem) / 4);
    max-width: calc((100% - 4.5rem) / 4);
}

/* Support at Any Stage */

.support-stage-section {
    background-color: #111820;
    color: #ffffff;
    padding-block: clamp(4rem, 7vw, 6.5rem);
}

.support-stage-title {
    color: #ffffff;
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    line-height: 1.15;
    margin: 0;
}

.support-stage-content {
    color: #c7d0da;
    font-size: 1.125rem;
    line-height: 1.7;
}

.support-stage-content p:last-child {
    margin-bottom: 0;
}

/* Final call to action */

.final-cta-section {
    background-color: #000000;
    color: #f5f7fa;
    padding-block: clamp(3.25rem, 5vw, 4.75rem);
}

.final-cta-inner > .row {
    align-items: center;
    row-gap: 1.5rem;
}

.final-cta-copy h2 {
    margin: 0;
    max-width: 32rem;
}

.final-cta-action {
    align-items: center;
    display: flex;
    justify-content: flex-end;
}

.final-cta-action .section-cta-button {
    margin: 0;
    max-width: 100%;
    white-space: normal;
}

/* Reusable content components */

.content-section {
    padding-block: clamp(3.5rem, 7vw, 6.5rem);
}

.content-section-muted {
    background-color: var(--lc-surface);
    border-block: 1px solid var(--lc-border);
}

.service-card,
.image-frame {
    background-color: var(--lc-surface-raised);
    border: 1px solid var(--lc-border);
    border-radius: 0.85rem;
    box-shadow: var(--lc-shadow);
}

.service-card {
    height: 100%;
    padding: 1.75rem;
    transition:
        border-color 180ms ease,
        box-shadow 180ms ease,
        transform 180ms ease;
}

.service-card:hover {
    border-color: rgba(77, 163, 199, 0.48);
    box-shadow: var(--lc-shadow-hover);
    transform: translateY(-3px);
}

.image-frame {
    overflow: hidden;
    padding: 0.45rem;
}

.image-frame img {
    border-radius: 0.55rem;
    display: block;
    height: auto;
    width: 100%;
}

/* About and contact page
-------------------------------------------------- */

.about-contact-section {
    background-color: #eef1f4;
    color: #18202a;
    padding-block: clamp(4rem, 7vw, 7rem);
}

.about-contact-row {
    --bs-gutter-x: clamp(2rem, 5vw, 5rem);
    --bs-gutter-y: 3rem;
    align-items: center;
}

.about-skyline-image {
    border-radius: 0.75rem;
    box-shadow: 0 1.25rem 2.5rem rgba(15, 35, 55, 0.18);
    display: block;
    overflow: hidden;
    width: 100%;
}

.about-skyline-image img {
    display: block;
    height: auto;
    width: 100%;
}

.about-contact-title {
    color: #102b46;
    font-size: clamp(2.25rem, 4vw, 3.5rem);
    line-height: 1.1;
    margin-bottom: 1.5rem;
}

.about-contact-copy {
    color: #30475d;
    font-size: 1.05rem;
    line-height: 1.75;
}

.about-contact-copy p {
    margin-bottom: 1.35rem;
}

.about-contact-copy p:last-child {
    margin-bottom: 0;
}

/* Footer */

.site-footer {
    background-color: var(--lc-footer);
    border-top: 1px solid var(--lc-border);
    color: var(--lc-muted);
    padding-block: 1.75rem 1.15rem;
}

.site-footer a {
    color: var(--lc-text);
}

.site-footer a:hover {
    color: var(--lc-accent-hover);
}

.footer-brand {
    color: var(--lc-text);
    font-size: 1.2rem;
    font-weight: 700;
}

.footer-summary {
    max-width: 34rem;
}

.site-footer hr {
    border-color: var(--lc-border);
    margin-block: 1.25rem 0.85rem;
}

.copyright {
    color: var(--lc-muted);
    font-size: 0.875rem;
}

/* Responsive adjustments */

@media (min-width: 992px) {
    .hero-section p {
        hyphens: none;
        text-align: justify;
        text-align-last: left;
        text-justify: inter-word;
    }
}

@media (max-width: 991.98px) {
    .navbar-collapse {
        padding-top: 1rem;
    }

    .navbar-nav {
        align-items: stretch !important;
        gap: 0.25rem;
    }

    .nav-call-button {
        margin-top: 0.9rem;
        width: 100%;
    }

    .ways-card-grid > .card,
    .technology-area-grid > .card {
        flex-basis: calc((100% - var(--lc-card-gap)) / 2);
        max-width: calc((100% - var(--lc-card-gap)) / 2);
    }

    .support-stage-title {
        margin-bottom: 1.5rem;
    }
}

/* About-page contact panel
-------------------------------------------------- */

.contact-panel-section {
    background-color: #000;
    color: #f4f7fa;
    height: auto;
    min-height: 0;
    padding-block: clamp(3.5rem, 6vw, 5.5rem);
}

.contact-panel-row {
    --bs-gutter-x: clamp(2rem, 6vw, 6rem);
    --bs-gutter-y: 2.5rem;
    align-items: center;
}

.contact-panel-title {
    color: #fff;
    font-size: clamp(2rem, 3vw, 2.75rem);
    line-height: 1.15;
    margin-bottom: 1rem;
}

.contact-panel-copy {
    color: #c7d3df;
    font-size: 1.05rem;
    line-height: 1.7;
    max-width: 44rem;
}

.contact-panel-copy p:last-child {
    margin-bottom: 0;
}

.contact-panel-actions {
    align-items: stretch;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.contact-panel-actions .btn {
    font-weight: 700;
    min-width: 15rem;
    padding: 0.8rem 1.25rem;
    text-align: center;
}

.contact-email-button {
    background-color: transparent;
    border-color: #5d7893;
    color: #f4f7fa;
}

.contact-email-button:hover,
.contact-email-button:focus-visible {
    background-color: #182b3c;
    border-color: #7f9bb5;
    color: #fff;
}

@media (min-width: 992px) {
    .contact-panel-actions {
        align-items: flex-end;
    }
}

@media (max-width: 767.98px) {
    .final-cta-action {
        justify-content: flex-start;
    }
}

@media (max-width: 575.98px) {
    .ways-card-grid > .card,
    .technology-area-grid > .card {
        flex-basis: 100%;
        max-width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
    }
}

@media (min-width: 992px) {
    .technology-area-grid .card-header {
        height: 9.75rem;
        min-height: 9.75rem;
    }
}

/* Hero fades */
/* Temporary hero animation experiment */

.hero-section::before {
    animation: hero-image-settle 3.6s ease-in-out both;
}

.hero-text {
    animation: hero-text-enter 1.8s ease-out 1.6s both;
    background-color: rgb(0 0 0 / 88%);
    border: 1px solid rgb(255 255 255 / 10%);
    border-radius: 0.5rem;
    box-shadow: 0 1.25rem 3rem rgb(0 0 0 / 35%);
    padding: clamp(1.5rem, 3vw, 2.5rem);
}

@keyframes hero-image-settle {
    0%,
    40% {
        opacity: 1;
    }

    100% {
        opacity: 0.36;
    }
}

@keyframes hero-text-enter {
    from {
        opacity: 0;
        transform: translateY(0.5rem);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (prefers-reduced-motion: reduce) {
    .hero-section::before,
    .hero-text {
        animation: none;
    }

    .hero-section::before {
        opacity: 0.36;
    }

    .hero-text {
        opacity: 1;
        transform: none;
    }
}

header.sticky-top {
    z-index: 1020;
}
header.sticky-top {
    box-shadow: 0 0.35rem 1rem rgb(0 0 0 / 22%);
    z-index: 1020;
}

#how-we-help,
#technology-areas {
    scroll-margin-top: 6rem;
}
