/* Anasayfa korku efektleri — yalnızca body.page-home */

body.page-home {
    --horror-accent: #c41e3a;
    --horror-glow: rgba(196, 30, 58, 0.55);
}

/* İçerik atmosfer katmanının üstünde */
body.page-home .custom-navbar {
    z-index: 1030;
}

body.page-home .home-top-section,
body.page-home #team-chat,
body.page-home main.container {
    position: relative;
    z-index: 5;
}

/* ——— Atmosfer katmanı ——— */
.horror-fx {
    position: fixed;
    inset: 0;
    z-index: 2;
    pointer-events: none;
    overflow: hidden;
}

/* Üst/orta (cadı) alanı açık, kenarlar hafif karanlık */
.horror-vignette {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 75% 55% at 50% 28%,
            transparent 0%,
            transparent 50%,
            rgba(0, 0, 0, 0.22) 78%,
            rgba(60, 0, 0, 0.18) 100%),
        linear-gradient(180deg,
            transparent 0%,
            transparent 55%,
            rgba(10, 10, 10, 0.35) 100%);
    animation: horrorVignettePulse 6s ease-in-out infinite;
}

.horror-scanlines {
    position: absolute;
    inset: 0;
    opacity: 0.05;
    background: repeating-linear-gradient(0deg,
            transparent 0px,
            transparent 2px,
            rgba(0, 0, 0, 0.35) 3px,
            transparent 4px);
    animation: horrorScanDrift 8s linear infinite;
}

.horror-noise {
    position: absolute;
    inset: -50%;
    opacity: 0.04;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    animation: horrorNoise 0.5s steps(4) infinite;
}

.horror-flash {
    position: absolute;
    inset: 0;
    background: rgba(196, 30, 58, 0.25);
    opacity: 0;
    mix-blend-mode: screen;
}

.horror-flash.is-active {
    animation: horrorFlashBurst 0.35s ease-out forwards;
}

.horror-ember {
    position: absolute;
    bottom: -10px;
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: var(--horror-accent);
    box-shadow: 0 0 8px var(--horror-glow);
    opacity: 0;
    animation: horrorEmberRise var(--ember-dur, 8s) linear infinite;
    animation-delay: var(--ember-delay, 0s);
    left: var(--ember-x, 50%);
}

/* ——— Hero glitch başlık ——— */
body.page-home .hero-brand.horror-glitch-title {
    position: relative;
    display: inline-block;
    animation: heroTitleFlicker 5s ease-in-out infinite !important;
}

body.page-home .hero-brand.horror-glitch-title::before,
body.page-home .hero-brand.horror-glitch-title::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    clip-path: inset(0 0 0 0);
    font: inherit;
    letter-spacing: inherit;
    text-transform: inherit;
    line-height: inherit;
}

body.page-home .hero-brand.horror-glitch-title::before {
    left: 2px;
    text-shadow: -2px 0 #ff0040;
    color: transparent;
    -webkit-text-fill-color: transparent;
    animation: heroGlitchSlice1 3.5s infinite linear;
    opacity: 0.75;
}

body.page-home .hero-brand.horror-glitch-title::after {
    left: -2px;
    text-shadow: 2px 0 #00d4ff;
    color: transparent;
    -webkit-text-fill-color: transparent;
    animation: heroGlitchSlice2 2.8s infinite linear reverse;
    opacity: 0.6;
}

body.page-home .hero-eyebrow {
    animation: horrorEyebrowPulse 3s ease-in-out infinite !important;
    text-shadow: 0 0 12px var(--horror-glow);
}

body.page-home .hero-tagline {
    animation: horrorTaglineDrift 8s ease-in-out infinite !important;
}

body.page-home .hero-features li {
    animation: horrorFeatureFloat 4s ease-in-out infinite;
}

body.page-home .hero-features li:nth-child(2) {
    animation-delay: 0.6s;
}

body.page-home .hero-features li:nth-child(3) {
    animation-delay: 1.2s;
}

/* Cadı videosu — belirgin, hafif nabız */
body.page-home .glitch {
    z-index: 1;
}

body.page-home .glitch video {
    opacity: 1 !important;
    object-position: center 18% !important;
    filter: brightness(1.08) contrast(1.12) saturate(1.2) !important;
    animation: horrorVideoPulse 14s ease-in-out infinite !important;
}

body.page-home .glitch::after {
    background: linear-gradient(180deg,
            rgba(0, 0, 0, 0) 0%,
            rgba(0, 0, 0, 0.1) 40%,
            rgba(10, 10, 10, 0.5) 100%) !important;
    animation: horrorScanOverlay 10s linear infinite !important;
}

/* Metin okunabilirliği — video parlakken */
body.page-home .main-title .hero-brand,
body.page-home .main-title h1 {
    text-shadow:
        0 0 40px rgba(0, 0, 0, 0.95),
        0 2px 4px rgba(0, 0, 0, 1),
        0 4px 24px rgba(0, 0, 0, 0.9) !important;
}

body.page-home .hero-eyebrow,
body.page-home .hero-tagline,
body.page-home .hero-seo {
    text-shadow: 0 1px 14px rgba(0, 0, 0, 0.95), 0 0 24px rgba(0, 0, 0, 0.8) !important;
}

body.page-home .hero-features li {
    background: rgba(0, 0, 0, 0.55) !important;
    border-color: rgba(255, 255, 255, 0.15) !important;
}

/* Masaüstü: metin altta, cadı üstte kalsın */
@media (min-width: 992px) {
    body.page-home .header-image .main-title {
        top: auto;
        bottom: 10%;
        transform: translate(-50%, 0);
    }

    body.page-home .glitch video {
        object-position: center 12% !important;
    }
}

/* Bölüm başlıkları */
body.page-home .section-title {
    animation: horrorSectionGlow 4s ease-in-out infinite !important;
}

body.page-home .section-title::after {
    animation: horrorUnderlineBleed 3s ease-in-out infinite !important;
}

body.page-home .reveal-horror {
    opacity: 0;
    transform: translateY(28px) scale(0.98);
    filter: blur(4px);
    transition: opacity 0.7s ease, transform 0.7s ease, filter 0.7s ease;
}

body.page-home .reveal-horror.is-visible {
    opacity: 1;
    transform: none;
    filter: none;
}

/* Rezervasyon CTA */
body.page-home .reservation-container button[type="submit"] {
    position: relative;
    overflow: hidden;
    animation: horrorBtnPulse 2.5s ease-in-out infinite !important;
}

body.page-home .reservation-container button[type="submit"]::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(105deg,
            transparent 40%,
            rgba(255, 255, 255, 0.12) 50%,
            transparent 60%);
    transform: translateX(-120%);
    animation: horrorBtnShine 4s ease-in-out infinite;
    pointer-events: none;
}

body.page-home .new-badge {
    animation: horrorBadgePulse 2s ease-in-out infinite !important;
}

/* Kartlar — hover korku parıltısı */
body.page-home .blog-preview-card,
body.page-home .accordion-item,
body.page-home #galleryCarousel {
    transition: box-shadow 0.35s ease, transform 0.35s ease, border-color 0.35s ease;
}

body.page-home .blog-preview-card:hover {
    box-shadow: 0 0 24px var(--horror-glow), 0 8px 32px rgba(0, 0, 0, 0.45);
    transform: translateY(-2px);
}

@keyframes horrorBadgePulse {
    0%, 100% { box-shadow: 0 0 0 transparent; }
    50% { box-shadow: 0 0 14px var(--horror-glow); }
}

/* Ekran sarsıntısı (JS ile kısa süreli class) */
body.page-home.horror-shake {
    animation: horrorBodyShake 0.45s ease-out !important;
}

/* Kan damlası — styles.css ile uyumlu */
body.page-home .blood-drop {
    z-index: 4;
}

/* ——— Keyframes ——— */
@keyframes horrorVignettePulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.82; }
}

@keyframes horrorScanDrift {
    0% { transform: translateY(0); }
    100% { transform: translateY(4px); }
}

@keyframes horrorNoise {
    0% { transform: translate(0, 0); }
    25% { transform: translate(-2%, 1%); }
    50% { transform: translate(1%, -1%); }
    75% { transform: translate(-1%, 2%); }
    100% { transform: translate(0, 0); }
}

@keyframes horrorFlashBurst {
    0% { opacity: 0; }
    15% { opacity: 0.85; }
    100% { opacity: 0; }
}

@keyframes horrorEmberRise {
    0% {
        opacity: 0;
        transform: translateY(0) scale(1);
    }
    8% { opacity: 0.9; }
    100% {
        opacity: 0;
        transform: translateY(-100vh) scale(0.2);
    }
}

@keyframes heroTitleFlicker {
    0%, 92%, 100% {
        text-shadow: 0 2px 24px rgba(0, 0, 0, 0.8), 0 0 20px rgba(196, 30, 58, 0.2);
    }
    93% {
        text-shadow: 2px 0 #ff0040, -2px 0 #00d4ff, 0 2px 24px rgba(0, 0, 0, 0.9);
    }
    95% {
        text-shadow: 0 2px 24px rgba(0, 0, 0, 0.8);
    }
}

@keyframes heroGlitchSlice1 {
    0%, 88%, 100% { clip-path: inset(40% 0 55% 0); transform: translate(0); }
    90% { clip-path: inset(10% 0 75% 0); transform: translate(-4px, 2px); }
    92% { clip-path: inset(55% 0 20% 0); transform: translate(3px, -1px); }
}

@keyframes heroGlitchSlice2 {
    0%, 85%, 100% { clip-path: inset(70% 0 5% 0); transform: translate(0); }
    87% { clip-path: inset(5% 0 60% 0); transform: translate(4px, 0); }
    89% { clip-path: inset(30% 0 40% 0); transform: translate(-3px, 2px); }
}

@keyframes horrorEyebrowPulse {
    0%, 100% { opacity: 1; letter-spacing: 0.2em; }
    48% { opacity: 0.75; letter-spacing: 0.22em; }
    50% { opacity: 1; color: #ff6b6b; }
}

@keyframes horrorTaglineDrift {
    0%, 100% { opacity: 1; transform: translateY(0); }
    50% { opacity: 0.88; transform: translateY(-2px); }
}

@keyframes horrorFeatureFloat {
    0%, 100% { transform: translateY(0); border-color: rgba(255, 255, 255, 0.1); }
    50% { transform: translateY(-3px); border-color: rgba(196, 30, 58, 0.35); }
}

@keyframes horrorVideoPulse {
    0%, 100% {
        filter: brightness(1.05) contrast(1.1) saturate(1.15);
    }
    50% {
        filter: brightness(1.12) contrast(1.14) saturate(1.25);
    }
}

@keyframes horrorScanOverlay {
    0%, 100% { opacity: 1; }
    50% {
        opacity: 0.88;
    }
}

@keyframes horrorSectionGlow {
    0%, 100% { text-shadow: none; }
    50% { text-shadow: 0 0 28px rgba(196, 30, 58, 0.25); }
}

@keyframes horrorUnderlineBleed {
    0%, 100% { width: 48px; box-shadow: none; }
    50% { width: 64px; box-shadow: 0 0 12px var(--horror-accent); }
}

@keyframes horrorBtnPulse {
    0%, 100% { box-shadow: 0 4px 20px rgba(196, 30, 58, 0.35); }
    50% { box-shadow: 0 4px 32px rgba(196, 30, 58, 0.65), 0 0 40px rgba(196, 30, 58, 0.2); }
}

@keyframes horrorBtnShine {
    0%, 70%, 100% { transform: translateX(-120%); }
    85% { transform: translateX(120%); }
}

@keyframes horrorBodyShake {
    0%, 100% { transform: translate(0, 0); }
    15% { transform: translate(-3px, 2px); }
    30% { transform: translate(4px, -2px); }
    45% { transform: translate(-2px, -3px); }
    60% { transform: translate(3px, 1px); }
}

/* ——— Sürpriz efektler ——— */

/* Boşta kalınca fısıltı */
.horror-whisper {
    position: fixed;
    bottom: 18%;
    left: 50%;
    transform: translateX(-50%) translateY(12px);
    z-index: 6;
    font-family: var(--font-display, 'Oswald', sans-serif);
    font-size: clamp(0.85rem, 2.5vw, 1.1rem);
    letter-spacing: 0.35em;
    text-transform: uppercase;
    color: rgba(196, 30, 58, 0.9);
    text-shadow: 0 0 20px rgba(196, 30, 58, 0.8);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.8s ease, transform 0.8s ease;
    white-space: nowrap;
}

.horror-whisper.is-visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
    animation: horrorWhisperFlicker 2.5s ease-in-out infinite;
}

body.page-home.horror-idle-active .horror-vignette {
    background:
        radial-gradient(ellipse 55% 45% at 50% 35%,
            transparent 0%,
            rgba(0, 0, 0, 0.35) 55%,
            rgba(80, 0, 0, 0.45) 100%),
        linear-gradient(180deg,
            rgba(0, 0, 0, 0.15) 0%,
            rgba(10, 10, 10, 0.55) 100%);
}

/* Scroll’da kenardan bakan gözler */
.horror-eyes {
    position: fixed;
    top: 38%;
    right: -120px;
    z-index: 6;
    display: flex;
    gap: 14px;
    padding: 12px 20px;
    background: rgba(0, 0, 0, 0.75);
    border-radius: 40px 0 0 40px;
    border: 1px solid rgba(196, 30, 58, 0.4);
    box-shadow: -8px 0 24px rgba(196, 30, 58, 0.25);
    transition: right 0.6s cubic-bezier(0.34, 1.4, 0.64, 1);
    pointer-events: none;
}

.horror-eyes.is-peeking {
    right: 0;
}

.horror-eye {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #f5f5f5;
    position: relative;
    box-shadow: inset 0 -4px 8px rgba(0, 0, 0, 0.2);
    animation: horrorEyeDart 3s ease-in-out infinite;
}

.horror-eye::after {
    content: '';
    position: absolute;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #1a0505;
    top: 50%;
    left: 45%;
    transform: translate(-50%, -50%);
    animation: horrorPupilMove 2s ease-in-out infinite;
}

.horror-eye:nth-child(2) {
    animation-delay: 0.15s;
}

.horror-eye:nth-child(2)::after {
    animation-delay: 0.3s;
}

/* Tek seferlik scroll korkusu */
.horror-jumpscare {
    position: fixed;
    inset: 0;
    z-index: 9990;
    background: #000;
    opacity: 0;
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

.horror-jumpscare.is-active {
    animation: horrorJumpscareFlash 0.55s ease-out forwards;
}

.horror-jumpscare-face {
    width: min(280px, 70vw);
    height: min(280px, 70vw);
    border-radius: 50%;
    background: radial-gradient(circle at 38% 38%, #2a0a0a 0%, #000 70%);
    position: relative;
    opacity: 0;
    transform: scale(0.6);
}

.horror-jumpscare.is-active .horror-jumpscare-face {
    animation: horrorFacePop 0.4s 0.08s ease-out forwards;
}

.horror-jumpscare-face::before,
.horror-jumpscare-face::after {
    content: '';
    position: absolute;
    top: 38%;
    width: 22%;
    height: 14%;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.5);
}

.horror-jumpscare-face::before {
    left: 22%;
}

.horror-jumpscare-face::after {
    right: 22%;
}

/* Kanlı imleç (masaüstü) */
body.page-home {
    --horror-cursor-x: -100px;
    --horror-cursor-y: -100px;
}

.horror-cursor-drip {
    position: fixed;
    left: var(--horror-cursor-x);
    top: var(--horror-cursor-y);
    width: 10px;
    height: 10px;
    margin: -5px 0 0 -5px;
    border-radius: 50%;
    background: #8b0000;
    box-shadow: 0 0 8px rgba(196, 30, 58, 0.8);
    z-index: 9998;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.25s ease;
}

body.page-home.horror-cursor-on .horror-cursor-drip {
    opacity: 0.85;
    animation: horrorCursorPulse 1.2s ease-in-out infinite;
}

/* Hero parallax */
body.page-home .glitch video {
    transition: transform 0.15s ease-out;
    will-change: transform;
}

/* Menü glitch */
body.page-home .navbar-nav .nav-link.horror-nav-glitch {
    animation: horrorNavGlitch 0.35s steps(2) !important;
    color: var(--horror-accent) !important;
}

/* Form — ele geçirme */
body.page-home #reservationForm .form-control.horror-input-glitch {
    animation: horrorInputGlitch 0.4s steps(3);
    border-color: var(--horror-accent) !important;
    box-shadow: 0 0 16px var(--horror-glow) !important;
}

/* Konami kutlaması */
.horror-konami-toast {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%) translateY(120%);
    z-index: 10000;
    padding: 1rem 1.5rem;
    background: rgba(10, 10, 10, 0.95);
    border: 1px solid var(--horror-accent);
    border-radius: 12px;
    font-family: var(--font-display, 'Oswald', sans-serif);
    font-size: 0.95rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--color-text, #f5f5f5);
    box-shadow: 0 0 30px var(--horror-glow);
    transition: transform 0.5s cubic-bezier(0.34, 1.4, 0.64, 1);
    pointer-events: none;
}

.horror-konami-toast.is-visible {
    transform: translateX(-50%) translateY(0);
}

/* Galeri slide */
body.page-home #galleryCarousel.horror-gallery-glitch .carousel-item.active img {
    animation: horrorGalleryInvert 0.5s ease;
}

@keyframes horrorWhisperFlicker {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.65; }
}

@keyframes horrorEyeDart {
    0%, 100% { transform: scaleY(1); }
    48% { transform: scaleY(0.08); }
    52% { transform: scaleY(1); }
}

@keyframes horrorPupilMove {
    0%, 100% { left: 45%; }
    40% { left: 60%; }
    60% { left: 30%; }
}

@keyframes horrorJumpscareFlash {
    0% { opacity: 0; }
    12% { opacity: 1; }
    100% { opacity: 0; }
}

@keyframes horrorFacePop {
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes horrorCursorPulse {
    50% { transform: scale(1.35); }
}

@keyframes horrorNavGlitch {
    0% { transform: translate(0); filter: none; }
    50% { transform: translate(-2px, 1px); filter: hue-rotate(90deg); }
    100% { transform: translate(2px, -1px); filter: none; }
}

@keyframes horrorInputGlitch {
    0% { transform: translateX(0); }
    33% { transform: translateX(-3px); }
    66% { transform: translateX(3px); }
    100% { transform: translateX(0); }
}

@keyframes horrorGalleryInvert {
    0% { filter: invert(0.15) contrast(1.4) hue-rotate(-20deg); }
    100% { filter: none; }
}

/* Mobil — daha hafif */
@media (max-width: 991.98px) {
    .horror-cursor-drip {
        display: none;
    }

    .horror-whisper {
        bottom: 22%;
        font-size: 0.8rem;
        letter-spacing: 0.2em;
        white-space: normal;
        text-align: center;
        max-width: 90%;
    }
    .horror-scanlines,
    .horror-noise {
        opacity: 0.06;
    }

    body.page-home .hero-brand.horror-glitch-title::before,
    body.page-home .hero-brand.horror-glitch-title::after {
        display: none;
    }

    body.page-home .hero-brand.horror-glitch-title {
        animation: heroTitleFlicker 8s ease-in-out infinite !important;
    }

    .horror-ember {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    body.page-home *,
    body.page-home *::before,
    body.page-home *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .horror-fx {
        display: none;
    }

    body.page-home .reveal-horror {
        opacity: 1;
        transform: none;
        filter: none;
    }
}
