/* ============================================
   WordBuilder Landing Page Styles
   ============================================ */

/* CSS Variables */
:root {
    --primary: #7c3aed;
    --primary-dark: #6d28d9;
    --secondary: #06b6d4;
    --accent: #f59e0b;
    --dark: #0f172a;
    --dark-light: #1e293b;
    --gray: #64748b;
    --gray-light: #94a3b8;
    --white: #ffffff;
    --gradient: linear-gradient(135deg, #7c3aed 0%, #06b6d4 50%, #10b981 100%);
    --gradient-text: linear-gradient(135deg, #7c3aed, #06b6d4, #10b981);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow: 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);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --radius: 12px;
    --radius-lg: 20px;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--dark);
    color: var(--white);
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    line-height: 1.2;
}

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

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

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

/* Gradient Text */
.gradient-text {
    background: var(--gradient-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
}

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

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(124, 58, 237, 0.3);
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.875rem;
}

/* ============================================
   Navigation
   ============================================ */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 16px 0;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.navbar.scrolled {
    padding: 12px 0;
    background: rgba(15, 23, 42, 0.95);
}

.navbar-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
}

.logo-img {
    height: 40px;
    width: auto;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 32px;
}

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

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

.nav-links .btn {
    color: var(--white);
}

.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.mobile-menu-btn span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--white);
    transition: all 0.3s ease;
}

/* ============================================
   Hero Section
   ============================================ */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 120px 0 80px;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    background: 
        radial-gradient(circle at 20% 50%, rgba(124, 58, 237, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 80% 50%, rgba(6, 182, 212, 0.2) 0%, transparent 50%),
        radial-gradient(circle at 50% 100%, rgba(16, 185, 129, 0.2) 0%, transparent 50%);
    z-index: -1;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.hero-text h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    margin-bottom: 24px;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--gray-light);
    margin-bottom: 40px;
    max-width: 500px;
}

.hero-cta {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: stretch;
}

.store-badge {
    display: inline-flex;
    align-items: center;
    height: 56px;
}

.store-badge img {
    height: 56px;
    width: auto;
}

.store-badge.large,
.store-badge.large img {
    height: 64px;
}

.appstore-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 0 18px;
    height: 56px;
    background: #000;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 10px;
    text-decoration: none;
    color: var(--white);
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.appstore-badge.large {
    height: 64px;
    padding: 0 22px;
}

.appstore-badge:hover {
    background: #1a1a1a;
    border-color: rgba(255, 255, 255, 0.5);
}

.apple-icon {
    width: 26px;
    height: 26px;
    color: var(--white);
    flex-shrink: 0;
}

.appstore-label {
    display: block;
    font-size: 0.6rem;
    color: var(--gray-light);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.appstore-title {
    display: block;
    font-weight: 600;
    font-size: 1.1rem;
    line-height: 1.2;
}

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

.phone-mockup {
    position: relative;
    max-width: 300px;
    padding: 12px;
    background: linear-gradient(145deg, #2d2d2d, #1a1a1a);
    border-radius: 40px;
    box-shadow: 
        0 50px 100px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(255, 255, 255, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.phone-mockup::before {
    content: '';
    position: absolute;
    top: 12px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 24px;
    background: #1a1a1a;
    border-radius: 20px;
    z-index: 10;
}

.phone-mockup img {
    border-radius: 28px;
    width: 100%;
}

.hero-wave {
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    color: var(--dark-light);
}

.hero-wave svg {
    display: block;
    width: 100%;
    height: 80px;
}

/* ============================================
   Section Headers
   ============================================ */
.section-header {
    text-align: center;
    max-width: 600px;
    margin: 0 auto 60px;
}

.section-header h2 {
    font-size: clamp(2rem, 4vw, 2.75rem);
    margin-bottom: 16px;
}

.section-header p {
    color: var(--gray-light);
    font-size: 1.125rem;
}

/* ============================================
   Features Section
   ============================================ */
.features {
    background: var(--dark-light);
    padding: 100px 0;
}

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

.feature-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-lg);
    padding: 32px;
    transition: all 0.3s ease;
}

.feature-card:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(124, 58, 237, 0.3);
    transform: translateY(-4px);
}

.feature-icon {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient);
    border-radius: 14px;
    margin-bottom: 20px;
}

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

.feature-card h3 {
    font-size: 1.25rem;
    margin-bottom: 12px;
}

.feature-card p {
    color: var(--gray-light);
    font-size: 0.95rem;
}

/* ============================================
   Screenshots Section
   ============================================ */
.screenshots {
    background: var(--dark);
    padding: 100px 0;
}

.screenshots-carousel {
    position: relative;
    display: flex;
    align-items: center;
    gap: 20px;
}

.carousel-btn {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    color: var(--white);
}

.carousel-btn:hover {
    background: var(--primary);
    border-color: var(--primary);
}

.carousel-btn svg {
    width: 24px;
    height: 24px;
}

.screenshots-track {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding: 20px 0;
}

.screenshots-track::-webkit-scrollbar {
    display: none;
}

.screenshot-item {
    flex-shrink: 0;
    width: 220px;
    scroll-snap-align: center;
    text-align: center;
}

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

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

.screenshot-label {
    display: block;
    margin-top: 12px;
    font-weight: 500;
    color: var(--gray-light);
}

.carousel-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 30px;
}

.carousel-dots .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    cursor: pointer;
    transition: all 0.3s ease;
}

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

/* ============================================
   About Section
   ============================================ */
.about {
    background: var(--dark);
    padding: 100px 0;
    position: relative;
}

.about::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(124, 58, 237, 0.5), transparent);
}

.about-content {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 60px;
    align-items: center;
}

.about-text h2 {
    font-size: clamp(2rem, 4vw, 2.75rem);
    margin-bottom: 16px;
}

.about-intro {
    font-size: 1.25rem;
    color: var(--white);
    margin-bottom: 24px;
    font-weight: 500;
}

.about-text p {
    color: var(--gray-light);
    font-size: 1.05rem;
    margin-bottom: 16px;
    line-height: 1.8;
}

.about-ios {
    margin-top: 24px;
    padding: 20px;
    background: rgba(124, 58, 237, 0.1);
    border: 1px solid rgba(124, 58, 237, 0.3);
    border-radius: var(--radius);
}

.about-ios strong {
    color: var(--white);
}

.about-image {
    display: flex;
    justify-content: center;
    align-items: center;
}

.about-logo {
    width: 200px;
    height: auto;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
}

@media (max-width: 1024px) {
    .about-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .about-image {
        order: -1;
    }
    
    .about-logo {
        width: 160px;
    }
}

/* ============================================
   Download Section
   ============================================ */
.download {
    background: linear-gradient(135deg, var(--dark-light) 0%, var(--dark) 100%);
    padding: 100px 0;
    position: relative;
    overflow: hidden;
}

.download::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 0% 50%, rgba(124, 58, 237, 0.15) 0%, transparent 40%),
        radial-gradient(circle at 100% 50%, rgba(6, 182, 212, 0.1) 0%, transparent 40%);
    pointer-events: none;
}

.download-content {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 60px;
    align-items: center;
    position: relative;
}

.download-text h2 {
    font-size: clamp(2rem, 4vw, 3rem);
    margin-bottom: 20px;
}

.download-text p {
    color: var(--gray-light);
    font-size: 1.125rem;
    margin-bottom: 32px;
    max-width: 500px;
}

.download-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: stretch;
    margin-bottom: 24px;
}

.qr-codes-row {
    display: flex;
    gap: 24px;
    justify-content: center;
    margin-bottom: 16px;
}

.qr-code-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.qr-label {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--gray-light);
}

.qr-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-lg);
    padding: 32px;
    text-align: center;
}

.qr-card h3 {
    font-size: 1.125rem;
    margin-bottom: 20px;
}

.qr-code {
    width: 140px;
    height: 140px;
    margin: 0 auto;
    background: var(--white);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.qr-code img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 8px;
}

.qr-placeholder {
    color: var(--dark);
    font-weight: 600;
}

.qr-card p {
    color: var(--gray);
    font-size: 0.875rem;
}

/* ============================================
   Footer
   ============================================ */
.footer {
    background: #0a0f1a;
    padding: 60px 0 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 60px;
    margin-bottom: 40px;
}

.footer-brand {
    max-width: 280px;
}

.footer-logo {
    height: 36px;
    width: auto;
    margin-bottom: 16px;
}

.footer-brand p {
    color: var(--gray);
    font-size: 0.95rem;
}

.footer-links {
    display: flex;
    gap: 60px;
    justify-content: flex-end;
}

.footer-column h4 {
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 16px;
    color: var(--white);
}

.footer-column a {
    display: block;
    color: var(--gray);
    font-size: 0.95rem;
    padding: 6px 0;
    transition: color 0.3s ease;
}

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

.footer-bottom {
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    text-align: center;
}

.footer-bottom p {
    color: var(--gray);
    font-size: 0.85rem;
    margin-bottom: 8px;
}

/* ============================================
   Responsive Design
   ============================================ */
@media (max-width: 1024px) {
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .hero-text {
        order: 1;
    }
    
    .hero-image {
        order: 0;
    }
    
    .hero-subtitle {
        margin-left: auto;
        margin-right: auto;
    }
    
    .hero-cta {
        justify-content: center;
    }
    
    .download-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .download-text p {
        margin-left: auto;
        margin-right: auto;
    }
    
    .download-badges {
        display: flex;
        justify-content: center;
    }
    
    .download-qr {
        display: flex;
        justify-content: center;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .footer-brand {
        max-width: 100%;
        margin: 0 auto;
    }
    
    .footer-links {
        justify-content: center;
        flex-wrap: wrap;
        gap: 40px;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: rgba(15, 23, 42, 0.98);
        flex-direction: column;
        padding: 20px;
        gap: 16px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .nav-links.active {
        display: flex;
    }
    
    .mobile-menu-btn {
        display: flex;
    }
    
    .mobile-menu-btn.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }
    
    .mobile-menu-btn.active span:nth-child(2) {
        opacity: 0;
    }
    
    .mobile-menu-btn.active span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -5px);
    }
    
    .hero {
        padding: 100px 0 60px;
    }
    
    .phone-mockup {
        max-width: 240px;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .screenshot-item {
        width: 180px;
    }
    
    .carousel-btn {
        display: none;
    }
    
    .footer-links {
        flex-direction: column;
        gap: 30px;
    }
}

@media (max-width: 480px) {
    .hero-cta {
        flex-direction: column;
        align-items: center;
    }
    
    .store-badge,
    .store-badge img,
    .store-badge.large,
    .store-badge.large img {
        height: 48px;
    }

    .appstore-badge,
    .appstore-badge.large {
        height: 48px;
    }
    
    .qr-card {
        display: none;
    }
}

/* ============================================
   Animations
   ============================================ */
@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-20px);
    }
}

.phone-mockup {
    animation: float 6s ease-in-out infinite;
}

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

.hero-text,
.hero-image,
.feature-card,
.screenshot-item {
    animation: fadeInUp 0.6s ease forwards;
}

.feature-card:nth-child(1) { animation-delay: 0.1s; }
.feature-card:nth-child(2) { animation-delay: 0.2s; }
.feature-card:nth-child(3) { animation-delay: 0.3s; }
.feature-card:nth-child(4) { animation-delay: 0.4s; }
.feature-card:nth-child(5) { animation-delay: 0.5s; }
.feature-card:nth-child(6) { animation-delay: 0.6s; }
