/* ===== CSS Variables ===== */
:root {
    --color-primary: #2563eb;
    --color-primary-dark: #1d4ed8;
    --color-secondary: #10b981;
    --color-dark: #0f172a;
    --color-dark-light: #1e293b;
    --color-gray: #64748b;
    --color-gray-light: #94a3b8;
    --color-light: #f8fafc;
    --color-white: #ffffff;
    --color-accent: #f59e0b;
    
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 1rem;
    --radius-xl: 1.5rem;
}

/* ===== Reset & Base ===== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    font-size: 16px;
    line-height: 1.6;
    color: var(--color-dark);
    background-color: var(--color-white);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
}

/* ===== Layout ===== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* ===== Navigation ===== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 1rem 0;
    transition: all 0.3s ease;
    background: transparent;
}

.navbar.scrolled {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-sm);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--color-dark);
}

.logo-icon {
    font-size: 1.5rem;
    color: var(--color-primary);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-links a {
    font-weight: 500;
    color: var(--color-gray);
    transition: color 0.2s ease;
}

.nav-links a:hover {
    color: var(--color-dark);
}

.nav-cta {
    background: var(--color-primary);
    color: var(--color-white) !important;
    padding: 0.5rem 1.25rem;
    border-radius: var(--radius-md);
    transition: background 0.2s ease;
}

.nav-cta:hover {
    background: var(--color-primary-dark);
}

/* ===== Hero Section ===== */
.hero {
    min-height: 100vh;
    padding: 8rem 1.5rem 4rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4rem;
    max-width: 1200px;
    margin: 0 auto;
    flex-wrap: wrap;
}

.hero-content {
    flex: 1;
    min-width: 300px;
    max-width: 600px;
}

.hero h1 {
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    font-weight: 700;
    line-height: 1.1;
    color: var(--color-dark);
    margin-bottom: 1.5rem;
}

.highlight {
    color: var(--color-primary);
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--color-gray);
    margin-bottom: 2rem;
    line-height: 1.7;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    border-radius: var(--radius-lg);
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.2s ease;
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: var(--color-dark);
    color: var(--color-white);
}

.btn-primary:hover {
    background: var(--color-dark-light);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.apple-icon {
    width: 1.25rem;
    height: 1.25rem;
}

.hero-image {
    flex: 1;
    min-width: 280px;
    max-width: 400px;
    display: flex;
    justify-content: center;
}

.phone-mockup {
    position: relative;
    width: 280px;
}

.phone-mockup > img {
    width: 100%;
    border-radius: 2rem;
    box-shadow: var(--shadow-xl);
}

/* ===== Carousel ===== */
.carousel {
    position: relative;
    width: 100%;
    border-radius: 2rem; /* Matches image radius to clip content */
}

.carousel-inner {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
    border-radius: 2rem;
}

.carousel-slide {
    grid-column: 1;
    grid-row: 1;
    width: 100%;
    border-radius: 2rem;
    box-shadow: var(--shadow-xl);
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
    z-index: 0;
    display: block; /* Ensure it's not inline */
}

.carousel-slide.active {
    opacity: 1;
    z-index: 1;
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.9);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-dark);
    box-shadow: var(--shadow-md);
}

.carousel-btn:hover {
    background: var(--color-white);
    box-shadow: var(--shadow-lg);
}

.carousel-prev {
    left: -50px;
}

.carousel-next {
    right: -50px;
}

.carousel-dots {
    position: absolute;
    bottom: -30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.5rem;
    z-index: 10;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 2px solid var(--color-gray-light);
    background: transparent;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
}

.dot.active {
    background: var(--color-primary);
    border-color: var(--color-primary);
}

.dot:hover {
    border-color: var(--color-primary);
}

/* ===== Features Section ===== */
.features {
    padding: 6rem 0;
    background: var(--color-light);
}

.section-title {
    font-size: clamp(2rem, 4vw, 2.5rem);
    font-weight: 700;
    text-align: center;
    color: var(--color-dark);
    margin-bottom: 1rem;
}

.section-subtitle {
    font-size: 1.125rem;
    color: var(--color-gray);
    text-align: center;
    max-width: 600px;
    margin: 0 auto 3rem;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}

.feature-card {
    background: var(--color-white);
    padding: 2rem;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
}

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

.feature-icon {
    width: 3rem;
    height: 3rem;
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.25rem;
}

.feature-icon svg {
    width: 1.5rem;
    height: 1.5rem;
    color: var(--color-white);
}

.feature-card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--color-dark);
    margin-bottom: 0.75rem;
}

.feature-card p {
    color: var(--color-gray);
    line-height: 1.7;
}

/* ===== Screenshots Section ===== */
.screenshots {
    padding: 6rem 0;
}

.screenshots-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    justify-items: center;
}

.screenshot-item {
    text-align: center;
}

.screenshot-item img {
    width: 100%;
    max-width: 280px;
    border-radius: 1.5rem;
    box-shadow: var(--shadow-lg);
    transition: transform 0.3s ease;
}

.screenshot-item:hover img {
    transform: scale(1.02);
}

.screenshot-caption {
    margin-top: 1rem;
    font-weight: 500;
    color: var(--color-gray);
}

/* ===== Download Section ===== */
.download {
    padding: 6rem 0;
    background: linear-gradient(135deg, var(--color-dark) 0%, var(--color-dark-light) 100%);
    text-align: center;
}

.download .section-title {
    color: var(--color-white);
}

.download .section-subtitle {
    color: var(--color-gray-light);
    margin-bottom: 2rem;
}

.app-store-badge img {
    height: 60px;
    margin: 0 auto;
    transition: transform 0.2s ease;
}

.app-store-badge:hover img {
    transform: scale(1.05);
}

.download-note {
    margin-top: 1.5rem;
    font-size: 0.875rem;
    color: var(--color-gray-light);
}

/* ===== Footer ===== */
.footer {
    padding: 3rem 0 2rem;
    background: var(--color-dark);
    color: var(--color-gray-light);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1.5rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    font-size: 1.125rem;
    color: var(--color-white);
}

.footer-brand .logo-icon {
    color: var(--color-primary);
}

.footer-links {
    display: flex;
    gap: 2rem;
}

.footer-links a {
    color: var(--color-gray-light);
    transition: color 0.2s ease;
}

.footer-links a:hover {
    color: var(--color-white);
}

.footer-bottom {
    padding-top: 1.5rem;
    text-align: center;
    font-size: 0.875rem;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
    
    .hero {
        padding-top: 6rem;
        flex-direction: column;
        text-align: center;
    }
    
    .hero-buttons {
        justify-content: center;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
    }
    
    .footer-links {
        flex-direction: column;
        gap: 1rem;
    }
    
    .carousel-prev {
        left: 10px;
    }
    
    .carousel-next {
        right: 10px;
    }
    
    .carousel-btn {
        width: 35px;
        height: 35px;
        font-size: 1.25rem;
    }
}

/* ===== Animations ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-content, .hero-image {
    animation: fadeInUp 0.6s ease-out;
}

.hero-image {
    animation-delay: 0.2s;
}

/* ===== Legal Pages ===== */
.legal-page {
    padding: 8rem 0 4rem;
    min-height: calc(100vh - 200px);
}

.legal-page h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--color-dark);
    margin-bottom: 0.5rem;
}

.legal-page .last-updated {
    color: var(--color-gray);
    margin-bottom: 3rem;
    font-size: 0.875rem;
}

.legal-page section {
    margin-bottom: 2.5rem;
}

.legal-page h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--color-dark);
    margin-bottom: 1rem;
    padding-top: 1rem;
}

.legal-page h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--color-dark);
    margin: 1.5rem 0 0.75rem;
}

.legal-page p {
    color: var(--color-gray);
    line-height: 1.8;
    margin-bottom: 1rem;
}

.legal-page ul {
    list-style: disc;
    padding-left: 1.5rem;
    margin-bottom: 1rem;
}

.legal-page li {
    color: var(--color-gray);
    line-height: 1.8;
    margin-bottom: 0.5rem;
}

.legal-page a {
    color: var(--color-primary);
}

.legal-page a:hover {
    text-decoration: underline;
}
