/* mystical.boo - Pop-Art Oracle Chamber */
/* Colors: #d8cfe8 #2d1654 #f0ece4 #0d0d0d #f7e733 #e8365d #1a1a1a #b8a89a */

/* ============================================
   RESET & BASE
   ============================================ */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    overflow: hidden;
    height: 100%;
}

body {
    height: 100%;
    overflow: hidden;
    font-family: 'Space Grotesk', sans-serif;
    background: #0d0d0d;
    color: #f0ece4;
}

/* ============================================
   HORIZONTAL SCROLL SYSTEM
   ============================================ */
#scroll-viewport {
    width: 100vw;
    height: 100vh;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

#scroll-canvas {
    display: flex;
    flex-direction: row;
    width: max-content;
    height: 100vh;
}

/* Hide scrollbar */
#scroll-viewport::-webkit-scrollbar {
    display: none;
}
#scroll-viewport {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* ============================================
   PANELS - BASE
   ============================================ */
.panel {
    width: 100vw;
    height: 100vh;
    position: relative;
    scroll-snap-align: start;
    overflow: hidden;
    flex-shrink: 0;
}

.panel-content {
    position: relative;
    z-index: 3;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

/* ============================================
   CSS-GENERATED MARBLE TEXTURES
   ============================================ */
.marble-texture {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    background:
        linear-gradient(125deg, rgba(240,236,228,0.15) 0%, transparent 40%),
        linear-gradient(245deg, rgba(216,207,232,0.12) 0%, transparent 50%),
        linear-gradient(65deg, rgba(184,168,154,0.1) 0%, transparent 35%),
        radial-gradient(ellipse at 20% 50%, rgba(240,236,228,0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(216,207,232,0.06) 0%, transparent 40%),
        radial-gradient(ellipse at 60% 80%, rgba(184,168,154,0.05) 0%, transparent 45%),
        linear-gradient(180deg, #1a1a1a 0%, #0d0d0d 100%);
}

.marble-texture::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        repeating-linear-gradient(
            87deg,
            transparent,
            transparent 40px,
            rgba(240,236,228,0.03) 40px,
            rgba(240,236,228,0.03) 41px
        ),
        repeating-linear-gradient(
            93deg,
            transparent,
            transparent 60px,
            rgba(184,168,154,0.025) 60px,
            rgba(184,168,154,0.025) 61px
        );
}

.marble-dark {
    background:
        linear-gradient(125deg, rgba(45,22,84,0.2) 0%, transparent 40%),
        linear-gradient(245deg, rgba(216,207,232,0.08) 0%, transparent 50%),
        linear-gradient(65deg, rgba(184,168,154,0.06) 0%, transparent 35%),
        radial-gradient(ellipse at 30% 60%, rgba(45,22,84,0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 70% 30%, rgba(216,207,232,0.04) 0%, transparent 40%),
        linear-gradient(180deg, #0d0d0d 0%, #1a1a1a 50%, #0d0d0d 100%);
}

.marble-light {
    background:
        linear-gradient(125deg, rgba(240,236,228,0.4) 0%, transparent 40%),
        linear-gradient(245deg, rgba(216,207,232,0.3) 0%, transparent 50%),
        linear-gradient(65deg, rgba(184,168,154,0.2) 0%, transparent 35%),
        radial-gradient(ellipse at 20% 50%, rgba(240,236,228,0.2) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(216,207,232,0.15) 0%, transparent 40%),
        linear-gradient(180deg, #f0ece4 0%, #d8cfe8 50%, #f0ece4 100%);
}

.marble-warm {
    background:
        linear-gradient(125deg, rgba(184,168,154,0.3) 0%, transparent 40%),
        linear-gradient(245deg, rgba(240,236,228,0.2) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 50%, rgba(45,22,84,0.1) 0%, transparent 60%),
        linear-gradient(180deg, #1a1a1a 0%, #0d0d0d 100%);
}

/* ============================================
   BEN-DAY DOTS (HALFTONE)
   ============================================ */
.ben-day-dots {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    opacity: 0.08;
    background-image: radial-gradient(circle, #d8cfe8 1.5px, transparent 1.5px);
    background-size: 12px 12px;
    pointer-events: none;
}

.dots-gold {
    background-image: radial-gradient(circle, #f7e733 1.5px, transparent 1.5px);
    opacity: 0.06;
}

.dots-violet {
    background-image: radial-gradient(circle, #2d1654 1.5px, transparent 1.5px);
    opacity: 0.12;
}

.dots-pink {
    background-image: radial-gradient(circle, #e8365d 1.5px, transparent 1.5px);
    opacity: 0.07;
}

/* ============================================
   HALFTONE OVERLAY
   ============================================ */
.halftone-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    opacity: 0.04;
    background-image: radial-gradient(circle, #f0ece4 2px, transparent 2px);
    background-size: 8px 8px;
    pointer-events: none;
}

.halftone-pink {
    background-image: radial-gradient(circle, #e8365d 1.5px, transparent 1.5px);
    opacity: 0.05;
}

.halftone-gold {
    background-image: radial-gradient(circle, #f7e733 1.5px, transparent 1.5px);
    opacity: 0.06;
}

/* ============================================
   TYPOGRAPHY
   ============================================ */
.title-main {
    font-family: 'Bangers', cursive;
    font-size: clamp(48px, 8vw, 120px);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #f7e733;
    text-shadow: 3px 3px 0 #0d0d0d, -1px -1px 0 #0d0d0d;
    line-height: 1;
    text-align: center;
}

.title-boo {
    color: #e8365d;
    display: inline;
}

.section-title {
    font-family: 'Bangers', cursive;
    font-size: clamp(36px, 6vw, 90px);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #f7e733;
    text-shadow: 3px 3px 0 #0d0d0d;
    line-height: 1.1;
    text-align: center;
}

.title-dark {
    color: #2d1654;
    text-shadow: 2px 2px 0 rgba(0,0,0,0.15);
}

/* ============================================
   PANEL 1: INVOCATION GATE
   ============================================ */
.panel-invocation {
    background: #0d0d0d;
}

.invocation-content {
    gap: 30px;
}

.ghost-eye {
    width: clamp(150px, 25vw, 300px);
    animation: eyeFloat 4s ease-in-out infinite;
}

.eye-svg {
    width: 100%;
    height: auto;
    filter: drop-shadow(0 0 20px rgba(247,231,51,0.3));
}

.eye-glow {
    animation: glowPulse 2s ease-in-out infinite;
}

@keyframes eyeFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}

@keyframes glowPulse {
    0%, 100% { opacity: 0.2; }
    50% { opacity: 0.7; }
}

.invocation-text {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(14px, 2vw, 22px);
    font-weight: 300;
    letter-spacing: 0.12em;
    text-transform: lowercase;
    color: #d8cfe8;
    text-align: center;
}

.scroll-hint {
    display: flex;
    align-items: center;
    gap: 12px;
    opacity: 0.6;
    animation: hintPulse 2s ease-in-out infinite;
    margin-top: 40px;
}

.hint-arrow {
    font-size: 28px;
    color: #f7e733;
    animation: arrowSlide 1.5s ease-in-out infinite;
}

.hint-text {
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: #b8a89a;
}

@keyframes hintPulse {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 0.8; }
}

@keyframes arrowSlide {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(10px); }
}

/* ============================================
   PANEL 2: MARBLE CODEX
   ============================================ */
.panel-codex {
    background: #0d0d0d;
}

.codex-content {
    padding: 60px;
}

.codex-columns {
    display: flex;
    width: 100%;
    height: 100%;
    align-items: center;
    gap: 60px;
}

.codex-left {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
}

.codex-right {
    flex: 1;
    display: flex;
    gap: 30px;
    align-items: center;
    justify-content: center;
}

.pop-art-border {
    width: 80%;
    height: 4px;
    background: repeating-linear-gradient(
        90deg,
        #f7e733 0px,
        #f7e733 20px,
        #e8365d 20px,
        #e8365d 40px,
        #2d1654 40px,
        #2d1654 60px
    );
}

.oracle-card {
    transition: transform 0.4s ease, filter 0.4s ease;
    cursor: pointer;
    filter: drop-shadow(4px 4px 0 #0d0d0d);
}

.oracle-card:hover {
    transform: translateY(-10px) rotate(-3deg);
    filter: drop-shadow(8px 8px 0 rgba(247,231,51,0.3));
}

.card-svg {
    width: clamp(120px, 15vw, 200px);
    height: auto;
}

/* ============================================
   PANEL 3: SPIRIT FREQUENCY
   ============================================ */
.panel-frequency {
    background: #f0ece4;
}

.frequency-content {
    gap: 40px;
}

.frequency-visualizer {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    height: 200px;
    padding: 0 20px;
}

.freq-bar {
    width: clamp(20px, 4vw, 50px);
    background: #2d1654;
    border: 3px solid #0d0d0d;
    min-height: 20px;
    height: 20px;
    transition: height 0.3s ease;
    position: relative;
}

.freq-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: radial-gradient(circle, #f7e733 1px, transparent 1px);
    background-size: 6px 6px;
    opacity: 0.3;
}

.freq-bar:nth-child(even) {
    background: #e8365d;
}

.freq-bar:nth-child(3n) {
    background: #f7e733;
}

.frequency-counter {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.counter-label {
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    letter-spacing: 0.2em;
    color: #b8a89a;
    text-transform: uppercase;
}

.counter-number {
    font-family: 'Bangers', cursive;
    font-size: clamp(48px, 8vw, 100px);
    color: #2d1654;
    text-shadow: 2px 2px 0 rgba(0,0,0,0.1);
    letter-spacing: 0.06em;
}

.mantra-text {
    display: flex;
    gap: 20px;
}

.mantra-text span {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(14px, 1.8vw, 20px);
    font-weight: 300;
    letter-spacing: 0.1em;
    color: #2d1654;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.mantra-text span.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ============================================
   PANEL 4: GHOST GALLERY
   ============================================ */
.panel-gallery {
    background: #1a1a1a;
}

.gallery-content {
    gap: 40px;
}

.ghost-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    max-width: 800px;
}

.ghost-cell {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    cursor: pointer;
    transition: transform 0.4s ease;
}

.ghost-cell:hover {
    transform: scale(1.08) translateY(-5px);
}

.ghost-cell:hover .ghost-svg {
    filter: drop-shadow(0 0 15px rgba(247,231,51,0.4));
}

.ghost-svg {
    width: clamp(80px, 12vw, 140px);
    height: auto;
    transition: filter 0.4s ease;
    filter: drop-shadow(3px 3px 0 #0d0d0d);
}

.ghost-label {
    font-family: 'Bangers', cursive;
    font-size: clamp(14px, 1.5vw, 20px);
    letter-spacing: 0.08em;
    color: #f7e733;
    text-shadow: 2px 2px 0 #0d0d0d;
    text-align: center;
}

/* ============================================
   PANEL 5: MEDITATION CHAMBER
   ============================================ */
.panel-meditation {
    background: #1a1a1a;
}

.meditation-content {
    gap: 50px;
}

.meditation-circle {
    position: relative;
    width: clamp(200px, 30vw, 350px);
    height: clamp(200px, 30vw, 350px);
    display: flex;
    align-items: center;
    justify-content: center;
}

.circle-ring {
    position: absolute;
    border-radius: 50%;
    border: 3px solid;
}

.ring-outer {
    width: 100%;
    height: 100%;
    border-color: #2d1654;
    animation: ringRotate 12s linear infinite;
}

.ring-middle {
    width: 72%;
    height: 72%;
    border-color: #e8365d;
    animation: ringRotate 8s linear infinite reverse;
}

.ring-inner {
    width: 44%;
    height: 44%;
    border-color: #f7e733;
    animation: ringRotate 5s linear infinite;
}

.circle-core {
    position: relative;
    z-index: 2;
}

.breathe-text {
    font-family: 'Bangers', cursive;
    font-size: clamp(20px, 3vw, 36px);
    color: #f7e733;
    text-shadow: 2px 2px 0 #0d0d0d;
    letter-spacing: 0.1em;
    animation: breatheScale 6s ease-in-out infinite;
}

@keyframes ringRotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes breatheScale {
    0%, 100% { transform: scale(1); opacity: 0.6; }
    50% { transform: scale(1.15); opacity: 1; }
}

.ring-outer::before,
.ring-middle::before,
.ring-inner::before {
    content: '';
    position: absolute;
    top: -6px;
    left: 50%;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    transform: translateX(-50%);
}

.ring-outer::before { background: #2d1654; }
.ring-middle::before { background: #e8365d; }
.ring-inner::before { background: #f7e733; }

.meditation-mantra {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.mantra-line {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(14px, 1.8vw, 20px);
    font-weight: 300;
    letter-spacing: 0.12em;
    color: #d8cfe8;
    opacity: 0;
    transform: translateY(15px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.mantra-line.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ============================================
   PANEL 6: ORACLE SPEAKS
   ============================================ */
.panel-oracle {
    background: #0d0d0d;
}

.oracle-content {
    flex-direction: row;
    gap: 60px;
}

.oracle-speech-bubble {
    position: relative;
    max-width: 400px;
}

.bubble-shape {
    background: #f0ece4;
    border: 4px solid #0d0d0d;
    border-radius: 30px;
    padding: 40px;
    position: relative;
    box-shadow: 6px 6px 0 #0d0d0d;
}

.bubble-tail {
    position: absolute;
    bottom: -20px;
    right: 60px;
    width: 0;
    height: 0;
    border-left: 20px solid transparent;
    border-right: 20px solid transparent;
    border-top: 25px solid #f0ece4;
    filter: drop-shadow(3px 3px 0 #0d0d0d);
}

.oracle-proclamation {
    font-family: 'Bangers', cursive;
    font-size: clamp(28px, 4vw, 48px);
    color: #2d1654;
    text-shadow: 2px 2px 0 rgba(0,0,0,0.1);
    letter-spacing: 0.04em;
    margin-bottom: 15px;
    line-height: 1.1;
}

.oracle-message {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(14px, 1.5vw, 18px);
    color: #1a1a1a;
    font-weight: 400;
    line-height: 1.6;
    font-style: italic;
}

.oracle-figure {
    flex-shrink: 0;
}

.oracle-svg {
    width: clamp(140px, 18vw, 240px);
    height: auto;
    filter: drop-shadow(4px 4px 0 #0d0d0d);
    animation: oracleFloat 5s ease-in-out infinite;
}

@keyframes oracleFloat {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    25% { transform: translateY(-8px) rotate(1deg); }
    75% { transform: translateY(5px) rotate(-1deg); }
}

/* ============================================
   PANEL 7: THRESHOLD
   ============================================ */
.panel-threshold {
    background: #f0ece4;
}

.threshold-content {
    padding: 40px;
}

.threshold-gate {
    display: flex;
    align-items: stretch;
    height: 80vh;
    gap: 40px;
}

.gate-pillar {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 40px;
}

.pillar-segment {
    flex: 1;
    background: #2d1654;
    border: 3px solid #0d0d0d;
    position: relative;
}

.pillar-segment::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: radial-gradient(circle, #f7e733 1px, transparent 1px);
    background-size: 8px 8px;
    opacity: 0.2;
}

.gate-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 30px;
    padding: 40px;
}

.threshold-text {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(14px, 1.8vw, 20px);
    font-weight: 300;
    color: #2d1654;
    text-align: center;
    letter-spacing: 0.08em;
    line-height: 1.8;
}

.threshold-symbol {
    width: clamp(80px, 12vw, 150px);
    animation: symbolSpin 20s linear infinite;
}

.symbol-svg {
    width: 100%;
    height: auto;
}

@keyframes symbolSpin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ============================================
   PANEL 8: THE RETURN
   ============================================ */
.panel-return {
    background: #0d0d0d;
}

.return-content {
    gap: 30px;
}

.return-portal {
    position: relative;
    width: clamp(150px, 22vw, 280px);
    height: clamp(150px, 22vw, 280px);
    display: flex;
    align-items: center;
    justify-content: center;
}

.portal-ring {
    position: absolute;
    border-radius: 50%;
    border: 3px solid #f7e733;
    animation: portalPulse 3s ease-in-out infinite;
}

.portal-ring:nth-child(1) {
    width: 100%;
    height: 100%;
    animation-delay: 0s;
}

.portal-ring:nth-child(2) {
    width: 70%;
    height: 70%;
    border-color: #e8365d;
    animation-delay: 0.5s;
}

.portal-ring:nth-child(3) {
    width: 40%;
    height: 40%;
    border-color: #2d1654;
    animation-delay: 1s;
}

@keyframes portalPulse {
    0%, 100% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.1); opacity: 1; }
}

.return-title {
    font-size: clamp(60px, 12vw, 160px);
    color: #e8365d;
    text-shadow: 4px 4px 0 #0d0d0d;
}

.return-text {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(13px, 1.5vw, 18px);
    font-weight: 300;
    color: #d8cfe8;
    text-align: center;
    letter-spacing: 0.08em;
    line-height: 1.8;
}

.return-button {
    font-family: 'Bangers', cursive;
    font-size: clamp(16px, 2vw, 24px);
    letter-spacing: 0.06em;
    color: #0d0d0d;
    background: #f7e733;
    border: 3px solid #0d0d0d;
    padding: 15px 40px;
    cursor: pointer;
    box-shadow: 4px 4px 0 #0d0d0d;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
    text-transform: uppercase;
}

.return-button:hover {
    transform: translate(-2px, -2px);
    box-shadow: 6px 6px 0 #0d0d0d;
    background: #e8365d;
    color: #f0ece4;
}

.return-button:active {
    transform: translate(2px, 2px);
    box-shadow: 2px 2px 0 #0d0d0d;
}

/* ============================================
   NAVIGATION DOTS
   ============================================ */
.panel-nav {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 100;
    display: flex;
    gap: 12px;
    padding: 12px 20px;
    background: rgba(13,13,13,0.8);
    border: 2px solid rgba(247,231,51,0.3);
    border-radius: 30px;
    backdrop-filter: blur(10px);
}

.nav-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 2px solid #f7e733;
    background: transparent;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
    padding: 0;
}

.nav-dot:hover {
    background: rgba(247,231,51,0.4);
    transform: scale(1.2);
}

.nav-dot.active {
    background: #f7e733;
    box-shadow: 0 0 10px rgba(247,231,51,0.5);
}

/* ============================================
   DOMAIN LABEL
   ============================================ */
.domain-label {
    position: fixed;
    top: 20px;
    right: 30px;
    z-index: 100;
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: #8c6db5;
    opacity: 0.6;
    transition: opacity 0.3s ease;
    mix-blend-mode: difference;
}

.domain-label:hover {
    opacity: 1;
}

/* ============================================
   COUNTER-ANIMATION (POP-ART ENTRANCE)
   ============================================ */
.panel.in-view .section-title {
    animation: popIn 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55) forwards;
}

@keyframes popIn {
    0% { transform: scale(0.3) rotate(-5deg); opacity: 0; }
    60% { transform: scale(1.1) rotate(2deg); opacity: 1; }
    100% { transform: scale(1) rotate(0deg); opacity: 1; }
}

/* Ghost hover shake */
.ghost-cell:hover .ghost-svg {
    animation: ghostShake 0.4s ease-in-out;
}

@keyframes ghostShake {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(-5deg); }
    75% { transform: rotate(5deg); }
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    .codex-columns {
        flex-direction: column;
        gap: 30px;
    }
    
    .codex-right {
        flex-direction: row;
        gap: 15px;
    }

    .ghost-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    .oracle-content {
        flex-direction: column;
        gap: 30px;
    }

    .threshold-gate {
        height: 60vh;
        gap: 20px;
    }

    .gate-pillar {
        width: 25px;
    }

    .panel-content {
        padding: 20px;
    }
}
