/*
====================================================
KADIM EXPERIENCE ENGINE — Hero Scenes
Migrated layout tokens from css/eski.css
====================================================
*/

:root {
    --astra-menu-offset: 140px;
    --title-size: clamp(2.5rem, 5vw, 5.5rem);
    --desc-size: clamp(1.1rem, 2vw, 1.8rem);
    --icon-size: clamp(70px, 8vw, 100px);
    --card-padding: clamp(30px, 5vw, 80px) clamp(20px, 4vw, 50px);
    --card-width: min(90%, 1100px);
}

.kadim-scroll-track {
    background: transparent;
    position: relative;
    width: 100%;
}

.kadim-sticky-hero,
#hero-stage {
    position: sticky;
    top: var(--astra-menu-offset);
    width: 100%;
    height: calc(100vh - var(--astra-menu-offset));
    display: flex;
    align-items: center;
    justify-content: center;
    perspective: 2500px;
    transform-style: preserve-3d;
    overflow: hidden;
    z-index: 10;
    background: #050505;
}

#story-canvas {
    mix-blend-mode: screen;
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 5;
    /* 026d: allow vertical touch pan → document scroll → Hero timeline */
    touch-action: pan-y;
}

.atmosphere-layer {
    position: absolute;
    inset: -20%;
    z-index: 1;
    pointer-events: none;
    background: radial-gradient(circle at center, rgba(0, 0, 0, 0.4), transparent 70%);
    filter: blur(100px);
}

.light-orb {
    position: absolute;
    width: 50vw;
    height: 50vw;
    max-width: 600px;
    max-height: 600px;
    border-radius: 50%;
    filter: blur(80px);
    mix-blend-mode: screen;
    z-index: 2;
    pointer-events: none;
    will-change: transform, opacity;
}

.orb1 {
    background: rgba(255, 193, 54, 0.2);
    top: 15%;
    left: 15%;
}

.orb2 {
    background: rgba(180, 110, 70, 0.15);
    bottom: 15%;
    right: 15%;
}

.artifact {
    position: absolute;
    width: clamp(80px, 10vw, 150px);
    height: clamp(80px, 10vw, 150px);
    background: radial-gradient(circle, rgba(255, 193, 54, 0.6), transparent 70%);
    border-radius: 50%;
    z-index: 10;
    pointer-events: none;
}

.a1 { top: -10%; left: -5%; transform: translateZ(-60px); }
.a2 { bottom: -10%; right: -5%; transform: translateZ(60px); }
.a3 { top: 50%; left: 50%; transform: translateZ(0); opacity: 0.8; }

.scene-card {
    position: absolute;
    transform-style: preserve-3d;
    z-index: 50;
    width: var(--card-width);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    will-change: transform, opacity;
    /* 026d: visual only — must not steal tablet touch from page scroll */
    pointer-events: none;
}

.glass-panel {
    width: 100%;
    padding: var(--card-padding);
    background: rgba(10, 10, 10, 0.65);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 1px solid rgba(255, 193, 54, 0.3);
    border-radius: 30px;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.8);
    text-align: center;
    transform-style: preserve-3d;
}

.scene-gallery-cta .glass-panel {
    background: rgba(255, 193, 54, 0.05);
    border-color: rgba(255, 193, 54, 0.8);
}

.scene-icon svg {
    width: var(--icon-size);
    height: var(--icon-size);
    filter: drop-shadow(0 0 30px rgba(255, 193, 54, 0.6));
    margin-bottom: 20px;
}

.title-stack {
    position: relative;
    transform-style: preserve-3d;
    margin-bottom: 30px;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    min-height: calc(var(--title-size) * 2.4);
}

.title-back,
.title-main,
.title-front {
    position: absolute;
    font-family: Georgia, "Times New Roman", serif;
    font-size: var(--title-size);
    line-height: 1.2;
    text-align: center;
    width: 100%;
    white-space: normal;
    word-wrap: break-word;
}

.title-back { transform: translateZ(-30px); opacity: 0.15; color: #ffc136; }
.title-main {
    transform: translateZ(0);
    font-weight: 700;
    color: #ffffff;
    text-shadow: 0 0 20px rgba(255, 193, 54, 0.6);
    position: relative;
}
.title-front { transform: translateZ(30px); opacity: 0.4; color: #ffffff; }

/* Gallery CTA scene — same title language as other scenes (no gold override) */
.scene-gallery-cta .title-main {
    color: #ffffff;
    text-shadow: 0 0 20px rgba(255, 193, 54, 0.6);
}

.kadim-desc {
    color: #d4b88a;
    font-size: var(--desc-size);
    transform: translateZ(40px);
    font-weight: 300;
    line-height: 1.5;
    /* Readable on light final frames and dark scenes */
    text-shadow:
        0 1px 2px rgba(0, 0, 0, 0.95),
        0 0 14px rgba(0, 0, 0, 0.65);
}

html.kadim-env-css .orb1,
html.kadim-env-css .orb2 {
    animation: kadim-orb-drift 7s ease-in-out infinite alternate;
}

@keyframes kadim-orb-drift {
    from { transform: translate3d(0, 0, 0) scale(1); }
    to { transform: translate3d(8%, -6%, 0) scale(1.35); }
}

/* Spinner removed — camouflage wait uses breath in kadim.gallery.transition.css (C2) */
