/* =========================================================
   IMORA SCROLL HERO
   ========================================================= */

/* 1. SCROLL RAYI (Track): Kullanıcının 3 ekran boyu kaydırabileceği sinematik alan */
.imora-hero-track {
    position: relative;
    height: 420vh; /* uzun sinematik kaydırma mesafesi */
    background-color: var(--obsidian);
    view-timeline-name: --imora-cinema-scroll;
    view-timeline-axis: block;
}

/* 2. SAHNE KİLİDİ (Sticky Stage): Kullanıcı kaydırırken ekrana çakılı kalan vizyon alanı */
.imora-hero {
    position: sticky;
    top: 0;
    height: 100vh;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    box-sizing: border-box;
}

/* Arkadaki ambient glow — Sayfa kaydıkça devasa boyutlara ulaşıp siber aydınlık verir */
.imora-hero__glow {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 70vmax;
    height: 70vmax;
    transform: translate(-50%, -50%) scale(0.5);
    background: radial-gradient(circle, rgba(118, 125, 255, 0.4) 0%, transparent 70%);
    pointer-events: none;
    will-change: transform, opacity;
    opacity: 0.2;
    animation: imora-glow-cinema linear forwards;
    animation-timeline: --imora-cinema-scroll;
}

/* Zemin noktalı doku — Yukarı doğru süzülen paralaks etkisi */
.imora-hero__field {
    position: absolute;
    inset: -20%;
    background-image: radial-gradient(rgba(118, 125, 255, 0.12) 1px, transparent 1px);
    background-size: 32px 32px;
    pointer-events: none;
    will-change: transform;
    animation: imora-field-cinema linear forwards;
    animation-timeline: --imora-cinema-scroll;
}

/* Tüm elementlerin merkez sahnesi */
.imora-hero__stage {
    position: relative;
    z-index: 10;
    text-align: center;
    padding: 0 1.5rem;
    width: 100%;
    max-width: 1200px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    perspective: 1200px; /* 3D katmanlar için derinlik algısı zırhı */
}

/* Üst Başlık (Eyebrow) — Hızla belirip yukarı kaybolur */
.imora-hero__eyebrow {
    display: inline-block;
    font-family: var(--font-mono, monospace);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--on-surface-variant);
    margin-bottom: 1.5rem;
    will-change: opacity, transform;
    animation: imora-eyebrow-cinema linear forwards;
    animation-timeline: --imora-cinema-scroll;
}

.imora-hero__word {
    margin: 0;
    font-family: var(--font-head, 'Space Grotesk', sans-serif);
    font-weight: 700;
    line-height: 0.95;
    font-size: clamp(2.6rem, 12.5vw, 10rem);
    background: linear-gradient(135deg, #fff 30%, var(--primary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: inline-block;
    will-change: transform, opacity, letter-spacing;
    transform: scale(0.4) translateZ(-300px) rotateX(25deg);
    letter-spacing: 0.5em;
    opacity: 0;
    animation: imora-word-cinema linear forwards;
    animation-timeline: --imora-cinema-scroll;
}

/* Alt Açıklama  */
.imora-hero__sub {
    margin: 2rem auto 0;
    max-width: 32rem;
    color: var(--on-surface-variant);
    font-size: 1.1rem;
    line-height: 1.6;
    will-change: opacity, transform;
    opacity: 0;
    animation: imora-sub-cinema linear forwards;
    animation-timeline: --imora-cinema-scroll;
}

.imora-hero__deco-layer {
    position: absolute;
    inset: 0;
    z-index: 5;
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    perspective: 1500px;
}

/* Dönen halkalar / Kapsayıcı */
.imora-logo-outline {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 700px;
    height: 450px;
    opacity: 0;
    will-change: transform, opacity;
    animation: imora-logo-cinema linear forwards;
    animation-timeline: --imora-cinema-scroll;
    filter: none;
}

/* 1. Alttaki İki Uzun Gövde */
.ii-body {
    position: absolute;
    width: 125px;
    height: 275px;
    background: linear-gradient(180deg, rgba(118, 125, 255, 0.25) 0%, rgba(118, 125, 255, 0.05) 100%);
    backdrop-filter: blur(4px);
    border: 1px solid rgba(118, 125, 255, 0.85);
    border-top: none;
    transform: skewX(-14deg);
    border-radius: 0px 0px 35px 0px;
    box-shadow: 0 0 25px rgba(118, 125, 255, 0.2);
}

/* 2. Üstteki İki Kaydırılmış Nokta */
.ii-dot {
    position: absolute;
    width: 125px;
    height: 100px; 
    background: linear-gradient(135deg, rgba(118, 125, 255, 0.3) 0%, rgba(118, 125, 255, 0.1) 100%);
    backdrop-filter: blur(4px);
    border: 1px solid rgba(118, 125, 255, 0.85);
    border-bottom: none;
    transform: skewX(-14deg);
    border-radius: 35px 0px 0px 0px;
    box-shadow: 0 0 20px rgba(118, 125, 255, 0.15);
}


/* Sol gövde tabanda duruyor */
.ii-left {
    left: 100px;
    top: 145px;
    z-index: 1;
}

/* Sol üst nokta — Alt parçayla üst üste binerek (1px overlap) border boşluğunu yok eder */
.ii-left-dot {
    left: 271px; 
    top: 45px;
    z-index: 2;
}

/* Sağ gövde */
.ii-right {
    left: 310px; 
    top: 145px;
    z-index: 1;
}

/* Sağ üst nokta */
.ii-right-dot {
    left: 481px; 
    top: 45px;
    z-index: 2;
}

/* Diyagonal enerji çizgileri — sahneyi sağdan soldan kesen ışık hatları */
.deco-line {
    position: absolute;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(118, 125, 255, 0.7), transparent);
    opacity: 0;
    will-change: transform, opacity, width;
    animation: imora-line-cinema linear forwards;
    animation-timeline: --imora-cinema-scroll;
}

.line-top {
    width: 40vw;
    top: 28%;
    left: -10%;
    transform: rotate(-8deg);
    animation-name: imora-line-top-cinema;
}

.line-bottom {
    width: 50vw;
    bottom: 26%;
    right: -15%;
    transform: rotate(6deg);
    animation-name: imora-line-bottom-cinema;
}

/* Parçacık noktaları — kelimenin patlama anında etrafa saçılan enerji */
.deco-dot {
    position: absolute;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--primary);
    opacity: 0;
    will-change: transform, opacity;
    animation: imora-dot-cinema linear forwards;
    animation-timeline: --imora-cinema-scroll;
}

.dot-1 {
    top: 30%;
    left: 22%;
    animation-name: imora-dot-1-cinema;
}

.dot-2 {
    top: 65%;
    left: 18%;
    animation-name: imora-dot-2-cinema;
}

.dot-3 {
    top: 25%;
    left: 78%;
    animation-name: imora-dot-3-cinema;
}

.dot-4 {
    top: 70%;
    left: 80%;
    animation-name: imora-dot-4-cinema;
}

.dot-5 {
    top: 50%;
    left: 8%;
    animation-name: imora-dot-5-cinema;
}

.dot-6 {
    top: 48%;
    left: 92%;
    animation-name: imora-dot-6-cinema;
}

/* Scroll İpucu */
.imora-hero__scroll-cue {
    font-family: var(--font-mono, monospace);
    position: absolute;
    bottom: 2.5rem;
    left: 50%;
    transform: translateX(-50%);
    color: var(--on-surface-variant);
    font-size: 0.75rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    opacity: 0.7;
    will-change: opacity, transform;
    animation: imora-cue-cinema linear forwards;
    animation-timeline: --imora-cinema-scroll;
    z-index: 20;
}

/* =========================================================
   SİNEMATİK KEYFRAMES (SCROLL % ORANLARINA GÖRE HESAPLANMIŞTIR)
   ========================================================= */

/* 1. Üst Başlık: %0'dan %20'ye kadar görünür, sonra yukarı uçar */
@keyframes imora-eyebrow-cinema {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }

    15% {
        opacity: 1;
        transform: translateY(0);
    }

    30% {
        opacity: 0;
        transform: translateY(-30px);
    }

    100% {
        opacity: 0;
        transform: translateY(-30px);
    }
}

/* 2. Kelime Yükselişi ve Derinlik İllüzyonu — daha enerjik, blursuz, rotateX'li */
@keyframes imora-word-cinema {
    0% {
        transform: scale(0.4) translateZ(-300px) rotateX(25deg);
        letter-spacing: 0.5em;
        opacity: 0;
    }

    28% {
        opacity: 1;
        letter-spacing: -0.02em; /* Harfler birleşiyor şef! */
        transform: scale(1.05) translateZ(0) rotateX(0deg);
    }

    45% {
        opacity: 1;
        transform: scale(1.15) translateZ(60px) rotateX(-4deg);
    }

    65% {
        opacity: 1;
        transform: scale(1.25) translateZ(100px) rotateX(6deg);
    }
    /* Ekranın içinden geçip kameranın arkasında kaybolma efekti */
    85% {
        opacity: 0;
        transform: scale(3.8) translateZ(320px) rotateX(0deg);
    }

    100% {
        opacity: 0;
        transform: scale(4.2) translateZ(420px);
    }
}

/* 3. Dış Halka — yavaş dönerek genişler */
@keyframes imora-ring-outer-cinema {
    0% {
        opacity: 0;
        transform: rotate(0deg) scale(0.6);
    }

    30% {
        opacity: 0;
    }

    50% {
        opacity: 0.7;
        border-color: rgba(118, 125, 255, 0.5);
    }

    75% {
        opacity: 0.9;
        transform: rotate(160deg) scale(1.4);
    }

    100% {
        opacity: 0;
        transform: rotate(220deg) scale(1.9);
    }
}

/* 4. İç Halka — ters yönde, daha hızlı döner */
@keyframes imora-ring-inner-cinema {
    0% {
        opacity: 0;
        transform: rotate(0deg) scale(0.5);
    }

    35% {
        opacity: 0;
    }

    55% {
        opacity: 0.8;
    }

    78% {
        opacity: 1;
        transform: rotate(-200deg) scale(1.25);
    }

    100% {
        opacity: 0;
        transform: rotate(-280deg) scale(1.7);
    }
}

/* 5. Üst diyagonal çizgi — soldan kayarak belirir, sağa kaçar */
@keyframes imora-line-top-cinema {
    0% {
        opacity: 0;
        transform: rotate(-8deg) translateX(-20vw);
    }

    40% {
        opacity: 0;
    }

    55% {
        opacity: 0.8;
        transform: rotate(-8deg) translateX(0);
    }

    80% {
        opacity: 0.6;
        transform: rotate(-14deg) translateX(15vw);
    }

    100% {
        opacity: 0;
        transform: rotate(-14deg) translateX(40vw);
    }
}

/* 6. Alt diyagonal çizgi — sağdan kayarak belirir, sola kaçar */
@keyframes imora-line-bottom-cinema {
    0% {
        opacity: 0;
        transform: rotate(6deg) translateX(20vw);
    }

    45% {
        opacity: 0;
    }

    60% {
        opacity: 0.7;
        transform: rotate(6deg) translateX(0);
    }

    82% {
        opacity: 0.5;
        transform: rotate(10deg) translateX(-15vw);
    }

    100% {
        opacity: 0;
        transform: rotate(10deg) translateX(-40vw);
    }
}

/* 7. Parçacık Noktaları — kelimenin zirve anında dışa fırlar */
@keyframes imora-dot-1-cinema {
    0%, 40% {
        opacity: 0;
        transform: translate(0, 0) scale(0.5);
    }

    55% {
        opacity: 1;
        transform: translate(-10px, -15px) scale(1.2);
    }

    75% {
        opacity: 1;
        transform: translate(-60px, -80px) scale(1);
    }

    100% {
        opacity: 0;
        transform: translate(-140px, -180px) scale(0.4);
    }
}

@keyframes imora-dot-2-cinema {
    0%, 42% {
        opacity: 0;
        transform: translate(0, 0) scale(0.5);
    }

    57% {
        opacity: 1;
        transform: translate(-12px, 14px) scale(1.2);
    }

    77% {
        opacity: 1;
        transform: translate(-70px, 90px) scale(1);
    }

    100% {
        opacity: 0;
        transform: translate(-150px, 200px) scale(0.4);
    }
}

@keyframes imora-dot-3-cinema {
    0%, 38% {
        opacity: 0;
        transform: translate(0, 0) scale(0.5);
    }

    53% {
        opacity: 1;
        transform: translate(14px, -12px) scale(1.2);
    }

    74% {
        opacity: 1;
        transform: translate(85px, -70px) scale(1);
    }

    100% {
        opacity: 0;
        transform: translate(180px, -150px) scale(0.4);
    }
}

@keyframes imora-dot-4-cinema {
    0%, 44% {
        opacity: 0;
        transform: translate(0, 0) scale(0.5);
    }

    59% {
        opacity: 1;
        transform: translate(12px, 14px) scale(1.2);
    }

    78% {
        opacity: 1;
        transform: translate(75px, 85px) scale(1);
    }

    100% {
        opacity: 0;
        transform: translate(160px, 190px) scale(0.4);
    }
}

@keyframes imora-dot-5-cinema {
    0%, 40% {
        opacity: 0;
        transform: translate(0, 0) scale(0.5);
    }

    56% {
        opacity: 1;
        transform: translate(-18px, 4px) scale(1.2);
    }

    76% {
        opacity: 1;
        transform: translate(-100px, 30px) scale(1);
    }

    100% {
        opacity: 0;
        transform: translate(-220px, 60px) scale(0.4);
    }
}

@keyframes imora-dot-6-cinema {
    0%, 41% {
        opacity: 0;
        transform: translate(0, 0) scale(0.5);
    }

    58% {
        opacity: 1;
        transform: translate(18px, -6px) scale(1.2);
    }

    77% {
        opacity: 1;
        transform: translate(105px, -40px) scale(1);
    }

    100% {
        opacity: 0;
        transform: translate(230px, -85px) scale(0.4);
    }
}

/* 8. Alt Metin Beliriş Modülü */
@keyframes imora-sub-cinema {
    0% {
        opacity: 0;
        transform: translateY(30px);
    }

    35% {
        opacity: 0;
        transform: translateY(20px);
    }

    50% {
        opacity: 1;
        transform: translateY(0);
    }

    75% {
        opacity: 0;
        transform: translateY(-20px);
    }

    100% {
        opacity: 0;
    }
}

/* 9. Ortam Parlaması — daha hızlı ve daha güçlü büyüme */
@keyframes imora-glow-cinema {
    0% {
        transform: translate(-50%, -50%) scale(0.5);
        opacity: 0.1;
    }

    45% {
        transform: translate(-50%, -50%) scale(1.4);
        opacity: 0.55;
        background: radial-gradient(circle, rgba(118, 125, 255, 0.5) 0%, transparent 65%);
    }

    100% {
        transform: translate(-50%, -50%) scale(2.2);
        opacity: 0;
    }
}

/* 10. Arka Plan Noktaları Paralaks Kayması — artırılmış mesafe */
@keyframes imora-field-cinema {
    0% {
        transform: translateY(0) scale(1);
    }

    100% {
        transform: translateY(-140px) scale(1.1);
    }
}

/* 11. Scroll İpucu Sönmesi */
@keyframes imora-cue-cinema {
    /* Sayfa ilk açıldığında (~%25-28 civarı) yazı hala tam netlikte kalsın */
    0%, 28% {
        opacity: 0.7;
        transform: translateX(-50%) translateY(0);
    }
    /* Kullanıcı biraz kaydırdıktan sonra (%38 civarı) yavaşça kaybolsun */
    38% {
        opacity: 0;
        transform: translateX(-50%) translateY(10px);
    }

    100% {
        opacity: 0;
        transform: translateX(-50%) translateY(10px);
    }
}

/* --- Fallback / Güvenlik Duvarı --- */
@media (prefers-reduced-motion: reduce) {
    .imora-hero-track {
        height: auto !important;
    }

    .imora-hero {
        position: relative !important;
        height: auto !important;
        min-height: 100vh;
    }

    .imora-hero__word {
        animation: none !important;
        opacity: 1 !important;
        transform: none !important;
        letter-spacing: normal !important;
        position: relative !important;
    }

    .deco-ring, .deco-line, .deco-dot {
        display: none !important;
    }
}

@supports not (animation-timeline: scroll()) {
    .imora-hero-track {
        height: auto !important;
    }

    .imora-hero {
        position: relative !important;
        height: auto !important;
        min-height: 100vh;
    }

    .imora-hero__word, .imora-hero__eyebrow, .imora-hero__sub {
        opacity: 1 !important;
        transform: none !important;
        letter-spacing: normal !important;
    }

    .deco-ring, .deco-line, .deco-dot {
        display: none !important;
    }

    .imora-hero__scroll-cue {
        display: none !important;
    }
}
@keyframes imora-logo-cinema {

    0% {
        opacity: 0;
        transform: translate(-50%,-50%) scale(.35) rotateX(25deg);
    }

    25% {
        opacity: 1;
        transform: translate(-50%,-50%) scale(1);
    }

    70% {
        opacity: 1;
        transform: translate(-50%,-50%) scale(1.4);
    }

    100% {
        opacity: 0;
        transform: translate(-50%,-50%) scale(3);
    }
}

/* IMORA + tech: logo kilitlemesi (tech daha hafif ve açık mavi) */
.imora-hero__tech {
    font-weight: 500;
    letter-spacing: inherit;
    -webkit-text-fill-color: #aab0ff;
    color: #aab0ff;
}


/* =========================================================
   YENİ SAHNELER (v2) — aynı kaydırma mantığı, daha fazla perde
   Parça uzunluğu 420vh: yapışık sahne ~%19–%81 aralığındadır.
     %19–%28  IMORAtech harfleri birleşir
     %20–%52  teknoloji etiketleri süzülür (chips)
     %44–%48  kelime kameradan geçip kaybolur
     %46–%82  üç cümle sırayla: Tasarlıyoruz / Geliştiriyoruz / Büyütüyoruz
   ========================================================= */

/* Kelime: daha erken uçar ki cümlelere yer açılsın */
.imora-hero__word {
    animation-name: imora-word-v2;
}

@keyframes imora-word-v2 {
    0% {
        transform: scale(0.4) translateZ(-300px) rotateX(25deg);
        letter-spacing: 0.5em;
        opacity: 0;
    }
    24% {
        opacity: 1;
        letter-spacing: -0.02em;
        transform: scale(1) translateZ(0) rotateX(0deg);
    }
    38% {
        opacity: 1;
        transform: scale(1.06) translateZ(40px) rotateX(0deg);
    }
    48% {
        opacity: 0;
        transform: scale(3.4) translateZ(300px) rotateX(0deg);
        letter-spacing: -0.02em;
    }
    100% {
        opacity: 0;
        transform: scale(3.4) translateZ(300px) rotateX(0deg);
        letter-spacing: -0.02em;
    }
}

/* Teknoloji etiketleri: yazılım dünyasından kısa sözcükler, farklı hızlarda yukarı süzülür */
.imora-hero__chips {
    position: absolute;
    inset: 0;
    z-index: 6;
    pointer-events: none;
}

.imora-chip {
    position: absolute;
    left: var(--x);
    top: var(--y);
    padding: 0.45rem 0.9rem;
    border: 1px solid rgba(170, 176, 255, 0.35);
    border-radius: 999px;
    background: rgba(118, 125, 255, 0.08);
    color: #c9ccff;
    font-family: var(--font-mono, monospace);
    font-size: clamp(0.7rem, 1.1vw, 0.95rem);
    font-weight: 600;
    letter-spacing: 0.06em;
    white-space: nowrap;
    opacity: 0;
    will-change: transform, opacity;
    animation: imora-chip-cinema linear both;
    animation-timeline: --imora-cinema-scroll;
    animation-range: var(--a, 20%) var(--b, 50%);
}

@keyframes imora-chip-cinema {
    0% {
        opacity: 0;
        transform: translateY(calc(var(--d, 60) * 1px));
    }
    25% {
        opacity: 1;
    }
    75% {
        opacity: 1;
    }
    100% {
        opacity: 0;
        transform: translateY(calc(var(--d, 60) * -2px));
    }
}

/* Üç cümle: kelimenin ardından sırayla belirir */
.imora-hero__phases {
    position: absolute;
    inset: 0;
    z-index: 12;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.imora-phase {
    position: absolute;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    padding: 0 1.5rem;
    text-align: center;
    opacity: 0;
    will-change: transform, opacity;
    animation: imora-phase-cinema linear both;
    animation-timeline: --imora-cinema-scroll;
}

.imora-phase--1 { animation-range: 46% 61%; }
.imora-phase--2 { animation-range: 59% 73%; }
.imora-phase--3 { animation-range: 71% 82%; animation-name: imora-phase-last; }

.imora-phase__no {
    font-family: var(--font-mono, monospace);
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.3em;
    color: #8f97ff;
}

.imora-phase__text {
    font-family: var(--font-head, 'Space Grotesk', sans-serif);
    font-size: clamp(2.4rem, 9vw, 7.5rem);
    font-weight: 700;
    line-height: 1;
    letter-spacing: -0.04em;
    color: #fff;
}

.imora-phase__text i {
    font-style: normal;
    color: #8f97ff;
}

@keyframes imora-phase-cinema {
    0%   { opacity: 0; transform: translateY(50px) scale(0.94); }
    22%  { opacity: 1; transform: translateY(0) scale(1); }
    78%  { opacity: 1; transform: translateY(0) scale(1); }
    100% { opacity: 0; transform: translateY(-50px) scale(1.04); }
}

@keyframes imora-phase-last {
    0%   { opacity: 0; transform: translateY(50px) scale(0.94); }
    40%  { opacity: 1; transform: translateY(0) scale(1); }
    100% { opacity: 1; transform: translateY(0) scale(1); }
}

/* Hareket istemeyenler ve eski tarayıcılar: yalnızca ana sahne */
@media (prefers-reduced-motion: reduce) {
    .imora-hero__chips, .imora-hero__phases { display: none; }
}

@supports not (animation-timeline: scroll()) {
    .imora-hero__chips, .imora-hero__phases { display: none; }
}

@media (max-width: 640px) {
    .imora-chip.hide-sm { display: none; }
}
