/**
 * Hero – Sinematik, premium streaming platform
 * Tam ekran, sis + tema mavisi ışıklar, parallax derinlik, cam CTA.
 * Tema rengi: --brand / --brand-rgb (mavi).
 */

/* Hero arka planı navbar alanına kadar uzansın; navbar tam şeffaf, arkada site (hero) görünsün */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    overflow: hidden;
    margin-left: 0;
    margin-top: -60px;
    padding-top: 60px;
    box-sizing: border-box;
    background: #050510;
}

/* Film/dizi arka plan slider – Netflix/Disney tarzı; hero-bg’nin altında, görseller bunun üzerinde */
.hero-bg-cards {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
    padding: 20px;
    box-sizing: border-box;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    grid-auto-rows: 240px;
    gap: 14px;
    align-content: start;
    justify-content: start;
    justify-items: center;
}
.hero-bg-card {
    width: 100%;
    max-width: 160px;
    max-height: 240px;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0,0,0,0.4);
    aspect-ratio: 2/3;
    display: block;
}
.hero-bg-card-poster {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
@media (max-width: 768px) {
    .hero-bg-cards {
        grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
        grid-auto-rows: 132px;
        gap: 8px;
        padding: 12px;
    }
    .hero-bg-card {
        max-width: 88px;
        max-height: 132px;
        border-radius: 6px;
    }
}
.hero-slider--hidden {
    display: none !important;
}
.hero-slider {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

.hero-slide {
    position: absolute;
    inset: -2%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0;
    transition: opacity 1.2s ease-in-out;
    animation: hero-ken-burns 24s ease-in-out infinite;
}

.hero-slide.active {
    opacity: 1;
    z-index: 1;
    transition: opacity 1.2s ease-in-out;
}

.hero-slide::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0,0,0,0.35) 0%, rgba(0,0,0,0.1) 25%, transparent 50%, rgba(0,0,0,0.5) 100%);
    pointer-events: none;
}

@keyframes hero-ken-burns {
    0%, 100% { transform: scale(1.05) translate(0, 0); }
    25% { transform: scale(1.08) translate(-1%, -0.5%); }
    50% { transform: scale(1.06) translate(0.5%, 0.5%); }
    75% { transform: scale(1.07) translate(-0.5%, 0); }
}

/* Arka plan katmanları – koyu overlay (görsellerin üzerinde), alt kısım içerik rengine yumuşak geçiş */
.hero-bg {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background: linear-gradient(
        180deg,
        rgba(5, 5, 16, 0.92) 0%,
        rgba(10, 10, 24, 0.88) 35%,
        rgba(8, 8, 18, 0.9) 60%,
        rgba(6, 6, 8, 0.95) 80%,
        var(--bg-100) 100%
    );
}


/* Film grain / noise – sinema perdesi hissi, gradient’ı bozmaz */
/* Sinematik overlay – vignette + merkez ışığı; film/dizi arka planıyla uyumlu, hareket yok */
.hero-overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
    background:
        radial-gradient(ellipse 85% 70% at 50% 45%, transparent 0%, transparent 45%, rgba(0, 0, 0, 0.15) 100%),
        radial-gradient(ellipse 100% 100% at 50% 50%, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.08) 60%, rgba(0, 0, 0, 0.4) 100%);
}

/* Hafif film grain – sinema perdesi hissi; performans için opacity düşük */
.hero-overlay::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    opacity: 0.035;
    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");
    background-repeat: repeat;
}

/* Hero alt geçiş: dikey yumuşak fade + hafif kararma; keskin çizgi yok, içerikle tek parça */
.hero::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 55%;
    z-index: 2;
    pointer-events: none;
    background: linear-gradient(
        180deg,
        transparent 0%,
        transparent 28%,
        rgba(0, 0, 0, 0.06) 50%,
        rgba(0, 0, 0, 0.18) 75%,
        var(--bg-100) 100%
    );
}

/* İçerik – navbar-inner ile aynı viewport hizası: sol/sağ boşluk eşit + giriş animasyonu */
.hero-content {
    position: relative;
    z-index: 3;
    pointer-events: auto;
    width: 100%;
    max-width: 1200px;
    margin-left: max(24px, calc((100vw - 1200px) / 2));
    margin-right: max(24px, calc((100vw - 1200px) / 2));
    padding: 80px 24px 100px;
    box-sizing: border-box;
    text-align: center;
}

@keyframes hero-reveal {
    from {
        opacity: 0;
        transform: translateY(24px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-eyebrow {
    display: inline-block;
    margin: 0 0 20px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.55);
    font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    animation: hero-reveal 0.9s ease-out 0.05s both;
}

/* Başlık sarmalayıcı – parallax derinlik + arka plan ışık + giriş animasyonu */
.hero-heading-wrap {
    position: relative;
    display: inline-block;
    margin-bottom: 28px;
    perspective: 800px;
    animation: hero-reveal 0.9s ease-out both;
}

/* Headline arkasında hafif hareketli ışık – tema mavisi */
.hero-heading-glow {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 140%;
    height: 200%;
    background: radial-gradient(
        ellipse 50% 40% at 50% 50%,
        rgba(var(--brand-rgb), 0.22) 0%,
        rgba(var(--brand-rgb), 0.1) 35%,
        rgba(var(--brand-rgb), 0.06) 55%,
        transparent 70%
    );
    filter: blur(40px);
    animation: lightWaves 12s ease-in-out infinite;
    pointer-events: none;
}

@keyframes lightWaves {
    0%, 100% { opacity: 0.8; transform: translate(-50%, -50%) scale(1); }
    33% { opacity: 1; transform: translate(-48%, -52%) scale(1.05); }
    66% { opacity: 0.7; transform: translate(-52%, -48%) scale(0.98); }
}

/* Hero başlık – profesyonel, premium, sinematik; net okunaklılık */
.hero-heading {
    position: relative;
    z-index: 1;
    font-size: clamp(40px, 6.5vw, 72px);
    line-height: 1.1;
    margin: 0;
    letter-spacing: -0.03em;
    font-family: "Plus Jakarta Sans", Inter, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    font-weight: 800;
    color: #ffffff;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    text-shadow:
        0 1px 2px rgba(0, 0, 0, 0.9),
        0 2px 8px rgba(0, 0, 0, 0.7),
        0 4px 16px rgba(0, 0, 0, 0.5),
        0 8px 32px rgba(0, 0, 0, 0.35),
        0 0 60px rgba(0, 0, 0, 0.2);
    transform: translateZ(20px);
    max-width: 14em;
    margin-left: auto;
    margin-right: auto;
}

.hero-heading::after {
    display: none;
}

/* Hero alt metin – daha okunaklı, hiyerarşi net */
.hero-desc {
    margin: 0 auto 40px;
    max-width: 520px;
    font-size: 17px;
    line-height: 1.65;
    letter-spacing: 0.01em;
    color: rgba(255, 255, 255, 0.85);
    font-weight: 500;
    font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5), 0 2px 12px rgba(0, 0, 0, 0.3);
    animation: hero-reveal 0.9s ease-out 0.15s both;
}

/* CTA – cam (glassmorphism), blur, yumuşak glow */
/* Giriş yapılmışsa hero CTA'yı ilk çizimde gizle (FOUC önleme – head’te nav-logged-in eklenir) */
html.nav-logged-in .hero-actions {
    display: none !important;
}
.hero-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    animation: hero-reveal 0.9s ease-out 0.3s both;
    pointer-events: auto;
}

.hero-cta {
    padding: 0.875rem 1.75rem;
    font-size: 1rem;
    font-family: var(--font-sans, Inter), system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    font-weight: 600;
    letter-spacing: 0.02em;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    color: #fff;
    background: linear-gradient(135deg, rgba(var(--brand-rgb), 0.9), rgba(var(--brand-rgb), 0.75));
    box-shadow:
        0 1px 2px rgba(0, 0, 0, 0.06),
        0 4px 12px rgba(var(--brand-rgb), 0.25);
    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
    -webkit-appearance: none;
    appearance: none;
    text-decoration: none;
    pointer-events: auto;
}
.hero-cta:hover {
    transform: translateY(-1px);
    box-shadow:
        0 4px 12px rgba(0, 0, 0, 0.08),
        0 8px 24px rgba(var(--brand-rgb), 0.3);
    filter: brightness(1.05);
}
.hero-cta:active {
    transform: translateY(0);
}

.hero-login-prompt {
    margin: 0;
    font-size: 0.9375rem;
    color: rgba(255, 255, 255, 0.72);
    font-family: var(--font-sans, Inter), system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    font-weight: 400;
}
.hero-login-link {
    background: none;
    border: none;
    padding: 0;
    margin-left: 0.25em;
    font: inherit;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.95);
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-color: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    transition: color 0.2s ease, text-decoration-color 0.2s ease;
    pointer-events: auto;
}
.hero-login-link:hover {
    color: #fff;
    text-decoration-color: rgba(255, 255, 255, 0.9);
}

/* Hero slider boşken alan kaplamasın; JS slide ekleyince görünür */
.hero-slider:empty {
    display: none;
}

/* Scroll göstergesi – aşağı kaydır; her zaman görünür, profesyonel cam buton */
.hero-scroll-hint {
    position: absolute;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    padding: 0;
    margin: 0;
    color: rgba(255, 255, 255, 0.95);
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.04) inset,
        0 4px 20px rgba(0, 0, 0, 0.25),
        0 8px 32px rgba(0, 0, 0, 0.15);
    transition: color 0.25s ease, border-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
    cursor: pointer;
    font: inherit;
    -webkit-appearance: none;
    appearance: none;
}
.hero-scroll-hint:hover {
    color: #fff;
    border-color: rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.1);
    transform: translateX(-50%) translateY(3px);
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.08) inset,
        0 6px 24px rgba(0, 0, 0, 0.3),
        0 12px 40px rgba(0, 0, 0, 0.2);
}
.hero-scroll-hint:active {
    transform: translateX(-50%) translateY(5px);
}
.hero-scroll-hint-icon {
    display: block;
    font-size: 20px;
    line-height: 1;
    animation: hero-scroll-bounce 2.2s ease-in-out infinite;
}
.hero-scroll-hint-icon i {
    display: block;
}
@keyframes hero-scroll-bounce {
    0%, 100% { transform: translateY(0); opacity: 1; }
    50% { transform: translateY(5px); opacity: 0.85; }
}

/* Responsive */
@media (max-width: 768px) {
    .hero {
        min-height: 100vh;
    }
    .hero-content {
        margin-left: 0;
        margin-right: 0;
        padding: 60px 16px 80px;
    }
    .hero-heading {
        font-size: clamp(32px, 8vw, 48px);
    }
    .hero-desc {
        font-size: 16px;
        margin-bottom: 32px;
        max-width: 90%;
    }
    .hero-actions {
        gap: 0.875rem;
        margin-bottom: 80px;
    }
    .hero-heading-glow {
        filter: blur(30px);
    }
    .hero-scroll-hint {
        bottom: 20px;
        width: 44px;
        height: 44px;
    }
    .hero-scroll-hint-icon {
        font-size: 18px;
    }
}

@media (max-width: 480px) {
    .hero-content {
        margin-left: 0;
        margin-right: 0;
        padding: 48px 16px 64px;
    }
    .hero-actions {
        margin-bottom: 72px;
    }
    .hero-scroll-hint {
        bottom: 16px;
    }
    .hero-eyebrow {
        letter-spacing: 0.22em;
    }
}

/* Açık tema – hero alt kısmı içerik rengine yumuşak geçiş; slider görselleri yarı saydam overlay ile yumuşar */
body:not(.dark) .hero-bg {
    background: linear-gradient(180deg, rgba(240, 242, 248, 0.88) 0%, rgba(232, 236, 244, 0.9) 40%, rgba(226, 230, 240, 0.92) 65%, rgba(232, 234, 240, 0.95) 85%, var(--bg-100) 100%);
}

body:not(.dark) .hero-eyebrow {
    color: rgba(0, 0, 0, 0.55);
}

body:not(.dark) .hero-heading {
    color: #0f172a;
    text-shadow:
        0 0 60px rgba(100, 140, 255, 0.1),
        0 1px 2px rgba(255, 255, 255, 0.8),
        0 2px 8px rgba(0, 0, 0, 0.08),
        0 4px 16px rgba(0, 0, 0, 0.04);
}

body:not(.dark) .hero-heading-glow {
    background: radial-gradient(
        ellipse 50% 40% at 50% 50%,
        rgba(var(--brand-rgb), 0.18) 0%,
        rgba(var(--brand-rgb), 0.08) 35%,
        transparent 70%
    );
}

/* Açık tema: hero overlay hafif */
body:not(.dark) .hero-overlay {
    background:
        radial-gradient(ellipse 85% 70% at 50% 45%, transparent 0%, transparent 50%, rgba(0, 0, 0, 0.08) 100%),
        radial-gradient(ellipse 100% 100% at 50% 50%, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.05) 60%, rgba(0, 0, 0, 0.25) 100%);
}

/* Açık tema: hero–içerik geçişi daha yumuşak (hafif gölge) */
body:not(.dark) .hero::after {
    background: linear-gradient(
        180deg,
        transparent 0%,
        transparent 35%,
        rgba(0, 0, 0, 0.02) 55%,
        rgba(0, 0, 0, 0.08) 80%,
        var(--bg-100) 100%
    );
}

body:not(.dark) .hero-desc {
    color: #475569;
}

body:not(.dark) .hero-login-prompt {
    color: #64748b;
}

body:not(.dark) .hero-cta {
    color: #fff;
    background: linear-gradient(135deg, rgba(var(--brand-rgb), 0.9), rgba(var(--brand-rgb), 0.75));
    box-shadow:
        0 1px 2px rgba(0, 0, 0, 0.06),
        0 4px 12px rgba(var(--brand-rgb), 0.25);
}

body:not(.dark) .hero-cta:hover {
    filter: brightness(1.08);
    box-shadow:
        0 4px 12px rgba(0, 0, 0, 0.08),
        0 8px 24px rgba(var(--brand-rgb), 0.35);
}

body:not(.dark) .hero-login-link {
    color: #475569;
    text-decoration-color: rgba(0, 0, 0, 0.2);
}

body:not(.dark) .hero-login-link:hover {
    color: #0f172a;
    text-decoration-color: rgba(var(--brand-rgb), 0.6);
}

body:not(.dark) .hero-scroll-hint {
    color: rgba(0, 0, 0, 0.7);
    border-color: rgba(0, 0, 0, 0.12);
    background: rgba(255, 255, 255, 0.5);
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.6) inset,
        0 4px 20px rgba(0, 0, 0, 0.08),
        0 8px 32px rgba(0, 0, 0, 0.06);
}
body:not(.dark) .hero-scroll-hint:hover {
    color: #0f172a;
    border-color: rgba(0, 0, 0, 0.2);
    background: rgba(255, 255, 255, 0.75);
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.9) inset,
        0 6px 24px rgba(0, 0, 0, 0.1),
        0 12px 40px rgba(0, 0, 0, 0.08);
}
