/* p9r.st -- street wall layering experience */

:root {
    --concrete: #d0d0d0;
    --concrete-shadow: #888888;
    --asphalt: #1a1a1a;
    --spray-red: #ff4444;
    --tag-blue: #2196f3;
    --stencil-yellow: #ffd700;
    --poster-cream: #f5f0e0;
    --paper: #ffffff;
    --shadow-gray: #666666;
}

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

html, body {
    width: 100%;
    overflow-x: hidden;
}

body {
    font-family: 'Roboto', sans-serif;
    font-weight: 400;
    color: var(--asphalt);
    background-color: var(--concrete);
    line-height: 1.65;
    position: relative;
    min-height: 100vh;
}

/* ---------- Concrete wall texture (persistent background) ---------- */
.wall-texture {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background-color: var(--concrete);
    background-image:
        url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180' viewBox='0 0 180 180'><g fill='%23888888' fill-opacity='0.08'><circle cx='12' cy='17' r='1.2'/><circle cx='44' cy='8' r='0.8'/><circle cx='73' cy='29' r='1.4'/><circle cx='110' cy='14' r='0.7'/><circle cx='141' cy='33' r='1.1'/><circle cx='168' cy='9' r='0.9'/><circle cx='22' cy='52' r='0.6'/><circle cx='59' cy='61' r='1.3'/><circle cx='91' cy='48' r='0.8'/><circle cx='128' cy='66' r='1.0'/><circle cx='160' cy='55' r='1.5'/><circle cx='8' cy='88' r='1.1'/><circle cx='37' cy='99' r='0.7'/><circle cx='70' cy='84' r='1.2'/><circle cx='101' cy='103' r='0.9'/><circle cx='133' cy='91' r='0.6'/><circle cx='171' cy='112' r='1.3'/><circle cx='17' cy='124' r='0.8'/><circle cx='49' cy='141' r='1.1'/><circle cx='82' cy='128' r='0.7'/><circle cx='115' cy='149' r='1.4'/><circle cx='146' cy='133' r='0.9'/><circle cx='28' cy='166' r='1.0'/><circle cx='66' cy='173' r='0.6'/><circle cx='99' cy='160' r='1.2'/><circle cx='130' cy='171' r='0.8'/><circle cx='159' cy='162' r='1.1'/></g></svg>"),
        radial-gradient(circle at 25% 30%, rgba(102,102,102,0.18), transparent 45%),
        radial-gradient(circle at 75% 70%, rgba(102,102,102,0.14), transparent 50%),
        radial-gradient(circle at 50% 50%, rgba(255,255,255,0.05), transparent 60%);
    background-size: 180px 180px, 100% 100%, 100% 100%, 100% 100%;
}

/* Subtle concrete cracks via overlay */
.wall-texture::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(118deg, transparent 49.6%, rgba(26,26,26,0.07) 49.8%, transparent 50%),
        linear-gradient(72deg, transparent 19.6%, rgba(26,26,26,0.05) 19.8%, transparent 20%),
        linear-gradient(160deg, transparent 79.6%, rgba(26,26,26,0.06) 79.8%, transparent 80%);
    opacity: 0.7;
}

/* Diagonal spray lines crossing the wall behind hero */
.spray-line {
    position: absolute;
    pointer-events: none;
    z-index: 1;
    filter: blur(1.4px);
    mix-blend-mode: multiply;
}

.spray-line--diagonal {
    top: 12vh;
    left: -8vw;
    width: 120vw;
    height: 22vh;
    background: linear-gradient(30deg,
        transparent 0%,
        rgba(255,68,68,0) 18%,
        rgba(255,68,68,0.55) 38%,
        rgba(255,68,68,0.75) 50%,
        rgba(255,68,68,0.55) 62%,
        rgba(255,68,68,0) 82%,
        transparent 100%);
    transform: rotate(-6deg);
}

.spray-line--secondary {
    top: 38vh;
    right: -10vw;
    width: 70vw;
    height: 8vh;
    background: linear-gradient(70deg,
        transparent 0%,
        rgba(33,150,243,0) 22%,
        rgba(33,150,243,0.45) 50%,
        rgba(33,150,243,0) 78%,
        transparent 100%);
    transform: rotate(8deg);
    filter: blur(2px);
}

/* ---------- Stencil text effect ---------- */
.stencil {
    font-family: 'Anton', 'Roboto', sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    color: var(--asphalt);
    text-shadow:
        2px 2px 0 rgba(255,68,68,0.55),
        -1px 1px 0 rgba(255,68,68,0.35),
        1px -1px 0 rgba(255,68,68,0.45),
        3px 3px 6px rgba(0,0,0,0.18);
}

.stencil--blue {
    text-shadow:
        2px 2px 0 rgba(33,150,243,0.55),
        -1px 1px 0 rgba(33,150,243,0.32),
        1px -1px 0 rgba(33,150,243,0.45),
        3px 3px 6px rgba(0,0,0,0.18);
}

.stencil--yellow {
    text-shadow:
        2px 2px 0 rgba(255,215,0,0.7),
        -1px 1px 0 rgba(255,215,0,0.4),
        1px -1px 0 rgba(255,215,0,0.55),
        3px 3px 6px rgba(0,0,0,0.18);
}

.marker {
    font-family: 'Permanent Marker', 'Roboto', cursive;
    font-weight: 400;
    font-size: 0.9rem;
    letter-spacing: 0.02em;
}

/* ---------- HERO ---------- */
.hero {
    position: relative;
    z-index: 5;
    min-height: 100vh;
    padding: 80px 6vw 120px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
}

.hero__title {
    font-size: clamp(3rem, 14vw, 11rem);
    line-height: 0.92;
    margin-bottom: 24px;
    position: relative;
    z-index: 4;
    cursor: default;
    user-select: none;
}

.hero__title .char {
    display: inline-block;
    transition: transform 0.35s cubic-bezier(0.34,1.56,0.64,1), color 0.3s ease;
    will-change: transform;
}

.hero__title .char--dot {
    color: var(--spray-red);
    text-shadow:
        2px 2px 0 rgba(26,26,26,0.6),
        -1px 1px 0 rgba(26,26,26,0.4);
}

.hero__title .char:hover {
    transform: translateY(-6px) rotate(-3deg) scale(1.05);
    color: var(--spray-red);
}

.hero__sub {
    color: var(--asphalt);
    font-size: clamp(1rem, 1.6vw, 1.3rem);
    margin-bottom: 40px;
    transform: rotate(-1.5deg);
    background: var(--stencil-yellow);
    padding: 6px 14px 8px;
    box-shadow: 3px 3px 0 rgba(0,0,0,0.25);
    clip-path: polygon(2% 0, 98% 3%, 100% 95%, 99% 100%, 1% 97%, 0 6%);
    position: relative;
    z-index: 4;
}

.hero__tag {
    position: relative;
    z-index: 4;
    background: var(--asphalt);
    color: var(--paper);
    padding: 10px 22px;
    font-family: 'Permanent Marker', cursive;
    font-size: 1rem;
    transform: rotate(1deg);
    box-shadow: 4px 4px 0 var(--spray-red);
    clip-path: polygon(1% 0, 99% 2%, 100% 96%, 98% 100%, 2% 98%, 0 4%);
}

.hero__sticker {
    position: absolute;
    background: var(--paper);
    padding: 8px 14px;
    box-shadow: 3px 3px 0 rgba(0,0,0,0.25);
    transform: rotate(-6deg);
    z-index: 6;
    font-size: 0.85rem;
    color: var(--asphalt);
    border: 2px solid var(--asphalt);
    clip-path: polygon(2% 0, 98% 4%, 100% 96%, 96% 100%, 0 98%, 1% 6%);
}

.hero__sticker--top {
    top: 5vh;
    right: 8vw;
    background: var(--spray-red);
    color: var(--paper);
    border-color: var(--asphalt);
    transform: rotate(8deg);
}

.hero__sticker--right {
    bottom: 12vh;
    right: 6vw;
    background: var(--tag-blue);
    color: var(--paper);
    border-color: var(--asphalt);
    transform: rotate(-4deg);
}

/* ---------- POSTERS section ---------- */
.posters {
    position: relative;
    z-index: 6;
    padding: 80px 5vw 160px;
    display: flex;
    flex-direction: column;
    gap: 80px;
    max-width: 1280px;
    margin: 0 auto;
}

.poster {
    position: relative;
    background: var(--poster-cream);
    color: var(--asphalt);
    padding: 40px 44px 50px;
    width: min(72%, 720px);
    transform: rotate(var(--rot, 0deg)) translateX(-80px);
    box-shadow:
        4px 4px 0 rgba(0,0,0,0.25),
        12px 12px 24px rgba(0,0,0,0.28);
    clip-path: polygon(
        1.5% 0%, 18% 0.6%, 36% 0%, 55% 0.8%, 78% 0%, 99% 1.2%,
        100% 18%, 99.6% 38%, 100% 60%, 99.4% 82%, 99.8% 99%,
        82% 100%, 60% 99.4%, 38% 100%, 18% 99.4%, 1% 99.8%,
        0.4% 78%, 0% 56%, 0.6% 32%, 0% 14%
    );
    opacity: 0;
    transition: transform 0.6s cubic-bezier(0.34,1.4,0.64,1), opacity 0.5s ease-out;
    isolation: isolate;
}

.poster[data-side="right"] {
    align-self: flex-end;
    transform: rotate(var(--rot, 0deg)) translateX(80px);
}

.poster.is-visible {
    opacity: 1;
    transform: rotate(var(--rot, 0deg)) translateX(0);
}

.poster--white {
    background: var(--paper);
}

.poster--cream {
    background: var(--poster-cream);
}

.poster--wide {
    width: min(82%, 820px);
}

/* Poster paper grain */
.poster::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background-image:
        url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='100' height='100'><g fill='%231a1a1a' fill-opacity='0.04'><circle cx='10' cy='14' r='0.6'/><circle cx='42' cy='9' r='0.4'/><circle cx='68' cy='28' r='0.5'/><circle cx='91' cy='17' r='0.3'/><circle cx='23' cy='51' r='0.5'/><circle cx='57' cy='62' r='0.4'/><circle cx='84' cy='49' r='0.6'/><circle cx='12' cy='80' r='0.4'/><circle cx='49' cy='91' r='0.5'/><circle cx='77' cy='78' r='0.3'/></g></svg>");
    mix-blend-mode: multiply;
    opacity: 0.6;
    z-index: 0;
}

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

.poster__corner {
    position: absolute;
    top: -14px;
    left: 24px;
    background: var(--spray-red);
    color: var(--paper);
    padding: 6px 12px;
    transform: rotate(-4deg);
    box-shadow: 2px 2px 0 rgba(0,0,0,0.3);
    z-index: 3;
    font-size: 0.85rem;
    letter-spacing: 0.03em;
}

.poster__corner--blue {
    background: var(--tag-blue);
}

.poster__corner--yellow {
    background: var(--stencil-yellow);
    color: var(--asphalt);
}

.poster__title {
    font-size: clamp(1.8rem, 4.5vw, 3rem);
    margin-bottom: 18px;
    line-height: 0.95;
}

.poster__body {
    font-size: 1.05rem;
    line-height: 1.7;
    color: var(--asphalt);
    max-width: 60ch;
}

.poster__list {
    list-style: none;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.poster__list li {
    display: flex;
    align-items: baseline;
    gap: 14px;
    font-size: 1.05rem;
    border-bottom: 1px dashed rgba(26,26,26,0.25);
    padding-bottom: 10px;
}

.list-num {
    color: var(--spray-red);
    font-size: 1.1rem;
    min-width: 32px;
}

.poster__quote {
    font-size: 1.25rem;
    line-height: 1.55;
    font-style: italic;
    border-left: 4px solid var(--spray-red);
    padding: 6px 0 6px 18px;
    margin-bottom: 14px;
    color: var(--asphalt);
}

.poster__attribution {
    color: var(--shadow-gray);
    font-size: 0.95rem;
}

.poster__stamp {
    position: absolute;
    bottom: -12px;
    right: 24px;
    background: var(--asphalt);
    color: var(--paper);
    padding: 6px 12px;
    transform: rotate(3deg);
    box-shadow: 2px 2px 0 rgba(0,0,0,0.4);
    font-size: 0.75rem;
    letter-spacing: 0.04em;
    z-index: 3;
}

/* Tag chips */
.tag-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin: 8px 0 6px;
}

.tag-chip {
    font-family: 'Anton', sans-serif;
    text-transform: uppercase;
    background: var(--asphalt);
    color: var(--paper);
    padding: 10px 18px;
    font-size: 1.4rem;
    letter-spacing: 0.05em;
    transform: rotate(var(--tilt, 0deg));
    box-shadow: 3px 3px 0 rgba(0,0,0,0.3);
    clip-path: polygon(2% 0, 99% 3%, 100% 96%, 97% 100%, 1% 98%, 0 4%);
    transition: transform 0.25s ease;
    cursor: default;
}

.tag-chip--blue {
    background: var(--tag-blue);
}

.tag-chip--yellow {
    background: var(--stencil-yellow);
    color: var(--asphalt);
}

.tag-chip:hover {
    transform: rotate(calc(var(--tilt, 0deg) * -1)) scale(1.06);
}

/* Tag pad */
.tag-pad {
    display: flex;
    gap: 12px;
    margin: 10px 0 18px;
    flex-wrap: wrap;
}

.tag-input {
    flex: 1 1 200px;
    font-family: 'Roboto', sans-serif;
    font-size: 1rem;
    padding: 12px 14px;
    background: var(--concrete);
    color: var(--asphalt);
    border: 2px dashed var(--asphalt);
    outline: none;
}

.tag-input::placeholder {
    color: var(--shadow-gray);
    font-style: italic;
}

.tag-button {
    background: var(--spray-red);
    color: var(--paper);
    border: 2px solid var(--asphalt);
    padding: 10px 22px;
    font-size: 1.05rem;
    cursor: pointer;
    transform: rotate(-1.5deg);
    box-shadow: 3px 3px 0 rgba(0,0,0,0.4);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
    letter-spacing: 0.04em;
}

.tag-button:hover {
    transform: rotate(1.5deg) scale(1.04);
    box-shadow: 5px 5px 0 rgba(0,0,0,0.45);
}

.tag-button:active {
    transform: rotate(-3deg) translate(2px,2px);
    box-shadow: 1px 1px 0 rgba(0,0,0,0.4);
}

.tag-wall {
    min-height: 40px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 14px 0 4px;
    border-top: 1px dashed rgba(26,26,26,0.3);
}

.tag-wall .tag-chip {
    font-size: 1.05rem;
    padding: 6px 12px;
    animation: slap-on 0.45s cubic-bezier(0.34,1.56,0.64,1);
}

@keyframes slap-on {
    0% { transform: rotate(var(--tilt,0deg)) scale(0.4) translateY(-30px); opacity: 0; }
    60% { transform: rotate(var(--tilt,0deg)) scale(1.12); opacity: 1; }
    100% { transform: rotate(var(--tilt,0deg)) scale(1); opacity: 1; }
}

/* ---------- DRIPS ---------- */
.drip {
    position: absolute;
    width: 2px;
    background: var(--spray-red);
    pointer-events: none;
    border-radius: 0 0 2px 2px;
    box-shadow: 0 0 4px rgba(255,68,68,0.5);
}

.drip::after {
    content: "";
    position: absolute;
    bottom: -3px;
    left: -2px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: inherit;
    box-shadow: 0 0 4px rgba(255,68,68,0.6);
}

.drip--hero1 {
    top: 30%;
    left: 12%;
    height: 60px;
}

.drip--hero2 {
    top: 26%;
    left: 38%;
    height: 80px;
    background: var(--tag-blue);
    box-shadow: 0 0 4px rgba(33,150,243,0.5);
}
.drip--hero2::after {
    box-shadow: 0 0 4px rgba(33,150,243,0.6);
}

.drip--hero3 {
    top: 32%;
    left: 64%;
    height: 40px;
    background: var(--stencil-yellow);
    box-shadow: 0 0 4px rgba(255,215,0,0.5);
}
.drip--hero3::after {
    box-shadow: 0 0 4px rgba(255,215,0,0.6);
}

.drip--grate {
    top: -40px;
    left: 12%;
    height: 50px;
    background: var(--spray-red);
    z-index: 8;
}

/* ---------- DRAIN GRATE FOOTER ---------- */
.grate {
    position: relative;
    z-index: 7;
    background: var(--asphalt);
    color: var(--paper);
    padding: 60px 6vw 50px;
    margin-top: 40px;
    overflow: hidden;
}

.grate::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 12px;
    background: repeating-linear-gradient(
        90deg,
        var(--asphalt) 0 18px,
        var(--shadow-gray) 18px 22px
    );
}

.grate__bars {
    position: absolute;
    inset: 12px 0 0 0;
    display: grid;
    grid-template-columns: repeat(20, 1fr);
    gap: 6px;
    padding: 6px;
    pointer-events: none;
    opacity: 0.55;
}

.grate__bars span {
    background: linear-gradient(180deg, #0a0a0a, #2a2a2a 40%, #0a0a0a);
    height: 100%;
    box-shadow: inset 0 0 4px rgba(0,0,0,0.8), 1px 0 0 rgba(255,255,255,0.04);
}

.grate__content {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto;
    background: rgba(26,26,26,0.92);
    padding: 30px 28px;
    box-shadow: 0 0 0 2px var(--shadow-gray);
}

.grate__heading {
    color: var(--spray-red);
    margin-bottom: 12px;
    font-size: 1.05rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.grate__line {
    color: var(--paper);
    font-size: 0.95rem;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    box-shadow: 0 0 6px currentColor;
}

.dot--red { background: var(--spray-red); color: var(--spray-red); }
.dot--blue { background: var(--tag-blue); color: var(--tag-blue); }
.dot--yellow { background: var(--stencil-yellow); color: var(--stencil-yellow); }

#grateClock {
    font-family: 'Anton', sans-serif;
    font-size: 1.4rem;
    letter-spacing: 0.1em;
    color: var(--stencil-yellow);
}

/* ---------- Responsive ---------- */
@media (max-width: 720px) {
    .hero {
        padding: 80px 6vw 80px;
    }
    .hero__sticker--top { right: 4vw; top: 3vh; }
    .hero__sticker--right { right: 4vw; bottom: 4vh; }

    .poster, .poster--wide {
        width: 92%;
        align-self: center !important;
        padding: 30px 26px 40px;
    }
    .poster[data-side="right"] {
        align-self: center;
    }

    .posters {
        gap: 60px;
        padding: 60px 4vw 120px;
    }

    .grate__bars {
        grid-template-columns: repeat(12, 1fr);
    }
}

/* Reduce motion fallback (still no a11y focus styles) */
@media (prefers-reduced-motion: reduce) {
    .poster {
        transition: opacity 0.3s ease;
        transform: rotate(var(--rot, 0deg)) translateX(0);
    }
    .poster.is-visible {
        transform: rotate(var(--rot, 0deg)) translateX(0);
    }
}
