/* ===========================
   CSS Reset & Base Styles
   =========================== */

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

:root {
    --primary: #605CFF;
    --primary-dark: #4845CC;
    --on-primary: #FFFFFF;
    --text: #171717;
    --text-light: #525252;
    --bg: #FAFAFA;
    --bg-white: #FFFFFF;
    --border: #E5E5E5;
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    font-size: 16px;
    line-height: 1.6;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

body.legal-page {
    background: var(--bg-white);
}

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

/* ===========================
   Legal Pages
   =========================== */

.legal-header {
    padding: 2.5rem 0 1.5rem;
    border-bottom: 1px solid var(--border);
    background: var(--bg);
}

.legal-header-content {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.legal-header h1 {
    font-size: 2.25rem;
    font-weight: 700;
}

.legal-meta {
    color: var(--text-light);
    font-size: 0.95rem;
}

.legal-back-link {
    text-decoration: none;
    color: var(--primary);
    font-weight: 600;
    width: fit-content;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.legal-back-link:hover {
    color: var(--primary-dark);
}

.legal-content {
    flex: 1;
    padding: 2.5rem 0 4rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.legal-section {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: 1rem;
    padding: 1.75rem;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.03);
}

.legal-section h2 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
}

.legal-list {
    list-style: disc;
    margin-left: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.legal-list li {
    padding-left: 0.25rem;
}

.legal-section a {
    color: var(--primary);
    text-decoration: none;
}

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

/* ===========================
   Hero Section
   =========================== */

.hero {
    padding: 1.5rem 0 2rem;
    background: var(--bg-white);
    display: flex;
    align-items: center;
    flex: 1;
}

.hero-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-content {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.hero-title {
    font-size: 3rem;
    font-weight: 800;
    line-height: 1.1;
    color: var(--text);
}

.hero-subtitle {
    font-size: 1.125rem;
    color: var(--text-light);
    line-height: 1.5;
}

.download-buttons {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.download-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    background: transparent;
    border-radius: 0.75rem;
    text-decoration: none;
    transition: transform 0.15s ease, filter 0.15s ease;
}

.download-btn:hover {
    transform: translateY(-2px);
    filter: drop-shadow(0 10px 15px rgba(0, 0, 0, 0.15));
}

.store-badge {
    height: 3.25rem;
    width: auto;
}

.hero-visual {
    display: flex;
    justify-content: center;
    align-items: center;
}

/* ===========================
   Carousel
   =========================== */

.carousel-container {
    position: relative;
    width: 320px;
    height: 600px;
}

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

.phone-mockup {
    width: 280px;
    height: 560px;
    background: var(--text);
    border-radius: 2.5rem;
    padding: 1rem;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    position: absolute;
    top: 50%;
    left: 50%;
    transition: all 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
    pointer-events: auto;
    cursor: pointer;
}

.phone-mockup::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0);
    border-radius: 2.5rem;
    pointer-events: none;
    transition: background 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
    z-index: 1;
}

.phone-mockup.active {
    transform: translate(-50%, -50%) scale(1) translateX(-20px) rotate(0deg);
    z-index: 10;
    box-shadow: 0 30px 40px -10px rgba(0, 0, 0, 0.2);
    cursor: default;
}

/* Position cards by data-index regardless of active state */
.phone-mockup[data-index="0"]:not(.active) {
    transform: translate(-50%, -50%) scale(0.94) translateX(30px) rotate(2deg);
    z-index: 9;
}

.phone-mockup[data-index="0"]:not(.active)::after {
    background: rgba(255, 255, 255, 0.3);
}

.phone-mockup[data-index="1"]:not(.active) {
    transform: translate(-50%, -50%) scale(0.88) translateX(70px) rotate(4deg);
    z-index: 8;
}

.phone-mockup[data-index="1"]:not(.active)::after {
    background: rgba(255, 255, 255, 0.5);
}

.phone-mockup[data-index="2"]:not(.active) {
    transform: translate(-50%, -50%) scale(0.82) translateX(110px) rotate(6deg);
    z-index: 7;
}

.phone-mockup[data-index="2"]:not(.active)::after {
    background: rgba(255, 255, 255, 0.7);
}

.phone-mockup::before {
    content: '';
    position: absolute;
    top: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 20px;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 1rem;
    z-index: 10;
}

.phone-screen {
    width: 100%;
    height: 100%;
    background: var(--bg);
    border-radius: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.screenshot-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 2rem;
}

/* Navigation Arrows - Hidden */
.carousel-nav {
    display: none;
}

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

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--border);
    border: none;
    cursor: pointer;
    transition: all 0.15s ease;
    padding: 0;
}

.dot:hover {
    background: var(--text-light);
    transform: scale(1.2);
}

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

/* ===========================
   Footer
   =========================== */

.footer {
    padding: 2rem 0;
    background: var(--bg);
    flex-shrink: 0;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-text {
    font-size: 0.875rem;
    color: var(--text-light);
}

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

.footer-link {
    font-size: 0.875rem;
    color: var(--text-light);
    text-decoration: none;
    transition: color 0.15s ease;
}

.footer-link:hover {
    color: var(--text);
}

/* ===========================
   Responsive Design
   =========================== */

@media (max-width: 768px) {
    .hero {
        padding: 3rem 0 2rem;
    }

    .hero-container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1.125rem;
    }

    .phone-mockup {
        width: 250px;
        height: 500px;
    }

    .download-buttons {
        flex-direction: row;
        gap: 0.5rem;
    }

    .download-btn {
        flex: 1;
    }

    .store-badge {
        height: 3rem;
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
    }

    .legal-section {
        padding: 1.25rem;
    }

    .legal-header h1 {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }

    .phone-mockup {
        width: 220px;
        height: 440px;
    }
}

/* ===========================
   Animations
   =========================== */

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

.hero-content > * {
    animation: fadeInUp 0.6s ease forwards;
}

.hero-title { animation-delay: 0.1s; }
.hero-subtitle { animation-delay: 0.2s; }
.download-buttons { animation-delay: 0.3s; }
