/* ==========================================================================
   lrx.sh — A Wall of Words
   Aesthetic: graffiti / edgy-rebellious
   Layout:    single-column, left-aligned, 680px column with 160px gutter
   Typography: serif-classic stencil system
   Palette:   warm concrete and ember
   ========================================================================== */

:root {
    --wall-dark: #1A1510;
    --wall-medium: #3D3229;
    --wall-light: #F2E6D0;
    --text-primary: #F5F0E8;
    --text-secondary: #A89880;
    --accent-ember: #C4561A;
    --accent-gold: #D4A245;
    --accent-mural: #7A2E1A;

    --font-display: 'Playfair Display', 'Cormorant Garamond', Georgia, serif;
    --font-body: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
    --font-mono: 'Source Code Pro', 'Courier New', monospace;
    --font-typewriter: 'Special Elite', 'Courier New', cursive;

    --column-width: 680px;
    --gutter-width: 160px;
}

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

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

body {
    font-family: var(--font-body);
    font-size: 18px;
    line-height: 1.85;
    color: var(--text-primary);
    background: var(--wall-dark);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ============================================================
   Concrete texture (CSS-only)
   ============================================================ */
.wall {
    position: relative;
    width: 100%;
    overflow: hidden;
}

.wall::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    background-image:
        radial-gradient(ellipse at center, rgba(245, 240, 232, 0.04) 0%, transparent 70%),
        url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' seed='3'/><feColorMatrix values='0 0 0 0 0.06  0 0 0 0 0.05  0 0 0 0 0.04  0 0 0 0.55 0'/></filter><rect width='200' height='200' filter='url(%23n)' opacity='0.35'/></svg>"),
        url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><g fill='%23F5F0E8' opacity='0.03'><circle cx='12' cy='40' r='0.6'/><circle cx='44' cy='18' r='0.5'/><circle cx='90' cy='62' r='0.7'/><circle cx='130' cy='28' r='0.5'/><circle cx='30' cy='100' r='0.6'/><circle cx='80' cy='130' r='0.5'/><circle cx='140' cy='110' r='0.6'/><circle cx='110' cy='90' r='0.4'/><circle cx='60' cy='80' r='0.4'/><circle cx='20' cy='150' r='0.5'/></g></svg>");
    background-size: 100% 100%, 200px 200px, 160px 160px;
    background-blend-mode: normal;
    opacity: 1;
}

.wall > * {
    position: relative;
    z-index: 1;
}

/* ============================================================
   Shared layout — gutter + column
   ============================================================ */
.wall__gutter {
    position: absolute;
    top: 0;
    left: 0;
    width: var(--gutter-width);
    height: 100%;
    padding: 80px 16px 80px 32px;
    display: flex;
    flex-direction: column;
    gap: 28px;
    z-index: 2;
    pointer-events: none;
    will-change: transform;
}

.wall__column {
    width: var(--column-width);
    max-width: calc(100% - var(--gutter-width) - 48px);
    margin-left: var(--gutter-width);
    padding: 100px 32px 100px 0;
    position: relative;
}

.wall__column--paper {
    color: var(--wall-dark);
}

/* Marginalia ------------------------------------------------- */
.marginalia {
    font-family: var(--font-mono);
    font-weight: 300;
    font-size: 11px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 8px;
    line-height: 1.5;
}

.marginalia--dark {
    color: rgba(26, 21, 16, 0.55);
}

.leaf-bullet {
    display: inline-block;
    width: 12px;
    height: 12px;
    background: var(--text-secondary);
    -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 80 80'><path d='M40 8 C20 22 12 42 16 56 C20 64 32 70 40 70 C48 70 60 64 64 56 C68 42 60 22 40 8 Z' fill='black'/></svg>") center/contain no-repeat;
            mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 80 80'><path d='M40 8 C20 22 12 42 16 56 C20 64 32 70 40 70 C48 70 60 64 64 56 C68 42 60 22 40 8 Z' fill='black'/></svg>") center/contain no-repeat;
    flex-shrink: 0;
    transform: rotate(-12deg);
}

.leaf-bullet--dark {
    background: rgba(26, 21, 16, 0.55);
}

/* ============================================================
   WALL 1 — Stencil Wall
   ============================================================ */
.wall--stencil {
    min-height: 100vh;
    background: linear-gradient(180deg, var(--wall-dark) 0%, var(--wall-medium) 100%);
    color: var(--text-primary);
    display: flex;
    align-items: center;
}

.wall--stencil .wall__column {
    padding-top: 60px;
    padding-bottom: 60px;
}

.overline {
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.32em;
    text-transform: uppercase;
    color: var(--accent-gold);
    margin-bottom: 28px;
    opacity: 0;
    animation: stencilFade 700ms 200ms cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

.overline--dark {
    color: var(--accent-mural);
}

.stencil-headline {
    font-family: var(--font-display);
    font-weight: 900;
    font-size: clamp(64px, 12vw, 144px);
    line-height: 0.92;
    letter-spacing: 0.08em;
    color: var(--text-primary);
    text-transform: uppercase;
    margin-bottom: 48px;
    text-shadow:
        0 0 1px rgba(245, 240, 232, 0.4),
        2px 2px 0 rgba(196, 86, 26, 0.08);
    position: relative;
}

.stencil-line {
    display: block;
    opacity: 0;
    transform: translateY(12px);
    animation: stencilFade 800ms cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

.stencil-line:nth-child(1) { animation-delay: 350ms; }
.stencil-line:nth-child(2) { animation-delay: 550ms; }
.stencil-line:nth-child(3) { animation-delay: 750ms; }

.stencil-line--accent {
    color: var(--accent-ember);
    -webkit-text-stroke: 1px var(--accent-ember);
    position: relative;
}

.stencil-line--accent::after {
    content: "";
    position: absolute;
    left: 8%;
    bottom: -12px;
    width: 2px;
    height: 36px;
    background: var(--accent-ember);
    opacity: 0.6;
    border-radius: 0 0 2px 2px;
}

.manifesto-line {
    font-family: var(--font-body);
    font-style: italic;
    font-size: 22px;
    line-height: 1.5;
    color: var(--text-secondary);
    max-width: 560px;
    border-left: 2px solid var(--accent-ember);
    padding-left: 20px;
    opacity: 0;
    animation: stencilFade 900ms 950ms cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

.paint-drips {
    position: absolute;
    bottom: 60px;
    left: 0;
    right: 0;
    height: 80px;
    pointer-events: none;
}

.drip {
    position: absolute;
    bottom: 0;
    width: 2px;
    background: linear-gradient(180deg, var(--accent-ember) 0%, transparent 100%);
    opacity: 0.4;
    border-radius: 0 0 2px 2px;
}

.scroll-cue {
    position: absolute;
    bottom: 28px;
    right: 32px;
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--text-secondary);
    opacity: 0.6;
    animation: scrollPulse 2400ms ease-in-out infinite;
}

@keyframes scrollPulse {
    0%, 100% { transform: translateY(0); opacity: 0.6; }
    50% { transform: translateY(6px); opacity: 1; }
}

@keyframes stencilFade {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   WALL 2 — Manifesto Strip
   ============================================================ */
.wall--manifesto {
    min-height: 100vh;
    background:
        linear-gradient(180deg, var(--wall-medium) 0%, #2e251e 100%);
    color: var(--text-primary);
    padding: 40px 0;
}

.section-heading {
    font-family: var(--font-display);
    font-weight: 900;
    font-size: clamp(56px, 8vw, 96px);
    line-height: 0.94;
    letter-spacing: 0.04em;
    color: var(--text-primary);
    margin-bottom: 24px;
    text-transform: uppercase;
}

.heading-accent {
    color: var(--accent-ember);
    font-style: italic;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: none;
}

.heading-accent--dark {
    color: var(--accent-mural);
}

.body-text {
    font-family: var(--font-body);
    font-weight: 400;
    font-size: 19px;
    line-height: 1.85;
    color: var(--text-primary);
    margin-bottom: 32px;
    max-width: 100%;
}

.body-text--stencil {
    font-family: var(--font-display);
    font-weight: 900;
    font-size: 22px;
    line-height: 1.6;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    color: var(--accent-gold);
    padding: 8px 0;
    border-top: 1px dashed rgba(212, 162, 69, 0.25);
    border-bottom: 1px dashed rgba(212, 162, 69, 0.25);
}

.paint-rule {
    display: block;
    height: 2px;
    width: 100%;
    margin: 36px 0;
    background: linear-gradient(90deg,
        transparent 0%,
        var(--accent-ember) 8%,
        var(--accent-ember) 88%,
        transparent 100%);
    position: relative;
    opacity: 0.85;
}

.paint-rule::after {
    content: "";
    position: absolute;
    bottom: -28px;
    left: 22%;
    width: 1px;
    height: 32px;
    background: linear-gradient(180deg, var(--accent-ember) 0%, transparent 100%);
    opacity: 0.5;
}

.paint-rule::before {
    content: "";
    position: absolute;
    bottom: -44px;
    left: 68%;
    width: 1px;
    height: 48px;
    background: linear-gradient(180deg, var(--accent-ember) 0%, transparent 100%);
    opacity: 0.4;
}

/* ============================================================
   WALL 3 — Duotone Mural
   ============================================================ */
.wall--mural {
    min-height: 100vh;
    background: var(--wall-dark);
    position: relative;
    overflow: hidden;
}

.wall--mural::before {
    opacity: 0.4;
}

.mural-frame {
    position: absolute;
    inset: 0;
    z-index: 1;
}

.mural-image {
    position: absolute;
    inset: 0;
    background-color: var(--accent-gold);
    overflow: hidden;
}

.mural-svg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    mix-blend-mode: multiply;
    filter: contrast(1.2) saturate(0.4);
}

.mural-image::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(26, 21, 16, 0.25) 0%, rgba(26, 21, 16, 0.65) 100%),
        radial-gradient(ellipse at 18% 32%, rgba(212, 162, 69, 0.35) 0%, transparent 55%);
    pointer-events: none;
}

.mural-overlay {
    position: absolute;
    left: var(--gutter-width);
    bottom: 80px;
    max-width: 720px;
    padding: 0 32px 0 0;
    z-index: 3;
}

.mural-overline {
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.32em;
    text-transform: uppercase;
    color: var(--accent-gold);
    margin-bottom: 24px;
}

.mural-headline {
    font-family: var(--font-display);
    font-weight: 900;
    font-size: clamp(48px, 8vw, 104px);
    line-height: 0.92;
    letter-spacing: 0.06em;
    color: var(--text-primary);
    text-transform: uppercase;
    margin-bottom: 28px;
    text-shadow: 0 2px 20px rgba(26, 21, 16, 0.65);
}

.mural-accent {
    color: var(--accent-gold);
    font-style: italic;
    text-transform: none;
    letter-spacing: 0.02em;
}

.mural-caption {
    font-family: var(--font-body);
    font-style: italic;
    font-size: 19px;
    line-height: 1.6;
    color: var(--text-primary);
    max-width: 540px;
    border-left: 2px solid var(--accent-gold);
    padding-left: 20px;
    text-shadow: 0 1px 8px rgba(26, 21, 16, 0.85);
}

/* ============================================================
   WALL 4 — Typewriter Room
   ============================================================ */
.wall--typewriter {
    min-height: 100vh;
    background:
        linear-gradient(180deg, #f5e9cf 0%, var(--wall-light) 60%, #ecd9b8 100%);
    color: var(--wall-dark);
    padding: 40px 0;
    position: relative;
}

.wall--typewriter::before {
    background-image:
        radial-gradient(ellipse at center, rgba(255, 255, 255, 0.3) 0%, transparent 70%),
        url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n2'><feTurbulence type='fractalNoise' baseFrequency='0.7' numOctaves='2' seed='5'/><feColorMatrix values='0 0 0 0 0.5  0 0 0 0 0.4  0 0 0 0 0.25  0 0 0 0.25 0'/></filter><rect width='200' height='200' filter='url(%23n2)'/></svg>");
    background-size: 100% 100%, 200px 200px;
    opacity: 0.65;
}

.typewriter-heading {
    font-family: var(--font-display);
    font-weight: 900;
    font-size: clamp(56px, 8vw, 96px);
    line-height: 0.94;
    letter-spacing: 0.04em;
    color: var(--wall-dark);
    margin-bottom: 56px;
    text-transform: uppercase;
}

.typewriter-page {
    background: rgba(245, 240, 232, 0.6);
    border: 1px solid rgba(122, 46, 26, 0.18);
    border-left: 3px solid var(--accent-mural);
    padding: 40px 36px;
    box-shadow:
        0 1px 0 rgba(26, 21, 16, 0.08),
        inset 0 0 60px rgba(122, 46, 26, 0.04);
    position: relative;
}

.typewriter-page::before {
    content: "";
    position: absolute;
    top: -6px;
    left: 60px;
    width: 80px;
    height: 14px;
    background: rgba(26, 21, 16, 0.25);
    border-radius: 0;
    transform: rotate(-2deg);
}

.typewriter-page::after {
    content: "";
    position: absolute;
    bottom: -6px;
    right: 80px;
    width: 60px;
    height: 14px;
    background: rgba(26, 21, 16, 0.2);
    border-radius: 0;
    transform: rotate(1.5deg);
}

.typewriter-line {
    font-family: var(--font-typewriter);
    font-weight: 400;
    font-size: 20px;
    line-height: 1.7;
    color: var(--wall-dark);
    margin-bottom: 22px;
    min-height: 1.7em;
    position: relative;
    white-space: pre-wrap;
}

.typewriter-line:last-child {
    margin-bottom: 0;
    color: var(--accent-mural);
    font-style: italic;
}

.typewriter-line .tw-cursor {
    display: inline-block;
    color: var(--accent-ember);
    font-weight: 700;
    animation: cursorBlink 530ms steps(1, end) infinite;
    margin-left: 1px;
}

@keyframes cursorBlink {
    0%, 50% { opacity: 1; }
    50.01%, 100% { opacity: 0; }
}

/* ============================================================
   WALL 5 — Tag Wall
   ============================================================ */
.wall--tags {
    min-height: 100vh;
    background:
        radial-gradient(ellipse at 30% 20%, #2a2018 0%, var(--wall-dark) 60%);
    color: var(--text-primary);
    padding: 40px 0;
    position: relative;
    overflow: hidden;
}

.tag-field {
    position: relative;
    width: 100%;
    min-height: 100vh;
    margin-left: 0;
}

.scatter-leaf {
    position: absolute;
    fill: var(--accent-gold);
    opacity: 0.2;
    pointer-events: none;
    z-index: 1;
    transition: opacity 600ms ease;
}

.tag {
    position: absolute;
    font-family: var(--font-display);
    font-weight: 900;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    line-height: 0.95;
    cursor: default;
    z-index: 2;
    transition:
        transform 200ms cubic-bezier(0.25, 0.46, 0.45, 0.94),
        color 280ms ease;
    transform-origin: center center;
    user-select: none;
}

.tag__text {
    display: block;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
}

.tag__attr {
    display: block;
    font-family: var(--font-body);
    font-style: italic;
    font-weight: 400;
    font-size: 14px;
    line-height: 1.4;
    text-transform: none;
    letter-spacing: 0.01em;
    color: var(--accent-gold);
    margin-top: 12px;
    max-width: 280px;
    opacity: 0;
    transition: opacity 300ms ease;
    pointer-events: none;
    text-shadow: none;
}

.tag--xl { font-size: clamp(56px, 8vw, 96px); }
.tag--lg { font-size: clamp(40px, 5vw, 64px); }
.tag--md { font-size: clamp(28px, 3vw, 36px); }
.tag--sm { font-size: clamp(20px, 2vw, 24px); font-family: var(--font-mono); font-weight: 400; letter-spacing: 0.18em; }

.tag:hover,
.tag.tag--active {
    color: var(--accent-gold);
    transform: scale(1.08) rotate(var(--tag-rotate, 0deg));
}

.tag:hover .tag__attr,
.tag.tag--active .tag__attr {
    opacity: 1;
}

.tag-coda {
    position: absolute;
    bottom: 32px;
    left: var(--gutter-width);
    right: 32px;
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.32em;
    text-transform: uppercase;
    color: var(--text-secondary);
    opacity: 0.7;
    text-align: left;
    z-index: 3;
}

/* ============================================================
   Leaf dividers
   ============================================================ */
.leaf-divider {
    width: 100%;
    padding: 36px var(--gutter-width) 36px var(--gutter-width);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    background: var(--wall-medium);
    overflow: hidden;
    position: relative;
}

.leaf-divider--dark {
    background: var(--wall-dark);
}

.leaf-divider .leaf {
    width: 44px;
    height: 44px;
    fill: var(--accent-ember);
    opacity: 0;
    transform: rotate(0deg) translateY(8px);
    transition: opacity 400ms ease, transform 600ms ease;
    flex-shrink: 0;
}

.leaf-divider .leaf.leaf--in {
    opacity: 0.15;
    transform: rotate(var(--leaf-final-rot, 0deg)) translateY(0);
}

.leaf-divider .leaf--maple { width: 40px; height: 40px; }
.leaf-divider .leaf--ginkgo { width: 38px; height: 38px; }

/* ============================================================
   Reveal animation utility (JS adds .is-visible)
   ============================================================ */
.reveal {
    opacity: 0;
    transform: translateY(12px);
    transition:
        opacity 600ms cubic-bezier(0.25, 0.46, 0.45, 0.94),
        transform 600ms cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* ============================================================
   Responsive — collapse gutter into inline
   ============================================================ */
@media (max-width: 900px) {
    :root {
        --gutter-width: 0px;
    }

    body {
        font-size: 17px;
    }

    .wall__gutter {
        position: relative;
        flex-direction: row;
        flex-wrap: wrap;
        gap: 14px 22px;
        width: 100%;
        height: auto;
        padding: 28px 24px 0 24px;
    }

    .wall__column {
        width: 100%;
        max-width: 100%;
        margin-left: 0;
        padding: 32px 24px 64px 24px;
    }

    .wall--stencil {
        padding-top: 24px;
    }

    .stencil-headline {
        font-size: clamp(48px, 14vw, 96px);
    }

    .section-heading,
    .typewriter-heading {
        font-size: clamp(40px, 11vw, 72px);
    }

    .mural-overlay {
        position: absolute;
        left: 0;
        right: 0;
        bottom: 32px;
        padding: 0 24px;
    }

    .mural-headline {
        font-size: clamp(36px, 11vw, 72px);
    }

    .mural-caption {
        font-size: 17px;
    }

    .leaf-divider {
        padding: 28px 24px;
        gap: 12px;
        flex-wrap: wrap;
    }

    .leaf-divider .leaf {
        width: 32px;
        height: 32px;
    }

    .scroll-cue {
        right: 24px;
    }

    .tag-coda {
        left: 24px;
    }

    .tag--xl { font-size: clamp(40px, 12vw, 72px); }
    .tag--lg { font-size: clamp(28px, 8vw, 48px); }
    .tag--md { font-size: clamp(20px, 5vw, 30px); }
    .tag--sm { font-size: 16px; }

    .tag__attr {
        font-size: 12px;
        max-width: 200px;
    }
}

@media (max-width: 560px) {
    .stencil-headline { font-size: clamp(44px, 16vw, 72px); }
    .typewriter-line { font-size: 17px; }
    .typewriter-page { padding: 28px 22px; }
    .body-text--stencil { font-size: 18px; letter-spacing: 0.12em; }
}
