/* ===================================
   Arcane Echo:Magic Match - Main Styles
   Mystic Energetic Tone | Arcane Purple & Mystic Gold
   Mobile-First Responsive Design
   =================================== */

/* ===================================
   CSS Variables
   =================================== */
:root {
    /* Color Palette - Arcane Purple & Mystic Gold */
    --color-primary: #6B2C91;
    --color-primary-medium: #8B4FA0;
    --color-primary-dark: #4A1E6B;
    --color-secondary: #D4A853;
    --color-secondary-light: #F4D582;
    --color-secondary-dark: #B8922F;
    --color-background: #1A0F2E;
    --color-background-light: #2A1F3E;
    --color-surface: #FAF8F5;
    --color-text-dark: #2A1F3E;
    --color-text-light: #FAF8F5;
    --color-text-muted: #8B7A9E;
    
    /* Typography */
    --font-serif: Georgia, 'Times New Roman', Times, serif;
    --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    
    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
    --spacing-xxl: 4rem;
    
    /* Borders & Radius */
    --border-radius-sm: 8px;
    --border-radius-md: 12px;
    --border-radius-lg: 16px;
    --border-radius-pill: 999px;
    
    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
    
    /* Shadows */
    --shadow-glow-primary: 0 0 20px rgba(107, 44, 145, 0.5);
    --shadow-glow-secondary: 0 0 20px rgba(212, 168, 83, 0.5);
    --shadow-card: 0 4px 12px rgba(26, 15, 46, 0.15);
    --shadow-elevated: 0 8px 24px rgba(26, 15, 46, 0.25);
}

/* ===================================
   Base Styles & Reset
   =================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    font-size: 16px;
    line-height: 1.6;
    color: var(--color-text-dark);
    background: var(--color-surface);
    overflow-x: hidden;
}

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

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

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

/* ===================================
   Sticky Header
   =================================== */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 56px;
    background: rgba(250, 248, 245, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(107, 44, 145, 0.1);
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(26, 15, 46, 0.05);
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    height: 100%;
    padding: 0 var(--spacing-sm);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.header-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.header-icon {
    width: 36px;
    height: 36px;
    border-radius: var(--border-radius-sm);
}

.header-title {
    font-family: var(--font-serif);
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--color-primary);
    display: none;
}

.header-nav {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.nav-link {
    display: none;
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--color-text-dark);
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius-sm);
    transition: all var(--transition-fast);
}

.nav-link:hover {
    color: var(--color-primary);
    background: rgba(107, 44, 145, 0.05);
}

.header-cta {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-medium) 100%);
    border-radius: 50%;
    color: var(--color-text-light);
    transition: all var(--transition-normal);
    box-shadow: var(--shadow-glow-primary);
}

.header-cta .cta-text {
    display: none;
}

.header-cta .cta-icon {
    font-size: 1.25rem;
}

.header-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 30px rgba(107, 44, 145, 0.6);
}

.header-cta:active {
    transform: translateY(0);
}

/* ===================================
   Hero Section
   =================================== */
.hero {
    position: relative;
    min-height: 100vh;
    padding: calc(56px + var(--spacing-lg)) var(--spacing-sm) var(--spacing-xl);
    background: linear-gradient(180deg, #1A0F2E 0%, #2A1F3E 50%, #3A2F4E 100%);
    overflow: hidden;
}

.hero-particles {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    background-image: 
        radial-gradient(2px 2px at 20% 30%, rgba(212, 168, 83, 0.4), transparent),
        radial-gradient(2px 2px at 60% 70%, rgba(212, 168, 83, 0.3), transparent),
        radial-gradient(2px 2px at 50% 50%, rgba(212, 168, 83, 0.3), transparent),
        radial-gradient(2px 2px at 80% 10%, rgba(212, 168, 83, 0.4), transparent),
        radial-gradient(2px 2px at 90% 60%, rgba(212, 168, 83, 0.3), transparent);
    background-size: 200% 200%;
    animation: particleFloat 20s ease-in-out infinite;
    opacity: 0.6;
}

@keyframes particleFloat {
    0%, 100% { background-position: 0% 0%, 100% 100%, 50% 50%, 80% 10%, 90% 60%; }
    50% { background-position: 100% 100%, 0% 0%, 70% 30%, 20% 90%, 10% 40%; }
}

.hero-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-xl);
    position: relative;
    z-index: 1;
}

.hero-content {
    text-align: center;
    width: 100%;
}

.hero-icon-wrapper {
    position: relative;
    display: inline-block;
    margin-bottom: var(--spacing-md);
}

.hero-icon {
    width: 120px;
    height: 120px;
    border-radius: var(--border-radius-lg);
    position: relative;
    z-index: 2;
    animation: iconGlowPulse 3s ease-in-out infinite;
}

@keyframes iconGlowPulse {
    0%, 100% { 
        transform: scale(1);
        filter: drop-shadow(0 0 20px rgba(212, 168, 83, 0.5));
    }
    50% { 
        transform: scale(1.05);
        filter: drop-shadow(0 0 30px rgba(212, 168, 83, 0.8));
    }
}

.hero-icon-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 140px;
    height: 140px;
    background: radial-gradient(circle, rgba(212, 168, 83, 0.3) 0%, transparent 70%);
    border-radius: 50%;
    z-index: 1;
    animation: glowExpand 3s ease-in-out infinite;
}

@keyframes glowExpand {
    0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.5; }
    50% { transform: translate(-50%, -50%) scale(1.2); opacity: 0.8; }
}

.hero-title {
    font-family: var(--font-serif);
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1.2;
    color: var(--color-text-light);
    margin-bottom: var(--spacing-sm);
    letter-spacing: -0.02em;
}

.hero-subtitle {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--color-secondary);
    margin-bottom: var(--spacing-md);
}

.hero-description {
    font-size: 1rem;
    line-height: 1.7;
    color: rgba(250, 248, 245, 0.9);
    margin-bottom: var(--spacing-lg);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.download-buttons {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
    align-items: center;
    margin-top: var(--spacing-lg);
}

.btn-download {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    border-radius: var(--border-radius-md);
    font-weight: 600;
    transition: all var(--transition-normal);
    min-height: 56px;
    width: 100%;
    max-width: 280px;
    position: relative;
    overflow: hidden;
}

.btn-google-play {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-medium) 50%, var(--color-secondary) 100%);
    color: var(--color-text-light);
    box-shadow: var(--shadow-glow-primary);
}

.btn-google-play:hover {
    transform: translateY(-3px);
    box-shadow: 0 0 35px rgba(107, 44, 145, 0.7);
}

.btn-google-play:active {
    transform: translateY(-1px);
}

.btn-app-store {
    background: #2a2a2a;
    color: var(--color-text-light);
    opacity: 0.55;
    filter: grayscale(0.6);
    cursor: not-allowed;
    position: relative;
}

.store-icon {
    width: 28px;
    height: 28px;
    flex-shrink: 0;
}

.btn-label {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    line-height: 1.3;
}

.btn-label-top {
    font-size: 0.625rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    opacity: 0.9;
}

.btn-label-bottom {
    font-size: 1.125rem;
    font-weight: 700;
}

.coming-soon-badge {
    font-size: 0.625rem;
    font-weight: 700;
}

.corner-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    background: rgba(212, 168, 83, 0.9);
    color: var(--color-text-dark);
    font-size: 0.625rem;
    font-weight: 700;
    padding: 0.25rem 0.5rem;
    border-radius: 0 var(--border-radius-md) 0 var(--border-radius-sm);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.hero-visual {
    width: 100%;
    max-width: 600px;
}

.hero-banner-wrapper {
    position: relative;
    border-radius: var(--border-radius-lg);
    overflow: hidden;
}

.hero-banner {
    width: 100%;
    height: auto;
    display: block;
    position: relative;
    z-index: 2;
}

.banner-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(107, 44, 145, 0.2) 0%, transparent 70%);
    z-index: 1;
    animation: bannerGlow 4s ease-in-out infinite;
}

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

/* ===================================
   Features Section
   =================================== */
.features {
    padding: var(--spacing-xxl) var(--spacing-sm);
    background: var(--color-surface);
}

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

.section-title {
    font-family: var(--font-serif);
    font-size: 2rem;
    font-weight: 700;
    text-align: center;
    color: var(--color-primary);
    margin-bottom: var(--spacing-sm);
    letter-spacing: -0.02em;
}

.section-subtitle {
    text-align: center;
    font-size: 1.125rem;
    color: var(--color-text-muted);
    margin-bottom: var(--spacing-xl);
}

.features-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--spacing-md);
}

.feature-card {
    background: linear-gradient(135deg, rgba(107, 44, 145, 0.03) 0%, rgba(212, 168, 83, 0.03) 100%);
    border: 2px solid rgba(107, 44, 145, 0.1);
    border-radius: var(--border-radius-lg);
    padding: var(--spacing-lg);
    transition: all var(--transition-normal);
    opacity: 0;
    transform: translateY(20px);
    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; }

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

.feature-card:hover {
    transform: translateY(-4px);
    border-color: rgba(107, 44, 145, 0.3);
    box-shadow: var(--shadow-glow-primary);
}

.feature-icon {
    font-size: 2.5rem;
    margin-bottom: var(--spacing-sm);
    display: inline-block;
    filter: drop-shadow(0 0 10px rgba(212, 168, 83, 0.5));
}

.feature-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-primary-dark);
    margin-bottom: var(--spacing-sm);
}

.feature-description {
    font-size: 0.9375rem;
    line-height: 1.6;
    color: var(--color-text-muted);
}

/* ===================================
   Download CTA Section
   =================================== */
.download-cta {
    position: relative;
    padding: var(--spacing-xxl) var(--spacing-sm);
    background: linear-gradient(135deg, #1A0F2E 0%, #2A1F3E 50%, #3A2F4E 100%);
    overflow: hidden;
}

.download-cta-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        linear-gradient(45deg, rgba(107, 44, 145, 0.1) 25%, transparent 25%),
        linear-gradient(-45deg, rgba(107, 44, 145, 0.1) 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, rgba(107, 44, 145, 0.1) 75%),
        linear-gradient(-45deg, transparent 75%, rgba(107, 44, 145, 0.1) 75%);
    background-size: 40px 40px;
    background-position: 0 0, 0 20px, 20px -20px, -20px 0px;
    opacity: 0.3;
    pointer-events: none;
}

.download-container {
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
    position: relative;
    z-index: 1;
}

.download-title {
    font-family: var(--font-serif);
    font-size: 2rem;
    font-weight: 700;
    color: var(--color-text-light);
    margin-bottom: var(--spacing-sm);
    letter-spacing: -0.02em;
}

.download-subtitle {
    font-size: 1.125rem;
    color: rgba(250, 248, 245, 0.8);
    margin-bottom: var(--spacing-xl);
    line-height: 1.6;
}

.download-buttons-large .btn-download-large {
    min-height: 64px;
    font-size: 1.125rem;
}

/* Floating Mobile CTA */
.floating-cta {
    display: block;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(250, 248, 245, 0.98);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: var(--spacing-sm);
    border-top: 2px solid var(--color-primary);
    box-shadow: 0 -4px 12px rgba(26, 15, 46, 0.15);
    z-index: 999;
    transform: translateY(100%);
    transition: transform var(--transition-normal);
}

.floating-cta.visible {
    transform: translateY(0);
}

.floating-cta-btn {
    display: block;
    width: 100%;
    padding: 1rem;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-medium) 100%);
    color: var(--color-text-light);
    font-weight: 700;
    font-size: 1rem;
    text-align: center;
    border-radius: var(--border-radius-md);
    box-shadow: var(--shadow-glow-primary);
    transition: all var(--transition-normal);
}

.floating-cta-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 30px rgba(107, 44, 145, 0.7);
}

.floating-cta-btn:active {
    transform: translateY(0);
}

/* ===================================
   About Section
   =================================== */
.about {
    padding: var(--spacing-xxl) var(--spacing-sm);
    background: var(--color-surface);
}

.about-container {
    max-width: 800px;
    margin: 0 auto;
}

.about-content {
    font-size: 1rem;
    line-height: 1.8;
    color: var(--color-text-dark);
}

.about-content p {
    margin-bottom: var(--spacing-md);
}

.about-contact {
    margin-top: var(--spacing-lg);
    padding-top: var(--spacing-lg);
    border-top: 1px solid rgba(107, 44, 145, 0.1);
}

.contact-link {
    color: var(--color-primary);
    font-weight: 600;
    text-decoration: underline;
    transition: color var(--transition-fast);
}

.contact-link:hover {
    color: var(--color-primary-medium);
}

/* ===================================
   Footer
   =================================== */
.site-footer {
    background: var(--color-background);
    color: var(--color-text-light);
    padding: var(--spacing-xl) var(--spacing-sm);
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
    text-align: center;
}

.footer-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-sm);
}

.footer-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--border-radius-sm);
}

.footer-brand-name {
    font-family: var(--font-serif);
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--color-secondary);
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--spacing-md);
}

.footer-link {
    font-size: 0.9375rem;
    color: rgba(250, 248, 245, 0.8);
    transition: color var(--transition-fast);
}

.footer-link:hover {
    color: var(--color-secondary);
}

.footer-contact {
    font-size: 0.9375rem;
    color: rgba(250, 248, 245, 0.7);
}

.footer-copyright {
    font-size: 0.875rem;
    color: rgba(250, 248, 245, 0.6);
    padding-top: var(--spacing-md);
    border-top: 1px solid rgba(250, 248, 245, 0.1);
}

/* ===================================
   Responsive - Tablet (768px+)
   =================================== */
@media (min-width: 768px) {
    .site-header {
        height: 64px;
    }
    
    .header-title {
        display: block;
    }
    
    .nav-link {
        display: block;
    }
    
    .header-cta {
        width: auto;
        height: auto;
        padding: 0.625rem 1.25rem;
        border-radius: var(--border-radius-pill);
    }
    
    .header-cta .cta-text {
        display: inline;
    }
    
    .header-cta .cta-icon {
        display: none;
    }
    
    .hero {
        padding: calc(64px + var(--spacing-xl)) var(--spacing-md) var(--spacing-xxl);
    }
    
    .hero-container {
        flex-direction: row;
        align-items: center;
        gap: var(--spacing-xxl);
    }
    
    .hero-content {
        flex: 1;
        text-align: left;
    }
    
    .hero-icon-wrapper {
        margin-bottom: var(--spacing-lg);
    }
    
    .hero-title {
        font-size: 3rem;
    }
    
    .hero-subtitle {
        font-size: 1.5rem;
    }
    
    .hero-description {
        font-size: 1.125rem;
        margin-left: 0;
    }
    
    .download-buttons {
        flex-direction: row;
        justify-content: flex-start;
    }
    
    .btn-download {
        width: auto;
    }
    
    .hero-visual {
        flex: 1;
    }
    
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--spacing-lg);
    }
    
    .download-title {
        font-size: 2.5rem;
    }
    
    .download-subtitle {
        font-size: 1.25rem;
    }
    
    .floating-cta {
        display: none;
    }
    
    .footer-container {
        text-align: left;
    }
    
    .footer-brand {
        flex-direction: row;
    }
    
    .footer-links {
        justify-content: flex-start;
    }
}

/* ===================================
   Responsive - Desktop (1024px+)
   =================================== */
@media (min-width: 1024px) {
    .hero-title {
        font-size: 3.5rem;
    }
    
    .features-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .download-title {
        font-size: 3rem;
    }
}
