/* ===================================
   bada.style - Vaporwave Department Store
   ===================================
   Colors:
     Background - Frosted Lavender: #EDE5F4
     Primary Text - Deep Wisteria: #3D2C5E
     Secondary Text - Muted Orchid: #5A4E6B
     Accent Warm - Faded Peach: #F4C6A0
     Accent Cool - Soft Periwinkle: #B8A9CC
     Image Tint - Rose Quartz: #E8B4C8
     Grid Lines - Phantom Lilac: #D4B8E0
     Highlight - Sunset Melon: #F2A07B
     Deep Background: #F8F2FC
     Warm Mid: #F4EDE5
     Cool End: #E0D5EE
   =================================== */

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

:root {
    --bg-color: #EDE5F4;
    --bg-primary: #EDE5F4;
    --bg-warm: #F4EDE5;
    --bg-cool: #E0D5EE;
    --bg-deep: #F8F2FC;
    --text-primary: #3D2C5E;
    --text-secondary: #5A4E6B;
    --accent-warm: #F4C6A0;
    --accent-cool: #B8A9CC;
    --image-tint: #E8B4C8;
    --grid-lines: #D4B8E0;
    --highlight: #F2A07B;
    --grid-opacity: 0.15;
}

html {
    scroll-snap-type: y proximity;
    scroll-behavior: smooth;
}

body {
    font-family: 'DM Sans', sans-serif;
    background: radial-gradient(ellipse at center, var(--bg-color) 0%, var(--bg-deep) 100%);
    color: var(--text-primary);
    overflow-x: hidden;
    transition: background 1.2s ease;
}

/* SVG Filters - Hidden */
.svg-filters {
    position: absolute;
    width: 0;
    height: 0;
    overflow: hidden;
}

/* ===================================
   Grid Overlay
   =================================== */
.grid-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 10;
    background: repeating-linear-gradient(
        to right,
        rgba(212, 184, 224, var(--grid-opacity)) 0px,
        rgba(212, 184, 224, var(--grid-opacity)) 1px,
        transparent 1px,
        transparent calc(100% / 12)
    );
    transition: opacity 0.8s ease;
}

.grid-overlay.pulse {
    animation: gridPulse 0.8s ease;
}

@keyframes gridPulse {
    0% { --grid-opacity: 0.15; }
    50% { --grid-opacity: 0.4; }
    100% { --grid-opacity: 0.15; }
}

/* ===================================
   Crosshair
   =================================== */
.crosshair {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 11;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.crosshair.visible {
    opacity: 0.2;
}

.crosshair-h {
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    height: 1px;
    background: var(--grid-lines);
}

.crosshair-v {
    position: absolute;
    top: 0;
    left: 50%;
    width: 1px;
    height: 100%;
    background: var(--grid-lines);
}

/* ===================================
   Floor Indicator
   =================================== */
.floor-indicator {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 100;
    font-family: 'Space Mono', monospace;
    font-size: 0.6875rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--accent-cool);
    opacity: 0.4;
    overflow: hidden;
    height: 1.2em;
}

.floor-indicator-inner {
    transition: transform 0.4s cubic-bezier(0.33, 1, 0.68, 1);
}

.floor-num {
    display: block;
    line-height: 1.2;
}

/* ===================================
   Floors / Sections
   =================================== */
.floors {
    position: relative;
    z-index: 5;
}

.floor {
    min-height: 100vh;
    scroll-snap-align: start;
    position: relative;
    display: flex;
    align-items: center;
    padding: 4rem 8.333%;
}

/* ===================================
   Vintage Photo Treatment
   =================================== */
.vintage-photo {
    position: relative;
    border-radius: 2px;
    overflow: hidden;
}

.photo-inner {
    width: 100%;
    height: 100%;
    filter: saturate(0.3) contrast(0.85) brightness(1.05);
}

.photo-tint {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--image-tint);
    mix-blend-mode: multiply;
    opacity: 0.25;
}

.photo-grain {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    filter: url(#grain);
    opacity: 0.05;
    mix-blend-mode: overlay;
    background: rgba(255, 255, 255, 0.5);
}

.vintage-photo::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    box-shadow: inset 0 0 0 1px rgba(212, 184, 224, 0.3);
    border-radius: 2px;
    pointer-events: none;
}

/* Photo grid-line junction accent */
.vintage-photo::before {
    content: '';
    position: absolute;
    top: -1px;
    left: -1px;
    right: -1px;
    bottom: -1px;
    border: 2px solid var(--accent-warm);
    border-radius: 2px;
    opacity: 0;
    transition: opacity 0.6s ease;
    pointer-events: none;
    z-index: 2;
}

.vintage-photo:hover::before {
    opacity: 0.4;
}

/* Photo Captions */
.photo-caption {
    display: block;
    font-family: 'Space Mono', monospace;
    font-size: 0.6875rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--accent-cool);
    opacity: 0.6;
    margin-top: 0.75rem;
}

/* ===================================
   Typography
   =================================== */
.hero-title {
    font-family: 'Epilogue', sans-serif;
    font-variation-settings: 'wght' 300;
    font-size: clamp(3.5rem, 10vw, 8rem);
    text-transform: lowercase;
    letter-spacing: 0.15em;
    line-height: 1.0;
    color: var(--text-primary);
    animation: breathe 6s ease-in-out infinite;
}

.hero-title.loading {
    font-variation-settings: 'wght' 100;
    animation: none;
}

@keyframes breathe {
    0%, 100% { font-variation-settings: 'wght' 280; }
    50% { font-variation-settings: 'wght' 320; }
}

@keyframes titleLoad {
    from { font-variation-settings: 'wght' 100; }
    to { font-variation-settings: 'wght' 300; }
}

.hero-subtitle {
    font-family: 'DM Sans', sans-serif;
    font-weight: 300;
    font-size: clamp(0.9rem, 1.5vw, 1.15rem);
    letter-spacing: 0.15em;
    text-transform: lowercase;
    color: var(--text-secondary);
    margin-top: 1.5rem;
    opacity: 0;
    transform: translateX(20px);
    transition: opacity 1.5s ease 1s, transform 1.5s ease 1s;
}

.hero-subtitle.visible {
    opacity: 1;
    transform: translateX(0);
}

.section-heading {
    font-family: 'Epilogue', sans-serif;
    font-variation-settings: 'wght' 200;
    font-size: clamp(2rem, 5vw, 4rem);
    text-transform: lowercase;
    letter-spacing: 0.15em;
    line-height: 1.0;
    color: var(--text-primary);
    margin-bottom: 2rem;
    transition: font-variation-settings 0.8s ease;
}

.section-heading.in-view {
    font-variation-settings: 'wght' 400;
}

.body-text {
    font-family: 'DM Sans', sans-serif;
    font-weight: 400;
    font-size: clamp(1rem, 1.2vw, 1.15rem);
    line-height: 1.75;
    letter-spacing: 0.01em;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

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

/* ===================================
   Floor 1: The Atrium
   =================================== */
.floor-1 .floor-content {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 4rem;
    width: 100%;
    align-items: center;
}

.atrium-text {
    grid-column: 1;
}

.atrium-image {
    grid-column: 2;
}

.photo-atrium {
    width: 100%;
    height: 60vh;
    clip-path: polygon(0% 0%, 100% 0%, 100% 100%, 0% 100%);
    transition: clip-path 1s ease;
}

/* ===================================
   Floor 2: The Gallery
   =================================== */
.floor-2 .floor-content {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    grid-template-rows: auto auto;
    gap: 2rem;
    width: 100%;
    align-items: start;
}

.gallery-image-1 {
    grid-column: 2 / 6;
    grid-row: 1;
}

.photo-gallery-1 {
    width: 100%;
    height: 50vh;
    clip-path: polygon(0% 0%, 100% 0%, 100% 100%, 0% 100%);
    transition: clip-path 1s ease;
}

.gallery-image-2 {
    grid-column: 7 / 11;
    grid-row: 1;
    margin-top: 8vh;
}

.photo-gallery-2 {
    width: 100%;
    height: 40vh;
    clip-path: polygon(0% 0%, 100% 0%, 100% 100%, 0% 100%);
    transition: clip-path 1s ease;
}

.gallery-text {
    grid-column: 1 / 6;
    grid-row: 2;
    padding-top: 2rem;
}

/* ===================================
   Floor 3: The Lounge
   =================================== */
.floor-3 .floor-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6rem;
    width: 100%;
    align-items: center;
}

.lounge-text {
    max-width: 520px;
}

.lounge-image {
    display: flex;
    justify-content: flex-end;
}

.photo-lounge {
    width: 80%;
    height: 55vh;
    clip-path: polygon(0% 0%, 100% 0%, 100% 100%, 0% 100%);
    transition: clip-path 1s ease;
}

/* ===================================
   Floor 4: The Archive
   =================================== */
.floor-4 {
    flex-direction: column;
    justify-content: center;
}

.floor-4 .floor-content {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.archive-heading {
    text-align: center;
    margin-bottom: 3rem;
}

.archive-mosaic {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    max-width: 900px;
    width: 100%;
}

.archive-item {
    text-align: center;
}

.archive-item-1 {
    transform: translateY(1rem) rotate(-1deg);
}

.archive-item-2 {
    transform: translateY(-0.5rem) rotate(0.5deg);
}

.archive-item-3 {
    transform: translateY(1.5rem) rotate(-0.5deg);
}

.archive-item-4 {
    transform: translateY(0) rotate(1deg);
}

.photo-archive {
    width: 100%;
    height: 30vh;
    clip-path: polygon(0% 0%, 100% 0%, 100% 100%, 0% 100%);
    transition: clip-path 1s ease;
}

/* ===================================
   Floor 5: The Exit
   =================================== */
.floor-5 {
    justify-content: center;
}

.floor-5 .floor-content {
    width: 100%;
}

.exit-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.exit-title {
    font-family: 'Epilogue', sans-serif;
    font-variation-settings: 'wght' 200;
    font-size: clamp(2rem, 5vw, 4rem);
    text-transform: lowercase;
    letter-spacing: 0.15em;
    line-height: 1.0;
    color: var(--text-primary);
    transition: font-variation-settings 0.8s ease;
}

.exit-title.in-view {
    font-variation-settings: 'wght' 400;
}

.exit-rule {
    border: none;
    height: 1px;
    background: rgba(212, 184, 224, 0.3);
    width: 200px;
    margin: 3rem auto;
}

.exit-image {
    margin-top: 2rem;
    width: 100%;
    max-width: 600px;
}

.photo-exit {
    width: 100%;
    height: 30vh;
    opacity: 0.5;
    transition: opacity 2s ease;
    clip-path: polygon(0% 0%, 100% 0%, 100% 100%, 0% 100%);
}

.floor-5.active .photo-exit {
    opacity: 0.15;
}

/* ===================================
   Horizontal Rules Between Sections
   =================================== */
.floor::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: rgba(212, 184, 224, 0.15);
}

.floor-5::after {
    display: none;
}

/* ===================================
   Background Color Morphing
   =================================== */
body.floor-bg-1 {
    background: radial-gradient(ellipse at center, #EDE5F4 0%, #F8F2FC 100%);
}

body.floor-bg-2 {
    background: radial-gradient(ellipse at center, #F0E8F5 0%, #F8F2FC 100%);
}

body.floor-bg-3 {
    background: radial-gradient(ellipse at center, #F4EDE5 0%, #F8F2FC 100%);
}

body.floor-bg-4 {
    background: radial-gradient(ellipse at center, #EEE6F0 0%, #F8F2FC 100%);
}

body.floor-bg-5 {
    background: radial-gradient(ellipse at center, #E0D5EE 0%, #F8F2FC 100%);
}

/* ===================================
   Responsive (below 768px)
   =================================== */
@media (max-width: 768px) {
    .floor {
        padding: 3rem 6%;
    }

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

    .atrium-text {
        grid-column: 1;
    }

    .atrium-image {
        grid-column: 1;
    }

    .photo-atrium {
        height: 40vh;
    }

    .floor-2 .floor-content {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
    }

    .gallery-image-1 {
        grid-column: 1;
        grid-row: auto;
    }

    .gallery-image-2 {
        grid-column: 1;
        grid-row: auto;
        margin-top: 0;
    }

    .gallery-text {
        grid-column: 1;
        grid-row: auto;
    }

    .photo-gallery-1,
    .photo-gallery-2 {
        height: 35vh;
    }

    .floor-3 .floor-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

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

    .photo-lounge {
        width: 100%;
        height: 35vh;
    }

    .archive-mosaic {
        grid-template-columns: repeat(2, 1fr);
    }

    .archive-item-1,
    .archive-item-2,
    .archive-item-3,
    .archive-item-4 {
        transform: none;
    }

    .photo-archive {
        height: 25vh;
    }

    .floor-indicator {
        bottom: 1rem;
        left: 1rem;
        right: auto;
    }

    /* 4-column grid on mobile */
    .grid-overlay {
        background: repeating-linear-gradient(
            to right,
            rgba(212, 184, 224, 0.15) 0px,
            rgba(212, 184, 224, 0.15) 1px,
            transparent 1px,
            transparent calc(100% / 4)
        );
    }
}
