/* Brand — keep existing logo lockup */
.brand-lockup {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.brand-mark {
    display: block;
    width: 48px;
    height: 48px;
    flex-shrink: 0;
}

.brand-lockup.is-compact .brand-mark {
    width: 36px;
    height: 36px;
}

.brand-wordmark {
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    gap: 0;
    line-height: 1;
}

.brand-title {
    display: block;
    line-height: 1;
    font-size: 36px;
    font-weight: 800;
    letter-spacing: -0.025em;
    white-space: nowrap;
}

.brand-sub {
    display: block;
    width: 100%;
    margin-top: 1px;
    padding: 0;
    font-size: 10px;
    line-height: 1.1;
    font-weight: 500;
    letter-spacing: 0;
    text-align: justify;
    text-align-last: justify;
    text-transform: lowercase;
    white-space: nowrap;
    color: #b9caca;
}

.material-symbols-outlined {
    font-variation-settings: 'FILL' 0, 'wght' 300, 'GRAD' 0, 'opsz' 24;
    vertical-align: middle;
}

/* Nav dropdown */
.nav-dropdown {
    position: relative;
}

.nav-dropdown-head {
    display: inline-flex;
    align-items: center;
}

.nav-dropdown-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 0.25rem;
    border: 0;
    background: transparent;
    color: inherit;
    cursor: pointer;
}

.nav-link-caret {
    display: block;
    width: 0.875rem;
    height: 0.875rem;
    opacity: 0.72;
    transition: transform 0.25s ease, opacity 0.2s ease;
}

.nav-dropdown.is-open .nav-link-caret {
    opacity: 1;
    transform: rotate(180deg);
}

@media (min-width: 1024px) {
    .nav-dropdown-panel {
        display: none;
    }

    .nav-dropdown.is-open .nav-dropdown-panel,
    .nav-dropdown:hover .nav-dropdown-panel {
        display: block;
    }
}

@media (max-width: 1023px) {
    #site-nav,
    #site-nav .nav-panel,
    #site-nav .nav-links,
    #site-nav .nav-footer,
    #site-nav .mobile-nav-top {
        background-color: #081010 !important;
    }

    #site-nav .nav-dropdown.is-open .nav-dropdown-head,
    #site-nav .nav-dropdown-head.is-active {
        border-color: rgb(0 245 255 / 0.35);
        background: rgb(0 245 255 / 0.1);
    }

    #site-nav .nav-dropdown.is-open .nav-dropdown-toggle,
    #site-nav .nav-dropdown-head.is-active .nav-dropdown-toggle {
        color: #00f5ff;
        border-left-color: rgb(0 245 255 / 0.35);
    }

    #site-nav .mobile-nav-top .brand-title {
        color: #fff !important;
    }

    #site-nav .mobile-nav-top .brand-sub {
        color: rgb(185 202 202 / 0.85) !important;
    }
}

@media (min-width: 1024px) and (max-width: 1199.98px) {
    .site-header .container-page {
        padding-inline: 1rem;
    }
}

@media (min-width: 1024px) {
    .site-header .container-page {
        max-width: none;
    }

    .nav-links {
        flex-wrap: nowrap !important;
        gap: clamp(0.05rem, -0.02rem + 0.16vw, 0.2rem) !important;
    }

    .nav .nav-link,
    .nav-dropdown-head .nav-link {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        white-space: nowrap;
        padding-inline: clamp(0.35rem, 0.1rem + 0.5vw, 0.65rem);
        padding-block: clamp(0.3rem, 0.08rem + 0.28vw, 0.5rem);
        font-size: clamp(0.64rem, 0.335rem + 0.54vw, 0.875rem);
    }

    .nav-link-text {
        white-space: nowrap;
    }

    .nav-dropdown-head {
        gap: 0.125rem;
    }

    .nav-dropdown-head .nav-link {
        padding-right: 0;
    }

    .nav-dropdown-toggle {
        padding-block: clamp(0.3rem, 0.08rem + 0.28vw, 0.5rem);
        padding-right: clamp(0.35rem, 0.1rem + 0.5vw, 0.65rem);
        padding-left: 0;
    }

    .nav-link-caret {
        width: clamp(0.6875rem, 0.55rem + 0.22vw, 0.875rem);
        height: clamp(0.6875rem, 0.55rem + 0.22vw, 0.875rem);
    }

    .header-cta {
        padding-inline: clamp(0.55rem, 0.2rem + 0.75vw, 1rem);
        font-size: clamp(0.625rem, 0.35rem + 0.45vw, 0.75rem);
    }

    .brand-lockup:not(.is-compact) .brand-mark {
        width: clamp(36px, 28px + 1.2vw, 48px);
        height: clamp(36px, 28px + 1.2vw, 48px);
    }

    .brand-lockup:not(.is-compact) .brand-title {
        font-size: clamp(1.35rem, 0.95rem + 1.1vw, 2.25rem);
    }

    .brand-lockup:not(.is-compact) .brand-sub {
        font-size: clamp(0.5rem, 0.42rem + 0.18vw, 0.625rem);
    }
}

@media (max-width: 1023px) {
    .nav-dropdown-head {
        display: flex;
        width: 100%;
        align-items: stretch;
    }

    .nav-dropdown-head .nav-link {
        flex: 1;
        min-width: 0;
        justify-content: flex-start;
    }

    .nav-dropdown-toggle {
        flex-shrink: 0;
        padding: 0 0.75rem;
        align-self: center;
    }
}

/* Hero */
.hero-stitch-canvas-wrap {
    z-index: 0;
}

.hero-stitch-canvas {
    display: block;
    width: 100%;
    height: 100%;
}

.hero-stitch-bg {
    z-index: 1;
    opacity: 0.35;
    transition: opacity 0.4s ease;
}

.hero-stitch--shader .hero-stitch-bg {
    opacity: 0.06;
}

.hero-stitch--static .hero-stitch-bg {
    opacity: 0.55;
}

.hero-stitch-overlay {
    z-index: 2;
    background:
        linear-gradient(105deg, rgb(13 21 21 / 0.78) 0%, rgb(13 21 21 / 0.38) 44%, rgb(13 21 21 / 0.62) 100%),
        linear-gradient(to bottom, rgb(13 21 21 / 0.08), rgb(13 21 21 / 0.72));
    pointer-events: none;
}

.hero-stitch-glow {
    z-index: 3;
}

.hero-stitch .container-page {
    z-index: 10;
}

.hero-stitch-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.4rem 1rem 0.4rem 0.75rem;
    border-radius: 9999px;
    border: 1px solid rgb(0 245 255 / 0.18);
    background: rgb(15 23 42 / 0.45);
    backdrop-filter: blur(12px);
    animation: hero-badge-glow 3s ease-in-out infinite;
}

.hero-status-dot {
    flex-shrink: 0;
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 50%;
    background: #2ff801;
    box-shadow: 0 0 8px #2ff801, 0 0 18px rgb(47 248 1 / 0.45);
    animation: hero-status-pulse 2s ease-in-out infinite;
}

@keyframes hero-status-pulse {
    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.65;
        transform: scale(0.85);
    }
}

@keyframes hero-badge-glow {
    0%,
    100% {
        box-shadow: 0 0 0 rgb(0 245 255 / 0);
        border-color: rgb(0 245 255 / 0.18);
    }

    50% {
        box-shadow: 0 0 24px rgb(0 245 255 / 0.12);
        border-color: rgb(0 245 255 / 0.32);
    }
}

.hero-stitch-title {
    line-height: 1.05;
    letter-spacing: -0.03em;
}

@media (prefers-reduced-motion: reduce) {
    .hero-stitch-badge,
    .hero-status-dot {
        animation: none;
    }
}

/* Scroll reveal */
[data-reveal] {
    opacity: 0;
    transform: translateY(22px);
    transition: opacity 0.65s ease, transform 0.65s ease;
}

[data-reveal].is-revealed {
    opacity: 1;
    transform: translateY(0);
}

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

/* Exit intent — dark */
.exit-intent-title {
    color: #fff;
}

.exit-intent-text {
    color: #b9caca;
}

/* Service / blog dark tweaks */
.service-hero-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    background:
        linear-gradient(180deg, rgb(8 16 16 / 0.15) 0%, rgb(8 16 16 / 0.55) 45%, rgb(8 16 16 / 0.94) 100%),
        linear-gradient(90deg, rgb(13 21 21 / 0.72) 0%, transparent 55%);
}

.service-hero:not(:has(.service-hero-image)) {
    background:
        linear-gradient(135deg, rgb(8 16 16) 0%, rgb(15 23 42) 100%);
}

.service-hero:not(:has(.service-hero-image))::before {
    content: '';
    position: absolute;
    inset: 0;
    opacity: 0.35;
    background-image:
        linear-gradient(rgb(0 245 255 / 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgb(0 245 255 / 0.04) 1px, transparent 1px);
    background-size: 40px 40px;
}

.service-overview-card,
.related-service-card,
.blog-card {
    overflow: hidden;
    padding: 0;
}

.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Chat widget — Stitch cyan */
.chat-widget {
    position: fixed;
    right: max(1rem, env(safe-area-inset-right));
    bottom: max(1rem, env(safe-area-inset-bottom));
    z-index: 55;
    pointer-events: none;
}

.chat-widget.has-sticky-cta {
    bottom: calc(4.75rem + env(safe-area-inset-bottom));
}

.chat-widget > * {
    pointer-events: auto;
}

.chat-launcher {
    display: grid;
    place-items: center;
    width: 3.5rem;
    height: 3.5rem;
    border: 1px solid rgb(0 245 255 / 0.3);
    border-radius: 999px;
    background: linear-gradient(135deg, #081010 0%, #0f172a 100%);
    color: #00f5ff;
    box-shadow: 0 0 24px rgb(0 245 255 / 0.25);
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.chat-launcher:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 32px rgb(0 245 255 / 0.4);
}

.chat-launcher svg {
    width: 1.5rem;
    height: 1.5rem;
}

.chat-launcher-open,
.chat-launcher-close {
    grid-area: 1 / 1;
    display: grid;
    place-items: center;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.chat-launcher-close {
    opacity: 0;
    transform: scale(0.8);
}

.chat-widget.is-open .chat-launcher-open {
    opacity: 0;
    transform: scale(0.8);
}

.chat-widget.is-open .chat-launcher-close {
    opacity: 1;
    transform: scale(1);
}

.chat-panel {
    position: absolute;
    right: 0;
    bottom: calc(100% + 0.75rem);
    display: flex;
    flex-direction: column;
    width: min(22rem, calc(100vw - 2rem));
    height: min(32rem, calc(100dvh - 7rem));
    overflow: hidden;
    border: 1px solid rgb(255 255 255 / 0.1);
    border-radius: 0.75rem;
    background: #192121;
    box-shadow: 0 24px 64px rgb(0 0 0 / 0.5);
}

.chat-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 1rem;
    background: linear-gradient(135deg, #081010 0%, #0f172a 100%);
    color: #fff;
}

.chat-title {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
}

.chat-subtitle {
    margin: 0.25rem 0 0;
    font-size: 0.8125rem;
    color: #b9caca;
}

.chat-icon-btn {
    display: grid;
    place-items: center;
    width: 2rem;
    height: 2rem;
    border: 0;
    border-radius: 0.375rem;
    background: rgb(255 255 255 / 0.08);
    color: #fff;
    cursor: pointer;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.chat-message {
    max-width: 92%;
    padding: 0.75rem 0.875rem;
    border-radius: 0.75rem;
    font-size: 0.9375rem;
    line-height: 1.45;
}

.chat-message--assistant {
    align-self: flex-start;
    border: 1px solid rgb(255 255 255 / 0.1);
    background: rgb(255 255 255 / 0.05);
    color: #dce4e4;
}

.chat-message--user {
    align-self: flex-end;
    background: #00f5ff;
    color: #003739;
}

.chat-message.is-pending {
    opacity: 0.7;
    font-style: italic;
}

.chat-form {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 0.5rem;
    padding: 0.75rem;
    border-top: 1px solid rgb(255 255 255 / 0.1);
}

.chat-input {
    width: 100%;
    min-height: 2.75rem;
    resize: none;
    border: 1px solid rgb(255 255 255 / 0.1);
    border-radius: 0.5rem;
    padding: 0.625rem 0.75rem;
    font: inherit;
    color: #fff;
    background: rgb(255 255 255 / 0.05);
}

.chat-input:focus {
    outline: 2px solid #00f5ff;
    border-color: #00f5ff;
}

.chat-send {
    display: grid;
    place-items: center;
    width: 2.75rem;
    height: 2.75rem;
    border: 0;
    border-radius: 0.5rem;
    background: #00f5ff;
    color: #003739;
    cursor: pointer;
}

.chat-footer {
    margin: 0;
    padding: 0 0.875rem 0.875rem;
    font-size: 0.75rem;
    color: #b9caca;
}

.chat-footer a {
    color: #00f5ff;
    font-weight: 600;
}

@media (max-width: 639px) {
    .chat-widget.is-open .chat-panel {
        position: fixed;
        inset: 0;
        width: auto;
        height: auto;
        border-radius: 0;
    }

    .chat-widget.is-open .chat-launcher {
        position: fixed;
        right: max(1rem, env(safe-area-inset-right));
        bottom: max(1rem, env(safe-area-inset-bottom));
        z-index: 56;
    }
}
