/* RM4 ana sayfa filmi (2026-11-18). Kaynak: includes/home_v4.php · oynatıcı: js/home-v4.js
   Film tuvalde oynar; kare yalnızca değişince çizilir. Hareket eden her şey transform ve opacity ile (120 Hz telefonlar).
   Yazı boyları ekranın hem genişliğine hem yüksekliğine göre sınırlanır: geniş ve kısa ekranlarda menüye taşmaz. */

body.v2 { --r4-red: #E11D2E; --r4-ink: #151313; --r4-ease: cubic-bezier(.2, .7, .2, 1); --r4-nav: var(--nav-h, 72px); }
body.v2 .navbar.hidden { transform: none; }
body.v2 .navbar.scrolled { -webkit-backdrop-filter: none; backdrop-filter: none; background: rgba(13, 12, 12, .9); }
body.v2[data-page="index"] .site-main { animation: none; }

.v4-film { position: relative; height: 100svh; min-height: 520px; background: #0E0D0C; color: #fff; }
.v4-film.is-live { height: 640svh; min-height: 0; }
.v4-stick { position: sticky; top: 0; height: 100svh; min-height: 520px; overflow: hidden; contain: strict; }
.v4-film.is-live .v4-stick { min-height: 0; }
.v4-poster, .v4-poster img, .v4-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.v4-poster img { object-fit: cover; }
.v4-canvas { opacity: 0; }
.v4-film.is-ready .v4-canvas { opacity: 1; }
.v4-film.is-ready .v4-poster { visibility: hidden; }

/* Okunurluk gölgeleri: telefonda alttan, bilgisayarda soldan. Koyu sahnelerde koyu, aydınlık sahnelerde açık. */
.v4-shade { position: absolute; left: 0; right: 0; bottom: 0; height: 62%; pointer-events: none; }
.v4-shade-dark { background: linear-gradient(to top, rgba(12, 11, 10, .9) 0%, rgba(12, 11, 10, .72) 38%, rgba(12, 11, 10, 0) 100%); }
.v4-shade-light { background: linear-gradient(to top, rgba(242, 236, 228, .94) 0%, rgba(242, 236, 228, .76) 38%, rgba(242, 236, 228, 0) 100%); opacity: 0; }
.v4-stick::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 140px; z-index: 2; pointer-events: none; background: linear-gradient(to bottom, rgba(10, 9, 9, .6), rgba(10, 9, 9, 0)); }

.v4-copy { position: absolute; z-index: 3; left: 0; right: 0; bottom: calc(76px + env(safe-area-inset-bottom)); padding: 0 22px; }
.v4-txt { position: absolute; left: 22px; right: 22px; bottom: 0; opacity: 0; visibility: hidden; }
.v4-txt.is-on { opacity: 1; visibility: visible; }
.v4-film.is-live .v4-txt, .v4-film.is-live .v4-shade { will-change: opacity, transform; }
.v4-kick { display: flex; align-items: center; gap: 10px; margin: 0 0 10px; font: 600 .7rem/1.2 var(--font-body); letter-spacing: .16em; text-transform: uppercase; color: rgba(255, 255, 255, .8); }
.v4-kick::before { content: ""; width: 22px; height: 2px; background: var(--r4-red); flex: none; }
body.v2 .v4-title { margin: 0; font: 800 clamp(1.8rem, min(8vw, 5.4svh), 2.7rem)/1.04 var(--font-head); letter-spacing: -.035em; color: #fff; text-wrap: balance; }
.v4-sub { margin: 10px 0 0; max-width: 32em; font-size: .95rem; line-height: 1.5; color: rgba(255, 255, 255, .8); text-wrap: pretty; }
.v4-acts { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 22px; margin-top: 16px; }
.v4-btn { display: inline-flex; align-items: center; justify-content: center; gap: .6em; min-height: 50px; padding: 0 24px; border-radius: 12px; background: var(--r4-red); color: #fff; font: 700 1rem/1 var(--font-body); text-decoration: none; transition: background .2s, transform .2s var(--r4-ease); }
.v4-btn:hover { background: #F0222F; transform: translateY(-1px); }
.v4-btn span, .v4-go span { transition: transform .2s var(--r4-ease); }
.v4-btn:hover span, .v4-go:hover span { transform: translateX(3px); }
.v4-go { display: inline-flex; align-items: center; gap: .5em; min-height: 44px; color: #fff; font: 700 1rem/1 var(--font-body); text-decoration: none; border-bottom: 2px solid var(--r4-red); }
.v4-btn:focus-visible, .v4-go:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
.v4-light .v4-kick, .v4-light .v4-sub { color: rgba(21, 19, 19, .74); }
body.v2 .v4-light .v4-title, .v4-light .v4-go { color: var(--r4-ink); }
.v4-light .v4-btn:focus-visible, .v4-light .v4-go:focus-visible { outline-color: var(--r4-ink); }

.v4-prog { position: absolute; z-index: 4; left: 22px; right: 22px; bottom: calc(64px + env(safe-area-inset-bottom)); height: 2px; pointer-events: none; }
.v4-prog-bar { position: absolute; inset: 0; background: rgba(255, 255, 255, .18); overflow: hidden; }
.v4-prog-bar u { position: absolute; inset: 0; background: var(--r4-red); transform: scaleX(0); transform-origin: 0 50%; }
.v4-film.is-light .v4-prog-bar { background: rgba(21, 19, 19, .14); }
.v4-load { position: absolute; left: 0; top: 0; height: 100%; width: 100%; transform-origin: 0 50%; transform: scaleX(0); background: rgba(255, 255, 255, .22); }
.v4-hint { display: none; }

/* Kısa yollar */
.v3-ways { background: var(--v2-paper, #F7F5F2); padding: clamp(18px, 3vw, 34px) 0; border-bottom: 1px solid var(--v2-rule, rgba(25, 29, 32, .13)); }
.v3-ways .container { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.v3-way { position: relative; display: flex; flex-direction: column; gap: 6px; min-height: 104px; padding: 16px 16px 14px; border-radius: 14px; background: var(--v2-card, #fff); border: 1px solid var(--v2-rule, rgba(25, 29, 32, .13)); color: var(--v2-ink, #191D20); text-decoration: none; transition: border-color .2s, transform .25s var(--r4-ease); }
.v3-way small { font: 600 .68rem/1 var(--font-body); letter-spacing: .12em; color: var(--r4-red); }
.v3-way b { font: 800 1.05rem/1.15 var(--font-head); letter-spacing: -.01em; }
.v3-way span { font-size: .8rem; line-height: 1.35; color: var(--v2-ink-2, #4A4D52); }
.v3-way i { position: absolute; right: 14px; top: 13px; font-style: normal; color: var(--v2-ink-3, #5E6166); transition: transform .2s var(--r4-ease), color .2s; }
.v3-way:focus-visible { outline: 3px solid var(--r4-red); outline-offset: 3px; }
@media (hover: hover) { .v3-way:hover { border-color: var(--r4-red); transform: translateY(-2px); } .v3-way:hover i { transform: translateX(3px); color: var(--r4-red); } }

@media (min-width: 900px) {
    .v4-film.is-live { height: 720svh; }
    .v4-shade { top: 0; right: auto; width: 62%; height: auto; }
    .v4-shade-dark { background: linear-gradient(90deg, rgba(12, 11, 10, .72) 0%, rgba(12, 11, 10, .46) 32%, rgba(12, 11, 10, .12) 66%, rgba(12, 11, 10, 0) 100%); }
    .v4-shade-light { background: linear-gradient(90deg, rgba(242, 236, 228, .93) 0%, rgba(242, 236, 228, .74) 34%, rgba(242, 236, 228, .22) 70%, rgba(242, 236, 228, 0) 100%); }
    .v4-copy { top: calc(var(--r4-nav) + 24px); bottom: 88px; left: clamp(28px, 5vw, 110px); right: auto; width: min(380px, 25vw); padding: 0; }
    .v4-txt { left: 0; right: 0; top: 50%; bottom: auto; transform: translateY(-50%); }
    .v4-kick { font-size: .74rem; margin-bottom: 16px; }
    body.v2 .v4-title { font-size: clamp(2rem, min(3.7vw, 7.4svh), 3.3rem); line-height: 1.02; }
    .v4-sub { margin-top: clamp(10px, 2.2svh, 18px); font-size: clamp(.95rem, min(1.15vw, 2.2svh), 1.15rem); }
    .v4-acts { margin-top: clamp(14px, 3.4svh, 30px); }
    .v4-prog { left: clamp(28px, 5vw, 110px); right: auto; width: 220px; bottom: 36px; }
    .v4-hint { display: inline-flex; align-items: center; gap: 8px; position: absolute; z-index: 4; left: 50%; transform: translateX(-50%); bottom: 28px; color: rgba(255, 255, 255, .72); font: 600 .76rem/1 var(--font-body); letter-spacing: .12em; text-transform: uppercase; text-decoration: none; }
    .v4-hint span { display: inline-block; animation: v4nudge 1.8s var(--r4-ease) infinite; }
    .v3-ways { padding: 28px 0; }
    .v3-ways .container { grid-template-columns: repeat(4, 1fr); gap: 14px; }
    .v3-way { min-height: 128px; padding: 20px 20px 18px; }
    .v3-way b { font-size: 1.2rem; }
    .v3-way span { font-size: .86rem; }
}
/* Çok kısa ekranlar (yatay telefon, küçük dizüstü): alt satır ve üst satır gizlenir, başlık küçülür */
@media (min-width: 900px) and (max-height: 620px) { .v4-sub { display: none; } .v4-kick { margin-bottom: 8px; } }
@media (max-width: 899px) and (max-height: 640px) { .v4-sub { display: none; } body.v2 .v4-title { font-size: clamp(1.5rem, 6.6vw, 2rem); } }
@keyframes v4nudge { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(4px); } }
@media (prefers-reduced-motion: reduce) { .v4-hint span { animation: none; } }
