/* ==========================================
   Cinopsys - Mobile App Landing Page
   ========================================== */

/* Theme Variables (Light Mode Default) */
:root {
    --bg-body: #ffffff;
    --bg-surface: #f3f4f6;
    --bg-surface-2: #e5e7eb;
    --text-main: #111827;
    --text-muted: #4b5563;
    --primary: #FF385C;
    /* Airbnb Rausch Red - primary accent */
    --primary-hover: #E03150;
    --border-color: #e5e7eb;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* Dark Mode Overrides */
[data-theme="dark"] {
    --bg-body: #0f0f11;
    --bg-surface: #18181b;
    --bg-surface-2: #27272a;
    --text-main: #f9fafb;
    --text-muted: #9ca3af;
    --border-color: #27272a;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 10px 25px -3px rgba(0, 0, 0, 0.5);
}

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

body {
    background-color: var(--bg-body);
    color: var(--text-main);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    line-height: 1.6;
    transition: background-color 0.3s ease, color 0.3s ease;
    overflow-x: hidden;
}

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

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

h1,
h2,
h3 {
    line-height: 1.2;
    font-weight: 700;
}

/* ==========================================
   Background Poster Wall
   ========================================== */
.poster-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: -1;
    display: flex;
    justify-content: center;
    gap: 20px;
    transform: rotate(-15deg) scale(1.5);
    /* Scale up to cover edges */
    opacity: 0.08;
    /* Very subtle */
    pointer-events: none;
    filter: grayscale(100%);
}

.poster-col {
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 250px;
}

.poster-col img {
    width: 100%;
    border-radius: 12px;
    display: block;
}

/* Animations */
.poster-col:nth-child(1) {
    animation: scrollUp 60s linear infinite;
}

.poster-col:nth-child(2) {
    animation: scrollDown 70s linear infinite;
}

.poster-col:nth-child(3) {
    animation: scrollUp 65s linear infinite;
}

@keyframes scrollUp {
    0% {
        transform: translateY(0);
    }

    100% {
        transform: translateY(-50%);
    }
}

@keyframes scrollDown {
    0% {
        transform: translateY(-50%);
    }

    100% {
        transform: translateY(0);
    }
}

/* ==========================================
   Navigation
   ========================================== */
header {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 100;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

[data-theme="dark"] header {
    background: rgba(15, 15, 17, 0.8);
}

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

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

.nav-logo img {
    width: 32px;
    height: 32px;
    border-radius: 8px;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.nav-links a {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-muted);
    transition: color 0.2s;
}

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

.theme-toggle {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: background-color 0.2s, color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.theme-toggle:hover {
    background-color: var(--bg-surface);
    color: var(--text-main);
}

.theme-toggle svg {
    width: 20px;
    height: 20px;
}

/* ==========================================
   Hero Section
   ========================================== */
.hero {
    padding: 160px 1.5rem 100px;
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 60px;
}

.hero-content h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    margin-bottom: 1.5rem;
    letter-spacing: -0.02em;
}

.hero-content p {
    font-size: 1.125rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    max-width: 540px;
}

/* Trust Badges */
.trust-badges {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.trust-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 100px;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--primary);
    background: rgba(255, 56, 92, 0.08);
    border: 1px solid rgba(255, 56, 92, 0.2);
    transition: all 0.2s ease;
}

.trust-badge:hover {
    background: rgba(255, 56, 92, 0.12);
    border-color: rgba(255, 56, 92, 0.3);
    transform: translateY(-1px);
}

.trust-badge svg {
    flex-shrink: 0;
}

[data-theme="dark"] .trust-badge {
    background: rgba(255, 56, 92, 0.15);
    border-color: rgba(255, 56, 92, 0.25);
}

[data-theme="dark"] .trust-badge:hover {
    background: rgba(255, 56, 92, 0.2);
    border-color: rgba(255, 56, 92, 0.35);
}

.app-badges {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn-download {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background: var(--text-main);
    color: var(--bg-body);
    padding: 16px 32px;
    border-radius: 14px;
    font-weight: 700;
    font-size: 1.05rem;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.btn-download:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 6px 30px rgba(0, 0, 0, 0.25);
}

.btn-glass {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background-color: var(--bg-surface-2);
    color: var(--text-main);
    padding: 12px 20px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.95rem;
    transition: transform 0.2s, background-color 0.2s;
    border: 1px solid var(--border-color);
}

.btn-glass:hover {
    transform: translateY(-2px);
    background-color: var(--bg-surface);
}

[data-theme="dark"] .btn-glass {
    background-color: rgba(255, 255, 255, 0.12);
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.2);
}

[data-theme="dark"] .btn-download {
    background: rgba(255, 255, 255, 0.95);
    color: #111;
    box-shadow: 0 4px 20px rgba(255, 255, 255, 0.15);
}

[data-theme="dark"] .btn-download:hover {
    box-shadow: 0 6px 30px rgba(255, 255, 255, 0.25);
}

.hero-image {
    position: relative;
    display: flex;
    justify-content: center;
}

/* Device Mockup CSS - Android Style */
.device-mockup {
    width: 300px;
    border: 8px solid var(--text-main);
    border-radius: 32px;
    /* Slightly less rounded for Android look */
    overflow: hidden;
    position: relative;
    background: var(--bg-surface);
    box-shadow: var(--shadow-lg);
    aspect-ratio: 9/19;
    z-index: 10;
}

/* Android Punch-hole Camera */
.device-notch {
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    width: 12px;
    height: 12px;
    background: var(--text-main);
    border-radius: 50%;
    /* Circular punch-hole */
    z-index: 20;
}

/* Carousel Animation */
.carousel-track {
    display: flex;
    flex-direction: column;
    width: 100%;
    animation: scrollVertical 25s linear infinite;
}

.carousel-track:hover {
    animation-play-state: paused;
}

.device-screen {
    width: 100%;
    /* Let the height adjust naturally or ensure 9/19 ratio if screenshots match */
    height: auto;
    display: block;
}

@keyframes scrollVertical {
    0% {
        transform: translateY(0);
    }

    100% {
        transform: translateY(-50%);
    }
}



/* ==========================================
   Social Proof Bar (Hero)
   ========================================== */
.social-proof-bar {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-muted);
}

.social-proof-bar .separator {
    color: var(--border-color);
}

/* ==========================================
   Trakt Integration Section
   ========================================== */
.trakt-section {
    padding: 100px 1.5rem;
    background-color: var(--bg-surface);
}

[data-theme="dark"] .trakt-section {
    background-color: var(--bg-body);
}

.trakt-grid {
    max-width: 1000px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 60px;
}

.trakt-content {
    text-align: left;
}

.trakt-logo {
    width: 64px;
    height: 64px;
    margin-bottom: 1.5rem;
}

.trakt-content h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--text-main);
}

.trakt-content p {
    font-size: 1.125rem;
    color: var(--text-muted);
    line-height: 1.7;
}

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

.sync-animation {
    width: 200px;
    height: 200px;
    background: var(--bg-surface-2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.sync-icon {
    color: var(--primary);
    animation: spin 3s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* ==========================================
   Final CTA Section
   ========================================== */
.final-cta {
    padding: 100px 1.5rem;
    background: linear-gradient(135deg, rgba(255, 56, 92, 0.05) 0%, rgba(255, 56, 92, 0.1) 100%);
    text-align: center;
}

[data-theme="dark"] .final-cta {
    background: linear-gradient(135deg, rgba(255, 56, 92, 0.1) 0%, rgba(255, 56, 92, 0.15) 100%);
}

.final-cta .container {
    max-width: 600px;
    margin: 0 auto;
}

.final-cta h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--text-main);
}

.cta-stats {
    font-size: 1rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-kofi {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: #ff5e5b;
    color: #fff;
    padding: 14px 24px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.95rem;
    transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
    box-shadow: 0 4px 14px rgba(255, 94, 91, 0.3);
}

.btn-kofi:hover {
    background: #e54542;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 94, 91, 0.4);
}

.btn-kofi svg {
    fill: #fff;
}

/* ==========================================
   Features Section (Compact Grid)
   ========================================== */
/* ==========================================
   Features Section (Expanded Grid)
   ========================================== */
.features {
    padding: 100px 1.5rem;
    background-color: var(--bg-surface);
}

[data-theme="dark"] .features {
    background-color: var(--bg-body);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

.feature-card {
    text-align: left;
    padding: 32px;
    border-radius: 24px;
    background: var(--bg-body);
    border: 1px solid var(--border-color);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    height: 100%;
}

[data-theme="dark"] .feature-card {
    background: var(--bg-surface-2);
    border-color: rgba(255, 255, 255, 0.05);
}

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
    border-color: rgba(255, 56, 92, 0.3);
}

[data-theme="dark"] .feature-card:hover {
    background: linear-gradient(145deg, var(--bg-surface-2), rgba(255, 56, 92, 0.05));
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
}

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

.feature-card p {
    color: var(--text-muted);
    font-size: 1rem;
    line-height: 1.6;
}

.feature-icon {
    width: 60px;
    height: 60px;
    background: rgba(255, 56, 92, 0.1);
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    margin-bottom: 1.5rem;
    transition: transform 0.3s ease;
}

.feature-card:hover .feature-icon {
    transform: scale(1.1) rotate(5deg);
    background: var(--primary);
    color: #fff;
}

/* ==========================================
   Testimonials Section
   ========================================== */
.testimonials {
    padding: 100px 1.5rem;
    background-color: var(--bg-body);
    text-align: center;
}

[data-theme="dark"] .testimonials {
    background-color: var(--bg-surface);
}

.section-title {
    font-size: 2rem;
    margin-bottom: 3rem;
    color: var(--text-main);
    text-align: center;
}

.testimonials-grid {
    column-count: 3;
    column-gap: 24px;
    max-width: 1100px;
    margin: 0 auto;
}

.testimonial-card {
    background: var(--bg-surface);
    padding: 32px;
    border-radius: 24px;
    text-align: left;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    break-inside: avoid;
    margin-bottom: 24px;
}

[data-theme="dark"] .testimonial-card {
    background: var(--bg-surface-2);
}

.stars {
    color: #fbbf24;
    /* Amber-400 */
    font-size: 1.1rem;
    margin-bottom: 1rem;
    letter-spacing: 2px;
}

.review-text {
    font-size: 1rem;
    color: var(--text-main);
    margin-bottom: 1.5rem;
    font-style: italic;
    flex-grow: 1;
}

.review-author {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* ==========================================
   Utility Classes & Footer
   ========================================== */
.text-highlight {
    color: var(--primary);
}

footer {
    padding: 60px 1.5rem;
    text-align: center;
    border-top: 1px solid var(--border-color);
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 2rem;
}

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

/* ==========================================
   Tablet Responsive
   ========================================== */
@media (max-width: 1024px) {
    .testimonials-grid {
        column-count: 2;
    }
}

/* ==========================================
   Mobile Responsive
   ========================================== */
@media (max-width: 768px) {
    .nav-links {
        display: none;
        /* Hide for simplicity, can add burger later if needed */
    }

    .hero {
        grid-template-columns: 1fr;
        text-align: center;
        padding-top: 120px;
    }

    .hero-content h1 {
        font-size: 2.5rem;
    }

    .hero-content p {
        margin-left: auto;
        margin-right: auto;
    }

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

    .trust-badges {
        justify-content: center;
    }

    .social-proof-bar {
        justify-content: center;
        flex-wrap: wrap;
    }

    .features-grid {
        display: flex;
        gap: 16px;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        padding: 0 1.5rem 20px;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .features-grid::-webkit-scrollbar {
        display: none;
    }

    .feature-card {
        flex: 0 0 85%;
        /* Show 85% of the card to encourage scrolling */
        scroll-snap-align: center;
        height: auto;
        /* Allow height to fit content */
    }

    .testimonials {
        overflow-x: clip;
        padding-left: 0;
        padding-right: 0;
    }

    .testimonials .container {
        padding: 0;
    }

    .testimonials .section-title {
        padding: 0 1.5rem;
    }

    .testimonials-grid {
        column-count: unset;
        display: flex;
        gap: 16px;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        padding: 0 1.5rem 20px;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .testimonials-grid::-webkit-scrollbar {
        display: none;
    }

    .testimonial-card {
        flex: 0 0 calc(100% - 48px);
        scroll-snap-align: center;
        margin-bottom: 0;
        padding: 24px;
    }

    .testimonial-card .review-text {
        font-size: 0.95rem;
        line-height: 1.6;
    }

    /* Feature Card Mobile Override Removed: Keeping padding for box look */
    /* Legacy feature-block styles removed */

    /* Trakt Section Mobile */
    .trakt-section {
        padding: 60px 1.5rem;
    }

    .trakt-grid {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 40px;
    }

    .trakt-content {
        text-align: center;
    }

    .trakt-logo {
        margin-left: auto;
        margin-right: auto;
    }

    .trakt-visual {
        display: none;
    }

    /* Final CTA Mobile */
    .final-cta {
        padding: 60px 1.5rem;
    }

    .final-cta h2 {
        font-size: 2rem;
    }

    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }
}

/* ==========================================
   Ko-fi Modal
   ========================================== */
.kofi-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.kofi-modal.active {
    display: flex;
}

.kofi-modal-content {
    position: relative;
    width: 90%;
    max-width: 420px;
    height: 80%;
    max-height: 700px;
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.kofi-modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
    border: none;
    background: rgba(0, 0, 0, 0.1);
    color: #333;
    font-size: 1.5rem;
    line-height: 1;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    transition: background 0.2s;
}

.kofi-modal-close:hover {
    background: rgba(0, 0, 0, 0.2);
}

.kofi-modal iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* ==========================================
   Accessibility - Visually Hidden
   ========================================== */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ==========================================
   Reduced Motion Preferences
   ========================================== */
@media (prefers-reduced-motion: reduce) {

    .poster-col,
    .carousel-track,
    .sync-icon {
        animation: none;
    }

    .poster-col {
        transform: none;
    }

    .carousel-track {
        transform: none;
    }

    .sync-icon {
        transform: none;
    }
}