/* ==========================================================================
   Header + Hero — premium light glass nav & enterprise hero
   ========================================================================== */

:root {
    --header-h: 88px;
    --header-h-scrolled: 72px;
    --header-float-y: 1.25rem;
    --header-float-y-scrolled: 0.75rem;
    --header-width: 92%;
}

/* ---- Header: frosted glass (light — logo visibility) ---- */
.site-header {
    position: fixed;
    top: var(--header-float-y);
    left: 50%;
    width: var(--header-width);
    height: var(--header-h);
    z-index: 100;
    transform: translateX(-50%);
    pointer-events: none;
    transition:
        top 0.5s var(--ease),
        height 0.5s var(--ease),
        width 0.5s var(--ease);
}

.header-shell {
    height: 100%;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border: 1px solid rgba(8, 27, 58, 0.08);
    box-shadow:
        0 8px 32px rgba(8, 27, 58, 0.08),
        0 2px 8px rgba(8, 27, 58, 0.04);
    pointer-events: auto;
    overflow: visible;
    transition:
        box-shadow 0.5s var(--ease),
        background 0.5s var(--ease);
}

.site-header.is-scrolled {
    top: var(--header-float-y-scrolled);
    height: var(--header-h-scrolled);
}

.site-header.is-menu-open {
    z-index: 201;
}

.site-header.is-scrolled .header-shell {
    background: rgba(255, 255, 255, 0.98);
    box-shadow:
        0 12px 40px rgba(8, 27, 58, 0.12),
        0 2px 10px rgba(8, 27, 58, 0.06);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.header-inner {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
    padding: 0 clamp(1.25rem, 2.5vw, 2rem);
    transition: padding 0.5s var(--ease);
}

@media (min-width: 1024px) {
    .header-inner {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
        gap: 1.5rem;
    }

    .logo-link { justify-self: start; }
    .main-nav { justify-self: center; }
    .header-actions { justify-self: end; }
}

.logo-link {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.logo {
    height: 65px;
    width: auto;
    transition: height 0.5s var(--ease);
    filter: none;
}

.site-header.is-scrolled .logo {
    height: 60px;
}

.main-nav { display: none; }

@media (min-width: 1024px) {
    .main-nav { display: block; overflow: visible; }
}

.nav-list {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.nav-link {
    position: relative;
    padding: 0.5rem 0.75rem;
    font-family: var(--font-nav);
    font-size: 0.875rem;
    font-weight: 500;
    letter-spacing: 0.01em;
    text-transform: none;
    color: rgba(8, 27, 58, 0.72);
    transition: color 0.25s, padding 0.5s var(--ease), font-size 0.5s var(--ease);
}

.nav-link::after {
    content: '';
    position: absolute;
    left: 0.75rem;
    right: 0.75rem;
    bottom: 0.25rem;
    height: 1.5px;
    background: var(--ds-accent, #FF6B1A);
    transform: scaleX(0);
    transform-origin: left center;
    transition: transform 0.3s var(--ds-ease, cubic-bezier(0.22, 1, 0.36, 1));
}

.nav-link:hover::after,
.nav-link.is-active::after,
.nav-link:focus-visible::after {
    transform: scaleX(1);
}

.site-header.is-scrolled .nav-link {
    padding: 0.375rem 0.625rem;
    font-size: 0.8125rem;
}

.nav-link:hover,
.nav-link.is-active {
    color: var(--navy);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
}

.mobile-toggle {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    transition: background 0.25s;
}

.mobile-toggle:hover {
    background: rgba(8, 27, 58, 0.06);
}

.mobile-toggle span {
    display: block;
    height: 1.5px;
    background: var(--navy);
    transition: transform 0.3s, opacity 0.3s;
}

.mobile-toggle.is-open span:first-child { transform: translateY(3.75px) rotate(45deg); }
.mobile-toggle.is-open span:last-child { transform: translateY(-3.75px) rotate(-45deg); }

@media (min-width: 1024px) {
    .mobile-toggle { display: none; }
}

.mobile-nav {
    position: fixed;
    inset: 0;
    z-index: 200;
    background: rgba(6, 19, 39, 0.98);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    padding: calc(var(--header-h) + var(--header-float-y) + 1rem) var(--container-pad, 1.25rem) 2rem;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    transform: translateY(-100%);
    visibility: hidden;
    opacity: 0;
    transition:
        transform 0.45s var(--ease),
        visibility 0.45s,
        opacity 0.35s ease;
}

.site-header.is-scrolled ~ .mobile-nav {
    padding-top: calc(var(--header-h-scrolled) + var(--header-float-y-scrolled) + 1rem);
}

.mobile-nav.is-open {
    transform: translateY(0);
    visibility: visible;
    opacity: 1;
}

.mobile-nav__close {
    position: absolute;
    top: calc(var(--header-h) + var(--header-float-y) + 0.5rem);
    right: var(--container-pad, 1.25rem);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    color: rgba(255, 255, 255, 0.9);
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    transition: background 0.2s, color 0.2s;
    z-index: 2;
}

.mobile-nav__close:hover,
.mobile-nav__close:focus-visible {
    background: rgba(255, 107, 26, 0.2);
    color: #fff;
    outline: none;
}

.mobile-nav nav {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
    padding-top: 3rem;
}

.mobile-nav a,
.mobile-nav__accordion-trigger {
    display: flex;
    align-items: center;
    min-height: 48px;
    font-family: var(--font-heading);
    font-size: clamp(1.375rem, 4vw, 1.75rem);
    font-weight: 500;
    letter-spacing: var(--track-heading);
    color: rgba(255, 255, 255, 0.9);
    padding: 0.5rem 0;
    transition: color 0.2s;
}

.mobile-nav a:hover,
.mobile-nav a:focus-visible {
    color: var(--orange);
    outline: none;
}

.mobile-nav__cta { margin-top: 2.5rem; padding-top: 2rem; border-top: 1px solid rgba(255, 255, 255, 0.08); }

/* ---- Mega menu ---- */
.nav-item--mega {
    position: static;
}

.nav-link--trigger {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
}

.nav-link__chevron {
    transition: transform 0.25s var(--ease);
    opacity: 0.55;
}

.nav-item--mega.is-open .nav-link__chevron,
.nav-link--trigger[aria-expanded="true"] .nav-link__chevron {
    transform: rotate(180deg);
}

.mega-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    width: min(1120px, calc(100vw - 3rem));
    margin: 0;
    padding: 0;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateX(-50%) translateY(8px);
    transition:
        opacity 0.32s var(--ds-ease, cubic-bezier(0.22, 1, 0.36, 1)),
        transform 0.32s var(--ds-ease, cubic-bezier(0.22, 1, 0.36, 1)),
        visibility 0.32s;
    z-index: 200;
}

.mega-menu__bridge {
    position: absolute;
    top: -24px;
    left: -12px;
    right: -12px;
    height: 28px;
    background: transparent;
    pointer-events: auto;
}

.nav-item--mega.is-open .mega-menu,
.mega-menu.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateX(-50%) translateY(0);
}

.mega-menu__link:focus-visible {
    outline: 2px solid #FF6A00;
    outline-offset: 2px;
    background: rgba(8, 27, 58, 0.04);
}

.mega-menu__inner {
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid rgba(8, 27, 58, 0.08);
    border-radius: 20px;
    box-shadow:
        0 24px 64px rgba(8, 27, 58, 0.12),
        0 4px 16px rgba(8, 27, 58, 0.06);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    overflow: hidden;
}

.mega-menu__grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 0;
    padding: 1.75rem 1.5rem 1.25rem;
    border-bottom: 1px solid rgba(8, 27, 58, 0.06);
}

.mega-menu__col {
    padding: 0 1rem;
    border-right: 1px solid rgba(8, 27, 58, 0.06);
}

.mega-menu__col:last-child {
    border-right: none;
}

.mega-menu__label {
    font-family: var(--font-nav);
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(8, 27, 58, 0.45);
    margin: 0 0 0.875rem;
    padding-left: 0.25rem;
}

.mega-menu__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.mega-menu__link {
    display: flex;
    align-items: flex-start;
    gap: 0.625rem;
    padding: 0.5rem 0.375rem;
    border-radius: 10px;
    transition: background 0.2s;
}

.mega-menu__link:hover {
    background: rgba(8, 27, 58, 0.04);
}

.mega-menu__icon {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: rgba(255, 106, 0, 0.08);
    color: #FF6A00;
}

.mega-menu__text {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
    min-width: 0;
}

.mega-menu__title {
    font-family: var(--font-nav);
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--navy);
    line-height: 1.3;
}

.mega-menu__desc {
    font-size: 0.6875rem;
    line-height: 1.4;
    color: rgba(8, 27, 58, 0.5);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.mega-menu__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    padding: 1rem 1.75rem;
    background: rgba(8, 27, 58, 0.02);
}

.mega-menu__overview {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-nav);
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--navy);
    transition: color 0.2s;
}

.mega-menu__overview:hover {
    color: #FF6A00;
}

.mega-menu__cta {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.mega-menu__cta p {
    font-size: 0.8125rem;
    color: rgba(8, 27, 58, 0.55);
    margin: 0;
}

.mega-menu__btn .btn-premium__inner {
    padding: 0.5rem 1.125rem;
    font-size: 0.8125rem;
}

@media (max-width: 1200px) {
    .mega-menu__grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .mega-menu__col:nth-child(3) {
        border-right: none;
    }

    .mega-menu__col:nth-child(4),
    .mega-menu__col:nth-child(5) {
        border-top: 1px solid rgba(8, 27, 58, 0.06);
        border-right: none;
        padding-top: 1rem;
        margin-top: 0.5rem;
    }
}

@media (max-width: 1023px) {
    .mega-menu { display: none; }
}

/* Mobile services accordion */
.mobile-nav__accordion {
    margin: 0.5rem 0;
}

.mobile-nav__accordion-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    min-height: 48px;
    background: none;
    border: none;
    font-family: var(--font-heading);
    font-size: clamp(1.375rem, 4vw, 1.75rem);
    font-weight: 500;
    letter-spacing: var(--track-heading);
    color: rgba(255, 255, 255, 0.9);
    padding: 0.5rem 0;
    cursor: pointer;
    text-align: left;
}

.mobile-nav__accordion-trigger[aria-expanded="true"] {
    color: var(--orange);
}

.mobile-nav__accordion-trigger[aria-expanded="true"] svg {
    transform: rotate(180deg);
}

.mobile-nav__accordion-panel {
    padding: 0.5rem 0 1rem 0.75rem;
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    margin-left: 0.25rem;
}

.mobile-nav__group-label {
    font-family: var(--font-nav);
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.4);
    margin: 1rem 0 0.375rem;
}

.mobile-nav__group-label:first-child {
    margin-top: 0.25rem;
}

.mobile-nav__service-link {
    display: block;
    font-family: var(--font-nav) !important;
    font-size: 1rem !important;
    font-weight: 500 !important;
    letter-spacing: 0 !important;
    color: rgba(255, 255, 255, 0.65) !important;
    padding: 0.375rem 0 !important;
}

.mobile-nav__service-link:hover {
    color: var(--orange) !important;
}

.mobile-nav__overview-link {
    display: block;
    font-family: var(--font-nav) !important;
    font-size: 0.9375rem !important;
    font-weight: 600 !important;
    color: #FF6A00 !important;
    margin-top: 1rem;
    padding: 0.375rem 0 !important;
}

/* ---- Hero ---- */
.hero {
    position: relative;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    align-items: center;
    padding: calc(var(--header-h) + var(--header-float-y) + var(--space-md)) 0 var(--space-lg);
    background: var(--dark);
    color: var(--white);
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
}

.hero-bg__gradient {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 70% 55% at 75% 20%, rgba(16, 42, 84, 0.65), transparent 62%),
        radial-gradient(ellipse 50% 40% at 15% 85%, rgba(255, 106, 19, 0.06), transparent 55%),
        linear-gradient(165deg, #061327 0%, #081B3A 42%, #102A54 100%);
}

.hero-bg__grid {
    position: absolute;
    inset: 0;
    opacity: 0.35;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
    background-size: 64px 64px;
    mask-image: radial-gradient(ellipse 80% 70% at 50% 40%, black 20%, transparent 75%);
}

.hero-bg__lines {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0.85;
}

.hero-bg__particles {
    position: absolute;
    inset: 0;
}

.hero-bg__particles span {
    position: absolute;
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.35);
    animation: hero-particle 12s ease-in-out infinite;
}

.hero-bg__particles span:nth-child(1) { top: 18%; left: 12%; animation-delay: 0s; }
.hero-bg__particles span:nth-child(2) { top: 32%; left: 78%; animation-delay: -2s; opacity: 0.5; }
.hero-bg__particles span:nth-child(3) { top: 58%; left: 22%; animation-delay: -4s; }
.hero-bg__particles span:nth-child(4) { top: 72%; left: 65%; animation-delay: -6s; opacity: 0.45; }
.hero-bg__particles span:nth-child(5) { top: 44%; left: 48%; animation-delay: -8s; width: 2px; height: 2px; }
.hero-bg__particles span:nth-child(6) { top: 85%; left: 38%; animation-delay: -10s; opacity: 0.35; }

@keyframes hero-particle {
    0%, 100% { transform: translateY(0); opacity: 0.35; }
    50% { transform: translateY(-8px); opacity: 0.7; }
}

.hero-layout {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1fr;
    gap: clamp(2.5rem, 5vw, 4rem);
    align-items: center;
    width: 100%;
}

@media (min-width: 1024px) {
    .hero-layout {
        grid-template-columns: 45% 55%;
        gap: var(--space-lg);
    }
}

.hero-copy {
    max-width: 620px;
}

.hero-badge {
    display: inline-block;
    font-family: var(--font-nav);
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.55);
    padding: 0.5rem 1rem;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.04);
}

.hero-headline {
    font-family: var(--font-heading);
    font-size: var(--ds-h1, clamp(2.625rem, 4vw + 1rem, 5rem));
    font-weight: 600;
    line-height: 1.08;
    letter-spacing: -0.03em;
    margin-bottom: 1.5rem;
    max-width: 14em;
    text-wrap: balance;
}

.hero-lede {
    font-size: var(--ds-body-lg, 1.0625rem);
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.58);
    max-width: 520px;
    margin-bottom: 2rem;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.875rem;
}

.hero-media {
    position: relative;
    width: 100%;
}

.hero-illustration-frame,
.hero-photo-frame {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 10;
    border-radius: 1rem;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background:
        radial-gradient(ellipse 70% 60% at 50% 45%, rgba(16, 42, 84, 0.55), transparent 68%),
        linear-gradient(165deg, rgba(8, 27, 58, 0.92) 0%, rgba(6, 19, 39, 0.98) 100%);
    box-shadow:
        0 24px 64px rgba(0, 0, 0, 0.35),
        inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.hero-photo-frame img,
.hero-photo-frame picture,
.hero-photo-frame .photo-crop {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.hero-illustration-frame {
    perspective: 900px;
    aspect-ratio: 640 / 520;
}

.hero-illustration {
    width: 100%;
    height: 100%;
    min-height: inherit;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(1rem, 3vw, 1.75rem);
}

.hero-illustration__svg {
    width: 100%;
    height: auto;
    max-height: min(520px, 72vw);
    display: block;
    overflow: visible;
}

.hero-ill-layer {
    transform-box: fill-box;
    transform-origin: center;
}

.hero-illustration.is-ready .hero-ill-circuit {
    vector-effect: non-scaling-stroke;
}

.hero-float-cards {
    position: absolute;
    inset: 0;
    pointer-events: none;
    list-style: none;
}

.hero-float-card {
    position: absolute;
    padding: 0.625rem 1rem;
    font-family: var(--font-nav);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: rgba(255, 255, 255, 0.92);
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 0.625rem;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    white-space: nowrap;
    will-change: transform;
}

.hero-float-card--1 { top: 6%; left: -2%; }
.hero-float-card--2 { top: 32%; right: -4%; }
.hero-float-card--3 { bottom: 26%; left: 2%; }
.hero-float-card--4 { bottom: 10%; right: 2%; }
.hero-float-card--5 { top: 14%; right: 18%; }

@media (max-width: 1099px) {
    .hero {
        align-items: flex-start;
        padding-top: calc(var(--header-h) + var(--header-float-y) + 2rem);
    }

    .hero-float-card--1 { top: 4%; left: 2%; }
    .hero-float-card--2 { top: auto; bottom: 32%; right: 2%; }
    .hero-float-card--3 { bottom: 16%; left: 4%; }
    .hero-float-card--4 { bottom: 4%; right: 4%; }
    .hero-float-card--5 { display: none; }
}

@media (prefers-reduced-motion: reduce) {
    .hero-bg__particles span {
        animation: none;
    }
}

.page-home .site-header .header-shell {
    background: rgba(255, 255, 255, 0.96);
}
