/********** Template CSS **********/
/* Color tokens (--primary, --secondary, --light, --dark) now live in
   colors.css, loaded before this file, so every color change happens in
   exactly one place. */

/* overflow-x lives on body only (below) - setting it on html too makes
   html and body each their own scroll container, causing a double
   scrollbar in some browsers. */

/* Scale base type up on very large displays so it doesn't look tiny at
   2560+/3840 widths. Base stays the browser default (16px) until 1920px. */
@media (min-width: 1920px) {
    html { font-size: clamp(16px, calc(16px + (100vw - 1920px) * 0.00208), 20px); }
}

.skip-link {
    position: fixed;
    top: -60px;
    left: 16px;
    z-index: 2000;
    padding: 10px 20px;
    border-radius: 8px;
    background: var(--primary);
    color: #FFFFFF;
    font-weight: 600;
    text-decoration: none;
    transition: top .2s ease;
}

.skip-link:focus {
    top: 16px;
    color: #FFFFFF;
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: .001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .001ms !important;
        scroll-behavior: auto !important;
    }

    .tech-marquee-track,
    .team-marquee-track {
        animation: none !important;
    }
}

/* Visible focus ring everywhere, both themes — safety net for custom
   components (.work-card, .nav-link, icon buttons) that don't already
   get one from Bootstrap's defaults. */
a:focus-visible,
button:focus-visible,
.work-card:focus-visible,
.nav-link:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

body {
    background: var(--bg-body);
    color: var(--text-body);
    transition: background-color .3s ease, color .3s ease;
    /* html's overflow-x:hidden above doesn't reliably clip a closed,
       position:fixed + transform:translateX(100%) element on mobile
       Safari/Chrome - the mobile nav sheet (.sy-sheet) sits one full
       viewport-width off to the right when closed, which was expanding
       document scrollWidth and letting the page pan/cut content on the
       right on every mobile page. */
    overflow-x: hidden;
}

/*** Global mobile responsiveness safety net ***
   Many sections use fixed Bootstrap utilities (px-5, py-5, display-1, etc.)
   that don't scale down on their own below the lg breakpoint, which was
   causing edge-to-edge text with no side padding on small screens, and
   headings sized for desktop wrapping/overlapping on narrow viewports. */
@media (max-width: 767.98px) {
    .px-5 {
        padding-left: 1.25rem !important;
        padding-right: 1.25rem !important;
    }

    .py-5 {
        padding-top: 1.25rem !important;
        padding-bottom: 1.25rem !important;
    }

    .display-1 {
        font-size: calc(1.5rem + 3vw);
    }

    .display-4 {
        font-size: calc(1.25rem + 1.5vw);
    }

    h1, .h1 {
        font-size: calc(1.3rem + 1vw);
    }

    .section-title h1 {
        font-size: calc(1.3rem + 1.2vw);
    }

    p, .lead {
        word-break: break-word;
    }
}

@media (max-width: 575.98px) {
    .px-5 {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }

    .py-5 {
        padding-top: 1.25rem !important;
        padding-bottom: 1.25rem !important;
    }

    .display-1 {
        font-size: calc(1.3rem + 3vw);
    }

    h1, .h1 {
        font-size: calc(1.15rem + 2vw);
    }
}

.bg-light {
    background: var(--bg-section) !important;
}

.bg-white {
    background: var(--bg-surface) !important;
}

.text-muted {
    color: var(--text-muted) !important;
}

.form-control,
.form-select {
    color: var(--text-body);
}

.form-control:focus,
.form-select:focus {
    color: var(--text-body);
}

.form-control::placeholder {
    color: var(--text-muted);
    opacity: 1;
}

.theme-toggle {
    width: 42px;
    height: 42px;
    border: 1px solid rgba(var(--primary-rgb), .35);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: var(--bg-surface);
    color: var(--primary);
    font-size: 16px;
    box-shadow: 0 2px 10px rgba(var(--primary-rgb), .2);
    animation: theme-toggle-glow 2.8s ease-in-out infinite;
    transition: transform .3s cubic-bezier(.34, 1.56, .64, 1), background .3s ease, color .3s ease;
}

.theme-toggle i {
    transition: transform .4s cubic-bezier(.34, 1.56, .64, 1);
}

@media (hover: hover) {
    .theme-toggle:hover {
        background: var(--primary);
        color: #FFFFFF;
        transform: translateY(-4px) scale(1.06);
    }

    .theme-toggle:hover i {
        transform: rotate(-25deg);
    }
}

.theme-toggle:active {
    transform: scale(.92);
}

@keyframes theme-toggle-glow {
    0%, 100% {
        box-shadow: 0 2px 10px rgba(var(--primary-rgb), .2), 0 0 0 0 rgba(var(--primary-rgb), .35);
    }
    50% {
        box-shadow: 0 2px 12px rgba(var(--primary-rgb), .3), 0 0 0 8px rgba(var(--primary-rgb), 0);
    }
}



/*** Footer brand panel ***/
.footer-brand-panel {
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(circle at 15% 15%, rgba(255, 255, 255, .16) 0%, rgba(255, 255, 255, 0) 45%),
        radial-gradient(circle at 85% 85%, rgba(255, 255, 255, .12) 0%, rgba(255, 255, 255, 0) 50%),
        linear-gradient(135deg, var(--secondary) 0%, var(--primary) 60%, var(--dark) 130%);
}

.footer-brand-panel::before,
.footer-brand-panel::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, .08);
    pointer-events: none;
}

.footer-brand-panel::before {
    width: 220px;
    height: 220px;
    top: -90px;
    right: -70px;
}

.footer-brand-panel::after {
    width: 150px;
    height: 150px;
    bottom: -70px;
    left: -50px;
    background: rgba(255, 255, 255, .06);
}

.footer-brand-panel .navbar-brand img {
    position: relative;
    z-index: 1;
    padding: 10px;
    background: rgba(255, 255, 255, .14);
    border: 1px solid rgba(255, 255, 255, .3);
    border-radius: 16px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, .2);
}


/*** Skeleton loader (universal — used anywhere API data hasn't arrived yet) ***/
.skeleton {
    display: inline-block;
    background: linear-gradient(90deg, var(--border-color) 25%, rgba(var(--primary-rgb), .18) 50%, var(--border-color) 75%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.4s ease-in-out infinite;
}

@keyframes skeleton-shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}


/*** Section Divider ***/
.section-divider {
    height: 1px;
    margin: 0 auto;
    background: linear-gradient(90deg, rgba(var(--primary-rgb), 0) 0%, rgba(var(--primary-rgb), .35) 50%, rgba(var(--primary-rgb), 0) 100%);
}


/*** Spinner ***/
.spinner {
    width: 40px;
    height: 40px;
    background: var(--primary);
    margin: 100px auto;
    -webkit-animation: sk-rotateplane 1.2s infinite ease-in-out;
    animation: sk-rotateplane 1.2s infinite ease-in-out;
}

@-webkit-keyframes sk-rotateplane {
    0% {
        -webkit-transform: perspective(120px)
    }
    50% {
        -webkit-transform: perspective(120px) rotateY(180deg)
    }
    100% {
        -webkit-transform: perspective(120px) rotateY(180deg) rotateX(180deg)
    }
}

@keyframes sk-rotateplane {
    0% {
        transform: perspective(120px) rotateX(0deg) rotateY(0deg);
        -webkit-transform: perspective(120px) rotateX(0deg) rotateY(0deg)
    }
    50% {
        transform: perspective(120px) rotateX(-180.1deg) rotateY(0deg);
        -webkit-transform: perspective(120px) rotateX(-180.1deg) rotateY(0deg)
    }
    100% {
        transform: perspective(120px) rotateX(-180deg) rotateY(-179.9deg);
        -webkit-transform: perspective(120px) rotateX(-180deg) rotateY(-179.9deg);
    }
}

#spinner {
    opacity: 0;
    visibility: hidden;
    transition: opacity .5s ease-out, visibility 0s linear .5s;
    z-index: 99999;
}

#spinner.show {
    transition: opacity .5s ease-out, visibility 0s linear 0s;
    visibility: visible;
    opacity: 1;
}


/*** Heading ***/
/* Bootstrap's compiled CSS hardcodes heading color to the fixed brand
   --dark token (fine on a light background, invisible once the page
   itself goes dark). Make headings follow the theme's body text color
   instead, same as every other piece of text. */
h1, h2, h3, h4, h5, h6 {
    color: var(--text-body);
}

h1,
h2,
.fw-bold {
    font-weight: 800 !important;
}

h3,
h4,
.fw-semi-bold {
    font-weight: 700 !important;
}

h5,
h6,
.fw-medium {
    font-weight: 600 !important;
}


/*** Button ***/
.btn {
    font-family: 'Nunito', sans-serif;
    font-weight: 600;
    transition: .5s, transform .25s ease, box-shadow .25s ease;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn:active {
    transform: translateY(0) scale(.98);
}

.btn:focus-visible,
a:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

.btn-primary,
.btn-secondary {
    color: #FFFFFF;
    box-shadow: inset 0 0 0 50px transparent;
}

.btn-primary:hover {
    box-shadow: inset 0 0 0 0 var(--primary);
}

.btn-secondary:hover {
    box-shadow: inset 0 0 0 0 var(--secondary);
}

.btn-square {
    width: 36px;
    height: 36px;
}

.btn-sm-square {
    width: 30px;
    height: 30px;
}

.btn-lg-square {
    width: 48px;
    height: 48px;
}

.btn-square,
.btn-sm-square,
.btn-lg-square {
    padding-left: 0;
    padding-right: 0;
    text-align: center;
}


/*** Navbar ***/
.navbar-dark {
    transition: background-color .4s ease, box-shadow .4s ease;
}

/* Transparent navbar overlays the hero image — a dark scrim keeps the
   white links/logo readable no matter what's in the photo underneath.
   On mobile the same bar also holds the full expanded menu, so it gets
   a solid, fully opaque background instead of a scrim that fades out. */
@media (min-width: 992px) {
    .navbar-dark:not(.sticky-top) {
        background: linear-gradient(to bottom, rgba(5, 15, 20, .65) 0%, rgba(5, 15, 20, .3) 70%, rgba(5, 15, 20, 0) 100%) !important;
    }
}

@media (max-width: 991.98px) {
    .navbar-dark:not(.sticky-top) {
        background: var(--bg-navbar) !important;
    }
}

.navbar-dark .navbar-nav {
    align-items: center;
}

@media (max-width: 991.98px) {
    .navbar-dark .navbar-nav {
        align-items: stretch;
    }

    /* Each link/toggle fills the row's full width (text still reads
       left-to-right) instead of shrink-wrapping to its own text, which
       left a wide block of bare background to the right of a short
       label like "Home". */
    .navbar-dark .navbar-nav .nav-link,
    .navbar-dark .navbar-nav .nav-item.dropdown {
        width: 100%;
        justify-content: flex-start;
    }
}

.navbar-dark .navbar-nav .nav-link {
    font-family: 'Nunito', sans-serif;
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    margin: 0 2px;
    padding: 10px 20px;
    color: #FFFFFF;
    font-size: 16px;
    font-weight: 600;
    line-height: 1;
    outline: none;
    transition: color .35s ease;
    text-shadow: 0 1px 4px rgba(0, 0, 0, .45);
}

.sticky-top.navbar-dark .navbar-nav .nav-link {
    color: var(--text-body);
    text-shadow: none;
}

/* Hover/active pill — a snug capsule behind the label, not the full link box. */
.navbar-dark .navbar-nav .nav-link::before {
    content: "";
    position: absolute;
    z-index: -1;
    inset: 0;
    border-radius: 999px;
    background: var(--primary);
    opacity: 0;
    transform: scale(.82);
    transition: opacity .35s ease, transform .4s cubic-bezier(.34, 1.56, .64, 1), box-shadow .35s ease;
}

.navbar-dark .navbar-nav .nav-link:hover::before {
    opacity: .14;
    transform: scale(1);
}

.navbar-dark .navbar-nav .nav-link.active::before {
    opacity: 1;
    transform: scale(1);
    box-shadow: 0 6px 16px -4px rgba(var(--primary-rgb), .55);
}

.navbar-dark .navbar-nav .nav-link.active:hover::before {
    opacity: 1;
}

.navbar-dark .navbar-nav .nav-link.active {
    color: #FFFFFF !important;
    text-shadow: none;
}

.navbar-dark .navbar-brand .h1 {
    color: #FFFFFF;
    text-shadow: 0 1px 4px rgba(0, 0, 0, .45);
}


.sticky-top.navbar-dark .navbar-brand .h1 {
    text-shadow: none;
}

.navbar-brand-tagline {
    display: block;
    align-self: stretch;
    width: 100%;
    box-sizing: border-box;
    margin-top: 6px;
    padding: 4px 14px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, .35);
    border-radius: 50px;
    background: rgba(255, 255, 255, .08);
    backdrop-filter: blur(4px);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .06em;
    word-spacing: normal;
    text-transform: uppercase;
    /* Solid white, not translucent — this pill always sits on a dark
       photo/overlay backdrop (hero image or bg-primary), and the
       alpha-blended color measured under 5:1 contrast in spots. */
    color: #FFFFFF;
}

.sticky-top.navbar-dark .navbar-brand-tagline {
    color: var(--text-muted);
    border-color: var(--border-color);
    /* bg-section (a light mint tint) measured 4.22:1 with --text-muted —
       under the 4.5:1 AA threshold. bg-surface (white in light theme,
       dark surface in dark theme) measures 4.69:1. */
    background: var(--bg-surface);
}

@media (max-width: 767.98px) {
    .navbar-brand-tagline {
        display: none;
    }
}


.navbar-dark .navbar-toggler {
    color: var(--primary) !important;
    border: none;
    box-shadow: none !important;
}

.navbar-dark .dropdown-menu {
    background: var(--bg-surface) !important;
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 10px;
    box-shadow: 0 20px 44px -12px rgba(0, 0, 0, .3);
}

.navbar-dark .dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-body);
    border-radius: 10px;
    padding: 10px 14px;
    font-weight: 600;
    transition: background .25s ease, color .25s ease, transform .25s ease;
}

.navbar-dark .dropdown-item-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: rgba(var(--primary-rgb), .12);
    color: var(--primary);
    font-size: 14px;
}

.navbar-dark .dropdown-item:hover,
.navbar-dark .dropdown-item.active {
    background: rgba(var(--primary-rgb), .1);
    color: var(--primary);
    transform: translateX(3px);
}

.navbar-dark .dropdown-item:hover .dropdown-item-icon,
.navbar-dark .dropdown-item.active .dropdown-item-icon {
    background: var(--primary);
    color: #FFFFFF;
}

/* Services mega-menu: a Bootstrap dropdown-menu, sized up on large
   screens; Bootstrap/Popper handles toggling and viewport placement. */
@media (min-width: 992px) {
    .dropdown-menu-mega {
        width: min(720px, 92vw);
        overflow: hidden;
        position: fixed !important;
        top: var(--navbar-bottom, 92px) !important;
        left: 50% !important;
        right: auto !important;
        transform: translateX(-50%) !important;
        margin: 0 !important;
    }
}

@media (max-width: 991.98px) {
    .dropdown-menu-mega {
        width: min(720px, 92vw);
        overflow: hidden;
    }
}

.mega-menu-list {
    position: relative;
    padding: 14px;
    max-height: 420px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

/* Hints there's more to scroll instead of the list just cutting off. */
.mega-menu-list::after {
    content: "";
    position: sticky;
    bottom: 0;
    left: 0;
    display: block;
    height: 24px;
    margin-top: -24px;
    background: linear-gradient(to bottom, transparent, var(--bg-surface));
    pointer-events: none;
}

@media (min-width: 992px) {
    .mega-menu-list {
        border-right: 1px solid var(--border-color);
    }
}

.mega-menu-list-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 12px;
    color: var(--text-body);
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: background .25s ease, color .25s ease;
}

.mega-menu-list-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 9px;
    background: linear-gradient(135deg, var(--secondary), var(--primary));
    color: #FFFFFF;
    font-size: 14px;
    flex-shrink: 0;
}

.mega-menu-list-chevron {
    font-size: 11px;
    opacity: 0;
    transform: translateX(-4px);
    transition: opacity .25s ease, transform .25s ease;
}

.mega-menu-list-item:hover,
.mega-menu-list-item.active {
    background: rgba(var(--primary-rgb), .1);
    color: var(--primary);
}

.mega-menu-list-item:hover .mega-menu-list-chevron,
.mega-menu-list-item.active .mega-menu-list-chevron {
    opacity: 1;
    transform: translateX(0);
}

.mega-menu-detail {
    padding: 28px;
    background: linear-gradient(160deg, rgba(var(--primary-rgb), .06) 0%, transparent 60%);
}

.mega-menu-detail-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--secondary), var(--primary));
    color: #FFFFFF;
    font-size: 20px;
    margin-bottom: 16px;
}

.mega-menu-detail h5 {
    color: var(--text-body);
    margin-bottom: 8px;
}

.mega-menu-detail p {
    color: var(--text-muted);
    font-size: 14px;
    margin-bottom: 16px;
}

.mega-menu-detail-list {
    list-style: none;
    padding: 0;
    margin: 0 0 20px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px 16px;
}

.mega-menu-detail-list li {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-body);
}

.mega-menu-detail-list li i {
    color: var(--primary);
}

.mega-menu-detail-link {
    display: inline-flex;
    align-items: center;
    font-weight: 600;
    color: var(--primary);
    text-decoration: none;
}

@media (max-width: 991.98px) {
    .sticky-top.navbar-dark {
        position: relative;
        background: var(--bg-navbar);
        box-shadow: 0 2px 12px rgba(var(--primary-rgb), .15);
    }

    .navbar-dark .navbar-nav .nav-link,
    .navbar-dark .navbar-nav .nav-link.show,
    .sticky-top.navbar-dark .navbar-nav .nav-link {
        display: flex;
        padding: 10px 14px;
        margin: 2px 0;
        color: var(--text-body);
        text-shadow: none;
    }

    .navbar-dark .navbar-brand .h1 {
        color: var(--primary);
        text-shadow: none;
    }

    :root[data-theme="dark"] .navbar-dark .navbar-brand .h1 {
        color: #FFFFFF;
    }

    .navbar-dark .navbar-brand img {
        filter: none;
    }

    .mega-menu-list {
        scrollbar-width: thin;
    }

    .mega-menu-list::-webkit-scrollbar {
        width: 6px;
    }

    .mega-menu-list::-webkit-scrollbar-thumb {
        background: var(--border-color);
        border-radius: 999px;
    }

    /* Bootstrap dropdowns float as an absolute overlay by default; keep
       that. Height/scroll is handled by .mega-menu-list alone (see
       below) — this must NOT also scroll, or you get two scrollbars
       nested inside each other. */
    .navbar-nav .dropdown-menu {
        position: absolute;
        top: 100%;
        left: 0;
        right: auto;
        z-index: 1050;
        width: calc(100vw - 48px);
        max-width: 420px;
        overflow: visible;
        box-shadow: 0 16px 30px -10px rgba(0, 0, 0, .3);
        border: 1px solid var(--border-color);
        border-radius: 12px;
        margin-top: 8px;
    }

    .mega-menu-list {
        max-height: min(60vh, 420px);
    }
}

@media (min-width: 992px) {
    .navbar-dark {
        position: absolute;
        width: 100%;
        top: 0;
        left: 0;
        border-bottom: 1px solid rgba(256, 256, 256, .1);
        z-index: 999;
    }
    
    .sticky-top.navbar-dark {
        position: fixed;
        background: var(--bg-navbar);
        box-shadow: 0 2px 16px rgba(var(--primary-rgb), .18);
    }

    .sticky-top.navbar-dark .navbar-brand .h1 {
        color: var(--primary);
    }
}


/*** Hero ***/
.hero-static {
    background: var(--bg-hero-fallback);
}

.carousel-caption {
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(9, 30, 62, .7);
    z-index: 1;
}

@media (max-width: 576px) {
    .carousel-caption h5 {
        font-size: 14px;
        font-weight: 500 !important;
    }

    .carousel-caption h1 {
        font-size: 30px;
        font-weight: 600 !important;
    }
}

.carousel-control-prev,
.carousel-control-next {
    width: 10%;
}

.carousel-control-prev-icon,
.carousel-control-next-icon {
    width: 3rem;
    height: 3rem;
}


/*** Section Title ***/
.section-title::before {
    position: absolute;
    content: "";
    width: 150px;
    height: 5px;
    left: 0;
    bottom: 0;
    background: var(--primary);
    border-radius: 2px;
}

.section-title.text-center::before {
    left: 50%;
    margin-left: -75px;
}

.section-title.section-title-sm::before {
    width: 90px;
    height: 3px;
}

.section-title.section-title-sm h3 {
    font-size: 22px;
    white-space: nowrap;
}

.section-title::after {
    position: absolute;
    content: "";
    width: 6px;
    height: 5px;
    bottom: 0px;
    background: #FFFFFF;
    -webkit-animation: section-title-run 5s infinite linear;
    animation: section-title-run 5s infinite linear;
}

.section-title.section-title-sm::after {
    width: 4px;
    height: 3px;
}

.section-title.text-center::after {
    -webkit-animation: section-title-run-center 5s infinite linear;
    animation: section-title-run-center 5s infinite linear;
}

.section-title.section-title-sm::after {
    -webkit-animation: section-title-run-sm 5s infinite linear;
    animation: section-title-run-sm 5s infinite linear;
}

@-webkit-keyframes section-title-run {
    0% {left: 0; } 50% { left : 145px; } 100% { left: 0; }
}

@-webkit-keyframes section-title-run-center {
    0% { left: 50%; margin-left: -75px; } 50% { left : 50%; margin-left: 45px; } 100% { left: 50%; margin-left: -75px; }
}

@-webkit-keyframes section-title-run-sm {
    0% {left: 0; } 50% { left : 85px; } 100% { left: 0; }
}


/*** Service ***/
.service-card {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    padding: 40px 32px;
    border-radius: 18px;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 10px rgba(0, 0, 0, .04);
    transition: transform .45s cubic-bezier(.22, 1, .36, 1), box-shadow .45s ease, border-color .45s ease;
}

.legal-prose h3 {
    margin-top: 2em;
    margin-bottom: .75em;
    font-size: 1.25rem;
}

.legal-prose p {
    color: var(--text-body);
    line-height: 1.75;
}

/*** Estimate wizard ***/
.estimate-wizard .progress {
    background: rgba(255, 255, 255, .25);
}

.estimate-wizard-summary {
    padding: 16px;
    border-radius: 10px;
    background: rgba(255, 255, 255, .1);
}

.estimate-wizard-done {
    padding: 24px 0;
}

/*** Work / Insights cards (case studies, blog) ***/
.work-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-radius: 18px;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 10px rgba(0, 0, 0, .04);
    transition: transform .35s cubic-bezier(.22, 1, .36, 1), box-shadow .35s ease, border-color .35s ease;
    color: var(--text-body);
}

.work-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 36px rgba(0, 0, 0, .12);
    border-color: var(--primary);
    color: var(--text-body);
}

.work-card-media {
    aspect-ratio: 16 / 10;
    overflow: hidden;
}

.work-card-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .5s ease;
}

.work-card:hover .work-card-media img {
    transform: scale(1.05);
}

.work-card-body {
    padding: 24px;
}

.work-card-tag {
    display: block;
    margin-bottom: 8px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--primary);
}

@media (max-width: 575.98px) {
    .service-card {
        padding: 26px 20px;
    }

    .service-card::before {
        top: 54px;
        left: 50px;
    }
}

/* Compact service/process cards at the 2-col mobile breakpoint — plan §10.1
   target was to roughly halve homepage height on phones. Shorter padding,
   smaller icon, and a 2-line clamp on the description keep each card
   short instead of growing to fit a full paragraph. */
@media (max-width: 767.98px) {
    .service-card {
        padding: 20px 16px;
    }

    .service-card .service-icon {
        width: 44px;
        height: 44px;
        margin-bottom: 16px !important;
    }

    .service-card .service-icon i {
        font-size: 20px;
    }

    .service-card h4 {
        font-size: 16px;
        margin-bottom: 8px !important;
    }

    .service-card p {
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
        font-size: 13px;
        margin-bottom: 12px !important;
    }

    .service-card-link {
        font-size: 13px;
    }
}

/* Hover fill — a teal disc grows from the icon's position to cover the
   card, so the color change itself reads as the hover cue. */
.service-card::before {
    content: "";
    position: absolute;
    z-index: -1;
    top: 68px;
    left: 62px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--secondary), var(--primary));
    transform: scale(0);
    transform-origin: center;
    transition: transform .6s cubic-bezier(.65, 0, .35, 1);
}

.service-card-glow {
    position: absolute;
    top: -60px;
    right: -60px;
    width: 180px;
    height: 180px;
    border-radius: 50%;
    background: radial-gradient(circle, var(--primary) 0%, transparent 72%);
    opacity: .16;
    transition: opacity .35s ease;
    pointer-events: none;
}

.service-card h4,
.service-card p {
    color: var(--text-body);
    position: relative;
    transition: color .4s ease .05s;
}

.service-card p {
    color: var(--text-muted);
}

.service-card .service-icon {
    position: relative;
    margin-bottom: 26px;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--service-color), var(--primary));
    border-radius: 16px;
    box-shadow: 0 10px 22px -8px var(--service-color);
    transition: transform .45s cubic-bezier(.34, 1.56, .64, 1), background .4s ease, box-shadow .4s ease;
}

.service-card .service-icon i {
    color: #FFFFFF;
    font-size: 24px;
}

.service-card-link {
    position: relative;
    display: inline-flex;
    align-items: center;
    font-weight: 600;
    color: var(--service-color);
    transition: color .4s ease .05s;
}

.service-card-link i {
    transition: transform .35s cubic-bezier(.34, 1.56, .64, 1);
}

@media (hover: hover) {
    .service-card:hover {
        transform: translateY(-10px);
        border-color: var(--service-color);
        box-shadow: 0 24px 44px -16px rgba(var(--primary-rgb), .35);
    }

    .service-card:hover::before {
        transform: scale(40);
    }

    .service-card:hover .service-card-glow {
        opacity: 0;
    }

    .service-card:hover h4,
    .service-card:hover p,
    .service-card:hover .service-card-link {
        color: #FFFFFF;
    }

    .service-card:hover .service-icon {
        background: rgba(255, 255, 255, .18);
        box-shadow: none;
        transform: rotate(-8deg) scale(1.08);
    }

    .service-card:hover .service-card-link i {
        transform: translateX(5px);
    }
}


/*** Testimonial ***/
.testimonial-carousel .owl-dots {
    margin-top: 15px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}

.testimonial-carousel .owl-dot {
    position: relative;
    display: inline-block;
    margin: 0 5px;
    width: 15px;
    height: 15px;
    background: #DDDDDD;
    border-radius: 2px;
    transition: .5s;
}

.testimonial-carousel .owl-dot.active {
    width: 30px;
    background: var(--primary);
}

.testimonial-carousel .owl-item.center {
    position: relative;
    z-index: 1;
}

.testimonial-carousel .owl-item .testimonial-item {
    transition: .5s;
}

.testimonial-carousel .owl-item.center .testimonial-item {
    background: var(--bg-surface) !important;
    box-shadow: 0 0 30px rgba(0, 0, 0, .15);
    border: 1px solid var(--border-color);
}


/* Team marquee — same always-forward, never-jumps technique as the tech
   stack marquee below: duplicate the list once, translate exactly -50%,
   linear+infinite. Owl Carousel's loop:true (clone-based) visibly
   snapped backward when it miscalculated the clone boundary; this can't
   glitch the same way since there's no clone recalculation involved. */
.team-marquee-wrap {
    overflow: hidden;
    -webkit-mask-image: linear-gradient(to right, transparent, #000 4%, #000 96%, transparent);
    mask-image: linear-gradient(to right, transparent, #000 4%, #000 96%, transparent);
}

.team-marquee-track {
    display: flex;
    align-items: stretch;
    width: max-content;
    animation: team-marquee 32s linear infinite;
}

.team-marquee-wrap:hover .team-marquee-track {
    animation-play-state: paused;
}

.team-marquee-item {
    flex-shrink: 0;
    width: 320px;
    padding: 0 16px;
}

@keyframes team-marquee {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}

/*** Tech Stack Marquee ***/
.tech-marquee-wrap {
    overflow: hidden;
    -webkit-mask-image: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent);
    mask-image: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent);
}

.tech-marquee-track {
    display: flex;
    align-items: center;
    width: max-content;
    animation: tech-marquee 28s linear infinite;
}

.tech-marquee-wrap:hover .tech-marquee-track {
    animation-play-state: paused;
}

.tech-marquee-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    width: 130px;
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 600;
}

.tech-marquee-item i {
    font-size: 42px;
    color: var(--text-body);
}

@keyframes tech-marquee {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}

/*** Team ***/
.team-item {
    position: relative;
    border-radius: 18px !important;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 16px rgba(0, 0, 0, .05);
    transition: transform .5s cubic-bezier(.22, 1, .36, 1), box-shadow .5s ease, border-color .5s ease;
}

.team-img {
    border-radius: 18px 18px 0 0;
}

.team-social {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding-bottom: 24px;
    gap: 8px;
    background: linear-gradient(to top, rgba(9, 30, 62, .85) 0%, rgba(9, 30, 62, .1) 55%, transparent 100%);
    opacity: 0;
    transition: opacity .4s ease;
}

.team-social a.btn {
    position: relative;
    transform: translateY(16px) scale(.8);
    opacity: 0;
    transition: transform .4s cubic-bezier(.34, 1.56, .64, 1), opacity .3s ease, background .25s ease;
}

.team-item .team-img img {
    aspect-ratio: 3 / 4;
    width: 100%;
    object-fit: cover;
    transition: transform .6s cubic-bezier(.22, 1, .36, 1);
}

@media (max-width: 767.98px) {
    .team-item .team-img img {
        aspect-ratio: 1 / 1;
    }

    .team-item-info {
        padding: 16px 12px !important;
    }

    .team-item h4 {
        font-size: 15px;
        min-height: auto !important;
    }

    .team-item-role {
        font-size: 11px;
    }
}

.team-item h4 {
    transition: color .35s ease;
}

/* text-primary (teal) reads fine on the light card background in light
   mode, but low-contrast against a dark card in dark mode — use the
   theme's body text color (white) there instead. */
:root[data-theme="dark"] .team-item h4 {
    color: var(--text-body) !important;
}

:root[data-theme="dark"] .team-item-role {
    color: var(--text-muted);
}

:root[data-theme="dark"] .testimonial-item h4 {
    color: var(--text-body) !important;
}

.team-item-role {
    position: relative;
    display: inline-block;
    padding-bottom: 10px;
}

.team-item-role::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 50%;
    height: 2px;
    width: 24px;
    background: var(--primary);
    transform: translateX(-50%) scaleX(1);
    transition: width .35s ease;
}

@media (hover: hover) {
    .team-item:hover {
        transform: translateY(-8px);
        border-color: var(--primary);
        box-shadow: 0 24px 44px -20px rgba(var(--primary-rgb), .35);
    }

    .team-item:hover .team-social {
        opacity: 1;
    }

    .team-item:hover .team-social a.btn {
        transform: translateY(0) scale(1);
        opacity: 1;
    }

    .team-item:hover .team-social a.btn:nth-child(1) { transition-delay: 0s; }
    .team-item:hover .team-social a.btn:nth-child(2) { transition-delay: .06s; }
    .team-item:hover .team-social a.btn:nth-child(3) { transition-delay: .12s; }
    .team-item:hover .team-social a.btn:nth-child(4) { transition-delay: .18s; }

    .team-item:hover .team-img img {
        transform: scale(1.1);
    }

    .team-item:hover .team-item-role::after {
        width: 44px;
    }
}


/*** Miscellaneous ***/
@media (min-width: 991.98px) {
    .facts {
        position: relative;
        margin-top: -75px;
        z-index: 1;
    }
}

.back-to-top {
    position: fixed;
    display: none;
    overflow: visible;
    right: 45px;
    bottom: 45px;
    z-index: 99;
    border-radius: 50% !important;
    animation: back-to-top-glow 2.8s ease-in-out infinite;
    transition: transform .25s ease, box-shadow .25s ease, opacity .25s ease;
}

.back-to-top-ring {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
    pointer-events: none;
}

.back-to-top-ring-track {
    fill: none;
    stroke: rgba(255, 255, 255, .25);
    stroke-width: 3;
}

.back-to-top-ring-fill {
    fill: none;
    stroke: #FFFFFF;
    stroke-width: 3;
    stroke-linecap: round;
    transition: stroke-dashoffset .1s linear;
}

.back-to-top:hover {
    transform: translateY(-3px) scale(1.05);
}

.back-to-top:active {
    transform: translateY(-1px) scale(.96);
}

@keyframes back-to-top-glow {
    0%, 100% { box-shadow: 0 0 0 0 rgba(var(--primary-rgb, 13, 181, 173), .45); }
    50% { box-shadow: 0 0 0 10px rgba(var(--primary-rgb, 13, 181, 173), 0); }
}

@media (max-width: 575.98px) {
    .back-to-top {
        right: 25px;
        bottom: 25px;
    }
}

.accordion-item {
    background: var(--bg-surface);
    border-color: var(--border-color);
    color: var(--text-body);
}

.accordion-button {
    background: var(--bg-surface);
    color: var(--text-body);
}

.accordion-button:not(.collapsed) {
    background: var(--bg-section);
    color: var(--primary);
}

:root[data-theme="dark"] .accordion-button::after {
    filter: invert(1) grayscale(100%) brightness(1.5);
}

.accordion-body {
    background: var(--bg-surface);
    color: var(--text-body);
}

.page-hero {
    background: linear-gradient(135deg, var(--dark) 0%, var(--primary) 140%);
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}

.service-hero {
    background-color: var(--dark);
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    min-height: 360px;
    display: flex;
    align-items: center;
}

.service-hero .row {
    width: 100%;
    justify-content: center;
    text-align: center;
}

.service-hero-eyebrow {
    display: inline-block;
    padding: 6px 18px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .14);
    backdrop-filter: blur(4px);
    color: #FFFFFF;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    margin-bottom: 16px;
}

.page-hero-quote {
    color: rgba(255, 255, 255, .92);
    font-size: 19px;
    font-style: italic;
    max-width: 640px;
    margin: 0 auto 8px;
}

.page-hero-author {
    display: inline-block;
    color: rgba(255, 255, 255, .7);
    font-size: 14px;
    font-weight: 600;
    letter-spacing: .03em;
}

.service-hero-tagline {
    color: rgba(255, 255, 255, .88);
    font-size: 18px;
    max-width: 640px;
    margin: 0 auto;
}

.service-cta-box {
    background: linear-gradient(135deg, var(--primary) 0%, var(--dark) 130%);
}

.footer-empty-note {
    color: rgba(255, 255, 255, .5);
    font-style: italic;
}

.stat-card {
    position: relative;
    overflow: hidden;
    height: 100%;
    padding: 20px 14px;
    text-align: center;
    border-radius: 14px;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 10px rgba(0, 0, 0, .04);
    transition: transform .4s cubic-bezier(.22, 1, .36, 1), box-shadow .4s ease, border-color .4s ease;
}

@media (max-width: 575.98px) {
    .stat-card {
        padding: 14px 6px;
    }

    .stat-card-icon {
        width: 34px;
        height: 34px;
        font-size: 15px;
        margin-bottom: 6px;
    }

    .stat-card-value {
        font-size: 22px;
    }

    .stat-card-label {
        font-size: 10px;
    }
}

.stat-card::before {
    content: "";
    position: absolute;
    top: -40px;
    right: -40px;
    width: 110px;
    height: 110px;
    border-radius: 50%;
    background: radial-gradient(circle, var(--primary) 0%, transparent 72%);
    opacity: .12;
    transition: opacity .4s ease, transform .5s cubic-bezier(.22, 1, .36, 1);
    pointer-events: none;
}

.stat-card-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    margin-bottom: 10px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--secondary), var(--primary));
    color: #FFFFFF;
    font-size: 18px;
    transition: transform .45s cubic-bezier(.34, 1.56, .64, 1);
}

.stat-card-value {
    position: relative;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 2px;
}

.stat-card-label {
    position: relative;
    color: var(--text-muted);
    letter-spacing: .04em;
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
}

/* hover:hover keeps a tapped card on touch screens from getting stuck
   in its hover state (touch has no real "pointer resting over it"). */
@media (hover: hover) {
    .stat-card:hover {
        transform: translateY(-6px);
        border-color: var(--primary);
        box-shadow: 0 18px 32px -16px rgba(var(--primary-rgb), .3);
    }

    .stat-card:hover::before {
        opacity: .22;
        transform: scale(1.2);
    }

    .stat-card:hover .stat-card-icon {
        transform: rotate(-8deg) scale(1.1);
    }
}

.facts-box {
    flex-wrap: wrap;
    row-gap: 10px;
    border: 1px solid var(--border-color);
}

.facts-box.bg-primary {
    border-color: transparent;
}

@media (max-width: 575.98px) {
    .facts-box h1 {
        font-size: 28px;
    }

    .facts-box .ps-4 {
        padding-left: 1rem !important;
    }
}

/*** CEO Spotlight ***/
.ceo-spotlight {
    position: relative;
    height: 100%;
    display: flex;
    flex-direction: column;
    border-radius: 20px;
    overflow: hidden;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    box-shadow: 0 20px 44px -20px rgba(0, 0, 0, .25);
}

.ceo-spotlight-media {
    position: relative;
    overflow: hidden;
    flex: 1 1 auto;
    min-height: 0;
    background: linear-gradient(160deg, var(--primary) 0%, var(--dark) 120%);
}

@media (max-width: 991.98px) {
    .ceo-spotlight-media {
        aspect-ratio: 4 / 3;
        flex: 0 0 auto;
    }
}

.ceo-spotlight-media::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(6, 20, 22, .4) 0%, transparent 45%);
    pointer-events: none;
}

.ceo-spotlight-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    transition: transform .7s cubic-bezier(.22, 1, .36, 1);
}

.ceo-spotlight:hover .ceo-spotlight-media img {
    transform: scale(1.06) rotate(-1deg);
}

.ceo-spotlight-info {
    position: relative;
    flex: 0 0 auto;
    padding: 28px 30px;
}

.ceo-spotlight-eyebrow {
    display: inline-block;
    padding: 5px 14px;
    border-radius: 999px;
    background: rgba(var(--primary-rgb), .12);
    color: var(--primary);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    margin-bottom: 12px;
}

.ceo-spotlight-name {
    font-family: "Playfair Display", serif;
    font-weight: 700;
    font-size: 30px;
    color: var(--text-body);
    margin-bottom: 6px;
}

.ceo-spotlight-tagline {
    color: var(--text-muted);
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: .04em;
    margin-bottom: 10px;
}

.ceo-spotlight-role {
    font-size: 14px;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 16px;
}

.ceo-spotlight-intro {
    font-family: "Playfair Display", serif;
    font-style: italic;
    color: var(--text-muted);
    font-size: 15px;
    line-height: 1.7;
    margin-bottom: 18px;
}

.ceo-spotlight-link {
    display: inline-flex;
    align-items: center;
    font-weight: 700;
    color: var(--primary);
    text-decoration: none;
}

.ceo-spotlight-link i {
    transition: transform .35s cubic-bezier(.34, 1.56, .64, 1);
}

.ceo-spotlight-link:hover i {
    transform: translateX(5px);
}

.empty-state {
    padding: 50px 20px;
    border-radius: 16px;
    border: 1px dashed var(--border-color);
    background: var(--bg-section);
    color: var(--text-muted);
    width: 100%;
}

.empty-state-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 54px;
    height: 54px;
    border-radius: 50%;
    background: rgba(var(--primary-rgb), .1);
    color: var(--primary);
    font-size: 22px;
    margin-bottom: 14px;
}

.service-pager {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 16px;
    margin: 20px 0 40px;
    padding-top: 30px;
    border-top: 1px solid var(--border-color);
}

.service-pager-link {
    display: flex;
    align-items: center;
    min-width: 0;
    gap: 12px;
    max-width: 48%;
    padding: 14px 18px;
    border-radius: 14px;
    border: 1px solid var(--border-color);
    background: var(--bg-surface);
    color: var(--text-body);
    text-decoration: none;
    transition: border-color .3s ease, transform .3s ease, box-shadow .3s ease;
}

.service-pager-link span {
    min-width: 0;
    white-space: normal;
    overflow-wrap: break-word;
}

@media (max-width: 575.98px) {
    .service-pager-link {
        max-width: 100%;
        flex: 1 1 100%;
    }
}

@media (hover: hover) {
    .service-pager-link:hover {
        border-color: var(--primary);
        transform: translateY(-3px);
        box-shadow: 0 14px 28px -14px rgba(var(--primary-rgb), .4);
        color: var(--primary);
    }
}

.service-pager-next {
    margin-left: auto;
    text-align: right;
    justify-content: flex-end;
}

.service-pager-link i {
    font-size: 18px;
    color: var(--primary);
}

.service-pager-link small {
    display: block;
    color: var(--text-muted);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .05em;
}

.service-pager-link span {
    font-weight: 700;
}

.service-icon-animated {
    animation: service-icon-float 3.2s ease-in-out infinite;
}

@keyframes service-icon-float {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-6px) rotate(-6deg); }
}

.link-animated a {
    transition: .5s;
}

.link-animated a:hover {
    padding-left: 10px;
}

@media (min-width: 767.98px) {
    .footer-about {
        margin-bottom: -75px;
    }
}