/* ===========================================
   KONFECTOR — Hero Section
   =========================================== */

.hero {
    position: relative;
    min-height: 92vh;
    display: flex;
    align-items: center;
    overflow: hidden;
    padding-top: 4rem;
    /* navbar offset */
    background: linear-gradient(165deg, var(--surface-0) 0%, var(--primary-900) 40%, var(--primary-800) 100%);
}

/* —— Background Elements —— */
.hero-bg-elements {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
}

.hero-bg-circle {
    position: absolute;
    border-radius: 0;
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    filter: blur(80px);
    opacity: 0.5;
}

.hero-bg-circle-1 {
    width: 500px;
    height: 500px;
    background: var(--accent-glow);
    top: -10%;
    right: -5%;
    animation: heroFloat 8s ease-in-out infinite;
}

.hero-bg-circle-2 {
    width: 350px;
    height: 350px;
    background: rgba(0, 168, 204, 0.08);
    bottom: 10%;
    left: -5%;
    animation: heroFloat 10s ease-in-out infinite 2s;
}

.hero-bg-circle-3 {
    width: 200px;
    height: 200px;
    background: rgba(232, 220, 192, 0.04);
    top: 40%;
    left: 50%;
    animation: heroFloat 7s ease-in-out infinite 4s;
}

@keyframes heroFloat {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }

    50% {
        transform: translate(20px, -30px) scale(1.05);
    }
}

/* —— Grid Pattern —— */
.hero-grid-pattern {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(var(--border-subtle) 1px, transparent 1px),
        linear-gradient(90deg, var(--border-subtle) 1px, transparent 1px);
    background-size: 60px 60px;
    mask-image: radial-gradient(ellipse at center, black 30%, transparent 70%);
    -webkit-mask-image: radial-gradient(ellipse at center, black 30%, transparent 70%);
    opacity: 0.4;
}

/* —— ASCII Art Background —— */
.hero-ascii {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    pointer-events: none;
    opacity: 0.12;
}

.hero-ascii pre {
    line-height: 1.1;
    color: var(--accent-400);
    font-family: var(--font-mono);
    white-space: pre;
    user-select: none;
    font-size: clamp(0.35rem, 1.2vw, 0.6rem);
}

/* —— Content —— */
.hero-content {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: var(--space-2xl) var(--space-lg);
}

.hero-text {
    max-width: 42rem;
}

.hero-title {
    margin-bottom: var(--space-lg);
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--accent-400) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: heroTitleIn 0.8s var(--ease-out) both;
}

@keyframes heroTitleIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-subtitle {
    font-size: clamp(1.05rem, 1.8vw, 1.35rem);
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: var(--space-xl);
    animation: heroSubIn 0.8s var(--ease-out) 0.15s both;
}

@keyframes heroSubIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* —— Hero Buttons —— */
.hero-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-md);
    margin-bottom: var(--space-3xl);
    animation: heroSubIn 0.8s var(--ease-out) 0.3s both;
}

/* —— Hero Stats —— */
.hero-stats {
    display: flex;
    gap: var(--space-2xl);
    animation: heroSubIn 0.8s var(--ease-out) 0.45s both;
}

.hero-stat {
    position: relative;
    padding-left: var(--space-md);
}

.hero-stat::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, var(--accent-500), transparent);
    border-radius: 0;
}

.hero-stat-value {
    font-family: var(--font-heading);
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--accent-400);
    line-height: 1;
    margin-bottom: var(--space-xs);
}

.hero-stat-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 500;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

/* —— Hero compact variant (subpages) —— */
.hero--compact {
    min-height: 50vh;
}

.hero--compact .hero-text {
    text-align: center;
    max-width: 100%;
}

.hero--compact .hero-title {
    font-size: clamp(2rem, 4vw, 3rem);
}