/* Base Reset & Typography */
:root {
    /* Brand Colors from colors.ts */
    --bg-color: #FAFAFA;
    /* background.default */
    --text-primary: #031F2A;
    /* text.dark */
    --text-secondary: #292F32;
    /* text.secondary */

    --accent-color: #3B68B5;
    /* accent */
    --accent-dark: #2E5AAC;
    /* accentDark */
    --primary-dark: #031F2A;
    /* primary */

    --gradient-bg: radial-gradient(circle at 50% -10%, rgba(59, 104, 181, 0.15), transparent 70%);

    --btn-bg: #031F2A;
    /* primary */
    --btn-text: #FFFFFF;
    /* white */
}

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

body {
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.5;
    overflow-x: hidden;
}

/* Layout */
.landing-container {
    min-height: 100vh;
    width: 100%;
    display: flex;
    align-items: center;
    position: relative;
    /* Subtle abstract background */
    background:
        radial-gradient(circle at 10% 20%, rgba(162, 89, 255, 0.15) 0%, transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(255, 107, 107, 0.1) 0%, transparent 40%);
}

/* Left Side: Content */
.content-side {
    flex: 1;
    max-width: 600px;
    z-index: 2;
    animation: slideInLeft 0.8s ease-out;
}

.brand-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 40px;
}

.logo {
    width: auto;
    height: 48px;
    /* Fixed height, auto width maintains aspect ratio */
    border-radius: 12px;
    object-fit: contain;
    /* Ensure image is not stretched */
}

.app-name {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.headline {
    font-size: 4rem;
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 24px;
}

.gradient-text {
    color: var(--accent-color);
    /* Removed webkit gradient for cleaner brand look and better visibility */
    display: inline-block;
}

.subheadline {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 48px;
    max-width: 480px;
    font-weight: 300;
}

.download-buttons {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 48px;
}

/* App Store Button */
.app-store-button {
    display: inline-flex;
    align-items: center;
    background-color: var(--btn-bg);
    color: var(--btn-text);
    padding: 12px 24px;
    border-radius: 14px;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s;
    gap: 12px;
    /* Ensure button is prominent on mobile */
    min-width: 200px;
    justify-content: center;
    box-shadow: 0 4px 14px rgba(3, 31, 42, 0.2);
}

.app-store-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(3, 31, 42, 0.3);
    background-color: #04283A;
    /* slightly lighter or different shade on hover */
}

.apple-icon,
.android-icon {
    height: 24px;
    width: 24px;
    /* Ensure width is also set for square SVG */
    min-width: 24px;
    /* Prevent shrinking */
}

/* Android icon might need slightly different scale */

.btn-text-group {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    line-height: 1;
}

.btn-small {
    font-size: 0.75rem;
    font-weight: 400;
    margin-bottom: 2px;
}

.btn-large {
    font-size: 1.25rem;
    font-weight: 600;
}

/* Footer */
.simple-footer {
    margin-top: 80px;
    font-size: 0.875rem;
    color: #555;
    font-weight: 300;
}

/* Right Side: Visual */
.visual-side {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    z-index: 1;
    animation: fadeInUp 1s ease-out 0.2s backwards;
}

.phone-frame {
    position: relative;
    width: 320px;
    height: 600px;
    border-radius: 40px;
    background: #fff;
    border: 8px solid #f0f0f0;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    transform: rotate(-3deg);
    transition: transform 0.3s ease;
}

.phone-frame:hover {
    transform: rotate(0deg) scale(1.02);
}

.glow-effect {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 120%;
    height: 120%;
    transform: translate(-50%, -50%);
    background: radial-gradient(circle, rgba(59, 104, 181, 0.25) 0%, transparent 70%);
    z-index: -1;
    filter: blur(50px);
}

/* Carousel Container */
.carousel-container {
    width: 100%;
    height: 100%;
    position: relative;
    background: #FAFAFA;
    /* App background - light theme */
}

.carousel-track {
    display: flex;
    height: 100%;
    transition: transform 0.5s cubic-bezier(0.25, 1, 0.5, 1);
}

.carousel-slide {
    min-width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

/* Schematic Card Styles (Based on Mobile App) */
.card {
    width: 240px;
    /* Reduced from 260px */
    border-radius: 16px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    position: relative;
}

/* Feature Card (Vertical) */
.feature-card {
    height: 360px;
    /* Reduced from 380px */
    display: flex;
    flex-direction: column;
}

.card-image-container {
    height: 220px;
    width: 100%;
    position: relative;
    overflow: hidden;
}

.card-image-container.full-height {
    height: 100%;
}

.card-cover-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

/* Zoom effect on hover */
.card:hover .card-cover-image {
    transform: scale(1.05);
}

.card-badge {
    position: absolute;
    top: 16px;
    left: 16px;
    background: rgba(0, 0, 0, 0.6);
    /* Semi-transparent black for better readability on photos */
    padding: 6px 10px;
    border-radius: 6px;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.5px;
    z-index: 2;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.card-gradient {
    height: 80px;
    /* Taller gradient for better text protection */
    margin-top: -80px;
    background: linear-gradient(to top, rgba(255, 255, 255, 1) 20%, transparent);
    z-index: 1;
    position: relative;
}

.card-content {
    padding: 20px;
    padding-top: 24px;
    /* Compensate for overlap */
    /* Compensate for overlap */
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: #fff;

    /* Robust overlap to prevent gaps */
    position: relative;
    z-index: 2;
    margin-top: -20px;
    border-radius: 20px 20px 0 0;
    /* Optional: adds a nice curve to the content sheet */
}

.card-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-dark);
    margin-bottom: 6px;
    line-height: 1.2;
}

.card-subtitle {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 12px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-rating {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.75rem;
    color: var(--text-secondary);
    /* Cleaner look */
    font-weight: 600;
}

.card-rating span {
    color: #FFC107;
    /* Gold Star */
}

/* Ranking Card (Overlay Style) */
.ranking-card {
    height: 340px;
    background: #333;
}

/* Center icon nicely in ranking card too */
.ranking-card .card-image-placeholder {
    height: 100%;
}

.ranking-badge {
    position: absolute;
    top: 16px;
    left: 16px;
    background: #fff;
    color: #000;
    padding: 6px 12px;
    border-radius: 6px;
    font-weight: 800;
    font-size: 12px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
    z-index: 2;
}

.card-gradient-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, transparent 50%, rgba(0, 0, 0, 0.9) 100%);
    pointer-events: none;
    z-index: 1;
}

.ranking-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 24px;
    color: #fff;
    z-index: 2;
}

.ranking-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 6px;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.ranking-desc {
    font-size: 0.9rem;
    opacity: 0.9;
    margin-bottom: 16px;
}

.ranking-btn {
    display: inline-block;
    border: 1px solid rgba(255, 255, 255, 0.4);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.8rem;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(4px);
    transition: background 0.2s;
}

.ranking-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Indicators */
.carousel-indicators {
    position: absolute;
    bottom: 30px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    gap: 8px;
}

.dot {
    width: 8px;
    height: 8px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 50%;
    transition: all 0.3s;
}

.dot.active {
    background: var(--accent-color);
    width: 24px;
    border-radius: 4px;
}

.glow-effect {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 120%;
    height: 120%;
    transform: translate(-50%, -50%);
    background: radial-gradient(circle, rgba(59, 104, 181, 0.25) 0%, transparent 70%);
    z-index: -1;
    filter: blur(50px);
}

/* Mobile Adjustments */
@media (max-width: 968px) {
    .landing-container {
        flex-direction: column;
        padding: 100px 20px 40px 20px;
        justify-content: flex-start;
    }

    .content-side {
        margin-bottom: 40px;
        padding-right: 0;
        /* align-items only works if display is flex, but let's leave it and focus on brand-header */
        align-items: center;
        text-align: center;
    }

    .brand-header {
        justify-content: center;
    }

    .headline {
        font-size: 2.5rem;
    }

    .download-buttons {
        flex-direction: column;
        width: 100%;
        max-width: none;
        /* Remove explicit max-width restriction if centering */
        gap: 16px;
        margin: 0 auto 40px auto;
        align-items: center;
        /* Center items instead of stretching */
    }

    .app-store-button {
        width: auto;
        /* Let content define width */
        min-width: 200px;
        /* Keep a minimum width for consistency */
        max-width: 300px;
        /* Prevent being too wide but allow natural sizing */
        justify-content: center;
    }

    .phone-frame {
        width: 280px;
        height: 520px;
        margin: 0 auto;
        transform: rotate(0deg);
        /* Reset rotation for mobile */
    }

    .card {
        width: 220px;
    }

    .feature-card {
        height: 320px;
    }

    .card-image-container {
        height: 180px;
    }

    .ranking-card {
        height: 280px;
    }
}

/* Small Mobile Screens (True Mobile) */
@media (max-width: 480px) {
    .headline {
        font-size: 2rem;
    }

    .subheadline {
        font-size: 1rem;
        margin-bottom: 30px;
    }

    .phone-frame {
        width: 240px;
        height: 480px;
        border-width: 6px;
        /* Thinner bezel */
    }

    .card {
        width: 190px;
        border-radius: 12px;
    }

    .feature-card {
        height: 280px;
    }

    .card-image-container {
        height: 150px;
    }

    .card-gradient {
        display: block;
        height: 60px;
        /* Increased to visual match desktop mist */
        margin-top: -60px;
    }

    .card-title {
        font-size: 1.1rem;
    }

    .card-subtitle {
        font-size: 0.8rem;
        margin-bottom: 10px;
        -webkit-line-clamp: 2;
        line-clamp: 2;
        /* Ensure ellipsis on small screens */
    }

    .card-content {
        padding: 12px;
        padding-top: 24px;
        /* Increase compensation */
        margin-top: -20px;
        /* Stronger overlap */
        position: relative;
        z-index: 2;
        border-radius: 16px 16px 0 0;
        /* Balanced curve */
    }

    .ranking-card {
        height: 260px;
    }

    .ranking-title {
        font-size: 1.2rem;
    }

    .ranking-content {
        padding: 16px;
    }
}