/* Global Reset & Variables */
:root {
    /* V5.4: Smooth Scrolling */
    scroll-behavior: smooth;

    --font-main: 'Outfit', sans-serif;
    --font-header: 'Orbitron', sans-serif;
    /* V5.1: Orbitron */

    /* Colors */
    --color-bg-body: #F9FAFB;
    --color-bg-canvas: #FFFFFF;
    --color-text-primary: #312D37;
    /* V5.5: Soft Black */
    --color-text-secondary: #666666;
    --color-primary: #111111;
    --color-accent: #FF5A5F;
    --color-border: #E5E5E5;

    --canvas-width: 1080px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-main);
    font-weight: 700;
    /* V5.3: Global Bold */
    background-color: var(--color-bg-body);
    display: flex;
    justify-content: center;
    min-height: 100vh;
    overflow-x: hidden; /* V6: Prevent horizontal scroll */
}

#app-root {
    width: 100%;
    max-width: var(--canvas-width);
    background-color: var(--color-bg-canvas);
    position: relative;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.05);
    min-height: 100vh;
    overflow-x: hidden; /* V6: Contain all content */
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-family: var(--font-main);
    font-weight: 500;
    transition: opacity 0.2s;
    text-decoration: none;
    font-size: 14px;
}

.btn:hover {
    opacity: 0.9;
}

/* === Navbar === */
#navbar {
    position: fixed;
    /* V5.5: Sticky */
    top: 0;
    left: 0;
    width: 100%;
    height: 80px;
    display: flex;
    justify-content: space-between;
    /* Spread items */
    align-items: center;
    padding: 0 60px;
    /* Side padding */
    box-sizing: border-box;
    z-index: 1000;
    background: white;
    /* Ensure bg is opaque */
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

#nav-logo {
    /* V5.3: Revert to Outfit */
    font-weight: 700;
    font-size: 24px;
    color: #312D37;
    /* V5.5: Dark text */
    margin-right: auto;
}

#nav-links {
    /* Fixed: Use flex and spacing instead of absolute left/right to prevent overlap */
    margin-left: auto;
    display: flex;
    gap: 32px;
}

#nav-links a {
    color: var(--color-text-secondary);
    text-decoration: none;
    font-size: 15px;
    font-weight: 700;
}

#nav-cta {
    margin-left: 40px;
    /* Fixed: Add gap between links and button */
    background: #FF5B04;
    /* V5.5: Orange CTA */
    color: white;
    padding: 10px 24px;
    border-radius: 6px;
    flex-shrink: 0;
}

/* V8.1: Auth Navigation */
#nav-auth {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-left: 32px;
}

.nav-auth-link {
    color: var(--color-text-secondary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: color 0.2s;
}

.nav-auth-link:hover {
    color: var(--color-text-primary);
}

.nav-account {
    font-size: 18px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #F3F4F6;
    border-radius: 50%;
    transition: background 0.2s;
}

.nav-account:hover {
    background: #E5E7EB;
}

.btn-small {
    background: #FF5B04;
    color: white;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
}

/* === Hero === */
#hero {
    position: relative;
    padding: 130px 60px 60px 60px; /* V2: Top padding accounts for fixed navbar */
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

#hero-badge {
    display: inline-flex;
    align-items: center;
    font-size: 12px;
    color: var(--color-text-secondary);
    background: #F3F4F6;
    padding: 6px 10px;
    border-radius: 4px;
    margin-bottom: 24px;
}

.badge-new {
    background: #111;
    color: white;
    padding: 2px 6px;
    border-radius: 2px;
    margin-left: 8px;
    font-size: 10px;
}

#hero-headline {
    /* V5.3: Revert to Outfit */
    font-size: 64px;
    font-weight: 600;
    /* V5.4: Semibold */
    line-height: 1.1;
    color: var(--color-text-primary);
    margin-bottom: 20px;
    letter-spacing: -1px;
    white-space: nowrap;
    /* V5: Force one line */
}

#hero-subhead {
    font-size: 15px;
    line-height: 1.6;
    color: var(--color-text-secondary);
    margin-bottom: 32px;
    max-width: 520px;
}

#hero-actions {
    display: flex;
    gap: 16px;
    position: relative;
    /* Fixed: Context for z-index */
    z-index: 10;
    /* Fixed: Bring above image */
    margin-bottom: 40px;
    /* V5: Added spacing */
}

.btn-primary {
    background: #FF5B04;
    /* V5.5: Orange CTA */
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 4px;
}

.btn-secondary {
    background: transparent;
    color: var(--color-primary);
    border: 1px solid #E5E5E5;
    padding: 12px 24px;
    border-radius: 4px;
}

/* === Hero Image (App Screenshot) === */
#hero-image {
    position: relative;
    margin: 0 auto 60px auto;
    width: 100%;
    max-width: 960px;
    padding: 0 20px; /* V6: Side padding for mobile */
    box-sizing: border-box;
}

#app-screenshot {
    width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    display: block;
}

/* === Sections removed in V2 (logo-strip, features) === */

/* === App Carousel Section === */
#app-carousel {
    position: relative;
    width: 100%;
    padding: 60px 0;
    background: #F9FAFB;
    overflow: hidden;
}

.carousel-header {
    font-family: var(--font-main);
    font-size: 40px;
    font-weight: 700;
    color: var(--color-text-primary);
    text-align: center;
    margin-bottom: 16px;
}

.carousel-header .accent {
    color: #FF5B04; /* Orange accent matching CTAs */
}

.carousel-subhead {
    font-size: 18px;
    font-weight: 400;
    color: var(--color-text-secondary);
    text-align: center;
    margin-bottom: 40px;
}

.carousel-container {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 40px; /* 40px spacing between rows */
}

.carousel-track {
    display: flex;
    gap: 48px;
    width: fit-content;
    /* V7.1: GPU acceleration for smooth animation */
    will-change: transform;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

/* Row 1: Scrolls Left */
.carousel-track.carousel-left {
    animation: scroll-left 50s linear infinite; /* V7.1: 25% slower */
}

/* Row 2: Scrolls Right - starts offset, scrolls opposite */
.carousel-track.carousel-right {
    animation: scroll-right 50s linear infinite; /* V7.1: 25% slower */
}

.app-icon {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.app-icon img {
    width: 64px;
    height: 64px;
    object-fit: contain;
    border-radius: 12px;
    background: white;
    padding: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.app-icon span {
    font-size: 12px;
    font-weight: 500;
    color: var(--color-text-secondary);
}

/* V7.1: Webkit-prefixed keyframes for older Safari */
@-webkit-keyframes scroll-left {
    0% { -webkit-transform: translate3d(0, 0, 0); transform: translate3d(0, 0, 0); }
    100% { -webkit-transform: translate3d(-50%, 0, 0); transform: translate3d(-50%, 0, 0); }
}

@-webkit-keyframes scroll-right {
    0% { -webkit-transform: translate3d(-50%, 0, 0); transform: translate3d(-50%, 0, 0); }
    100% { -webkit-transform: translate3d(0, 0, 0); transform: translate3d(0, 0, 0); }
}

/* Animation: Scroll Left (Row 1)
   -50% = exactly half the track width (26 icons duplicated) */
@keyframes scroll-left {
    0% { transform: translate3d(0, 0, 0); }
    100% { transform: translate3d(-50%, 0, 0); }
}

/* Animation: Scroll Right (Row 2)
   Starts at -50%, scrolls back to 0 for opposite direction */
@keyframes scroll-right {
    0% { transform: translate3d(-50%, 0, 0); }
    100% { transform: translate3d(0, 0, 0); }
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    .carousel-track {
        animation: none;
    }
}


/* === Pricing Section === */
#pricing {
    position: relative; /* V2: Normal flow */
    width: 100%;
    padding: 80px 60px;
    background: #F9FAFB;
}

.pricing-header {
    text-align: center;
    margin-bottom: 60px;
}

.pricing-header h2 {
    /* V5.3: Revert to Outfit */
    font-size: 40px;
    font-weight: 700;
    color: var(--color-text-primary);
    margin-bottom: 16px;
}

.pricing-header p {
    font-size: 18px;
    color: var(--color-text-secondary);
}

.pricing-grid {
    display: flex;
    justify-content: center;
    gap: 24px;
    max-width: 960px;
    margin: 0 auto;
}

.pricing-card {
    flex: 1;
    background: white;
    border-radius: 12px;
    padding: 32px;
    border: 1px solid var(--color-border);
    display: flex;
    flex-direction: column;
}

.pricing-card.featured {
    background: black;
    color: white;
    border: 1px solid black;
    position: relative;
    transform: scale(1.05);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.pricing-card h3 {
    font-family: var(--font-header);
    /* V5.3: Keep Orbitron */
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 16px;
    text-transform: none;
    /* V5.3: No Caps */
}

.pricing-card.featured h3 {
    color: white;
}

.price {
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 8px;
    font-family: var(--font-main);
}

.period {
    font-size: 16px;
    font-weight: 400;
    color: var(--color-text-secondary);
}

.pricing-card.featured .period {
    color: #999;
}

.description {
    font-size: 14px;
    color: var(--color-text-secondary);
    margin-bottom: 32px;
    line-height: 1.5;
}

.pricing-card.featured .description {
    color: #ccc;
}

.full-width {
    width: 100%;
    margin-bottom: 32px;
    height: 44px;
}

/* Override secondary button color for black card context if needed */
.pricing-card.featured .btn-primary {
    background: white;
    color: black;
}

.pricing-card.featured .btn-primary:hover {
    background: #eee;
}

.features {
    list-style: none;
    margin-top: auto;
}

.features li {
    font-size: 14px;
    margin-bottom: 12px;
    color: var(--color-text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.pricing-card.featured .features li {
    color: white;
}

.pill-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: #10B981;
    /* Green accent from example */
    color: white;
    font-size: 10px;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 12px;
    text-transform: uppercase;
    /* V5.3: Revert to Outfit */
}

/* === Footer === */
#footer {
    position: relative; /* V2: Normal flow */
    width: 100%;
    padding: 60px;
    background: #F9FAFB;
    border-top: 1px solid var(--color-border);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 960px;
}

.footer-logo {
    /* V5.3: Revert to Outfit */
    font-weight: 700;
    font-size: 24px;
    color: var(--color-text-primary);
}

.footer-links {
    display: flex;
    gap: 32px;
}

.footer-links a {
    color: var(--color-text-secondary);
    text-decoration: none;
    font-size: 14px;
}

.footer-links a:hover {
    color: var(--color-primary);
}

.footer-copyright {
    color: var(--color-text-secondary);
    font-size: 12px;
}

/* === V2: Mobile Responsive === */
@media (max-width: 768px) {
    #navbar {
        padding: 0 20px;
    }
    
    #nav-links {
        display: none; /* Hide nav links on mobile for now */
    }
    
    #nav-cta {
        margin-left: auto;
    }
    
    /* V8.1: Mobile Auth Nav */
    #nav-auth {
        margin-left: auto;
        gap: 8px;
    }
    
    #nav-auth .nav-auth-link:not(.nav-account) {
        display: none; /* Hide Sign In text on mobile */
    }
    
    .btn-small {
        padding: 6px 12px;
        font-size: 12px;
    }
    
    #hero {
        padding: 100px 20px 40px 20px;
    }
    
    #hero-headline {
        font-size: 32px;
        white-space: normal; /* Allow wrapping on mobile */
    }
    
    #hero-subhead {
        font-size: 14px;
    }
    
    #hero-image {
        margin: 0 0 40px 0;
        padding: 0 10px;
    }
    
    #app-screenshot {
        border-radius: 8px;
    }
    
    #pricing {
        padding: 40px 20px;
    }
    
    .pricing-grid {
        flex-direction: column;
        gap: 16px;
    }
    
    .pricing-card.featured {
        transform: none; /* Remove scale on mobile */
    }
    
    #footer {
        padding: 40px 20px;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
    
    /* V7: Carousel Mobile */
    #app-carousel {
        padding: 40px 0;
    }
    
    .carousel-header {
        font-size: 28px;
        padding: 0 20px;
    }
    
    .carousel-subhead {
        font-size: 14px;
        padding: 0 20px;
    }
    
    .carousel-container {
        gap: 24px; /* Reduced row spacing on mobile */
    }
    
    .carousel-track {
        gap: 32px;
    }
    
    .carousel-track.carousel-left,
    .carousel-track.carousel-right {
        animation-duration: 31s; /* V7.1: 25% slower (was 25s) */
    }
    
    .app-icon img {
        width: 48px;
        height: 48px;
        padding: 6px;
    }
    
    .app-icon span {
        font-size: 10px;
    }
}
