/* ============================================================
   CSS RESET & BASE
   ============================================================ */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    /* Lenis overrides scroll; disable native smooth */
    scroll-behavior: auto;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: #000;
    color: #fff;
    overflow-x: hidden;
    letter-spacing: -0.05em;
    /* Prevent layout shift while Lenis boots */
    overscroll-behavior: none;
}

/* ============================================================
   PRELOADER
   ============================================================ */
#preloader {
    position: fixed;
    inset: 0;
    background: #000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.9s cubic-bezier(0.16, 1, 0.3, 1),
                visibility 0.9s cubic-bezier(0.16, 1, 0.3, 1);
}

#preloader.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.preloader-wordmark {
    font-size: clamp(1rem, 3vw, 1.5rem);
    font-weight: 300;
    letter-spacing: -0.04em;
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 52px;
}

.preloader-track {
    width: clamp(180px, 35vw, 300px);
    height: 1px;
    background: rgba(255, 255, 255, 0.12);
    border-radius: 999px;
    overflow: hidden;
    margin-bottom: 18px;
}

.preloader-fill {
    height: 100%;
    width: 0%;
    background: #fff;
    border-radius: 999px;
    transition: width 0.08s linear;
    will-change: width;
}

.preloader-pct {
    font-size: 0.7rem;
    font-weight: 400;
    letter-spacing: 0.08em;
    color: rgba(255, 255, 255, 0.3);
}

/* ============================================================
   SECTION 1 — SCROLL IMAGE SEQUENCE
   ============================================================ */
#sequence-section {
    position: relative;
    /* Height = scroll distance; increase for more dramatic effect */
    height: 900vh;
    background: #000;
}

.sequence-sticky {
    position: sticky;
    top: 0;
    width: 100%;
    height: 100vh;
    overflow: hidden;
}

/* Canvas fills the entire viewport */
#sequence-canvas {
    display: block;
    width: 100%;
    height: 100%;
}

/* ── Scroll Down indicator ─────────────────────────────────── */
#scroll-indicator {
    position: absolute;
    bottom: 44px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    z-index: 10;
    pointer-events: none;
    opacity: 1;
    transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

#scroll-indicator.hidden {
    opacity: 0;
}

.scroll-label {
    font-size: 0.7rem;
    font-weight: 400;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.55);
}

/* Animated chevron arrow */
.scroll-chevron {
    width: 16px;
    height: 16px;
    border-right: 1.5px solid rgba(255, 255, 255, 0.4);
    border-bottom: 1.5px solid rgba(255, 255, 255, 0.4);
    transform: rotate(45deg);
    animation: chevronFloat 2s ease-in-out infinite;
}

@keyframes chevronFloat {
    0%, 100% { opacity: 0.4; transform: rotate(45deg) translate(0, 0); }
    50%       { opacity: 1;   transform: rotate(45deg) translate(2px, 2px); }
}

/* ============================================================
   SECTION 2 — CTA
   ============================================================ */
#cta-section {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000;
    padding: 80px 24px;
    /* Subtle top separator */
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.cta-content {
    text-align: center;
    max-width: 820px;
}

/* Eyebrow label above heading */
.cta-eyebrow {
    font-size: clamp(0.65rem, 1.4vw, 0.8rem);
    font-weight: 500;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.35);
    margin-bottom: 24px;
}

/* Main heading */
.cta-heading {
    font-size: clamp(3.5rem, 10vw, 8rem);
    font-weight: 700;
    line-height: 1;
    letter-spacing: -0.05em;
    margin-bottom: 52px;
}

/* "Get" — plain white */
.word-plain {
    color: #fff;
}

/* "Vision Pro" — animated multicolour gradient */
.word-gradient {
    display: inline;
    background: linear-gradient(
        90deg,
        #bf9bde,   /* soft purple   */
        #e879f9,   /* fuchsia       */
        #fb923c,   /* orange        */
        #facc15,   /* amber         */
        #34d399,   /* emerald       */
        #60a5fa,   /* blue          */
        #bf9bde    /* loop back     */
    );
    background-size: 220% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientSlide 5s linear infinite;
}

@keyframes gradientSlide {
    0%   { background-position: 0%   center; }
    100% { background-position: 220% center; }
}

/* Buy Now button */
.cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 18px 54px;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: clamp(0.85rem, 1.4vw, 0.95rem);
    font-weight: 500;
    letter-spacing: -0.02em;
    color: #000;
    background: #fff;
    border: none;
    border-radius: 999px;
    cursor: pointer;
    text-decoration: none;
    outline: none;
    /* Springy hover transition */
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1),
                box-shadow 0.35s ease;
    will-change: transform;
}

.cta-btn:hover {
    transform: scale(1.06);
    box-shadow: 0 0 0 1px rgba(255,255,255,0.12),
                0 12px 40px rgba(255, 255, 255, 0.12);
}

.cta-btn:active {
    transform: scale(0.97);
    transition-duration: 0.1s;
}

/* Arrow inside button */
.btn-arrow {
    display: inline-block;
    transition: transform 0.3s ease;
    font-style: normal;
}

.cta-btn:hover .btn-arrow {
    transform: translateX(4px);
}

/* ============================================================
   RESPONSIVE TWEAKS
   ============================================================ */
@media (max-width: 768px) {
    #scroll-indicator {
        bottom: 32px;
    }

    .cta-heading {
        margin-bottom: 40px;
    }

    .cta-btn {
        padding: 16px 44px;
    }
}

@media (max-width: 480px) {
    .cta-heading {
        /* Break "Vision Pro" onto its own line on tiny screens */
        word-break: break-word;
    }
}
