/* Background Effects Layout */
.bg-effects {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
    background: #050505;
    transition: background var(--transition-normal);
}

[data-theme="light"] .bg-effects {
    background: #FFFFFF;
}

.bg-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    will-change: transform;
}

/* Katman 1: Aurora Gradient Blob */
.layer-aurora {
    background: radial-gradient(circle at 30% 20%, rgba(193, 18, 31, 0.1), transparent 45%),
                radial-gradient(circle at 80% 70%, rgba(214, 40, 40, 0.08), transparent 50%),
                radial-gradient(circle at 50% 50%, rgba(193, 18, 31, 0.05), transparent 60%);
    filter: blur(180px);
    opacity: 0.45;
    animation: rotateAurora 45s linear infinite;
    transform-origin: 55% 45%;
    width: 160%;
    height: 160%;
    top: -30%;
    left: -30%;
}

[data-theme="light"] .layer-aurora {
    background: radial-gradient(circle at 30% 20%, rgba(193, 18, 31, 0.04), transparent 45%),
                radial-gradient(circle at 80% 70%, rgba(193, 18, 31, 0.03), transparent 50%);
    filter: blur(120px);
    opacity: 0.3;
}

/* Katman 2: Kırmızı-Siyah Hareketli Bulutlar (Canvas üzerinden çizilecek) */
.layer-clouds {
    opacity: 0.2;
    mix-blend-mode: screen;
}

[data-theme="light"] .layer-clouds {
    opacity: 0.06;
    mix-blend-mode: multiply;
}

/* Katman 3: Ultra İnce Izgara Izleği */
.layer-grid {
    background-image: 
        linear-gradient(to right, rgba(255, 255, 255, 0.015) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(255, 255, 255, 0.015) 1px, transparent 1px);
    background-size: 50px 50px;
    background-position: center center;
    opacity: 0.8;
}

[data-theme="light"] .layer-grid {
    background-image: 
        linear-gradient(to right, rgba(193, 18, 31, 0.02) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(193, 18, 31, 0.02) 1px, transparent 1px);
    opacity: 0.5;
}

/* Katman 4: Noise Texture Doku */
.layer-noise {
    background-image: url('data:image/svg+xml,%3Csvg viewBox="0 0 200 200" xmlns="http://www.w3.org/2000/svg"%3E%3Cfilter id="noiseFilter"%3E%3CfeTurbulence type="fractalNoise" baseFrequency="0.8" numOctaves="4" stitchTiles="stitch"/%3E%3C/filter%3E%3Crect width="100%25" height="100%25" filter="url(%23noiseFilter)" opacity="0.035"/%3E%3C/svg%3E');
    opacity: 0.8;
}

[data-theme="light"] .layer-noise {
    opacity: 0.25;
}

/* Katman 5: Radial Glow Küreleri */
.layer-glows .orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(150px);
    opacity: 0.15;
    animation: orbFloat 25s ease-in-out infinite alternate;
    will-change: transform;
}

.orb-1 {
    width: 450px;
    height: 450px;
    background: radial-gradient(circle, rgba(193,18,31,0.35) 0%, transparent 70%);
    top: 15%;
    left: 10%;
}

.orb-2 {
    width: 550px;
    height: 550px;
    background: radial-gradient(circle, rgba(214,40,40,0.25) 0%, transparent 70%);
    bottom: 10%;
    right: 5%;
    animation-delay: -10s !important;
}

@keyframes rotateAurora {
    0% { transform: rotate(0deg) scale(1); }
    50% { transform: rotate(180deg) scale(1.1); }
    100% { transform: rotate(360deg) scale(1); }
}

@keyframes orbFloat {
    0% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(80px, -50px) scale(1.15); }
    100% { transform: translate(-40px, 60px) scale(0.9); }
}

/* Modern Reveal & Mask Animations (Sade & Kurumsal) */
[data-reveal] {
    opacity: 0;
    transform: translateY(15px);
    will-change: transform, opacity;
    transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1), transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-reveal="fade-right"] {
    transform: translateX(-15px) translateY(0);
}

[data-reveal="fade-left"] {
    transform: translateX(15px) translateY(0);
}

[data-reveal="zoom-in"] {
    transform: scale(0.96) translateY(0);
}

/* Mask Reveal animation (premium Vercel look) */
[data-reveal="mask"] {
    transform: translateY(0);
    filter: blur(0px);
    -webkit-clip-path: inset(100% 0 0 0);
    clip-path: inset(100% 0 0 0);
    transition: clip-path var(--transition-slow);
}

.is-revealed[data-reveal] {
    opacity: 1;
    filter: blur(0px);
    transform: translate(0) scale(1);
}

.is-revealed[data-reveal="mask"] {
    -webkit-clip-path: inset(0 0 0 0);
    clip-path: inset(0 0 0 0);
}

/* Hero Section Animations */
@keyframes heroGlowPulse {
    0% { opacity: 0.45; transform: translate(-50%, -50%) scale(1); }
    50% { opacity: 0.65; transform: translate(-50%, -50%) scale(1.12); }
    100% { opacity: 0.45; transform: translate(-50%, -50%) scale(1); }
}

/* Spinning loading icon */
.fa-spin {
    animation: fa-spin 1s infinite linear;
}

@keyframes fa-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Fade up helper keyframes */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
