/*
 * Ana sayfa hero — "sinematik vitrin"
 * Sürekli hareket: süzülen ışık, kayan ızgara, dönen ışık huzmesi, zıt yönlü film şeritleri,
 * yüzen cam kartlar, parlayan başlık, kayan anahtar kelime bandı.
 * Yalnız transform/opacity animasyonları (GPU), görünür değilken ve "hareketi azalt" ayarında durur.
 * Hareket denetleyicisi: assets/js/hero-motion.js
 */

.hx {
    --hx-dur: 7s;
    --hx-red: #ff3131;
    --hx-ease: cubic-bezier(0.22, 1, 0.36, 1);
    position: relative;
    isolation: isolate;
    display: flex;
    flex-direction: column;
    min-height: clamp(620px, calc(100svh - 70px), 940px);
    padding-top: clamp(84px, 10.5vh, 120px);
    overflow: hidden;
    background: #050505;
    color: #fff;
}

/* ---------- arka plan katmanları ---------- */
.hx-bg {
    position: absolute;
    inset: 0;
    z-index: -1;
    pointer-events: none;
}

.hx-blob {
    position: absolute;
    border-radius: 50%;
    will-change: transform;
}

.hx-blob--a {
    top: -22%;
    left: -12%;
    width: 62vmax;
    height: 62vmax;
    background: radial-gradient(circle, rgba(255, 49, 49, 0.34), transparent 64%);
    animation: hx-drift-a 17s ease-in-out infinite alternate;
}

.hx-blob--b {
    right: -18%;
    bottom: -30%;
    width: 56vmax;
    height: 56vmax;
    background: radial-gradient(circle, rgba(160, 6, 14, 0.4), transparent 64%);
    animation: hx-drift-b 21s ease-in-out infinite alternate;
}

.hx-blob--c {
    top: 18%;
    right: 22%;
    width: 30vmax;
    height: 30vmax;
    background: radial-gradient(circle, rgba(255, 110, 120, 0.14), transparent 66%);
    animation: hx-drift-c 13s ease-in-out infinite alternate;
}

@keyframes hx-drift-a {
    to { transform: translate3d(14%, 10%, 0) scale(1.14); }
}

@keyframes hx-drift-b {
    to { transform: translate3d(-12%, -12%, 0) scale(1.1); }
}

@keyframes hx-drift-c {
    to { transform: translate3d(-18%, 16%, 0) scale(1.3); }
}

/* kayan ince ızgara */
.hx-grid {
    position: absolute;
    inset: 0;
    overflow: hidden;
    -webkit-mask-image: radial-gradient(75% 70% at 50% 42%, #000 20%, transparent 78%);
    mask-image: radial-gradient(75% 70% at 50% 42%, #000 20%, transparent 78%);
}

.hx-grid::before {
    content: '';
    position: absolute;
    inset: -72px;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
    background-size: 72px 72px;
    animation: hx-grid 16s linear infinite;
    will-change: transform;
}

@keyframes hx-grid {
    to { transform: translate3d(72px, 72px, 0); }
}

/* dönen ışık huzmesi */
.hx-beam {
    position: absolute;
    top: -55%;
    right: -30%;
    width: 110vmax;
    height: 110vmax;
    background: conic-gradient(from 0deg, transparent 0 80%, rgba(255, 49, 49, 0.16) 88%, transparent 96%);
    -webkit-mask-image: radial-gradient(circle, #000 25%, transparent 70%);
    mask-image: radial-gradient(circle, #000 25%, transparent 70%);
    animation: hx-spin 26s linear infinite;
    will-change: transform;
}

@keyframes hx-spin {
    to { transform: rotate(360deg); }
}

/* ---------- yerleşim ---------- */
.hx-wrap {
    position: relative;
    flex: 1;
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
    align-items: center;
    gap: clamp(24px, 4vw, 72px);
    padding-top: clamp(8px, 2vh, 24px);
    padding-bottom: clamp(16px, 3vh, 40px);
}

.hx-copy {
    position: relative;
    z-index: 2;
    min-width: 0;
}

/* ---------- üst etiket ---------- */
.hx-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    margin: 0 0 clamp(14px, 2.4vh, 24px);
    padding: 8px 16px 8px 14px;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.78);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.hx-pulse {
    position: relative;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--hx-red);
}

.hx-pulse::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: var(--hx-red);
    animation: hx-ping 1.8s ease-out infinite;
}

@keyframes hx-ping {
    0% { transform: scale(1); opacity: 0.7; }
    100% { transform: scale(3.2); opacity: 0; }
}

/* ---------- H1 ---------- */
.hx-title {
    margin: 0 0 clamp(18px, 3vh, 30px);
    font-family: var(--pr-serif, 'Montserrat', Georgia, serif);
    font-weight: 800;
    line-height: 1.02;
    letter-spacing: -0.02em;
}

.hx-line {
    display: block;
    overflow: hidden;
    padding: 0.04em 0.02em 0.1em;
}

.hx-line > span {
    display: block;
    font-size: clamp(2.4rem, 5.8vw, 5rem);
    transform: translateY(112%);
}

.hx-line--k > span {
    font-size: clamp(1rem, 2vw, 1.6rem);
    font-weight: 700;
    letter-spacing: 0.42em;
    text-transform: lowercase;
    color: var(--hx-red);
    padding-left: 0.1em;
}

.hx-line--brand > span {
    font-size: clamp(2.8rem, 6.2vw, 5.6rem);
    font-weight: 800;
    letter-spacing: -0.045em;
    line-height: 0.98;
    color: #fff;
}

.hx-line--accent {
    margin-top: 0.35em;
}

.hx-line--accent > span {
    font-size: clamp(0.78rem, 1.25vw, 1.05rem);
    font-weight: 400;
    letter-spacing: 0.42em;
    text-transform: uppercase;
    background-image: linear-gradient(100deg, #ff3131 0%, #ff3131 38%, #ffb3b3 50%, #ff3131 62%, #ff3131 100%);
    background-size: 260% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

/* yükleyici kalkınca harfler yükselir; parlama sürekli gezer */
body:not(.loading) .hx-line > span {
    animation: hx-rise 1.1s var(--hx-ease) forwards;
}

body:not(.loading) .hx-line--accent > span {
    animation: hx-rise 1.1s var(--hx-ease) 0.14s forwards, hx-shine 4.5s ease-in-out 1.4s infinite;
}

@keyframes hx-rise {
    to { transform: translateY(0); }
}

@keyframes hx-shine {
    0% { background-position: 130% 0; }
    100% { background-position: -30% 0; }
}

/* ---------- sade metin ---------- */
.hx-lede {
    margin: 0 0 clamp(20px, 3.4vh, 32px);
    max-width: 30em;
    font-size: clamp(1.05rem, 1.5vw, 1.3rem);
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.85);
}

.hx-points {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 22px;
    margin: clamp(20px, 3.4vh, 32px) 0 0;
    padding: 0;
    list-style: none;
}

.hx-points li {
    position: relative;
    padding-left: 18px;
    font-size: 0.86rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.66);
}

.hx-points li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.5em;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--hx-red);
    box-shadow: 0 0 10px rgba(255, 49, 49, 0.7);
}

/* ---------- dönen mesajlar (artık kullanılmıyor; CMS mesaj alanı için saklı) ---------- */
.hx-stage {
    display: grid;
    max-width: 600px;
}

.hx-slide {
    grid-area: 1 / 1;
    opacity: 0;
    visibility: hidden;
    transform: translateY(16px);
    transition: opacity 0.6s ease, transform 0.8s var(--hx-ease), visibility 0s linear 0.6s;
}

.hx-slide.is-active {
    opacity: 1;
    visibility: visible;
    transform: none;
    transition-delay: 0s;
}

.hx-slide-title {
    margin: 0 0 12px;
    font-family: var(--pr-serif, 'Montserrat', Georgia, serif);
    font-size: clamp(1.1rem, 1.7vw, 1.4rem);
    font-style: italic;
    font-weight: 500;
    line-height: 1.3;
    color: #ff6b73;
}

.hx-slide-desc {
    margin: 0 0 clamp(18px, 3vh, 28px);
    max-width: 54ch;
    font-size: clamp(0.98rem, 1.2vw, 1.1rem);
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.76);
}

.hx-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

/* her mesaj değişiminde öğeler sırayla belirir */
.hx-slide.is-active .hx-slide-title,
.hx-slide.is-active .hx-slide-desc,
.hx-slide.is-active .hx-actions {
    animation: hx-in 0.8s var(--hx-ease) both;
}

.hx-slide.is-active .hx-slide-desc { animation-delay: 0.08s; }
.hx-slide.is-active .hx-actions { animation-delay: 0.16s; }

@keyframes hx-in {
    from { opacity: 0; transform: translateY(18px); }
    to { opacity: 1; transform: none; }
}

/* ---------- sekmeler (ilerleme çubuklu) ---------- */
.hx-tabs {
    display: flex;
    gap: clamp(10px, 1.6vw, 22px);
    margin-top: clamp(22px, 4vh, 40px);
    max-width: 600px;
}

.hx-tab {
    position: relative;
    flex: 1 1 0;
    min-width: 0;
    padding: 16px 0 0;
    border: 0;
    background: none;
    color: rgba(255, 255, 255, 0.5);
    font: inherit;
    text-align: left;
    cursor: pointer;
    transition: color 0.3s ease;
}

.hx-tab:hover,
.hx-tab.is-active {
    color: #fff;
}

.hx-tab:focus-visible {
    outline: 2px solid var(--hx-red);
    outline-offset: 4px;
    border-radius: 4px;
}

.hx-tab-bar {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: rgba(255, 255, 255, 0.16);
    overflow: hidden;
}

.hx-tab-bar i {
    display: block;
    width: 100%;
    height: 100%;
    background: var(--hx-red);
    box-shadow: 0 0 10px rgba(255, 49, 49, 0.8);
    transform: scaleX(0);
    transform-origin: left center;
}

body:not(.loading) .hx-tab.is-active .hx-tab-bar i {
    animation: hx-fill var(--hx-dur) linear forwards;
}

@keyframes hx-fill {
    to { transform: scaleX(1); }
}

.hx-tab-num {
    display: block;
    margin-bottom: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.2em;
    color: var(--hx-red);
}

.hx-tab-label {
    display: block;
    overflow: hidden;
    font-size: 0.82rem;
    font-weight: 500;
    line-height: 1.35;
    white-space: nowrap;
    text-overflow: ellipsis;
}

/* üzerine gelince/odaklanınca yalnız ilerleme durur */
.hx.is-hold .hx-tab-bar i {
    animation-play-state: paused;
}

/* hero görünür değilken tüm hareket durur (performans/pil) */
.hx.is-paused *,
.hx.is-paused *::before,
.hx.is-paused *::after {
    animation-play-state: paused !important;
}

/* ---------- sağ: film şeritleri ---------- */
.hx-visual {
    position: relative;
    height: clamp(420px, 64vh, 680px);
    z-index: 1;
}

.hx-visual::before {
    content: '';
    position: absolute;
    inset: 8% 6%;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 49, 49, 0.28), transparent 68%);
    animation: hx-breathe 6s ease-in-out infinite alternate;
}

@keyframes hx-breathe {
    from { transform: scale(0.92); opacity: 0.7; }
    to { transform: scale(1.08); opacity: 1; }
}

.hx-reel {
    position: absolute;
    inset: -8% -4%;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    transform: rotate(7deg);
    translate: calc(var(--mx, 0) * 12px) calc(var(--my, 0) * 10px);
    -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 16%, #000 84%, transparent 100%);
    mask-image: linear-gradient(180deg, transparent 0, #000 16%, #000 84%, transparent 100%);
}

.hx-col {
    overflow: hidden;
    min-width: 0;
}

.hx-col:nth-child(2) {
    margin-top: 44px;
}

.hx-track {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding-bottom: 16px;
    will-change: transform;
}

.hx-col--up .hx-track {
    animation: hx-reel 46s linear infinite;
}

.hx-col--down .hx-track {
    animation: hx-reel 58s linear infinite reverse;
}

.hx-col:nth-child(3) .hx-track {
    animation-duration: 52s;
}

@keyframes hx-reel {
    to { transform: translate3d(0, -50%, 0); }
}

.hx-frame {
    position: relative;
    flex: none;
    margin: 0;
    aspect-ratio: 9 / 16;
    overflow: hidden;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: #111;
    box-shadow: 0 24px 40px -22px rgba(0, 0, 0, 0.9);
}

.hx-frame img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hx-frame::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 55%, rgba(0, 0, 0, 0.55)), linear-gradient(135deg, rgba(255, 49, 49, 0.12), transparent 45%);
    pointer-events: none;
}

/* ---------- yüzen cam kartlar ---------- */
.hx-chipset {
    position: absolute;
    inset: 0;
    z-index: 3;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s ease, visibility 0s linear 0.5s;
}

.hx-chipset.is-active {
    opacity: 1;
    visibility: visible;
    transition-delay: 0s;
}

.hx-chip {
    position: absolute;
    display: flex;
    align-items: center;
    gap: 12px;
    max-width: 78%;
    padding: 12px 18px 12px 12px;
    font-size: 0.86rem;
    font-weight: 600;
    line-height: 1.25;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 16px;
    background: rgba(12, 12, 12, 0.7);
    backdrop-filter: blur(14px) saturate(1.2);
    -webkit-backdrop-filter: blur(14px) saturate(1.2);
    box-shadow: 0 18px 40px -18px rgba(0, 0, 0, 0.9);
    animation: hx-float 6s ease-in-out infinite alternate;
    translate: calc(var(--mx, 0) * -16px) calc(var(--my, 0) * -12px);
}

.hx-chip i {
    flex: none;
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(180deg, #f01a25, #d11f1f);
    font-size: 0.9rem;
    box-shadow: 0 8px 18px -8px rgba(255, 49, 49, 0.8);
}

.hx-chip:nth-child(1) { top: 12%; left: -6%; }
.hx-chip:nth-child(2) { top: 46%; right: -3%; animation-duration: 7.5s; animation-delay: -2s; }
.hx-chip:nth-child(3) { bottom: 10%; left: 4%; animation-duration: 6.8s; animation-delay: -4s; }

@keyframes hx-float {
    from { transform: translateY(-8px); }
    to { transform: translateY(10px); }
}

/* ---------- alt şerit: kaydır + sosyal ---------- */
.hx-foot {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding-bottom: clamp(14px, 2.4vh, 26px);
}

.hx-scroll {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.62);
    text-decoration: none;
    transition: color 0.25s ease;
}

.hx-scroll:hover {
    color: #fff;
}

.hx-scroll-mouse {
    position: relative;
    width: 22px;
    height: 34px;
    border: 1.5px solid rgba(255, 255, 255, 0.45);
    border-radius: 12px;
}

.hx-scroll-mouse i {
    position: absolute;
    top: 7px;
    left: 50%;
    width: 3px;
    height: 7px;
    margin-left: -1.5px;
    border-radius: 2px;
    background: var(--hx-red);
    animation: hx-wheel 1.7s ease-in-out infinite;
}

@keyframes hx-wheel {
    0% { transform: translateY(0); opacity: 1; }
    80%, 100% { transform: translateY(12px); opacity: 0; }
}

.hx-social {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.hx-social a {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    color: rgba(255, 255, 255, 0.78);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.04);
    text-decoration: none;
    transition: transform 0.35s var(--hx-ease), background 0.25s ease, border-color 0.25s ease, color 0.25s ease;
}

.hx-social a:hover,
.hx-social a:focus-visible {
    color: #fff;
    border-color: var(--hx-red);
    background: var(--hx-red);
    transform: translateY(-3px);
}

/* ---------- anahtar kelime bandı ---------- */
.hx-marquee {
    position: relative;
    z-index: 2;
    overflow: hidden;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.025);
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
    mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}

.hx-marquee-track {
    display: flex;
    width: max-content;
    padding: 12px 0;
    animation: hx-marquee 38s linear infinite;
    will-change: transform;
}

.hx-marquee-group {
    display: flex;
    flex: none;
    align-items: center;
    gap: clamp(20px, 3vw, 44px);
    padding-right: clamp(20px, 3vw, 44px);
}

.hx-marquee-group span {
    font-family: var(--pr-serif, 'Montserrat', Georgia, serif);
    font-size: clamp(1.4rem, 3.2vw, 2.5rem);
    font-weight: 600;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    white-space: nowrap;
    color: transparent;
    -webkit-text-stroke: 1px rgba(255, 255, 255, 0.42);
}

.hx-marquee-group b {
    color: var(--hx-red);
    font-size: 0.9rem;
}

@keyframes hx-marquee {
    to { transform: translate3d(-50%, 0, 0); }
}

/* ---------- tablet / telefon ---------- */
@media (max-width: 1024px) {
    .hx-wrap {
        grid-template-columns: minmax(0, 1fr);
        align-items: start;
    }

    /* film şeritleri metnin arkasına, soluk bir dekor olarak geçer */
    .hx-visual {
        position: absolute;
        inset: 0;
        height: auto;
        opacity: 0.3;
        pointer-events: none;
    }

    .hx-visual::after {
        content: '';
        position: absolute;
        inset: 0;
        background: linear-gradient(90deg, #050505 8%, rgba(5, 5, 5, 0.55) 60%, transparent);
    }

    .hx-reel {
        inset: -6% -34% -6% 38%;
    }

    .hx-chipset {
        display: none;
    }

    .hx-stage,
    .hx-tabs {
        max-width: 640px;
    }
}

@media (max-width: 640px) {
    .hx {
        min-height: 0;
        padding-top: 84px;
    }

    .hx-eyebrow {
        font-size: 0.62rem;
        letter-spacing: 0.16em;
    }

    .hx-tab-label {
        font-size: 0.74rem;
    }

    .hx-scroll {
        display: none;
    }

    .hx-foot {
        justify-content: flex-start;
        padding-bottom: 18px;
    }

    .hx-social {
        flex-wrap: nowrap;
        gap: 6px;
    }

    .hx-social a {
        width: 38px;
        height: 38px;
    }

    .hx-actions .op-btn {
        flex: 1 1 auto;
        justify-content: center;
    }
}

/* ---------- hareketi azalt ---------- */
@media (prefers-reduced-motion: reduce) {
    .hx *,
    .hx *::before,
    .hx *::after {
        animation: none !important;
        transition: none !important;
    }

    .hx-line > span {
        transform: none;
    }

    .hx-tab.is-active .hx-tab-bar i {
        transform: scaleX(1);
    }

    .hx-reel,
    .hx-chip {
        translate: none;
    }
}

/* JS kapalıysa başlık yine görünsün */
@media (scripting: none) {
    .hx-line > span {
        transform: none;
    }
}
