/**
 * Home page specific styles for Fanify
 */

/* Hero Section */
.hero {
    position: relative;
    padding: 0 !important;
    overflow: hidden;
    display: flex !important;
    flex-direction: column;
    min-height: calc(100vh - var(--navbar-height)) !important;
    height: calc(100vh - var(--navbar-height));
    justify-content: flex-start !important;
    align-items: stretch !important;
}

.hero::before {
    content: '';
    position: absolute;
    top: -30%;
    left: 50%;
    transform: translateX(-50%);
    width: 1000px;
    height: 1000px;
    background: radial-gradient(circle, rgba(73, 114, 243, 0.2), transparent 70%);
    pointer-events: none;
    animation: float 6s ease-in-out infinite;
}

/* Hero Container */
.hero > .container {
    display: flex;
    flex-direction: column;
    height: 100%;
    width: 100%;
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 0 var(--container-padding);
}

/* Hero Grid - illustration à gauche, texte à droite */
.hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-lg);
    align-items: center;
    margin-bottom: 0;
    flex: 1;
    min-height: 0;
    position: relative;
    z-index: 1;
    padding: var(--spacing-sm) 0;
}

.hero-illustration {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
}

.orbit-iframe {
    width: 100%;
    height: 100%;
    min-height: 500px;
    border: none;
    background: transparent;
}

.hero-content {
    text-align: left;
    position: relative;
    z-index: 1;
}

/* CTA spacing and alignment under hero text */
.hero-content .cta-group {
    margin-top: var(--spacing-md);
    justify-content: flex-start;
}

/* CTAs et carousel centrés en bas */
.hero-bottom {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-xs);
    position: relative;
    z-index: 1;
    margin-top: auto;
    padding-bottom: 0;
    width: 100%;
}

.hero-bottom .carousel {
    width: 100vw;
    margin-left: calc(-50vw + 50%);
}

.hero-title {
    font-size: var(--font-size-5xl);
    font-weight: var(--font-weight-bold);
    line-height: 1.1;
    margin-bottom: var(--spacing-sm);
    letter-spacing: -0.02em;
}

/* Raise carousel slightly from bottom of the viewport */
.hero .carousel {
    margin-bottom: var(--spacing-lg);
}

.hero-subtitle {
    font-size: var(--font-size-xl);
    color: var(--text-primary);
    margin-bottom: var(--spacing-sm);
    font-weight: var(--font-weight-medium);
}

.hero-description {
    font-size: var(--font-size-lg);
    color: var(--text-secondary);
    margin-bottom: 0;
}

/* Beta Section */
.beta-section {
    background: radial-gradient(circle at 50% 50%, rgba(217, 37, 210, 0.1), transparent 70%);
}

.beta-card {
    max-width: 900px;
    margin: 0 auto;
    padding: var(--spacing-lg);
}

.beta-notify {
    max-width: 500px;
    margin: 0 auto;
}

.beta-form {
    display: flex;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-sm);
}

.beta-form .input {
    flex: 1;
}

.beta-limit {
    font-size: var(--font-size-sm);
    color: var(--text-tertiary);
    margin: 0;
}

/* PWA Section */
.pwa-section {
    padding: var(--spacing-xl) 0;
}

.pwa-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-lg);
    align-items: center;
}

.pwa-visual {
    position: relative;
}

.device-mockup {
    position: relative;
    width: 100%;
    max-width: 720px;
    margin: 0 auto;
    aspect-ratio: 16 / 10;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* MacBook centered as base layer */
.mockup-macbook {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    z-index: 1;
    pointer-events: none;
}

/* iPhone to the right, slightly below horizontal center, front layer */
.mockup-iphone {
    position: absolute;
    right: 0%;
    top: 48%;
    transform: translateY(-50%) rotate(-2deg);
    width: 22%;
    max-width: 160px;
    height: auto;
    object-fit: contain;
    z-index: 2;
    filter: drop-shadow(0 12px 24px rgba(0,0,0,0.35));
    pointer-events: none;
}

.pwa-features h3 {
    font-size: var(--font-size-2xl);
    margin-bottom: var(--spacing-md);
}

.feature-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.feature-item {
    display: flex;
    gap: var(--spacing-sm);
    align-items: flex-start;
}

.feature-item .feature-icon {
    flex-shrink: 0;
    font-size: var(--font-size-2xl);
}

.feature-item h4 {
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-semibold);
    margin-bottom: 0.25rem;
    color: var(--text-primary);
}

.feature-item p {
    font-size: var(--font-size-base);
    color: var(--text-secondary);
    margin: 0;
}

/* Responsive */
@media (max-width: 1024px) {
    .hero {
        min-height: auto !important;
        height: auto !important;
    }
    
    .hero-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-sm);
        flex: none;
        padding: var(--spacing-sm);
    }
    
    .hero-illustration {
        order: 2;
        height: auto;
    }
    
    .hero-content {
        order: 1;
        text-align: center;
    }
    
    /* Center CTA group on tablet/mobile */
    .hero-content .cta-group {
        justify-content: center;
    }
    
    .orbit-iframe {
        height: 450px;
        min-height: 400px;
        max-height: 500px;
    }
    
    .hero-bottom .carousel {
        margin-left: 0;
        width: 100%;
    }

    /* Slightly smaller bottom spacing on tablet */
    .hero .carousel {
        margin-bottom: var(--spacing-md);
    }

    /* Tablet adjustments for PWA mockups */
    .device-mockup {
        max-width: 640px;
        aspect-ratio: 16 / 10;
    }
    .mockup-iphone {
        right: 12%;
        top: 48%;
        width: 24%;
    }
}

@media (max-width: 768px) {
    .hero-title {
        font-size: var(--font-size-3xl);
    }
    
    .hero-subtitle {
        font-size: var(--font-size-lg);
    }
    
    .hero-description {
        font-size: var(--font-size-base);
    }
    
    .orbit-iframe {
        height: 380px;
        min-height: 320px;
        max-height: 420px;
    }
    
    .beta-form {
        flex-direction: column;
    }
    
    .beta-card {
        padding: var(--spacing-md);
    }
    
    .pwa-grid {
        grid-template-columns: 1fr;
    }
    
    .pwa-visual {
        order: 2;
    }
    
    .pwa-features {
        order: 1;
    }

    /* Mobile layout for PWA mockups */
    .device-mockup {
        max-width: 520px;
        aspect-ratio: 4 / 3;
    }
    .mockup-iphone {
        right: 0%;
        top: 35%;
        width: 26%;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: var(--font-size-3xl);
    }

    .device-mockup {
        max-width: 100%;
        aspect-ratio: 4 / 3;
    }
    .mockup-iphone {
        right: 0%;
        top: 21%;
        width: 30%;
    }
}
