/**
 * Venus Freightways - Animations & Effects
 * AOS, GSAP, and custom animations
 */

/* ============================
   AOS ANIMATIONS
   ============================ */
[data-aos] {
    opacity: 0;
    transition-property: opacity, transform;
    transition-duration: 0.8s;
    transition-timing-function: cubic-bezier(0.25, 1, 0.5, 1);
}
[data-aos].aos-animate {
    opacity: 1;
}

[data-aos="fade-up"] {
    transform: translateY(40px);
}
[data-aos="fade-up"].aos-animate {
    transform: translateY(0);
}

[data-aos="fade-down"] {
    transform: translateY(-40px);
}
[data-aos="fade-down"].aos-animate {
    transform: translateY(0);
}

[data-aos="fade-left"] {
    transform: translateX(40px);
}
[data-aos="fade-left"].aos-animate {
    transform: translateX(0);
}

[data-aos="fade-right"] {
    transform: translateX(-40px);
}
[data-aos="fade-right"].aos-animate {
    transform: translateX(0);
}

[data-aos="zoom-in"] {
    transform: scale(0.9);
}
[data-aos="zoom-in"].aos-animate {
    transform: scale(1);
}

[data-aos="zoom-out"] {
    transform: scale(1.1);
}
[data-aos="zoom-out"].aos-animate {
    transform: scale(1);
}

/* Delay classes */
[data-aos-delay="100"] { transition-delay: 0.1s; }
[data-aos-delay="200"] { transition-delay: 0.2s; }
[data-aos-delay="300"] { transition-delay: 0.3s; }
[data-aos-delay="400"] { transition-delay: 0.4s; }
[data-aos-delay="500"] { transition-delay: 0.5s; }
[data-aos-delay="600"] { transition-delay: 0.6s; }

/* ============================
   HERO SECTION ANIMATIONS
   ============================ */
.hero-section {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    overflow: hidden;
}

@media (max-width: 991px) {
    .hero-section {
        min-height: auto;
        padding: 120px 0 60px;
    }
}
.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
}
.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        135deg,
        rgba(12, 12, 12, 0.92) 0%,
        rgba(12, 12, 12, 0.75) 50%,
        rgba(12, 12, 12, 0.6) 100%
    );
    z-index: 1;
}
.hero-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    pointer-events: none;
}
.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: var(--color-gold);
    border-radius: 50%;
    opacity: 0.4;
    animation: particleFloat linear infinite;
}
@keyframes particleFloat {
    0% {
        transform: translateY(100vh) translateX(0);
        opacity: 0;
    }
    10% {
        opacity: 0.4;
    }
    90% {
        opacity: 0.4;
    }
    100% {
        transform: translateY(-100vh) translateX(100px);
        opacity: 0;
    }
}

.hero-content {
    position: relative;
    z-index: 3;
    padding: 140px 0 80px;
    width: 100%;
}
.hero-label {
    font-family: var(--font-accent);
    font-size: 14px;
    font-weight: 500;
    color: var(--color-gold);
    letter-spacing: 4px;
    text-transform: uppercase;
    margin-bottom: 20px;
    display: inline-block;
    opacity: 0;
    animation: fadeSlideUp 0.8s ease 0.3s forwards;
}
.hero-title {
    font-family: var(--font-display);
    font-size: 72px;
    font-weight: 700;
    color: var(--color-white);
    line-height: 1.05;
    letter-spacing: -0.02em;
    margin-bottom: 20px;
    opacity: 0;
    animation: fadeSlideUp 0.8s ease 0.5s forwards;
}
.hero-title .gold {
    color: var(--color-gold);
}
.hero-subtitle {
    font-size: 20px;
    color: var(--color-white-muted);
    max-width: 560px;
    margin-bottom: 20px;
    line-height: 1.7;
    opacity: 0;
    animation: fadeSlideUp 0.8s ease 0.7s forwards;
}
.hero-buttons {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 40px;
    opacity: 0;
    animation: fadeSlideUp 0.8s ease 0.9s forwards;
}
.hero-trust {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    opacity: 0;
    animation: fadeSlideUp 0.8s ease 1.1s forwards;
}

@keyframes fadeSlideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Hero Phone Frame */
.hero-phone-frame {
    position: relative;
    width: 280px;
    max-width: 280px;
    flex-shrink: 0;
    margin: 0;
    opacity: 0;
    animation: phoneSlideIn 1s ease 0.3s forwards;
}

@media (max-width: 1400px) {
    .hero-phone-frame {
        width: 250px;
        max-width: 250px;
    }
}

@media (max-width: 1200px) {
    .hero-phone-frame {
        width: 220px;
        max-width: 220px;
    }
}
@keyframes phoneSlideIn {
    from {
        opacity: 0;
        transform: translateX(60px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}
.phone-frame-shell {
    position: relative;
    background: linear-gradient(145deg, #2a2a2a, #1a1a1a);
    border-radius: 48px;
    padding: 12px;
    box-shadow: 
        0 0 0 2px rgba(191, 155, 66, 0.2),
        0 40px 80px rgba(0, 0, 0, 0.5),
        0 0 60px rgba(191, 155, 66, 0.1);
}
.phone-notch {
    position: absolute;
    top: 12px;
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    height: 28px;
    background: #1a1a1a;
    border-radius: 0 0 20px 20px;
    z-index: 5;
}
.phone-screen {
    border-radius: 40px;
    overflow: hidden;
    position: relative;
    aspect-ratio: 9/18;
    background: var(--color-dark);
}
.phone-screen img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
    transition: opacity 0.8s ease;
}
.phone-screen img.active {
    opacity: 1;
}

/* ============================
   TICKER ANIMATION
   ============================ */
.ticker-wrapper {
    overflow: hidden;
    width: 100%;
    position: absolute;
    bottom: 80px;
    left: 0;
    z-index: 3;
    pointer-events: none;
    opacity: 0;
    animation: fadeSlideUp 0.8s ease 1.3s forwards;
}
.ticker-track {
    display: flex;
    width: max-content;
    animation: tickerScroll 30s linear infinite;
}
.ticker-text {
    font-family: var(--font-display);
    font-size: 120px;
    font-weight: 700;
    color: transparent;
    -webkit-text-stroke: 1px rgba(191, 155, 66, 0.15);
    white-space: nowrap;
    padding-right: 40px;
    letter-spacing: -0.02em;
    text-transform: uppercase;
}
@keyframes tickerScroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* ============================
   AIRPLANE ANIMATION SECTION
   ============================ */
.airplane-section {
    background: linear-gradient(180deg, var(--color-dark) 0%, var(--color-emerald-dark) 100%);
    padding: 100px 0;
    position: relative;
    overflow: hidden;
}
.airplane-container {
    position: relative;
    height: 300px;
    margin: 40px 0;
}
.airplane {
    position: absolute;
    top: 30px;
    font-size: 64px;
    color: var(--color-gold);
    animation: truckDrive 12s linear infinite;
    filter: drop-shadow(0 10px 30px rgba(191, 155, 66, 0.4));
    z-index: 2;
}
@keyframes truckDrive {
    0% { left: -15%; transform: translateY(0); }
    20% { transform: translateY(-6px); }
    40% { transform: translateY(3px); }
    60% { transform: translateY(-4px); }
    80% { transform: translateY(2px); }
    100% { left: 110%; transform: translateY(0); }
}
.airplane-trail {
    position: absolute;
    top: 57px;
    left: 0;
    width: 100%;
    height: 2px;
    background: repeating-linear-gradient(
        90deg,
        var(--color-gold) 0px,
        var(--color-gold) 12px,
        transparent 12px,
        transparent 24px
    );
    opacity: 0.25;
}

/* Map pins */
.map-pins {
    position: absolute;
    bottom: 40px;
    left: 0;
    width: 100%;
    height: 120px;
}
.map-pin {
    position: absolute;
    color: var(--color-gold);
    font-size: 20px;
    animation: pinBounce 2s ease-in-out infinite;
    cursor: pointer;
    transition: var(--transition-fast);
}
.map-pin:hover {
    transform: scale(1.3);
    color: var(--color-gold-light);
}
.map-pin::after {
    content: attr(data-city);
    position: absolute;
    top: -26px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
    color: var(--color-gold-light);
    font-family: var(--font-body);
    letter-spacing: 0.5px;
    background: rgba(3, 54, 49, 0.85);
    padding: 2px 7px;
    border-radius: 4px;
    opacity: 1;
    transition: opacity 0.3s ease;
}
.map-pin:hover::after {
    opacity: 1;
    color: var(--color-white);
}
@keyframes pinBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

/* Canada map outline */
.canada-map {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    max-width: 900px;
    opacity: 0.15;
}

/* ============================
   MARQUEE / CLIENT LOGOS
   ============================ */
.marquee-section {
    overflow: hidden;
    padding: 60px 0;
}
.marquee-track {
    display: flex;
    width: max-content;
    animation: marqueeScroll 25s linear infinite;
}
.marquee-item {
    padding: 0 40px;
    font-family: var(--font-accent);
    font-size: 24px;
    font-weight: 600;
    color: var(--color-white-muted);
    white-space: nowrap;
    opacity: 0.5;
    transition: var(--transition-fast);
}
.marquee-item:hover {
    opacity: 1;
    color: var(--color-gold);
}
@keyframes marqueeScroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* ============================
   VALUE CARDS (About)
   ============================ */
.value-card {
    text-align: center;
    padding: 32px 20px;
    background: var(--color-surface);
    border-radius: var(--radius-md);
    border: 1px solid rgba(191, 155, 66, 0.1);
    transition: var(--transition-smooth);
    height: 100%;
}
.value-card:hover {
    border-color: var(--color-border);
    transform: translateY(-8px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
}
.value-card .icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--color-gold-dim);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 24px;
    color: var(--color-gold);
}
.value-card h4 {
    font-family: var(--font-display);
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--color-white);
}
.value-card p {
    font-size: 14px;
    color: var(--color-white-muted);
    line-height: 1.6;
}

/* ============================
   PARALLAX GRID
   ============================ */
.grid-container {
    position: relative;
    width: 100%;
    overflow: hidden;
    background: var(--color-dark);
}
.grid-column-grid {
    width: 100%;
    padding: 5vh 2vw;
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1rem;
    list-style: none;
    margin: 0;
}
.grid-column-item {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}
.grid-column-item-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}
.grid-img {
    border-radius: 12px;
    overflow: hidden;
    will-change: transform;
}
.grid-img img {
    width: 100%;
    aspect-ratio: 4/5;
    object-fit: cover;
    display: block;
    transition: filter 0.4s ease;
}
.grid-img img:hover {
    filter: brightness(1.15);
}
.grid-text {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: clamp(32px, 5vw, 72px);
    color: var(--color-gold);
    font-family: var(--font-display);
    font-weight: 700;
    line-height: 0.9;
    text-transform: uppercase;
    text-align: center;
    z-index: 10;
    pointer-events: none;
    text-shadow: 0 4px 60px rgba(0, 0, 0, 0.9);
    white-space: normal;
    width: max-content;
    max-width: 92vw;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}
.grid-text.grid-text-visible {
    opacity: 1;
    visibility: visible;
}
.grid-text span {
    display: block;
    font-size: 0.48em;
    color: var(--color-white);
    margin-top: 12px;
    letter-spacing: 0.15em;
    font-weight: 500;
    white-space: normal;
}

/* ============================
   STATS SECTION
   ============================ */
.stats-section {
    position: relative;
    background: linear-gradient(135deg, #0a0a0a 0%, #111008 50%, #0a0a0a 100%);
    padding: 80px 0 90px;
    overflow: hidden;
}
.stats-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(circle at 20% 50%, rgba(191,155,66,0.07) 0%, transparent 50%),
        radial-gradient(circle at 80% 50%, rgba(191,155,66,0.05) 0%, transparent 50%);
    pointer-events: none;
}
/* Animated road strip */
.stats-road {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 40px;
    overflow: hidden;
}
.stats-road-line {
    position: absolute;
    bottom: 14px;
    left: -100%;
    width: 300%;
    height: 3px;
    background: repeating-linear-gradient(
        to right,
        var(--color-gold) 0px,
        var(--color-gold) 60px,
        transparent 60px,
        transparent 120px
    );
    animation: roadMove 4s linear infinite;
    opacity: 0.35;
}
.stats-truck-icon {
    position: absolute;
    bottom: 6px;
    left: -60px;
    font-size: 22px;
    color: var(--color-gold);
    opacity: 0.7;
    transition: left 0s;
}
.stats-truck-icon.stats-truck-animate {
    animation: truckDrive 5s linear forwards;
}
@keyframes roadMove {
    from { transform: translateX(0); }
    to   { transform: translateX(33.333%); }
}
@keyframes truckDrive {
    from { left: -60px; }
    to   { left: calc(100% + 60px); }
}

/* Text */
.stats-eyebrow {
    font-family: var(--font-accent);
    font-size: 12px;
    letter-spacing: 4px;
    color: var(--color-gold);
    text-align: center;
    margin-bottom: 12px;
    font-weight: 600;
}
.stats-headline {
    font-family: var(--font-display);
    font-size: clamp(28px, 4vw, 52px);
    font-weight: 700;
    color: var(--color-white);
    text-align: center;
    text-transform: uppercase;
    margin-bottom: 60px;
    line-height: 1.1;
}
.stats-headline span {
    color: var(--color-gold);
}

/* Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
}

/* Stat card */
.stat-card {
    text-align: center;
    padding: 40px 24px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(191,155,66,0.12);
    border-radius: 16px;
    transition: border-color 0.3s ease, transform 0.3s ease, background 0.3s ease;
}
.stat-card:hover {
    border-color: rgba(191,155,66,0.4);
    transform: translateY(-6px);
    background: rgba(191,155,66,0.06);
}
.stat-icon-wrap {
    font-size: 32px;
    color: var(--color-gold);
    margin-bottom: 20px;
    opacity: 0.85;
}
.stat-count-num {
    font-family: var(--font-display);
    font-size: clamp(44px, 5vw, 68px);
    font-weight: 800;
    color: var(--color-white);
    line-height: 1;
    margin-bottom: 10px;
    letter-spacing: -1px;
}
.stat-card-label {
    font-family: var(--font-accent);
    font-size: 13px;
    letter-spacing: 2px;
    color: var(--color-white-muted);
    text-transform: uppercase;
    font-weight: 500;
}

@media (max-width: 767px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    .stat-card {
        padding: 28px 16px;
    }
    .stats-section {
        padding: 60px 0 70px;
    }
}
@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: 0.75rem;
    }
}

/* ============================
   RESPONSIVE PARALLAX
   ============================ */
@media (max-width: 991px) {
    .grid-column-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 0.75rem;
        padding: 5vh 2vw;
    }
    .hero-title {
        font-size: 44px;
    }
    .ticker-text {
        font-size: 60px;
    }
    /* hero-content padding reset for tablet */
    .hero-content {
        padding: 0;
    }
    /* Truck section: compact on tablet */
    .airplane-section {
        padding: 60px 0 40px;
    }
    .airplane-container {
        height: 220px;
        margin: 24px 0 10px;
    }
    .map-pins {
        bottom: 0;
        height: 80px;
    }
    /* Map pin labels smaller on tablet */
    .map-pin::after {
        font-size: 10px;
        padding: 2px 5px;
    }
}
@media (max-width: 767px) {
    .grid-column-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.5rem;
        padding: 4vh 2vw;
    }
    .hero-title {
        font-size: 32px;
    }
    .hero-subtitle {
        font-size: 15px;
    }
    .hero-label {
        font-size: 12px;
        letter-spacing: 2px;
    }
    .ticker-wrapper {
        bottom: 30px;
    }
    .ticker-text {
        font-size: 36px;
    }
    /* Truck section: compact on mobile */
    .airplane-section {
        padding: 50px 0 30px;
    }
    .airplane-container {
        height: 175px;
        margin: 20px 0 0;
    }
    .airplane {
        top: 18px;
    }
    .airplane-trail {
        top: 42px;
    }
    .map-pins {
        bottom: 0;
        height: 55px;
    }
    .map-pin {
        font-size: 15px;
    }
    .map-pin::after {
        font-size: 9px;
        padding: 1px 4px;
        top: -22px;
    }
    .canada-map {
        width: 95%;
        opacity: 0.1;
    }
    .wormhole-ui-text {
        font-size: 11px;
        letter-spacing: 1px;
    }
    /* Hero section min-height on mobile */
    .hero-section {
        min-height: auto;
        padding: 100px 0 70px;
    }
    .hero-content {
        padding: 0;
    }
    /* Phone frame hidden on mobile (already via d-none d-lg-flex) */
    .hero-trust {
        gap: 8px;
    }
}
@media (max-width: 575px) {
    .hero-title {
        font-size: 28px;
    }
    .hero-label {
        font-size: 12px;
        letter-spacing: 2px;
    }
    .ticker-text {
        font-size: 30px;
    }
    .marquee-item {
        font-size: 16px;
        padding: 0 20px;
    }
    /* Truck section: very compact on small phones */
    .airplane-section {
        padding: 40px 0 20px;
    }
    .airplane-container {
        height: 160px;
        margin: 16px 0 0;
    }
}
