/* ===========================================================
   fx.css — Yaratıcı UX katmanı için stiller (v2)
   Sadece sınıf/öznitelik tabanlı; Tailwind config'e dokunmaz.
   =========================================================== */

/* Three.js sahnesi için sabit, içerik altında konumlanmış canvas */
#fx-canvas {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    opacity: 0.62;
    mix-blend-mode: screen;
}

/* Hafif (subtle) varyant — diğer sayfalar için */
#fx-canvas.fx-canvas--subtle {
    opacity: 0.32;
}

/* Sayfa içeriğini canvas'ın üstüne taşımak için */
body > nav,
body > header,
body > main,
body > footer {
    position: relative;
    z-index: 2;
}

/* --- Aurora glow katmanı (CSS blob'ları, çok hafif) --- */
.fx-aurora {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
}
.fx-aurora__blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(90px);
    opacity: 0.55;
    will-change: transform;
    mix-blend-mode: screen;
}
.fx-aurora__blob--a {
    width: 56vw;
    height: 56vw;
    left: -10vw;
    top: -18vw;
    background: radial-gradient(circle at 50% 50%, rgba(162, 202, 249, 0.55), transparent 70%);
    animation: fx-aurora-drift-a 22s ease-in-out infinite alternate;
}
.fx-aurora__blob--b {
    width: 44vw;
    height: 44vw;
    right: -8vw;
    top: 18vw;
    background: radial-gradient(circle at 50% 50%, rgba(255, 179, 138, 0.32), transparent 70%);
    animation: fx-aurora-drift-b 28s ease-in-out infinite alternate;
}
.fx-aurora__blob--c {
    width: 64vw;
    height: 64vw;
    left: 20vw;
    bottom: -28vw;
    background: radial-gradient(circle at 50% 50%, rgba(154, 203, 255, 0.30), transparent 70%);
    animation: fx-aurora-drift-c 34s ease-in-out infinite alternate;
}
@keyframes fx-aurora-drift-a {
    0%   { transform: translate(0, 0) scale(1); }
    100% { transform: translate(6vw, 4vw) scale(1.08); }
}
@keyframes fx-aurora-drift-b {
    0%   { transform: translate(0, 0) scale(1); }
    100% { transform: translate(-5vw, 3vw) scale(1.12); }
}
@keyframes fx-aurora-drift-c {
    0%   { transform: translate(0, 0) scale(1); }
    100% { transform: translate(-4vw, -3vw) scale(1.06); }
}

/* Üst scroll-progress çubuğu */
.fx-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 2px;
    width: 0%;
    background: linear-gradient(90deg, transparent, #a2caf9 30%, #ffb38a 65%, #a2caf9 80%, transparent);
    box-shadow: 0 0 10px rgba(162, 202, 249, 0.6);
    z-index: 100;
    transition: width 80ms linear;
    pointer-events: none;
}

/* Özel imleç — soft primary glow */
.fx-cursor {
    position: fixed;
    top: 0;
    left: 0;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    pointer-events: none;
    z-index: 99;
    background: radial-gradient(circle, rgba(162, 202, 249, 0.55) 0%, rgba(162, 202, 249, 0.18) 40%, transparent 70%);
    transform: translate(-50%, -50%);
    transition: width 180ms ease, height 180ms ease, opacity 180ms ease;
    mix-blend-mode: screen;
    opacity: 0;
}
.fx-cursor.is-visible { opacity: 1; }
.fx-cursor.is-active {
    width: 64px;
    height: 64px;
}

/* --- Reveal-on-scroll varyantları --- */
[data-fx-reveal] {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 720ms cubic-bezier(0.22, 0.61, 0.36, 1),
                transform 720ms cubic-bezier(0.22, 0.61, 0.36, 1),
                filter 720ms cubic-bezier(0.22, 0.61, 0.36, 1),
                clip-path 900ms cubic-bezier(0.65, 0.0, 0.35, 1.0);
    will-change: opacity, transform, filter, clip-path;
}
[data-fx-reveal].is-visible {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
    clip-path: inset(0 0 0 0);
}

/* Cinematic mask reveal (yatay perde açılışı) */
[data-fx-reveal="mask"] {
    clip-path: inset(0 100% 0 0);
    transform: translateY(12px);
    opacity: 1;
}
[data-fx-reveal="mask"].is-visible {
    clip-path: inset(0 0 0 0);
    transform: translateY(0);
}

/* Blur-to-focus reveal */
[data-fx-reveal="blur"] {
    opacity: 0;
    filter: blur(14px);
    transform: translateY(18px) scale(1.02);
}
[data-fx-reveal="blur"].is-visible {
    opacity: 1;
    filter: blur(0);
    transform: translateY(0) scale(1);
}

/* Slide-from-left */
[data-fx-reveal="left"] {
    opacity: 0;
    transform: translateX(-40px);
}
[data-fx-reveal="left"].is-visible {
    opacity: 1;
    transform: translateX(0);
}

/* Slide-from-right */
[data-fx-reveal="right"] {
    opacity: 0;
    transform: translateX(40px);
}
[data-fx-reveal="right"].is-visible {
    opacity: 1;
    transform: translateX(0);
}

/* Stagger child — parent reveal sonrasında sırayla görünür */
[data-fx-stagger] {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 560ms cubic-bezier(0.22, 0.61, 0.36, 1),
                transform 560ms cubic-bezier(0.22, 0.61, 0.36, 1);
}
[data-fx-stagger].is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Hero başlık — letter-spacing animasyonu + gradient text */
.fx-hero-title {
    background: linear-gradient(100deg, #ffffff 0%, #cfe5ff 35%, #a2caf9 55%, #ffb38a 90%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    letter-spacing: 0.06em;
    filter: brightness(1.1);
    opacity: 0.001;
    transform: translateY(6px);
    transition: letter-spacing 1100ms cubic-bezier(0.22, 0.61, 0.36, 1),
                opacity 700ms ease-out,
                transform 900ms cubic-bezier(0.22, 0.61, 0.36, 1);
}
.fx-hero-title.is-in {
    opacity: 1;
    transform: translateY(0);
    letter-spacing: -0.02em;
}

/* Hero CTA — sürekli soft pulse */
[data-fx-cta] {
    position: relative;
    isolation: isolate;
}
[data-fx-cta]::before {
    content: "";
    position: absolute;
    inset: -2px;
    border-radius: inherit;
    background: linear-gradient(120deg, rgba(162, 202, 249, 0.55), rgba(255, 179, 138, 0.45));
    filter: blur(14px);
    opacity: 0.55;
    z-index: -1;
    animation: fx-cta-pulse 3.4s ease-in-out infinite;
}
@keyframes fx-cta-pulse {
    0%, 100% { opacity: 0.35; transform: scale(0.98); }
    50%      { opacity: 0.70; transform: scale(1.04); }
}

/* Magnetic buton — yumuşak geçiş için */
[data-fx-magnetic] {
    transition: transform 220ms cubic-bezier(0.22, 0.61, 0.36, 1), box-shadow 220ms ease;
    will-change: transform;
}

/* Bento kartlar için 3D tilt */
[data-fx-tilt] {
    transition: transform 320ms cubic-bezier(0.22, 0.61, 0.36, 1);
    transform-style: preserve-3d;
    will-change: transform;
}

/* Bölüm üst ayraç çizgisi (ince, gradient, hareketli) */
.fx-divider {
    position: relative;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(162, 202, 249, 0.45) 45%, rgba(255, 179, 138, 0.4) 55%, transparent);
    overflow: hidden;
}
.fx-divider::after {
    content: "";
    position: absolute;
    top: -1px;
    left: -30%;
    width: 30%;
    height: 3px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.65), transparent);
    filter: blur(2px);
    animation: fx-divider-sweep 6s ease-in-out infinite;
}
@keyframes fx-divider-sweep {
    0%   { left: -30%; opacity: 0; }
    20%  { opacity: 0.85; }
    80%  { opacity: 0.85; }
    100% { left: 100%; opacity: 0; }
}

/* Mobil — canvas opaklığını azalt ve cursor'u kapat */
@media (max-width: 768px) {
    #fx-canvas { opacity: 0.36; }
    .fx-cursor { display: none; }
    .fx-aurora__blob { filter: blur(60px); opacity: 0.4; }
}

/* Erişilebilirlik: hareket azaltma tercihi */
@media (prefers-reduced-motion: reduce) {
    #fx-canvas { display: none; }
    .fx-aurora { display: none; }
    .fx-cursor { display: none; }
    .fx-progress { display: none; }
    [data-fx-reveal],
    [data-fx-stagger] {
        opacity: 1 !important;
        transform: none !important;
        filter: none !important;
        clip-path: none !important;
        transition: none !important;
    }
    [data-fx-magnetic],
    [data-fx-tilt] {
        transition: none !important;
        transform: none !important;
    }
    [data-fx-cta]::before { animation: none; opacity: 0.4; }
    .fx-hero-title {
        background: none;
        -webkit-text-fill-color: currentColor;
        color: #cfe5ff;
        opacity: 1;
        transform: none;
        letter-spacing: -0.02em;
    }
    .fx-divider::after { animation: none; }
}

/* Type-on efekti için imleç */
.fx-type-cursor::after {
    content: '|';
    color: #a2caf9;
    animation: fxBlink 1s steps(2, start) infinite;
    margin-left: 2px;
}
@keyframes fxBlink {
    to { visibility: hidden; }
}
