/* =============================================
   moot.ing - Rain-Dissolved Graffiti
   ============================================= */

/* --- CSS Custom Properties --- */
:root {
    --drip-orange: #e86a2a;
    --bruise-purple: #5c3a6e;
    --neon-lime: #a8e84a;
    --wet-concrete: #1a1a1a;
    --dry-wall: #2e2a28;
    --stencil-white: #f0ece4;
    --rain-streak: #3d3530;
    --bleed-magenta: #c44a7a;
    --charcoal-deep: #1e1e1e;
    --concrete-light: #c8c0b4;
    --near-black: #0d0d0d;
}

/* --- Reset & Base --- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'IBM Plex Sans', sans-serif;
    font-weight: 400;
    background-color: var(--wet-concrete);
    color: var(--concrete-light);
    overflow-x: hidden;
    position: relative;
    line-height: 1.72;
    letter-spacing: 0.01em;
    font-size: clamp(0.95rem, 1.8vw, 1.1rem);
}

/* --- Concrete Grain Texture (applied to body) --- */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    background-image:
        repeating-linear-gradient(
            90deg,
            transparent,
            transparent 1px,
            rgba(255,255,255,0.015) 1px,
            rgba(255,255,255,0.015) 2px
        ),
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 1px,
            rgba(255,255,255,0.015) 1px,
            rgba(255,255,255,0.015) 2px
        );
    background-size: 4px 4px;
}

/* --- SVG Filters (hidden) --- */
.svg-filters {
    position: absolute;
    width: 0;
    height: 0;
    overflow: hidden;
}

/* --- Rain Streak Overlay --- */
.rain-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9998;
    opacity: 0;
    transition: opacity 600ms ease;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='800'%3E%3Cdefs%3E%3Cpattern id='r' x='0' y='0' width='120' height='800' patternUnits='userSpaceOnUse' patternTransform='rotate(2)'%3E%3Cline x1='15' y1='0' x2='15' y2='320' stroke='rgba(255,255,255,0.03)' stroke-width='1'/%3E%3Cline x1='47' y1='60' x2='47' y2='440' stroke='rgba(255,255,255,0.025)' stroke-width='1'/%3E%3Cline x1='78' y1='30' x2='78' y2='380' stroke='rgba(255,255,255,0.03)' stroke-width='1'/%3E%3Cline x1='102' y1='100' x2='102' y2='500' stroke='rgba(255,255,255,0.02)' stroke-width='1'/%3E%3C/pattern%3E%3C/defs%3E%3Crect width='100%25' height='100%25' fill='url(%23r)'/%3E%3C/svg%3E") repeat;
}

.rain-overlay.visible {
    opacity: 1;
}

/* --- Floating Tag Navigation --- */
.tag-nav {
    position: fixed;
    right: -30px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.tag-label {
    display: block;
    width: 90px;
    padding: 6px 10px;
    font-family: 'Permanent Marker', cursive;
    font-size: 0.7rem;
    color: var(--neon-lime);
    text-decoration: none;
    border: 1px solid var(--neon-lime);
    border-radius: 4px;
    background: rgba(26, 26, 26, 0.85);
    text-align: center;
    transition: right 200ms ease, background-color 200ms ease, box-shadow 200ms ease;
    animation: pulse-glow 2.5s ease-in-out infinite;
    cursor: pointer;
    position: relative;
    right: 0;
}

.tag-label:nth-child(1) { right: -20px; }
.tag-label:nth-child(2) { right: -30px; }
.tag-label:nth-child(3) { right: -25px; }
.tag-label:nth-child(4) { right: -35px; }
.tag-label:nth-child(5) { right: -22px; }

.tag-label:hover {
    right: 0px;
    background: rgba(168, 232, 74, 0.15);
}

.tag-label.active {
    right: 0px;
    border-width: 2px;
    border-color: var(--neon-lime);
    background: rgba(168, 232, 74, 0.1);
}

@keyframes pulse-glow {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 8px rgba(168, 232, 74, 0.2);
    }
    50% {
        transform: scale(1.06);
        box-shadow: 0 0 20px rgba(168, 232, 74, 0.5);
    }
}

/* --- Hero Wall --- */
.hero-wall {
    position: relative;
    width: 100%;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background-color: var(--wet-concrete);
    background-image:
        linear-gradient(135deg, #3a3a3a 25%, transparent 25%),
        linear-gradient(225deg, #3a3a3a 25%, transparent 25%),
        linear-gradient(315deg, #2a2a2a 25%, transparent 25%),
        linear-gradient(45deg, #2a2a2a 25%, transparent 25%);
    background-size: 4px 4px;
    background-position: 0 0, 0 2px, 2px -2px, 2px 0;
    z-index: 1;
}

.hero-content {
    text-align: center;
    position: relative;
    z-index: 2;
}

.hero-title {
    font-family: 'Bungee Shade', sans-serif;
    font-weight: 400;
    font-size: clamp(3rem, 8vw, 7rem);
    letter-spacing: 0.04em;
    color: var(--stencil-white);
    text-shadow: 3px 3px 0px var(--bruise-purple);
    filter: url(#stencil-roughen);
    line-height: 1.1;
    margin-bottom: 1.5rem;
}

.letter-container {
    display: inline-block;
}

.letter {
    display: inline-block;
    opacity: 0;
    transition: opacity 300ms ease;
}

.letter.visible {
    opacity: 1;
}

/* Particle dots for each letter */
.letter-particle {
    position: absolute;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--stencil-white);
    pointer-events: none;
    opacity: 0;
}

.hero-subtitle {
    font-family: 'IBM Plex Sans', sans-serif;
    font-weight: 300;
    font-size: clamp(0.9rem, 2vw, 1.3rem);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--concrete-light);
    opacity: 0;
    clip-path: inset(0 100% 0 0);
    transition: clip-path 800ms cubic-bezier(0.23, 1, 0.32, 1), opacity 800ms ease;
}

.hero-subtitle.visible {
    opacity: 1;
    clip-path: inset(0 0% 0 0);
}

/* Stencil decorative elements */
.stencil-decor {
    position: absolute;
    font-family: 'Bungee Shade', sans-serif;
    color: var(--stencil-white);
    opacity: 0.05;
    filter: url(#stencil-roughen);
    pointer-events: none;
    z-index: 1;
}

.stencil-question {
    font-size: 14rem;
    top: 10%;
    left: 8%;
    transform: rotate(-12deg);
}

.stencil-circle {
    width: 180px;
    height: 180px;
    border: 8px solid var(--stencil-white);
    border-radius: 50%;
    bottom: 15%;
    right: 10%;
    opacity: 0.04;
    filter: url(#stencil-roughen);
}

.stencil-arrow {
    font-size: 10rem;
    bottom: 20%;
    left: 15%;
    transform: rotate(15deg);
}

/* --- Blocks Zone --- */
.blocks-zone {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 3px;
    background: var(--wet-concrete);
    padding: 3px;
    max-width: 1400px;
    margin: 0 auto;
}

/* --- Content Blocks --- */
.content-block {
    position: relative;
    padding: 2.5rem 2rem;
    overflow: hidden;
    border: 3px solid var(--wet-concrete);
    transition: border-color 300ms ease;
}

.content-block:hover {
    border-color: var(--drip-orange);
}

/* Block size variants */
.block-large {
    grid-row: span 2;
}

.block-medium {
    grid-row: span 1;
}

.block-small {
    grid-row: span 1;
}

.block-wide {
    grid-column: span 2;
}

/* Block background variants */
.block-concrete {
    background-color: var(--dry-wall);
    background-image:
        repeating-linear-gradient(
            90deg,
            transparent,
            transparent 1px,
            rgba(255,255,255,0.012) 1px,
            rgba(255,255,255,0.012) 2px
        ),
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 1px,
            rgba(255,255,255,0.012) 1px,
            rgba(255,255,255,0.012) 2px
        );
    background-size: 4px 4px;
}

.block-wash {
    background-color: var(--rain-streak);
    position: relative;
}

.block-wash::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    opacity: 0.10;
    transition: opacity 400ms ease;
    background:
        radial-gradient(ellipse at 20% 30%, var(--wash-hue-1) 0%, transparent var(--wash-spread, 300%)),
        radial-gradient(ellipse at 80% 70%, var(--wash-hue-2) 0%, transparent var(--wash-spread, 300%)),
        radial-gradient(ellipse at 50% 50%, var(--bleed-magenta) 0%, transparent 400%);
    filter: url(#watercolor-bleed);
}

.block-wash:hover::before {
    opacity: 0.22;
}

/* --- Block Reveal Animations --- */
.content-block {
    opacity: 0;
    transition: opacity 500ms ease, transform 500ms ease, border-color 300ms ease;
}

.content-block[data-reveal="left"] {
    transform: translateX(-30px);
}

.content-block[data-reveal="right"] {
    transform: translateX(30px);
}

.content-block[data-reveal="splatter"] {
    transform: scale(0.8) rotate(-2deg);
}

.content-block.revealed {
    opacity: 1;
    transform: translateX(0) scale(1) rotate(0deg);
}

.content-block[data-reveal="splatter"].revealed {
    transition: opacity 500ms cubic-bezier(0.34, 1.56, 0.64, 1),
                transform 500ms cubic-bezier(0.34, 1.56, 0.64, 1),
                border-color 300ms ease;
}

/* --- Block Typography --- */
.block-title {
    font-family: 'Permanent Marker', cursive;
    font-weight: 400;
    font-size: clamp(1.4rem, 3vw, 2.2rem);
    margin-bottom: 1rem;
    line-height: 1.3;
}

.title-orange {
    color: var(--drip-orange);
}

.title-lime {
    color: var(--neon-lime);
}

.block-body {
    color: var(--concrete-light);
    margin-bottom: 1rem;
    font-weight: 400;
}

.block-body:last-child {
    margin-bottom: 0;
}

.block-body-light {
    color: var(--stencil-white);
    font-weight: 300;
    font-style: italic;
}

.block-quote {
    font-family: 'Permanent Marker', cursive;
    font-weight: 400;
    font-size: clamp(1.6rem, 3.5vw, 2.5rem);
    color: var(--drip-orange);
    line-height: 1.4;
    margin-bottom: 0.8rem;
}

.block-attribution {
    font-family: 'IBM Plex Sans', sans-serif;
    font-weight: 300;
    font-size: 0.9rem;
    color: var(--concrete-light);
    opacity: 0.7;
}

/* --- Drip SVGs --- */
.block-drips {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 120px;
    pointer-events: none;
    z-index: 2;
    overflow: visible;
}

.drip-svg {
    position: absolute;
    top: -8px;
    left: 10%;
    width: 80%;
    height: 120px;
    overflow: visible;
}

.drip-svg path {
    animation: drip-shimmer 3s ease-in-out infinite;
}

@keyframes drip-shimmer {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

/* Drip entry animation */
.block-drips {
    transform: translateY(-8px);
    transition: transform 4s ease-out;
}

.content-block.revealed .block-drips {
    transform: translateY(0);
}

/* --- Alley Footer --- */
.alley-footer {
    position: relative;
    z-index: 1;
    background-color: var(--near-black);
    padding: 5rem 0 4rem;
    overflow: hidden;
}

.alley-content {
    width: 60%;
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
}

.alley-text {
    font-family: 'IBM Plex Sans', sans-serif;
    font-weight: 300;
    color: var(--concrete-light);
    font-size: 1rem;
    margin-bottom: 1.2rem;
    opacity: 0.7;
}

.alley-text-small {
    font-size: 0.85rem;
    opacity: 0.5;
}

.alley-text-faint {
    font-size: 0.75rem;
    opacity: 0.3;
    font-style: italic;
    margin-bottom: 0;
}

.alley-drip {
    position: absolute;
    top: 0;
    left: 30px;
    width: 20px;
    height: 100%;
    pointer-events: none;
}

.alley-drip-svg {
    width: 20px;
    height: 400px;
}

.alley-drip-svg path {
    animation: drip-shimmer 3s ease-in-out infinite;
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .blocks-zone {
        grid-template-columns: 1fr;
    }

    .block-wide {
        grid-column: span 1;
    }

    .tag-nav {
        display: none;
    }

    .alley-content {
        width: 85%;
    }

    .stencil-question {
        font-size: 8rem;
    }

    .stencil-circle {
        width: 100px;
        height: 100px;
    }

    .stencil-arrow {
        font-size: 6rem;
    }

    .content-block {
        padding: 2rem 1.5rem;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: clamp(2rem, 12vw, 3.5rem);
    }

    .hero-subtitle {
        font-size: 0.8rem;
    }

    .block-quote {
        font-size: 1.3rem;
    }
}
