/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --motion-ease: cubic-bezier(0.22, 1, 0.36, 1);
    --motion-ease-soft: cubic-bezier(0.16, 1, 0.3, 1);
}

html {
    scroll-behavior: auto;
    scroll-padding-top: 110px;
    -webkit-text-size-adjust: 100%;
}

html.lenis,
html.lenis body {
    height: auto;
}

.lenis.lenis-smooth {
    scroll-behavior: auto !important;
}

.lenis.lenis-smooth [data-lenis-prevent] {
    overscroll-behavior: contain;
}

.lenis.lenis-stopped {
    overflow: hidden;
}

.lenis.lenis-scrolling iframe {
    pointer-events: none;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: #0A0A0A;
    color: #FFFFFF;
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
    -webkit-overflow-scrolling: touch;
}

body::before {
    content: "";
    position: fixed;
    top: -14vh;
    left: 50%;
    width: min(88vw, 1100px);
    height: 42vh;
    transform: translateX(-50%);
    background:
        radial-gradient(circle at 50% 50%, rgba(197, 179, 88, 0.18), rgba(197, 179, 88, 0.04) 42%, transparent 72%);
    filter: blur(34px);
    opacity: 0.55;
    pointer-events: none;
    z-index: 0;
    animation: ambientDrift 14s ease-in-out infinite alternate;
}

h1, h2, h3 {
    font-family: 'Cinzel', serif;
    font-weight: 700;
}

header,
section,
footer {
    position: relative;
    z-index: 1;
}

section[id] {
    scroll-margin-top: 110px;
}

@keyframes ambientDrift {
    from {
        transform: translateX(-52%) translateY(0);
        opacity: 0.38;
    }
    to {
        transform: translateX(-48%) translateY(16px);
        opacity: 0.62;
    }
}

@keyframes heroLift {
    from {
        opacity: 0;
        transform: translateY(28px);
        filter: blur(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
        filter: blur(0);
    }
}

@keyframes heroAura {
    from {
        transform: scale(0.96);
        opacity: 0.2;
    }
    to {
        transform: scale(1.05);
        opacity: 0.38;
    }
}

@keyframes panelSheen {
    from {
        transform: translateX(-120%) skewX(-22deg);
    }
    to {
        transform: translateX(320%) skewX(-22deg);
    }
}

@keyframes connectorFlow {
    0% {
        transform: translateX(-2px) scale(0.92);
        opacity: 0.45;
    }
    55% {
        transform: translateX(18px) scale(1);
        opacity: 1;
    }
    100% {
        transform: translateX(34px) scale(0.92);
        opacity: 0.45;
    }
}

@keyframes pinPulse {
    0% {
        transform: translate(-50%, -50%) scale(0.72);
        opacity: 0.46;
    }
    70% {
        transform: translate(-50%, -50%) scale(1.8);
        opacity: 0;
    }
    100% {
        transform: translate(-50%, -50%) scale(1.8);
        opacity: 0;
    }
}

/* Header */
header {
    position: fixed;
    top: 0;
    width: 100%;
    background-color: rgba(10, 10, 10, 0.9);
    z-index: 1000;
    padding: 1rem 2rem;
    border-bottom: 1px solid transparent;
    backdrop-filter: blur(18px);
    transition: padding 0.45s var(--motion-ease), background-color 0.45s var(--motion-ease), box-shadow 0.45s var(--motion-ease), border-color 0.45s var(--motion-ease);
}

header.is-scrolled {
    padding: 0.85rem 2rem;
    background-color: rgba(10, 10, 10, 0.94);
    border-bottom-color: rgba(197, 179, 88, 0.12);
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.32);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: 'Cinzel', serif;
    font-size: 1.5rem;
    color: #C5B358;
    letter-spacing: 0.05em;
    text-shadow: 0 0 18px rgba(197, 179, 88, 0.12);
    transition: transform 0.45s var(--motion-ease), text-shadow 0.45s var(--motion-ease);
}

nav ul {
    list-style: none;
    display: flex;
    gap: 2rem;
}

nav a {
    position: relative;
    color: #FFFFFF;
    text-decoration: none;
    transition: color 0.3s var(--motion-ease);
}

nav a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -0.42rem;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, rgba(197, 179, 88, 0), rgba(197, 179, 88, 0.95), rgba(197, 179, 88, 0));
    transform: scaleX(0.18);
    transform-origin: left;
    opacity: 0;
    transition: transform 0.45s var(--motion-ease), opacity 0.45s var(--motion-ease);
}

nav a:hover,
nav a:focus-visible {
    color: #C5B358;
}

nav a:hover::after,
nav a:focus-visible::after {
    transform: scaleX(1);
    opacity: 1;
}

/* Hero Section */
#hero {
    position: relative;
    min-height: 100dvh;
    min-height: 100svh;
    height: auto;
    overflow: hidden;
}

#hero-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    pointer-events: none;
    background: #050505;
    filter: contrast(1.05) saturate(0.92);
    transform: scale(1.02);
}

#hero-video::-webkit-media-controls,
#hero-video::-webkit-media-controls-panel,
#hero-video::-webkit-media-controls-play-button,
#hero-video::-webkit-media-controls-start-playback-button {
    display: none !important;
    appearance: none;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(10, 10, 10, 0.7), rgba(10, 10, 10, 0.9));
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: clamp(1.25rem, 4vw, 2rem);
}

.hero-overlay::before {
    content: "";
    position: absolute;
    width: min(48vw, 560px);
    height: min(48vw, 560px);
    border-radius: 50%;
    background: radial-gradient(circle, rgba(197, 179, 88, 0.18), rgba(197, 179, 88, 0.03) 48%, transparent 74%);
    filter: blur(16px);
    opacity: 0.28;
    animation: heroAura 9s ease-in-out infinite alternate;
}

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

.hero-overlay h1 {
    font-size: clamp(2.1rem, 5vw, 3rem);
    margin-bottom: 1rem;
    max-width: 800px;
    line-height: 1.08;
}

.hero-overlay p {
    font-size: clamp(1rem, 2.3vw, 1.2rem);
    margin-bottom: 2rem;
    max-width: 620px;
}

#enter-portal {
    background: transparent;
    border: 2px solid #C5B358;
    color: #C5B358;
    padding: 1rem 2rem;
    font-size: 1rem;
    width: min(100%, 18rem);
    cursor: pointer;
    transition: transform 0.32s var(--motion-ease), box-shadow 0.32s var(--motion-ease), background-color 0.32s var(--motion-ease), color 0.32s var(--motion-ease);
    font-family: 'Inter', sans-serif;
    position: relative;
    overflow: hidden;
    isolation: isolate;
    box-shadow: inset 0 0 0 1px rgba(197, 179, 88, 0.08);
}

#enter-portal::after {
    content: "";
    position: absolute;
    top: -10%;
    left: -38%;
    width: 28%;
    height: 120%;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0), rgba(255, 248, 220, 0.34), rgba(255, 255, 255, 0));
    transform: skewX(-24deg);
    pointer-events: none;
}

#enter-portal:hover {
    background-color: #C5B358;
    color: #0A0A0A;
    box-shadow: 0 0 20px rgba(197, 179, 88, 0.5);
    transform: translateY(-3px) scale(1.02);
}

#enter-portal:hover::after {
    animation: panelSheen 0.95s ease;
}

.hero-overlay h1,
.hero-overlay p,
#enter-portal {
    opacity: 0;
    transform: translateY(28px);
    filter: blur(8px);
}

body.is-loaded .hero-overlay h1 {
    animation: heroLift 1s cubic-bezier(0.18, 0.84, 0.22, 1) 0.08s forwards;
}

body.is-loaded .hero-overlay p {
    animation: heroLift 1s cubic-bezier(0.18, 0.84, 0.22, 1) 0.2s forwards;
}

body.is-loaded #enter-portal {
    animation: heroLift 1s cubic-bezier(0.18, 0.84, 0.22, 1) 0.34s forwards;
}

/* Asset Classes Section */
#asset-classes {
    padding: 5rem 2rem;
    background-color: #1A1A1B;
    text-align: center;
}

#asset-classes h2 {
    font-size: clamp(2rem, 5vw, 2.5rem);
    margin-bottom: 3rem;
    color: #C5B358;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.category-card {
    background-color: #0A0A0A;
    border: 1px solid rgba(197, 179, 88, 0.42);
    padding: 2rem;
    transition: transform 0.45s var(--motion-ease), box-shadow 0.45s var(--motion-ease), border-color 0.45s var(--motion-ease);
    position: relative;
    overflow: hidden;
}

.category-card::before,
.map-shell::before,
.journey-card::before,
.tracking-item::before,
.package::before,
.client-session::before,
#login-form::before,
.dashboard-summary::before {
    content: "";
    position: absolute;
    top: 0;
    left: -18%;
    width: 36%;
    height: 100%;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0), rgba(255, 248, 220, 0.08), rgba(255, 255, 255, 0));
    transform: skewX(-22deg);
    opacity: 0;
    pointer-events: none;
}

.category-card:hover {
    box-shadow: 0 26px 54px rgba(0, 0, 0, 0.3), 0 0 26px rgba(197, 179, 88, 0.12);
    transform: translateY(-9px) scale(1.014);
    border-color: rgba(197, 179, 88, 0.82);
}

.category-card:hover::before,
.map-shell:hover::before,
.journey-card:hover::before,
.tracking-item:hover::before,
.package:hover::before,
.client-session:hover::before,
#login-form:hover::before,
.dashboard-summary:hover::before {
    opacity: 1;
    animation: panelSheen 1.05s ease;
}

.icon {
    margin-bottom: 1rem;
    display: flex;
    justify-content: center;
    align-items: center;
}

.icon img {
    transition: transform 0.45s var(--motion-ease), filter 0.45s var(--motion-ease);
}

.category-card:hover .icon img {
    transform: translateY(-4px) scale(1.06);
    filter: drop-shadow(0 14px 16px rgba(197, 179, 88, 0.18));
}

.category-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.category-card p {
    font-size: 1rem;
}

/* Global Tracking Section */
#global-tracking {
    padding: 5rem 2rem;
    background-color: #0A0A0A;
    text-align: center;
}

#global-tracking h2 {
    font-size: clamp(2rem, 5vw, 2.5rem);
    margin-bottom: 3rem;
    color: #C5B358;
}

#map-container {
    width: min(100%, 1200px);
    margin: 0 auto;
    height: clamp(300px, 56vw, 460px);
    background-color: #1A1A1B;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(197, 179, 88, 0.42);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.35);
    position: relative;
    overflow: hidden;
    transition: transform 0.45s var(--motion-ease), border-color 0.45s var(--motion-ease), box-shadow 0.45s var(--motion-ease);
}

#map {
    height: 100%;
    width: 100%;
    background:
        radial-gradient(circle at 18% 28%, rgba(197, 179, 88, 0.08) 0, rgba(197, 179, 88, 0.08) 6%, transparent 7%),
        radial-gradient(circle at 72% 38%, rgba(197, 179, 88, 0.06) 0, rgba(197, 179, 88, 0.06) 8%, transparent 9%),
        radial-gradient(circle at 46% 70%, rgba(197, 179, 88, 0.04) 0, rgba(197, 179, 88, 0.04) 10%, transparent 11%),
        linear-gradient(180deg, rgba(18, 18, 20, 0.96), rgba(10, 10, 10, 1)),
        repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.025) 0, rgba(255, 255, 255, 0.025) 1px, transparent 1px, transparent 160px),
        repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.03) 0, rgba(255, 255, 255, 0.03) 1px, transparent 1px, transparent 90px);
    background-color: #0A0A0A;
}

.map-error {
    position: absolute;
    inset: 0;
    z-index: 650;
    display: grid;
    place-items: center;
    padding: 1rem;
    background: linear-gradient(180deg, rgba(10, 10, 10, 0.88), rgba(10, 10, 10, 0.96));
    backdrop-filter: blur(10px);
}

.map-error[hidden] {
    display: none;
}

.map-error-panel {
    width: min(92%, 420px);
    padding: 1.1rem 1.2rem;
    border-radius: 18px;
    border: 1px solid rgba(197, 179, 88, 0.32);
    background: rgba(10, 10, 10, 0.86);
    color: #D6D0BD;
    text-align: center;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.map-error-panel strong {
    display: block;
    margin-bottom: 0.4rem;
    color: #C5B358;
    font-family: 'Cinzel', serif;
    font-size: 1.05rem;
}

.map-error-panel span {
    display: block;
    font-size: 0.92rem;
    line-height: 1.55;
}

.map-unavailable {
    width: min(92%, 360px);
    padding: 1.1rem 1.2rem;
    border-radius: 18px;
    border: 1px solid rgba(197, 179, 88, 0.28);
    background: rgba(10, 10, 10, 0.82);
    color: #D6D0BD;
    text-align: center;
    box-shadow: 0 18px 34px rgba(0, 0, 0, 0.22);
}

.map-unavailable strong {
    display: block;
    color: #C5B358;
    margin-bottom: 0.35rem;
    font-family: 'Cinzel', serif;
}

.map-shell {
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
}

.map-shell::after {
    content: "";
    position: absolute;
    inset: -20px 6% auto;
    height: 140px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(197, 179, 88, 0.18), rgba(197, 179, 88, 0.02) 55%, transparent 72%);
    filter: blur(26px);
    opacity: 0.2;
    pointer-events: none;
    animation: ambientDrift 10s ease-in-out infinite alternate;
}

.map-shell:hover::after {
    opacity: 0.32;
}

.map-shell:hover #map-container {
    transform: translateY(-6px) scale(1.006);
    border-color: rgba(197, 179, 88, 0.78);
    box-shadow: 0 34px 68px rgba(0, 0, 0, 0.38), 0 0 28px rgba(197, 179, 88, 0.12);
}

#map-container::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(110deg, rgba(255, 255, 255, 0) 18%, rgba(255, 248, 220, 0.04) 36%, rgba(255, 255, 255, 0) 58%);
    pointer-events: none;
    animation: panelSheen 12s linear infinite;
}

#map-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
    justify-content: center;
    padding: 0.9rem 1rem;
    border: 1px solid rgba(197, 179, 88, 0.35);
    border-top: none;
    background: linear-gradient(180deg, rgba(26, 26, 27, 0.95), rgba(10, 10, 10, 0.98));
    color: #D6D0BD;
    font-size: 0.9rem;
}

#map-legend span {
    transition: transform 0.28s var(--motion-ease-soft), color 0.28s var(--motion-ease-soft), opacity 0.28s var(--motion-ease-soft);
}

#map-legend span:hover {
    transform: translateY(-2px) scale(1.015);
    color: #F3EAD0;
}

.legend-swatch {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    margin-right: 0.45rem;
    border-radius: 999px;
    vertical-align: middle;
    font-size: 0.7rem;
}

.legend-route {
    background: linear-gradient(90deg, rgba(197, 179, 88, 0.2), rgba(197, 179, 88, 0.95));
    border-radius: 999px;
    width: 26px;
}

.legend-checkpoint {
    background: rgba(197, 179, 88, 0.45);
    border: 1px solid rgba(197, 179, 88, 0.8);
}

.legend-current {
    background: #C5B358;
    box-shadow: 0 0 0 4px rgba(197, 179, 88, 0.15);
}

#map-status {
    width: min(100%, 1200px);
    margin: 1rem auto 0;
    color: #D6D0BD;
    font-size: 0.95rem;
    padding: 0.85rem 1rem;
    border: 1px solid rgba(197, 179, 88, 0.2);
    background: rgba(10, 10, 10, 0.75);
}

.journey-board {
    width: min(100%, 1200px);
    margin: 1rem auto 0;
    display: grid;
    gap: 0.9rem;
}

.journey-card,
.journey-empty {
    background: linear-gradient(180deg, rgba(26, 26, 27, 0.95), rgba(10, 10, 10, 0.98));
    border: 1px solid rgba(197, 179, 88, 0.35);
    padding: 1rem 1.15rem;
    color: #D6D0BD;
    position: relative;
    overflow: hidden;
    transition: transform 0.4s var(--motion-ease), border-color 0.4s var(--motion-ease), box-shadow 0.4s var(--motion-ease);
}

.journey-card:hover {
    transform: translateY(-6px) scale(1.01);
    border-color: rgba(197, 179, 88, 0.62);
    box-shadow: 0 18px 34px rgba(0, 0, 0, 0.22);
}

.journey-card-header {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 0.85rem;
}

.journey-card-header strong {
    color: #C5B358;
}

.journey-card small {
    color: #C5B358;
}

.journey-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.45rem;
}

.journey-count,
.journey-now {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    border: 1px solid rgba(197, 179, 88, 0.28);
    background: rgba(0, 0, 0, 0.2);
    color: #D6D0BD;
    font-size: 0.78rem;
}

.journey-path {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.55rem;
    line-height: 1.8;
}

.journey-timeline {
    display: grid;
    gap: 0.65rem;
    margin-top: 1rem;
    padding-top: 0.95rem;
    border-top: 1px solid rgba(197, 179, 88, 0.14);
}

.journey-step {
    display: grid;
    grid-template-columns: 2rem minmax(0, 1fr);
    gap: 0.75rem;
    align-items: start;
}

.journey-step-marker {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 999px;
    border: 1px solid rgba(197, 179, 88, 0.36);
    background: rgba(0, 0, 0, 0.24);
    color: #C5B358;
    font-size: 0.8rem;
    font-weight: 700;
}

.journey-step.current .journey-step-marker {
    background: rgba(197, 179, 88, 0.12);
    border-color: rgba(197, 179, 88, 0.72);
    box-shadow: 0 0 0 4px rgba(197, 179, 88, 0.08);
}

.journey-step-body {
    display: grid;
    gap: 0.18rem;
    min-width: 0;
}

.journey-step-body strong {
    color: #F3EAD0;
    font-size: 0.9rem;
}

.journey-step-body span {
    color: #D6D0BD;
}

.journey-step-body small {
    color: rgba(214, 208, 189, 0.72);
}

.journey-stop {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.28rem 0.65rem;
    border: 1px solid rgba(197, 179, 88, 0.28);
    background: rgba(0, 0, 0, 0.18);
    color: #F3EAD0;
    border-radius: 999px;
    max-width: 100%;
    transition: transform 0.3s var(--motion-ease-soft), border-color 0.3s var(--motion-ease-soft), box-shadow 0.3s var(--motion-ease-soft), background-color 0.3s var(--motion-ease-soft);
}

.journey-stop.current {
    border-color: rgba(197, 179, 88, 0.7);
    box-shadow: 0 0 0 3px rgba(197, 179, 88, 0.08);
}

.journey-stop:hover {
    transform: translateY(-3px) scale(1.012);
    border-color: rgba(197, 179, 88, 0.68);
    background: rgba(16, 16, 16, 0.4);
    box-shadow: 0 10px 18px rgba(0, 0, 0, 0.16);
}

.journey-stop-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(197, 179, 88, 0.45);
    flex: 0 0 auto;
}

.journey-stop.current .journey-stop-dot {
    background: #C5B358;
    box-shadow: 0 0 10px rgba(197, 179, 88, 0.7);
}

.journey-connector {
    position: relative;
    display: inline-flex;
    width: 2.6rem;
    height: 0.8rem;
    flex: 0 0 auto;
}

.journey-connector::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    height: 2px;
    border-radius: 999px;
    background:
        repeating-linear-gradient(
            90deg,
            rgba(197, 179, 88, 0.1) 0,
            rgba(197, 179, 88, 0.1) 4px,
            rgba(197, 179, 88, 0.58) 4px,
            rgba(197, 179, 88, 0.58) 8px
        );
    transform: translateY(-50%);
    opacity: 0.75;
}

.journey-connector::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 1.1rem;
    width: 0.52rem;
    height: 0.52rem;
    border-radius: 999px;
    background: #C5B358;
    box-shadow: 0 0 8px rgba(197, 179, 88, 0.3);
    transform: translateY(-50%);
}

.checkpoint-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(197, 179, 88, 0.35);
    border: 2px solid rgba(197, 179, 88, 0.9);
    box-shadow: 0 0 12px rgba(197, 179, 88, 0.18);
    transition: transform 0.26s ease, box-shadow 0.26s ease;
}

.current-pin {
    position: relative;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #C5B358;
    border: 3px solid #0A0A0A;
    box-shadow: 0 0 0 8px rgba(197, 179, 88, 0.18), 0 0 18px rgba(197, 179, 88, 0.6);
    transition: transform 0.28s ease, box-shadow 0.28s ease;
}

.current-pin::before {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 1px solid rgba(197, 179, 88, 0.7);
    transform: translate(-50%, -50%);
    animation: pinPulse 2.6s ease-out infinite;
}

.current-pin::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 100%;
    width: 2px;
    height: 12px;
    background: linear-gradient(180deg, rgba(197, 179, 88, 0.95), rgba(197, 179, 88, 0));
    transform: translateX(-50%);
}

.leaflet-marker-icon:hover .checkpoint-dot {
    transform: scale(1.16);
    box-shadow: 0 0 16px rgba(197, 179, 88, 0.38);
}

.leaflet-marker-icon:hover .current-pin {
    transform: scale(1.08);
    box-shadow: 0 0 0 10px rgba(197, 179, 88, 0.22), 0 0 22px rgba(197, 179, 88, 0.72);
}


/* Client Portal Section */
#client-portal {
    padding: 5rem 2rem;
    background-color: #1A1A1B;
    text-align: center;
}

#client-portal h2 {
    font-size: clamp(2rem, 5vw, 2.5rem);
    margin-bottom: 3rem;
    color: #C5B358;
}

#login-form {
    width: min(100%, 400px);
    margin: 0 auto;
    position: relative;
    overflow: hidden;
}

.client-session {
    width: min(100%, 620px);
    margin: 0 auto 1.25rem;
    padding: 0.85rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    background: linear-gradient(180deg, rgba(26, 26, 27, 0.95), rgba(10, 10, 10, 0.98));
    border: 1px solid rgba(197, 179, 88, 0.35);
    color: #D6D0BD;
    position: relative;
    overflow: hidden;
    transition: transform 0.4s var(--motion-ease), border-color 0.4s var(--motion-ease), box-shadow 0.4s var(--motion-ease);
}

.client-session.is-authenticated {
    border-color: rgba(197, 179, 88, 0.65);
    box-shadow: 0 0 0 1px rgba(197, 179, 88, 0.12);
}

.client-session:hover {
    transform: translateY(-4px) scale(1.01);
    box-shadow: 0 18px 36px rgba(0, 0, 0, 0.2);
}

.client-session-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.35rem;
    text-align: left;
}

.client-session-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.22rem 0.6rem;
    border-radius: 999px;
    border: 1px solid rgba(197, 179, 88, 0.45);
    color: #C5B358;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.04rem;
    text-transform: uppercase;
}

.client-session-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.client-session button {
    background-color: #C5B358;
    color: #0A0A0A;
    border: none;
    padding: 0.55rem 0.95rem;
    cursor: pointer;
    font-weight: 700;
    transition: transform 0.28s var(--motion-ease-soft), box-shadow 0.28s var(--motion-ease-soft), background-color 0.28s var(--motion-ease-soft), color 0.28s var(--motion-ease-soft);
}

#client-login-focus {
    background: transparent;
    border: 1px solid rgba(197, 179, 88, 0.55);
    color: #D6D0BD;
}

.client-session button:hover,
.client-session button:focus-visible {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 12px 22px rgba(0, 0, 0, 0.18);
}

#login-form form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

#login-form label {
    text-align: left;
    font-weight: 600;
}

#login-form input {
    padding: 0.5rem;
    background-color: #0A0A0A;
    border: 1px solid #C5B358;
    color: #FFFFFF;
}

#login-form button {
    background-color: #C5B358;
    color: #0A0A0A;
    border: none;
    padding: 0.75rem;
    cursor: pointer;
    font-weight: 600;
    transition: transform 0.3s var(--motion-ease-soft), box-shadow 0.3s var(--motion-ease-soft), background-color 0.3s var(--motion-ease-soft), color 0.3s var(--motion-ease-soft);
}

#login-form button:hover {
    background-color: #FFFFFF;
    color: #0A0A0A;
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 14px 26px rgba(0, 0, 0, 0.18);
}

/* Footer */
footer {
    background-color: #0A0A0A;
    padding: 3rem 2rem;
    border-top: 1px solid #C5B358;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
    flex-wrap: wrap;
}

.footer-content h4 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: #C5B358;
}

.footer-content ul {
    list-style: none;
}

.footer-content li {
    margin-bottom: 0.5rem;
}

/* Dashboard Styles */
#dashboard {
    margin-top: 2rem;
    width: min(100%, 980px);
    margin-left: auto;
    margin-right: auto;
    text-align: left;
}

.dashboard-identity {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    color: #D6D0BD;
}

.dashboard-identity strong {
    color: #FFFFFF;
    font-size: 1.05rem;
}

.dashboard-pill {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.7rem;
    border-radius: 999px;
    border: 1px solid rgba(197, 179, 88, 0.45);
    color: #C5B358;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.04rem;
    text-transform: uppercase;
}

.dashboard-caption {
    opacity: 0.82;
}

.dashboard-summary {
    background: #0A0A0A;
    border: 1px solid rgba(197, 179, 88, 0.5);
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
    color: #D6D0BD;
    position: relative;
    overflow: hidden;
    transition: transform 0.4s var(--motion-ease), border-color 0.4s var(--motion-ease), box-shadow 0.4s var(--motion-ease);
}

.dashboard-summary strong {
    color: #C5B358;
}

.dashboard-summary:hover {
    transform: translateY(-4px) scale(1.008);
    border-color: rgba(197, 179, 88, 0.72);
    box-shadow: 0 18px 36px rgba(0, 0, 0, 0.18);
}

.tracking-item {
    background: linear-gradient(180deg, rgba(26, 26, 27, 0.95), rgba(10, 10, 10, 0.98));
    border: 1px solid #C5B358;
    padding: 1.25rem;
    margin: 1rem 0;
    position: relative;
    overflow: hidden;
    transition: transform 0.45s var(--motion-ease), border-color 0.45s var(--motion-ease), box-shadow 0.45s var(--motion-ease);
    overflow-wrap: anywhere;
}

.tracking-item h4 {
    color: #C5B358;
    margin-bottom: 0.5rem;
}

.tracking-item:hover {
    transform: translateY(-6px) scale(1.01);
    border-color: rgba(197, 179, 88, 0.9);
    box-shadow: 0 24px 40px rgba(0, 0, 0, 0.24);
}

.tracking-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    color: #D6D0BD;
    font-size: 0.95rem;
}

.packages {
    margin-top: 1rem;
}

.packages h5 {
    margin-bottom: 0.75rem;
    color: #FFFFFF;
}

.package {
    background: #0A0A0A;
    padding: 0.85rem 0.9rem;
    margin: 0.75rem 0;
    border-left: 3px solid #C5B358;
    position: relative;
    overflow: hidden;
    transition: transform 0.35s var(--motion-ease-soft), box-shadow 0.35s var(--motion-ease-soft), border-left-color 0.35s var(--motion-ease-soft);
    overflow-wrap: anywhere;
}

.package-header {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.package-status {
    color: #C5B358;
    font-weight: 600;
}

.package small {
    display: block;
    margin-top: 0.35rem;
    color: #D6D0BD;
}

.package-location {
    display: inline-block;
    margin-top: 0.5rem;
    padding: 0.2rem 0.55rem;
    border: 1px solid rgba(197, 179, 88, 0.5);
    color: #C5B358;
    font-size: 0.85rem;
}

.package:hover {
    transform: translateY(-4px) scale(1.01);
    border-left-color: #F3EAD0;
    box-shadow: 0 16px 28px rgba(0, 0, 0, 0.18);
}

.empty-dashboard {
    background: #0A0A0A;
    border: 1px solid rgba(197, 179, 88, 0.35);
    padding: 1rem 1.25rem;
    color: #D6D0BD;
}

.motion-reveal {
    opacity: 0;
    transform: translateY(34px) scale(0.985);
    filter: blur(8px);
    transition:
        opacity 0.82s cubic-bezier(0.18, 0.84, 0.22, 1),
        transform 0.82s cubic-bezier(0.18, 0.84, 0.22, 1),
        filter 0.82s cubic-bezier(0.18, 0.84, 0.22, 1);
    transition-delay: var(--motion-delay, 0ms);
    will-change: opacity, transform, filter;
}

.motion-reveal.is-visible {
    opacity: 1;
    transform: none;
    filter: blur(0);
}

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

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

    .motion-reveal {
        opacity: 1;
        transform: none;
        filter: none;
    }
}

@media (max-width: 1024px) {
    nav ul {
        gap: 1.25rem;
    }

    .categories-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }

    #map-container {
        height: clamp(280px, 52vw, 400px);
    }
}

@media (max-width: 768px) {
    header {
        padding: 0.85rem 1rem;
    }

    nav {
        flex-direction: column;
        gap: 0.85rem;
    }

    nav ul {
        flex-wrap: nowrap;
        justify-content: flex-start;
        gap: 0.65rem;
        overflow-x: auto;
        width: 100%;
        padding-bottom: 0.15rem;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }

    nav ul::-webkit-scrollbar {
        display: none;
    }

    nav a {
        white-space: nowrap;
    }

    .logo {
        font-size: 1.25rem;
    }

    #global-tracking,
    #asset-classes,
    #client-portal {
        padding: 3.75rem 1rem;
    }

    #hero {
        min-height: 84svh;
    }

    #map-container {
        height: 320px;
    }

    #map-legend {
        justify-content: center;
        gap: 0.7rem;
        font-size: 0.85rem;
    }

    .client-session {
        flex-direction: column;
        align-items: flex-start;
    }

    .client-session-actions {
        width: 100%;
    }

    .client-session button {
        width: 100%;
    }

    .journey-card-header,
    .journey-path {
        align-items: flex-start;
        justify-content: flex-start;
    }

    .journey-path {
        gap: 0.45rem;
    }

    .hero-overlay h1 {
        font-size: clamp(1.9rem, 8vw, 2.3rem);
        max-width: 18ch;
    }

    .hero-overlay p {
        margin-bottom: 1.5rem;
        max-width: 32ch;
    }

    #enter-portal {
        width: 100%;
    }
}

@media (max-width: 560px) {
    body {
        font-size: 15px;
    }

    header {
        padding: 0.75rem 0.85rem;
    }

    nav ul {
        gap: 0.65rem 0.85rem;
    }

    .hero-overlay {
        padding: 1rem;
    }

    .hero-overlay h1 {
        font-size: clamp(1.7rem, 9vw, 2rem);
    }

    .hero-overlay p {
        font-size: 0.98rem;
    }

    #asset-classes h2,
    #global-tracking h2,
    #client-portal h2 {
        font-size: 1.85rem;
        margin-bottom: 2rem;
    }

    .categories-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .category-card,
    .journey-card,
    .journey-empty,
    .dashboard-summary,
    .tracking-item,
    .package,
    .client-session,
    #login-form {
        padding: 1rem;
    }

    #map-container {
        height: 280px;
    }

    #map-status {
        font-size: 0.9rem;
        line-height: 1.45;
    }

    .journey-path {
        flex-direction: column;
        align-items: flex-start;
    }

    .journey-connector {
        width: 1.8rem;
        height: 0.6rem;
        margin-left: 0.55rem;
    }

    .journey-step {
        grid-template-columns: 1.6rem minmax(0, 1fr);
        gap: 0.55rem;
    }

    .journey-step-marker {
        width: 1.5rem;
        height: 1.5rem;
    }

    .client-session-actions {
        flex-direction: column;
        width: 100%;
    }

    .client-session button {
        width: 100%;
    }

    .dashboard-identity,
    .tracking-meta,
    .client-session-meta {
        gap: 0.55rem;
    }

    .dashboard-identity {
        flex-direction: column;
        align-items: flex-start;
    }

    .tracking-meta {
        flex-direction: column;
        align-items: flex-start;
    }

    .footer-content {
        flex-direction: column;
        gap: 1.5rem;
    }
}

@media (max-width: 430px) and (hover: none) and (pointer: coarse) {
    header {
        padding: 0.7rem 0.8rem;
    }

    nav {
        align-items: stretch;
    }

    nav ul {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.5rem 0.75rem;
        overflow: visible;
        width: 100%;
    }

    nav a {
        display: block;
        text-align: center;
        font-size: 0.9rem;
        padding: 0.35rem 0;
    }

    #hero {
        min-height: 78svh;
        background:
            radial-gradient(circle at 50% 38%, rgba(197, 179, 88, 0.18), rgba(10, 10, 10, 0.15) 34%, rgba(5, 5, 5, 0.96) 68%),
            linear-gradient(180deg, rgba(12, 12, 12, 0.8), rgba(5, 5, 5, 1));
    }

    #hero-video {
        display: none;
    }

    .hero-overlay {
        inset: 0;
        padding: 1rem 0.85rem 1.15rem;
        justify-content: center;
        background: linear-gradient(rgba(10, 10, 10, 0.58), rgba(10, 10, 10, 0.92));
    }

    .hero-overlay::before {
        width: 72vw;
        height: 72vw;
        opacity: 0.2;
    }

    .hero-overlay h1 {
        font-size: 1.72rem;
        line-height: 1.1;
        max-width: 16ch;
    }

    .hero-overlay p {
        font-size: 0.95rem;
        max-width: 28ch;
        margin-bottom: 1.25rem;
    }

    #enter-portal {
        width: 100%;
        max-width: 18rem;
        padding: 0.95rem 1rem;
    }

    #global-tracking,
    #asset-classes,
    #client-portal {
        padding: 3rem 0.85rem;
    }

    .categories-grid {
        grid-template-columns: 1fr;
    }

    .category-card {
        padding: 1rem;
    }

    #map-container {
        height: 240px;
    }

    #map-legend {
        gap: 0.5rem;
        padding: 0.75rem 0.85rem;
        font-size: 0.78rem;
    }

    #map-status {
        padding: 0.75rem 0.85rem;
        font-size: 0.86rem;
    }

    .journey-card,
    .journey-empty,
    .dashboard-summary,
    .tracking-item,
    .package,
    .client-session,
    #login-form {
        padding: 0.9rem;
    }

    .client-session,
    #login-form {
        width: 100%;
    }

    .client-session-meta {
        width: 100%;
    }

    .client-session-actions button,
    .client-session button,
    #login-form button {
        width: 100%;
    }

    .tracking-item h4 {
        font-size: 1rem;
    }

    .package-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.35rem;
    }

    .journey-path {
        gap: 0.35rem;
    }

    .journey-stop {
        max-width: 100%;
        white-space: normal;
    }
}
