/* miris.works — Horizontal Scroll Gallery */

:root {
    --bg: #FAFAFA;
    --primary: #1A1A1A;
    --secondary: #4A4A4A;
    --text: #4A4A4A;
    --surface: #F0F0F0;
    --accent: #C8102E;
    --muted: #8A8A8A;
}

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

html, body {
    height: 100%;
    overflow: hidden;
    background-color: var(--bg);
    color: var(--text);
    font-family: 'Karla', sans-serif;
    font-weight: 400;
    font-size: 15px;
    line-height: 1.7;
}

/* Typography */
h1, h2 {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 600;
    color: var(--primary);
    letter-spacing: 0.04em;
}

h2 {
    font-size: 42px;
    margin-bottom: 0;
}

/* Progress Bar */
#progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    height: 2px;
    width: 0%;
    background-color: var(--primary);
    z-index: 200;
    transition: width 0.1s linear;
}

/* Gallery Container */
#gallery {
    display: flex;
    height: 100vh;
    overflow-x: scroll;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

#gallery::-webkit-scrollbar {
    display: none;
}

/* Room */
.room {
    flex: 0 0 100vw;
    width: 100vw;
    height: 100vh;
    scroll-snap-align: start;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    /* Room divider line */
    border-right: 1px solid var(--primary);
}

.room:last-child {
    border-right: none;
}

.room-number {
    position: absolute;
    top: 32px;
    right: 40px;
    font-family: 'Karla', sans-serif;
    font-weight: 400;
    font-size: 11px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--muted);
}

/* Spotlight */
.spotlight {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at 35% 50%, #FAFAFA 0%, #F0F0F0 80%);
    pointer-events: none;
    z-index: 0;
}

/* Entrance Room */
.entrance {
    border-right: 1px solid var(--primary);
}

.entrance-content {
    text-align: center;
    position: relative;
    z-index: 1;
}

.entrance-wordmark {
    font-size: 72px;
    opacity: 0;
    transition: opacity 0.8s ease;
}

.entrance-wordmark.visible {
    opacity: 1;
}

.entrance-underline {
    width: 0;
    height: 1px;
    background-color: var(--primary);
    margin: 16px auto 12px;
    transition: width 0.4s ease;
}

.entrance-underline.visible {
    width: 120px;
}

.entrance-subtitle {
    font-family: 'Karla', sans-serif;
    font-weight: 400;
    font-size: 11px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--muted);
    opacity: 0;
    transition: opacity 0.5s ease;
}

.entrance-subtitle.visible {
    opacity: 1;
}

/* Room Content */
.room-content {
    display: flex;
    align-items: center;
    width: 100%;
    height: 100%;
    padding: 60px;
    position: relative;
    z-index: 1;
    gap: 0;
}

.frame-container {
    width: 60%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-right: 40px;
}

.project-frame {
    border: 8px solid var(--primary);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    max-width: 600px;
    width: 100%;
    opacity: 0;
    transform: scale(0.97);
    transition: opacity 0.5s ease, transform 0.5s ease, box-shadow 0.3s ease;
}

.project-frame.visible {
    opacity: 1;
    transform: scale(1);
}

.project-frame:hover {
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

.project-frame svg {
    display: block;
    width: 100%;
    height: auto;
}

/* Wall Text */
.wall-text {
    width: 30%;
    margin-left: auto;
    padding-right: 60px;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.4s ease 0.2s, transform 0.4s ease 0.2s;
}

.wall-text.visible {
    opacity: 1;
    transform: translateY(0);
}

.project-title {
    margin-bottom: 16px;
}

.wall-rule {
    width: 40px;
    height: 1px;
    background-color: var(--muted);
    margin-bottom: 20px;
}

.project-desc {
    font-size: 15px;
    color: var(--text);
    margin-bottom: 24px;
}

.project-meta {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 6px 16px;
}

.meta-label {
    font-family: 'Karla', sans-serif;
    font-weight: 400;
    font-size: 11px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--muted);
}

.meta-value {
    font-family: 'Karla', sans-serif;
    font-size: 13px;
    color: var(--secondary);
}

/* Navigation Arrows */
.nav-arrow {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    z-index: 150;
    background: transparent;
    border: none;
    font-size: 24px;
    color: var(--primary);
    cursor: pointer;
    opacity: 0.3;
    transition: opacity 0.3s ease, color 0.3s ease;
    padding: 16px;
    font-family: 'Karla', sans-serif;
}

.nav-arrow:hover {
    opacity: 0.8;
    color: var(--accent);
}

.nav-arrow-left {
    left: 16px;
}

.nav-arrow-right {
    right: 16px;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.nav-arrow-right.visible {
    opacity: 0.6;
}

.nav-arrow-right.visible:hover {
    opacity: 0.8;
    color: var(--accent);
}

/* Navigation Dots */
#nav-dots {
    position: fixed;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 12px;
    z-index: 150;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 1.5px solid var(--muted);
    background: transparent;
    cursor: pointer;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.dot.active {
    background-color: var(--primary);
    border-color: var(--primary);
}

.dot:hover {
    border-color: var(--accent);
    background-color: var(--accent);
}

/* Responsive */
@media (max-width: 900px) {
    .room-content {
        flex-direction: column;
        padding: 80px 32px 100px;
        gap: 32px;
    }

    .frame-container {
        width: 100%;
        padding-right: 0;
    }

    .wall-text {
        width: 100%;
        padding-right: 0;
    }

    .project-frame {
        max-width: 400px;
    }

    h2 {
        font-size: 32px;
    }

    .entrance-wordmark {
        font-size: 48px;
    }
}
