/* =====================================================
   footprint.bar — Forensic / Architectural / Choreographic
   Palette:
   #1A1A1E  Evidence Ink
   #7A7A82  Photocopy Gray
   #F0EBE0  Vellum Cream
   #C4882A  Amber Tag
   #2B2D54  Pressure Indigo
   #D4DFC7  Fluorescent Wash
   #8B3A3A  Redaction Oxide
   ===================================================== */

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

html {
    scroll-behavior: auto;
    background: #1A1A1E;
}

body {
    font-family: 'Libre Baskerville', Georgia, serif;
    background: #1A1A1E;
    color: #F0EBE0;
    overflow-x: hidden;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

/* =====================================================
   STAFF LINES (persistent vertical grid)
   ===================================================== */
.staff-lines {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 1;
    background-image: repeating-linear-gradient(
        to right,
        rgba(122, 122, 130, 0.15) 0,
        rgba(122, 122, 130, 0.15) 0.5px,
        transparent 0.5px,
        transparent 120px
    );
    opacity: 0;
    transition: opacity 1.2s linear, background-image 0.4s linear;
}

.staff-lines.visible {
    opacity: 1;
}

.staff-lines.arch-mode {
    background-image: repeating-linear-gradient(
        to right,
        rgba(26, 26, 30, 0.20) 0,
        rgba(26, 26, 30, 0.20) 0.5px,
        transparent 0.5px,
        transparent 120px
    );
}

.staff-lines.choreo-mode {
    background-image: repeating-linear-gradient(
        to right,
        rgba(196, 136, 42, 0.55) 0,
        rgba(196, 136, 42, 0.55) 1.5px,
        transparent 1.5px,
        transparent 120px
    );
}

/* =====================================================
   SECTION FRAMEWORK
   ===================================================== */
.section {
    position: relative;
    width: 100%;
    z-index: 2;
    transition: background-color 0.2s linear, color 0.2s linear;
}

.opening {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 38% 62%;
    background: #1A1A1E;
    color: #F0EBE0;
}

.forensic-register {
    background: #1A1A1E;
    color: #F0EBE0;
}

.forensic-panel {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 38% 62%;
    border-bottom: 1px solid rgba(122, 122, 130, 0.2);
    background: linear-gradient(rgba(212, 223, 199, 0.025), rgba(212, 223, 199, 0.025)), #1A1A1E;
}

.architectural-register {
    background: #F0EBE0;
    color: #1A1A1E;
    min-height: 200vh;
    padding-top: 4rem;
}

.arch-panel {
    min-height: 180vh;
    display: grid;
    grid-template-columns: 38% 62%;
}

.choreographic-register {
    background: #1A1A1E;
    color: #F0EBE0;
    min-height: 200vh;
    padding-top: 4rem;
}

.choreo-panel {
    min-height: 180vh;
    display: grid;
    grid-template-columns: 38% 62%;
}

.colophon {
    min-height: 50vh;
    background: #1A1A1E;
    color: #F0EBE0;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* =====================================================
   LEFT MARGIN (evidence margin)
   ===================================================== */
.left-margin {
    padding: 4rem 2rem 4rem 3rem;
    border-right: 0.5px solid rgba(122, 122, 130, 0.35);
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.left-margin-arch {
    border-right-color: rgba(26, 26, 30, 0.35);
}

/* =====================================================
   EVIDENCE STAMPS
   ===================================================== */
.evidence-stamp {
    display: inline-block;
    border: 1px solid #8B3A3A;
    padding: 0.3rem 0.7rem;
    margin-bottom: 1rem;
    margin-left: 8px;
    align-self: flex-start;
    transform: rotate(-0.5deg) scale(0.95);
    opacity: 0;
    transition: opacity 0.4s linear, transform 0.4s linear;
}

.evidence-stamp.stamped {
    opacity: 1;
    transform: rotate(0deg) scale(1);
}

.evidence-stamp .stamp-text {
    font-family: 'IBM Plex Mono', monospace;
    font-size: clamp(0.6rem, 1vw, 0.72rem);
    letter-spacing: 0.18em;
    color: #8B3A3A;
    font-variant: small-caps;
    text-transform: uppercase;
    font-weight: 400;
}

.stamp-arch .stamp-text {
    color: #8B3A3A;
}

/* =====================================================
   MARGIN ANNOTATIONS (typewriter)
   ===================================================== */
.margin-annotation {
    overflow: hidden;
    white-space: nowrap;
    display: block;
    line-height: 1.4;
}

.margin-annotation .annotation-code,
.margin-annotation .annotation-desc {
    font-family: 'IBM Plex Mono', monospace;
    font-size: clamp(0.65rem, 1.2vw, 0.85rem);
    letter-spacing: 0.06em;
    color: #F0EBE0;
    font-weight: 400;
    display: inline-block;
}

.margin-annotation .annotation-code {
    text-transform: uppercase;
    color: #C4882A;
    font-weight: 400;
}

.margin-annotation .annotation-desc {
    color: #7A7A82;
    font-weight: 300;
    text-transform: none;
    font-style: italic;
}

.annotation-dark {
    color: #1A1A1E !important;
}

.annotation-code.annotation-dark {
    color: #8B3A3A !important;
}

.annotation-desc.annotation-dark {
    color: #2B2D54 !important;
}

/* Typewriter effect: animate width from 0 to 100% via steps() */
.margin-annotation[data-animate="typewriter"] .annotation-code,
.margin-annotation[data-animate="typewriter"] .annotation-desc {
    max-width: 0;
    overflow: hidden;
    white-space: nowrap;
    border-right: 1px solid transparent;
    vertical-align: bottom;
}

.margin-annotation.typing .annotation-code,
.margin-annotation.typing .annotation-desc {
    animation: typewriter 1.4s steps(40, end) forwards;
    border-right-color: #C4882A;
}

.margin-annotation.typed .annotation-code,
.margin-annotation.typed .annotation-desc {
    max-width: 100%;
    border-right-color: transparent;
}

@keyframes typewriter {
    from { max-width: 0; }
    to   { max-width: 100%; }
}

/* =====================================================
   RIGHT PANEL
   ===================================================== */
.right-panel {
    padding: 4rem 3rem;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* =====================================================
   FOOTPRINT RENDERS (general)
   ===================================================== */
.footprint-render,
.footprint-opening,
.arch-render,
.laban-staff {
    position: relative;
    transform: translateX(60px);
    opacity: 0;
    transition: transform 0.8s cubic-bezier(0.25, 0.1, 0.25, 1.0),
                opacity 0.8s cubic-bezier(0.25, 0.1, 0.25, 1.0);
}

.footprint-render.revealed,
.footprint-opening.revealed,
.arch-render.revealed,
.laban-staff.revealed {
    transform: translateX(0);
    opacity: 1;
}

.footprint-svg {
    display: block;
    height: 70vh;
    width: auto;
    max-width: 100%;
}

.hero-footprint {
    height: 70vh;
}

/* Hero footprint reveal layers */
.fp-layer {
    transition: opacity 1.6s linear;
}

.fp-silhouette {
    opacity: 0;
}

.fp-silhouette.developed {
    opacity: 1;
}

.fp-contours.developed,
.fp-ridges.developed,
.fp-landmarks.developed {
    opacity: 1 !important;
}

.hero-footprint {
    transform: translateY(60px);
    opacity: 0;
    transition: transform 2s cubic-bezier(0.25, 0.1, 0.25, 1.0),
                opacity 2s cubic-bezier(0.25, 0.1, 0.25, 1.0);
}

.hero-footprint.rising {
    transform: translateY(0);
    opacity: 1;
}

/* =====================================================
   EVIDENCE MARKERS (numbered circles)
   ===================================================== */
.evidence-marker {
    position: absolute;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 1.5px solid #C4882A;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(26, 26, 30, 0.85);
    color: #C4882A;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 10px;
    font-weight: 400;
    letter-spacing: 0.04em;
    opacity: 0;
    transform: scale(0.4);
}

.evidence-marker.stamped {
    opacity: 1;
    transform: scale(1);
    transition: none;
}

#marker-01 {
    left: 56%;
    bottom: 22%;
}

.footprint-render .evidence-marker {
    left: 12%;
    top: 8%;
}

.marker-arch {
    background: rgba(240, 235, 224, 0.9);
    color: #8B3A3A;
    border-color: #8B3A3A;
    left: 8% !important;
    top: 4% !important;
}

/* =====================================================
   SCALE BAR (alternating segments)
   ===================================================== */
.scale-bar {
    margin-top: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.scale-segments {
    width: 120px;
    height: 8px;
    background: repeating-linear-gradient(
        to right,
        #1A1A1E 0,
        #1A1A1E 12px,
        #F0EBE0 12px,
        #F0EBE0 24px
    );
    border: 0.5px solid #7A7A82;
}

.opening-scale .scale-segments,
.forensic-panel .scale-segments {
    background: repeating-linear-gradient(
        to right,
        #1A1A1E 0,
        #1A1A1E 12px,
        #F0EBE0 12px,
        #F0EBE0 24px
    );
}

.scale-label {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.65rem;
    letter-spacing: 0.08em;
    color: #7A7A82;
    text-transform: uppercase;
}

/* =====================================================
   EXHIBIT LABEL (opening)
   ===================================================== */
.exhibit-label {
    position: absolute;
    left: 3rem;
    bottom: 3rem;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    border-left: 2px solid #C4882A;
    padding-left: 0.9rem;
    opacity: 0;
    transform: translateX(-12px);
    transition: opacity 0.6s linear, transform 0.6s linear;
}

.exhibit-label.shown {
    opacity: 1;
    transform: translateX(0);
}

.exhibit-code {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.8rem;
    color: #C4882A;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.exhibit-domain {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.7rem;
    color: #7A7A82;
    letter-spacing: 0.12em;
}

.exhibit-title {
    font-family: 'Instrument Serif', 'Libre Baskerville', serif;
    font-size: 1.4rem;
    color: #F0EBE0;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    margin-top: 0.2rem;
}

/* =====================================================
   LANDMARK LABELS (SVG text inside footprint diagrams)
   ===================================================== */
.landmark-label {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 9px;
    fill: #C4882A;
    letter-spacing: 0.06em;
}

/* =====================================================
   REGISTER TITLES
   ===================================================== */
.register-title {
    text-align: center;
    padding: 3rem 0 2rem;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s linear, transform 0.8s linear;
}

.register-title.shown {
    opacity: 1;
    transform: translateY(0);
}

.register-title h2 {
    font-family: 'Instrument Serif', 'Libre Baskerville', serif;
    font-weight: 400;
    font-size: clamp(2.5rem, 5vw, 5rem);
    letter-spacing: 0.15em;
    text-transform: uppercase;
    line-height: 1;
}

.architectural-register .register-title h2 {
    color: #1A1A1E;
}

.choreographic-register .register-title h2 {
    color: #F0EBE0;
}

/* =====================================================
   SECTION CUT INDICATORS (transitions)
   ===================================================== */
.section-cut {
    width: 100%;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.2rem;
    background: #1A1A1E;
    color: #F0EBE0;
    border-top: 1px solid rgba(122, 122, 130, 0.4);
    border-bottom: 1px solid rgba(122, 122, 130, 0.4);
    position: relative;
    z-index: 3;
}

#cut-arch-choreo {
    background: #F0EBE0;
    color: #1A1A1E;
    border-color: rgba(26, 26, 30, 0.4);
}

.section-cut-svg {
    width: 60px;
    height: 60px;
    flex-shrink: 0;
}

.section-cut-label {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.78rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: #C4882A;
}

.section-cut-label-arch {
    color: #8B3A3A;
}

/* =====================================================
   ARCHITECTURAL REGISTER
   ===================================================== */
.architectural-register .left-margin {
    border-right-color: rgba(26, 26, 30, 0.3);
}

.architectural-register .evidence-stamp .stamp-text {
    color: #8B3A3A;
}

.architectural-register .scale-segments {
    background: repeating-linear-gradient(
        to right,
        #1A1A1E 0,
        #1A1A1E 12px,
        #F0EBE0 12px,
        #F0EBE0 24px
    );
}

.arch-footprint {
    height: 80vh;
    max-height: 760px;
}

/* =====================================================
   CHOREOGRAPHIC REGISTER
   ===================================================== */
.choreo-legend {
    margin-top: 2rem;
    padding-top: 1.4rem;
    border-top: 0.5px solid rgba(122, 122, 130, 0.4);
}

.legend-title {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.75rem;
    letter-spacing: 0.18em;
    color: #C4882A;
    text-transform: uppercase;
    margin-bottom: 1rem;
    font-weight: 400;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 0.7rem;
    font-family: 'Libre Baskerville', serif;
    font-size: 0.85rem;
    color: #F0EBE0;
    line-height: 1.5;
}

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

.laban-svg {
    height: 80vh;
    width: auto;
    max-height: 800px;
}

.choreo-panel .evidence-marker {
    left: 38%;
    top: 4%;
}

/* =====================================================
   COLOPHON
   ===================================================== */
.colophon-content {
    text-align: center;
    width: 100%;
    max-width: 800px;
    padding: 0 2rem;
}

.colophon-text {
    font-family: 'Instrument Serif', 'Libre Baskerville', serif;
    font-size: clamp(1.8rem, 3.5vw, 3rem);
    letter-spacing: 0.12em;
    color: #F0EBE0;
    margin-bottom: 1.5rem;
    text-transform: none;
    font-style: italic;
    opacity: 0;
    transition: opacity 1s linear;
}

.colophon-text.shown {
    opacity: 1;
}

.colophon-domain {
    display: block;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.8rem;
    letter-spacing: 0.25em;
    color: #C4882A;
    text-transform: uppercase;
    font-variant: small-caps;
    margin-bottom: 1.4rem;
}

.colophon-rule {
    border: none;
    border-top: 1px solid #8B3A3A;
    width: 100vw;
    margin-left: calc(-50vw + 50%);
}

/* =====================================================
   LEADER LINES
   ===================================================== */
.leader-line {
    position: absolute;
    border-top: 0.5px dashed #7A7A82;
    height: 0;
    pointer-events: none;
}

/* =====================================================
   RESPONSIVE
   ===================================================== */
@media (max-width: 900px) {
    .opening,
    .forensic-panel,
    .arch-panel,
    .choreo-panel {
        grid-template-columns: 1fr;
    }

    .left-margin {
        border-right: none;
        border-bottom: 0.5px solid rgba(122, 122, 130, 0.35);
        padding: 2rem 1.5rem;
    }

    .right-panel {
        padding: 2rem 1rem 4rem;
    }

    .footprint-svg,
    .arch-footprint,
    .laban-svg {
        height: auto;
        max-height: 60vh;
        max-width: 90vw;
    }

    .exhibit-label {
        position: relative;
        left: auto;
        bottom: auto;
        margin-top: 2rem;
    }

    .section-cut-label {
        font-size: 0.65rem;
    }
}
