/* ============================================================
   SIMPLIFY — VISUAL EFFECTS
   Scroll-reveal, sticky nav, progress bar, image reveal, tilt
   ============================================================ */

/* ── SCROLL PROGRESS BAR ──────────────────────────────────────── */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    width: 0%;
    background: linear-gradient(90deg, var(--blue), var(--accent));
    z-index: 10000;
    transition: width 0.1s linear;
    pointer-events: none;
}

/* ── STICKY NAV TRANSITION ────────────────────────────────────── */
.site-nav {
    transition: background 0.3s ease, box-shadow 0.3s ease, backdrop-filter 0.3s ease;
}
.site-nav.nav--scrolled {
    background: rgba(13, 27, 42, 0.95) !important;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

/* ── SCROLL-REVEAL ────────────────────────────────────────────── */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Directional variants for split layouts */
.split > .reveal:first-child {
    transform: translateX(-40px);
}
.split > .reveal:first-child.revealed {
    transform: translateX(0);
}
.split > .reveal:last-child {
    transform: translateX(40px);
}
.split > .reveal:last-child.revealed {
    transform: translateX(0);
}

/* ── IMAGE REVEAL ─────────────────────────────────────────────── */
.img-reveal {
    opacity: 0;
    transform: scale(0.92);
    transition: opacity 0.7s ease, transform 0.7s ease;
}
.img-reveal.img-revealed {
    opacity: 1;
    transform: scale(1);
}

/* ── CARD TILT — smooth return ────────────────────────────────── */
.aircraft-card,
.card,
.mission-card,
.config-option {
    transition: transform 0.15s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    will-change: transform;
}

/* ── HERO PARALLAX — ensure background-attachment works ────────── */
.page-hero,
.home-hero,
.cta-banner {
    background-attachment: scroll; /* JS handles the parallax offset */
    will-change: background-position;
}

/* ── PULL QUOTE — reveal with scale ───────────────────────────── */
.pull-quote.reveal {
    transform: scale(0.95);
}
.pull-quote.revealed {
    transform: scale(1);
}

/* ── FAQ ITEMS — slide from left ──────────────────────────────── */
.faq-item.reveal {
    transform: translateX(-20px);
}
.faq-item.revealed {
    transform: translateX(0);
}

/* ── SECTION HEADERS — fade down ──────────────────────────────── */
.section-header.reveal {
    transform: translateY(-15px);
}
.section-header.revealed {
    transform: translateY(0);
}

/* ── FLOATING RESERVE CTA ────────────────────────────────── */
.floating-cta {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: var(--accent);
    color: var(--white);
    font-family: var(--font-display);
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 0.85rem 1.5rem;
    border-radius: 50px;
    box-shadow: 0 4px 20px rgba(230, 57, 70, 0.4);
    z-index: 8000;
    opacity: 0;
    transform: translateY(20px) scale(0.9);
    transition: opacity 0.3s ease, transform 0.3s ease, box-shadow 0.2s ease;
    pointer-events: none;
    text-decoration: none;
}
.floating-cta.visible {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}
.floating-cta:hover {
    box-shadow: 0 6px 30px rgba(230, 57, 70, 0.6);
    transform: translateY(-2px) scale(1.05);
}

/* ── CURSOR SPOTLIGHT ON DARK SECTIONS ───────────────────── */
.has-spotlight {
    --spot-x: 50%;
    --spot-y: 50%;
    position: relative;
}
.has-spotlight::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(
        400px circle at var(--spot-x) var(--spot-y),
        rgba(255, 255, 255, 0.04) 0%,
        transparent 100%
    );
    pointer-events: none;
    z-index: 1;
    transition: opacity 0.15s ease;
}

/* ── MAGNETIC BUTTONS ────────────────────────────────────── */
.btn--accent,
.btn--primary,
.btn--blue {
    transition: transform 0.15s ease, background 0.2s ease, box-shadow 0.2s ease;
    will-change: transform;
}

/* ── DIVIDER ANIMATIONS ──────────────────────────────────── */
.divider--animate {
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.6s ease;
}
.divider--visible {
    transform: scaleX(1);
}

/* ── SKELETON LOADING SHIMMER ────────────────────────────── */
.skeleton-loading {
    position: relative;
    overflow: hidden;
}
.skeleton-loading::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.06) 40%,
        rgba(255, 255, 255, 0.12) 50%,
        rgba(255, 255, 255, 0.06) 60%,
        rgba(255, 255, 255, 0) 100%
    );
    animation: shimmer 1.5s infinite;
    z-index: 2;
}
@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* ── TYPED CURSOR ───────────────────────────────────────── */
.home-hero__subhead strong {
    display: inline-block;
    min-height: 1.2em;
    padding-right: 2px;
}

/* ── LIVE COST CALCULATOR ─────────────────────────────────── */
.cost-calc {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    padding: var(--space-xl);
    margin-top: var(--space-xl);
}
.cost-calc__title {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--white);
    margin-bottom: var(--space-lg);
}
.calc-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.6rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.75);
    font-size: 0.9rem;
    cursor: pointer;
    transition: color 0.15s ease;
}
.calc-row:hover { color: var(--white); }
.calc-row label {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    cursor: pointer;
    flex: 1;
}
.calc-row input[type="checkbox"] {
    accent-color: var(--blue);
    width: 18px;
    height: 18px;
    cursor: pointer;
}
.calc-row__price {
    font-family: var(--font-display);
    font-weight: 700;
    color: var(--white);
    white-space: nowrap;
}
.calc-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: var(--space-lg);
    padding-top: var(--space-lg);
    border-top: 2px solid var(--blue);
}
.calc-total__label {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--white);
}
.calc-total__value {
    font-family: var(--font-display);
    font-size: 2.2rem;
    font-weight: 900;
    color: var(--accent);
    transition: transform 0.2s ease;
}
.calc-total--flash {
    transform: scale(1.1);
}

/* ── PAGE TRANSITION FADE ────────────────────────────────── */
@keyframes pageFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}
body.page-loaded {
    animation: pageFadeIn 0.3s ease forwards;
}

/* ── BACK TO TOP BUTTON ──────────────────────────────────── */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    left: 2rem;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--navy);
    color: var(--white);
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
    cursor: pointer;
    z-index: 8000;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.3s ease, transform 0.3s ease, background 0.2s ease;
    pointer-events: none;
}
.back-to-top.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}
.back-to-top:hover {
    background: var(--blue);
    transform: translateY(-2px);
}

/* ── EASTER EGG FLYBY ────────────────────────────────────── */
.flyby-plane {
    position: fixed;
    font-size: 4rem;
    z-index: 99999;
    top: 40%;
    left: -100px;
    animation: flybyMove 3.5s ease-in-out forwards;
    pointer-events: none;
    filter: drop-shadow(0 4px 12px rgba(0,0,0,0.4));
}
.flyby-trail {
    position: fixed;
    top: calc(40% + 28px);
    left: -100px;
    width: 200px;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--blue), transparent);
    z-index: 99998;
    animation: flybyMove 3.5s ease-in-out forwards;
    pointer-events: none;
}
.flyby-banner {
    position: fixed;
    top: calc(40% + 50px);
    left: 50%;
    transform: translateX(-50%);
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--accent);
    z-index: 99997;
    opacity: 0;
    animation: flybyBanner 3.5s ease forwards;
    pointer-events: none;
    text-shadow: 0 2px 8px rgba(0,0,0,0.5);
}
@keyframes flybyMove {
    0%   { left: -100px; }
    100% { left: calc(100vw + 100px); }
}
@keyframes flybyBanner {
    0%   { opacity: 0; transform: translateX(-50%) scale(0.8); }
    20%  { opacity: 1; transform: translateX(-50%) scale(1); }
    70%  { opacity: 1; transform: translateX(-50%) scale(1); }
    100% { opacity: 0; transform: translateX(-50%) scale(0.8); }
}

/* ── RESPECT REDUCED MOTION ───────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
    .reveal,
    .img-reveal,
    .scroll-progress,
    .site-nav,
    .divider--animate,
    .floating-cta {
        transition: none !important;
    }
    .reveal {
        opacity: 1 !important;
        transform: none !important;
    }
    .img-reveal {
        opacity: 1 !important;
        transform: none !important;
    }
    .divider--animate {
        transform: scaleX(1) !important;
    }
    .skeleton-loading::after {
        animation: none !important;
    }
    body {
        opacity: 1 !important;
    }
    .flyby-plane, .flyby-trail, .flyby-banner {
        animation: none !important;
        display: none !important;
    }
}
