﻿/* ============================================================
   HERO.CSS
   ============================================================ */

.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: calc(var(--header-height) + var(--space-3xl)) 0 var(--space-4xl);
    position: relative;
    overflow: hidden;
}

/* Mesh gradient background */
.hero-bg {
    position: absolute;
    inset: 0;
    background: var(--gradient-mesh);
    animation: meshMove 20s ease-in-out infinite;
}

@keyframes meshMove {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }

    25% {
        transform: translate(-5%, 5%) scale(1.1);
    }

    50% {
        transform: translate(5%, -5%) scale(1);
    }

    75% {
        transform: translate(-3%, -3%) scale(1.05);
    }
}

/* Floating orbs */
.hero-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    animation: orbFloat 15s ease-in-out infinite;
    pointer-events: none;
}

.hero-orb-1 {
    width: 600px;
    height: 600px;
    background: rgba(106, 137, 181, 0.3);
    top: -200px;
    right: -200px;
    animation-delay: 0s;
}

.hero-orb-2 {
    width: 400px;
    height: 400px;
    background: rgba(139, 92, 246, 0.2);
    bottom: -100px;
    left: -100px;
    animation-delay: -5s;
}

.hero-orb-3 {
    width: 300px;
    height: 300px;
    background: rgba(236, 72, 153, 0.15);
    top: 50%;
    left: 50%;
    animation-delay: -10s;
}

@keyframes orbFloat {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }

    33% {
        transform: translate(30px, -30px) scale(1.1);
    }

    66% {
        transform: translate(-20px, 20px) scale(0.95);
    }
}

/* Grid layout */
.hero-content {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-4xl);
    align-items: center;
}

.hero-text {
    max-width: 640px;
}

/* Badge */
.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    padding: 8px 16px 8px 8px;
    background: var(--surface-base);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-full);
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: var(--space-xl);
    box-shadow: var(--shadow-md);
    animation: badgePulse 3s ease-in-out infinite;
}

@keyframes badgePulse {
    0%, 100% {
        box-shadow: var(--shadow-md);
    }

    50% {
        box-shadow: var(--shadow-lg), 0 0 20px rgba(106, 137, 181, 0.2);
    }
}

.hero-badge-dot {
    width: 28px;
    height: 28px;
    background: var(--accent-success);
    border-radius: 50%;
    display: grid;
    place-items: center;
    color: white;
    font-size: 14px;
    position: relative;
}

    .hero-badge-dot::before {
        content: '';
        position: absolute;
        inset: -3px;
        border: 2px solid var(--accent-success);
        border-radius: 50%;
        animation: ping 1.5s cubic-bezier(0, 0, 0.2, 1) infinite;
    }

@keyframes ping {
    75%, 100% {
        transform: scale(1.5);
        opacity: 0;
    }
}

/* Title */
.hero-title {
    font-family: var(--font-display);
    font-size: clamp(48px, 6vw, 80px);
    font-weight: 700;
    line-height: 1.05;
    letter-spacing: -0.03em;
    color: var(--text-primary);
    margin-bottom: var(--space-lg);
}

    .hero-title .line {
        display: block;
        overflow: hidden;
    }

        .hero-title .line span {
            display: inline-block;
            animation: slideUp 1s var(--ease-out-expo) forwards;
            animation-delay: calc(var(--i) * 0.1s);
            transform: translateY(100%);
        }

@keyframes slideUp {
    to {
        transform: translateY(0);
    }
}

.hero-title .gradient-text {
    background: linear-gradient(135deg, var(--brand-400) 0%, var(--accent-purple) 50%, var(--accent-pink) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    background-size: 200% 200%;
    animation: gradientShift 5s ease-in-out infinite;
}

@keyframes gradientShift {
    0%, 100% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }
}

/* Desc & Actions */
.hero-desc {
    font-size: 18px;
    line-height: 1.8;
    color: var(--text-secondary);
    margin-bottom: var(--space-2xl);
    animation: fadeIn 1s ease 0.5s forwards;
    opacity: 0;
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-md);
    margin-bottom: var(--space-3xl);
    animation: fadeIn 1s ease 0.7s forwards;
    opacity: 0;
}

/* Stats */
.hero-stats {
    display: flex;
    gap: var(--space-2xl);
    animation: fadeIn 1s ease 0.9s forwards;
    opacity: 0;
}

.hero-stat {
    position: relative;
}

    .hero-stat::before {
        content: '';
        position: absolute;
        left: -16px;
        top: 50%;
        transform: translateY(-50%);
        width: 3px;
        height: 40px;
        background: var(--gradient-brand);
        border-radius: 2px;
    }

    .hero-stat:first-child::before {
        display: none;
    }

.hero-stat-value {
    font-family: var(--font-display);
    font-size: 36px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
}

.hero-stat-label {
    font-size: 14px;
    color: var(--text-muted);
    margin-top: 4px;
}

/* Visual / Dashboard Card */
.hero-visual {
    position: relative;
    perspective: 1000px;
}

.hero-card-stack {
    position: relative;
    height: 500px;
}

.hero-card {
    position: absolute;
    background: var(--surface-base);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-2xl);
    padding: var(--space-xl);
    box-shadow: var(--shadow-xl);
    transition: all 0.6s var(--ease-out-expo);
    backdrop-filter: blur(10px);
}

.hero-card-main {
    width: 100%;
    height: 100%;
    z-index: 3;
    transform: rotateY(-5deg) rotateX(5deg);
}
.hero-card-float-1 {
    width: 200px;
    top: -30px;
    right: -40px;
    z-index: 4;
    animation: float1 6s ease-in-out infinite;
}

.hero-card-float-2 {
    width: 180px;
    bottom: 40px;
    left: -60px;
    z-index: 4;
    animation: float2 5s ease-in-out infinite;
}

.hero-card-float-3 {
    width: 160px;
    bottom: -20px;
    right: 60px;
    z-index: 4;
    animation: float3 7s ease-in-out infinite;
}

@keyframes float1 {
    0%, 100% {
        transform: translate(0, 0) rotate(3deg);
    }

    50% {
        transform: translate(-10px, -15px) rotate(-3deg);
    }
}

@keyframes float2 {
    0%, 100% {
        transform: translate(0, 0) rotate(-2deg);
    }

    50% {
        transform: translate(15px, -10px) rotate(2deg);
    }
}

@keyframes float3 {
    0%, 100% {
        transform: translate(0, 0) rotate(1deg);
    }

    50% {
        transform: translate(-5px, 10px) rotate(-2deg);
    }
}

/* Card inner components */
.card-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    display: grid;
    place-items: center;
    font-size: 24px;
    margin-bottom: var(--space-md);
}

    .card-icon.success {
        background: rgba(16, 185, 129, 0.1);
        color: var(--accent-success);
    }

    .card-icon.purple {
        background: rgba(139, 92, 246, 0.1);
        color: var(--accent-purple);
    }

    .card-icon.pink {
        background: rgba(236, 72, 153, 0.1);
        color: var(--accent-pink);
    }

    .card-icon.brand {
        background: var(--brand-50);
        color: var(--brand-500);
    }

.card-title {
    font-weight: 600;
    font-size: 15px;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.card-value {
    font-size: 13px;
    color: var(--text-muted);
}

.card-progress {
    height: 6px;
    background: var(--surface-sunken);
    border-radius: var(--radius-full);
    margin-top: var(--space-md);
    overflow: hidden;
}

.card-progress-bar {
    height: 100%;
    background: var(--gradient-brand);
    border-radius: var(--radius-full);
    animation: progressGrow 2s ease-out forwards;
}

@keyframes progressGrow {
    from {
        width: 0;
    }
}

/* Main card interior */
.hero-main-card-header {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    margin-bottom: var(--space-xl);
}

.hero-main-card-avatar {
    width: 56px;
    height: 56px;
    background: var(--gradient-brand);
    border-radius: var(--radius-lg);
    display: grid;
    place-items: center;
    color: white;
    font-size: 24px;
}

.hero-main-card-info h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
}

.hero-main-card-info p {
    font-size: 14px;
    color: var(--text-muted);
}

.hero-main-card-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-md);
    margin-bottom: var(--space-xl);
}

.mini-stat {
    background: var(--surface-sunken);
    border-radius: var(--radius-lg);
    padding: var(--space-md);
    text-align: center;
}

.mini-stat-value {
    font-family: var(--font-display);
    font-size: 28px;
    font-weight: 700;
    color: var(--brand-500);
}

.mini-stat-label {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 4px;
}

.hero-main-card-chart {
    height: 120px;
    display: flex;
    align-items: flex-end;
    gap: 8px;
    padding: var(--space-md);
    background: var(--surface-sunken);
    border-radius: var(--radius-lg);
}

.chart-bar {
    flex: 1;
    background: var(--gradient-brand);
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
    animation: barGrow 1s ease-out forwards;
    animation-delay: calc(var(--i) * 0.1s);
    transform-origin: bottom;
    transform: scaleY(0);
}

@keyframes barGrow {
    to {
        transform: scaleY(1);
    }
}

/* RESPONSIVE */
@media (max-width: 992px) {
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-text {
        max-width: 100%;
    }

    .hero-actions {
        justify-content: center;
    }

    .hero-stats {
        justify-content: center;
    }

    .hero-visual {
        display: none;
    }
}

@media (max-width: 768px) {
    .hero-stats {
        flex-direction: column;
        gap: var(--space-lg);
    }

    .hero-stat::before {
        display: none;
    }
}
