/* gabs.review — Mid-Century Modern Exhibition
   Palette: #2b2b2b #f7f3ec #5c4a3a #e8dfd2 #7a7168 #c4704e
   Type: Sora (display), Source Serif 4 (body), Outfit (labels)
*/

:root {
    --cream: #f7f3ec;
    --carbon: #2b2b2b;
    --terracotta: #c4704e;
    --sand: #e8dfd2;
    --slate: #7a7168;
    --teak: #5c4a3a;

    --rule-color: rgba(43, 43, 43, 0.15);
    --divider-color: rgba(43, 43, 43, 0.20);

    --font-display: "Sora", "Inter", system-ui, sans-serif;
    --font-body: "Source Serif 4", "Lora", Georgia, serif;
    --font-label: "Outfit", "Inter", system-ui, sans-serif;

    --base-size: 1.05rem;
    --line-leading: 1.8;

    --gutter: clamp(1.75rem, 5vw, 5rem);
    --gutter-y: clamp(2rem, 6vh, 5.5rem);

    --band-width: 32%;
}

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

html {
    scroll-behavior: smooth;
    background: var(--cream);
}

body {
    font-family: var(--font-body);
    font-size: var(--base-size);
    line-height: var(--line-leading);
    color: var(--carbon);
    background: var(--cream);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Gallery scroll-snap */
.gallery {
    scroll-snap-type: y mandatory;
    height: 100vh;
    overflow-y: scroll;
    overflow-x: hidden;
    scrollbar-width: thin;
    scrollbar-color: var(--teak) transparent;
}

.gallery::-webkit-scrollbar {
    width: 6px;
}
.gallery::-webkit-scrollbar-track { background: transparent; }
.gallery::-webkit-scrollbar-thumb {
    background: rgba(92, 74, 58, 0.3);
    border-radius: 3px;
}

/* ROOM (section) base */
.room {
    position: relative;
    width: 100vw;
    height: 100vh;
    scroll-snap-align: start;
    scroll-snap-stop: always;
    overflow: hidden;
    padding: 0;
    background: var(--cream);
}

.room-marker {
    position: absolute;
    bottom: 1.4rem;
    right: clamp(1.25rem, 3vw, 2.5rem);
    font-family: var(--font-label);
    font-size: 0.7rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--slate);
    z-index: 5;
    pointer-events: none;
}

/* ============================================
   FOYER
   ============================================ */
.foyer {
    background: var(--cream);
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: var(--gutter-y) var(--gutter);
}

.band {
    position: absolute;
    top: 0;
    bottom: 0;
    width: var(--band-width);
    background: var(--terracotta);
    z-index: 0;
}
.band-left { left: 0; width: 28%; }
.band-right { right: 0; width: 28%; }

.foyer-inner {
    position: relative;
    z-index: 2;
    margin-left: 32%;
    width: min(60vw, 920px);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.eyebrow {
    font-family: var(--font-label);
    font-size: 0.78rem;
    font-weight: 500;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--teak);
    margin-bottom: 1.25rem;
}

.foyer-rule {
    height: 1px;
    background: var(--carbon);
    opacity: 0.35;
    width: 100%;
}
.rule-top { margin-bottom: 1rem; }
.rule-bottom { margin-top: 1rem; }

.hero-word {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(3rem, 12vw, 9.5rem);
    line-height: 0.95;
    letter-spacing: 0.03em;
    color: var(--carbon);
    width: 100%;
}

.foyer-meta {
    margin-top: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.foyer-domain {
    font-family: var(--font-label);
    font-size: 0.95rem;
    letter-spacing: 0.06em;
    color: var(--carbon);
    font-weight: 500;
}

.foyer-sub {
    font-family: var(--font-body);
    font-size: clamp(1rem, 1.2vw, 1.15rem);
    color: var(--slate);
    font-style: italic;
    max-width: 36em;
}

.foyer-scroll {
    margin-top: 3rem;
    font-family: var(--font-label);
    font-size: 0.78rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--teak);
    animation: nudge 2.4s ease-in-out infinite;
}

@keyframes nudge {
    0%, 100% { transform: translateY(0); opacity: 0.7; }
    50% { transform: translateY(4px); opacity: 1; }
}

/* ============================================
   SPLIT PANELS (Room One & Two)
   ============================================ */
.split {
    display: grid;
    width: 100%;
    height: 100%;
}

.split-55-45 {
    grid-template-columns: 55fr 1px 45fr;
}

.split-45-55 {
    grid-template-columns: 45fr 1px 55fr;
}

.panel {
    padding: var(--gutter-y) var(--gutter);
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 1.1rem;
    overflow: hidden;
    position: relative;
    z-index: 1;
}

.panel-divider {
    background: var(--divider-color);
    width: 1px;
    height: 100%;
}

.panel-terracotta {
    background: var(--terracotta);
    color: var(--cream);
}

.panel-cream {
    background: var(--cream);
    color: var(--carbon);
}

.panel-cream-light {
    background: var(--sand);
    color: var(--carbon);
}

.panel-charcoal {
    background: var(--carbon);
    color: var(--cream);
}

/* Typography inside panels */
.panel-label {
    font-family: var(--font-label);
    font-size: 0.78rem;
    font-weight: 500;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: inherit;
    opacity: 0.78;
}

.panel-terracotta .panel-label,
.panel-charcoal .panel-label {
    color: var(--cream);
    opacity: 0.82;
}
.panel-cream .panel-label,
.panel-cream-light .panel-label {
    color: var(--teak);
    opacity: 1;
}

.panel-label.center { text-align: center; }

.panel-headline {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(2rem, 4.4vw, 3.6rem);
    line-height: 1.05;
    letter-spacing: 0.02em;
    margin-top: 0.4rem;
    margin-bottom: 0.6rem;
    color: inherit;
    max-width: 14ch;
}

.panel-subhead {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(1.4rem, 2.2vw, 1.95rem);
    line-height: 1.15;
    letter-spacing: 0.01em;
    margin-top: 0.4rem;
    margin-bottom: 0.6rem;
    color: inherit;
    max-width: 18ch;
}

.panel-body {
    font-family: var(--font-body);
    font-size: clamp(1rem, 1.15vw, 1.12rem);
    line-height: 1.8;
    color: inherit;
    max-width: 42em;
}

.panel-terracotta .panel-body,
.panel-charcoal .panel-body {
    color: rgba(247, 243, 236, 0.93);
}

.panel-body em {
    font-style: italic;
    color: inherit;
}

.panel-list {
    list-style: none;
    margin: 0.5rem 0 0.25rem;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.6;
}
.panel-list li {
    display: flex;
    align-items: baseline;
    gap: 0.85rem;
    border-bottom: 1px solid var(--rule-color);
    padding-bottom: 0.45rem;
}
.list-num {
    font-family: var(--font-label);
    font-size: 0.78rem;
    letter-spacing: 0.12em;
    color: var(--terracotta);
    text-transform: uppercase;
    min-width: 1.6em;
}

.panel-caption {
    font-family: var(--font-body);
    font-style: italic;
    font-size: 0.95rem;
    color: var(--slate);
    margin-top: 0.5rem;
}
.caption-light {
    color: rgba(247, 243, 236, 0.7);
}

/* Metric block (Room Two right panel) */
.metric-block {
    margin-top: 0.75rem;
    border-top: 1px solid rgba(247, 243, 236, 0.22);
    padding-top: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}
.metric-line {
    display: flex;
    justify-content: space-between;
    gap: 1.5rem;
    align-items: baseline;
    border-bottom: 1px solid rgba(247, 243, 236, 0.12);
    padding-bottom: 0.5rem;
    font-size: 0.92rem;
}
.metric-key {
    font-family: var(--font-label);
    font-size: 0.74rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--terracotta);
    flex-shrink: 0;
}
.metric-val {
    font-family: var(--font-body);
    color: rgba(247, 243, 236, 0.9);
    text-align: right;
    font-style: italic;
}

/* Starburst asterisk motif */
.starburst {
    display: inline-block;
    position: relative;
    width: 18px;
    height: 18px;
    margin-top: 0.75rem;
}
.starburst::before,
.starburst::after,
.starburst > i {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 18px;
    height: 1.25px;
    background: var(--terracotta);
    transform-origin: center;
    transform: translate(-50%, -50%) rotate(0deg);
}
.starburst::after {
    transform: translate(-50%, -50%) rotate(60deg);
}
.panel-terracotta .starburst::before,
.panel-terracotta .starburst::after,
.panel-charcoal .starburst::before,
.panel-charcoal .starburst::after {
    background: var(--cream);
}
/* Use box-shadow trick to make a third bar */
.starburst {
    background:
        linear-gradient(var(--terracotta), var(--terracotta)) center/100% 1.25px no-repeat,
        linear-gradient(var(--terracotta), var(--terracotta)) center/100% 1.25px no-repeat,
        linear-gradient(var(--terracotta), var(--terracotta)) center/100% 1.25px no-repeat;
}

/* Replace pseudo approach with three-line via clip-path-friendly version */
.starburst {
    background: none;
    width: 20px;
    height: 20px;
}
.starburst::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(0deg, transparent calc(50% - 0.6px), currentColor calc(50% - 0.6px), currentColor calc(50% + 0.6px), transparent calc(50% + 0.6px)),
        linear-gradient(60deg, transparent calc(50% - 0.6px), currentColor calc(50% - 0.6px), currentColor calc(50% + 0.6px), transparent calc(50% + 0.6px)),
        linear-gradient(120deg, transparent calc(50% - 0.6px), currentColor calc(50% - 0.6px), currentColor calc(50% + 0.6px), transparent calc(50% + 0.6px));
    color: var(--terracotta);
}
.starburst::after { content: none; }
.panel-terracotta .starburst::before,
.panel-charcoal .starburst::before {
    color: var(--cream);
}

/* Quarter-circle motif in Room Two (lower-left of charcoal panel) */
.quarter-circle {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 38vmin;
    height: 38vmin;
    border-radius: 100% 0 0 0;
    background: var(--terracotta);
    opacity: 0.16;
    z-index: 0;
    pointer-events: none;
}

/* ============================================
   THE CORRIDOR
   ============================================ */
.corridor {
    background: var(--cream);
    height: 40vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 0 var(--gutter);
}

.corridor-bar {
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    height: 18vh;
    max-height: 90px;
    background: var(--terracotta);
    opacity: 0.10;
    z-index: 0;
}

.corridor-rule {
    position: absolute;
    top: 50%;
    height: 1px;
    background: var(--carbon);
    opacity: 0.35;
    width: 22%;
    z-index: 1;
}
.rule-left { left: 0; }
.rule-right { right: 0; }

.pull-quote {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 48ch;
    margin: 0 auto;
    font-family: var(--font-body);
    font-style: italic;
    color: var(--carbon);
}
.pull-quote p {
    font-size: clamp(1.1rem, 2vw, 1.6rem);
    line-height: 1.45;
    letter-spacing: 0.005em;
}
.pull-quote cite {
    display: block;
    margin-top: 1.1rem;
    font-style: normal;
    font-family: var(--font-label);
    font-size: 0.74rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--slate);
}

/* ============================================
   ROOM THREE: VERDICT
   ============================================ */
.room-three {
    background: var(--cream);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--gutter-y) var(--gutter);
}

.verdict-circle {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50vh;
    height: 50vh;
    min-width: 360px;
    min-height: 360px;
    border-radius: 50%;
    background: var(--terracotta);
    opacity: 0.15;
    z-index: 0;
    pointer-events: none;
}

.verdict-inner {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 60ch;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.1rem;
}

.verdict-headline {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(2.1rem, 5vw, 4rem);
    line-height: 1.05;
    letter-spacing: 0.02em;
    color: var(--carbon);
    margin: 0.4rem 0 0.7rem;
}

.verdict-body {
    font-family: var(--font-body);
    font-size: clamp(1rem, 1.2vw, 1.15rem);
    line-height: 1.8;
    color: var(--carbon);
    max-width: 42em;
}

.verdict-meta {
    margin-top: 1rem;
    border-top: 1px solid var(--rule-color);
    border-bottom: 1px solid var(--rule-color);
    padding: 0.85rem 0;
    width: min(380px, 70%);
}
.verdict-grade-line {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 1.5rem;
}
.verdict-grade-key {
    font-family: var(--font-label);
    font-size: 0.78rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--teak);
}
.verdict-grade-val {
    font-family: var(--font-body);
    font-style: italic;
    color: var(--carbon);
    font-size: 1.05rem;
}

.verdict-stamp {
    position: absolute;
    bottom: clamp(1.5rem, 5vh, 3rem);
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 40px;
    border: 1.5px solid var(--teak);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3;
}
.stamp-glyph {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1rem;
    color: var(--teak);
    letter-spacing: 0;
    line-height: 1;
}

/* ============================================
   THE EXIT
   ============================================ */
.exit-room {
    background: var(--cream);
    height: 30vh;
    min-height: 240px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 var(--gutter);
    scroll-snap-align: end;
}

.exit-inner {
    text-align: center;
    width: min(720px, 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.9rem;
}

.exit-mark {
    font-family: var(--font-label);
    font-weight: 500;
    font-size: 0.95rem;
    letter-spacing: 0.18em;
    color: var(--carbon);
}

.exit-rule {
    width: 100%;
    height: 1px;
    background: var(--carbon);
    opacity: 0.30;
}

.exit-meta {
    font-family: var(--font-label);
    font-size: 0.7rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--slate);
    line-height: 1.6;
}

/* ============================================
   HIDDEN NAVIGATION
   ============================================ */
.nav-trigger {
    position: fixed;
    top: clamp(1rem, 2.5vh, 1.75rem);
    right: clamp(1rem, 2.5vw, 1.75rem);
    width: 38px;
    height: 38px;
    background: rgba(247, 243, 236, 0.85);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    border: 1px solid var(--rule-color);
    cursor: pointer;
    z-index: 100;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 4px;
    padding: 0;
    transition: background 0.3s ease, border-color 0.3s ease;
}
.nav-trigger:hover {
    background: var(--cream);
    border-color: var(--teak);
}
.nav-trigger-line {
    display: block;
    width: 16px;
    height: 1px;
    background: var(--carbon);
    transition: transform 0.3s ease, opacity 0.3s ease;
}
.nav-trigger.is-open .nav-trigger-line:nth-child(1) {
    transform: translateY(5px) rotate(45deg);
}
.nav-trigger.is-open .nav-trigger-line:nth-child(2) {
    opacity: 0;
}
.nav-trigger.is-open .nav-trigger-line:nth-child(3) {
    transform: translateY(-5px) rotate(-45deg);
}

.nav-panel {
    position: fixed;
    top: clamp(3.75rem, 7vh, 5rem);
    right: clamp(1rem, 2.5vw, 1.75rem);
    width: min(320px, 80vw);
    background: var(--cream);
    border: 1px solid var(--rule-color);
    padding: 1.5rem 1.25rem 1.25rem;
    z-index: 99;
    opacity: 0;
    transform: translateY(-8px);
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s ease;
    box-shadow: 0 12px 40px -16px rgba(43, 43, 43, 0.18);
}
.nav-panel:not([hidden]) {
    display: block;
}
.nav-panel.is-visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.nav-panel-label {
    font-family: var(--font-label);
    font-size: 0.7rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--teak);
    margin-bottom: 0.85rem;
    padding-bottom: 0.6rem;
    border-bottom: 1px solid var(--rule-color);
}

.nav-panel-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}
.nav-panel-list a {
    display: flex;
    align-items: baseline;
    gap: 0.85rem;
    padding: 0.55rem 0.25rem;
    text-decoration: none;
    color: var(--carbon);
    font-family: var(--font-body);
    font-size: 0.95rem;
    border-bottom: 1px solid transparent;
    transition: color 0.25s ease, border-color 0.25s ease;
}
.nav-panel-list a:hover,
.nav-panel-list a.is-current {
    color: var(--terracotta);
    border-bottom-color: rgba(196, 112, 78, 0.25);
}
.nav-num {
    font-family: var(--font-label);
    font-size: 0.7rem;
    letter-spacing: 0.16em;
    color: var(--slate);
    min-width: 2em;
}

/* ============================================
   FADE-IN ANIMATION (Intersection Observer)
   ============================================ */
.fade {
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
    will-change: opacity, transform;
}
.fade.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    :root {
        --gutter: 1.4rem;
        --gutter-y: 1.5rem;
    }

    .foyer-inner {
        margin-left: 0;
        width: 100%;
        padding-top: 22vh;
    }
    .band-left, .band-right {
        left: 0;
        right: 0;
        width: 100%;
        height: 18vh;
        bottom: auto;
    }

    .hero-word {
        font-size: clamp(2.4rem, 14vw, 4.5rem);
    }

    .split-55-45,
    .split-45-55 {
        grid-template-columns: 1fr;
        grid-template-rows: 1fr 1px 1fr;
    }
    .panel-divider {
        width: 100%;
        height: 1px;
    }

    /* Darker panel goes on top per design */
    .room-one .panel-terracotta { order: 1; }
    .room-one .panel-divider { order: 2; }
    .room-one .panel-cream { order: 3; }

    .room-two .panel-charcoal { order: 1; }
    .room-two .panel-divider { order: 2; }
    .room-two .panel-cream-light { order: 3; }

    .panel {
        padding: 1.5rem 1.25rem;
        gap: 0.7rem;
        justify-content: flex-start;
    }
    .panel-headline { font-size: clamp(1.5rem, 6vw, 2.2rem); max-width: none; }
    .panel-subhead { font-size: clamp(1.15rem, 4.5vw, 1.5rem); max-width: none; }
    .panel-body { font-size: 0.95rem; line-height: 1.65; }

    .quarter-circle { width: 50vmin; height: 50vmin; }

    .corridor { height: 40vh; padding: 0 1rem; }
    .corridor-rule { width: 12%; }
    .pull-quote p { font-size: 1.1rem; }

    .verdict-circle { width: 70vmin; height: 70vmin; min-width: 0; min-height: 0; }
    .verdict-headline { font-size: clamp(1.6rem, 7vw, 2.4rem); }
    .verdict-body { font-size: 0.95rem; }

    .nav-trigger { width: 34px; height: 34px; }
}

@media (max-width: 480px) {
    .room-marker { display: none; }
    .foyer-meta { margin-top: 1rem; }
    .foyer-scroll { margin-top: 1.5rem; }
}
