/* ============================================
   prototype.quest - Vaporwave Luxury Showroom
   Palette: Candy-Bright
   Typography: Playful-Rounded (Fredoka, Quicksand, Nunito)
   ============================================ */

/* --- CSS Custom Properties --- */
:root {
    --hot-neon-rose: #FF69B4;
    --electric-mint: #00E0D0;
    --soft-orchid: #C77DFF;
    --lemon-drop: #FFE066;
    --midnight-violet: #0D0221;
    --frosted-grape: rgba(45, 20, 80, 0.55); /* #2D1450 */
    --lavender-mist: #F0E6F6;
    --ghost-line: rgba(255, 255, 255, 0.12);
}

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

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--midnight-violet);
    color: var(--lavender-mist);
    font-family: 'Nunito', sans-serif;
    font-weight: 400;
    font-size: clamp(1rem, 1.2vw, 1.15rem);
    line-height: 1.85;
    letter-spacing: 0.015em;
    overflow-x: hidden;
    min-height: 100vh;
}

/* --- Bokeh Background Layer 0 --- */
.bokeh-field {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

.bokeh-circle {
    position: absolute;
    border-radius: 50%;
    will-change: transform;
    contain: layout;
    pointer-events: none;
}

/* Bokeh drift animations */
@keyframes drift-x-1 {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(40px); }
}
@keyframes drift-x-2 {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(-35px); }
}
@keyframes drift-x-3 {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(50px); }
}
@keyframes drift-y-1 {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(30px); }
}
@keyframes drift-y-2 {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-40px); }
}
@keyframes drift-y-3 {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(25px); }
}
@keyframes bokeh-pulse {
    0%, 100% { transform: scale(0.9); }
    50% { transform: scale(1.1); }
}
@keyframes bokeh-focus-pulse {
    0% { transform: scale(1.0); }
    50% { transform: scale(1.15); }
    100% { transform: scale(1.0); }
}

/* --- Floating Grid Fragments --- */
.grid-fragment {
    position: fixed;
    pointer-events: none;
    z-index: 1;
    opacity: 0.06;
    border: 1px solid rgba(255, 255, 255, 0.06);
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.06) 1px, transparent 1px);
    background-size: 40px 40px;
}

.grid-fragment-1 {
    width: 160px;
    height: 160px;
    top: 15%;
    right: 8%;
    transform: rotate(12deg);
    animation: drift-x-1 30s ease-in-out infinite, drift-y-2 40s ease-in-out infinite;
}

.grid-fragment-2 {
    width: 120px;
    height: 120px;
    top: 55%;
    left: 5%;
    transform: rotate(-15deg);
    animation: drift-x-2 35s ease-in-out infinite, drift-y-1 45s ease-in-out infinite;
}

.grid-fragment-3 {
    width: 140px;
    height: 140px;
    top: 80%;
    right: 15%;
    transform: rotate(8deg);
    animation: drift-x-3 28s ease-in-out infinite, drift-y-3 38s ease-in-out infinite;
}

/* --- Showroom Sections --- */
.showroom-section {
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 2;
    padding: clamp(2rem, 5vw, 5rem) clamp(1rem, 3vw, 3rem);
}

/* --- Corridor Divider Lines --- */
.corridor-line {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60%;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, var(--hot-neon-rose) 50%, transparent 100%);
    animation: line-pulse 4s ease-in-out infinite;
}

@keyframes line-pulse {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.8; }
}

/* --- Showroom Panels (Frosted Acrylic) --- */
.showroom-panel {
    position: relative;
    background: var(--frosted-grape);
    backdrop-filter: blur(24px) saturate(1.4);
    -webkit-backdrop-filter: blur(24px) saturate(1.4);
    border: 1px solid var(--ghost-line);
    border-radius: 16px;
    box-shadow:
        0 8px 32px rgba(13, 2, 33, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    padding: clamp(2rem, 4vw, 4rem);
    max-width: min(90vw, 860px);
    width: 100%;
    transform: perspective(1200px) rotateY(-1deg) rotateX(0.5deg);
    transition: transform 500ms ease-out;
    overflow: hidden;
}

.showroom-panel:hover {
    transform: perspective(1200px) rotateY(0) rotateX(0);
}

/* --- Zoom-Focus Entrance Animation --- */
.showroom-panel {
    opacity: 0;
    transform: perspective(1200px) rotateY(-1deg) rotateX(0.5deg) scale(0.96);
    transition: transform 500ms ease-out, opacity 600ms cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.showroom-panel.in-view {
    opacity: 1;
    transform: perspective(1200px) rotateY(-1deg) rotateX(0.5deg) scale(1);
}

.showroom-panel:hover.in-view {
    transform: perspective(1200px) rotateY(0) rotateX(0) scale(1);
}

/* --- Hero Section --- */
.hero-title {
    font-family: 'Fredoka', sans-serif;
    font-weight: 600;
    font-size: clamp(3rem, 8vw, 7.5rem);
    letter-spacing: 0.04em;
    line-height: 1.1;
    text-align: center;
    background: linear-gradient(135deg, #FF69B4 0%, #C77DFF 40%, #00E0D0 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 40px rgba(255, 105, 180, 0.4));
    margin-bottom: 1.5rem;
    opacity: 0;
    transform: scale(0.92);
    transition: opacity 700ms cubic-bezier(0.25, 0.46, 0.45, 0.94),
                transform 700ms cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.in-view .hero-title {
    opacity: 1;
    transform: scale(1);
}

.hero-subtitle {
    font-family: 'Nunito', sans-serif;
    font-weight: 400;
    font-size: clamp(1.1rem, 2vw, 1.5rem);
    text-align: center;
    color: var(--lavender-mist);
    letter-spacing: 0.03em;
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 500ms ease 200ms,
                transform 500ms ease 200ms;
}

.in-view .hero-subtitle {
    opacity: 1;
    transform: translateY(0);
}

/* --- Section Headings --- */
.section-heading {
    font-family: 'Fredoka', sans-serif;
    font-weight: 600;
    font-size: clamp(1.6rem, 4vw, 3rem);
    letter-spacing: 0.04em;
    color: #FFFFFF;
    text-shadow:
        0 0 40px rgba(255, 105, 180, 0.5),
        0 0 80px rgba(0, 224, 208, 0.25);
    margin-bottom: 0.75rem;
    opacity: 0;
    transform: scale(0.92);
    transition: opacity 700ms cubic-bezier(0.25, 0.46, 0.45, 0.94),
                transform 700ms cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.in-view .section-heading {
    opacity: 1;
    transform: scale(1);
}

/* --- Section Band (subtitle) --- */
.section-band {
    font-family: 'Quicksand', sans-serif;
    font-weight: 500;
    font-size: clamp(0.75rem, 1vw, 1rem);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--electric-mint);
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--ghost-line);
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 500ms ease 150ms,
                transform 500ms ease 150ms;
}

.in-view .section-band {
    opacity: 1;
    transform: translateY(0);
}

/* --- F-Pattern Section Body --- */
.section-body {
    display: flex;
    gap: clamp(1.5rem, 3vw, 3rem);
    align-items: flex-start;
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 500ms ease 200ms,
                transform 500ms ease 200ms;
}

.in-view .section-body {
    opacity: 1;
    transform: translateY(0);
}

.body-text p {
    margin-bottom: 1.25rem;
    color: var(--lavender-mist);
}

.body-text p:last-child {
    margin-bottom: 0;
}

/* --- Focal Objects (CSS-rendered abstract forms) --- */
.focal-object {
    flex-shrink: 0;
    width: 100px;
    height: 100px;
    position: relative;
}

.focal-object-cube {
    width: 90px;
    height: 90px;
    background: linear-gradient(135deg, rgba(255, 105, 180, 0.3), rgba(199, 125, 255, 0.2));
    border: 1px solid rgba(255, 105, 180, 0.4);
    border-radius: 8px;
    transform: rotate(12deg);
    box-shadow:
        0 0 30px rgba(255, 105, 180, 0.2),
        inset 0 0 20px rgba(199, 125, 255, 0.1);
}

.focal-object-sphere {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 35%,
        rgba(0, 224, 208, 0.4),
        rgba(199, 125, 255, 0.2) 60%,
        rgba(13, 2, 33, 0.3));
    border: 1px solid rgba(0, 224, 208, 0.3);
    box-shadow:
        0 0 40px rgba(0, 224, 208, 0.2),
        inset 0 0 30px rgba(0, 224, 208, 0.1);
}

.focal-object-diamond {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, rgba(199, 125, 255, 0.3), rgba(255, 224, 102, 0.2));
    border: 1px solid rgba(199, 125, 255, 0.4);
    transform: rotate(45deg);
    margin: 10px;
    box-shadow:
        0 0 30px rgba(199, 125, 255, 0.2),
        inset 0 0 20px rgba(255, 224, 102, 0.1);
}

.focal-object-prism {
    width: 0;
    height: 0;
    border-left: 50px solid transparent;
    border-right: 50px solid transparent;
    border-bottom: 87px solid rgba(255, 105, 180, 0.25);
    filter: drop-shadow(0 0 20px rgba(255, 105, 180, 0.3));
    position: relative;
}

.focal-object-prism::after {
    content: '';
    position: absolute;
    top: 20px;
    left: -30px;
    width: 0;
    height: 0;
    border-left: 30px solid transparent;
    border-right: 30px solid transparent;
    border-bottom: 52px solid rgba(0, 224, 208, 0.2);
}

.focal-object-ring {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    border: 6px solid rgba(255, 224, 102, 0.4);
    box-shadow:
        0 0 30px rgba(255, 224, 102, 0.2),
        inset 0 0 30px rgba(199, 125, 255, 0.15);
    position: relative;
}

.focal-object-ring::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 224, 102, 0.3), transparent);
}

/* --- Neon Line Accents --- */
.neon-line {
    height: 1px;
    width: 60%;
    margin: 1.5rem auto;
    position: relative;
}

.neon-line-pink {
    background: var(--hot-neon-rose);
    box-shadow:
        0 0 8px var(--hot-neon-rose),
        0 0 20px rgba(255, 105, 180, 0.4);
    animation: neon-flicker-pink 4s ease-in-out infinite;
}

.neon-line-teal {
    background: var(--electric-mint);
    box-shadow:
        0 0 8px var(--electric-mint),
        0 0 20px rgba(0, 224, 208, 0.4);
    animation: neon-flicker-teal 5s ease-in-out infinite;
}

@keyframes neon-flicker-pink {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

@keyframes neon-flicker-teal {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

/* --- Roman Column Silhouettes --- */
.roman-column {
    position: absolute;
    width: 30px;
    opacity: 0.05;
    z-index: 0;
}

.roman-column::before {
    content: '';
    display: block;
    width: 30px;
    height: 200px;
    background: var(--soft-orchid);
    border-radius: 2px;
}

.roman-column::after {
    content: '';
    display: block;
    width: 40px;
    height: 20px;
    background: var(--soft-orchid);
    margin-left: -5px;
    margin-top: -200px;
    clip-path: polygon(10% 100%, 90% 100%, 100% 0%, 0% 0%);
}

.roman-column-left {
    left: -15px;
    top: 50%;
    transform: translateY(-50%);
}

.roman-column-right {
    right: -15px;
    top: 50%;
    transform: translateY(-50%);
}

/* --- Palm Frond Shadows --- */
.palm-frond {
    position: absolute;
    width: 120px;
    height: 120px;
    color: rgba(0, 224, 208, 0.06);
    z-index: 0;
    pointer-events: none;
}

.palm-frond-top-right {
    top: -10px;
    right: -10px;
    animation: palm-sway-right 12s ease-in-out infinite;
}

.palm-frond-top-left {
    top: -10px;
    left: -10px;
    animation: palm-sway-left 12s ease-in-out infinite;
}

@keyframes palm-sway-right {
    0%, 100% { transform: rotate(0deg); }
    50% { transform: rotate(3deg); }
}

@keyframes palm-sway-left {
    0%, 100% { transform: rotate(0deg); }
    50% { transform: rotate(-3deg); }
}

/* --- Navigation Pill --- */
.nav-pill {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 1000;
    background: rgba(45, 20, 80, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(0, 224, 208, 0.3);
    border-radius: 30px;
    padding: 0.6rem 1.2rem;
    font-family: 'Quicksand', sans-serif;
    font-weight: 500;
    font-size: clamp(0.75rem, 1vw, 1rem);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--lavender-mist);
    cursor: pointer;
    transition: transform 300ms cubic-bezier(0.34, 1.56, 0.64, 1),
                border-color 300ms ease;
    user-select: none;
}

.nav-pill:hover {
    transform: scale(1.08);
    border-color: var(--electric-mint);
}

.nav-pill-current {
    color: var(--hot-neon-rose);
}

.nav-pill-separator {
    color: var(--ghost-line);
    margin: 0 0.25rem;
}

.nav-pill-total {
    color: var(--electric-mint);
}

/* --- Navigation Radial Menu --- */
.nav-menu {
    position: fixed;
    bottom: 5rem;
    right: 1rem;
    z-index: 999;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    opacity: 0;
    pointer-events: none;
    transform: translateY(10px) scale(0.95);
    transition: opacity 300ms ease, transform 300ms ease;
}

.nav-menu.open {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0) scale(1);
}

.nav-menu-item {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(45, 20, 80, 0.75);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--ghost-line);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Quicksand', sans-serif;
    font-weight: 500;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    color: var(--lavender-mist);
    cursor: pointer;
    transition: border-color 300ms ease,
                background 300ms ease,
                transform 300ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

.nav-menu-item:hover {
    border-color: var(--hot-neon-rose);
    background: rgba(255, 105, 180, 0.15);
    transform: scale(1.1);
}

.nav-menu-item.active {
    border-color: var(--electric-mint);
    color: var(--electric-mint);
}

/* --- Responsive --- */
@media (max-width: 640px) {
    .section-body {
        flex-direction: column;
        align-items: center;
    }

    .focal-object {
        margin-bottom: 1rem;
    }

    .showroom-panel {
        padding: clamp(1.5rem, 3vw, 2.5rem);
    }

    .roman-column {
        display: none;
    }

    .grid-fragment {
        display: none;
    }

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

    .nav-menu {
        bottom: 4rem;
        right: 0.5rem;
    }
}

@media (max-width: 400px) {
    .hero-title {
        font-size: clamp(2.2rem, 10vw, 3.5rem);
    }

    .palm-frond {
        width: 80px;
        height: 80px;
    }
}
