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

html, body {
    width: 100%;
    height: 100%;
    font-family: 'Lora', serif;
    color: #3A3438;
    overflow-x: hidden;
}

body {
    background-color: #F2EDE4;
}

/* Typography */

h1 {
    font-family: 'Bungee Shade', cursive;
    font-weight: 400;
    color: #5B4E5A;
}

h2 {
    font-family: 'Bungee Shade', cursive;
    font-weight: 400;
    color: #5B4E5A;
}

body {
    font-size: clamp(0.95rem, 1.2vw, 1.1rem);
    line-height: 1.75;
    color: #3A3438;
}

/* Modules Base */

.module {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 60px 20px;
    scroll-behavior: smooth;
}

.module-0 {
    background-color: #F2EDE4;
    min-height: 80vh;
}

.module-1 {
    background-color: #E8D8C8;
    min-height: 150vh;
}

.module-2 {
    background-color: #D4CCC0;
    min-height: 100vh;
}

.module-3 {
    background-color: #5B4E5A;
    min-height: 100vh;
}

.module-4 {
    background-color: #F2EDE4;
    min-height: 60vh;
}

/* Module 0: Nameplate */

.nameplate {
    text-align: center;
    animation: fadeInNameplate 1.5s ease-out;
}

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

.studio-name {
    font-size: clamp(3rem, 8vw, 6rem);
    margin-bottom: 20px;
    animation: fadeIn 0.8s ease-out;
}

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

.subtitle {
    font-size: 1.1rem;
    font-style: italic;
    color: #8A7E78;
    margin-bottom: 30px;
    animation: fadeIn 0.8s ease-out 0.4s both;
}

.icons-row {
    display: flex;
    justify-content: center;
    gap: 32px;
    margin-bottom: 30px;
    animation: fadeIn 0.8s ease-out 0.8s both;
}

.icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

.divider-line {
    width: 80px;
    height: 1px;
    background-color: #A09890;
    margin: 0 auto;
    animation: drawLine 0.8s ease-out 1.2s both;
}

@keyframes drawLine {
    0% {
        width: 0;
    }
    100% {
        width: 80px;
    }
}

/* Module 1: Specimens */

.specimens-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    width: 100%;
    max-width: 700px;
    margin: 0 auto;
    padding: 60px 20px;
}

.specimen-card {
    background-color: #D4C4B0;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease-out;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.06);
}

.specimen-card:nth-child(1) {
    background-color: #D4C4B0;
}

.specimen-card:nth-child(2) {
    background-color: #C4D4CC;
}

.specimen-card:nth-child(3) {
    background-color: #D8C8D4;
}

.specimen-card:nth-child(4) {
    background-color: #C8C8D8;
}

.specimen-card:nth-child(5) {
    background-color: #D4D4C0;
    grid-column: 1 / -1;
    width: 50%;
    margin: 0 auto;
}

.specimen-illustration {
    margin-bottom: 16px;
    width: 100%;
    height: auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.specimen-illustration svg {
    width: 100%;
    max-width: 240px;
    height: auto;
}

.specimen-label {
    font-family: 'DM Mono', monospace;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #8A7E78;
    font-style: italic;
}

/* Specimen Illustration Variants */

.bell-jar,
.microscope,
.tuning-fork,
.zero-gravity,
.blueprint {
    width: 100%;
    height: auto;
}

.icon-magnet,
.icon-compass,
.icon-spiral {
    width: 24px;
    height: 24px;
}

/* Tilt 3D Effect */

.specimen-card {
    transform-style: preserve-3d;
    perspective: 800px;
}

.specimen-card:hover {
    box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.12);
}

/* Module 2: Process Timeline */

.process-timeline {
    display: flex;
    flex-direction: column;
    gap: 40px;
    max-width: 500px;
    margin: 0 auto;
    padding: 60px 20px;
    position: relative;
}

.process-timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: calc(100% - 80px);
    background-color: #8A7E78;
    top: 40px;
}

.timeline-step {
    display: flex;
    gap: 40px;
    align-items: center;
    position: relative;
}

.timeline-step:nth-child(odd) {
    flex-direction: row;
}

.timeline-step:nth-child(even) {
    flex-direction: row-reverse;
}

.step-circle {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background-color: #E8D8C8;
    border: 2px solid #3A3438;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    position: relative;
    z-index: 1;
}

.step-number {
    font-family: 'Bungee Shade', cursive;
    font-size: 1.2rem;
    font-weight: 400;
    color: #5B4E5A;
    animation: bounceIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.timeline-step:nth-child(1) .step-number {
    animation-delay: 0.2s;
}

.timeline-step:nth-child(2) .step-number {
    animation-delay: 0.4s;
}

.timeline-step:nth-child(3) .step-number {
    animation-delay: 0.6s;
}

.timeline-step:nth-child(4) .step-number {
    animation-delay: 0.8s;
}

@keyframes bounceIn {
    0% {
        transform: scale(0);
    }
    70% {
        transform: scale(1.15);
    }
    100% {
        transform: scale(1);
    }
}

.step-text {
    flex: 1;
}

.step-text p {
    font-family: 'Lora', serif;
    font-size: 1rem;
    color: #3A3438;
    font-weight: 400;
}

/* Module 3: Exhibition */

.exhibition-card {
    background-color: #F2EDE4;
    border-radius: 12px;
    padding: 40px;
    text-align: center;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
    max-width: 500px;
}

.monopole-masterwork {
    width: 100%;
    max-width: 400px;
    height: auto;
    margin-bottom: 20px;
}

.exhibition-label {
    font-family: 'Bungee Shade', cursive;
    font-size: clamp(1.4rem, 3vw, 2.2rem);
    color: #E8D8C8;
    font-weight: 400;
}

/* Module 4: Farewell */

.farewell {
    text-align: center;
    padding: 40px 20px;
}

.farewell-text {
    font-family: 'Lora', serif;
    font-size: 1.2rem;
    font-style: italic;
    color: #8A7E78;
    margin-bottom: 40px;
}

.icons-farewell {
    margin-bottom: 0;
}

.rotating {
    animation: rotate var(--rotation-speed, 30s) linear infinite;
}

@keyframes rotate {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* Blur-Focus Transition */

.module {
    filter: blur(0px);
    transition: filter 0.3s ease-out;
}

.module.blur-leaving {
    filter: blur(8px);
}

.module.blur-entering {
    filter: blur(8px);
}

.module.blur-entering.in-focus {
    filter: blur(0px);
}

/* Responsive Design */

@media (max-width: 900px) {
    .specimens-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .specimen-card:nth-child(5) {
        width: 70%;
    }
}

@media (max-width: 600px) {
    .specimens-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 40px 15px;
    }

    .specimen-card {
        width: 100%;
    }

    .specimen-card:nth-child(5) {
        width: 100%;
    }

    .module {
        padding: 40px 15px;
    }

    .module-0 {
        min-height: auto;
        padding-top: 60px;
        padding-bottom: 60px;
    }

    .module-1 {
        min-height: auto;
    }

    .module-4 {
        min-height: auto;
    }

    .icons-row {
        gap: 24px;
    }

    .process-timeline::before {
        height: calc(100% - 60px);
        top: 30px;
    }

    .timeline-step {
        gap: 20px;
    }

    .step-circle {
        width: 40px;
        height: 40px;
    }

    .step-number {
        font-size: 1rem;
    }

    .exhibition-card {
        padding: 20px;
    }

    .farewell-text {
        font-size: 1rem;
    }
}

/* Touch device tilt-3d disable */

@media (hover: none) and (pointer: coarse) {
    .specimen-card {
        transform: none !important;
        box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.06) !important;
    }
}

/* Prevent blur on mobile */

@media (max-width: 600px) {
    .module {
        filter: none !important;
    }

    .module.blur-leaving,
    .module.blur-entering {
        filter: none !important;
    }
}
