/*
====================================================

KADIM EXPERIENCE ENGINE
File    : kadim.engine.css
Version : 1.0.0-alpha
Role    : WordPress-safe base layout

Reference: css/eski.css

====================================================
*/

:root {
    --astra-menu-offset: 140px;
    --kadim-bg: #050505;
    --kadim-ink: #d4b88a;
    --kadim-gold: #ffc136;
    --kadim-brown: #8b5e3c;
    --kadim-panel: rgba(10, 10, 10, 0.65);
    --kadim-border: rgba(255, 193, 54, 0.3);
    --kadim-title-size: clamp(2.5rem, 5vw, 5.5rem);
    --kadim-desc-size: clamp(1.1rem, 2vw, 1.8rem);
    --kadim-icon-size: clamp(70px, 8vw, 100px);
    --kadim-card-padding: clamp(30px, 5vw, 80px) clamp(20px, 4vw, 50px);
    --kadim-card-width: min(90%, 1100px);
    /* Responsive overrides: css/kadim.responsive.css (Experience Root) */
}

body.kadim-gallery-transition,
body.kadim-gallery-scroll-lock,
body.kadim-hero-active,
body.kadim-hero-pinned {
    overflow-x: hidden;
}

.kadim-scroll-track {
    position: relative;
    width: 100%;
    min-height: 700vh;
    background: transparent;
}

/* Fixed during hero session (see kadim.gallery.transition.css). Default sticky for idle. */
.kadim-sticky-hero,
#hero-stage {
    position: sticky;
    top: var(--astra-menu-offset);
    width: 100%;
    height: calc(100vh - var(--astra-menu-offset));
    min-height: 420px;
    overflow: hidden;
    background: var(--kadim-bg);
    perspective: 2500px;
    transform-style: preserve-3d;
    z-index: 10;
    /* 026d: surface must not claim exclusive touch (timeline = page scroll) */
    touch-action: pan-y;
}

#story-canvas {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    mix-blend-mode: screen;
    z-index: 5;
    /* 026d: pan-y — touch must scroll the page (timeline owner), like wheel.
       touch-action:none blocked tablet drag on the Hero surface. */
    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 {
    top: 15%;
    left: 15%;
    background: rgba(255, 193, 54, 0.2);
}

.orb2 {
    right: 15%;
    bottom: 15%;
    background: rgba(180, 110, 70, 0.15);
}

.artifact {
    position: absolute;
    width: clamp(80px, 10vw, 150px);
    height: clamp(80px, 10vw, 150px);
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 193, 54, 0.6), transparent 70%);
    z-index: 10;
    pointer-events: none;
    will-change: transform, filter, opacity;
}

.a1 {
    top: -10%;
    left: -5%;
    transform: translateZ(-60px);
}

.a2 {
    right: -5%;
    bottom: -10%;
    transform: translateZ(60px);
}

.a3 {
    top: 50%;
    left: 50%;
    opacity: 0.8;
    transform: translateZ(0);
}

.scene-card {
    position: absolute;
    width: var(--kadim-card-width);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform-style: preserve-3d;
    will-change: transform, opacity;
    z-index: 50;
    /* 026d: visual only — must not steal tablet touch from page scroll */
    pointer-events: none;
}

.glass-panel {
    width: 100%;
    padding: var(--kadim-card-padding);
    background: var(--kadim-panel);
    border: 1px solid var(--kadim-border);
    border-radius: 30px;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.8);
    text-align: center;
    transform-style: preserve-3d;
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
}

.scene-icon svg {
    width: var(--kadim-icon-size);
    height: var(--kadim-icon-size);
    margin-bottom: 20px;
    filter: drop-shadow(0 0 30px rgba(255, 193, 54, 0.6));
}

.title-stack {
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 30px;
    transform-style: preserve-3d;
}

.title-back,
.title-main,
.title-front {
    position: absolute;
    width: 100%;
    font-family: "Playfair Display", Georgia, serif;
    font-size: var(--kadim-title-size);
    line-height: 1.2;
    text-align: center;
    white-space: normal;
    overflow-wrap: break-word;
}

.title-back {
    color: var(--kadim-gold);
    opacity: 0.15;
    transform: translateZ(-30px);
}

.title-main {
    position: relative;
    color: #fff;
    font-weight: 700;
    text-shadow: 0 0 20px rgba(255, 193, 54, 0.6);
    transform: translateZ(0);
}

.title-front {
    color: #fff;
    opacity: 0.4;
    transform: translateZ(30px);
}

.scene-gallery-cta .title-main {
    color: #fff;
    text-shadow: 0 0 20px rgba(255, 193, 54, 0.6);
}

.kadim-desc {
    color: #d4b88a;
    font-family: Poppins, Arial, sans-serif;
    font-size: var(--kadim-desc-size);
    font-weight: 300;
    line-height: 1.5;
    transform: translateZ(40px);
    text-shadow:
        0 1px 2px rgba(0, 0, 0, 0.95),
        0 0 14px rgba(0, 0, 0, 0.65);
}

#kadim-gallery-trigger {
    display: block;
    width: 100%;
    height: 1px;
}

@media (max-width: 768px) {
    .kadim-sticky-hero,
    #hero-stage {
        min-height: 100svh;
    }

    .glass-panel {
        border-radius: 22px;
    }
}
