/* mujun.work — Raw-Authentic Avant-Garde */
/* Colors: #d9d2c4, #2b1a0e, #6b8f71, #a83232, #e8e2d6 */
/* Fonts: Barlow Condensed, Source Serif 4, IBM Plex Mono */

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

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

body {
    background-color: #e8e2d6;
    color: #2b1a0e;
    font-family: 'Source Serif 4', Georgia, serif;
    font-size: clamp(1rem, 1.2vw, 1.25rem);
    line-height: 1.65;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* ========================================
   EROSION TEXTURE OVERLAY
   ======================================== */

.erosion-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1000;
}

/* ========================================
   FIXED SHIELD ELEMENT
   ======================================== */

#shield-glyph {
    position: fixed;
    right: 5vw;
    top: 50vh;
    transform: translateY(-50%);
    z-index: 50;
    opacity: 0.15;
    pointer-events: none;
    will-change: transform, opacity;
}

/* ========================================
   SCROLL CONTAINER
   ======================================== */

#scroll-container {
    width: 100%;
    position: relative;
    z-index: 1;
}

/* ========================================
   IMPACT ZONES — Full viewport sections
   ======================================== */

.impact-zone {
    min-height: 100vh;
    position: relative;
    display: flex;
    align-items: center;
    scroll-snap-align: start;
    padding: 4rem 0;
    overflow: hidden;
}

/* Progressively narrowing zones — the spear taper */
.zone-grid {
    display: grid;
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    padding: 0 2rem;
}

.zone-1 .zone-grid {
    grid-template-columns: 60px 1fr;
    max-width: 100%;
    padding: 0 4rem;
}

.zone-2 .zone-grid {
    grid-template-columns: 60px 1fr;
    max-width: 85%;
    padding: 0 3rem;
    margin-left: 0;
    margin-right: auto;
}

.zone-3 .zone-grid {
    grid-template-columns: 60px 1fr;
    max-width: 70%;
    padding: 0 2.5rem;
    margin-left: 0;
    margin-right: auto;
}

.zone-4 .zone-grid {
    grid-template-columns: 60px 1fr;
    max-width: 55%;
    padding: 0 2rem;
    margin-left: 0;
    margin-right: auto;
}

.zone-5 .zone-grid {
    grid-template-columns: 60px 1fr;
    max-width: 40%;
    padding: 0 1.5rem;
    margin-left: 0;
    margin-right: auto;
}

/* Zone backgrounds — alternating parchment tones */
.zone-1 { background-color: #e8e2d6; }
.zone-2 { background-color: #d9d2c4; }
.zone-3 { background-color: #e8e2d6; }
.zone-4 { background-color: #d9d2c4; }
.zone-5 { background-color: #e8e2d6; }

/* ========================================
   ZONE DIVIDERS — hand-drawn wavy line
   ======================================== */

.zone-divider {
    border: none;
    height: 2px;
    margin: 3rem 0;
    background-color: transparent;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='800' height='4' viewBox='0 0 800 4'%3E%3Cpath d='M0 2 C20 0, 40 4, 60 2 C80 0, 100 4, 120 2 C140 0, 160 4, 180 2 C200 0, 220 4, 240 2 C260 0, 280 4, 300 2 C320 0, 340 4, 360 2 C380 0, 400 4, 420 2 C440 0, 460 4, 480 2 C500 0, 520 4, 540 2 C560 0, 580 4, 600 2 C620 0, 640 4, 660 2 C680 0, 700 4, 720 2 C740 0, 760 4, 780 2 C790 1, 800 2, 800 2' fill='none' stroke='%236b8f71' stroke-width='1.5'/%3E%3C/svg%3E");
    background-repeat: repeat-x;
    background-size: 800px 4px;
    background-position: center;
}

/* ========================================
   COLLISION MOTIF
   ======================================== */

.collision-motif {
    width: 100%;
    padding: 2rem 0;
    display: flex;
    justify-content: center;
    background-color: #e8e2d6;
}

.collision-svg {
    width: 100%;
    max-width: 800px;
    height: 120px;
}

/* ========================================
   VINE COLUMN
   ======================================== */

.vine-column {
    position: relative;
    width: 60px;
    min-height: 100%;
}

.vine-svg {
    position: absolute;
    top: 0;
    left: 0;
    width: 60px;
    height: 100%;
}

.vine-path {
    stroke-dasharray: 2000;
    stroke-dashoffset: 2000;
    transition: stroke-dashoffset 1.2s ease-out;
    will-change: stroke-dashoffset;
}

.vine-column.vine-visible .vine-path {
    stroke-dashoffset: 0;
}

.thorn {
    opacity: 0;
    transition: opacity 0.6s ease-out;
}

.vine-column.vine-visible .thorn {
    opacity: 1;
}

.vine-leaf {
    opacity: 0;
    transition: opacity 0.8s ease-out;
}

.vine-column.vine-visible .vine-leaf {
    opacity: 1;
}

/* ========================================
   ZONE CONTENT
   ======================================== */

.zone-content {
    padding: 2rem 1rem 2rem 2rem;
}

/* Bounce animation for scroll entry */
.bounce-target {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.6s ease-out, transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.bounce-target.bounce-visible {
    opacity: 1;
    transform: translateY(0);
}

/* ========================================
   TYPOGRAPHY
   ======================================== */

.zone-label {
    display: block;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.75rem;
    font-weight: 400;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #6b8f71;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #6b8f71;
}

.display-title {
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 700;
    font-size: clamp(4rem, 12vw, 10rem);
    line-height: 0.95;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #2b1a0e;
    margin-bottom: 0;
}

.display-title .umber {
    color: #2b1a0e;
}

.display-title .jade {
    color: #6b8f71;
}

.subtitle {
    font-family: 'IBM Plex Mono', monospace;
    font-size: clamp(1.5rem, 3vw, 2.5rem);
    font-weight: 400;
    color: #6b8f71;
    margin-top: -0.25rem;
    margin-bottom: 1.5rem;
}

.section-title {
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 700;
    font-size: clamp(2.5rem, 7vw, 6rem);
    line-height: 0.95;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #2b1a0e;
    margin-bottom: 1.5rem;
}

.spear-line {
    width: 100%;
    height: 3px;
    background: linear-gradient(to right, #2b1a0e, transparent);
    margin: 1.5rem 0;
}

.tagline {
    font-family: 'Source Serif 4', Georgia, serif;
    font-style: italic;
    font-size: clamp(1.1rem, 1.5vw, 1.4rem);
    color: #2b1a0e;
    margin-bottom: 1rem;
}

.body-text {
    font-family: 'Source Serif 4', Georgia, serif;
    font-size: clamp(1rem, 1.2vw, 1.25rem);
    line-height: 1.65;
    color: #2b1a0e;
    margin-bottom: 1.25rem;
    max-width: 65ch;
}

.body-text em {
    font-style: italic;
    color: #a83232;
}

/* ========================================
   BLOCKQUOTE / PULL QUOTE
   ======================================== */

.pull-quote {
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 700;
    font-size: clamp(1.5rem, 3vw, 2.2rem);
    line-height: 1.15;
    letter-spacing: 0.04em;
    color: #2b1a0e;
    border-left: 4px solid #6b8f71;
    padding: 1rem 0 1rem 1.5rem;
    margin: 2rem 0;
    max-width: 50ch;
}

/* ========================================
   FIELD NOTE
   ======================================== */

.field-note {
    background-color: rgba(43, 26, 14, 0.04);
    border: 1px solid rgba(43, 26, 14, 0.15);
    padding: 1.5rem;
    margin-top: 2rem;
    position: relative;
}

.field-note::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    border: 1px dashed rgba(107, 143, 113, 0.4);
    pointer-events: none;
}

.field-note-label {
    display: block;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.7rem;
    font-weight: 400;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #6b8f71;
    margin-bottom: 0.75rem;
}

.field-note p {
    font-family: 'Source Serif 4', Georgia, serif;
    font-style: italic;
    font-size: 0.95rem;
    line-height: 1.6;
    color: #2b1a0e;
}

/* ========================================
   RAW LIST
   ======================================== */

.raw-list {
    list-style: none;
    padding: 0;
    margin: 1.5rem 0;
}

.raw-list li {
    font-family: 'Source Serif 4', Georgia, serif;
    font-size: clamp(1rem, 1.2vw, 1.2rem);
    line-height: 1.65;
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
    color: #2b1a0e;
}

.raw-list li::before {
    content: '\2014';
    position: absolute;
    left: 0;
    color: #6b8f71;
    font-weight: 700;
}

/* ========================================
   CONTACT BLOCK
   ======================================== */

.contact-block {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 2px solid #2b1a0e;
}

.mono-text {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.85rem;
    letter-spacing: 0.05em;
    color: #2b1a0e;
}

/* ========================================
   ACCENT DOT (single crimson use)
   ======================================== */

.accent-dot {
    color: #a83232;
}

/* ========================================
   MARGIN MOTIFS — nature-as-contradiction
   ======================================== */

.margin-motif {
    position: absolute;
    pointer-events: none;
    opacity: 0;
    transition: opacity 1s ease-out 0.4s;
}

.margin-motif.motif-visible {
    opacity: 0.6;
}

.motif-right {
    right: 3vw;
    top: 50%;
    transform: translateY(-50%);
}

/* ========================================
   ZONE HASH — utility marker
   ======================================== */

.zone-hash {
    position: absolute;
    bottom: 1.5rem;
    right: 2rem;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.65rem;
    letter-spacing: 0.2em;
    color: rgba(43, 26, 14, 0.2);
    text-transform: uppercase;
}

/* ========================================
   TORN EDGE — zone dividers
   ======================================== */

.impact-zone::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 6px;
    background: repeating-linear-gradient(
        90deg,
        transparent,
        transparent 4px,
        rgba(43, 26, 14, 0.08) 4px,
        rgba(43, 26, 14, 0.08) 8px
    );
}

.zone-5::after {
    display: none;
}

/* ========================================
   RESPONSIVE
   ======================================== */

@media (max-width: 768px) {
    .zone-1 .zone-grid,
    .zone-2 .zone-grid,
    .zone-3 .zone-grid,
    .zone-4 .zone-grid,
    .zone-5 .zone-grid {
        max-width: 100%;
        padding: 0 1.5rem;
        margin-left: auto;
        margin-right: auto;
        grid-template-columns: 40px 1fr;
    }

    .vine-column {
        width: 40px;
    }

    .vine-svg {
        width: 40px;
    }

    .zone-content {
        padding: 1.5rem 0.5rem 1.5rem 1rem;
    }

    .display-title {
        font-size: clamp(3rem, 15vw, 6rem);
    }

    .section-title {
        font-size: clamp(2rem, 8vw, 4rem);
    }

    .pull-quote {
        font-size: clamp(1.2rem, 4vw, 1.8rem);
    }

    #shield-glyph {
        display: none;
    }

    .margin-motif {
        display: none;
    }
}

@media (max-width: 480px) {
    .impact-zone {
        padding: 3rem 0;
    }

    .zone-1 .zone-grid,
    .zone-2 .zone-grid,
    .zone-3 .zone-grid,
    .zone-4 .zone-grid,
    .zone-5 .zone-grid {
        grid-template-columns: 30px 1fr;
        padding: 0 1rem;
    }

    .vine-column {
        width: 30px;
    }

    .vine-svg {
        width: 30px;
    }
}
