/* ════════════════════════════════════════════════════════════════════
   GSK — Hareket / Animasyon katmanı
   Zarif & premium; mobil öncelikli; prefers-reduced-motion'a saygılı.
   Progressive enhancement: destekleyen tarayıcıda çalışır, değilse sorunsuz düşer.
   ════════════════════════════════════════════════════════════════════ */

/* ─── Sayfa geçişleri — View Transitions API ───────────────────────────
   Aynı-köken navigasyonlarda tarayıcı-native yumuşak geçiş. Desteklemeyen
   tarayıcılar bu kuralları yok sayar; site normal (anında) yüklenir. */
@view-transition {
    navigation: auto;
}

::view-transition-old(root),
::view-transition-new(root) {
    animation-duration: .5s;
    animation-timing-function: cubic-bezier(.83, 0, .17, 1);
    mix-blend-mode: normal;
}

::view-transition-old(root) {
    animation-name: gsk-vt-out;
}

::view-transition-new(root) {
    animation-name: gsk-vt-in;
}

/* Belirgin geçiş: eski sayfa yukarı kayıp küçülerek silinir, yeni sayfa
   aşağıdan gelip altın bir parıltıyla oturur. */
@keyframes gsk-vt-out {
    to {
        opacity: 0;
        transform: translateY(-60px) scale(.94);
    }
}

@keyframes gsk-vt-in {
    0% {
        opacity: 0;
        transform: translateY(90px) scale(.97);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* ─── Yumuşak kaydırma (menü içi çapa bağlantıları için) ──────────────── */
@media (prefers-reduced-motion: no-preference) {
    html {
        scroll-behavior: smooth;
    }
}

/* ─── Mobil dokunmatik geri bildirim (elegant tap) ────────────────────
   Yalnızca dokunmatik (hover'sız) cihazlarda; masaüstü hover'ı etkilenmez. */
@media (hover: none) {
    .btn-gold,
    .btn {
        transition: transform .12s ease;
    }

    .btn-gold:active,
    .btn:active {
        transform: scale(.97);
    }
}

/* ─── Hover efektleri yalnızca gerçek hover cihazlarında ───────────────
   Mobilde "takılı hover" durumunu önlemek için kart yükselme efektleri
   sadece pointer:fine + hover:hover cihazlarda. */
@media (hover: hover) and (pointer: fine) {
    .gsk-hoverable {
        transition: transform .28s cubic-bezier(.4, 0, .2, 1), box-shadow .28s ease;
    }

    .gsk-hoverable:hover {
        transform: translateY(-5px);
    }
}

/* ─── Genel hareket azaltma güvenlik ağı ──────────────────────────────
   Kullanıcı "reduced motion" isterse tüm süslü hareketleri sustur ve
   içeriğin görünür kaldığından emin ol (AOS JS tarafında da devre dışı). */
@media (prefers-reduced-motion: reduce) {

    ::view-transition-old(root),
    ::view-transition-new(root) {
        animation: none;
    }

    html {
        scroll-behavior: auto;
    }

    [data-aos] {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }
}

/* ════════════════════════════════════════════════════════════════════
   SİNEMATİK GİRİŞ (yalnızca anasayfa, oturumda 1 kez)
   Telefonda siteye girer girmez: logo patlaması + altın halka + parıltı,
   ardından perde (iki panel) yukarı/aşağı ayrılarak siteyi açar.
   ════════════════════════════════════════════════════════════════════ */
.gsk-intro {
    position: fixed;
    inset: 0;
    z-index: 100000;
    overflow: hidden;
    /* JS çökse/gecikse bile 6 sn sonra kendini kapatan güvenlik ağı */
    animation: gsk-intro-failsafe 0s linear 6s forwards;
}

.gsk-intro-panel {
    position: absolute;
    left: 0;
    right: 0;
    height: 50.5%;
    z-index: 1;
    will-change: transform;
    transition: transform .85s cubic-bezier(.83, 0, .17, 1);
}

.gsk-intro-top {
    top: 0;
    background: linear-gradient(180deg, #0a1526 0%, #10203a 100%);
}

.gsk-intro-bottom {
    bottom: 0;
    background: linear-gradient(0deg, #0a1526 0%, #10203a 100%);
}

.gsk-intro-top::after,
.gsk-intro-bottom::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    height: 2px;
    opacity: .55;
    background: linear-gradient(90deg, transparent, rgba(201,168,76,.85) 45%, rgba(232,201,142,.95) 55%, transparent);
}

.gsk-intro-top::after { bottom: 0; }
.gsk-intro-bottom::after { top: 0; }

.gsk-intro-core {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 22px;
    padding: 24px;
    text-align: center;
    transition: opacity .5s ease, transform .85s cubic-bezier(.83, 0, .17, 1);
}

.gsk-intro-core::before {
    content: "";
    position: absolute;
    width: min(86vw, 540px);
    aspect-ratio: 1;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(201,168,76,.30) 0%, rgba(192,57,43,.14) 42%, transparent 70%);
    filter: blur(8px);
    animation: gsk-intro-bloom 2.4s ease-out both;
}

.gsk-intro-ring {
    position: absolute;
    width: min(64vw, 280px);
    aspect-ratio: 1;
    border-radius: 50%;
    border: 2px solid transparent;
    border-top-color: #c9a84c;
    border-right-color: rgba(201,168,76,.45);
    animation: gsk-intro-spin 1.15s cubic-bezier(.34,1.3,.64,1) both;
}

.gsk-intro-logo {
    position: relative;
    width: min(48vw, 210px);
    height: auto;
    /* Beyaz halo + koyu gölge: logo koyu zeminde medalyon gibi öne çıksın */
    filter: drop-shadow(0 0 26px rgba(255,255,255,.40)) drop-shadow(0 14px 34px rgba(0,0,0,.5));
    animation: gsk-intro-logo 1s cubic-bezier(.34, 1.56, .64, 1) both;
}

/* Logonun arkasında yumuşak açık disk — koyu logoyu ortamdan ayırır */
.gsk-intro-core .gsk-intro-logo::after { content: none; }
.gsk-intro-halo {
    position: absolute;
    width: min(56vw, 240px);
    aspect-ratio: 1;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255,255,255,.16) 0%, rgba(255,255,255,.05) 40%, transparent 68%);
    filter: blur(2px);
    animation: gsk-intro-fade .8s .15s both;
    pointer-events: none;
}

.gsk-intro-brand {
    position: relative;
    color: #f0e6d3;
    font-weight: 800;
    font-size: clamp(14px, 4.6vw, 21px);
    letter-spacing: .5em;
    text-transform: uppercase;
    padding-left: .5em;
    animation: gsk-intro-brand 1s .5s both;
}

.gsk-intro-sweep {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 45%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,.16), transparent);
    transform: skewX(-18deg);
    pointer-events: none;
    animation: gsk-intro-sweep 1.5s .5s ease-in-out;
}

.gsk-intro-skip {
    position: absolute;
    z-index: 3;
    right: 16px;
    bottom: 16px;
    padding: 8px 15px;
    border-radius: 100px;
    border: 1px solid rgba(255,255,255,.28);
    background: rgba(255,255,255,.1);
    color: #f0e6d3;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
    animation: gsk-intro-fade .5s 1s both;
}

/* Çıkış: perde ayrılır, çekirdek büyüyerek kaybolur */
.gsk-intro.gsk-intro-exit { pointer-events: none; }
.gsk-intro.gsk-intro-exit .gsk-intro-top { transform: translateY(-101%); }
.gsk-intro.gsk-intro-exit .gsk-intro-bottom { transform: translateY(101%); }
.gsk-intro.gsk-intro-exit .gsk-intro-core { opacity: 0; transform: scale(1.4); }

@keyframes gsk-intro-logo {
    0% { opacity: 0; transform: scale(.45) translateY(12px); }
    100% { opacity: 1; transform: scale(1) translateY(0); }
}
@keyframes gsk-intro-bloom {
    0% { opacity: 0; transform: scale(.6); }
    55% { opacity: 1; }
    100% { opacity: .85; transform: scale(1); }
}
@keyframes gsk-intro-spin {
    0% { opacity: 0; transform: rotate(-150deg) scale(.8); }
    100% { opacity: 1; transform: rotate(0) scale(1); }
}
@keyframes gsk-intro-brand {
    0% { opacity: 0; letter-spacing: .12em; }
    100% { opacity: 1; letter-spacing: .5em; }
}
@keyframes gsk-intro-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes gsk-intro-sweep { 0% { left: -45%; } 100% { left: 120%; } }
@keyframes gsk-intro-failsafe { to { opacity: 0; visibility: hidden; pointer-events: none; } }

/* Intro sırasında sayfayı kaydırmayı kilitle */
html.gsk-intro-lock,
html.gsk-intro-lock body { overflow: hidden !important; }

/* Hareket azaltma: sinematik giriş tamamen atlanır */
@media (prefers-reduced-motion: reduce) {
    .gsk-intro { display: none !important; }
}
