:root {
    --navy: #0B2239;
    --white: #FFFFFF;
    --mid-blue: #006dc4;
    --cyan: #01D1FB;
    --teal: #00B9C8;
    --pale-blue: #E6F4FE;
    --font-family: 'Mona Sans', system-ui, -apple-system, sans-serif;
}

body {
    font-family: var(--font-family);
    background-color: var(--navy);
    color: var(--white);
    overflow-x: hidden;
    margin: 0;
    -webkit-font-smoothing: antialiased;
}

/* --- REVEAL ANIMATION SYSTEM --- */
.reveal-title {
    opacity: 0;
    transform: translateY(-50px);
    transition: opacity 1.2s cubic-bezier(0.16, 1, 0.3, 1), transform 1.2s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: transform, opacity;
}

.reveal-title.visible {
    opacity: 1;
    transform: translateY(0);
}

.reveal-card {
    opacity: 0;
    transform: scale(0.9) translateY(30px);
    transition: opacity 1.2s cubic-bezier(0.16, 1, 0.3, 1), transform 1.2s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: transform, opacity;
}

.reveal-card.visible {
    opacity: 1;
    transform: scale(1) translateY(0);
}

/* --- GLOBAL TRAIL SYSTEM --- */
#trail-svg-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    /* Height will be set by JS to match document height */
    z-index: 10;
    /* Above Section BGs (z-auto), Below Section Content (z-20) */
    pointer-events: none;
    overflow: hidden;
    mix-blend-mode: hard-light;
}

#main-svg {
    width: 100%;
    height: 100%;
    overflow: visible;
}

#guide-path {
    fill: none;
    stroke-width: 3;
    stroke-linecap: round;
    stroke-linejoin: round;
    filter: drop-shadow(0 0 5px rgba(1, 209, 251, 0.5));
    stroke-opacity: 0.5;
    /* Stroke color handled by JS gradient */
}

#trailguide-spark {
    fill: var(--cyan);
    filter: drop-shadow(0 0 10px var(--cyan));
    transition: r 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    opacity: 0;
    /* Hidden until valid */
}

#trailguide-spark.active {
    opacity: 0.85;
}

/* --- NAVIGATION ARCHITECTURE --- */
#main-header {
    position: fixed;
    left: 0;
    right: 0;
    top: 35px;
    z-index: 1000;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    background-color: transparent;
    border-bottom: 1px solid rgba(255, 255, 255, 0.00);
}

.header-scrolled {
    top: 20px !important;
    left: 20px !important;
    right: 20px !important;
    width: calc(100% - 40px) !important;
    border-radius: 24px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
    background-color: rgba(255, 255, 255, 0.90) !important;
    -webkit-backdrop-filter: blur(40px) !important;
    backdrop-filter: blur(40px) !important;
    border: 1px solid rgba(11, 34, 57, 0.1) !important;
    color: var(--navy) !important;
}

.nav-list {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    height: 100%;
}

.nav-item {
    position: relative;
    height: 100%;
    display: flex;
    align-items: center;
    transition: padding 0.4s ease;
}

.header-scrolled .nav-item {
    padding: 18px 0;
}

.nav-link-tab {
    font-weight: 800;
    text-transform: uppercase;
    font-size: 10px;
    letter-spacing: 0.3em;
    padding: 14px 22px;
    border-radius: 12px;
    transition: all 0.2s ease;
    position: relative;
    z-index: 620;
    color: var(--navy);
    border: 1px solid transparent;
}

.nav-item:hover .nav-link-tab {
    background: var(--pale-blue);
    color: var(--navy) !important;
    z-index: 615;
    border: 1px solid var(--cyan);
    border-bottom-color: var(--pale-blue);
    border-radius: 12px 12px 0 0;
}

.mega-menu {
    position: absolute;
    top: 100%;
    right: 0;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
    background: var(--pale-blue) !important;
    border: 1px solid var(--cyan);
    backdrop-filter: blur(32px);
    color: var(--navy);
    border-radius: 24px 0 24px 24px;
    z-index: 610;
    pointer-events: none;
    box-shadow: 0 40px 100px -20px rgba(0, 0, 0, 0.5);
    transform: translateY(-5px);
    margin-top: -1px;
}

.nav-item::after {
    content: '';
    position: absolute;
    background: var(--pale-blue, 0.90) !important;
    top: 50%;
    left: 0;
    right: 0;
    bottom: -30px;
    border: 1px solid var(--cyan);
    border-bottom-color: var(--pale-blue);
    z-index: 520;
    display: none;
}

.nav-item:hover::after {
    display: block;
}

.nav-item:hover .mega-menu {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
}

/* --- HERO RIPPLE SYSTEM --- */
.hero-ripple-container {
    position: absolute;
    background: linear-gradient(to bottom, var(--pale-blue) 0%, var(--navy) 50%);
    inset: 0;
    z-index: 2;
    overflow: hidden;
    pointer-events: none;
}

.ripple-layer {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 200%;
    height: 100%;
    display: flex;
}

.ripple-layer svg {
    width: 50%;
    height: 100%;
}

.ripple-1 {
    animation: ripple-scroll 20s linear infinite;
    opacity: 0.35;
}

.ripple-2 {
    animation: ripple-scroll 30s linear infinite reverse;
    opacity: 0.25;
    bottom: -30px;
}

.ripple-3 {
    animation: ripple-scroll 40s linear infinite;
    opacity: 0.2;
    bottom: -60px;
}

.ripple-4 {
    animation: ripple-scroll 55s linear infinite reverse;
    opacity: 0.15;
    bottom: -90px;
}

.ripple-5 {
    animation: ripple-scroll 70s linear infinite;
    opacity: 0.1;
    bottom: -120px;
}

.ripple-6 {
    animation: ripple-scroll 90s linear infinite reverse;
    opacity: 0.08;
    bottom: -150px;
}

@keyframes ripple-scroll {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

/* --- HERO WAVES --- */
.hero-waves-container {
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
}

.hero-wave-path {
    transform: translateY(250px);
    fill: none;
    stroke-width: 1.5;
    stroke-linecap: round;
    opacity: 0.2;
    filter: url(#svg-glow-hero);
}

.hero-traveler {
    transform: translateY(250px);
    fill: var(--cyan);
    filter: drop-shadow(0 0 8px var(--white)) drop-shadow(0 0 15px var(--cyan));
}

/* --- GALLERY --- */
.gallery {
    --_p: 0%;
    --angle-lean: 10%;
    display: grid;
    clip-path: inset(0px);
    width: 100%;
    position: relative;
}

.gallery>img {
    grid-area: 1/1;
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    cursor: pointer;
    transition: clip-path 1.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.gallery>img:first-child {
    clip-path: polygon(0 0, calc(50% + var(--_p) + var(--angle-lean)) 0, calc(50% + var(--_p) - var(--angle-lean)) 100%, 0 100%);
    z-index: 2;
}

.gallery>img:last-child {
    clip-path: polygon(calc(50% + var(--_p) + var(--angle-lean)) 0, 100% 0, 100% 100%, calc(50% + var(--_p) - var(--angle-lean)) 100%);
    z-index: 1;
}

.gallery:has(img:first-child:hover) {
    --_p: 45%;
}

.gallery:has(img:last-child:hover) {
    --_p: -45%;
}

/* --- 3D CUSTOMER CAROUSEL --- */
.carousel-container {
    width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    overflow: hidden;
    padding: 100px 0 110px 0;
    position: relative;
    z-index: 20;
}

.carousel-track {
    display: flex;
    width: max-content;
    animation: carousel-loop 50s linear infinite;
    gap: 60px;
}

@keyframes carousel-loop {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(calc(-50% - 30px));
    }
}

.customer-3d-block {
    position: relative;
    width: 220px;
    height: 280px;
    background: rgba(255, 255, 255, 0.98);
    transform: rotate(-25deg) skew(20deg);
    border: 1px solid rgba(11, 34, 57, 0.1);
    display: flex;
    flex-direction: column;
    box-shadow: -8px 8px 15px rgba(0, 0, 0, 0.03);
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    flex-shrink: 0;
    overflow: visible;
    z-index: 10;
    transform-style: preserve-3d;
}

.customer-3d-block::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 165px;
    width: 180px;
    height: 40px;
    background: radial-gradient(ellipse at center, rgba(11, 34, 57, 0.3) 0%, rgba(11, 34, 57, 0) 70%);
    transform: translateX(-65%) rotate(5deg);
    filter: blur(15px);
    z-index: -5;
    transition: all 0.5s ease;
    pointer-events: none;
}

.block-image-container {
    width: 100%;
    height: 200px;
    overflow: hidden;
    background: var(--navy);
    position: relative;
}

.block-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(0.6);
    opacity: 0.9;
    transition: filter 0.5s ease, opacity 0.5s ease;
}

.block-side-left {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 20px;
    background: rgba(200, 200, 200, 0.5);
    transform: skewY(-45deg);
    transform-origin: right top;
    margin-left: -20px;
    transition: all 0.5s ease;
    z-index: -1;
}

.block-side-bottom {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 20px;
    width: 100%;
    background: rgba(180, 180, 180, 0.3);
    transform: skewX(-45deg);
    transform-origin: left top;
    margin-bottom: -20px;
    transition: all 0.5s ease;
    z-index: -1;
}

.customer-label {
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 15px;
    text-align: center;
}

.customer-label span {
    color: var(--navy);
    font-weight: 900;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    line-height: 1.4;
}

.customer-3d-block:hover {
    transform: rotate(-25deg) skew(20deg) translate(25px, -25px);
    background: var(--white);
    border-color: var(--cyan);
    z-index: 20;
}

.customer-3d-block:hover .block-side-left {
    background: var(--cyan);
    box-shadow: -15px 0 30px rgba(1, 209, 251, 0.4);
}

.customer-3d-block:hover .block-side-bottom {
    background: var(--mid-blue);
    box-shadow: 0 15px 30px rgba(0, 109, 196, 0.3);
}

.customer-3d-block:hover::before {
    opacity: 0.5;
    transform: translate(-60px, 50px) scale(1.2) rotate(5deg);
    filter: blur(25px);
}

/* --- WATERMARKS --- */
.section-watermark {
    position: absolute;
    top: 60px;
    left: 50%;
    transform: translateX(-50%);
    font-weight: 900;
    text-transform: uppercase;
    color: var(--white);
    opacity: 0.05;
    pointer-events: none;
    user-select: none;
    white-space: nowrap;
    font-size: clamp(4rem, 8vw, 10rem);
    line-height: 0.8;
    z-index: 0;
    will-change: transform;
}

/* --- UI COMPONENTS --- */
.glass-card {
    background: rgba(230, 244, 254, 0.05);
    backdrop-filter: blur(24px);
    border: 1px solid rgba(1, 209, 251, 0.2);
    border-radius: 24px;
    color: var(--white);
    transition: all 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
}

.t-diagram {
    display: grid;
    grid-template-columns: 1fr 2fr 1fr;
    gap: 12px;
}

.horizontal-bar {
    grid-column: 1 / span 3;
    background: linear-gradient(to bottom, var(--mid-blue), var(--cyan));
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    font-weight: 900;
    color: var(--white);
    letter-spacing: 0.25em;
}

.vertical-pillar {
    grid-column: 2 / span 1;
    background: linear-gradient(180deg, var(--cyan), var(--teal));
    border-radius: 12px;
    padding: 2.5rem;
    min-height: 280px;
    color: var(--navy);
}

.active-node {
    animation: pulse-node 2.5s infinite ease-in-out;
}

/* --- FOOTER (Solid Navy) --- */
footer.global-footer {
    background-color: var(--navy) !important;
    position: relative;
    z-index: 500;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

@keyframes pulse-node {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(1, 209, 251, 0.4);
    }

    70% {
        transform: scale(1.1);
        box-shadow: 0 0 0 20px rgba(1, 209, 251, 0);
    }

    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(1, 209, 251, 0);
    }
}