/* ============================================================
   glolos.com — Luminous Corridor
   Vaporwave nostalgia meets warm approachability
   ============================================================ */

/* --- Custom Properties --- */
:root {
    --color-deep-bg: #0c0e2a;
    --color-primary-bg: #161847;
    --color-atmospheric: #3a5fc8;
    --color-accent-cyan: #5ce1e6;
    --color-accent-rose: #e88ec4;
    --color-highlight-gold: #f5d491;
    --color-text-primary: #e8e4f0;
    --color-text-secondary: #8b8fad;
    --color-haze-silver: #8ba7c8;
    --color-electric-violet: #9055ff;
    --color-midground: #1e2a6e;

    --font-display: 'Righteous', cursive;
    --font-section: 'Josefin Sans', sans-serif;
    --font-body: 'Nunito', sans-serif;
    --font-mono: 'Share Tech Mono', monospace;

    --ease-smooth: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    background: var(--color-deep-bg);
    color: var(--color-text-primary);
    font-family: var(--font-body);
    font-weight: 300;
    font-size: 1.125rem;
    line-height: 1.85;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* --- Corridor Container --- */
.corridor {
    position: relative;
    width: 100%;
    perspective: 1000px;
}

/* --- Sections --- */
.section {
    position: relative;
    width: 100%;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.section__bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    transform: translateZ(-200px) scale(1.4);
}

.section__atmosphere {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
}

.section__content {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 75%;
    margin: 0 auto;
    padding: 2rem;
    text-align: center;
}

.section__foreground {
    position: absolute;
    inset: 0;
    z-index: 3;
    pointer-events: none;
}

/* --- Section 1: The Threshold --- */
.section--threshold {
    background: linear-gradient(135deg, #0c0e2a 0%, #161847 40%, #1e2a6e 100%);
}

.section--threshold .section__bg {
    background: linear-gradient(135deg, #0c0e2a 0%, #161847 40%, #1e2a6e 100%);
    animation: bg-drift 30s ease-in-out infinite alternate;
}

.hero-title {
    font-family: var(--font-display);
    font-size: clamp(3rem, 7vw, 6rem);
    font-weight: 400;
    letter-spacing: 0.04em;
    animation: hue-shift 8s ease-in-out infinite;
    text-shadow: 0 0 60px rgba(92, 225, 230, 0.3), 0 0 120px rgba(232, 142, 196, 0.15);
    position: relative;
}

@keyframes hue-shift {
    0% { color: #5ce1e6; }
    50% { color: #e88ec4; }
    100% { color: #5ce1e6; }
}

/* --- Section 2: The First Room --- */
.section--first-room {
    background: linear-gradient(135deg, #0c0e2a 0%, #161847 40%, #1e2a6e 100%);
    filter: hue-rotate(10deg);
}

.poetic-text {
    font-family: var(--font-body);
    font-weight: 300;
    font-size: 1.25rem;
    line-height: 2;
    color: var(--color-text-primary);
    max-width: 600px;
    margin: 0 auto 1.5rem;
}

.poetic-text--second {
    font-style: italic;
    color: var(--color-accent-cyan);
    font-size: 1.15rem;
}

.reveal-group {
    position: relative;
}

/* --- Section 3: The Gallery --- */
.section--gallery {
    background: linear-gradient(135deg, #0c0e2a 0%, #161847 35%, #1e2a6e 100%);
    filter: hue-rotate(20deg);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 2.5vw;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

.gallery-card {
    background: rgba(22, 24, 71, 0.5);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(92, 225, 230, 0.15);
    padding: 2.5rem 2rem;
    position: relative;
    overflow: hidden;
    transition: transform 0.4s var(--ease-smooth), border-color 0.4s ease;
}

.gallery-card:hover {
    transform: translateY(-4px);
    border-color: rgba(92, 225, 230, 0.35);
}

.gallery-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(144, 85, 255, 0.05), rgba(92, 225, 230, 0.05));
    opacity: 0;
    transition: opacity 0.4s ease;
}

.gallery-card:hover::before {
    opacity: 1;
}

.gallery-card--1 {
    grid-column: 1 / 4;
    clip-path: polygon(0 0, 100% 0, 100% 85%, 0 100%);
}

.gallery-card--2 {
    grid-column: 4 / 7;
    clip-path: polygon(0 5%, 100% 0, 100% 100%, 0 90%);
    margin-top: 3rem;
}

.gallery-card--3 {
    grid-column: 5 / 9;
    clip-path: polygon(0 0, 100% 10%, 100% 100%, 0 95%);
    margin-top: -1rem;
}

.gallery-card__inner {
    position: relative;
    z-index: 1;
}

.gallery-card__label {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--color-haze-silver);
    display: block;
    margin-bottom: 0.75rem;
}

.gallery-card__title {
    font-family: var(--font-section);
    font-weight: 300;
    font-size: clamp(1.5rem, 3.5vw, 2.8rem);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--color-accent-cyan);
    margin-bottom: 1rem;
}

.gallery-card__text {
    font-family: var(--font-body);
    font-weight: 300;
    font-size: 1rem;
    line-height: 1.85;
    color: var(--color-text-primary);
}

/* --- Section 4: The Depth --- */
.section--depth {
    background: var(--color-deep-bg);
}

.depth-title {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 6vw, 5rem);
    font-weight: 400;
    letter-spacing: 0.04em;
    color: var(--color-highlight-gold);
    text-shadow: 0 0 40px rgba(245, 212, 145, 0.3), 0 0 80px rgba(245, 212, 145, 0.1);
    margin-bottom: 1.5rem;
}

.depth-subtitle {
    font-family: var(--font-section);
    font-weight: 300;
    font-size: clamp(1rem, 2.5vw, 1.6rem);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--color-text-secondary);
}

/* --- Section 5: The Return --- */
.section--return {
    background: linear-gradient(135deg, #1e2a6e 0%, #2a3580 40%, #3a2060 100%);
}

.return-text {
    font-family: var(--font-body);
    font-weight: 300;
    font-size: 1.35rem;
    line-height: 2;
    color: var(--color-text-primary);
    max-width: 550px;
    margin: 0 auto 2rem;
}

.return-title {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    font-weight: 400;
    letter-spacing: 0.04em;
    color: var(--color-accent-rose);
    text-shadow: 0 0 50px rgba(232, 142, 196, 0.4), 0 0 100px rgba(232, 142, 196, 0.15);
}

/* ============================================================
   Lens Flares
   ============================================================ */
.lens-flare {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    mix-blend-mode: screen;
}

.lens-flare::before,
.lens-flare::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    mix-blend-mode: screen;
}

/* Hero flares */
.lens-flare--1 {
    width: clamp(150px, 20vw, 400px);
    aspect-ratio: 1;
    top: 15%;
    left: 10%;
    background: radial-gradient(circle, rgba(92, 225, 230, 0.35) 0%, rgba(144, 85, 255, 0.15) 30%, rgba(232, 142, 196, 0.08) 55%, transparent 70%);
    filter: blur(20px);
    animation: flare-drift 12s ease-in-out infinite alternate;
}

.lens-flare--1::before {
    width: 60%;
    height: 60%;
    top: 20%;
    left: 20%;
    background: radial-gradient(circle, rgba(92, 225, 230, 0.2) 0%, transparent 70%);
    filter: blur(10px);
}

.lens-flare--2 {
    width: clamp(200px, 25vw, 500px);
    aspect-ratio: 1;
    top: 40%;
    right: 5%;
    background: radial-gradient(circle, rgba(232, 142, 196, 0.25) 0%, rgba(92, 225, 230, 0.1) 40%, transparent 65%);
    filter: blur(25px);
    animation: flare-drift 15s ease-in-out 2s infinite alternate-reverse;
}

.lens-flare--3 {
    width: clamp(100px, 15vw, 300px);
    aspect-ratio: 1;
    bottom: 20%;
    left: 30%;
    background: radial-gradient(circle, rgba(144, 85, 255, 0.3) 0%, rgba(92, 225, 230, 0.12) 35%, transparent 60%);
    filter: blur(18px);
    animation: flare-drift 10s ease-in-out 4s infinite alternate;
}

.lens-flare--4 {
    width: clamp(80px, 10vw, 200px);
    aspect-ratio: 1;
    top: 60%;
    right: 25%;
    background: radial-gradient(circle, rgba(92, 225, 230, 0.4) 0%, transparent 60%);
    filter: blur(15px);
    animation: flare-drift 14s ease-in-out 1s infinite alternate-reverse;
}

/* First Room flares */
.lens-flare--5 {
    width: clamp(180px, 22vw, 450px);
    aspect-ratio: 1;
    top: 10%;
    right: 15%;
    background: radial-gradient(circle, rgba(92, 225, 230, 0.25) 0%, rgba(144, 85, 255, 0.1) 40%, transparent 65%);
    filter: blur(22px);
    animation: flare-drift 13s ease-in-out infinite alternate;
}

.lens-flare--6 {
    width: clamp(120px, 18vw, 350px);
    aspect-ratio: 1;
    bottom: 15%;
    left: 8%;
    background: radial-gradient(circle, rgba(232, 142, 196, 0.2) 0%, rgba(92, 225, 230, 0.08) 45%, transparent 65%);
    filter: blur(20px);
    animation: flare-drift 11s ease-in-out 3s infinite alternate-reverse;
}

/* Gallery flares */
.lens-flare--7 {
    width: clamp(250px, 30vw, 600px);
    aspect-ratio: 1;
    top: 5%;
    left: 50%;
    transform: translateX(-50%);
    background: radial-gradient(circle, rgba(92, 225, 230, 0.2) 0%, rgba(144, 85, 255, 0.08) 40%, transparent 60%);
    filter: blur(30px);
    animation: flare-drift 16s ease-in-out infinite alternate;
}

.lens-flare--8 {
    width: clamp(150px, 18vw, 350px);
    aspect-ratio: 1;
    bottom: 10%;
    left: 5%;
    background: radial-gradient(circle, rgba(232, 142, 196, 0.18) 0%, transparent 60%);
    filter: blur(20px);
    animation: flare-drift 12s ease-in-out 2s infinite alternate-reverse;
}

.lens-flare--9 {
    width: clamp(120px, 15vw, 300px);
    aspect-ratio: 1;
    top: 60%;
    right: 10%;
    background: radial-gradient(circle, rgba(144, 85, 255, 0.25) 0%, rgba(92, 225, 230, 0.08) 50%, transparent 70%);
    filter: blur(18px);
    animation: flare-drift 10s ease-in-out 5s infinite alternate;
}

/* Depth flares - muted */
.lens-flare--10 {
    width: clamp(200px, 25vw, 500px);
    aspect-ratio: 1;
    top: 20%;
    right: 20%;
    background: radial-gradient(circle, rgba(245, 212, 145, 0.12) 0%, rgba(232, 142, 196, 0.06) 40%, transparent 60%);
    filter: blur(25px);
    animation: flare-drift 14s ease-in-out infinite alternate;
}

.lens-flare--11 {
    width: clamp(150px, 20vw, 400px);
    aspect-ratio: 1;
    bottom: 25%;
    left: 15%;
    background: radial-gradient(circle, rgba(92, 225, 230, 0.1) 0%, rgba(144, 85, 255, 0.05) 45%, transparent 65%);
    filter: blur(22px);
    animation: flare-drift 11s ease-in-out 3s infinite alternate-reverse;
}

/* Return flares - warm */
.lens-flare--12 {
    width: clamp(200px, 25vw, 500px);
    aspect-ratio: 1;
    top: 15%;
    left: 20%;
    background: radial-gradient(circle, rgba(232, 142, 196, 0.35) 0%, rgba(245, 212, 145, 0.15) 35%, transparent 60%);
    filter: blur(25px);
    animation: flare-drift 13s ease-in-out infinite alternate;
}

.lens-flare--13 {
    width: clamp(180px, 22vw, 450px);
    aspect-ratio: 1;
    bottom: 20%;
    right: 15%;
    background: radial-gradient(circle, rgba(232, 142, 196, 0.3) 0%, rgba(144, 85, 255, 0.1) 40%, transparent 65%);
    filter: blur(22px);
    animation: flare-drift 15s ease-in-out 2s infinite alternate-reverse;
}

.lens-flare--14 {
    width: clamp(120px, 15vw, 300px);
    aspect-ratio: 1;
    top: 50%;
    left: 60%;
    background: radial-gradient(circle, rgba(245, 212, 145, 0.2) 0%, rgba(232, 142, 196, 0.08) 50%, transparent 70%);
    filter: blur(18px);
    animation: flare-drift 10s ease-in-out 4s infinite alternate;
}

@keyframes flare-drift {
    0% {
        transform: translate(0, 0) scale(1);
    }
    100% {
        transform: translate(30px, -20px) scale(1.15);
    }
}

/* ============================================================
   Sharp Angle Shards
   ============================================================ */
.shard {
    position: absolute;
    pointer-events: none;
}

.shard--hero {
    width: 300px;
    height: 20px;
    bottom: 15%;
    left: -20px;
    background: linear-gradient(45deg, var(--color-electric-violet), var(--color-accent-cyan));
    transform: skewX(-15deg);
    opacity: 0.6;
    animation: shard-shimmer 6s ease-in-out infinite;
}

.shard--left {
    width: 200px;
    height: 16px;
    top: 20%;
    left: -10%;
    background: linear-gradient(45deg, var(--color-electric-violet), var(--color-accent-cyan));
    transform: skewX(-15deg);
    opacity: 0.5;
    animation: shard-shimmer 6s ease-in-out 1s infinite;
}

.shard--right {
    width: 180px;
    height: 14px;
    bottom: 20%;
    right: -8%;
    background: linear-gradient(225deg, var(--color-accent-rose), var(--color-electric-violet));
    transform: skewX(15deg);
    opacity: 0.5;
    animation: shard-shimmer 6s ease-in-out 2s infinite;
}

.shard--depth-1 {
    width: 250px;
    height: 18px;
    top: 30%;
    right: -15px;
    background: linear-gradient(45deg, rgba(245, 212, 145, 0.4), rgba(144, 85, 255, 0.3));
    transform: skewX(-15deg);
    opacity: 0.4;
    animation: shard-shimmer 6s ease-in-out infinite;
}

.shard--depth-2 {
    width: 150px;
    height: 12px;
    bottom: 35%;
    left: 5%;
    background: linear-gradient(45deg, rgba(92, 225, 230, 0.3), rgba(144, 85, 255, 0.2));
    transform: skewX(15deg);
    opacity: 0.35;
    animation: shard-shimmer 6s ease-in-out 3s infinite;
}

.shard--return-1 {
    width: 350px;
    height: 22px;
    top: 20%;
    left: -30px;
    background: linear-gradient(45deg, var(--color-accent-rose), var(--color-highlight-gold));
    transform: skewX(-15deg);
    opacity: 0.5;
    animation: shard-shimmer 6s ease-in-out infinite;
}

.shard--return-2 {
    width: 280px;
    height: 18px;
    bottom: 25%;
    right: -20px;
    background: linear-gradient(225deg, var(--color-electric-violet), var(--color-accent-cyan));
    transform: skewX(15deg);
    opacity: 0.45;
    animation: shard-shimmer 6s ease-in-out 2s infinite;
}

.shard--return-3 {
    width: 200px;
    height: 14px;
    top: 55%;
    left: 10%;
    background: linear-gradient(45deg, var(--color-accent-rose), var(--color-electric-violet));
    transform: skewX(-15deg);
    opacity: 0.4;
    animation: shard-shimmer 6s ease-in-out 4s infinite;
}

@keyframes shard-shimmer {
    0%, 100% {
        opacity: 0.4;
        background-position: 0% 50%;
    }
    50% {
        opacity: 0.7;
        background-position: 100% 50%;
    }
}

/* ============================================================
   Atmospheric Particles
   ============================================================ */
.particles {
    position: fixed;
    inset: 0;
    z-index: 10;
    pointer-events: none;
    overflow: hidden;
}

.particle {
    position: absolute;
    width: var(--size, 3px);
    height: var(--size, 3px);
    left: var(--x, 50%);
    bottom: -10px;
    background: var(--color-text-primary);
    border-radius: 50%;
    opacity: 0;
    animation: rise var(--duration, 20s) linear var(--delay, 0s) infinite;
}

@keyframes rise {
    0% {
        transform: translateY(0) scale(0.8);
        opacity: 0;
    }
    10% {
        opacity: 0.15;
    }
    90% {
        opacity: 0.15;
    }
    100% {
        transform: translateY(-110vh) scale(1.2);
        opacity: 0;
    }
}

/* ============================================================
   Scroll Indicator
   ============================================================ */
.scroll-indicator {
    position: absolute;
    bottom: 3rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 5;
}

.chevron {
    width: 24px;
    height: 24px;
    border-right: 2px solid var(--color-accent-cyan);
    border-bottom: 2px solid var(--color-accent-cyan);
    transform: rotate(45deg);
    opacity: 0.6;
    animation: chevron-pulse 2s ease-in-out infinite;
}

@keyframes chevron-pulse {
    0%, 100% {
        transform: rotate(45deg) scale(1);
        opacity: 0.6;
    }
    50% {
        transform: rotate(45deg) scale(1.1);
        opacity: 0.9;
    }
}

/* ============================================================
   Progressive Disclosure Animation Classes
   ============================================================ */
.reveal-item {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s var(--ease-smooth), transform 0.6s var(--ease-smooth);
}

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

.reveal-item:nth-child(1) { transition-delay: 0.1s; }
.reveal-item:nth-child(2) { transition-delay: 0.3s; }
.reveal-item:nth-child(3) { transition-delay: 0.5s; }

/* Section bg reveal */
.section__bg {
    opacity: 0;
    transition: opacity 0.6s ease;
}

.section.is-active .section__bg {
    opacity: 1;
}

.section__atmosphere {
    opacity: 0;
    transition: opacity 0.8s ease 0.2s;
}

.section.is-active .section__atmosphere {
    opacity: 1;
}

/* ============================================================
   Corner Accents
   ============================================================ */
.gallery-card__inner::before,
.gallery-card__inner::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border-color: rgba(92, 225, 230, 0.3);
    border-style: solid;
}

.gallery-card__inner::before {
    top: 12px;
    left: 12px;
    border-width: 2px 0 0 2px;
    transform: rotate(-15deg);
}

.gallery-card__inner::after {
    bottom: 12px;
    right: 12px;
    border-width: 0 2px 2px 0;
    transform: rotate(-15deg);
}

/* ============================================================
   Background Animation
   ============================================================ */
@keyframes bg-drift {
    0% {
        filter: hue-rotate(0deg);
    }
    100% {
        filter: hue-rotate(5deg);
    }
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 900px) {
    .section__content {
        max-width: 90%;
        padding: 1.5rem;
    }

    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .gallery-card--1,
    .gallery-card--2,
    .gallery-card--3 {
        grid-column: 1 / -1;
        margin-top: 0;
        clip-path: polygon(0 0, 100% 0, 100% 92%, 0 100%);
    }

    .shard--hero,
    .shard--left,
    .shard--right {
        width: 150px;
    }

    .shard--return-1,
    .shard--return-2 {
        width: 180px;
    }
}

@media (max-width: 600px) {
    .section__content {
        max-width: 95%;
        padding: 1rem;
    }

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

    .depth-title {
        font-size: clamp(2rem, 8vw, 3.5rem);
    }

    .gallery-card {
        padding: 1.5rem 1.25rem;
    }

    .poetic-text {
        font-size: 1.1rem;
    }
}
