/* desca.work — Brutalist Workspace
   Palette: warm-earthy / Pattern: zoom-focus / Layout: stacked-sections */

:root {
    --raw-umber: #2C2418;
    --fired-clay: #3D3229;
    --kiln-white: #F2E8D9;
    --sienna-bleed: #A0522D;
    --ochre-stain: #C8951A;
    --terracotta-burn: #B84A2B;
    --charcoal-earth: #1A1610;
    --concrete-dust: #8C7E6A;
    --rust-through: #D4652F;

    --nav-w: 56px;
    --gutter: 32px;
    --slab-pad-x: clamp(80px, 8vw, 140px);
    --slab-pad-y: 15vh;
    --seam-h: 8px;

    --ease-heavy: cubic-bezier(0.25, 0.1, 0.25, 1.0);
}

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

html {
    scroll-snap-type: y mandatory;
    scroll-behavior: auto;
    background: var(--raw-umber);
}

body {
    font-family: 'Archivo', 'Helvetica Neue', sans-serif;
    font-weight: 400;
    color: var(--kiln-white);
    background: var(--raw-umber);
    overflow-x: hidden;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

::selection {
    background: var(--rust-through);
    color: var(--kiln-white);
}

.noise-defs {
    position: absolute;
    width: 0;
    height: 0;
}

/* ---------- NAVIGATION (fixed left column) ---------- */
.nav-column {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--nav-w);
    height: 100vh;
    background: var(--raw-umber);
    border-right: 2px solid var(--fired-clay);
    z-index: 50;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    padding: 18px 0;
    color: var(--kiln-white);
}

.nav-mark {
    font-family: 'Roboto Slab', serif;
    font-weight: 900;
    font-size: 0.95rem;
    letter-spacing: 0.08em;
    color: var(--sienna-bleed);
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    text-orientation: mixed;
}

.nav-list {
    list-style: none;
    display: flex;
    flex-direction: column-reverse;
    gap: 28px;
    flex: 1;
    align-items: center;
    justify-content: center;
    padding: 28px 0;
}

.nav-link {
    font-family: 'Roboto Slab', serif;
    font-weight: 700;
    font-size: 0.78rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--concrete-dust);
    text-decoration: none;
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    transition: color 250ms var(--ease-heavy);
    position: relative;
    padding: 4px 0;
}

.nav-link::before {
    content: attr(data-floor);
    display: block;
    font-family: 'Crete Round', serif;
    font-weight: 400;
    font-size: 0.7rem;
    color: var(--sienna-bleed);
    letter-spacing: 0.12em;
    margin-bottom: 8px;
}

.nav-link:hover,
.nav-link.active {
    color: var(--kiln-white);
}

.nav-link.active::after {
    content: "";
    position: absolute;
    left: -10px;
    top: 0;
    width: 3px;
    height: 100%;
    background: var(--sienna-bleed);
}

.nav-foot {
    font-family: 'Crete Round', serif;
    font-size: 0.7rem;
    letter-spacing: 0.12em;
    color: var(--concrete-dust);
    writing-mode: vertical-rl;
    transform: rotate(180deg);
}

/* ---------- SLABS ---------- */
.slabs {
    margin-left: var(--nav-w);
}

.slab {
    position: relative;
    min-height: 100vh;
    padding: var(--slab-pad-y) var(--slab-pad-x);
    scroll-snap-align: start;
    scroll-snap-stop: always;
    overflow: hidden;
    isolation: isolate;
}

.slab-dark {
    background: var(--raw-umber);
    color: var(--kiln-white);
}

.slab-light {
    background: var(--kiln-white);
    color: var(--charcoal-earth);
}

.slab-noise {
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: 0.05;
    filter: url(#concrete-noise);
    background: var(--fired-clay);
    mix-blend-mode: overlay;
    z-index: 0;
}

.seam {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: var(--seam-h);
    background: var(--fired-clay);
    border-top: 1px solid var(--charcoal-earth);
    border-bottom: 1px solid var(--charcoal-earth);
    z-index: 5;
}

.seam::before {
    content: "";
    position: absolute;
    bottom: var(--seam-h);
    left: 0;
    right: 0;
    height: 4px;
    background: var(--sienna-bleed);
}

/* 12-column grid inside each slab */
.slab-grid {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    column-gap: var(--gutter);
    row-gap: clamp(40px, 6vh, 80px);
    min-height: calc(100vh - 2 * var(--slab-pad-y));
}

/* ---------- HEADERS / FOOTERS ---------- */
.floor-header {
    grid-column: 1 / -1;
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    font-family: 'Crete Round', serif;
    font-size: 0.8rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--concrete-dust);
    border-bottom: 2px solid currentColor;
    padding-bottom: 10px;
    flex-wrap: wrap;
    gap: 12px;
}

.slab-light .floor-header { color: var(--fired-clay); }

.floor-tag { color: var(--sienna-bleed); font-weight: 400; }

.floor-footer,
.ground-footer {
    grid-column: 1 / -1;
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    font-family: 'Crete Round', serif;
    font-size: 0.72rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--concrete-dust);
    border-top: 1px solid var(--fired-clay);
    padding-top: 14px;
    margin-top: auto;
    flex-wrap: wrap;
    gap: 12px;
}

.slab-light .floor-footer,
.slab-light .ground-footer { border-top-color: var(--concrete-dust); }

.meta { white-space: nowrap; }

/* ---------- CONTENT BLOCKS ---------- */
.content-block {
    position: relative;
}

.content-1-6  { grid-column: 1 / span 6; }
.content-2-7  { grid-column: 2 / span 6; }
.content-2-8  { grid-column: 2 / span 7; }
.content-2-9  { grid-column: 2 / span 8; }
.content-6-12 { grid-column: 6 / span 7; }
.content-8-12 { grid-column: 8 / span 5; align-self: end; }

.stack-block { align-self: end; }

/* ---------- MARKERS ---------- */
.marker-shape {
    color: var(--sienna-bleed);
    margin-bottom: 28px;
    display: inline-block;
    line-height: 0;
}

/* ---------- TYPOGRAPHY ---------- */
.display-heading {
    font-family: 'Roboto Slab', serif;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    line-height: 0.92;
    font-size: clamp(2.5rem, 7vw, 6rem);
    margin-bottom: 32px;
    color: inherit;
    transform-origin: left top;
}

.display-heading .hex-mark {
    color: var(--sienna-bleed);
}

.lede {
    font-family: 'Archivo', sans-serif;
    font-weight: 500;
    font-size: clamp(1.05rem, 1.6vw, 1.4rem);
    max-width: 56ch;
    line-height: 1.5;
    color: var(--concrete-dust);
}

.slab-light .lede { color: var(--fired-clay); }

.body-text {
    font-family: 'Archivo', sans-serif;
    font-size: clamp(1rem, 1.2vw, 1.15rem);
    line-height: 1.65;
    max-width: 60ch;
    margin-bottom: 22px;
}

.body-text em {
    font-style: italic;
    font-weight: 600;
    color: var(--sienna-bleed);
}

.slab-dark .body-text { color: var(--kiln-white); }
.slab-light .body-text { color: var(--charcoal-earth); }

/* ---------- RULE LINES ---------- */
.rule-line {
    grid-column: 1 / -1;
    height: 4px;
    background: var(--sienna-bleed);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 600ms var(--ease-heavy);
    transition-delay: var(--delay, 0ms);
}

.rule-line.rule-top { margin-bottom: 0; }
.rule-line.rule-mid { background: var(--ochre-stain); }
.rule-line.rule-bottom { margin-top: auto; }

.slab.in-view .rule-line { transform: scaleX(1); }

/* ---------- GEOMETRIC PILLAR BLOCKS ---------- */
.block-pillar {
    grid-column: var(--col-start) / calc(var(--col-end) + 1);
    height: var(--h, 50vh);
    align-self: center;
    transition: transform 200ms var(--ease-heavy);
}

.block-pillar:hover { transform: scale(1.02); }

.block-sienna { background: var(--sienna-bleed); }
.block-ochre { background: var(--ochre-stain); }
.block-terracotta { background: var(--terracotta-burn); }

/* ---------- STAMP ---------- */
.stamp {
    border: 3px solid var(--sienna-bleed);
    padding: 6px;
    display: inline-block;
    max-width: 100%;
}

.stamp-inner {
    border: 1px solid var(--sienna-bleed);
    padding: 26px 32px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    align-items: flex-start;
}

.stamp-label {
    font-family: 'Crete Round', serif;
    font-size: 0.8rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--sienna-bleed);
}

.stamp-value {
    font-family: 'Roboto Slab', serif;
    font-weight: 900;
    font-size: clamp(1.6rem, 3vw, 2.5rem);
    line-height: 0.95;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    color: inherit;
}

/* ---------- STEP LIST ---------- */
.step-list {
    grid-column: 2 / span 7;
    list-style: none;
    border-top: 2px solid var(--fired-clay);
}

.step-item {
    display: grid;
    grid-template-columns: 80px 1fr auto;
    align-items: center;
    gap: 20px;
    padding: 22px 0;
    border-bottom: 1px solid var(--fired-clay);
    font-family: 'Roboto Slab', serif;
    text-transform: uppercase;
    transition: background 200ms var(--ease-heavy);
}

.step-num {
    font-size: clamp(1.4rem, 2.4vw, 2rem);
    font-weight: 900;
    color: var(--sienna-bleed);
    letter-spacing: 0.04em;
}

.step-label {
    font-size: clamp(1rem, 1.4vw, 1.3rem);
    font-weight: 700;
    letter-spacing: 0.06em;
    color: inherit;
}

.step-rule {
    width: 60px;
    height: 3px;
    background: var(--sienna-bleed);
    transform: scaleX(0.4);
    transform-origin: left;
    transition: transform 300ms var(--ease-heavy);
}

.step-item:hover .step-rule { transform: scaleX(1); }

/* ---------- WORK LIST ---------- */
.work-list {
    grid-column: 1 / -1;
    list-style: none;
    border-top: 3px solid var(--charcoal-earth);
    margin-top: 12px;
}

.work-row {
    display: grid;
    grid-template-columns: 90px 1fr 1.1fr 100px;
    gap: 24px;
    align-items: baseline;
    padding: 22px 0;
    border-bottom: 1px solid var(--fired-clay);
    font-family: 'Roboto Slab', serif;
    text-transform: uppercase;
    cursor: default;
    position: relative;
    transition: padding-left 250ms var(--ease-heavy), color 250ms var(--ease-heavy);
}

.work-row::before {
    content: "";
    position: absolute;
    left: 0;
    bottom: -1px;
    width: 0;
    height: 3px;
    background: var(--sienna-bleed);
    transition: width 300ms var(--ease-heavy);
}

.work-row:hover::before { width: 100%; }
.work-row:hover { padding-left: 14px; color: var(--terracotta-burn); }

.work-num {
    font-weight: 900;
    color: var(--sienna-bleed);
    font-size: 1rem;
    letter-spacing: 0.08em;
}

.work-title {
    font-weight: 800;
    font-size: clamp(1.05rem, 1.6vw, 1.4rem);
    letter-spacing: 0.04em;
}

.work-meta {
    font-family: 'Crete Round', serif;
    font-size: 0.85rem;
    letter-spacing: 0.18em;
    color: var(--fired-clay);
    text-transform: uppercase;
    font-weight: 400;
}

.work-year {
    font-family: 'Crete Round', serif;
    font-size: 0.85rem;
    letter-spacing: 0.18em;
    color: var(--concrete-dust);
    text-align: right;
}

/* ---------- CONTACT ---------- */
.contact-grid {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
    border-top: 3px solid var(--charcoal-earth);
    border-bottom: 3px solid var(--charcoal-earth);
}

.contact-link {
    padding: 36px 28px;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    gap: 14px;
    border-right: 1px solid var(--concrete-dust);
    position: relative;
    transition: background 250ms var(--ease-heavy), color 250ms var(--ease-heavy);
}

.contact-link:last-child { border-right: none; }

.contact-link::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 0;
    height: 3px;
    background: var(--sienna-bleed);
    transition: width 300ms var(--ease-heavy);
}

a.contact-link:hover::after { width: 100%; }
a.contact-link:hover { background: var(--charcoal-earth); color: var(--kiln-white); }

.contact-label {
    font-family: 'Crete Round', serif;
    font-size: 0.78rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--sienna-bleed);
}

.contact-value {
    font-family: 'Roboto Slab', serif;
    font-weight: 800;
    font-size: clamp(1.05rem, 1.6vw, 1.5rem);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    line-height: 1.1;
}

/* ---------- DEPTH INDICATOR ---------- */
.depth-indicator {
    position: fixed;
    right: 22px;
    bottom: 22px;
    z-index: 60;
    background: var(--charcoal-earth);
    color: var(--kiln-white);
    padding: 14px 18px;
    border: 2px solid var(--sienna-bleed);
    font-family: 'Crete Round', serif;
    font-size: 0.78rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 130px;
}

.depth-label { color: var(--concrete-dust); }
.depth-value {
    font-family: 'Roboto Slab', serif;
    font-weight: 900;
    font-size: 1.4rem;
    letter-spacing: 0.06em;
    color: var(--ochre-stain);
}

.depth-bar {
    width: 100%;
    height: 4px;
    background: var(--fired-clay);
    margin-top: 4px;
}

.depth-fill {
    height: 100%;
    width: 0%;
    background: var(--sienna-bleed);
    transition: width 350ms var(--ease-heavy);
}

/* ---------- ZOOM-FOCUS ANIMATION ---------- */
.zoom-target {
    transform: scale(1.15);
    opacity: 0;
    transition: transform 800ms var(--ease-heavy), opacity 600ms var(--ease-heavy);
}

.slab.in-view .zoom-target {
    transform: scale(1);
    opacity: 1;
}

.body-text,
.lede,
.stamp,
.step-item,
.work-row,
.contact-link,
.block-pillar {
    opacity: 0;
    transition: opacity 500ms var(--ease-heavy);
    transition-delay: 300ms;
}

.slab.in-view .body-text,
.slab.in-view .lede,
.slab.in-view .stamp,
.slab.in-view .step-item,
.slab.in-view .work-row,
.slab.in-view .contact-link,
.slab.in-view .block-pillar {
    opacity: 1;
}

.slab.in-view .step-item:nth-child(2) { transition-delay: 450ms; }
.slab.in-view .step-item:nth-child(3) { transition-delay: 600ms; }
.slab.in-view .step-item:nth-child(4) { transition-delay: 750ms; }
.slab.in-view .work-row:nth-child(2) { transition-delay: 400ms; }
.slab.in-view .work-row:nth-child(3) { transition-delay: 500ms; }
.slab.in-view .work-row:nth-child(4) { transition-delay: 600ms; }
.slab.in-view .work-row:nth-child(5) { transition-delay: 700ms; }

/* ---------- RESPONSIVE ---------- */
@media (max-width: 900px) {
    :root {
        --nav-w: 40px;
        --slab-pad-x: 28px;
        --gutter: 18px;
    }
    .nav-link { font-size: 0.7rem; letter-spacing: 0.1em; }
    .nav-link::before { font-size: 0.62rem; }
    .nav-mark { font-size: 0.8rem; }

    .slab-grid {
        grid-template-columns: repeat(4, 1fr);
        row-gap: 36px;
    }
    .content-1-6,
    .content-2-7,
    .content-2-8,
    .content-2-9,
    .content-6-12,
    .content-8-12 {
        grid-column: 1 / -1;
    }
    .step-list { grid-column: 1 / -1; }
    .step-item { grid-template-columns: 56px 1fr; }
    .step-rule { display: none; }

    .work-row {
        grid-template-columns: 70px 1fr;
        gap: 6px 16px;
    }
    .work-meta, .work-year { grid-column: 2; }

    .contact-grid { grid-template-columns: 1fr; }
    .contact-link { border-right: none; border-bottom: 1px solid var(--concrete-dust); }

    .block-pillar {
        grid-column: 1 / -1 !important;
        height: 30vh !important;
    }
    .floor-header, .floor-footer, .ground-footer {
        font-size: 0.65rem;
    }
    .depth-indicator { padding: 10px 12px; min-width: 110px; }
}
