/* global.css */
body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: var(--font-sans);
    line-height: 1.6;
    font-size: 16px;
    position: relative;
}

.container {
    width: 100%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 2rem;
}

.section {
    padding: var(--section-padding) 0;
    position: relative;
    z-index: 10;
}

.section-title {
    font-family: var(--font-heading);
    font-size: clamp(1.75rem, 4.5vw, 3rem);
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 3rem;
    letter-spacing: -0.03em;
}

.section-header {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 4rem auto;
}

@media (max-width: 768px) {
    :root {
        --section-padding: 4rem;
    }
    .section-header {
        margin-bottom: 2.5rem;
    }
}

@media (max-width: 480px) {
    :root {
        --section-padding: 3rem;
    }
    .container {
        padding: 0 1.25rem;
    }
}

.section-header .section-title {
    margin-bottom: 1rem;
}

/* Typography Classes */
.dramatic-text {
    font-family: var(--font-heading);
    font-weight: 700;
}

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

.accent {
    color: var(--accent);
}

.dramatic-text.light {
    color: var(--text-primary);
    font-size: 1.25rem;
    margin: 1rem 0;
}

/* Section Badge (unified) */
.section-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    background-color: rgba(244, 244, 245, 0.6);
    margin-bottom: 1.5rem;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.05);
}

.section-badge-dot {
    width: 0.375rem;
    height: 0.375rem;
    border-radius: 50%;
    background-color: var(--accent);
    box-shadow: 0 0 8px var(--accent);
    animation: badge-pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes badge-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.section-badge-text {
    font-size: 0.625rem;
    font-family: var(--font-mono);
    color: var(--text-muted);
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.2s var(--ease-interactive);
}

.btn-primary {
    background-color: var(--text-primary);
    color: #ffffff;
}

.btn-primary:hover {
    background-color: #27272a;
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.btn-outline {
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    background-color: rgba(244, 244, 245, 0.5);
    backdrop-filter: blur(8px);
}

.btn-outline:hover {
    border-color: rgba(99, 102, 241, 0.25);
    background-color: rgba(244, 244, 245, 0.8);
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.125rem;
}

.w-full {
    width: 100%;
}

.text-center {
    text-align: center;
}

.mt-4 {
    margin-top: 1rem;
}

.opacity-70 {
    opacity: 0.7;
}

.icon-sm {
    width: 18px;
    height: 18px;
}

/* Base Interactive Card (Glow Card Concept) */
.glow-card {
    background: var(--bg-elevated);
    border-radius: 16px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    /* variables set by JS per card */
    --x: 50%;
    --y: 50%;
}

.glow-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(800px circle at var(--x) var(--y), rgba(0, 0, 0, 0.03), transparent 40%);
    opacity: 0;
    transition: opacity 0.5s var(--ease-interactive);
    z-index: 1;
    pointer-events: none;
}

.glow-card:hover::before {
    opacity: 1;
}

.card-border {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 16px;
    border: 1px solid var(--border-color);
    z-index: 2;
    pointer-events: none;
}

.glow-card:hover .card-border {
    border-color: rgba(99, 102, 241, 0.2);
}

.card-content {
    position: relative;
    padding: 2.5rem;
    z-index: 3;
}

/* Focus visible — global keyboard navigation */
:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
    border-radius: 3px;
}

/* Animations base classes */
.reveal-on-scroll {
    opacity: 0;
    transform: translateY(40px);
}

.reveal-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s var(--ease-out-smooth), transform 0.8s var(--ease-out-smooth);
}

/* Staggered Children Animations */
.reveal-on-scroll .reveal-child {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s var(--ease-out-smooth), transform 0.8s var(--ease-out-smooth);
}

.reveal-on-scroll.is-visible .reveal-child {
    opacity: 1;
    transform: translateY(0);
}

.reveal-on-scroll.is-visible .reveal-child:nth-child(1) { transition-delay: 0.1s; }
.reveal-on-scroll.is-visible .reveal-child:nth-child(2) { transition-delay: 0.2s; }
.reveal-on-scroll.is-visible .reveal-child:nth-child(3) { transition-delay: 0.3s; }
.reveal-on-scroll.is-visible .reveal-child:nth-child(4) { transition-delay: 0.4s; }
.reveal-on-scroll.is-visible .reveal-child:nth-child(5) { transition-delay: 0.5s; }
.reveal-on-scroll.is-visible .reveal-child:nth-child(6) { transition-delay: 0.6s; }

/* Ambient Background Layer 1 - Refactored */
.fixed-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background-color: #f8f8fa;
    overflow: hidden;
}

.grid-pattern {
    position: absolute;
    inset: 0;
    background-image: linear-gradient(to right, rgba(0, 0, 0, 0.04) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(0, 0, 0, 0.04) 1px, transparent 1px);
    background-size: 24px 24px;
    z-index: 0;
}

.gradient-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, #f8f8fa, transparent);
    z-index: 0;
}

.glow-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.4;
    pointer-events: none;
    z-index: 1;
}

.blob-1 {
    background-color: #818cf8;
    width: 500px;
    height: 500px;
    top: -5rem;
    right: -5rem;
    opacity: 0.15;
    animation: pulse 10s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

.blob-2 {
    background-color: #e879f9;
    width: 600px;
    height: 600px;
    bottom: -10rem;
    left: -5rem;
    opacity: 0.1;
}

.blob-3 {
    background-color: #22d3ee;
    width: 300px;
    height: 300px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0.08;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 0.4;
        transform: scale(1);
    }

    50% {
        opacity: 0.2;
        transform: scale(1.05);
    }
}

/* CURTAIN REVEAL */
#curtain {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.panel {
    width: 20%;
    height: 100%;
    background-color: #ffffff;
    border-right: 1px solid #e4e4e7;
    transform: translateY(0);
    will-change: transform;
}

.curtain-active .panel {
    transform: translateY(-100%);
    transition: transform 1s cubic-bezier(0.76, 0, 0.24, 1);
    transition-delay: calc(var(--i) * 100ms);
}

/* SVG DRAW */
.hero-svg {
    width: 8rem;
    height: 8rem;
    margin: 0 auto 1rem auto;
    color: var(--text-primary);
    opacity: 0.9;
    filter: drop-shadow(0 0 15px rgba(0, 0, 0, 0.15));
}

.hero-svg svg {
    width: 100%;
    height: 100%;
    overflow: visible;
}

.path {
    stroke-dasharray: 2000;
    stroke-dashoffset: 2000;
    fill-opacity: 0;
}

.draw-active .path {
    stroke-dashoffset: 0;
    fill-opacity: 1;
    transition: stroke-dashoffset 2.5s ease-in-out, fill-opacity 1s ease-in-out 2s;
}

/* 3D CARDS PERSPECTIVE */
.perspective-container {
    perspective: 1000px;
}

.card-3d {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    transform-style: preserve-3d;
}

.card-3d:hover {
    transform: translateY(-5px) rotateX(2deg) rotateY(2deg);
}

