/* ==========================================
   ANA SAYFA HERO — marka görseli
   Beyaz zemin. Ortada panelden yüklenen marka görseli "pat" diye belirir,
   hafifçe süzülür ve imlece doğru eğilir; arkasında sarı ışık halkası ve
   zıt yönlere akan soluk dev hizmet adları, çevresinde parıldayan yıldızlar.
   Altta ortalı başlık (son kelime sarı fosforlu kalem), kısa metin, butonlar.
   ========================================== */

/* Sayfa zemini açık gri; bölümler sırayla beyaz ve gri olarak dizilir */

.hl {
    --ink: #0d0d0d;
    --brand: #ffdd00;
    --muted: #5a5a5a;
    --line: rgba(13, 13, 13, 0.12);
    --ease: cubic-bezier(0.16, 1, 0.3, 1);
    --pop: cubic-bezier(0.34, 1.5, 0.64, 1);
    --pad-x: clamp(16px, 2.5vw, 32px);

    position: relative;
    display: flex;
    flex-direction: column;
    min-height: clamp(640px, calc(100svh - var(--hero-offset, 0px) - 12px), 1000px);
    margin: 0 12px;
    padding: clamp(16px, 3vh, 28px) var(--pad-x) clamp(28px, 5vh, 52px);
    box-sizing: border-box;
    overflow: hidden;
    isolation: isolate;
    background: #fff;
    color: var(--ink);
}

/* --- Etiket satırı --- */
.hl__bar {
    position: relative;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--line);
}

.hl__eyebrow,
.hl__scroll {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    white-space: nowrap;
}

.hl__eyebrow span {
    width: 8px;
    height: 8px;
    background: var(--brand);
    box-shadow: 0 0 0 1px var(--ink);
}

/* Aşağı akan küçük çizgi */
.hl__scroll span {
    position: relative;
    width: 1px;
    height: 22px;
    overflow: hidden;
    background: var(--line);
}

.hl__scroll span::after {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--ink);
    animation: hl-scroll 1.8s var(--ease) infinite;
}

@keyframes hl-scroll {
    0% { translate: 0 -100%; }
    60%, 100% { translate: 0 100%; }
}

/* --- Sahne --- */
.hl__stage {
    position: relative;
    flex: 1;
    min-height: clamp(280px, 48vh, 600px);
    display: grid;
    place-items: center;
    margin-inline: calc(var(--pad-x) * -1);
    perspective: 1400px;
}

/* Arkadaki soluk akan yazı */
.hl__ghost {
    position: absolute;
    inset: 0;
    z-index: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: clamp(4px, 1vh, 12px);
    pointer-events: none;
    translate: calc(var(--px, 0) * -18px) calc(var(--py, 0) * -10px);
    transition: translate 0.8s var(--ease);
}

.hl__ghost-row {
    display: flex;
    overflow: hidden;
    opacity: 0;
    transition: opacity 1.2s ease 0.3s;
}

.hl.is-ready .hl__ghost-row {
    opacity: 1;
}

.hl__ghost-track {
    display: flex;
    flex: none;
    align-items: center;
    animation: hl-ghost 70s linear infinite;
}

.hl__ghost-row.is-reverse .hl__ghost-track {
    animation-direction: reverse;
    animation-duration: 84s;
}

.hl__ghost span {
    padding: 0 0.28em;
    font-size: clamp(3rem, 8.4vw, 8.8rem);
    font-weight: 900;
    line-height: 1.02;
    letter-spacing: -0.05em;
    white-space: nowrap;
    color: #f2f1ee;
}

.hl__ghost i {
    flex: none;
    width: clamp(18px, 2.2vw, 36px);
    height: clamp(18px, 2.2vw, 36px);
    background: #f2f1ee;
    clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%);
}

@keyframes hl-ghost {
    to { transform: translateX(-100%); }
}

/* Görselin arkasındaki sarı ışık */
.hl__glow {
    position: absolute;
    z-index: 1;
    left: 50%;
    top: 50%;
    width: min(760px, 70vw);
    aspect-ratio: 1.7;
    border-radius: 50%;
    background: radial-gradient(closest-side, color-mix(in srgb, var(--brand) 55%, transparent), transparent);
    filter: blur(30px);
    translate: -50% -50%;
    scale: 0.4;
    opacity: 0;
    transition: scale 1.4s var(--ease) 0.2s, opacity 1.2s ease 0.2s;
    pointer-events: none;
}

.hl.is-ready .hl__glow {
    scale: 1;
    opacity: 0.55;
    animation: hl-breathe 6s ease-in-out 1.6s infinite;
}

@keyframes hl-breathe {
    50% { scale: 1.08; opacity: 0.7; }
}

/* Parıldayan yıldızlar */
.hl__spark {
    position: absolute;
    z-index: 3;
    left: var(--x);
    top: var(--y);
    width: calc(26px * var(--s));
    height: calc(26px * var(--s));
    background: var(--ink);
    clip-path: polygon(50% 0, 60% 40%, 100% 50%, 60% 60%, 50% 100%, 40% 60%, 0 50%, 40% 40%);
    scale: 0;
    pointer-events: none;
    translate: calc(var(--px, 0) * 14px) calc(var(--py, 0) * 14px);
    transition: translate 0.8s var(--ease);
}

.hl__spark:nth-of-type(odd) {
    background: var(--brand);
    filter: drop-shadow(0 0 1px rgba(13, 13, 13, 0.5));
}

.hl.is-ready .hl__spark {
    animation: hl-twinkle 3.2s var(--ease) calc(1s + var(--d)) infinite both;
}

@keyframes hl-twinkle {
    0% { scale: 0; rotate: -45deg; }
    18% { scale: 1; rotate: 0deg; }
    60% { scale: 1; rotate: 10deg; }
    80%, 100% { scale: 0; rotate: 45deg; }
}

/* Marka görseli */
.hl__art {
    position: relative;
    z-index: 2;
    margin: 0;
    display: grid;
    place-items: center;
    width: min(900px, 94%);
    height: 100%;
    max-height: clamp(260px, 56vh, 620px);
    animation: hl-float 7s ease-in-out 1.4s infinite;
}

/* Panelde slayt türü "video" seçildiyse görselin yerine video oynar */
.hl__art--video {
    --video-h: clamp(260px, 58vh, 620px);

    width: min(1000px, 96%);
    height: var(--video-h);
    max-height: var(--video-h);
}

/* YouTube/Vimeo gömülü oynatıcı gerçek bir 16:9 kutuya ihtiyaç duyar;
   yüklenen video dosyası ise sahnenin yüksekliğine oturur */
.hl__art--video:has(iframe) {
    aspect-ratio: 16 / 9;
}

.hl__art--video video,
.hl__art--video iframe {
    display: block;
    width: 100%;
    /* Ortalanmış grid öğesinde yüzde yükseklik çözülmediğinden kesin değer verilir */
    height: var(--video-h);
    border: 0;
    object-fit: contain;
    opacity: 0;
    transform:
        rotateX(calc(var(--py, 0) * -5deg))
        rotateY(calc(var(--px, 0) * 6deg))
        scale(0.88);
    transition:
        transform 1.1s var(--pop) 0.15s,
        opacity 0.7s ease 0.15s;
}

.hl.is-ready .hl__art--video video,
.hl.is-ready .hl__art--video iframe {
    opacity: 1;
    transform:
        rotateX(calc(var(--py, 0) * -5deg))
        rotateY(calc(var(--px, 0) * 6deg))
        scale(1);
}

.hl.is-tilting .hl__art--video video,
.hl.is-tilting .hl__art--video iframe {
    transition: transform 0.9s var(--ease);
}

/* Beyaz zeminli video: çarpma karışımıyla zemini beyaz sayfaya karışır,
   video arka planı yokmuş gibi görünür. Şeffaf (alpha) videolarda da
   beyazla çarpma renkleri değiştirmediği için güvenlidir. */
.hl__art--video video {
    background: transparent;
}

/* Videonun beyaz alanı saydam göründüğü için arkadaki ışık ve dev yazı
   videonun içinden okunur; bu yüzden video modunda ikisi de hafifletilir */
.hl:has(.hl__art--video) .hl__ghost {
    opacity: 0.45;
}

.hl.is-ready:has(.hl__art--video) .hl__glow {
    opacity: 0.3;
}

.hl__art img {
    display: block;
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    user-select: none;
    filter: drop-shadow(0 30px 40px rgba(13, 13, 13, 0.16)) blur(12px);
    opacity: 0;
    transform:
        rotateX(calc(var(--py, 0) * -7deg))
        rotateY(calc(var(--px, 0) * 9deg))
        scale(0.72);
    transition:
        transform 1.1s var(--pop) 0.15s,
        opacity 0.6s ease 0.15s,
        filter 0.9s ease 0.15s;
}

.hl.is-ready .hl__art img {
    opacity: 1;
    filter: drop-shadow(0 30px 40px rgba(13, 13, 13, 0.16)) blur(0);
    transform:
        rotateX(calc(var(--py, 0) * -7deg))
        rotateY(calc(var(--px, 0) * 9deg))
        scale(1);
}

/* Giriş bittiğinde eğilme imleci yumuşakça takip eder */
.hl.is-tilting .hl__art img {
    transition: transform 0.9s var(--ease), filter 0.4s ease;
}

@keyframes hl-float {
    50% { translate: 0 -12px; }
}

/* --- Metin --- */
.hl__content {
    position: relative;
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: clamp(8px, 2vh, 24px);
    text-align: center;
}

.hl__title {
    margin: 0;
    font-size: clamp(2.2rem, 4.6vw, 4.6rem);
    font-weight: 900;
    line-height: 0.98;
    letter-spacing: -0.055em;
    text-wrap: balance;
}

/* Kelimeler maskenin altından yukarı gelir (Ü noktası / Ç çengeli için pay bırakılır) */
.hl__title .word {
    display: inline-block;
    padding: 0.14em 0.03em 0.18em;
    margin: -0.14em -0.03em -0.18em;
    overflow: hidden;
    vertical-align: top;
}

.hl__title .word__in {
    display: inline-block;
    transform: translateY(110%);
    transition: transform 1s var(--ease);
    transition-delay: calc(var(--i) * 80ms + 600ms);
}

.hl.is-ready .hl__title .word__in {
    transform: none;
}

.hl__title .word:last-child .word__in {
    background-image: linear-gradient(var(--brand), var(--brand));
    background-repeat: no-repeat;
    background-position: 0 84%;
    background-size: 0% 0.28em;
    transition: transform 1s var(--ease), background-size 0.8s var(--ease);
    transition-delay: calc(var(--i) * 80ms + 600ms), 1.4s;
}

.hl.is-ready .hl__title .word:last-child .word__in {
    background-size: 100% 0.28em;
}

.hl__text,
.hl__actions {
    opacity: 0;
    translate: 0 14px;
    transition: opacity 0.9s ease 1s, translate 0.9s var(--ease) 1s;
}

.hl.is-ready .hl__text,
.hl.is-ready .hl__actions {
    opacity: 1;
    translate: 0 0;
}

.hl__text {
    max-width: 64ch;
    margin: clamp(12px, 2vh, 18px) 0 0;
    font-size: clamp(0.88rem, 0.95vw, 1rem);
    line-height: 1.65;
    color: var(--muted);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.hl__text strong {
    color: var(--ink);
    font-weight: 700;
}

.hl__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 12px 28px;
    margin-top: clamp(18px, 3vh, 28px);
    transition-delay: 1.15s;
}

.hl__cta {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    height: 56px;
    padding: 0 7px 0 22px;
    border-radius: 12px;
    background: #1c1c1c;
    color: #f2f2f2;
    font-size: 0.94rem;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    box-shadow: 0 18px 40px -20px rgba(0, 0, 0, 0.55);
    transition: background 0.3s ease, translate 0.3s var(--ease);
}

.hl__cta-icon {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--brand);
    color: var(--ink);
    transition: transform 0.4s var(--ease);
}

.hl__cta-icon svg {
    width: 16px;
    height: 16px;
}

.hl__cta:hover {
    background: #000;
    translate: 0 -2px;
}

.hl__cta:hover .hl__cta-icon {
    transform: rotate(45deg);
}

.hl__link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 0;
    color: var(--ink);
    font-size: 0.94rem;
    font-weight: 700;
    text-decoration: none;
    background-image: linear-gradient(var(--brand), var(--brand));
    background-repeat: no-repeat;
    background-position: 0 88%;
    background-size: 0% 0.4em;
    transition: background-size 0.4s var(--ease);
}

.hl__link svg {
    width: 16px;
    height: 16px;
    transition: translate 0.3s var(--ease);
}

.hl__link:hover {
    background-size: 100% 0.4em;
}

.hl__link:hover svg {
    translate: 4px 0;
}

.hl a:focus-visible {
    outline: 3px solid var(--ink);
    outline-offset: 3px;
}

/* --- Tablet --- */
@media (max-width: 1023px) {
    .hl {
        min-height: 0;
    }

    .hl__stage {
        flex: none;
        height: clamp(300px, 48svh, 520px);
    }
}

/* --- Telefon --- */
@media (max-width: 700px) {
    .hl {
        margin: 0 8px;
    }

    .hl__stage {
        height: clamp(240px, 38svh, 340px);
    }

    .hl__art {
        width: 100%;
    }

    .hl__title {
        font-size: clamp(2.2rem, 10.5vw, 3rem);
    }

    .hl__text {
        -webkit-line-clamp: 3;
    }

    .hl__actions {
        flex-direction: column;
        gap: 14px;
    }

    .hl__spark:nth-of-type(n+4) {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .hl__art,
    .hl__ghost-track,
    .hl__glow,
    .hl__spark,
    .hl__scroll span::after {
        animation: none !important;
    }

    .hl__art img,
    .hl__title .word__in,
    .hl__text,
    .hl__actions,
    .hl__glow,
    .hl__ghost,
    .hl__ghost-row {
        transition: none !important;
    }

    .hl.is-ready .hl__spark {
        scale: 1;
    }
}
