@import "tailwindcss";

* {
    box-sizing: border-box;
    font-family: var(--font-family);
}

html {
    font-size: 62.5%;
    /* 1rem = 10px */
}

@font-face {
    font-family: 'Bricolage';
    src: url('../fonts/Bricolage_Grotesque/BricolageGrotesque-VariableFont_opsz,wdth,wght.ttf') format('truetype');
    font-weight: 200 800;
    font-stretch: 75% 100%;
    font-display: swap;
}

:root {
    --color-white: #ffffff;
    --color-black: #000000;
    --color-orange: #F37440;
    --color-navy: #211E68;
    --color-grey: #F2F2F2;
    --color-darkblue: #212D71;
    --font-family: 'Bricolage', sans-serif;
    --font-Bricolage: 'Bricolage', sans-serif;
}

@media (max-width: 1600px) {
    html {
        font-size: 55%;
    }
}

@media (max-width: 1366px) {
    html {
        font-size: 50%;
    }
}

/* Phones use the same 50% (1rem = 8px) as the range above, so the smallest text (1.4rem) stays above 11px. */

/* ==========================================================================
   Banner – truck entrance animation
   Layout/sizing lives in the Tailwind utilities on #banner in index.html.
   Only the keyframes and the animation hooks (class added by main.js) are
   kept here because Tailwind utilities cannot express them cleanly.
   ========================================================================== */
.banner-truck.is-entering {
    animation: banner-truck-enter var(--duration) var(--ease) 0.2s both;
}

/* Same duration, delay & easing as the truck -> wheels roll in sync and slow down as it settles */
.banner-truck.is-entering .banner-wheel img {
    animation:
        banner-wheel-spin var(--duration) var(--ease) 0.2s both,
        banner-wheel-blur 1s ease-out 0.2s both;
}

@keyframes banner-truck-enter {
    from {
        transform: translate3d(var(--start-x), 0, 0);
    }

    to {
        transform: translate3d(0, 0, 0);
    }
}

@keyframes banner-wheel-spin {
    from {
        transform: translate(-50%, -50%) scaleX(var(--k)) rotate(0turn);
    }

    to {
        transform: translate(-50%, -50%) scaleX(var(--k)) rotate(var(--spin));
    }
}

/* Soft motion blur while spinning fast (avoids strobing on the rim holes) */
@keyframes banner-wheel-blur {
    from {
        filter: blur(1.6px);
    }

    to {
        filter: blur(0);
    }
}

/* Reduced motion: final state, no entrance (truck transform is reset via motion-reduce: utilities) */
@media (prefers-reduced-motion: reduce) {

    .banner-truck.is-entering,
    .banner-truck.is-entering .banner-wheel img {
        animation: none;
    }
}

.step-circle {
    transition: border-color 0.3s ease;
}

.circle-progress {
    transition: stroke-dashoffset 2.5s linear;
}

.step-icon {
    filter: brightness(0);
    transition: filter 0.3s ease;
}

.process-step.completed .step-circle {
    border-color: #F2652B;
}

.process-step.completed .step-icon {
    filter: brightness(0) saturate(100%) invert(48%) sepia(75%) saturate(1280%) hue-rotate(337deg) brightness(101%) contrast(101%);
}

.line-progress {
    transition: width 1s linear;
}

/* Phones / small tablets: steps become a vertical timeline (circle left, text right) */
@media (max-width: 767px) {
    .process-step {
        padding-bottom: 3.6rem;
    }

    .process-step:not(:last-child)::after {
        content: "";
        position: absolute;
        left: 5rem;
        top: 10.6rem;
        bottom: 0.6rem;
        border-left: 2px dotted #C9C9C9;
    }
}

.why-choose {
    --why-w: 45.3rem;
    --why-gap: 4rem;
    --why-glow-x: 46.1%;
    --why-ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}



@media (max-width: 1279px) {
    .why-choose {
        --why-w: 36rem;
        --why-gap: 3.2rem;
        --why-glow-x: 50%;
    }
}

@media (max-width: 576px) {
    .why-choose {
        --why-w: 34rem;
        --why-gap: 2.4rem;
    }
}

.why-choose__bg-layer {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 1.1s ease;
}

.why-choose__bg-layer.is-active {
    opacity: 0.85;
}

/* Swiper (swiper.css centres .swiper with auto margins – pin it to the left edge so the glow/centre maths hold) */
.why-choose .whySwiper {
    margin-left: 0;
    margin-right: auto;
    --swiper-wrapper-transition-timing-function: var(--why-ease);
}

.why-slide {
    display: flex;
    justify-content: center;
    width: calc(var(--why-w) + var(--why-gap));
}

.why-slide__card {
    position: relative;
    width: var(--why-w);
    aspect-ratio: 453 / 520;
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
    transform-origin: center center;
    will-change: transform, opacity;
    /* duration is set by main.js (matches Swiper speed; 0 while dragging) */
    transition-property: transform, opacity;
    transition-duration: 0ms;
    transition-timing-function: var(--why-ease);
}

.why-slide__card img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
}

/* "01" counter – visible on the active card only (--act is 1 at progress 0 → 0 at |progress| ≥ 1) */
.why-slide__num {
    position: absolute;
    right: 3.8rem;
    bottom: 3.4rem;
    font-size: 6rem;
    font-weight: 300;
    line-height: 1;
    color: var(--color-white);
    opacity: var(--act, 0);
    transition: opacity 0.6s var(--why-ease);
    pointer-events: none;
}

@media (max-width: 1279px) {
    .why-slide__num {
        right: 2.6rem;
        bottom: 2.2rem;
        font-size: 4.4rem;
    }
}

@media (max-width: 576px) {
    .why-slide__num {
        right: 2.2rem;
        bottom: 1.8rem;
        font-size: 4.2rem;
    }
}

/* Copy swap: fade out → text replaced → fade in */
.why-choose__content {
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.why-choose__content.is-swapping {
    opacity: 0;
    transform: translateY(1.2rem);
}

@media (prefers-reduced-motion: reduce) {

    .why-choose__bg-layer,
    .why-choose__content,
    .why-slide__num {
        transition: none;
    }
}
/* ==========================================================================
   Quote popup (#quoteModal)
   Opened/closed by main.js, which toggles .is-open on the modal.
   ========================================================================== */
.quote-modal.is-open {
    visibility: visible;
    opacity: 1;
}

.quote-modal.is-open .quote-modal__panel {
    transform: translateY(0);
}

body.modal-open {
    overflow: hidden;
}

.quote-field {
    display: block;
    border-bottom: 0.126rem solid rgba(0, 0, 0, 0.1);
    padding-bottom: 1.1rem;
    transition: border-color 0.2s ease;
}

.quote-field:focus-within {
    border-bottom-color: var(--color-orange);
}

.quote-field.has-error {
    border-bottom-color: #D93025;
}

.quote-field__label {
    display: block;
    font-size: 1.6rem;
    color: rgba(0, 0, 0, 0.4);
    line-height: 1.2;
}

.quote-field__input {
    display: block;
    width: 100%;
    margin-top: 0.4rem;
    border: 0;
    outline: none;
    background: transparent;
    font-size: 2rem;
    font-weight: 500;
    line-height: 1.2;
    color: #1D1D1D;
}

.quote-field__input::placeholder {
    color: rgba(29, 29, 29, 0.62);
    font-weight: 400;
}

.quote-field__error {
    display: block;
    margin-top: 0.6rem;
    font-size: 1.4rem;
    color: #D93025;
}

/* Selects: hide the native arrow, show the Figma chevron instead */
.quote-select {
    position: relative;
    display: block;
}

.quote-select select {
    appearance: none;
    -webkit-appearance: none;
    padding-right: 4rem;
    cursor: pointer;
}

.quote-select select:has(option[value=""]:checked) {
    color: rgba(29, 29, 29, 0.62);
    font-weight: 400;
}

.quote-select__icon {
    position: absolute;
    right: 0.4rem;
    top: 50%;
    width: 1.86rem;
    height: auto;
    transform: translateY(-50%);
    pointer-events: none;
}

/* Date: keep the native picker but make its own indicator invisible and stretch it over the Figma calendar icon */
.quote-date input[type="date"] {
    position: relative;
    min-height: 2.4em;
}

.quote-date input[type="date"]::-webkit-calendar-picker-indicator {
    position: absolute;
    right: 0;
    top: 0;
    width: 5rem;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.quote-date input[type="date"]:invalid,
.quote-date input[type="date"].is-empty {
    color: rgba(29, 29, 29, 0.62);
    font-weight: 400;
}


@media (prefers-reduced-motion: reduce) {

    .quote-modal,
    .quote-modal__panel {
        transition: none;
    }
}

/* ==========================================================================
   About page
   ========================================================================== */
/* Hero: angled cut at the bottom right, as in the design (left edge stops at 90.1%, right edge runs to the bottom) */
.about-hero {
    clip-path: polygon(0 0, 100% 0, 100% 100%, 62% 100%, 56.6% 90.1%, 0 90.1%);
}

@media (max-width: 768px) {
    .about-hero {
        clip-path: polygon(0 0, 100% 0, 100% 100%, 72% 100%, 62% 93%, 0 93%);
    }
}

/* Vision / Mission / Values: the active card widens (704 vs 397 in the design) and turns navy.
   main.js moves .is-active on hover, focus and tap. */
.about-cards {
    display: flex;
    gap: 5.3rem;
}

.about-card {
    --card-ease: cubic-bezier(0.22, 1, 0.36, 1);
    position: relative;
    flex: 397 1 0;
    min-width: 0;
    height: 40.7rem;
    overflow: hidden;
    background: var(--color-white);
    border: 0.1rem solid rgba(0, 0, 0, 0.12);
    color: var(--color-black);
    cursor: pointer;
    outline: none;
    transition: flex-grow 0.6s var(--card-ease), background-color 0.4s ease, border-color 0.4s ease;
}

.about-card:focus-visible {
    box-shadow: 0 0 0 0.3rem var(--color-orange);
}

.about-card.is-active {
    flex-grow: 704;
    background: var(--color-navy);
    border-color: var(--color-navy);
    color: var(--color-white);
    cursor: default;
}

.about-card__title {
    display: block;
    font-size: 3.6rem;
    font-weight: 600;
    line-height: 1.2;
}

.about-card__idle {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4.6rem;
    text-align: center;
    transition: opacity 0.25s ease;
}

/* Icons keep their Figma sizes (width set inline in rem so they scale with the layout) */
.about-card__icon-lg {
    display: block;
    height: auto;
}

.about-card__detail {
    position: absolute;
    left: 5.7rem;
    bottom: 6.4rem;
    width: 49.5rem;
    opacity: 0;
    transform: translateY(1.6rem);
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.4s var(--card-ease);
}

.about-card__icon-sm {
    display: block;
    height: auto;
}

.about-card__detail .about-card__title {
    margin-top: 1.1rem;
}

.about-card__text {
    margin-top: 2.7rem;
    font-size: 1.8rem;
    line-height: 1.45;
    opacity: 0.85;
}

.about-card.is-active .about-card__idle {
    opacity: 0;
}

.about-card.is-active .about-card__detail {
    opacity: 1;
    transform: none;
    pointer-events: auto;
    transition-delay: 0.2s;
}

/* Tablets and phones: no room to widen, so stack the cards and show every description */
@media (max-width: 1024px) {
    .about-cards {
        flex-direction: column;
        gap: 2.4rem;
    }

    .about-card,
    .about-card.is-active {
        flex: none;
        height: auto;
        padding: 4rem 3.2rem;
        background: var(--color-white);
        border-color: rgba(0, 0, 0, 0.12);
        color: var(--color-black);
        cursor: default;
    }

    .about-card__idle {
        display: none;
    }

    .about-card__detail,
    .about-card.is-active .about-card__detail {
        position: static;
        width: auto;
        opacity: 1;
        transform: none;
        pointer-events: auto;
    }

    /* small icons are white (for the navy card); on the stacked white cards show them in black */
    .about-card__icon-sm {
        filter: brightness(0);
    }

    .about-card__title {
        font-size: 3rem;
    }
}

@media (prefers-reduced-motion: reduce) {

    .about-card,
    .about-card__idle,
    .about-card__detail {
        transition: none;
    }
}

/* ==========================================================================
   Service pages – Related Services cards (610 x 390 in the design)
   ========================================================================== */
.related-card {
    position: relative;
    display: block;
    aspect-ratio: 610 / 390;
    overflow: hidden;
    background: var(--color-black);
    color: var(--color-white);
}

.related-card__img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.related-card:hover .related-card__img,
.related-card:focus-visible .related-card__img {
    transform: scale(1.05);
}

.related-card__shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.15) 0%, rgba(0, 0, 0, 0.75) 100%);
}

.related-card__body {
    position: absolute;
    left: 7.6rem;
    right: 7.6rem;
    bottom: 4.6rem;
    display: flex;
    flex-direction: column;
}

.related-card__title {
    font-size: 3.4rem;
    font-weight: 500;
    line-height: 1.2;
}

.related-card__more {
    margin-top: 2rem;
    padding-top: 1.4rem;
    border-top: 0.1rem solid rgba(255, 255, 255, 0.3);
    font-size: 1.6rem;
    opacity: 0.8;
    transition: opacity 0.3s ease, color 0.3s ease;
}

.related-card:hover .related-card__more,
.related-card:focus-visible .related-card__more {
    opacity: 1;
    color: var(--color-orange);
}

.related-card:focus-visible {
    outline: 0.3rem solid var(--color-orange);
    outline-offset: -0.3rem;
}

@media (max-width: 768px) {
    .related-card__body {
        left: 3.2rem;
        right: 3.2rem;
        bottom: 3.2rem;
    }
}

/* Swiper hides arrows with .swiper-button-lock when all slides fit */
.related-prev.swiper-button-lock,
.related-next.swiper-button-lock {
    display: none;
}

/* ==========================================================================
   Contact page – HQ details left, quote card right, card lifted over the photo
   (design: card 640 wide, starts 322px above the photo's bottom edge)
   ========================================================================== */
.contact-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 64rem;
    column-gap: 6rem;
    padding-right: 9.5rem;
    align-items: start;
}

.contact-grid__form {
    position: relative;
    margin-top: -32.2rem;
}

@media (max-width: 1100px) {
    .contact-grid {
        grid-template-columns: minmax(0, 1fr);
        padding-right: 0;
    }

    .contact-grid__form {
        order: -1;
        margin-top: -6rem;
        margin-inline: 3rem;
    }
}

@media (max-width: 576px) {
    .contact-grid__form {
        margin-top: 3rem;
        margin-inline: 0;
    }
}

textarea.quote-field__input {
    line-height: 1.4;
}

/* ==========================================================================
   Our Network – city list (left) + inline India map (right, 705 x 788)
   ========================================================================== */
.network-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 70.5rem;
    column-gap: 6rem;
    padding-right: 3.5rem;
    align-items: start;
}

.network-grid__map {
    padding-top: 3.6rem;
}

@media (max-width: 1100px) {
    .network-grid {
        grid-template-columns: minmax(0, 1fr);
        row-gap: 6rem;
        padding-right: 0;
    }

    .network-grid__map {
        max-width: 60rem;
        width: 100%;
        margin-inline: auto;
        padding-top: 0;
        padding-bottom: 9rem;
    }
}

.network-city {
    border-bottom: 0.1rem solid rgba(0, 0, 0, 0.1);
}

.network-city__btn {
    display: flex;
    align-items: center;
    gap: 1rem;
    width: 100%;
    padding: 2.6rem 2rem;
    font-size: 2rem;
    text-align: left;
    color: var(--color-black);
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.network-city__btn:hover,
.network-city__btn:focus-visible {
    background: rgba(0, 0, 0, 0.05);
    outline: none;
}

.network-city.is-active .network-city__btn {
    font-weight: 600;
    background: transparent;
    cursor: default;
}

.network-city:not(:has(.network-city__details)).is-active .network-city__btn {
    background: rgba(0, 0, 0, 0.05);
}

.network-city.is-active .network-city__btn {
    padding-bottom: 1.2rem;
}

.network-city:not(:has(.network-city__details)).is-active .network-city__btn {
    padding-bottom: 2.6rem;
}

.network-city__star {
    width: 1.8rem;
    height: 1.8rem;
}

.network-city__details {
    display: none;
    padding: 0 2rem 3rem;
}

.network-city.is-active .network-city__details {
    display: block;
}

/* Map */
.india-map {
    display: block;
    width: 100%;
    height: auto;
}

.india-map .map-states path {
    fill: #333333;
    fill-opacity: 0.1;
    transition: fill 0.35s ease, fill-opacity 0.35s ease;
}

.india-map .map-states path[data-state] {
    cursor: pointer;
}

.india-map .map-states path[data-state]:hover {
    fill-opacity: 0.22;
}

.india-map .map-states path.is-active {
    fill: #292974;
    fill-opacity: 1;
}

.india-map .map-dot {
    fill: #B5B5B5;
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.india-map .map-dot.is-active {
    opacity: 0;
}

.india-map .map-pin {
    pointer-events: none;
    transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

@media (prefers-reduced-motion: reduce) {

    .india-map .map-states path,
    .india-map .map-pin {
        transition: none;
    }
}

/* ==========================================================================
   Home – Our Services cards
   Hover / keyboard focus: photo zooms and darkens, an orange rule grows under
   the title, and the description + link slide up beneath it (one title only).
   Touch screens (no hover) show the description all the time.
   ========================================================================== */
.service-card {
    --sc-ease: cubic-bezier(0.22, 1, 0.36, 1);
    position: relative;
    display: block;
    aspect-ratio: 515 / 669;
    overflow: hidden;
    isolation: isolate;
    color: var(--color-white);
    background: var(--color-black);
}

.service-card__img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.9s var(--sc-ease);
}

.service-card__shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0) 20.55%, #000000 87.37%);
}

.service-card__shade::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(16, 18, 24, 0.25) 0%, rgba(16, 18, 24, 0.85) 100%);
    opacity: 0;
    transition: opacity 0.6s var(--sc-ease);
}

.service-card__body {
    position: absolute;
    left: 4.7rem;
    right: 4.7rem;
    bottom: 2.7rem;
}

.service-card__title {
    position: relative;
    display: block;
    padding-bottom: 1.4rem;
    font-size: 3.4rem;
    font-weight: 500;
    line-height: 1.2;
}

.service-card__title::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 0;
    height: 0.3rem;
    background: var(--color-orange);
    transition: width 0.5s var(--sc-ease);
}

.service-card__reveal {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 0.6s var(--sc-ease);
}

.service-card__reveal-inner {
    min-height: 0;
    overflow: hidden;
}

.service-card__text {
    display: block;
    padding-top: 1.8rem;
    font-size: 2rem;
    line-height: 1.45;
    color: rgba(255, 255, 255, 0.85);
    opacity: 0;
    transform: translateY(1.2rem);
    transition: opacity 0.4s ease, transform 0.6s var(--sc-ease);
}

.service-card__cta {
    display: inline-flex;
    align-items: center;
    gap: 1rem;
    margin-top: 2.4rem;
    margin-bottom: 0.6rem;
    font-size: 1.8rem;
    font-weight: 600;
    opacity: 0;
    transform: translateY(1.2rem);
    transition: opacity 0.4s ease, transform 0.6s var(--sc-ease), color 0.3s ease;
}

.service-card__cta svg {
    transition: transform 0.3s ease;
}

.service-card:hover .service-card__img,
.service-card:focus-visible .service-card__img {
    transform: scale(1.06);
}

.service-card:hover .service-card__shade::after,
.service-card:focus-visible .service-card__shade::after {
    opacity: 1;
}

.service-card:hover .service-card__title::after,
.service-card:focus-visible .service-card__title::after {
    width: 6rem;
}

.service-card:hover .service-card__reveal,
.service-card:focus-visible .service-card__reveal {
    grid-template-rows: 1fr;
}

.service-card:hover .service-card__text,
.service-card:focus-visible .service-card__text {
    opacity: 1;
    transform: none;
    transition-delay: 0.08s;
}

.service-card:hover .service-card__cta,
.service-card:focus-visible .service-card__cta {
    opacity: 1;
    transform: none;
    transition-delay: 0.16s;
}

.service-card__cta:hover {
    color: var(--color-orange);
}

.service-card__cta:hover svg {
    transform: translateX(0.4rem);
}

.service-card:focus-visible {
    outline: 0.3rem solid var(--color-orange);
    outline-offset: -0.3rem;
}

/* Touch screens: no hover, so show the details from the start */
@media (hover: none) {
    .service-card__reveal {
        grid-template-rows: 1fr;
    }

    .service-card__text,
    .service-card__cta {
        opacity: 1;
        transform: none;
    }

    .service-card__title::after {
        width: 6rem;
    }

    .service-card__shade::after {
        opacity: 0.7;
    }
}

@media (max-width: 768px) {
    .service-card__body {
        left: 2.8rem;
        right: 2.8rem;
        bottom: 2.4rem;
    }

    .service-card__title {
        font-size: 3rem;
    }
}

@media (prefers-reduced-motion: reduce) {

    .service-card__img,
    .service-card__shade::after,
    .service-card__title::after,
    .service-card__reveal,
    .service-card__text,
    .service-card__cta {
        transition: none;
    }
}

/* ==========================================================================
   Home – Our Logistics Partners: white fade on the left and right edges
   ========================================================================== */
.partners-fade {
    position: relative;
}

.partners-fade::before,
.partners-fade::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    width: 22%;
    z-index: 2;
    pointer-events: none;
}

.partners-fade::before {
    left: 0;
    background: linear-gradient(90deg, #FFFFFF 0%, rgba(255, 255, 255, 0.85) 35%, rgba(255, 255, 255, 0) 100%);
}

.partners-fade::after {
    right: 0;
    background: linear-gradient(270deg, #FFFFFF 0%, rgba(255, 255, 255, 0.85) 35%, rgba(255, 255, 255, 0) 100%);
}

@media (max-width: 767px) {

    .partners-fade::before,
    .partners-fade::after {
        width: 15%;
    }
}

/* ==========================================================================
   Home – Our Network dot map (614 x 721). Grey dots are static; the black
   location dots fade/scale in one by one in random order (main.js).
   Hidden only when JS runs (html.js), so they still show without it.
   ========================================================================== */
.network-dots__svg {
    display: block;
    width: 100%;
    height: auto;
    max-width: 100%;
    overflow: visible;
}

.js .network-dots .nd-location {
    opacity: 0;
    transform: scale(0.5);
    transform-box: fill-box;
    transform-origin: center;
    will-change: opacity, transform;
}

.js .network-dots .nd-location.is-visible {
    opacity: 1;
    transform: scale(1);
    transition:
        opacity 500ms cubic-bezier(0.22, 1, 0.36, 1),
        transform 500ms cubic-bezier(0.22, 1, 0.36, 1);
}

@media (prefers-reduced-motion: reduce) {

    .js .network-dots .nd-location,
    .js .network-dots .nd-location.is-visible {
        opacity: 1;
        transform: none;
        transition: none;
    }
}

/* ==========================================================================
   Splash / loading screen (Home)
   Visible from first paint; main.js runs the timeline and removes it.
   If the script never runs, it hides itself after 8s (splash-failsafe).
   ========================================================================== */
/* Already shown this session (set in <head>) */
html.splash-skip .splash {
    display: none;
}

html.splash-active,
html.splash-active body {
    overflow: hidden;
}

.splash {
    position: fixed;
    inset: 0;
    z-index: 1000;
    overflow: hidden;
    background: #0A0A0A url("../images/loading/loading-bg.jpg") center / cover no-repeat;
    color: var(--color-white);
    animation: splash-failsafe 0.6s ease 8s forwards;
    transition: opacity 0.65s ease;
}

.splash.is-running {
    animation: none;
}

.splash.is-leaving {
    opacity: 0;
    pointer-events: none;
}

@keyframes splash-failsafe {
    to {
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
    }
}

/* Figma Splash Screen_1 (1920 x 1080): two centred lines, block centred ~37% from the top.
   "Welcome to" ~64px regular grey; "ATN Worldwide Xpress" ~130px medium white. */
.splash__title {
    position: absolute;
    z-index: 1;
    left: 50%;
    top: 37%;
    width: 100%;
    padding: 0 6rem;
    transform: translate(-50%, -50%);
    font-family: var(--font-Bricolage);
    font-size: 13rem;
    font-weight: 500;
    line-height: 1.1;
    letter-spacing: -0.01em;
    text-align: center;
}

.splash__welcome {
    display: block;
    margin-bottom: 0.15em;
    font-size: 0.53em;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.6);
}

.splash__part {
    transition: opacity 0.45s ease;
}

.splash__typed {
    font-weight: 500;
}

/* Gap between "World" and "wide" that opens up for the star */
.splash__gap {
    position: relative;
    display: inline-block;
    width: 0;
    height: 1em;
    vertical-align: -0.12em;
    transition: width 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.splash.is-star .splash__gap {
    width: 1.05em;
}

.splash__star {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 0.8em;
    height: 0.8em;
    margin: -0.4em 0 0 -0.4em;
    transform: scale(0) rotate(-90deg);
    transition: transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.splash__star svg {
    display: block;
    width: 100%;
    height: 100%;
    overflow: visible;
}

.splash.is-star .splash__star {
    transform: scale(1) rotate(0deg);
}

/* Star growth itself is driven frame-by-frame by main.js (same clock as the progress bar) */

.splash.is-growing .splash__part,
.splash.is-growing .splash__caret {
    opacity: 0;
}

.splash__caret {
    display: inline-block;
    width: 0.06em;
    height: 0.9em;
    margin-left: 0.08em;
    vertical-align: -0.1em;
    background: currentColor;
    animation: splash-caret 0.9s steps(1) infinite;
    transition: opacity 0.3s ease;
}

.splash.is-star .splash__caret {
    animation: none;
    opacity: 0;
}

@keyframes splash-caret {
    50% {
        opacity: 0;
    }
}

/* Percentage: ~290px grey digits, right edge 110px in, baseline ~40px above the bottom.
   Progress bar: thin full-width bar on the bottom edge. */
.splash__progress {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}

.splash__count {
    position: absolute;
    right: 11rem;
    bottom: -1.4rem;
    font-family: var(--font-Bricolage);
    font-size: 29rem;
    font-weight: 500;
    line-height: 1;
    letter-spacing: -0.02em;
    font-variant-numeric: tabular-nums;
    color: rgba(255, 255, 255, 0.3);
}

.splash__track {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 0.6rem;
    background: rgba(255, 255, 255, 0.12);
    overflow: hidden;
}

.splash__bar {
    width: 100%;
    height: 100%;
    background: var(--color-white);
    transform: scaleX(0);
    transform-origin: left center;
}

@media (max-width: 1024px) {
    .splash__title {
        font-size: 8rem;
    }

    .splash__count {
        right: 5rem;
        font-size: 18rem;
    }
}

@media (max-width: 576px) {
    .splash__title {
        padding: 0 2.4rem;
        font-size: 5.6rem;
    }

    .splash__count {
        right: 2.4rem;
        bottom: -0.6rem;
        font-size: 12rem;
    }
}

/* ==========================================================================
   Home – Our Logistics Customers (Figma: cards 242 x 132 on a 1294px grid)
   Default: light grey card, logo in greyscale. Hover / keyboard focus:
   white card and the logo's original colours.
   ========================================================================== */
.customer-card {
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 242 / 132;
    background: #F5F5F5;
    outline: none;
    transition: background-color 0.35s ease, box-shadow 0.35s ease;
}

.customer-card__logo {
    display: block;
    width: 75%;
    max-width: 18.2rem;
    height: auto;
    filter: grayscale(1);
    opacity: 0.55;
    transition: filter 0.35s ease, opacity 0.35s ease, transform 0.35s ease;
}

.customer-card:hover,
.customer-card:focus-within {
    background: var(--color-white);
    box-shadow: 0 0.4rem 2.4rem rgba(0, 0, 0, 0.06);
}

.customer-card:hover .customer-card__logo,
.customer-card:focus-within .customer-card__logo {
    filter: none;
    opacity: 1;
    transform: scale(1.04);
}

@media (prefers-reduced-motion: reduce) {

    .customer-card,
    .customer-card__logo {
        transition: none;
    }
}

/* Logo wall: fixed number of visible cards per screen size; main.js rotates the remaining logos in */
.customer-wall > .customer-card:nth-child(n + 11) {
    display: none;
}

@media (max-width: 1024px) {
    .customer-wall > .customer-card:nth-child(n + 9) {
        display: none;
    }
}

@media (max-width: 767px) {
    .customer-wall > .customer-card:nth-child(n + 7) {
        display: none;
    }
}

/* Swap animation: logo fades and shrinks out, new logo fades back in */
.customer-card .customer-card__logo.is-out {
    opacity: 0;
    transform: scale(0.9);
}

@media (prefers-reduced-motion: reduce) {
    .customer-card .customer-card__logo.is-out {
        transform: none;
    }
}

/* ==========================================================================
   Scroll reveals (Home) â€” driven by main.js (adds .is-revealed in view)
   data-reveal="words"   heading text: each word slides up from behind a mask
   data-reveal="up|from-left|from-right|zoom|fade|clip"   single element
   data-reveal-stagger="up|zoom"   children animate one after another
   data-reveal-delay="ms"   optional start delay
   Only active when JS runs (html.js) and motion is allowed.
   ========================================================================== */
:root {
    --rv-ease: cubic-bezier(0.22, 1, 0.36, 1);
}

@media (prefers-reduced-motion: no-preference) {

    /* word headings stay hidden until main.js has split them (no flash of the plain title) */
    html.js [data-reveal="words"]:not(.rv-ready) {
        visibility: hidden;
    }

    html.js [data-reveal]:not([data-reveal="words"]):not(.is-revealed),
    html.js [data-reveal-stagger]:not(.is-revealed) > * {
        opacity: 0;
    }

    html.js .is-revealed[data-reveal="up"] { animation: rv-up 0.9s var(--rv-ease) var(--rv-delay, 0ms) both; }
    html.js .is-revealed[data-reveal="from-left"] { animation: rv-from-left 1s var(--rv-ease) var(--rv-delay, 0ms) both; }
    html.js .is-revealed[data-reveal="from-right"] { animation: rv-from-right 1s var(--rv-ease) var(--rv-delay, 0ms) both; }
    html.js .is-revealed[data-reveal="zoom"] { animation: rv-zoom 1s var(--rv-ease) var(--rv-delay, 0ms) both; }
    html.js .is-revealed[data-reveal="fade"] { animation: rv-fade 1.2s ease var(--rv-delay, 0ms) both; }

    /* Photo wipe: block uncovers from the bottom while the photo settles from a slight zoom */
    html.js .is-revealed[data-reveal="clip"] { animation: rv-clip 1.3s var(--rv-ease) var(--rv-delay, 0ms) both; }
    html.js .is-revealed[data-reveal="clip"] > img { animation: rv-settle 1.8s var(--rv-ease) var(--rv-delay, 0ms) both; }

    html.js .is-revealed[data-reveal-stagger="up"] > * {
        animation: rv-up 0.8s var(--rv-ease) both;
        animation-delay: calc(var(--rv-delay, 0ms) + var(--rv-i, 0) * 90ms);
    }

    html.js .is-revealed[data-reveal-stagger="zoom"] > * {
        animation: rv-zoom 0.7s var(--rv-ease) both;
        animation-delay: calc(var(--rv-delay, 0ms) + var(--rv-i, 0) * 60ms);
    }

    /* Word-by-word text reveal */
    html.js [data-reveal="words"] .rv-w {
        display: inline-block;
        overflow: hidden;
        vertical-align: bottom;
        padding: 0.06em 0 0.12em;
        margin: -0.06em 0 -0.12em;
    }

    html.js [data-reveal="words"] .rv-w > span {
        display: inline-block;
        transform: translateY(110%);
    }

    html.js [data-reveal="words"].is-revealed .rv-w > span {
        transform: none;
        transition: transform 0.9s var(--rv-ease);
        transition-delay: calc(var(--rv-delay, 0ms) + var(--rv-i, 0) * 45ms);
    }
}

@keyframes rv-up { from { opacity: 0; transform: translateY(4rem); } to { opacity: 1; transform: none; } }
@keyframes rv-from-left { from { opacity: 0; transform: translateX(-6rem); } to { opacity: 1; transform: none; } }
@keyframes rv-from-right { from { opacity: 0; transform: translateX(6rem); } to { opacity: 1; transform: none; } }
@keyframes rv-zoom { from { opacity: 0; transform: scale(0.9); } to { opacity: 1; transform: none; } }
@keyframes rv-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes rv-clip { from { opacity: 1; clip-path: inset(100% 0 0 0); } to { opacity: 1; clip-path: inset(0 0 0 0); } }
@keyframes rv-settle { from { transform: scale(1.15); } to { transform: none; } }

/* Client preview mode (see PREVIEW_PAGES in main.js) */
html.preview-mode a.preview-disabled {
    cursor: default;
}

/* plain links: no hover/focus reaction; service cards keep their hover animation */
html.preview-mode a.preview-disabled:not(.service-card) {
    pointer-events: none;
}

html.preview-mode [data-preview-hide] {
    display: none !important;
}

/* Splash: "India Pvt. Ltd" on its own line under the name (space reserved so the
   title never jumps), and the caret follows whichever part is being typed */
.splash__suffix {
    display: block;
    min-height: 1.25em;
    margin-top: 0.2em;
    font-size: 0.42em;
    font-weight: 400;
    letter-spacing: 0.02em;
    color: rgba(255, 255, 255, 0.8);
}

.splash__part.is-typing::after {
    content: "";
    display: inline-block;
    width: 0.06em;
    height: 0.9em;
    margin-left: 0.08em;
    vertical-align: -0.1em;
    background: currentColor;
    animation: splash-caret 0.9s steps(1) infinite;
}

.splash.is-star .splash__part.is-typing::after {
    display: none;
}

@media (max-width: 576px) {
    .splash__suffix {
        font-size: 0.5em;
    }
}
