/* a6c.boo - Surrealist Digital Liminal Space */

:root {
    --void: #0B0E1A;
    --aubergine: #1A1326;
    --smoke: #2A2535;
    --parchment: #D4D0C8;
    --amber: #E8A838;
    --coral: #D4627A;
    --teal: #38B2A8;
    --lavender: #7B6F8E;
    --ether: #F0ECE2;

    --font-display: 'Syne', sans-serif;
    --font-body: 'Libre Baskerville', serif;
    --font-mono: 'Inconsolata', monospace;

    --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
    --ease-in: cubic-bezier(0.55, 0, 1, 0.45);
    --duration: 1000ms;
}

*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background: var(--void);
    color: var(--parchment);
    font-family: var(--font-body);
    font-weight: 400;
    font-size: 1.05rem;
    line-height: 1.75;
    overflow-x: hidden;
}

/* Orb Layer */
.orb-layer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 2;
}

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

.orb-amber {
    background: var(--amber);
    box-shadow: 0 0 20px rgba(232, 168, 56, 0.3), 0 0 60px rgba(232, 168, 56, 0.1);
}

.orb-coral {
    background: var(--coral);
    box-shadow: 0 0 20px rgba(212, 98, 122, 0.3), 0 0 60px rgba(212, 98, 122, 0.1);
}

.orb-1 {
    width: 12px; height: 12px;
    top: 15%; left: 20%;
    animation: orbDrift1 60s ease-in-out infinite;
}
.orb-2 {
    width: 8px; height: 8px;
    top: 40%; left: 75%;
    animation: orbDrift2 45s ease-in-out infinite;
}
.orb-3 {
    width: 16px; height: 16px;
    top: 65%; left: 10%;
    animation: orbDrift3 70s ease-in-out infinite;
}
.orb-4 {
    width: 10px; height: 10px;
    top: 80%; left: 60%;
    animation: orbDrift4 55s ease-in-out infinite;
}
.orb-5 {
    width: 14px; height: 14px;
    top: 30%; left: 50%;
    animation: orbDrift5 50s ease-in-out infinite;
}
.orb-6 {
    width: 20px; height: 20px;
    top: 55%; left: 85%;
    animation: orbDrift6 80s ease-in-out infinite;
}

@keyframes orbDrift1 {
    0%, 100% { transform: translate(0, 0); }
    25% { transform: translate(80px, -40px); }
    50% { transform: translate(-30px, 60px); }
    75% { transform: translate(50px, 30px); }
}
@keyframes orbDrift2 {
    0%, 100% { transform: translate(0, 0); }
    25% { transform: translate(-60px, 50px); }
    50% { transform: translate(40px, -20px); }
    75% { transform: translate(-20px, -40px); }
}
@keyframes orbDrift3 {
    0%, 100% { transform: translate(0, 0); }
    33% { transform: translate(70px, 30px); }
    66% { transform: translate(-50px, -60px); }
}
@keyframes orbDrift4 {
    0%, 100% { transform: translate(0, 0); }
    25% { transform: translate(40px, -70px); }
    50% { transform: translate(-60px, 20px); }
    75% { transform: translate(20px, 50px); }
}
@keyframes orbDrift5 {
    0%, 100% { transform: translate(0, 0); }
    33% { transform: translate(-90px, 40px); }
    66% { transform: translate(60px, -50px); }
}
@keyframes orbDrift6 {
    0%, 100% { transform: translate(0, 0); }
    25% { transform: translate(-40px, -30px); }
    50% { transform: translate(50px, 50px); }
    75% { transform: translate(-70px, 20px); }
}

/* Navigation Glyph */
.nav-glyph {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 100;
    background: rgba(42, 37, 53, 0.6);
    border: 1px solid rgba(123, 111, 142, 0.3);
    border-radius: 50%;
    width: 56px;
    height: 56px;
    display: grid;
    place-items: center;
    cursor: pointer;
    backdrop-filter: blur(8px);
    transition: transform 0.4s var(--ease-out), background 0.4s var(--ease-out);
}

.nav-glyph:hover {
    transform: scale(1.1);
    background: rgba(42, 37, 53, 0.8);
}

.nav-glyph.active {
    transform: rotate(180deg);
}

.radial-nav {
    position: fixed;
    bottom: 5rem;
    right: 2rem;
    z-index: 99;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    align-items: flex-end;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s var(--ease-out);
}

.radial-nav.open {
    opacity: 1;
    pointer-events: auto;
}

.radial-link {
    font-family: var(--font-mono);
    font-weight: 300;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--lavender);
    text-decoration: none;
    padding: 0.4rem 0.8rem;
    background: rgba(42, 37, 53, 0.6);
    border: 1px solid rgba(123, 111, 142, 0.2);
    border-radius: 20px;
    backdrop-filter: blur(8px);
    transition: color 0.3s var(--ease-out), border-color 0.3s var(--ease-out), transform 0.4s var(--ease-out);
    transform: translateX(20px);
}

.radial-nav.open .radial-link {
    transform: translateX(0);
}

.radial-nav.open .radial-link:nth-child(1) { transition-delay: 0ms; }
.radial-nav.open .radial-link:nth-child(2) { transition-delay: 50ms; }
.radial-nav.open .radial-link:nth-child(3) { transition-delay: 100ms; }
.radial-nav.open .radial-link:nth-child(4) { transition-delay: 150ms; }
.radial-nav.open .radial-link:nth-child(5) { transition-delay: 200ms; }

.radial-link:hover {
    color: var(--ether);
    border-color: var(--teal);
}

/* Sections */
.section {
    position: relative;
    min-height: 100vh;
    display: grid;
    place-items: center;
    overflow: hidden;
}

.section-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.bg-void { background: var(--void); }
.bg-aubergine { background: linear-gradient(to bottom, var(--void), var(--aubergine)); }
.bg-gradient-1 { background: linear-gradient(to bottom, var(--aubergine), var(--smoke)); }
.bg-smoke { background: linear-gradient(to bottom, var(--smoke), var(--aubergine)); }
.bg-deep-smoke { background: linear-gradient(to bottom, var(--aubergine), var(--smoke)); }

/* Fog Bands */
.fog-band {
    position: absolute;
    width: 100%;
    height: 120px;
    background: linear-gradient(to right, transparent, rgba(26, 19, 38, 0.6), transparent);
    pointer-events: none;
    z-index: 3;
}

.fog-band-1 { bottom: -60px; }
.fog-band-2 { top: 30%; }
.fog-band-3 { top: 40%; }
.fog-band-3.diagonal { transform: rotate(-5deg); width: 120%; left: -10%; }

/* Threshold Lines */
.threshold-line {
    position: absolute;
    height: 1px;
    background: var(--lavender);
    opacity: 0.3;
    z-index: 3;
}

.tl-1 { bottom: 20%; left: 15%; width: 45%; }
.tl-2 { bottom: 10%; left: 35%; width: 30%; }
.tl-3 { top: 15%; left: 10%; width: 55%; }

/* Section Labels */
.section-label {
    font-family: var(--font-mono);
    font-weight: 300;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--lavender);
    display: block;
    margin-bottom: 1.5rem;
}

/* Headings */
.section-heading {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(2rem, 5vw, 4rem);
    letter-spacing: -0.02em;
    color: var(--amber);
    line-height: 1.1;
    margin-bottom: 1.5rem;
}

.body-text {
    max-width: 38ch;
    margin-bottom: 1.25rem;
    color: var(--parchment);
}

/* ======= ACT 1: THRESHOLD ======= */
.section-threshold {
    z-index: 5;
}

.ghost-watermark {
    position: absolute;
    width: 50vw;
    height: auto;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1;
    pointer-events: none;
}

.threshold-content {
    position: relative;
    z-index: 4;
    text-align: center;
    margin-top: -8%;
}

.hero-title {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: clamp(3rem, 18vw, 14rem);
    text-transform: uppercase;
    letter-spacing: -0.02em;
    color: var(--ether);
    line-height: 1;
    margin-bottom: 1.5rem;
}

.hero-title .char {
    display: inline-block;
    opacity: 0;
    transform: translateY(30px);
}

.hero-title .char.visible {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.6s var(--ease-out), transform 0.6s var(--ease-out);
}

.hero-tagline {
    font-family: var(--font-body);
    font-size: clamp(0.9rem, 1.5vw, 1.2rem);
    color: var(--lavender);
    font-style: italic;
}

/* ======= ACT 2: CORRIDOR ======= */
.corridor-content {
    position: relative;
    z-index: 4;
    display: flex;
    align-items: center;
    width: 90%;
    max-width: 1200px;
    gap: 4rem;
    padding: 2rem 0;
}

.corridor-text {
    flex: 0 0 40%;
}

.corridor-illustration {
    flex: 1;
    max-height: 80vh;
    opacity: 0.5;
}

/* ======= ACT 3: GALLERY ======= */
.section-gallery {
    flex-direction: column;
}

.gallery-label {
    position: relative;
    z-index: 4;
    margin-bottom: 2rem;
}

.gallery-cards {
    position: relative;
    z-index: 4;
    display: flex;
    gap: 2rem;
    padding: 2rem;
    flex-wrap: wrap;
    justify-content: center;
    max-width: 1100px;
}

.glass-card {
    background: rgba(42, 37, 53, 0.5);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(123, 111, 142, 0.2);
    border-radius: 12px;
    padding: 2rem;
    width: 300px;
    position: relative;
    overflow: hidden;
}

.card-1 { transform: translateY(-20px) rotate(-1deg); }
.card-2 { transform: translateY(20px); }
.card-3 { transform: translateY(-10px) rotate(1deg); }

.card-accent {
    width: 40px;
    height: 4px;
    border-radius: 2px;
    margin-bottom: 1.25rem;
}

.accent-amber { background: var(--amber); }
.accent-coral { background: var(--coral); }
.accent-teal { background: var(--teal); }

.card-title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.3rem;
    color: var(--ether);
    margin-bottom: 0.75rem;
    letter-spacing: -0.01em;
}

.card-text {
    font-size: 0.95rem;
    line-height: 1.7;
    color: var(--parchment);
    opacity: 0.85;
}

/* ======= ACT 4: ARCHIVE ======= */
.archive-content {
    position: relative;
    z-index: 4;
    display: flex;
    gap: 4rem;
    width: 90%;
    max-width: 1100px;
    padding: 2rem 0;
}

.archive-main {
    flex: 0 0 62%;
}

.archive-meta {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    padding-top: 4rem;
}

.meta-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.meta-label {
    font-family: var(--font-mono);
    font-weight: 300;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--lavender);
}

.meta-value {
    font-family: var(--font-body);
    font-size: 0.95rem;
    color: var(--teal);
}

/* ======= ACT 5: RETURN ======= */
.return-content {
    position: relative;
    z-index: 4;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.return-glyph {
    width: 80px;
    height: 100px;
}

.pulse-glyph {
    animation: ghostPulse 4s ease-in-out infinite;
}

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

.return-text {
    font-family: var(--font-body);
    font-size: clamp(1rem, 2vw, 1.4rem);
    color: var(--parchment);
    font-style: italic;
}

.return-subtext {
    font-family: var(--font-mono);
    font-weight: 300;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--lavender);
}

.teal-line {
    width: 60%;
    max-width: 500px;
    height: 2px;
    margin-top: 2rem;
}

.teal-line line {
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
    transition: stroke-dashoffset 2s var(--ease-out);
}

.teal-line.drawn line {
    stroke-dashoffset: 0;
}

/* Reveal Animation */
.reveal-element {
    opacity: 0;
    transform: translateY(25px);
    transition: opacity var(--duration) var(--ease-out), transform var(--duration) var(--ease-out);
}

.reveal-element.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive */
@media (max-width: 768px) {
    .corridor-content {
        flex-direction: column;
    }

    .corridor-text {
        flex: none;
        width: 100%;
    }

    .corridor-illustration {
        max-height: 40vh;
    }

    .gallery-cards {
        flex-direction: column;
        align-items: center;
    }

    .glass-card {
        width: 90%;
        max-width: 340px;
    }

    .card-1, .card-2, .card-3 {
        transform: none;
    }

    .archive-content {
        flex-direction: column;
    }

    .archive-meta {
        padding-top: 0;
    }

    .nav-glyph {
        bottom: 1rem;
        right: 1rem;
    }

    .radial-nav {
        bottom: 4rem;
        right: 1rem;
    }
}
