@import url('https://fonts.googleapis.com/css2?family=Figtree:wght@300;400;600;700;800;900&display=swap');

:root {
    --brand-indigo: #040B1F;
    --brand-magenta: #D946EF;
    --brand-purple: #8B5CF6;
    --brand-surface: #0F172A;
    --premium-gold: #FFD700;
    --text-primary: #FFFFFF;
    --text-secondary: rgba(255, 255, 255, 0.7);
    --text-muted: rgba(255, 255, 255, 0.4);
    --gradient-premium: linear-gradient(135deg, #2E1065 0%, #040B1F 40%, #040B1F 100%);
    --gradient-accent: linear-gradient(90deg, var(--brand-purple), var(--brand-magenta));
    --gradient-cinematic: linear-gradient(to right, #8B5CF6, #D946EF);
    --glass-background: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
}

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

body {
    font-family: 'Figtree', sans-serif;
    background-color: var(--brand-indigo);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Intro Overlay */
#intro-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: var(--brand-indigo);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: opacity 1s cubic-bezier(0.4, 0, 0.2, 1);
}

#intro-overlay.fade-out {
    opacity: 0;
    pointer-events: none;
}

.intro-logo {
    display: flex;
    align-items: center;
    font-size: 80px;
    font-weight: 900;
    letter-spacing: -2px;
    position: relative;
    gap: 0; /* Force no gap */
}

.intro-f, .intro-s {
    color: white;
}

.intro-s {
    background: var(--gradient-cinematic);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-left: 5px;
}

.intro-expand {
    display: inline-block;
    width: 0;
    overflow: hidden;
    white-space: nowrap;
    transition: width 1.2s cubic-bezier(0.23, 1, 0.32, 1);
}

.intro-expand.expanded {
    width: 320px; /* Increased to ensure 'tream' (5 chars) fits at 80px */
}

/* Specific widths if needed to be more precise */
.aith.expanded { width: 160px; }
.tream.expanded { width: 260px; }

.intro-expand.aith { color: white; }
.intro-expand.tream {
    background: var(--gradient-cinematic);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.intro-tagline {
    margin-top: 40px;
    font-weight: 300;
    letter-spacing: 4px;
    text-transform: uppercase;
    color: var(--text-secondary);
    opacity: 0;
    transform: translateY(20px);
    transition: all 1s ease 1s;
}

.intro-tagline.visible {
    opacity: 0.8;
    transform: translateY(0);
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Typography */
h1, h2, h3 {
    font-weight: 800;
    letter-spacing: -0.02em;
}

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

/* Glassmorphism */
.glass {
    background: var(--glass-background);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 16px 32px;
    border-radius: 50px;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    text-align: center;
}

.btn-primary {
    background: var(--text-primary);
    color: var(--brand-indigo);
}

.btn-primary:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 20px rgba(255, 255, 255, 0.1);
}

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

.btn-accent:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 20px rgba(139, 92, 246, 0.3);
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    padding: 100px 5%;
    background: var(--gradient-premium);
    background-image: url('../assets/hero-bg.png');
    background-size: cover;
    background-position: center;
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 50% 50%, transparent 20%, var(--brand-indigo) 100%);
    opacity: 0.6;
}

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

.hero h1 {
    font-size: 4.5rem;
    line-height: 1.1;
    margin-bottom: 24px;
}

.hero p {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 40px;
    max-width: 500px;
}

/* Features */
.section {
    padding: 120px 5%;
}

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

.section-header h2 {
    font-size: 3rem;
    margin-bottom: 16px;
}

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

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

.feature-card:hover {
    transform: translateY(-10px);
}

.feature-card i {
    font-size: 2.5rem;
    margin-bottom: 24px;
    display: block;
}

/* Subscriptions */
.pricing-grid {
    display: flex;
    justify-content: center;
    gap: 32px;
    flex-wrap: wrap;
}

.pricing-card {
    flex: 1;
    min-width: 320px;
    max-width: 400px;
    padding: 48px;
    display: flex;
    flex-direction: column;
}

.pricing-card.premium {
    border: 2px solid var(--brand-purple);
    position: relative;
    overflow: hidden;
}

.pricing-card.premium::after {
    content: 'BEST VALUE';
    position: absolute;
    top: 20px;
    right: -30px;
    background: var(--premium-gold);
    color: var(--brand-indigo);
    padding: 4px 40px;
    font-size: 0.75rem;
    font-weight: 800;
    transform: rotate(45deg);
}

.price {
    font-size: 3.5rem;
    font-weight: 900;
    margin: 24px 0;
}

.price span {
    font-size: 1rem;
    color: var(--text-muted);
    font-weight: 400;
}

.feature-list {
    list-style: none;
    margin-bottom: 40px;
    flex-grow: 1;
}

.feature-list li {
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    color: var(--text-secondary);
}

.feature-list li i {
    color: #10B981;
    margin-right: 12px;
}

/* App Download */
.download-section {
    text-align: center;
    background: var(--brand-surface);
    border-radius: 48px;
    padding: 80px 40px;
}

.mockup-container {
    margin-top: 60px;
}

.mockup-container img {
    max-width: 100%;
    height: auto;
    filter: drop-shadow(0 20px 50px rgba(0,0,0,0.5));
}

.store-buttons {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-top: 32px;
    flex-wrap: wrap;
}

/* Footer */
footer {
    padding: 80px 5% 40px;
    border-top: 1px solid var(--glass-border);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    margin-bottom: 60px;
}

.footer-logo h2 {
    font-size: 1.5rem;
    margin-bottom: 16px;
}

.footer-links h4 {
    margin-bottom: 20px;
    color: var(--text-primary);
}

.footer-links ul {
    list-style: none;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: var(--brand-magenta);
}

.footer-bottom {
    text-align: center;
    padding-top: 40px;
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* Responsive */
@media (max-width: 768px) {
    .intro-logo {
        font-size: 40px;
    }
    
    .intro-expand.expanded {
        width: 150px;
    }
    
    .aith.expanded { width: 80px; }
    .tream.expanded { width: 130px; }

    .hero h1 {
        font-size: 3rem;
    }
    
    .hero {
        text-align: center;
        justify-content: center;
    }
    
    .hero-content {
        max-width: 100%;
    }
    
    .hero p {
        margin-inline: auto;
    }

    .cta-group {
        justify-content: center;
        margin-inline: auto; /* Fix button margin */
    }
}

/* About Section Services Grid */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    margin-top: 60px;
}

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

.service-card:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--brand-magenta);
    transform: translateY(-5px);
}

.service-card h4 {
    color: var(--brand-magenta);
    margin-bottom: 12px;
    font-size: 1.25rem;
}

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

/* Animation utility class */
.visible {
    opacity: 1;
    transform: translateY(0);
}
