/* ============================================================
   HERO SCROLLYTELLING — stil dosyasi
   Yapi: #hero-scroll (uzun konteyner, yuksekligi JS hesaplar)
         icinde .hs-sahne (sticky, 100vh) -> video + yazi katmanlari
   JS aktif etmezse bolum gizli kalir, klasik hero gorunur.
   ============================================================ */

#hero-scroll {
    display: none;
    position: relative;
}

#hero-scroll.hs-aktif {
    display: block;
}

.hs-sahne {
    position: sticky;
    top: 0;
    height: 100vh;
    overflow: hidden;
}

#heroScrollVideo {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Yazi okunurlugu icin hafif karartma (videonun ustune) */
.hs-karartma {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom,
            rgba(5, 8, 20, 0.35) 0%,
            rgba(5, 8, 20, 0.05) 35%,
            rgba(5, 8, 20, 0.05) 65%,
            rgba(5, 8, 20, 0.45) 100%);
    pointer-events: none;
}

/* ---- DURAK yazilari (video donar, bunlar girer) ----
   SOLA yasli: gorseller sagda yasayacak (kullanici karari, 12 Haz).
   Kolon olculeri .hs-final ile ayni -> tum yazilar ayni hizada akar. */
.hs-durak {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    text-align: left;
    padding: 120px 20px 50px 20px;
    max-width: 1400px;
    margin: 0 auto;
    opacity: 0;
    visibility: hidden;
    transform: translateY(24px);
    pointer-events: none;
}

.hs-durak h2 {
    font-size: 3.2rem;
    line-height: 1.15;
    margin-bottom: 18px;
    max-width: 620px;
    text-shadow: 0 2px 30px rgba(0, 0, 0, 0.8), 0 0 30px rgba(0, 242, 255, 0.15);
}

.hs-durak h2 span {
    color: var(--primary);
}

.hs-durak p {
    font-size: 1.25rem;
    color: #ddd;
    max-width: 520px;
    line-height: 1.6;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.8);
}

/* ---- TEKNIK DURAK (durak 2): katmanlara isaret eden etiketler ----
   Etiketler .hs-durak icinde absolute konumlanir; motor sirayla belirtir. */
.hs-durak-teknik {
    justify-content: flex-start;
    padding-top: 16vh;
}

.hs-callout {
    position: absolute;
    left: 20px;
    display: flex;
    align-items: center;
    gap: 14px;
    opacity: 0;
    visibility: hidden;
}

.hs-callout-metin {
    text-align: left;
}

.hs-callout-metin strong {
    display: block;
    font-size: 1.5rem;
    letter-spacing: 0.02em;
    text-shadow: 0 2px 16px rgba(0, 0, 0, 0.9);
}

.hs-callout-metin small {
    display: block;
    color: #c7d0dd;
    font-size: 1.1rem;
    margin-top: 4px;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.9);
}

.hs-cizgi {
    display: block;
    height: 1px;
    background: linear-gradient(90deg, rgba(0, 242, 255, 0.85), rgba(255, 255, 255, 0.05));
    box-shadow: 0 0 8px rgba(0, 242, 255, 0.35);
}

/* ---- CAM DURAGI (durak 3): video blurlanir, yazi ORTADA buyuk durur ---- */
.hs-durak-cam {
    align-items: center;
    justify-content: center;
    text-align: center;
    padding-top: 0;
}

.hs-durak-cam h2 {
    max-width: 900px;
    font-size: 3.6rem;
}

.hs-durak-cam .hs-cam-ikinci {
    margin-top: 40px;
}

.hs-durak-cam p {
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

/* ---- FINAL katmani: mevcut hero yazisi JS ile buraya tasinir.
       Video son karesinde cerceve SAGDA durur -> yazi SOLDA. ---- */
.hs-final {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 120px 20px 50px 20px;
    max-width: 1400px;
    margin: 0 auto;
    opacity: 0;
    visibility: hidden;
}

.hs-final .hero-content {
    flex: 0 1 50%;
    max-width: 650px;
}

.hs-final .hero-content button {
    pointer-events: auto;
}

/* Tasinan yazi .hero kapsamindan ciktigi icin main.css'teki
   .hero h1/.hero p tipografisi burada yeniden uygulanir */
.hs-final .hero-content h1 {
    font-size: 4.5rem;
    line-height: 1.1;
    margin-bottom: 20px;
    text-shadow: 0 0 30px rgba(0, 242, 255, 0.1), 0 2px 30px rgba(0, 0, 0, 0.8);
}

.hs-final .hero-content h1 span {
    color: var(--primary);
}

.hs-final .hero-content p {
    font-size: 1.2rem;
    color: #ddd;
    max-width: 600px;
    margin-bottom: 40px;
    line-height: 1.6;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.8);
}

/* ============================================================
   YUKARI KAYDIR IPUCU — tek parmak yukari suzulur, arkasinda iz birakir.
   Sadece mobilde gorunur (asagidaki @media'da display:block). Kullanici
   kaydirinca JS .gizli ekler -> yumusakca kaybolur.
   ============================================================ */
.hs-scroll-ipucu {
    display: none;
    position: absolute;
    left: 50%;
    bottom: 26px;
    transform: translateX(-50%);
    width: 72px;
    height: 116px;
    z-index: 6;
    pointer-events: none;
    opacity: 1;
    transition: opacity 0.5s ease;
}

.hs-scroll-ipucu.gizli {
    opacity: 0;
}

/* parmagin arkasinda yukari uzayan iz */
.hs-ipucu-iz {
    position: absolute;
    left: 50%;
    bottom: 38px;
    width: 3px;
    height: 44px;
    background: linear-gradient(to top, rgba(0, 242, 255, 0), rgba(0, 242, 255, 0.85));
    border-radius: 3px;
    transform-origin: bottom center;
    animation: hsIzAkis 1.9s ease-in-out infinite;
}

.hs-scroll-ipucu i {
    position: absolute;
    left: 50%;
    bottom: 30px;
    color: #fff;
    font-size: 2.6rem;
    filter: drop-shadow(0 2px 7px rgba(0, 0, 0, 0.65));
    animation: hsParmakKaydir 1.9s ease-in-out infinite;
}

/* "Kaydır" yazisi — sabit, parmagin altinda */
.hs-ipucu-yazi {
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    color: #fff;
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    white-space: nowrap;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.7);
}

@keyframes hsParmakKaydir {
    0%   { transform: translateX(-50%) translateY(0); opacity: 0; }
    15%  { opacity: 1; }
    65%  { transform: translateX(-50%) translateY(-44px); opacity: 1; }
    85%  { transform: translateX(-50%) translateY(-44px); opacity: 0; }
    100% { transform: translateX(-50%) translateY(-44px); opacity: 0; }
}

@keyframes hsIzAkis {
    0%   { transform: translateX(-50%) scaleY(0); opacity: 0; }
    15%  { transform: translateX(-50%) scaleY(0); opacity: 0.85; }
    65%  { transform: translateX(-50%) scaleY(1); opacity: 0.85; }
    85%  { transform: translateX(-50%) scaleY(1); opacity: 0; }
    100% { transform: translateX(-50%) scaleY(1); opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
    .hs-scroll-ipucu i,
    .hs-ipucu-iz {
        animation: none;
    }
}

/* ============================================================
   DEVAM IPUCU — start-stop modelinde her durakta "devami var" sinyali.
   JS (.gorunur) ile acilir/kapanir; oynarken ve final'de gizli.
   ============================================================ */
.hs-devam {
    position: absolute;
    left: 50%;
    bottom: 28px;
    transform: translateX(-50%) translateY(8px);
    z-index: 7;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    text-align: center;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.hs-devam.gorunur {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.hs-devam-yazi {
    color: #fff;
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    padding: 7px 16px;
    border-radius: 999px;
    background: rgba(5, 8, 20, 0.55);
    border: 1px solid rgba(0, 242, 255, 0.35);
    backdrop-filter: blur(4px);
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.7);
}

.hs-devam-ok {
    color: var(--primary);
    font-size: 1.3rem;
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.6));
    animation: hsDevamZipla 1.6s ease-in-out infinite;
}

@keyframes hsDevamZipla {
    0%, 100% { transform: translateY(0); opacity: 0.6; }
    50%      { transform: translateY(6px); opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
    .hs-devam-ok { animation: none; }
}

/* ============================================================
   MOBIL (F3): hero = TAM EKRAN. UST kisim = 1:1 kare video (1080x1080,
   uzerine yazi YOK). ALT bos alan (koyu zemin) = TUM durak yazilari buraya.
   Ayni akis/saniyeler calisir. Masaustu bu bloktan etkilenmez.
   --- Olcu: video yuksekligi = 100vw (kare). Yazi alani = kalan (100vh-100vw).
   ============================================================ */
@media (max-width: 767px) {
    .hs-sahne {
        height: 100vh;
        background: #05080f;
    }

    #hero-scroll {
        background: #05080f;
    }

    /* Video: ekranin USTUNDE 1:1 kare (genislik kadar yukseklik) */
    #heroScrollVideo {
        top: 0;
        bottom: auto;
        height: 100vw;
        object-fit: cover;
        object-position: center;
    }

    /* Yukari kaydir ipucu mobilde gorunur (videonun alt kenarinda) */
    .hs-scroll-ipucu {
        display: block;
        bottom: auto;
        top: calc(100vw - 116px);
    }

    /* Karartma da sadece video karesini kaplasin */
    .hs-karartma {
        height: 100vw;
        bottom: auto;
    }

    /* Yazilar: karenin ALTINDAKI bos alanda. justify-content: flex-start ->
       yazi videonun HEMEN ALTINDAN baslar (ortalanip asagi kaymaz). */
    .hs-durak,
    .hs-final {
        top: 100vw;
        bottom: 0;
        align-items: center;
        justify-content: flex-start;
        text-align: center;
        padding: 22px 18px 16px 18px;
    }

    /* Durak yazilari mobilde videonun ALTINDAKI alanda baslar; durak 2 (baslik + 4
       teknik etiket) ve durak 3 (baslik + paragraf) altta tasıp kesilebiliyordu.
       Yukarı al: durak 2 BIRAZ, durak 3 DAHA FAZLA (videonun uzerine binebilir).
       Ince ayar gerekirse buradaki px degerleri degistirilir. */
    #hsDurak2 { top: calc(100vw - 40px); }
    #hsDurak3 { top: calc(100vw - 120px); }

    .hs-durak h2 {
        font-size: 1.8rem;
        line-height: 1.2;
        margin-bottom: 10px;
        max-width: 100%;
    }

    .hs-durak p {
        font-size: 1rem;
        max-width: 100%;
        margin: 0 auto;
    }

    /* Teknik etiketler (durak 2): yan cizgiler gizli, alt alta ortali,
       normal akista (inline top:% iptal) -> JS alttan kaydirarak getirir. */
    .hs-durak-teknik {
        padding-top: 0;
    }

    .hs-callout {
        position: static;
        left: auto;
        right: auto;
        width: 100%;
        gap: 8px;
        justify-content: center;
        margin-bottom: 10px;
    }

    .hs-callout-metin {
        text-align: center;
    }

    .hs-callout-metin strong {
        font-size: 1rem;
    }

    .hs-callout-metin small {
        font-size: 0.85rem;
    }

    .hs-cizgi {
        display: none;
    }

    /* Cam duragi (durak 3): yazi yine ALT alanda ortali. Video karesi JS ile
       blurlanir (efekt ust karede kalir, yazi altta okunur durur). */
    .hs-durak-cam h2 {
        font-size: 1.8rem;
    }

    .hs-durak-cam .hs-cam-ikinci {
        margin-top: 16px;
    }

    .hs-durak-cam p {
        font-size: 0.95rem;
    }

    /* Final: tasinan hero yazisi alt alanda, ortali */
    .hs-final .hero-content {
        flex: 1 1 100%;
        max-width: 100%;
        text-align: center;
    }

    .hs-final .hero-content h1 {
        font-size: 2rem;
        margin-bottom: 12px;
    }

    .hs-final .hero-content p {
        font-size: 1rem;
        margin-bottom: 20px;
    }
}
