/* ==========================================
   NAMU.BIZ - BRUTALIST TIMBER EXCHANGE
   ========================================== */

/* ===== CSS CUSTOM PROPERTIES ===== */
:root {
    /* BRUTALIST COLOR PALETTE */
    --color-concrete-light: #e8e4df;      /* Raw Concrete */
    --color-concrete: #d8d4cf;            /* Darker Concrete */
    --color-forest-defiance: #2d5016;     /* Primary Accent */
    --color-forest-dark: #1a6b5a;         /* Teal Bark */
    --color-olive-sap: #5a6e22;           /* Tertiary Accent */
    --color-mossy-rage: #3a7d44;          /* Interruption Block 1 */
    --color-deep-canopy: #1b4332;         /* Interruption Block 2 */
    --color-ink: #1a1a1a;                 /* Carbon Black */
    --color-rebar-gray: #4a4a4a;          /* Text Secondary */
    --color-phosphor: #39ff14;            /* Terminal Green */
    --color-oxidized-iron: #8b4513;       /* Oxidized Iron Border */
    --color-stone: #e0dcd7;               /* Stone accent */

    /* TYPOGRAPHY - SYSTEM FONTS WITH FALLBACK TO GOOGLE FONTS */
    --font-display: 'Space Grotesk', 'Courier New', monospace;
    --font-body: 'Space Grotesk', 'Courier New', monospace;
    --font-mono: 'JetBrains Mono', monospace;

    /* SIZING & SPACING */
    --banner-height: 15vh;
    --content-gap: 2rem;
    --sidebar-width: 18vw;

    /* Z-LAYERS */
    --z-grid: 1;
    --z-content: 10;
    --z-interruption: 15;
    --z-ticker: 5;
}

/* ===== RESET & BASE STYLES ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-snap-type: y proximity;
}

body {
    background-color: var(--color-concrete-light);
    color: var(--color-ink);
    font-family: var(--font-body);
    line-height: 1.6;
    font-size: clamp(0.9rem, 1.2vw, 1.1rem);
    font-weight: 400;
    letter-spacing: 0.01em;
    position: relative;
    overflow-x: hidden;
}

/* ===== GRID OVERLAY ===== */
#grid-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: var(--z-grid);
    background-image:
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent calc(100vh - 1px),
            rgba(26, 26, 26, 0.03) calc(100vh - 1px),
            rgba(26, 26, 26, 0.03) 100vh
        ),
        repeating-linear-gradient(
            90deg,
            transparent,
            transparent calc(100vw - 1px),
            rgba(26, 26, 26, 0.03) calc(100vw - 1px),
            rgba(26, 26, 26, 0.03) 100vw
        );
}

/* ===== BANNER STRIP ===== */
#banner {
    position: relative;
    height: var(--banner-height);
    background: linear-gradient(
        135deg,
        #a9a9a9 0%,
        #929292 25%,
        #b0b0b0 50%,
        #8a8a8a 75%,
        #9a9a9a 100%
    );
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-bottom: 4px solid var(--color-ink);
    z-index: var(--z-content);
}

#banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        repeating-conic-gradient(
            from 45deg at 10% 20%,
            #999 0deg 90deg,
            #888 90deg 180deg
        );
    opacity: 0.4;
    pointer-events: none;
}

.banner-title {
    font-family: var(--font-display);
    font-size: clamp(3rem, 7vw, 5.5rem);
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--color-ink);
    position: relative;
    z-index: 2;
    text-shadow: 2px 2px 4px rgba(255, 255, 255, 0.5);
}

/* ===== MAIN WRAPPER ===== */
#main-wrapper {
    display: grid;
    grid-template-columns: 1fr var(--sidebar-width);
    gap: var(--content-gap);
    max-width: 1400px;
    margin: 0 auto;
    padding: var(--content-gap);
    position: relative;
    z-index: var(--z-content);
}

/* ===== MANIFESTO COLUMN ===== */
#manifesto-column {
    display: flex;
    flex-direction: column;
    gap: 4rem;
    padding-right: 2rem;
}

.manifesto-intro {
    font-size: clamp(1.1rem, 1.4vw, 1.3rem);
    font-weight: 500;
    line-height: 1.8;
    padding: 2rem;
    background-color: var(--color-stone);
    border-left: 8px solid var(--color-forest-defiance);
    position: relative;
    font-style: italic;
}

.manifesto-intro::before {
    content: '◆';
    position: absolute;
    top: -1rem;
    left: 0;
    font-size: 2rem;
    color: var(--color-forest-defiance);
}

/* ===== DOSSIER STYLING ===== */
.dossier {
    scroll-snap-align: start;
    margin-bottom: 2rem;
}

.dossier-inner {
    border: 2px solid var(--color-ink);
    padding: 2rem;
    background-color: rgba(255, 255, 255, 0.5);
    position: relative;
}

.dossier-inner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    background-image:
        repeating-linear-gradient(
            45deg,
            transparent,
            transparent 2px,
            rgba(26, 26, 26, 0.02) 2px,
            rgba(26, 26, 26, 0.02) 4px
        );
}

.dossier-header {
    margin-bottom: 1.5rem;
    border-bottom: 2px solid var(--color-ink);
    padding-bottom: 1rem;
}

.species-name {
    font-family: var(--font-display);
    font-size: clamp(1.3rem, 2.5vw, 2rem);
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--color-forest-defiance);
    margin-bottom: 0.5rem;
    display: flex;
    gap: 0.8rem;
    align-items: baseline;
}

.hangul {
    font-family: var(--font-body);
    font-size: 0.8em;
    color: var(--color-ink);
    font-weight: 500;
    letter-spacing: 0.08em;
}

.species-label {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: clamp(0.75rem, 1vw, 0.85rem);
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--color-ink);
    opacity: 0.7;
}

.dossier-content {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 2rem;
    align-items: start;
}

.dossier-illustration {
    min-width: 200px;
    height: 200px;
    border: 2px solid var(--color-ink);
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--color-concrete-light);
    position: relative;
}

.dossier-illustration::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        repeating-linear-gradient(
            45deg,
            transparent,
            transparent 3px,
            rgba(26, 26, 26, 0.05) 3px,
            rgba(26, 26, 26, 0.05) 6px
        );
    pointer-events: none;
}

.tree-svg {
    width: 100%;
    height: 100%;
    max-width: 180px;
    max-height: 180px;
}

.dossier-text {
    padding-top: 0.5rem;
}

.dossier-text p {
    font-size: clamp(0.95rem, 1.1vw, 1.05rem);
    line-height: 1.8;
    color: var(--color-ink);
}

/* ===== INTERRUPTION BLOCKS ===== */
.interruption {
    scroll-snap-align: start;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--interruption-bg);
    position: relative;
    margin: 4rem 0;
    border-top: 4px solid var(--color-ink);
    border-bottom: 4px solid var(--color-ink);
    z-index: var(--z-interruption);
    overflow: hidden;
}

.interruption::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        repeating-linear-gradient(
            0deg,
            rgba(26, 26, 26, 0.1) 0px,
            rgba(26, 26, 26, 0.1) 1px,
            transparent 1px,
            transparent 2px
        ),
        repeating-linear-gradient(
            90deg,
            rgba(26, 26, 26, 0.1) 0px,
            rgba(26, 26, 26, 0.1) 1px,
            transparent 1px,
            transparent 2px
        );
    opacity: 0.3;
    pointer-events: none;
}

.interruption-perspective {
    perspective: 1000px;
    position: relative;
    z-index: 2;
}

.interruption-text {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 8vw, 6rem);
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--color-concrete);
    text-align: center;
    max-width: 90vw;
    line-height: 1.2;
    text-shadow: 3px 3px 0 rgba(0, 0, 0, 0.3);
    animation: interruptionPulse 3s ease-in-out infinite;
}

@keyframes interruptionPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.02); }
}

/* ===== SIDEBAR TICKER ===== */
#sidebar-ticker {
    position: sticky;
    top: var(--banner-height);
    height: calc(100vh - var(--banner-height));
    overflow: hidden;
    border-left: 4px solid var(--color-oxidized-iron);
    padding-left: 1rem;
    background-color: var(--color-concrete);
}

.ticker-track {
    display: flex;
    flex-direction: column;
    height: 100%;
    animation: tickerScroll 45s linear infinite;
}

.ticker-content {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    min-height: 100%;
}

.ticker-content p {
    font-family: var(--font-mono);
    font-size: clamp(0.7rem, 0.85vw, 0.8rem);
    letter-spacing: 0.02em;
    color: var(--color-rebar-gray);
    text-transform: uppercase;
    white-space: nowrap;
    opacity: 0.8;
    padding: 0.3rem 0;
    border-bottom: 1px solid var(--color-rebar-gray);
}

@keyframes tickerScroll {
    0% { transform: translateY(0); }
    100% { transform: translateY(-100%); }
}

/* ===== MOBILE TICKER ===== */
#mobile-ticker {
    display: none;
    width: 100%;
    overflow: hidden;
    border-top: 2px solid var(--color-oxidized-iron);
    background-color: var(--color-concrete);
    padding: 0.5rem 0;
    position: fixed;
    bottom: 0;
    left: 0;
    z-index: 20;
}

.mobile-ticker-track {
    display: flex;
    animation: mobileTickerScroll 20s linear infinite;
    white-space: nowrap;
}

.mobile-ticker-track span {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    letter-spacing: 0.01em;
    color: var(--color-ink);
    text-transform: uppercase;
    opacity: 0.8;
    padding: 0 1rem;
    display: inline-block;
}

@keyframes mobileTickerScroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* ===== FOOTER ===== */
#terminal-footer {
    background-color: var(--color-ink);
    color: var(--color-concrete-light);
    padding: 2rem;
    margin-top: 4rem;
    border-top: 4px solid var(--color-phosphor);
    position: relative;
    z-index: var(--z-content);
}

.terminal-content {
    max-width: 1000px;
    margin: 0 auto;
    font-family: var(--font-mono);
    font-size: clamp(0.8rem, 1vw, 0.9rem);
    line-height: 1.6;
    letter-spacing: 0.02em;
}

.terminal-line {
    margin: 0.3rem 0;
    opacity: 0.9;
}

.terminal-prompt {
    color: var(--color-phosphor);
    font-weight: 700;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 1024px) {
    :root {
        --sidebar-width: 22vw;
    }

    .dossier-content {
        grid-template-columns: 150px 1fr;
    }

    .dossier-illustration {
        min-width: 150px;
        height: 150px;
    }
}

@media (max-width: 768px) {
    :root {
        --banner-height: 12vh;
        --content-gap: 1.5rem;
    }

    #main-wrapper {
        grid-template-columns: 1fr;
        padding: 1rem;
        gap: 1.5rem;
    }

    #manifesto-column {
        padding-right: 0;
    }

    #sidebar-ticker {
        display: none;
    }

    #mobile-ticker {
        display: block;
    }

    .dossier-content {
        grid-template-columns: 1fr;
    }

    .dossier-illustration {
        width: 100%;
        height: 200px;
        min-width: auto;
    }

    .tree-svg {
        width: 100%;
        height: 100%;
    }

    .interruption-text {
        font-size: clamp(1.8rem, 5vw, 3rem);
    }

    .species-name {
        flex-direction: column;
        gap: 0.3rem;
    }
}

@media (max-width: 480px) {
    :root {
        --banner-height: 10vh;
    }

    .banner-title {
        font-size: clamp(1.8rem, 5vw, 2.5rem);
    }

    #manifesto-column {
        gap: 2rem;
    }

    .dossier-inner {
        padding: 1rem;
    }

    .dossier-header {
        margin-bottom: 1rem;
    }

    .species-name {
        font-size: clamp(1rem, 2vw, 1.3rem);
    }

    .interruption {
        height: 70vh;
        margin: 2rem 0;
    }

    .interruption-text {
        font-size: clamp(1.5rem, 4vw, 2rem);
    }

    .manifesto-intro {
        padding: 1rem;
        font-size: clamp(0.95rem, 1.2vw, 1rem);
    }

    .terminal-content {
        font-size: 0.75rem;
    }
}

/* ===== PRINT STYLES ===== */
@media print {
    #grid-overlay,
    #sidebar-ticker,
    #mobile-ticker,
    .interruption {
        display: none;
    }

    body {
        background-color: white;
    }
}
