/* ==========================================================================
   ChapterWave Landing Page Styles
   ========================================================================== */

:root {
    --bg-deep: #07080a;
    --glass-bg: rgba(15, 18, 25, 0.6);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    
    --purple: #a855f7;
    --teal: #06b6d4;
    --pink: #ec4899;
    --emerald: #10b981;
    
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    
    --font-sans: 'Inter', sans-serif;
    --font-heading: 'Outfit', sans-serif;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    background-color: var(--bg-deep);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

/* Typography */
h1, h2, h3, h4 {
    font-family: var(--font-heading);
    line-height: 1.2;
}

.text-gradient {
    background: linear-gradient(135deg, var(--teal), var(--purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
}

.mt-2 { margin-top: 0.5rem; }
.mt-4 { margin-top: 2rem; }
.text-sm { font-size: 0.875rem; }
.text-muted { color: var(--text-muted); }

/* Layout & Containers */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(20px) saturate(160%);
    -webkit-backdrop-filter: blur(20px) saturate(160%);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.1), var(--glass-shadow);
}

/* Background Nebula Animation */
.nebula-bg {
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    z-index: -1;
    background: 
        radial-gradient(circle at 20% 30%, rgba(124, 58, 237, 0.15) 0%, transparent 40%),
        radial-gradient(circle at 80% 70%, rgba(20, 184, 166, 0.1) 0%, transparent 40%),
        radial-gradient(circle at 50% 50%, rgba(236, 72, 153, 0.05) 0%, transparent 60%);
    animation: nebulaBreathe 25s ease-in-out infinite alternate;
}

@keyframes nebulaBreathe {
    0% { transform: scale(1) rotate(0deg); }
    100% { transform: scale(1.1) rotate(3deg); }
}

/* Animations */
.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.fade-in-up.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-family: var(--font-heading);
    font-weight: 600;
    text-decoration: none;
    border-radius: 12px;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
}

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

.btn-lg {
    padding: 16px 32px;
    font-size: 1.1rem;
    border-radius: 16px;
}

.btn-primary {
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.8), rgba(168, 85, 247, 0.8));
    color: #fff;
    box-shadow: 0 4px 15px rgba(6, 182, 212, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0; left: -100%; width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(6, 182, 212, 0.4);
    background: linear-gradient(135deg, rgba(6, 182, 212, 1), rgba(168, 85, 247, 1));
}

.btn-primary:hover::before {
    left: 100%;
}

/* Navbar */
.navbar {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 1200px;
    z-index: 1000;
    border-radius: 20px;
    padding: 12px 24px;
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0;
}

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

.logo h1 {
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.logo-bars {
    display: flex;
    align-items: flex-end;
    gap: 3px;
    height: 24px;
}

.logo-bars span {
    display: block;
    width: 4px;
    border-radius: 2px;
    background: linear-gradient(to top, var(--purple), var(--teal));
}

.logo-bars span:nth-child(1) { height: 12px; }
.logo-bars span:nth-child(2) { height: 20px; }
.logo-bars span:nth-child(3) { height: 16px; }
.logo-bars span:nth-child(4) { height: 24px; }
.logo-bars span:nth-child(5) { height: 14px; }

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

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

.nav-links a:not(.btn):hover {
    color: var(--text-main);
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--text-main);
    cursor: pointer;
    padding: 8px;
}

details summary::-webkit-details-marker {
    display: none;
}

/* Hero Section */
.hero {
    padding: 180px 24px 80px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    min-height: 100vh;
}

.hero-title {
    font-size: 4rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    margin-bottom: 24px;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-bottom: 40px;
    max-width: 90%;
}

.hero-actions {
    display: flex;
    align-items: center;
    gap: 24px;
}

.version-info {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.hero-image-wrapper {
    position: relative;
    perspective: 1000px;
}

.glow-backdrop {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 80%; height: 80%;
    background: var(--teal);
    filter: blur(80px);
    opacity: 0.2;
    z-index: -1;
    border-radius: 50%;
}

.hero-image {
    width: 100%;
    height: auto;
    border-radius: 24px;
    transform: rotateY(-5deg) rotateX(2deg);
    transition: transform 0.5s ease;
    box-shadow: 0 30px 60px rgba(0,0,0,0.6);
}

.hero-image-wrapper:hover .hero-image {
    transform: rotateY(0deg) rotateX(0deg) translateY(-10px);
}

/* Sections Common */
section {
    padding: 100px 24px;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-header h3 {
    color: var(--teal);
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 12px;
}

.section-header h2 {
    font-size: 2.5rem;
    font-weight: 700;
}

/* Features */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 24px;
}

.feature-card {
    padding: 40px 30px;
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
    border-color: rgba(6, 182, 212, 0.3);
}

.feature-icon {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.purple-glow { color: var(--purple); box-shadow: 0 0 30px rgba(168, 85, 247, 0.15); }
.teal-glow { color: var(--teal); box-shadow: 0 0 30px rgba(6, 182, 212, 0.15); }
.pink-glow { color: var(--pink); box-shadow: 0 0 30px rgba(236, 72, 153, 0.15); }
.emerald-glow { color: var(--emerald); box-shadow: 0 0 30px rgba(16, 185, 129, 0.15); }
.indigo-glow { color: #6366f1; box-shadow: 0 0 30px rgba(99, 102, 241, 0.15); }

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

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

/* How It Works */
.steps-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    position: relative;
}

.steps-container::before {
    content: '';
    position: absolute;
    top: 30px;
    left: 10%;
    right: 10%;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(6, 182, 212, 0.3), transparent);
    z-index: -1;
}

.step {
    text-align: center;
}

.step-number {
    width: 60px;
    height: 60px;
    margin: 0 auto 24px;
    background: var(--glass-bg);
    border: 1px solid var(--teal);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--teal);
    box-shadow: 0 0 20px rgba(6, 182, 212, 0.2);
}

.step h4 {
    font-size: 1.3rem;
    margin-bottom: 12px;
}

.step p {
    color: var(--text-muted);
}

/* CTA Section */
.cta-section {
    padding-bottom: 120px;
}

.cta-card {
    text-align: center;
    padding: 80px 40px;
    background: linear-gradient(180deg, rgba(15,18,25,0.6) 0%, rgba(6,182,212,0.05) 100%);
    border-color: rgba(6,182,212,0.2);
}

.cta-card h2 {
    font-size: 2.5rem;
    margin-bottom: 16px;
}

.cta-card p {
    color: var(--text-muted);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
}

/* Footer */
footer {
    border-top: 1px solid var(--glass-border);
    padding: 40px 0;
    background: rgba(0,0,0,0.3);
}

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

.footer-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-heading);
    font-weight: 600;
    color: var(--text-muted);
}

.logo-bars.small { height: 16px; gap: 2px; }
.logo-bars.small span { width: 3px; }
.logo-bars.small span:nth-child(1) { height: 8px; }
.logo-bars.small span:nth-child(2) { height: 14px; }
.logo-bars.small span:nth-child(3) { height: 10px; }
.logo-bars.small span:nth-child(4) { height: 16px; }
.logo-bars.small span:nth-child(5) { height: 10px; }

.copyright {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 992px) {
    .hero {
        grid-template-columns: 1fr;
        text-align: center;
        padding-top: 140px;
    }
    
    .hero-subtitle {
        margin: 0 auto 30px;
    }
    
    .hero-actions {
        justify-content: center;
    }
    
    .hero-image-wrapper {
        margin-top: 40px;
    }
    
    .steps-container {
        grid-template-columns: 1fr;
        gap: 60px;
    }
    
    .steps-container::before {
        display: none;
    }
}

@media (max-width: 768px) {
    .mobile-menu-btn {
        display: block;
    }
    
    .nav-links {
        display: none;
        position: absolute;
        top: 70px;
        left: 0;
        right: 0;
        background: var(--glass-bg);
        backdrop-filter: blur(20px) saturate(160%);
        -webkit-backdrop-filter: blur(20px) saturate(160%);
        flex-direction: column;
        padding: 24px;
        border-radius: 16px;
        border: 1px solid var(--glass-border);
        box-shadow: var(--glass-shadow);
        gap: 20px;
    }
    
    .nav-links.active {
        display: flex;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .cta-card h2 {
        font-size: 2rem;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 16px;
    }
}

/* Fix for Lemon Squeezy Buttons containing icons */
.lemonsqueezy-button * {
    pointer-events: none;
}
