/*
 * KeepSmilin' App Website Styles
 * Based on Swift UI design system - Modernized 2025 Version
 */

/* Import common styles */
@import url('common.css');

/* ===== HERO SECTION ===== */
.hero {
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary) 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    padding: var(--spacing-xxxl) 0;
}

.hero .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: var(--spacing-xxl);
}

.hero-content {
    flex: 1;
    min-width: 300px;
    padding-right: var(--spacing-xl);
}

.logo-container {
    margin-bottom: var(--spacing-lg);
    max-width: 250px;
}

.logo {
    width: 100%;
    height: auto;
}

.hero .tagline {
    font-size: var(--font-xxl);
    font-weight: 300;
    margin-bottom: var(--spacing-md);
    color: var(--text-secondary);
}

.hero .description {
    font-size: var(--font-lg);
    margin-bottom: var(--spacing-xl);
    max-width: 500px;
}

.hero-image {
    flex: 1;
    min-width: 300px;
    display: flex;
    justify-content: center;
    position: relative; /* Added for positioning context */
}

/* Create a pseudo-element for the shadow - Safari compatible */
.hero-image::after {
    content: '';
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    height: 90%;
    background: rgba(0, 0, 0, 0.12);
    border-radius: 50%;
    filter: blur(20px);
    z-index: -1;
}

.preview-image {
    max-height: 600px;
    width: auto;
    /* Removed filter: drop-shadow for Safari compatibility */
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    z-index: 1;
}

.preview-image:hover {
    transform: translateY(-8px);
}

/* App Store Button */
.app-store-button {
    display: inline-block;
    transition: transform 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.app-store-button:hover {
    transform: scale(1.03);
}

.app-store-button img {
    width: 180px;
    height: 60px;
}

/* ===== FEATURES SECTION ===== */
.features {
    background-color: var(--primary-dark);
    padding: var(--spacing-huge) 0;
}

.feature-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: var(--spacing-xxl);
    margin-top: var(--spacing-xl);
}

.feature-item {
    flex: 1;
    min-width: 280px;
    text-align: left;
    padding: var(--spacing-xl) var(--spacing-xxl);
    border-radius: var(--radius-lg);
    background: linear-gradient(145deg, var(--white) 0%, var(--off-white) 100%);
    box-shadow: var(--shadow-subtle);
    transition: transform 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94), box-shadow 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.feature-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-medium);
}

.feature-icon {
    margin: 0 0 var(--spacing-lg) 0;
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

.feature-icon img {
    width: 80px;
    height: 80px;
    object-fit: contain;
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.feature-item:hover .feature-icon img {
    transform: scale(1.05);
}

/* ===== SCREENSHOTS SECTION ===== */
.screenshots {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    padding: var(--spacing-huge) 0;
}

.screenshots h2 {
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
    text-align: left;
}

.screenshot-slider {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-xl);
    margin-top: var(--spacing-xxl);
    position: relative;
}

.screenshot-slider.centered {
    justify-content: center;
}

.screenshot {
    flex: 0 0 auto;
    max-width: 300px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-medium);
    position: relative;
    transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94), box-shadow 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    perspective: 1000px;
}

.screenshot:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-device);
    z-index: 1;
}

.screenshot-img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: var(--radius-lg);
    transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    transform-style: preserve-3d;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.1);
}

.screenshot:hover .screenshot-img {
    transform: rotateY(3deg);
}

.screenshot::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.2) 0%, rgba(255,255,255,0) 50%, rgba(0,0,0,0.05) 100%);
    border-radius: var(--radius-lg);
    z-index: 1;
    pointer-events: none;
}

.screenshot::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom,
                rgba(255,255,255,0.08) 0%,
                rgba(255,255,255,0) 5%,
                rgba(255,255,255,0) 95%,
                rgba(255,255,255,0.08) 100%);
    z-index: 2;
    pointer-events: none;
}

/* ===== BENEFITS SECTION ===== */
.benefits {
    background-color: var(--primary-dark);
    padding: var(--spacing-huge) 0;
}

.benefits h2 {
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.benefits-intro {
    max-width: 800px;
    margin: 0 auto var(--spacing-xxl);
    text-align: left;
    font-size: var(--font-lg);
}

.benefits-content {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xl);
    max-width: 900px;
    margin: 0 auto;
}

.benefits-content.centered {
    align-items: center;
}

.benefits-card {
    width: 100%;
    padding: var(--spacing-xl) var(--spacing-xxl);
    background: linear-gradient(145deg, var(--white) 0%, var(--off-white) 100%);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-subtle);
    transition: transform 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94), box-shadow 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.benefits-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-medium);
}

.benefits-card p {
    margin-bottom: var(--spacing-lg);
}

.smile-benefits-list, .privacy-list {
    list-style: none;
    padding-left: 0;
}

.smile-benefits-list li, .privacy-list li {
    display: flex;
    align-items: flex-start;
    margin-bottom: var(--spacing-md);
}

.bullet-icon {
    width: 20px;
    height: 20px;
    margin-right: var(--spacing-sm);
    margin-top: 0.25em;
    flex-shrink: 0;
}

/* ===== CTA SECTION ===== */
.cta {
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary) 100%);
    text-align: left;
    padding: var(--spacing-huge) 0;
}

.cta h2 {
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.cta-text {
    max-width: 800px;
    margin: 0 auto var(--spacing-lg);
    font-size: var(--font-lg);
}

.privacy-list {
    max-width: 800px;
    margin: 0 auto var(--spacing-xl);
    text-align: left;
    background-color: var(--white);
    padding: var(--spacing-xl) var(--spacing-xxl);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-subtle);
}

.privacy-list-direct {
    list-style: none;
    padding-left: 0;
    max-width: 800px;
    margin: 0 auto var(--spacing-xl);
    text-align: left;
}

.privacy-list-direct li {
    display: flex;
    align-items: flex-start;
    margin-bottom: var(--spacing-md);
    font-size: var(--font-lg);
}

.app-download {
    margin-top: var(--spacing-xxl);
    display: flex;
    justify-content: center;
}

/* ===== FOOTER ===== */
footer {
    background-color: var(--primary-dark);
    padding: var(--spacing-xl) 0;
    text-align: center;
}

.footer-content {
    font-size: var(--font-sm);
}

.heart {
    color: #FF5252;
    display: inline-block;
    animation: pulse 1.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.15); }
    100% { transform: scale(1); }
}

/* ===== RESPONSIVE STYLES ===== */
@media (max-width: 768px) {
    .hero .container {
        flex-direction: column;
    }

    .hero-content {
        padding-right: 0;
        text-align: left;
        margin-bottom: var(--spacing-xl);
    }

    .logo-container {
        margin: 0 0 var(--spacing-lg);
    }

    .preview-image {
        max-height: 450px;
    }

    /* Update shadow for mobile */
    .hero-image::after {
        width: 70%;
        height: 85%;
        top: 15px;
    }

    .feature-grid {
        flex-direction: column;
        align-items: center;
    }

    .feature-item {
        width: 100%;
        max-width: 400px;
    }

    .screenshot-slider {
        flex-direction: column;
        align-items: center;
    }

    .screenshot {
        margin-bottom: var(--spacing-lg);
    }

    .benefits-card {
        flex-basis: 100%;
    }

    .app-download {
        justify-content: flex-start;
    }
}

@media (max-width: 480px) {
    .preview-image {
        max-height: 350px;
    }

    /* Update shadow for small mobile */
    .hero-image::after {
        width: 60%;
        height: 80%;
        top: 20px;
    }

    .app-store-button img {
        width: 150px;
        height: 50px;
    }

    .feature-icon {
        width: 60px;
        height: 60px;
    }

    .feature-icon img {
        width: 60px;
        height: 60px;
    }

    .cookie-content {
        flex-direction: column;
        align-items: flex-start;
    }

    .benefits-card, .feature-item {
        padding: var(--spacing-lg) var(--spacing-xl);
    }

    .privacy-list, .privacy-list-direct {
        padding: var(--spacing-lg);
    }
}
