/* ===== CSS Variables ===== */
:root {
    --color-primary: #8B5CF6;
    --color-secondary: #EC4899;
    --color-accent: #06B6D4;
    --color-success: #10B981;

    --color-bg-primary: #0A0A0F;
    --color-bg-secondary: #12121A;
    --color-bg-tertiary: #1A1A25;

    --color-text-primary: #FFFFFF;
    --color-text-secondary: rgba(255, 255, 255, 0.7);
    --color-text-tertiary: rgba(255, 255, 255, 0.5);

    --gradient-primary: linear-gradient(135deg, #8B5CF6 0%, #EC4899 100%);
    --gradient-glow: radial-gradient(circle at center, rgba(139, 92, 246, 0.3) 0%, transparent 70%);

    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    --spacing-2xl: 3rem;
    --spacing-3xl: 4rem;
    --spacing-4xl: 6rem;

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;

    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 40px rgba(139, 92, 246, 0.3);

    --transition-fast: 0.15s ease;
    --transition-base: 0.3s ease;
    --transition-slow: 0.5s ease;
}

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

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

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

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

/* ===== Layout ===== */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-lg);
}

/* ===== Typography ===== */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.gradient-text {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ===== Buttons ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-md) var(--spacing-xl);
    font-family: var(--font-family);
    font-weight: 600;
    font-size: 1rem;
    border: none;
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all var(--transition-base);
    text-decoration: none;
}

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

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 60px rgba(139, 92, 246, 0.5);
}

.btn-secondary {
    background: var(--color-bg-tertiary);
    color: var(--color-text-primary);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

.btn-sm {
    padding: var(--spacing-sm) var(--spacing-md);
    font-size: 0.875rem;
}

.btn-lg {
    padding: var(--spacing-lg) var(--spacing-2xl);
    font-size: 1.125rem;
}

.btn-icon {
    width: 20px;
    height: 20px;
}

/* ===== Navigation ===== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: var(--spacing-md) 0;
    background: rgba(10, 10, 15, 0.8);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

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

.logo {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    font-weight: 700;
    font-size: 1.25rem;
}

.logo-icon {
    width: 36px;
    height: 36px;
}

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

.nav-links a {
    color: var(--color-text-secondary);
    font-weight: 500;
    transition: color var(--transition-fast);
}

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

.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: var(--spacing-sm);
}

.mobile-menu-btn span {
    width: 24px;
    height: 2px;
    background: var(--color-text-primary);
    transition: all var(--transition-base);
}

/* ===== Hero Section ===== */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: calc(80px + var(--spacing-3xl)) 0 var(--spacing-3xl);
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    z-index: -1;
}

.hero-gradient {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 80% 50% at 50% -20%, rgba(139, 92, 246, 0.3) 0%, transparent 50%),
        radial-gradient(ellipse 60% 40% at 80% 60%, rgba(236, 72, 153, 0.15) 0%, transparent 50%);
}

.hero-particles {
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle at center, rgba(255, 255, 255, 0.1) 1px, transparent 1px);
    background-size: 60px 60px;
    opacity: 0.3;
}

.hero-content {
    flex: 1;
    max-width: 600px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-sm) var(--spacing-md);
    background: rgba(139, 92, 246, 0.15);
    border: 1px solid rgba(139, 92, 246, 0.3);
    border-radius: var(--radius-full);
    font-size: 0.875rem;
    color: var(--color-primary);
    margin-bottom: var(--spacing-xl);
}

.hero-title {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 800;
    margin-bottom: var(--spacing-lg);
    line-height: 1.1;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--color-text-secondary);
    margin-bottom: var(--spacing-2xl);
    line-height: 1.7;
}

.hero-cta {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-3xl);
}

.hero-stats {
    display: flex;
    align-items: center;
    gap: var(--spacing-xl);
}

.stat {
    text-align: center;
}

.stat-value {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--color-text-tertiary);
}

.stat-divider {
    width: 1px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
}

/* Hero Phone */
.hero-phone {
    position: absolute;
    right: -5%;
    top: 50%;
    transform: translateY(-50%);
    width: 45%;
    max-width: 500px;
}

.phone-mockup {
    background: linear-gradient(145deg, #1a1a25, #0a0a0f);
    border-radius: 48px;
    padding: 12px;
    box-shadow:
        0 50px 100px rgba(0, 0, 0, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.phone-screen {
    background: var(--color-bg-secondary);
    border-radius: 40px;
    overflow: hidden;
    aspect-ratio: 9/19;
}

.app-preview {
    padding: var(--spacing-lg);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-lg);
}

.preview-title {
    font-weight: 600;
    font-size: 1.25rem;
}

.preview-badge {
    font-size: 0.75rem;
    color: var(--color-primary);
    background: rgba(139, 92, 246, 0.15);
    padding: 4px 8px;
    border-radius: var(--radius-full);
}

.preview-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-lg);
}

.preview-photo {
    aspect-ratio: 1;
    background: linear-gradient(135deg, #2a2a3a, #1a1a25);
    border-radius: var(--radius-md);
}

.preview-photo:nth-child(1) { background: linear-gradient(135deg, #8B5CF6, #6366F1); }
.preview-photo:nth-child(2) { background: linear-gradient(135deg, #EC4899, #F472B6); }
.preview-photo:nth-child(3) { background: linear-gradient(135deg, #06B6D4, #22D3EE); }
.preview-photo:nth-child(4) { background: linear-gradient(135deg, #10B981, #34D399); }

.preview-story {
    background: var(--color-bg-tertiary);
    border-radius: var(--radius-md);
    padding: var(--spacing-md);
    flex: 1;
}

.preview-story p {
    font-size: 0.875rem;
    color: var(--color-text-secondary);
    font-style: italic;
}

.floating-tag {
    position: absolute;
    bottom: 20%;
    left: -10%;
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    background: var(--color-bg-secondary);
    padding: var(--spacing-md) var(--spacing-lg);
    border-radius: var(--radius-full);
    box-shadow: var(--shadow-lg);
    animation: float 3s ease-in-out infinite;
}

.floating-tag svg {
    width: 24px;
    height: 24px;
    color: var(--color-primary);
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

/* ===== Features Section ===== */
.features {
    padding: var(--spacing-4xl) 0;
    background: var(--color-bg-secondary);
}

.section-header {
    text-align: center;
    margin-bottom: var(--spacing-3xl);
}

.section-badge {
    display: inline-block;
    padding: var(--spacing-xs) var(--spacing-md);
    background: rgba(139, 92, 246, 0.15);
    color: var(--color-primary);
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: var(--radius-full);
    margin-bottom: var(--spacing-lg);
}

.section-title {
    font-size: clamp(2rem, 4vw, 3rem);
    margin-bottom: var(--spacing-md);
}

.section-subtitle {
    font-size: 1.125rem;
    color: var(--color-text-secondary);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--spacing-lg);
}

.feature-card {
    background: var(--color-bg-tertiary);
    border-radius: var(--radius-xl);
    padding: var(--spacing-xl);
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all var(--transition-base);
}

.feature-card:hover {
    transform: translateY(-4px);
    border-color: rgba(139, 92, 246, 0.3);
    box-shadow: var(--shadow-glow);
}

.feature-large {
    grid-column: span 2;
    grid-row: span 2;
    display: flex;
    flex-direction: column;
}

.feature-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    margin-bottom: var(--spacing-lg);
}

.feature-icon svg {
    width: 24px;
    height: 24px;
}

.feature-icon-nfc { background: rgba(139, 92, 246, 0.15); color: var(--color-primary); }
.feature-icon-ai { background: rgba(236, 72, 153, 0.15); color: var(--color-secondary); }
.feature-icon-privacy { background: rgba(16, 185, 129, 0.15); color: var(--color-success); }
.feature-icon-photos { background: rgba(6, 182, 212, 0.15); color: var(--color-accent); }
.feature-icon-timeline { background: rgba(249, 115, 22, 0.15); color: #F97316; }

.feature-card h3 {
    font-size: 1.25rem;
    margin-bottom: var(--spacing-sm);
}

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

.feature-visual {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: var(--spacing-xl);
}

.nfc-visual {
    position: relative;
}

.nfc-ring {
    position: absolute;
    border: 2px solid var(--color-primary);
    border-radius: 50%;
    opacity: 0;
    animation: pulse-ring 2s ease-out infinite;
}

.nfc-ring:nth-child(1) { width: 60px; height: 60px; animation-delay: 0s; }
.nfc-ring:nth-child(2) { width: 100px; height: 100px; animation-delay: 0.3s; }
.nfc-ring:nth-child(3) { width: 140px; height: 140px; animation-delay: 0.6s; }

@keyframes pulse-ring {
    0% { transform: scale(0.5); opacity: 0; }
    50% { opacity: 0.5; }
    100% { transform: scale(1.5); opacity: 0; }
}

/* ===== How It Works ===== */
.how-it-works {
    padding: var(--spacing-4xl) 0;
}

.steps {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xl);
    max-width: 800px;
    margin: 0 auto;
}

.step {
    display: flex;
    align-items: center;
    gap: var(--spacing-xl);
    background: var(--color-bg-secondary);
    padding: var(--spacing-2xl);
    border-radius: var(--radius-xl);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.step-number {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-primary);
    border-radius: 50%;
    font-weight: 700;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.step-content {
    flex: 1;
}

.step-content h3 {
    font-size: 1.25rem;
    margin-bottom: var(--spacing-sm);
}

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

.step-visual {
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.capsule-icon, .nfc-icon, .heart-icon {
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-bg-tertiary);
    border-radius: var(--radius-lg);
}

.capsule-icon span {
    font-size: 2rem;
    color: var(--color-primary);
}

.nfc-icon svg, .heart-icon svg {
    width: 32px;
    height: 32px;
}

.nfc-icon { color: var(--color-secondary); }
.heart-icon { color: #EF4444; }

.step-connector {
    width: 2px;
    height: 40px;
    background: linear-gradient(to bottom, var(--color-primary), var(--color-secondary));
    margin-left: calc(var(--spacing-2xl) + 23px);
    opacity: 0.5;
}

/* ===== Download Section ===== */
.download {
    padding: var(--spacing-4xl) 0;
}

.download-card {
    background: var(--gradient-primary);
    border-radius: var(--radius-xl);
    padding: var(--spacing-3xl);
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
}

.download-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 70% 50%, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
}

.download-content {
    position: relative;
    z-index: 1;
    max-width: 500px;
}

.download-content h2 {
    font-size: clamp(1.75rem, 3vw, 2.5rem);
    margin-bottom: var(--spacing-md);
}

.download-content p {
    font-size: 1.125rem;
    opacity: 0.9;
    margin-bottom: var(--spacing-xl);
}

.app-store-btn {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-md);
    background: rgba(0, 0, 0, 0.3);
    padding: var(--spacing-md) var(--spacing-xl);
    border-radius: var(--radius-lg);
    transition: all var(--transition-base);
}

.app-store-btn:hover {
    background: rgba(0, 0, 0, 0.5);
    transform: scale(1.02);
}

.app-store-btn svg {
    width: 32px;
    height: 32px;
}

.app-store-btn .small {
    display: block;
    font-size: 0.75rem;
    opacity: 0.8;
}

.app-store-btn .large {
    display: block;
    font-size: 1.25rem;
    font-weight: 600;
}

.download-visual {
    position: relative;
    width: 200px;
    height: 200px;
}

.floating-memories {
    position: relative;
    width: 100%;
    height: 100%;
}

.memory-bubble {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    animation: float 4s ease-in-out infinite;
}

.m1 { width: 80px; height: 80px; top: 10%; left: 20%; animation-delay: 0s; }
.m2 { width: 60px; height: 60px; top: 50%; left: 60%; animation-delay: 1s; }
.m3 { width: 40px; height: 40px; top: 70%; left: 30%; animation-delay: 2s; }

/* ===== Footer ===== */
.footer {
    background: var(--color-bg-secondary);
    padding: var(--spacing-3xl) 0 var(--spacing-xl);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    gap: var(--spacing-3xl);
    margin-bottom: var(--spacing-2xl);
}

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

.footer-brand .logo {
    margin-bottom: var(--spacing-md);
}

.footer-brand p {
    color: var(--color-text-tertiary);
    font-size: 0.9375rem;
}

.footer-links {
    display: flex;
    gap: var(--spacing-3xl);
}

.footer-column h4 {
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-text-tertiary);
    margin-bottom: var(--spacing-md);
}

.footer-column a {
    display: block;
    color: var(--color-text-secondary);
    margin-bottom: var(--spacing-sm);
    font-size: 0.9375rem;
    transition: color var(--transition-fast);
}

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

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

.footer-bottom p {
    color: var(--color-text-tertiary);
    font-size: 0.875rem;
}

/* ===== Responsive ===== */
@media (max-width: 1024px) {
    .hero-phone {
        display: none;
    }

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

    .hero-cta {
        justify-content: center;
    }

    .hero-stats {
        justify-content: center;
    }

    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .feature-large {
        grid-column: span 2;
        grid-row: span 1;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .mobile-menu-btn {
        display: flex;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .feature-large {
        grid-column: span 1;
    }

    .step {
        flex-direction: column;
        text-align: center;
    }

    .step-connector {
        margin-left: 0;
        margin: 0 auto;
    }

    .download-card {
        flex-direction: column;
        text-align: center;
    }

    .download-visual {
        display: none;
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
    }

    .footer-links {
        justify-content: center;
        flex-wrap: wrap;
    }

    .hero-stats {
        flex-wrap: wrap;
        gap: var(--spacing-lg);
    }

    .stat-divider {
        display: none;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .btn-lg {
        width: 100%;
        justify-content: center;
    }

    .hero-cta {
        flex-direction: column;
    }
}
