/* miris.day — Chrome Luxury Perfumery */
/* Palette: Platinum Mist #f2ede6, Chrome Fog #e4ddd3, Liquid Mercury #b8b0a4, Burnished Steel #7a746c, Dark Espresso #3d3530, Weathered Chrome #8a857e, Rose Gold Flash #d4a88c, Obsidian Warm #2a2622 */

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

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

body {
    font-family: 'DM Sans', sans-serif;
    color: #3d3530;
    background: #f2ede6;
    overflow-x: hidden;
}

/* Isometric Grid Overlay */
body::before {
    content: '';
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    pointer-events: none;
    z-index: 100;
    opacity: 0.15;
    background-image:
        repeating-linear-gradient(0deg, transparent, transparent 119px, #d4cfc6 119px, #d4cfc6 120px),
        repeating-linear-gradient(30deg, transparent, transparent 119px, #d4cfc6 119px, #d4cfc6 120px),
        repeating-linear-gradient(150deg, transparent, transparent 119px, #d4cfc6 119px, #d4cfc6 120px);
}

/* Progress Bar */
#progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: #c0c0c0;
    z-index: 1000;
}

#progress-fill {
    height: 100%;
    width: 0%;
    background: #e8e0d4;
    transition: background-color 0.6s ease;
}

#progress-fill.complete {
    background: #d4a88c;
}

/* Chamber Base */
.chamber {
    min-height: 100vh;
    width: 100%;
    position: relative;
    scroll-snap-align: start;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chamber-content {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 1200px;
    padding: 2rem;
}

/* Watermark */
.watermark {
    position: absolute;
    font-family: 'Pinyon Script', cursive;
    font-size: clamp(8rem, 20vw, 16rem);
    color: #c0b8a8;
    opacity: 0.04;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 1;
    user-select: none;
}

.watermark-dark {
    color: #b8b0a4;
    opacity: 0.06;
}

/* Chamber Transitions */
.chamber-transition {
    height: 48px;
    position: relative;
    overflow: hidden;
    background: linear-gradient(to bottom, #f2ede6, #e4ddd3);
}

.chamber-transition::before {
    content: '';
    position: absolute;
    top: 50%;
    left: -50%;
    width: 200vw;
    height: 1px;
    background: linear-gradient(135deg, #b8b0a4 0%, #d4cfc6 40%, #b8b0a4 100%);
    transform: rotate(15deg);
    transform-origin: center center;
}

.chamber-transition-dark {
    background: linear-gradient(to bottom, #2a2622, #e4ddd3);
}

/* Blotters */
.blotter {
    position: absolute;
    width: 8px;
    height: 120px;
    border-radius: 4px 4px 0 0;
    opacity: 0.6;
    z-index: 3;
}

.blotter-left {
    left: 5%;
    bottom: 15%;
    transform: rotate(-15deg);
    background: linear-gradient(to top, #f2ede6, #d4a88c);
}

.blotter-right {
    right: 5%;
    top: 15%;
    transform: rotate(15deg);
    background: linear-gradient(to top, #f2ede6, #d4a88c);
}

/* Chamber 1 — The Raw Material */
.chamber-1 {
    background: #f2ede6;
    align-items: flex-end;
}

.chamber-1 .chamber-content {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    grid-template-rows: 1fr;
    align-items: end;
    min-height: 80vh;
    padding-bottom: 10vh;
}

.chamber-1-text {
    grid-column: 1 / 4;
    grid-row: 1;
    align-self: end;
    padding-left: 5%;
}

.display-title {
    font-family: 'Caveat', cursive;
    font-weight: 700;
    font-size: clamp(2.5rem, 6vw, 5.5rem);
    letter-spacing: -0.01em;
    line-height: 1.1;
    color: #3d3530;
    margin-bottom: 0.5rem;
}

.display-title-large {
    font-size: clamp(4rem, 9vw, 7rem);
}

.body-tagline {
    font-family: 'DM Sans', sans-serif;
    font-weight: 400;
    font-size: clamp(1rem, 1.2vw, 1.125rem);
    letter-spacing: 0.02em;
    line-height: 1.7;
    color: #5a5550;
}

.chamber-1 .icon-prism {
    grid-column: 5 / 7;
    grid-row: 1;
    align-self: start;
    justify-self: end;
    margin-top: 15vh;
    margin-right: 10%;
}

/* Isometric Icons — Prism */
.icon-prism {
    width: 120px;
    height: 120px;
    position: relative;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.prism-top {
    position: absolute;
    width: 60px;
    height: 35px;
    background: #d4cfc6;
    top: 10px;
    left: 30px;
    clip-path: polygon(50% 0%, 100% 100%, 0% 100%);
    transform: scaleY(0.6);
}

.prism-left {
    position: absolute;
    width: 30px;
    height: 60px;
    background: #7a746c;
    top: 28px;
    left: 30px;
    transform: skewY(30deg);
}

.prism-right {
    position: absolute;
    width: 30px;
    height: 60px;
    background: #b8b0a4;
    top: 28px;
    left: 60px;
    transform: skewY(-30deg);
}

/* Isometric Icons — Bottle */
.icon-bottle {
    width: 80px;
    height: 100px;
    position: relative;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.bottle-cap {
    position: absolute;
    width: 20px;
    height: 12px;
    background: #7a746c;
    top: 0;
    left: 30px;
    border-radius: 2px 2px 0 0;
}

.bottle-neck {
    position: absolute;
    width: 12px;
    height: 20px;
    background: #b8b0a4;
    top: 12px;
    left: 34px;
}

.bottle-body {
    position: absolute;
    width: 40px;
    height: 45px;
    background: linear-gradient(135deg, #b8b0a4 0%, #d4cfc6 40%, #b8b0a4 100%);
    top: 32px;
    left: 20px;
    border-radius: 2px;
}

.bottle-base {
    position: absolute;
    width: 44px;
    height: 8px;
    background: #7a746c;
    top: 77px;
    left: 18px;
    border-radius: 0 0 2px 2px;
}

/* Chamber 2 — The Distillation */
.chamber-2 {
    background: #e4ddd3;
}

.chamber-2 .chamber-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    padding-left: 10%;
}

.bottle-row {
    display: flex;
    gap: 80px;
    margin-bottom: 3rem;
    transform: rotate(0deg);
}

.bottle-row .icon-bottle {
    transform: translateY(0);
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.bottle-row .icon-bottle.lifted {
    transform: translateY(-6px);
}

.fragrance-notes {
    font-family: 'Caveat', cursive;
    font-weight: 400;
    font-size: clamp(1.5rem, 3vw, 2.5rem);
    color: #3d3530;
    letter-spacing: 0.01em;
}

.note-word, .note-separator {
    display: inline-block;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.note-word.visible, .note-separator.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Chamber 3 — The Composition */
.chamber-3 {
    background: #f2ede6;
}

.chamber-3 .chamber-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.composition-grid {
    display: grid;
    grid-template-columns: repeat(3, 80px);
    grid-template-rows: repeat(3, 80px);
    gap: 20px;
    margin-bottom: 3rem;
}

.iso-cube {
    width: 60px;
    height: 60px;
    position: relative;
    cursor: pointer;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    justify-self: center;
    align-self: center;
}

.iso-cube:hover {
    transform: translateY(-6px);
}

.iso-cube:hover .cube-label {
    opacity: 1;
    transform: translateY(-10px);
}

.cube-top {
    position: absolute;
    width: 40px;
    height: 24px;
    background: #d4cfc6;
    top: 0;
    left: 10px;
    clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
}

.cube-left {
    position: absolute;
    width: 20px;
    height: 30px;
    background: #7a746c;
    top: 12px;
    left: 10px;
    transform: skewY(30deg);
}

.cube-right {
    position: absolute;
    width: 20px;
    height: 30px;
    background: #b8b0a4;
    top: 12px;
    left: 30px;
    transform: skewY(-30deg);
}

.cube-label {
    position: absolute;
    top: -5px;
    left: 50%;
    transform: translateX(-50%) translateY(0);
    font-family: 'Caveat', cursive;
    font-weight: 700;
    font-size: 1.1rem;
    color: #d4a88c;
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
    white-space: nowrap;
    pointer-events: none;
}

.composition-text {
    text-align: center;
}

/* Cube color variations */
.iso-cube:nth-child(1) .cube-top { background: #b8b0a4; }
.iso-cube:nth-child(2) .cube-top { background: #c4bdb3; }
.iso-cube:nth-child(3) .cube-top { background: #d4cfc6; }
.iso-cube:nth-child(4) .cube-top { background: #c4bdb3; }
.iso-cube:nth-child(5) .cube-top { background: #b8b0a4; }
.iso-cube:nth-child(6) .cube-top { background: #c4bdb3; }
.iso-cube:nth-child(7) .cube-top { background: #d4cfc6; }
.iso-cube:nth-child(8) .cube-top { background: #b8b0a4; }
.iso-cube:nth-child(9) .cube-top { background: #c4bdb3; }

/* Chamber 4 — The Vessel */
.chamber-4 {
    background: #2a2622;
    color: #f2ede6;
}

.chamber-4 .body-tagline,
.chamber-4 .body-text {
    color: #d8d0c0;
}

.chamber-4-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.display-subtitle {
    font-family: 'Caveat', cursive;
    font-weight: 700;
    font-size: clamp(2rem, 4vw, 3.5rem);
    letter-spacing: -0.01em;
    line-height: 1.2;
    color: #f2ede6;
    margin-bottom: 1.5rem;
}

.body-text {
    font-family: 'DM Sans', sans-serif;
    font-weight: 400;
    font-size: clamp(1rem, 1.2vw, 1.125rem);
    letter-spacing: 0.02em;
    line-height: 1.7;
    color: #d8d0c0;
}

/* Large Vessel Bottle */
.vessel-bottle {
    display: flex;
    justify-content: center;
    align-items: center;
}

.large-bottle {
    width: 120px;
    height: 200px;
    position: relative;
}

.lg-bottle-cap {
    position: absolute;
    width: 36px;
    height: 20px;
    background: #8a857e;
    top: 0;
    left: 42px;
    border-radius: 3px 3px 0 0;
}

.lg-bottle-neck {
    position: absolute;
    width: 20px;
    height: 35px;
    background: #b8b0a4;
    top: 20px;
    left: 50px;
}

.lg-bottle-body {
    position: absolute;
    width: 80px;
    height: 100px;
    background: linear-gradient(135deg, #b8b0a4 0%, #d4cfc6 40%, #b8b0a4 100%);
    top: 55px;
    left: 20px;
    border-radius: 4px;
}

.lg-bottle-base {
    position: absolute;
    width: 90px;
    height: 14px;
    background: #7a746c;
    top: 155px;
    left: 15px;
    border-radius: 0 0 4px 4px;
}

.lg-bottle-highlight {
    position: absolute;
    width: 8px;
    height: 60px;
    background: rgba(244, 240, 234, 0.15);
    top: 70px;
    left: 35px;
    border-radius: 4px;
}

.blotter-vessel-left {
    position: absolute;
    left: 8%;
    bottom: 20%;
    width: 8px;
    height: 120px;
    border-radius: 4px 4px 0 0;
    background: linear-gradient(to top, #2a2622, #d4a88c);
    opacity: 0.6;
    transform: rotate(-15deg);
    z-index: 3;
    animation: pulse 4s ease-in-out infinite;
}

.blotter-vessel-right {
    position: absolute;
    right: 8%;
    bottom: 25%;
    width: 8px;
    height: 120px;
    border-radius: 4px 4px 0 0;
    background: linear-gradient(to top, #2a2622, #d4a88c);
    opacity: 0.6;
    transform: rotate(15deg);
    z-index: 3;
    animation: pulse 4s ease-in-out infinite;
    animation-delay: 2s;
}

@keyframes pulse {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 0.7; }
}

/* Chamber 5 — The Day */
.chamber-5 {
    background: linear-gradient(to bottom, #e4ddd3, #f2ede6);
}

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

.handwritten-closing {
    font-family: 'Caveat', cursive;
    font-weight: 400;
    font-size: clamp(1.3rem, 2.5vw, 2rem);
    color: #5a5550;
    margin-bottom: 3rem;
    margin-top: 0.5rem;
}

.summary-icons {
    display: flex;
    gap: 60px;
    align-items: center;
    justify-content: center;
}

.summary-icon {
    position: relative;
    cursor: pointer;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.summary-icon:hover {
    transform: translateY(-6px);
}

.summary-icon:hover .summary-label {
    opacity: 1;
    transform: translateY(8px);
}

.summary-label {
    position: absolute;
    bottom: -25px;
    left: 50%;
    transform: translateX(-50%) translateY(0);
    font-family: 'Caveat', cursive;
    font-weight: 700;
    font-size: 1.2rem;
    color: #d4a88c;
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
    white-space: nowrap;
    pointer-events: none;
}

/* Hover-lift for interactive elements */
.hover-lift {
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.hover-lift:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 32px rgba(42, 38, 34, 0.08);
}

/* Isometric grid row skew */
.chamber-1 .chamber-content,
.chamber-3 .chamber-content {
    transform: skewY(-3deg);
}

.chamber-1 .chamber-content > *,
.chamber-3 .chamber-content > * {
    transform: skewY(3deg);
}

.chamber-2 .chamber-content {
    transform: skewY(0deg);
}

/* Responsive */
@media (max-width: 768px) {
    html {
        scroll-snap-type: none;
    }

    .chamber {
        min-height: 100vh;
        height: auto;
    }

    .chamber-1 .chamber-content {
        grid-template-columns: 1fr;
        padding-bottom: 5vh;
        transform: skewY(-1.5deg);
    }

    .chamber-1 .chamber-content > * {
        transform: skewY(1.5deg);
    }

    .chamber-1-text {
        grid-column: 1;
        padding-left: 0;
    }

    .chamber-1 .icon-prism {
        grid-column: 1;
        justify-self: start;
        margin-top: 2rem;
        margin-right: 0;
    }

    .chamber-2 .chamber-content {
        padding-left: 5%;
    }

    .bottle-row {
        gap: 40px;
    }

    .chamber-3 .chamber-content {
        transform: skewY(-1.5deg);
    }

    .chamber-3 .chamber-content > * {
        transform: skewY(1.5deg);
    }

    .composition-grid {
        grid-template-columns: repeat(3, 70px);
        grid-template-rows: repeat(3, 70px);
        gap: 12px;
    }

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

    .vessel-bottle {
        order: -1;
    }

    .summary-icons {
        gap: 30px;
    }

    .blotter-vessel-left,
    .blotter-vessel-right {
        display: none;
    }
}
