/* ====================================
   LANDING PAGE - MOBILE FIRST RESPONSIVE DESIGN
   ==================================== */

/* ====================================
   HERO SECTION
   ==================================== */

/* Mobile-first: Default styles for mobile */
.landing-hero {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    padding: calc(80px + var(--ap-spacing-xxl)) var(--ap-spacing-s) var(--ap-spacing-xxl) var(--ap-spacing-s);
    min-height: 500px;
    position: relative;
    display: flex;
    align-items: center;
}

.landing-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--ap-gradient-hero);
    z-index: 1;
}

/* Hero container wrapper for 1280px max-width centering */
.landing-hero .ap-hero-wrapper {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    display: flex;
    justify-content: flex-start;
}

.landing-hero .ap-hero-content {
    position: relative;
    z-index: 2;
    max-width: 600px;
    width: 100%;
    text-align: left;
}

.landing-hero h1 {
    font-size: var(--ap-font-h1-mobile-size);
    font-weight: var(--ap-font-h1-mobile-weight);
    line-height: var(--ap-font-h1-mobile-line-height);
    color: var(--ap-color-text-primary);
    margin-bottom: var(--ap-spacing-m);
}

.landing-hero p {
    font-size: var(--ap-font-body-regular-size);
    line-height: var(--ap-font-body-regular-line-height);
    color: var(--ap-color-text-secondary);
    margin-bottom: var(--ap-spacing-m);
}

/* ====================================
   FEATURE SECTIONS
   ==================================== */

/* Mobile-first: Feature sections */
.landing-section {
    padding: var(--ap-spacing-l) 0;
}

.landing-section--dark {
    background-color: var(--ap-color-primary-surface);
}

.landing-section .ap-container {
    padding: 0 var(--ap-spacing-s);
}

/* Mobile-first: Stack layout */
.landing-feature {
    display: flex;
    flex-direction: column;
    gap: var(--ap-spacing-m);
    align-items: center;
    text-align: left;
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
}

.landing-feature--center {
    text-align: center;
}

.landing-feature-image {
    width: 100%;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    border-radius: var(--ap-radius-l);
    aspect-ratio: 16/10;
    min-height: 200px;
}

.landing-content {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: var(--ap-spacing-m);
}

.landing-content--center {
    align-items: center;
    text-align: center;
}

.landing-content h2 {
    font-size: var(--ap-font-h2-mobile-size);
    font-weight: var(--ap-font-h2-mobile-weight);
    line-height: var(--ap-font-h2-mobile-line-height);
    color: var(--ap-color-text-primary);
}

.landing-content p {
    font-size: var(--ap-font-body-regular-size);
    line-height: var(--ap-font-body-regular-line-height);
    color: var(--ap-color-text-secondary);
}

/* ====================================
   HOW IT WORKS CARDS
   ==================================== */

.landing-cards {
    display: flex;
    flex-direction: column;
    gap: var(--ap-spacing-m);
    width: 100%;
    margin-top: var(--ap-spacing-m);
}

.landing-card {
    border-radius: var(--ap-radius-l);
    overflow: hidden;
    border: 1px solid var(--ap-color-card-stroke);
    background: var(--ap-gradient-purple);
    box-shadow: 0 0 12px 12px rgba(0, 0, 0, 0.08);
}

.landing-card-image {
    width: 100%;
    height: 200px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.landing-card-content {
    padding: var(--ap-spacing-s);
    display: flex;
    flex-direction: column;
    gap: var(--ap-spacing-xs);
}

.landing-card-content h4 {
    font-size: var(--ap-font-h4-mobile-size);
    font-weight: var(--ap-font-h4-mobile-weight);
    line-height: var(--ap-font-h4-mobile-line-height);
    color: var(--ap-color-text-primary);
    margin: 0;
}

.landing-card-content p {
    font-size: var(--ap-font-body-regular-size);
    line-height: var(--ap-font-body-regular-line-height);
    color: var(--ap-color-text-secondary);
    margin: 0;
}

/* ====================================
   TABLET BREAKPOINT (min-width: 769px)
   ==================================== */

@media (min-width: 769px) {
    /* Hero adjustments for tablet+ */
    .landing-hero {
        padding: calc(80px + var(--ap-spacing-xl)) var(--ap-spacing-m) var(--ap-spacing-xl) var(--ap-spacing-m);
        min-height: 600px;
    }
    
    .landing-hero .ap-hero-wrapper {
        padding: 0 var(--ap-spacing-m);
    }
    
    .landing-hero .ap-hero-content {
        max-width: 415px;
        text-align: left;
    }
    
    .landing-hero h1 {
        font-size: var(--ap-font-h1-size);
        line-height: var(--ap-font-h1-line-height);
    }
    
    .landing-hero p {
        font-size: var(--ap-font-promo-size);
        line-height: var(--ap-font-promo-line-height);
    }
    
    /* Feature sections for tablet+ */
    .landing-section {
        padding: calc(60px + var(--ap-spacing-xl)) 0;
    }
    
    .landing-section .ap-container {
        padding: 0 var(--ap-spacing-m);
    }
    
    /* Horizontal layout for features with images */
    .landing-feature:has(.landing-feature-image) {
        flex-direction: row;
        gap: var(--ap-spacing-xl);
        text-align: left;
        align-items: center;
        max-width: none; /* Allow to expand beyond 1280px for larger images */
        width: 100%;
    }
    
    .landing-feature-image {
        flex: 1;
        min-width: 400px;
        max-width: 100%;
        height: 350px;
        background-size: contain;
        background-position: center;
        background-repeat: no-repeat;
    }
    
    .landing-content {
        max-width: 450px;
    }
    
    /* Centered content should not be width-restricted */
    .landing-content--center {
        max-width: none;
    }
    
    .landing-content h2 {
        font-size: var(--ap-font-h2-size);
        line-height: var(--ap-font-h2-line-height);
    }
    
    /* Alternate layout for odd sections (starting with sync opportunities) */
    .landing-section:nth-child(odd) .landing-feature:has(.landing-feature-image) {
        flex-direction: row-reverse;
    }
    
    /* Cards in horizontal layout */
    .landing-cards {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: var(--ap-spacing-l);
    }
}

/* ====================================
   DESKTOP BREAKPOINT (min-width: 1024px)
   ==================================== */

@media (min-width: 1024px) {
    /* Desktop: Enhanced container padding */
    .landing-hero {
        padding: calc(80px + var(--ap-spacing-xxl)) var(--ap-spacing-l) calc(60px + var(--ap-spacing-xxl)) var(--ap-spacing-l);
    }
    
    .landing-hero .ap-hero-wrapper {
        padding: 0 var(--ap-spacing-l);
    }
    
    .landing-hero .ap-hero-content {
        max-width: 530px;
    }
    
    .landing-hero h1 {
        font-size: var(--ap-font-d1-size);
        line-height: var(--ap-font-d1-line-height);
    }
    
    .landing-section .ap-container {
        padding: 0 var(--ap-spacing-l);
    }
    
    /* Larger images and spacing for desktop */
    .landing-feature {
        gap: calc(var(--ap-spacing-xl) * 1.5);
    }
    
    .landing-feature-image {
        min-width: 500px;
        height: 425px;
        background-size: contain;
    }
    
}

/* ====================================
   LARGE DESKTOP BREAKPOINT (min-width: 1200px)
   ==================================== */

@media (min-width: 1200px) {
    .landing-feature-image {
        min-width: 600px;
        height: 500px;
    }
    
    .landing-feature:has(.landing-feature-image) {
        max-width: 1400px; /* Allow more space for larger images */
    }
}

/* ====================================
   EXTRA LARGE DESKTOP BREAKPOINT (min-width: 1440px)
   ==================================== */

@media (min-width: 1440px) {
    .landing-feature-image {
        min-width: 700px;
        height: 580px;
    }
    
    .landing-feature:has(.landing-feature-image) {
        max-width: 1600px; /* Even more space for extra large screens */
    }
}
