/* Hero Section */
.hero-section {
    position: relative;
    min-height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    margin: 65px -50vw 4rem -50vw; /* Top margin for header height, extreme negative side margins */
    width: 100vw; /* Full viewport width */
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
}

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

.hero-gradient {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 30% 50%, rgba(99, 102, 241, 0.1) 0%, transparent 50%),
                radial-gradient(circle at 70% 50%, rgba(139, 92, 246, 0.1) 0%, transparent 50%);
    animation: gradientShift 20s ease-in-out infinite;
}

@keyframes gradientShift {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; transform: scale(1.1); }
}

.hero-particles {
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle, rgba(99, 102, 241, 0.3) 1px, transparent 1px);
    background-size: 50px 50px;
    animation: float 40s linear infinite;
}

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

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 2rem;
    max-width: 800px;
}

.hero-title {
    margin-bottom: 1rem;
}

.hero-title-main {
    font-size: 3.5rem;
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.beta-badge-hero {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    color: white;
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: 999px;
    margin-left: 1rem;
    vertical-align: super;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.hero-subtitle {
    font-size: 1.5rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    font-weight: 300;
}

.hero-description {
    font-size: 1.125rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
    line-height: 1.6;
}

.hero-cta {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-primary, .btn-secondary, .btn-witness {
    padding: 0.875rem 2rem;
    border-radius: 12px;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.5);
}

.btn-secondary {
    background: var(--bg-card);
    color: var(--text-primary);
    border: 2px solid var(--border-light);
}

.btn-secondary:hover {
    background: var(--bg-tertiary);
    transform: translateY(-2px);
}

.btn-witness {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
    box-shadow: 0 4px 14px rgba(245, 158, 11, 0.4);
}

.btn-witness:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(245, 158, 11, 0.5);
}

.btn-icon {
    font-size: 1.25rem;
}

/* Stats Section */
.stats-section {
    margin-bottom: 4rem;
}

.stats-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    padding: 0 2rem;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: 16px;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.stat-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--accent-primary);
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Analytics Banner */
.analytics-banner {
    margin: 3rem 0;
}

.banner-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.banner-content {
    position: relative;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(139, 92, 246, 0.1) 100%);
    border: 2px solid var(--border-light);
    border-radius: 20px;
    padding: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    text-align: center;
    overflow: hidden;
    transition: all 0.3s ease;
}

.banner-content:hover {
    border-color: var(--accent-primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.banner-icon {
    font-size: 3rem;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 53%, 80%, 100% { transform: translate3d(0,0,0); }
    40%, 43% { transform: translate3d(0,-15px,0); }
    70% { transform: translate3d(0,-7px,0); }
    90% { transform: translate3d(0,-2px,0); }
}

.banner-text h3 {
    font-size: 1.75rem;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
}

.banner-text p {
    font-size: 1.125rem;
    color: var(--text-secondary);
    margin: 0;
}

.banner-pulse {
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    border-radius: 20px;
    background: linear-gradient(135deg, var(--accent-primary) 0%, #8b5cf6 100%);
    opacity: 0;
    animation: pulse-border 3s ease-in-out infinite;
    z-index: -1;
}

@keyframes pulse-border {
    0%, 100% { opacity: 0; transform: scale(1); }
    50% { opacity: 0.3; transform: scale(1.02); }
}

[data-theme="dark"] .banner-content {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.15) 0%, rgba(139, 92, 246, 0.15) 100%);
}

/* Features Section */
.features-section {
    padding: 4rem 0;
    margin-bottom: 4rem;
}

.features-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 0.5rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

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

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

.feature-card {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: 24px;
    padding: 2rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-primary);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.feature-card:hover::before {
    transform: scaleX(1);
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.feature-header {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 1.5rem;
    align-items: center;
    margin-bottom: 1rem;
}

.feature-title {
    min-width: 0;
    word-wrap: break-word;
}

.popularity-indicator {
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
    justify-self: end;
    align-self: start;
}

.popularity-indicator.visible {
    opacity: 1;
}

/* Premium Badge Styles for Home Page */
.popularity-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 120px;
    position: relative;
    transition: all 0.3s ease;
}

.popularity-badge.trending {
    background: linear-gradient(135deg, #ef4444 0%, #f97316 100%);
    color: white;
    animation: glow-red 2s ease-in-out infinite;
}

.popularity-badge.popular {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: white;
    animation: glow-purple 3s ease-in-out infinite;
}

.popularity-badge.hot {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    color: white;
    animation: pulse-hot 1.5s ease-in-out infinite;
}

.popularity-badge.rising {
    background: linear-gradient(135deg, #10b981 0%, #06b6d4 100%);
    color: white;
    position: relative;
}

.popularity-badge.rank-1 {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    color: white;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-weight: 700;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.popularity-badge .rank-number {
    background: none;
    color: white;
    font-weight: 700;
    font-size: 0.75rem;
    margin-right: 0.125rem;
}

/* Badge Animations */
@keyframes glow-red {
    0%, 100% { box-shadow: 0 0 5px rgba(239, 68, 68, 0.5); }
    50% { box-shadow: 0 0 20px rgba(239, 68, 68, 0.8); }
}

@keyframes glow-purple {
    0%, 100% { box-shadow: 0 0 5px rgba(99, 102, 241, 0.3); }
    50% { box-shadow: 0 0 15px rgba(99, 102, 241, 0.6); }
}

@keyframes pulse-hot {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 5px rgba(251, 191, 36, 0.5);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 0 20px rgba(251, 191, 36, 0.8);
    }
}

.popularity-tooltip {
    position: absolute;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 12px;
    white-space: nowrap;
    z-index: 1000;
    box-shadow: var(--shadow-md);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.feature-icon {
    font-size: 2rem;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-primary);
    border-radius: 12px;
}

.feature-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
}

.feature-description {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.feature-items {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.feature-item {
    display: flex;
    align-items: center;
    padding: 0.375rem 0.75rem;
    background: var(--bg-tertiary);
    border-radius: 24px;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.feature-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--accent-primary);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s ease;
}

.feature-link:hover {
    gap: 0.75rem;
}

.link-arrow {
    transition: transform 0.2s ease;
}

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

.feature-card.coming-soon {
    opacity: 0.7;
    position: relative;
}

.coming-soon-label {
    position: absolute;
    top: 1rem;
    right: 1rem;
    padding: 0.375rem 0.75rem;
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 20px;
    text-transform: uppercase;
}


/* CTA Section */
.cta-section {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(139, 92, 246, 0.1) 100%);
    border-radius: 24px;
    padding: 4rem 2rem;
    margin: 4rem auto;
    max-width: 1000px;
    text-align: center;
}

.cta-container {
    max-width: 600px;
    margin: 0 auto;
}

.cta-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.cta-subtitle {
    font-size: 1.125rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Personal Dashboards Coming Soon Section */
.coming-soon-section {
    margin: 4rem 0;
}

.coming-soon-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 2rem;
}

.coming-soon-card {
    position: relative;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.08) 0%, rgba(139, 92, 246, 0.08) 100%);
    border: 2px solid var(--border-light);
    border-radius: 24px;
    padding: 3rem;
    display: flex;
    align-items: center;
    gap: 3rem;
    overflow: hidden;
    transition: all 0.3s ease;
}

.coming-soon-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--accent-primary);
}

.coming-soon-icon {
    flex-shrink: 0;
}

.dashboard-preview {
    position: relative;
    font-size: 4rem;
    width: 120px;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-primary);
    border-radius: 20px;
    color: white;
}

.export-preview {
    position: relative;
    font-size: 4rem;
    width: 120px;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border-radius: 20px;
    color: white;
    animation: float 3s ease-in-out infinite;
}

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

.preview-dots {
    position: absolute;
    bottom: 15px;
    right: 15px;
    display: flex;
    gap: 4px;
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.7);
    animation: pulse-dot 2s ease-in-out infinite;
}

.dot:nth-child(2) { animation-delay: 0.5s; }
.dot:nth-child(3) { animation-delay: 1s; }

@keyframes pulse-dot {
    0%, 100% { opacity: 0.7; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.2); }
}

.coming-soon-content {
    flex: 1;
    position: relative;
}

.coming-soon-title {
    font-size: 2.25rem;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
    position: relative;
    display: inline-block;
}

.coming-soon-badge {
    display: inline-block;
    padding: 0.375rem 1rem;
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    color: white;
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1rem;
    animation: glow 2s ease-in-out infinite;
}

@keyframes glow {
    0%, 100% { box-shadow: 0 0 5px rgba(251, 191, 36, 0.5); }
    50% { box-shadow: 0 0 20px rgba(251, 191, 36, 0.8); }
}

.coming-soon-description {
    font-size: 1.125rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 2rem;
}


.coming-soon-glow {
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    border-radius: 24px;
    background: linear-gradient(135deg, var(--accent-primary) 0%, #8b5cf6 100%);
    opacity: 0;
    animation: pulse-glow 4s ease-in-out infinite;
    z-index: -1;
}

@keyframes pulse-glow {
    0%, 100% { opacity: 0; transform: scale(1); }
    25% { opacity: 0.1; transform: scale(1.01); }
    50% { opacity: 0.2; transform: scale(1.02); }
    75% { opacity: 0.1; transform: scale(1.01); }
}

[data-theme="dark"] .coming-soon-card {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.12) 0%, rgba(139, 92, 246, 0.12) 100%);
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-title-main {
        font-size: 2.5rem;
    }

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

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

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

    .banner-content {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }

    .banner-icon {
        font-size: 2.5rem;
    }

    .banner-text h3 {
        font-size: 1.5rem;
    }

    .banner-text p {
        font-size: 1rem;
    }

    .coming-soon-card {
        flex-direction: column;
        text-align: center;
        gap: 2rem;
        padding: 2rem;
    }

    .dashboard-preview {
        width: 100px;
        height: 100px;
        font-size: 3rem;
    }

    .export-preview {
        width: 100px;
        height: 100px;
        font-size: 3rem;
    }

    .coming-soon-title {
        font-size: 1.75rem;
    }

    /* Mobile badge adjustments for home page */
    .feature-header {
        grid-template-columns: 1fr;
        gap: 0.75rem;
        align-items: start;
    }

    .popularity-indicator {
        justify-self: start;
    }

    .popularity-badge {
        font-size: 0.65rem;
        padding: 0.2rem 0.6rem;
        max-width: 100px;
    }

    .popularity-badge .rank-number {
        width: 16px;
        height: 16px;
        font-size: 0.6rem;
    }
}

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

.hero-content {
    animation: fadeInUp 1s ease-out;
}

.stat-card {
    animation: fadeInUp 0.8s ease-out backwards;
}

.stat-card:nth-child(1) { animation-delay: 0.1s; }
.stat-card:nth-child(2) { animation-delay: 0.2s; }
.stat-card:nth-child(3) { animation-delay: 0.3s; }
.stat-card:nth-child(4) { animation-delay: 0.4s; }

.feature-card {
    animation: fadeInUp 0.8s ease-out backwards;
}

.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; }