:root {
    --primary-color: #007AFF;
    --secondary-color: #5AC8FA;
    --text-color: #1D1D1F;
    --light-text: #86868B;
    --bg-color: #D3D3D3; /* Darker bg to make card pop */
    --card-bg: #FFFFFF;
    --shadow: 0 40px 80px rgba(0,0,0,0.15); /* Sleek shadow */
    --font-main: 'Poppins', -apple-system, BlinkMacSystemFont, sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-main);
    background-color: #F2F2F7;
    color: var(--text-color);
    line-height: 1.5;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 40px 20px;
    overflow-x: hidden;
}

.main-content {
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 40px;
    align-items: center;
}

/* Logo Section */
.logo-container {
    text-align: center;
    z-index: 10;
    margin-bottom: 20px;
}

.logo-wrapper {
    background: var(--card-bg);
    padding: 20px;
    border-radius: 30px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.05);
    display: inline-block;
    transition: transform 0.3s;
}

.logo-wrapper:hover {
    transform: scale(1.02);
}

.logo-wrapper img {
    height: 60px;
    width: auto;
    display: block;
}

/* Carousel / Card Section */
.app-display-container {
    width: 100%;
    position: relative;
    padding-top: 0; 
}

.carousel-container {
    position: relative;
    width: 100%;
}

.carousel-track-container {
    width: 100%;
    /* Overflow visible allows phone and shadows to pop out completely */
    overflow: visible; 
}

.carousel-track {
    list-style: none;
    width: 100%;
    /* Stack slides on top of each other using Grid to avoid absolute positioning height issues */
    display: grid;
    grid-template-areas: "slide";
    align-items: center;
    justify-items: center;
}

.carousel-slide {
    grid-area: slide;
    width: 100%;
    opacity: 0;
    /* Use a fade/scale transition instead of sliding for a cleaner, non-clipping effect */
    transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1), transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    
    visibility: hidden; /* Hides content from screen readers/clicks when not active */
    pointer-events: none;
    z-index: 0;
    
    display: flex;
    justify-content: center;
    
    /* Animation start state */
    transform: scale(0.96) translateY(20px);
}

.carousel-slide.current-slide {
    opacity: 1;
    visibility: visible;
    pointer-events: all;
    z-index: 5;
    transform: scale(1) translateY(0);
}


/* The Card */
.app-card {
    background: var(--card-bg);
    border-radius: 40px;
    box-shadow: var(--shadow);
    width: 100%;
    max-width: 900px;
    padding: 60px;
    display: flex;
    gap: 40px;
    position: relative;
    align-items: center;
    min-height: 480px;
    
    overflow: visible; /* CRITICAL: Allows phone to stick out */
    
    /* Push the card down to make room for the phone popping up */
    margin-top: 140px; 
}

.app-content {
    flex: 1;
    z-index: 2;
}

.app-icon {
    width: 90px;
    height: 90px;
    border-radius: 20px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    margin-bottom: 25px;
    display: block;
}

.app-title {
    font-size: 2.8rem;
    font-weight: 700;
    margin-bottom: 5px;
    color: var(--text-color);
    letter-spacing: -1px;
}

.app-subtitle {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 24px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

.app-description {
    font-size: 1.1rem;
    color: var(--light-text);
    margin-bottom: 8px;
    line-height: 1.8;
}

.app-links {
    display: flex;
    gap: 15px;
    flex-wrap: wrap; /* in case on small screens */
}

.store-badge {
    padding: 10px 20px;
    background: #000;
    color: white;
    text-decoration: none;
    border-radius: 10px;
    font-weight: 500;
    font-size: 0.9rem;
    transition: transform 0.2s, background 0.2s;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    border: 1px solid rgba(255,255,255,0.1);
    
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.store-badge svg {
    width: 20px;
    height: 20px;
    fill: white;
}

.store-badge span {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    line-height: 1.1;
}

.store-badge .small-text {
    font-size: 0.7rem;
    font-weight: 400;
    opacity: 0.8;
}

.store-badge .big-text {
    font-size: 1rem;
    font-weight: 600;
}

.store-badge:hover {
    transform: translateY(-2px);
    background: #000;
    box-shadow: 0 8px 20px rgba(0,0,0,0.3);
}

/* The Visual Side */
.app-visual {
    flex: 0 0 320px; /* Fixed width for phone column */
    display: flex;
    justify-content: center;
    position: relative;
    height: 0; 
    align-self: flex-start; /* Align to TOP of card for consistent pop-out */
}

.phone-mockup {
    width: 300px;
    height: 645px; /* Updated to match 1080x2410 aspect ratio */
    background: #111;
    border-radius: 45px;
    box-shadow: 0 30px 60px rgba(0,0,0,0.4); /* Deep phone shadow */
    border: 10px solid #111;
    position: absolute;
    top: 0; /* Anchored to top */
    
    /* Pop out effect */
    transform: translateY(-120px); 
    /* Constant pop-out regardless of card height */
       
    z-index: 10;
}

/* Phone notch */
.phone-mockup::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 140px;
    height: 30px;
    background: #111;
    border-bottom-left-radius: 20px;
    border-bottom-right-radius: 20px;
    z-index: 12;
}

.screen {
    width: 100%;
    height: 100%;
    background: #1c1c1e;
    border-radius: 35px;
    overflow: hidden;
    position: relative;
}

.screenshot {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    opacity: 0;
    transition: opacity 1.5s ease-in-out; 
}

.screenshot.active {
    opacity: 1;
    z-index: 1;
}

/* Fallback backgrounds if needed, but screenshots should cover */
.app-1-bg { background: linear-gradient(135deg, #FF9500 0%, #FF2D55 100%); }
.app-2-bg { background: linear-gradient(135deg, #5AC8FA 0%, #007AFF 100%); }
.app-3-bg { background: linear-gradient(135deg, #30D158 0%, #34C759 100%); }

/* Controls */
.carousel-btn {
    position: absolute;
    top: 60%; /* Adjusted for the visually centered card content */
    transform: translateY(-50%);
    background: #fff;
    border: none;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    font-size: 1.5rem;
    color: #111;
    cursor: pointer;
    z-index: 20;
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
    transition: all 0.3s;
    outline: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

.carousel-btn:hover {
    box-shadow: 0 15px 30px rgba(0,0,0,0.15);
    background: white;
    transform: translateY(-50%) scale(1.1);
    color: var(--primary-color);
}

.carousel-btn.prev {
    left: -80px;
}

.carousel-btn.next {
    right: -80px;
}

.is-hidden { 
    opacity: 0; 
    pointer-events: none; 
}

.carousel-nav {
    display: flex;
    justify-content: center;
    padding-top: 40px;
    gap: 15px;
}

.carousel-indicator {
    border: none;
    width: 12px;
    height: 12px;
    background: #C7C7CC;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s;
}

.carousel-indicator.current-slide {
    background: var(--primary-color);
    transform: scale(1.3);
}

/* Footer */
footer {
    text-align: center;
    color: var(--light-text);
    font-size: 0.9rem;
    padding-bottom: 20px;
}

.footer-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.separator {
    color: #D1D1D6;
}

footer a {
    color: var(--light-text);
    text-decoration: none;
    transition: color 0.2s;
}

footer a:hover {
    color: var(--primary-color);
}

/* Responsive */
@media (max-width: 1100px) {
    .carousel-btn.prev { left: -20px; }
    .carousel-btn.next { right: -20px; }
}

@media (max-width: 850px) {
    .app-card {
        flex-direction: column;
        padding: 40px 30px;
        text-align: center;
        gap: 0;
        margin-top: 0; /* Remove extra top margin */
        align-items: center;
        min-height: auto;
    }
    
    /* Hide phone on mobile */
    .app-visual {
        display: none;
    }

    .app-content {
        width: 100%;
    }

    .app-links {
        justify-content: center;
    }

    .app-icon {
        margin: 0 auto 25px;
    }

    .carousel-btn {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }
    
    .carousel-btn.prev { 
        left: 10px;
    }
    
    .carousel-btn.next { 
        right: 10px;
    }
    
    .logo-container {
        margin-bottom: 20px;
    }
    
    body {
        padding: 20px 10px;
    }
}

/* Legal / Privacy Pages */
.legal-page {
    justify-content: flex-start; /* Align content to top */
}

.legal-container {
    background: var(--card-bg);
    max-width: 800px;
    margin: 40px auto;
    padding: 60px;
    border-radius: 40px;
    box-shadow: var(--shadow);
    text-align: left;
}

.legal-container h1 {
    font-size: 2.2rem;
    margin-bottom: 10px;
    color: var(--text-color);
}

.legal-container p {
    color: #4a4a4a;
    line-height: 1.8;
    margin-bottom: 20px;
}

.legal-container h2 {
    font-size: 1.5rem;
    margin-top: 30px;
    margin-bottom: 15px;
    color: var(--text-color);
}

.legal-container h3 {
    font-size: 1.2rem;
    margin-top: 25px;
    margin-bottom: 10px;
    color: var(--text-color);
    font-weight: 600;
}

.legal-container ul {
    margin-left: 20px;
    margin-bottom: 20px;
    color: #4a4a4a;
}

.legal-container li {
    margin-bottom: 8px;
    line-height: 1.6;
}

.legal-container .date {
    font-size: 0.9rem;
    color: var(--light-text);
    margin-bottom: 40px;
    display: block;
}

.back-link {
    display: inline-block;
    margin-top: 40px;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

.back-link:hover {
    text-decoration: underline;
}

.privacy-link-card {
    display: inline-block;
    font-size: 0.85rem;
    color: var(--light-text);
    text-decoration: none;
    margin-bottom: 30px;
    border-bottom: 1px dotted var(--light-text);
}

.privacy-link-card:hover {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}
