/* adhoc.quest - Surreal Labyrinth */
:root {
    --abyss: #0D0F1A;
    --twilight: #1A1D2E;
    --copper: #D4763B;
    --teal: #2EC4B6;
    --sulfur: #E8D44D;
    --bone: #E8E2D6;
    --dust: #9B9689;
    --obsidian: #2A2D3A;
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    background: linear-gradient(135deg, var(--abyss) 0%, var(--twilight) 40%, #1E2235 100%);
    color: var(--bone);
    font-family: 'Crimson Pro', serif;
    overflow-x: hidden;
}

.compass {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 100;
    cursor: pointer;
    animation: compassPulse 4s ease-in-out infinite;
}

@keyframes compassPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.compass-menu {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 180px;
    height: 180px;
    z-index: 99;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

.compass-menu.active { opacity: 1; pointer-events: all; }

.cm-item {
    position: absolute;
    top: 50%;
    left: 50%;
    font-family: 'Fira Code', monospace;
    font-size: 0.7rem;
    letter-spacing: 0.06em;
    color: var(--copper);
    text-decoration: none;
    transform: rotate(var(--angle)) translateY(-70px) rotate(calc(-1 * var(--angle)));
    opacity: 0.7;
}

.cm-item:hover { color: var(--sulfur); opacity: 1; }

/* Sections */
.quest-section {
    position: relative;
    min-height: 100vh;
    padding: clamp(4rem, 8vw, 10rem);
    overflow: hidden;
    perspective: 1200px;
}

.section-labyrinth {
    background: var(--abyss);
    clip-path: polygon(0 0, 100% 0, 100% 94%, 0 100%);
    display: flex;
    align-items: center;
}

.section-synthesis {
    background: var(--twilight);
    clip-path: polygon(0 4%, 100% 0, 100% 96%, 0 100%);
    margin-top: -6vh;
}

.section-corridor {
    background: var(--abyss);
    clip-path: polygon(0 3%, 100% 0, 100% 95%, 0 100%);
    margin-top: -4vh;
}

.section-puzzle {
    background: var(--twilight);
    clip-path: polygon(0 5%, 100% 0, 100% 97%, 0 100%);
    margin-top: -5vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.section-exit {
    background: var(--abyss);
    clip-path: polygon(0 4%, 100% 0, 100% 100%, 0 100%);
    margin-top: -4vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Perspective Grid */
.perspective-grid {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background:
        repeating-linear-gradient(0deg, transparent, transparent 60px, rgba(212,118,59,0.03) 60px, rgba(212,118,59,0.03) 61px),
        repeating-linear-gradient(90deg, transparent, transparent 60px, rgba(212,118,59,0.03) 60px, rgba(212,118,59,0.03) 61px);
    transform: perspective(600px) rotateX(30deg) scale(2);
    transform-origin: center 80%;
    pointer-events: none;
}

.grid-rotated {
    background:
        repeating-linear-gradient(15deg, transparent, transparent 50px, rgba(46,196,182,0.04) 50px, rgba(46,196,182,0.04) 51px),
        repeating-linear-gradient(105deg, transparent, transparent 50px, rgba(46,196,182,0.04) 50px, rgba(46,196,182,0.04) 51px);
    transform: perspective(600px) rotateX(25deg) rotateY(-8deg) scale(2);
}

.z-content {
    position: relative;
    z-index: 2;
    max-width: 50ch;
}

.center-content {
    text-align: center;
    margin: 0 auto;
}

.hero-text {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: clamp(3rem, 8vw, 7rem);
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: var(--copper);
    margin-bottom: 2rem;
    line-height: 1.1;
}

.section-header {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: clamp(1.5rem, 3vw, 2.5rem);
    letter-spacing: 0.02em;
    color: var(--bone);
    margin-bottom: 1rem;
}

.body-text {
    font-family: 'Crimson Pro', serif;
    font-weight: 400;
    font-size: clamp(1rem, 1.2vw, 1.25rem);
    line-height: 1.7;
    color: var(--bone);
    margin-bottom: 1.5rem;
}

.offset-right { margin-left: 20vw; max-width: 40ch; }

.fira-label {
    display: block;
    font-family: 'Fira Code', monospace;
    font-size: 0.85rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--dust);
    opacity: 0.7;
    margin-bottom: 1rem;
}

/* Split Zone */
.split-zone {
    display: flex;
    gap: 0;
    min-height: 60vh;
    align-items: center;
}

.split-left, .split-right { flex: 1; padding: 3rem; }
.split-left { max-width: 42ch; }

.split-divide-svg {
    width: 3px;
    min-height: 50vh;
    background: linear-gradient(to bottom, var(--copper), var(--teal));
    opacity: 0.5;
}

.alt-reality {
    background: rgba(46,196,182,0.05);
    padding: 2rem;
    border: 1px solid rgba(46,196,182,0.2);
    min-height: 200px;
}

.alt-pattern {
    width: 100%;
    height: 150px;
    background:
        repeating-linear-gradient(45deg, transparent, transparent 20px, rgba(46,196,182,0.08) 20px, rgba(46,196,182,0.08) 21px);
}

/* Floating Fragments */
.floating-frag {
    position: absolute;
    width: 40px;
    height: 40px;
    pointer-events: none;
    animation: fragFloat 80s linear infinite;
}

.frag-1 { top: 15%; right: 10%; animation-duration: 70s; }
.frag-2 { bottom: 20%; left: 5%; animation-duration: 90s; animation-delay: -20s; }
.frag-3 { top: 30%; right: 15%; animation-duration: 75s; animation-delay: -35s; }

@keyframes fragFloat {
    0% { transform: translate(0, 0) rotate(0deg); }
    25% { transform: translate(20px, -15px) rotate(90deg); }
    50% { transform: translate(-10px, 20px) rotate(180deg); }
    75% { transform: translate(15px, 10px) rotate(270deg); }
    100% { transform: translate(0, 0) rotate(360deg); }
}

@media (max-width: 768px) {
    .split-zone { flex-direction: column; }
    .offset-right { margin-left: 0; }
    .quest-section { padding: clamp(3rem, 6vw, 6rem); }
}
