/* ===========================================
   Transform Card - 2 Layer Version
   Layer 1: Background (waves video)
   Layer 2: Combined foreground (grass, clouds, overlay)
   =========================================== */

/* GLOBALCLASS: DESKTOP */
/* CUSTOM CSS */
.mockup {
  position: relative;
  width: 794.55px;
  height: 500px;
  overflow: hidden;
  border-radius: var(--radius-xxl);
}

/* GLOBALCLASS: DESKTOP */
/* CUSTOM CSS */
.bg-waves {
  width: 100%;
  height: 100%;
  display: flex;
  position: relative;
}

/* Ensure video covers during animation */
.bg-waves video,
.bg-waves img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* GLOBALCLASS: DESKTOP */
/* CUSTOM CSS */
.mockup__layer-2 {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
}

.mockup__layer-2 img {
  object-fit: contain;
  position: relative;
  height: 100%;
  width: 100%;
}

/* ===========================================
   Transform Card Scroll Animation Styles
   =========================================== */

/* Hero section - relative for scroll, tall enough for card animation */
.home-hero {
    position: relative;
    min-height: 120vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 1;
}

/* Card positioning - GSAP ScrollTrigger handles pinning */
.mockup {
    transform-origin: center center;
    will-change: transform, border-radius;
    z-index: 10;
}

/* Hide animated elements until JS initializes to prevent flash */
.mockup,
.bg-waves-wrapper {
    visibility: hidden;
}

/* Reveal when JS has initialized */
.js-ready .mockup,
.js-ready .bg-waves-wrapper {
    visibility: visible;
}

/* Layer 2 scales and fades */
.mockup__layer-2 {
    will-change: transform, opacity;
    transform-origin: center center;
}

/* ===========================================
   Simplicity Section
   =========================================== */

.simplicity-section {
    position: relative;
    z-index: 20;
    /* No background - uses fixed layer 1 (waves video) as background */
}

/* ===========================================
   bg-waves - Independent element (outside card, scales separately)
   =========================================== */

/* bg-waves wrapper - matches card initial position */
.bg-waves-wrapper {
  position: relative;
  width: 794.55px;
  height: 500px;
  overflow: hidden;
  border-radius: var(--radius-xxl);
}

/* bg-waves fills the wrapper */
.bg-waves {
    width: 100%;
    height: 100%;
}


/* ===========================================
   bg-waves Color Overlay (fades in during animation)
   =========================================== */

.bg-waves-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    background: #244851;
    opacity: 0;
    pointer-events: none;
    z-index: 1;
}


/* ===========================================
   Responsive - Maintain aspect ratio on smaller screens
   =========================================== */

@media (max-width: 834px) {
    .mockup,
    .bg-waves-wrapper {
        width: 90vw;
        height: calc(90vw / 1.5891); /* 794.55 / 500 = 1.5891 aspect ratio */
        max-width: 794.55px;
        max-height: 500px;
    }
}

/* Mobile portrait - static card, no animation */
@media (max-width: 480px) {
    /* Show elements immediately on mobile (no JS dependency) */
    .mockup,
    .bg-waves-wrapper {
        visibility: visible !important;
        width: 90vw;
        height: calc(90vw / 1.5891); /* Keep landscape aspect ratio */
        max-width: none;
        max-height: none;
    }

    .home-hero {
        min-height: auto; /* No extra height needed for scroll animation */
        padding-bottom: 2rem;
    }

    /* Remove animation-related properties */
    .mockup {
        will-change: auto;
        transform: none !important;
    }

    .bg-waves-wrapper {
        will-change: auto;
        transform: none !important;
    }

    .mockup__layer-2 {
        will-change: auto;
        opacity: 1 !important;
    }

    .bg-waves-overlay {
        opacity: 0 !important; /* Keep overlay hidden on mobile */
    }
}
