/* ========================================
   Ayla Tales - Website Styles
   Dark theme with Liquid Glass effects
   ======================================== */

/* CSS Variables */
:root {
    --bg-primary: #0a0a0f;
    --bg-secondary: #12121a;
    --bg-card: #1a1a24;
    --bg-card-hover: #22222e;
    
    --text-primary: #ffffff;
    --text-secondary: #9ca3af;
    --text-muted: #6b7280;
    
    /* Accent - Soft Lavender/Violet */
    --accent-primary: #A78BFA;
    --accent-light: #C4B5FD;
    --accent-dark: #7C3AED;
    --accent-glow: #8B5CF6;
    
    /* Secondary accent - Soft Cyan */
    --accent-secondary: #67E8F9;
    --accent-secondary-dark: #22D3EE;
    
    /* Liquid Glass */
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-bg-hover: rgba(255, 255, 255, 0.06);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-border-hover: rgba(167, 139, 250, 0.3);
    --glass-blur: 20px;
    --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    
    --moon-glow: rgba(167, 139, 250, 0.25);
    --star-color: #E0E7FF;
    
    --font-display: 'Cormorant Garamond', Georgia, serif;
    --font-body: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    
    --transition-fast: 0.2s ease;
    --transition-medium: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    
    --border-radius: 20px;
    --border-radius-sm: 12px;
    --border-radius-lg: 28px;
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-body);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
}

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

/* ========================================
   Liquid Glass Effect
   ======================================== */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius);
    box-shadow: var(--glass-shadow);
    transition: all var(--transition-medium);
}

.glass-card:hover {
    background: var(--glass-bg-hover);
    border-color: var(--glass-border-hover);
    box-shadow: 
        var(--glass-shadow),
        0 0 40px rgba(167, 139, 250, 0.1);
}

.glass-btn {
    background: linear-gradient(
        135deg,
        rgba(167, 139, 250, 0.2) 0%,
        rgba(124, 58, 237, 0.3) 100%
    );
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid rgba(167, 139, 250, 0.3);
}

.glass-btn:hover {
    background: linear-gradient(
        135deg,
        rgba(167, 139, 250, 0.3) 0%,
        rgba(124, 58, 237, 0.4) 100%
    );
    border-color: rgba(167, 139, 250, 0.5);
    box-shadow: 
        0 8px 32px rgba(167, 139, 250, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

/* ========================================
   Stars Background
   ======================================== */
.stars-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.stars, .stars2, .stars3 {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-repeat: repeat;
}

.stars {
    background-image: 
        radial-gradient(1px 1px at 20px 30px, var(--star-color), transparent),
        radial-gradient(1px 1px at 40px 70px, var(--star-color), transparent),
        radial-gradient(1px 1px at 50px 160px, var(--star-color), transparent),
        radial-gradient(1px 1px at 90px 40px, var(--star-color), transparent),
        radial-gradient(1px 1px at 130px 80px, var(--star-color), transparent),
        radial-gradient(1px 1px at 160px 120px, var(--star-color), transparent);
    background-size: 200px 200px;
    animation: twinkle 4s ease-in-out infinite;
    opacity: 0.5;
}

.stars2 {
    background-image: 
        radial-gradient(1.5px 1.5px at 100px 50px, var(--star-color), transparent),
        radial-gradient(1.5px 1.5px at 200px 150px, var(--star-color), transparent),
        radial-gradient(1.5px 1.5px at 300px 250px, var(--star-color), transparent);
    background-size: 400px 400px;
    animation: twinkle 6s ease-in-out infinite;
    animation-delay: 1s;
    opacity: 0.4;
}

.stars3 {
    background-image: 
        radial-gradient(2px 2px at 150px 100px, var(--accent-primary), transparent),
        radial-gradient(2px 2px at 350px 300px, var(--accent-secondary), transparent);
    background-size: 500px 500px;
    animation: twinkle 8s ease-in-out infinite;
    animation-delay: 2s;
    opacity: 0.3;
}

@keyframes twinkle {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.6; }
}

/* ========================================
   3D Moon Canvas
   ======================================== */
#moon-canvas-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: 1;
    pointer-events: none;
}

#moon-canvas {
    width: 100%;
    height: 100%;
}

.moon-placeholder {
    width: 250px;
    height: 250px;
    margin: 0 auto 40px;
}

/* ========================================
   Language Switcher
   ======================================== */
.lang-switcher {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 100;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: 50px;
}

.lang-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    padding: 6px 10px;
    border-radius: 8px;
    transition: var(--transition-fast);
}

.lang-btn:hover {
    color: var(--text-primary);
}

.lang-btn.active {
    color: var(--accent-primary);
    background: rgba(167, 139, 250, 0.15);
}

.lang-divider {
    color: var(--text-muted);
    font-size: 12px;
}

/* ========================================
   Hero Section
   ======================================== */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    padding: 80px 24px;
    text-align: center;
    z-index: 2;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
}

/* Hero Title */
.hero-title {
    margin-bottom: 24px;
}

.title-main {
    font-family: var(--font-display);
    font-size: clamp(3rem, 10vw, 6rem);
    font-weight: 700;
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--accent-light) 50%, var(--accent-primary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.02em;
    line-height: 1.1;
    display: inline;
}

.title-sparkle {
    display: inline-block;
    color: var(--accent-secondary);
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    margin-left: 8px;
    animation: sparkle 2s ease-in-out infinite;
    vertical-align: super;
    text-shadow: 0 0 20px var(--accent-secondary);
}

@keyframes sparkle {
    0%, 100% { opacity: 1; transform: scale(1) rotate(0deg); }
    50% { opacity: 0.6; transform: scale(1.2) rotate(180deg); }
}

.hero-subtitle {
    font-size: clamp(1.125rem, 3vw, 1.5rem);
    color: var(--text-secondary);
    margin-bottom: 48px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* CTA Button */
.hero-cta {
    display: flex;
    justify-content: center;
    gap: 16px;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 18px 36px;
    font-family: var(--font-body);
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    border-radius: 50px;
    transition: var(--transition-medium);
    cursor: pointer;
    border: none;
    color: var(--text-primary);
}

.btn-primary {
    box-shadow: 0 8px 32px rgba(167, 139, 250, 0.3);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 40px rgba(167, 139, 250, 0.4);
}

.btn-arrow {
    width: 20px;
    height: 20px;
    transition: transform var(--transition-fast);
}

.btn:hover .btn-arrow {
    transform: translateX(4px);
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    color: var(--text-muted);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    animation: bounce 2s infinite;
}

.mouse {
    width: 28px;
    height: 44px;
    border-radius: 14px;
    position: relative;
    display: flex;
    justify-content: center;
    padding-top: 10px;
}

.wheel {
    width: 4px;
    height: 10px;
    background: var(--accent-primary);
    border-radius: 2px;
    animation: scroll 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateX(-50%) translateY(0); }
    40% { transform: translateX(-50%) translateY(-10px); }
    60% { transform: translateX(-50%) translateY(-5px); }
}

@keyframes scroll {
    0% { opacity: 0; transform: translateY(0); }
    40% { opacity: 1; }
    80% { opacity: 0; transform: translateY(12px); }
    100% { opacity: 0; }
}

/* ========================================
   Section Styles
   ======================================== */
section {
    position: relative;
    z-index: 2;
}

.section-title {
    font-family: var(--font-display);
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 700;
    text-align: center;
    margin-bottom: 60px;
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--accent-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ========================================
   Features Section
   ======================================== */
.features {
    padding: 120px 0;
    background: linear-gradient(180deg, transparent 0%, rgba(18, 18, 26, 0.5) 50%, transparent 100%);
}

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

.feature-card {
    padding: 40px 32px;
    text-align: center;
    opacity: 0;
    transform: translateY(40px);
}

.feature-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.feature-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 24px;
    color: var(--accent-primary);
}

.feature-icon svg {
    width: 100%;
    height: 100%;
}

.feature-card h3 {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--text-primary);
}

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

/* ========================================
   App Preview Section
   ======================================== */
.app-preview {
    padding: 120px 0;
}

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

.preview-text {
    max-width: 500px;
}

.preview-text .section-title {
    text-align: left;
    margin-bottom: 24px;
}

.preview-desc {
    color: var(--text-secondary);
    font-size: 1.125rem;
    line-height: 1.8;
    margin-bottom: 40px;
}

.preview-features {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.glass-list-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    font-size: 1rem;
    color: var(--text-primary);
    border-radius: var(--border-radius-sm);
}

.check-icon {
    color: var(--accent-secondary);
    font-weight: bold;
    font-size: 1.2rem;
}

/* Phone Mockup */
.preview-phone {
    display: flex;
    justify-content: center;
}

.phone-frame {
    width: 300px;
    height: 620px;
    padding: 14px;
    position: relative;
    border-radius: 44px;
    background: linear-gradient(
        145deg,
        rgba(255, 255, 255, 0.05) 0%,
        rgba(255, 255, 255, 0.02) 100%
    );
}

.phone-frame::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 28px;
    background: var(--bg-primary);
    border-radius: 14px;
    z-index: 10;
}

.phone-screen {
    width: 100%;
    height: 100%;
    background: var(--bg-primary);
    border-radius: 36px;
    overflow: hidden;
}

.app-mockup {
    height: 100%;
    display: flex;
    flex-direction: column;
    padding: 60px 16px 16px;
}

.mockup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.mockup-title {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

.mockup-badge {
    background: rgba(167, 139, 250, 0.2) !important;
    color: var(--accent-primary);
    font-size: 10px;
    font-weight: 700;
    padding: 6px 10px;
    border-radius: 8px;
}

.mockup-cards {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.mockup-card {
    height: 100px;
    position: relative;
    overflow: hidden;
    border-radius: var(--border-radius-sm) !important;
}

.mockup-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 40%;
    height: 100%;
    background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-dark) 100%);
    opacity: 0.2;
    border-radius: var(--border-radius-sm) 0 0 var(--border-radius-sm);
}

.mockup-nav {
    display: flex;
    justify-content: space-around;
    padding: 16px 0;
    margin-top: auto;
    border-radius: var(--border-radius-sm) !important;
}

.nav-item {
    font-size: 20px;
    opacity: 0.5;
    transition: var(--transition-fast);
}

.nav-item.active {
    opacity: 1;
}

/* ========================================
   Download Section
   ======================================== */
.download {
    padding: 120px 0;
    text-align: center;
    background: linear-gradient(180deg, transparent 0%, rgba(18, 18, 26, 0.5) 100%);
}

.download-subtitle {
    color: var(--text-secondary);
    font-size: 1.25rem;
    margin-bottom: 48px;
}

.download-buttons {
    display: flex;
    justify-content: center;
    gap: 24px;
    flex-wrap: wrap;
}

.store-btn {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 18px 32px;
    text-decoration: none;
    color: var(--text-primary);
}

.store-btn.disabled {
    opacity: 0.5;
    pointer-events: none;
}

.store-icon {
    width: 32px;
    height: 32px;
}

.store-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.store-label {
    font-size: 12px;
    color: var(--text-secondary);
}

.store-name {
    font-size: 18px;
    font-weight: 600;
}

/* ========================================
   Footer
   ======================================== */
.footer {
    padding: 60px 0 30px;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 32px;
    padding: 32px 40px;
    margin-bottom: 40px;
}

.footer-brand {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.footer-logo {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

.footer-tagline {
    color: var(--text-muted);
    font-size: 14px;
}

.footer-links {
    display: flex;
    gap: 32px;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    transition: var(--transition-fast);
}

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

.footer-social {
    display: flex;
    gap: 16px;
}

.footer-social a {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: var(--text-secondary);
    transition: var(--transition-fast);
}

.footer-social a:hover {
    background: var(--accent-primary) !important;
    color: var(--text-primary);
}

.footer-social svg {
    width: 20px;
    height: 20px;
}

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

/* ========================================
   Responsive Design
   ======================================== */
@media (max-width: 1024px) {
    .preview-content {
        grid-template-columns: 1fr;
        gap: 60px;
    }
    
    .preview-text {
        max-width: 100%;
        text-align: center;
    }
    
    .preview-text .section-title {
        text-align: center;
    }
    
    .preview-features {
        align-items: center;
    }
    
    .glass-list-item {
        max-width: 400px;
        width: 100%;
    }
}

@media (max-width: 768px) {
    .lang-switcher {
        top: 16px;
        right: 16px;
        padding: 8px 14px;
    }
    
    .hero {
        padding: 60px 16px;
    }
    
    .moon-placeholder {
        width: 180px;
        height: 180px;
        margin-bottom: 32px;
    }
    
    .features {
        padding: 80px 0;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .feature-card {
        padding: 32px 24px;
    }
    
    .app-preview {
        padding: 80px 0;
    }
    
    .phone-frame {
        width: 260px;
        height: 540px;
    }
    
    .download {
        padding: 80px 0;
    }
    
    .download-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .store-btn {
        width: 100%;
        max-width: 300px;
        justify-content: center;
    }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
        padding: 24px;
    }
    
    .footer-links {
        flex-wrap: wrap;
        justify-content: center;
        gap: 16px;
    }
}

@media (max-width: 480px) {
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .btn {
        padding: 16px 28px;
        font-size: 14px;
    }
    
    .section-title {
        font-size: 1.75rem;
        margin-bottom: 40px;
    }
}

/* ========================================
   Scroll-based animations
   ======================================== */
.feature-card {
    transition: opacity 0.6s ease, transform 0.6s ease;
}

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

/* Parallax effect on scroll */
.parallax-element {
    will-change: transform;
}
