/* ==========================================================================
   LLITTL.com - Micro-Observatory Design System
   Palette:
     Deep void / Obsidian Cosmos: #07050F
     Panel base / Nebula Ink: #120E24
     Neon primary / Electric Magenta: #FF2D95
     Neon secondary / Signal Cyan: #00FFB4
     Neon tertiary / Plasma Amber: #FFD600
     Text primary / Moonlit Chalk: #E8E4F0
     Text secondary / Dust Lavender: #9B8FBB
     Border accent / Faint Orchid: #3A2860
     Gradient mid / Purple: #7B2FBE
   ========================================================================== */

/* --- Reset & Base --- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

::selection {
    background-color: rgba(255, 45, 149, 0.3);
    color: #E8E4F0;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: #07050F;
    color: #E8E4F0;
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 300;
    line-height: 1.65;
    overflow-x: hidden;
    cursor: none;
}

.svg-filters {
    position: absolute;
    width: 0;
    height: 0;
    overflow: hidden;
}

/* --- Scanline Overlay --- */
.scanline-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 200%;
    background: repeating-linear-gradient(
        0deg,
        transparent 0px,
        transparent 2px,
        rgba(0, 255, 180, 0.03) 2px,
        rgba(0, 255, 180, 0.03) 3px
    );
    pointer-events: none;
    z-index: 1000;
    animation: scanlineDrift 12s linear infinite;
}

@keyframes scanlineDrift {
    0% { transform: translateY(0); }
    100% { transform: translateY(-50%); }
}

/* --- Cursor Reticle --- */
.cursor-reticle {
    position: fixed;
    width: 40px;
    height: 40px;
    pointer-events: none;
    z-index: 999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.cursor-reticle::before,
.cursor-reticle::after {
    content: '';
    position: absolute;
    background: #FF2D95;
    opacity: 0.3;
}

.cursor-reticle::before {
    top: 50%;
    left: 0;
    width: 100%;
    height: 1px;
    transform: translateY(-50%);
}

.cursor-reticle::after {
    top: 0;
    left: 50%;
    width: 1px;
    height: 100%;
    transform: translateX(-50%);
}

body:hover .cursor-reticle {
    opacity: 1;
}

/* --- Dot Matrix Background --- */
.dot-matrix {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: radial-gradient(circle, #9B8FBB 1px, transparent 1px);
    background-size: 20px 20px;
    opacity: 0.04;
    pointer-events: none;
    z-index: 1;
}

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

.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    mix-blend-mode: screen;
    will-change: transform;
}

.blob-magenta {
    background: #FF2D95;
    opacity: 0.08;
}

.blob-cyan {
    background: #00FFB4;
    opacity: 0.06;
}

.blob-amber {
    background: #FFD600;
    opacity: 0.05;
}

.blob-1 {
    width: 500px;
    height: 500px;
    top: 10%;
    left: 20%;
    animation: blobBreathe1 15s ease-in-out infinite, blobDrift1 20s ease-in-out infinite;
}

.blob-2 {
    width: 400px;
    height: 400px;
    top: 40%;
    right: 10%;
    animation: blobBreathe2 12s ease-in-out infinite, blobDrift2 18s ease-in-out infinite;
}

.blob-3 {
    width: 350px;
    height: 350px;
    bottom: 20%;
    left: 40%;
    animation: blobBreathe3 10s ease-in-out infinite, blobDrift3 22s ease-in-out infinite;
}

.blob-4 {
    width: 450px;
    height: 450px;
    top: 60%;
    left: -5%;
    animation: blobBreathe1 13s ease-in-out infinite reverse, blobDrift2 25s ease-in-out infinite;
}

.blob-5 {
    width: 380px;
    height: 380px;
    top: -10%;
    right: 30%;
    animation: blobBreathe2 11s ease-in-out infinite, blobDrift3 19s ease-in-out infinite reverse;
}

.blob-6 {
    width: 300px;
    height: 300px;
    bottom: 5%;
    right: 20%;
    animation: blobBreathe3 14s ease-in-out infinite reverse, blobDrift1 23s ease-in-out infinite;
}

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

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

@keyframes blobBreathe3 {
    0%, 100% { transform: scale(0.97); }
    50% { transform: scale(1.03); }
}

@keyframes blobDrift1 {
    0%, 100% { translate: 0 0; }
    25% { translate: 30px -20px; }
    50% { translate: -15px 25px; }
    75% { translate: 20px 10px; }
}

@keyframes blobDrift2 {
    0%, 100% { translate: 0 0; }
    25% { translate: -25px 15px; }
    50% { translate: 20px -30px; }
    75% { translate: -10px -15px; }
}

@keyframes blobDrift3 {
    0%, 100% { translate: 0 0; }
    25% { translate: 15px 25px; }
    50% { translate: -30px -10px; }
    75% { translate: 25px -20px; }
}

/* --- Navigation Strip --- */
.nav-strip {
    position: fixed;
    left: 0;
    top: 0;
    width: 16px;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    gap: 12px;
    z-index: 500;
    padding-left: 6px;
    overflow: hidden;
    transition: width 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    background: linear-gradient(90deg, rgba(7, 5, 15, 0.8) 0%, transparent 100%);
    cursor: pointer;
}

.nav-strip:hover {
    width: 200px;
}

.nav-label {
    font-family: 'Share Tech Mono', monospace;
    font-size: 10px;
    color: #9B8FBB;
    letter-spacing: 0.1em;
    white-space: nowrap;
    opacity: 0.6;
    transition: color 0.3s ease, opacity 0.3s ease;
    cursor: pointer;
}

.nav-label:hover {
    color: #00FFB4;
    opacity: 1;
}

.nav-label.active {
    color: #FF2D95;
    opacity: 1;
}

/* --- Scroll Container --- */
.scroll-container {
    position: relative;
    z-index: 10;
    scroll-snap-type: y proximity;
    overflow-y: auto;
    height: 100vh;
    overflow-x: hidden;
}

/* --- Sections --- */
.section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    scroll-snap-align: start;
    padding: 60px 40px;
}

.section-inner {
    max-width: 1200px;
    width: 100%;
    position: relative;
}

/* --- Opening Frame --- */
.opening-frame {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 80vh;
}

.hero-title {
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 700;
    font-size: clamp(5rem, 15vw, 12rem);
    text-transform: uppercase;
    letter-spacing: -0.02em;
    line-height: 0.92;
    color: #E8E4F0;
    opacity: 0;
    transform: scale(0.9);
    animation: heroSpringIn 1.2s cubic-bezier(0.175, 0.885, 0.32, 1.275) 0.3s forwards;
    text-shadow: 0 0 60px rgba(255, 45, 149, 0.3), 0 0 120px rgba(123, 47, 190, 0.15);
}

.hero-subtitle {
    font-family: 'Share Tech Mono', monospace;
    font-weight: 400;
    font-size: clamp(0.7rem, 1.2vw, 0.9rem);
    color: #9B8FBB;
    letter-spacing: 0.2em;
    margin-top: 24px;
    opacity: 0;
    animation: fadeInUp 0.8s ease 1s forwards;
}

.scroll-arrow {
    margin-top: 60px;
    opacity: 0;
    animation: fadeInUp 0.6s ease 2s forwards, arrowBounce 2s ease-in-out 2.5s infinite;
}

@keyframes heroSpringIn {
    0% { opacity: 0; transform: scale(0.85) translateY(20px); }
    60% { opacity: 1; transform: scale(1.03) translateY(-5px); }
    80% { transform: scale(0.99) translateY(2px); }
    100% { opacity: 1; transform: scale(1) translateY(0); }
}

@keyframes fadeInUp {
    0% { opacity: 0; transform: translateY(15px); }
    100% { opacity: 1; transform: translateY(0); }
}

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

/* --- Panel Styles --- */
.panel {
    position: relative;
    background: rgba(18, 14, 36, 0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid #3A2860;
    padding: 32px;
    transition: box-shadow 0.4s ease;
}

.panel:hover {
    box-shadow: 0 0 40px rgba(255, 45, 149, 0.08);
}

/* Panel hover glow */
.panel::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at center, rgba(255, 45, 149, 0.06) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

.panel:hover::after {
    opacity: 1;
}

/* --- Corner Brackets --- */
.corner-bracket {
    position: absolute;
    width: 16px;
    height: 16px;
    pointer-events: none;
}

.corner-bracket::before,
.corner-bracket::after {
    content: '';
    position: absolute;
    background: #00FFB4;
}

.corner-tl { top: -1px; left: -1px; }
.corner-tl::before { top: 0; left: 0; width: 16px; height: 1px; }
.corner-tl::after { top: 0; left: 0; width: 1px; height: 16px; }

.corner-tr { top: -1px; right: -1px; }
.corner-tr::before { top: 0; right: 0; width: 16px; height: 1px; }
.corner-tr::after { top: 0; right: 0; width: 1px; height: 16px; }

.corner-bl { bottom: -1px; left: -1px; }
.corner-bl::before { bottom: 0; left: 0; width: 16px; height: 1px; }
.corner-bl::after { bottom: 0; left: 0; width: 1px; height: 16px; }

.corner-br { bottom: -1px; right: -1px; }
.corner-br::before { bottom: 0; right: 0; width: 16px; height: 1px; }
.corner-br::after { bottom: 0; right: 0; width: 1px; height: 16px; }

/* --- Vintage Photo --- */
.vintage-photo {
    position: relative;
    box-shadow: 0 0 30px rgba(255, 45, 149, 0.25), 0 0 60px rgba(0, 255, 180, 0.1);
    overflow: hidden;
}

.vintage-photo::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at center, transparent 40%, rgba(7, 5, 15, 0.5) 100%);
    pointer-events: none;
}

.photo-placeholder {
    display: block;
    width: 100%;
    height: auto;
}

/* --- Coordinate Labels --- */
.coord-label {
    font-family: 'Share Tech Mono', monospace;
    font-size: 10px;
    color: #9B8FBB;
    letter-spacing: 0.15em;
    display: block;
    margin-top: 8px;
    opacity: 0.6;
}

/* --- Typography --- */
.section-heading {
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 700;
    font-size: clamp(3rem, 8vw, 7rem);
    text-transform: uppercase;
    letter-spacing: -0.02em;
    line-height: 0.92;
    color: #E8E4F0;
    margin-bottom: 24px;
}

.body-text {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 300;
    font-size: clamp(1rem, 1.2vw, 1.15rem);
    line-height: 1.65;
    color: #E8E4F0;
    max-width: 480px;
    margin-bottom: 20px;
}

.meta-label {
    font-family: 'Share Tech Mono', monospace;
    font-weight: 400;
    font-size: 11px;
    color: #9B8FBB;
    letter-spacing: 0.12em;
    opacity: 0.7;
}

/* --- Section Layouts --- */

/* First Reveal */
.reveal-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.reveal-image-panel {
    transform: translateX(-5vw);
}

.reveal-text-panel {
    transform: translateX(3vw);
    background: transparent;
    border: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

.reveal-text-panel::after {
    display: none;
}

/* Content Cascade */
.cascade-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.cascade-right .cascade-text-panel {
    order: 1;
    transform: translateX(-3vw);
}

.cascade-right .cascade-image-panel {
    order: 2;
    transform: translateX(5vw);
}

.cascade-left .cascade-image-panel {
    order: 1;
    transform: translateX(-5vw);
}

.cascade-left .cascade-text-panel {
    order: 2;
    transform: translateX(3vw);
}

.cascade-text-panel {
    background: transparent;
    border: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

.cascade-text-panel::after {
    display: none;
}

/* --- Circuit Lines --- */
.circuit-line {
    position: absolute;
    width: 1px;
    height: 120px;
    bottom: -60px;
    left: 50%;
    transform: translateX(-50%);
    border-left: 1px dashed #3A2860;
    z-index: 5;
}

/* --- Interstitial Sections --- */
.section-interstitial {
    min-height: 60vh;
}

.interstitial-frame {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.interstitial-text {
    font-family: 'Share Tech Mono', monospace;
    font-size: clamp(0.8rem, 1.5vw, 1.1rem);
    color: #9B8FBB;
    letter-spacing: 0.25em;
    margin-bottom: 16px;
}

.interstitial-subtext {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 300;
    font-size: clamp(1.2rem, 2vw, 1.5rem);
    color: #E8E4F0;
    opacity: 0.6;
    font-style: italic;
}

/* --- Closing Frame --- */
.closing-frame {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 80vh;
}

.closing-title {
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 700;
    font-size: clamp(4rem, 10vw, 9rem);
    text-transform: uppercase;
    letter-spacing: -0.02em;
    line-height: 0.92;
    color: #E8E4F0;
    text-shadow: 0 0 60px rgba(0, 255, 180, 0.25), 0 0 120px rgba(255, 214, 0, 0.15);
}

.closing-subtitle {
    font-family: 'Share Tech Mono', monospace;
    font-weight: 400;
    font-size: clamp(0.7rem, 1.2vw, 0.9rem);
    color: #9B8FBB;
    letter-spacing: 0.2em;
    margin-top: 24px;
}

.closing-meta {
    font-family: 'Share Tech Mono', monospace;
    font-size: 10px;
    color: #3A2860;
    letter-spacing: 0.2em;
    margin-top: 60px;
    opacity: 0.5;
}

/* --- Scroll Reveal Animation Classes --- */
.reveal-element {
    opacity: 0;
    transform: translateY(30px) scale(0.95);
    transition: none;
}

.reveal-element.revealed {
    animation: springReveal 0.9s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

.reveal-element.revealed-delay-1 {
    animation: springReveal 0.9s cubic-bezier(0.175, 0.885, 0.32, 1.275) 0.1s forwards;
}

.reveal-element.revealed-delay-2 {
    animation: springReveal 0.9s cubic-bezier(0.175, 0.885, 0.32, 1.275) 0.2s forwards;
}

.reveal-element.revealed-delay-3 {
    animation: springReveal 0.9s cubic-bezier(0.175, 0.885, 0.32, 1.275) 0.3s forwards;
}

@keyframes springReveal {
    0% { opacity: 0; transform: translateY(30px) scale(0.95); }
    50% { opacity: 1; transform: translateY(-5px) scale(1.01); }
    70% { transform: translateY(3px) scale(0.995); }
    100% { opacity: 1; transform: translateY(0) scale(1); }
}

/* Image specific reveal */
.reveal-image {
    opacity: 0;
    transform: scale(0.9);
    transition: none;
}

.reveal-image.revealed {
    animation: springRevealImage 1s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes springRevealImage {
    0% { opacity: 0; transform: scale(0.9); }
    60% { opacity: 1; transform: scale(1.02); }
    80% { transform: scale(0.99); }
    100% { opacity: 1; transform: scale(1); }
}

/* Interstitial specific reveal */
.reveal-interstitial {
    opacity: 0;
}

.reveal-interstitial.revealed {
    animation: fadeInSlow 1.5s ease forwards;
}

@keyframes fadeInSlow {
    0% { opacity: 0; }
    100% { opacity: 1; }
}

/* --- Parallax Layers (JS-controlled) --- */
.parallax-slow {
    will-change: transform;
}

.parallax-medium {
    will-change: transform;
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .section {
        padding: 40px 20px;
    }

    .reveal-layout,
    .cascade-layout {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .reveal-image-panel,
    .reveal-text-panel,
    .cascade-right .cascade-text-panel,
    .cascade-right .cascade-image-panel,
    .cascade-left .cascade-image-panel,
    .cascade-left .cascade-text-panel {
        transform: none;
    }

    .cascade-right .cascade-text-panel,
    .cascade-left .cascade-text-panel {
        order: 2;
    }

    .cascade-right .cascade-image-panel,
    .cascade-left .cascade-image-panel {
        order: 1;
    }

    .nav-strip {
        display: none;
    }

    .cursor-reticle {
        display: none;
    }

    body {
        cursor: auto;
    }

    .body-text {
        max-width: 100%;
    }

    .hero-title {
        font-size: clamp(4rem, 18vw, 8rem);
    }

    .closing-title {
        font-size: clamp(3rem, 14vw, 7rem);
    }
}

@media (max-width: 480px) {
    .section-heading {
        font-size: clamp(2.5rem, 12vw, 4rem);
    }
}

/* --- Prefers Reduced Motion --- */
@media (prefers-reduced-motion: reduce) {
    .scanline-overlay {
        animation: none;
    }

    .blob {
        animation: none;
    }

    .hero-title {
        animation: fadeInSimple 0.5s ease forwards;
    }

    .reveal-element.revealed,
    .reveal-element.revealed-delay-1,
    .reveal-element.revealed-delay-2,
    .reveal-element.revealed-delay-3 {
        animation: fadeInSimple 0.5s ease forwards;
    }

    .reveal-image.revealed {
        animation: fadeInSimple 0.5s ease forwards;
    }

    .scroll-arrow {
        animation: fadeInSimple 0.5s ease 1s forwards;
    }

    @keyframes fadeInSimple {
        0% { opacity: 0; }
        100% { opacity: 1; transform: none; }
    }
}