/* archaic.studio - Brutalist Art Deco */
/* Palette: Concrete #3c3c3c, Obsidian #1a1a1a, Gold Leaf #c9a84c, Bronze #8b6914, Alabaster #f0ece2, Patina #4a7c59, Shadow #0d0d0d */

:root {
    --concrete: #3c3c3c;
    --obsidian: #1a1a1a;
    --gold: #c9a84c;
    --bronze: #8b6914;
    --alabaster: #f0ece2;
    --patina: #4a7c59;
    --shadow: #0d0d0d;
    --gutter: 50px;
}

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

html {
    scroll-behavior: auto;
}

body {
    background-color: var(--shadow);
    color: var(--alabaster);
    font-family: 'Libre Baskerville', serif;
    font-weight: 400;
    line-height: 1.65;
    overflow-x: hidden;
}

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

/* ========================================
   ENTRANCE OVERLAY (ceremonial reveal)
   ======================================== */
.entrance-overlay {
    position: fixed;
    inset: 0;
    background: #000000;
    z-index: 1000;
    pointer-events: none;
    opacity: 1;
    transition: opacity 1.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.entrance-overlay.revealed {
    opacity: 0;
}

/* ========================================
   GALLERY ROOM (base for all sections)
   ======================================== */
.gallery-room {
    min-height: 100vh;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    overflow: hidden;
    /* Clip-path for room transition */
    clip-path: inset(0 0 0 0);
    will-change: clip-path;
}

/* Concrete texture surface (SVG noise overlay) */
.concrete-surface {
    position: absolute;
    inset: 0;
    background: var(--concrete);
    filter: url(#noise);
    opacity: 0.35;
    pointer-events: none;
    z-index: 0;
}

.dark-concrete {
    background: var(--obsidian);
    opacity: 0.25;
}

.vault-surface {
    background: var(--obsidian);
    opacity: 0.2;
}

/* Vignette (gallery lighting simulation) */
.vignette {
    position: absolute;
    inset: 0;
    box-shadow: inset 0 0 200px 60px rgba(0, 0, 0, 0.55);
    pointer-events: none;
    z-index: 1;
}

.vignette-deep {
    box-shadow: inset 0 0 250px 80px rgba(0, 0, 0, 0.7);
}

.vignette-light {
    box-shadow: inset 0 0 200px 60px rgba(0, 0, 0, 0.08);
}

/* ========================================
   THE ENTRANCE
   ======================================== */
.entrance {
    background: var(--concrete);
    min-height: 100vh;
    z-index: 10;
}

/* Radial lighting reveal */
.entrance-light {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(60, 60, 60, 0.6) 0%, transparent 70%);
    transform: translate(-50%, -50%);
    z-index: 2;
    pointer-events: none;
    transition: width 2.5s cubic-bezier(0.2, 0, 0.3, 1), height 2.5s cubic-bezier(0.2, 0, 0.3, 1);
}

.entrance-light.lit {
    width: 200vmax;
    height: 200vmax;
}

/* Art-deco border with animated lines */
.deco-border {
    position: absolute;
    inset: 24px;
    pointer-events: none;
    z-index: 5;
}

.deco-line {
    position: absolute;
    background: var(--gold);
    transform-origin: left top;
}

.deco-top {
    top: 0;
    left: 0;
    height: 1px;
    width: 0;
    transition: width 1.2s cubic-bezier(0.4, 0, 0.2, 1) 0.6s;
}

.deco-bottom {
    bottom: 0;
    right: 0;
    height: 1px;
    width: 0;
    transition: width 1.2s cubic-bezier(0.4, 0, 0.2, 1) 0.9s;
}

.deco-right {
    top: 0;
    right: 0;
    width: 1px;
    height: 0;
    transition: height 1.2s cubic-bezier(0.4, 0, 0.2, 1) 1.2s;
}

.deco-left {
    bottom: 0;
    left: 0;
    width: 1px;
    height: 0;
    transition: height 1.2s cubic-bezier(0.4, 0, 0.2, 1) 1.5s;
}

.deco-border.drawn .deco-top { width: 100%; }
.deco-border.drawn .deco-bottom { width: 100%; }
.deco-border.drawn .deco-right { height: 100%; }
.deco-border.drawn .deco-left { height: 100%; }

/* Corner ornaments */
.deco-corner-ornament {
    position: absolute;
    width: 50px;
    height: 50px;
    opacity: 0;
    transition: opacity 0.6s ease 2.2s;
    z-index: 6;
}

.deco-border.drawn .deco-corner-ornament {
    opacity: 1;
}

.deco-corner-ornament.tl { top: -1px; left: -1px; }
.deco-corner-ornament.tr { top: -1px; right: -1px; }
.deco-corner-ornament.bl { bottom: -1px; left: -1px; }
.deco-corner-ornament.br { bottom: -1px; right: -1px; }

.deco-corner-ornament svg {
    width: 100%;
    height: 100%;
}

/* Debossed brand title */
.debossed-title {
    font-family: 'Bebas Neue', sans-serif;
    font-size: clamp(80px, 18vw, 200px);
    text-align: center;
    line-height: 0.88;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: transparent;
    background: var(--concrete);
    background-clip: text;
    -webkit-background-clip: text;
    text-shadow:
        2px 2px 3px rgba(0, 0, 0, 0.5),
        -1px -1px 2px rgba(240, 236, 226, 0.3);
    position: relative;
    z-index: 4;
    opacity: 0;
    transform: scale(0.97);
    transition: opacity 2s cubic-bezier(0.4, 0, 0.2, 1) 0.4s, transform 2s cubic-bezier(0.4, 0, 0.2, 1) 0.4s;
}

.debossed-title.revealed {
    opacity: 1;
    transform: scale(1);
}

/* Gold horizontal rules */
.gold-rule {
    height: 1px;
    background: var(--gold);
    position: relative;
    z-index: 4;
}

.entrance-rule {
    width: 0;
    margin-top: 2.5rem;
    transition: width 1.5s cubic-bezier(0.4, 0, 0.2, 1) 1.8s;
}

.entrance-rule.revealed {
    width: 120px;
}

/* Decorative zigzag/step strips */
.deco-strip {
    position: absolute;
    left: 0;
    right: 0;
    z-index: 4;
    opacity: 0.6;
}

.entrance-strip {
    bottom: 0;
    opacity: 0;
    transition: opacity 1s ease 2.5s;
}

.entrance-strip.revealed {
    opacity: 0.6;
}

.hall-strip-top {
    top: 0;
}

.hall-strip-bottom {
    bottom: 0;
}

/* ========================================
   MAIN HALL - GALLERY ROOMS
   ======================================== */
.hall-room {
    background: var(--concrete);
    padding: var(--gutter);
}

#hall2 {
    background: var(--obsidian);
}

#hall3 {
    background: var(--concrete);
}

/* Kintsugi gold crack canvas overlay */
.kintsugi-canvas {
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
    opacity: 0;
    transition: opacity 1s ease;
}

.kintsugi-canvas.active {
    opacity: 1;
}

/* Brutalist grid */
.brutalist-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--gutter);
    max-width: 1100px;
    width: 100%;
    position: relative;
    z-index: 3;
    padding: var(--gutter);
}

/* Visible grid lines */
.brutalist-grid::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    width: 1px;
    height: 100%;
    background: rgba(201, 168, 76, 0.12);
    transform: translateX(-50%);
}

.brutalist-grid::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    height: 1px;
    background: rgba(201, 168, 76, 0.08);
    transform: translateY(-50%);
}

.single-plinth-grid {
    grid-template-columns: 1fr;
}

.single-plinth-grid::before {
    display: none;
}

.grid-cell {
    display: flex;
    align-items: center;
    justify-content: center;
}

.full-width-cell {
    grid-column: 1 / -1;
}

/* Plinths (museum pedestals) */
.plinth {
    background: var(--concrete);
    padding: 2.5rem 2.5rem 2rem;
    width: 100%;
    max-width: 480px;
    box-shadow: 20px 20px 0px var(--shadow);
    position: relative;
    opacity: 0;
    transform: translateY(60px);
    transition: opacity 1.5s ease, transform 1.5s cubic-bezier(0.2, 0, 0.3, 1);
}

.plinth.visible {
    opacity: 1;
    transform: translateY(0);
}

.plinth-dark {
    background: var(--concrete);
    border-left: 3px solid var(--gold);
}

.plinth-wide {
    max-width: 780px;
}

.plinth::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--gold), var(--bronze), transparent);
}

.catalogue {
    font-family: 'Space Mono', monospace;
    font-size: 0.62rem;
    font-weight: 400;
    color: var(--gold);
    letter-spacing: 0.18em;
    text-transform: uppercase;
    font-variant: small-caps;
    display: block;
    margin-bottom: 1rem;
}

.plinth-title {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.75rem;
    color: var(--alabaster);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin-bottom: 0.8rem;
    line-height: 1;
}

.plinth-body {
    font-family: 'Libre Baskerville', serif;
    font-size: 0.88rem;
    line-height: 1.65;
    color: rgba(240, 236, 226, 0.65);
}

.plinth-body-columns {
    display: flex;
    gap: 2rem;
}

.plinth-body-columns .plinth-body {
    flex: 1;
}

/* Bronze disc markers */
.disc-markers {
    display: flex;
    gap: 8px;
    margin-top: 1.5rem;
    justify-content: center;
}

/* ========================================
   THE VAULT
   ======================================== */
.vault {
    background: var(--obsidian);
    min-height: 100vh;
}

.vault-statement {
    position: relative;
    z-index: 3;
    text-align: center;
    opacity: 0;
    transform: translateY(60px);
    transition: opacity 1.5s ease, transform 1.5s cubic-bezier(0.2, 0, 0.3, 1);
}

.vault-statement.visible {
    opacity: 1;
    transform: translateY(0);
}

.vault-text {
    font-family: 'Bebas Neue', sans-serif;
    font-size: clamp(48px, 10vw, 140px);
    color: var(--gold);
    line-height: 0.95;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.patina-accent-element {
    margin-top: 3rem;
    position: relative;
    z-index: 3;
    opacity: 0;
    transform: scale(0.5) rotate(-45deg);
    transition: opacity 1.2s ease 0.5s, transform 1.2s cubic-bezier(0.2, 0, 0.3, 1) 0.5s;
}

.vault-statement.visible ~ .patina-accent-element {
    opacity: 1;
    transform: scale(1) rotate(0deg);
}

.vault-deco-strip {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 3;
    opacity: 0.5;
}

/* ========================================
   THE ARCHIVE
   ======================================== */
.archive-room {
    background: var(--alabaster);
    color: var(--obsidian);
    min-height: 100vh;
    padding: 6rem 4rem;
    gap: 2.5rem;
}

.archive-header {
    text-align: center;
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 1.2s ease, transform 1.2s cubic-bezier(0.2, 0, 0.3, 1);
}

.archive-header.visible {
    opacity: 1;
    transform: translateY(0);
}

.catalogue-dark {
    color: var(--bronze);
}

.archive-header-rule {
    width: 60px;
    margin: 1rem auto 0;
}

.archive-columns {
    display: flex;
    gap: 4rem;
    max-width: 860px;
    width: 100%;
    position: relative;
    z-index: 2;
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 1.2s ease 0.2s, transform 1.2s cubic-bezier(0.2, 0, 0.3, 1) 0.2s;
}

.archive-columns.visible {
    opacity: 1;
    transform: translateY(0);
}

.archive-col {
    flex: 1;
}

.bronze-disc-bullet {
    margin-bottom: 0.8rem;
}

.archive-body {
    font-family: 'Libre Baskerville', serif;
    font-size: 0.88rem;
    line-height: 1.7;
    color: rgba(26, 26, 26, 0.78);
}

.archive-footer {
    text-align: center;
    margin-top: 2rem;
    position: relative;
    z-index: 2;
}

.gold-rule-final {
    width: 0;
    height: 1px;
    background: var(--gold);
    margin: 0 auto 1.5rem;
    transition: width 2s cubic-bezier(0.4, 0, 0.2, 1);
}

.gold-rule-final.visible {
    width: 280px;
}

.footer-mark {
    font-size: 0.58rem;
    letter-spacing: 0.25em;
}

/* ========================================
   ROOM CLIP-PATH TRANSITIONS
   ======================================== */
.hall-room {
    clip-path: inset(0 100% 0 0);
    transition: clip-path 0s;
}

.hall-room.room-entered {
    clip-path: inset(0 0 0 0);
}

/* ========================================
   RESPONSIVE
   ======================================== */
@media (max-width: 900px) {
    :root {
        --gutter: 30px;
    }

    .brutalist-grid {
        grid-template-columns: 1fr;
        padding: var(--gutter);
    }

    .brutalist-grid::before {
        display: none;
    }

    .plinth {
        max-width: 100%;
    }

    .plinth-wide {
        max-width: 100%;
    }

    .plinth-body-columns {
        flex-direction: column;
        gap: 1rem;
    }

    .archive-columns {
        flex-direction: column;
        gap: 2rem;
    }

    .archive-room {
        padding: 4rem 2rem;
    }

    .deco-border {
        inset: 12px;
    }

    .deco-corner-ornament {
        width: 35px;
        height: 35px;
    }

    .vault-text {
        font-size: clamp(36px, 10vw, 100px);
    }
}

@media (max-width: 600px) {
    :root {
        --gutter: 20px;
    }

    .gallery-room {
        padding: 3rem 1.2rem;
    }

    .plinth {
        padding: 1.5rem 1.5rem 1.2rem;
        box-shadow: 12px 12px 0px var(--shadow);
    }

    .deco-border {
        inset: 8px;
    }

    .deco-corner-ornament {
        width: 24px;
        height: 24px;
    }

    .debossed-title {
        font-size: clamp(48px, 16vw, 120px);
    }

    .archive-room {
        padding: 3rem 1.5rem;
    }
}
