/* ============================================
   gabs.cafe - Graffiti Futurism
   ============================================ */

/* --- CSS Custom Properties --- */
:root {
    /* Palette */
    --concrete-dark: #1A1D23;
    --concrete-charcoal: #252830;
    --concrete-mid: #6B7B8D;
    --ash-white: #E8ECF1;
    --slate-mist: #9AA5B4;
    --nozzle-cyan: #00D4FF;
    --cap-pink: #FF3366;
    --tag-lime: #A8FF04;
    --marker-violet: #8B5CF6;

    /* Typography scale */
    --fs-tag: clamp(3rem, 8vw, 7rem);
    --fs-heading: clamp(2rem, 4vw, 3.5rem);
    --fs-body: clamp(1rem, 1.8vw, 1.2rem);
    --fs-mono: 0.75rem;
    --fs-sticker-label: clamp(1.4rem, 2.5vw, 1.8rem);

    /* Spacing */
    --section-padding: clamp(2rem, 5vw, 6rem);
}

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

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: 'IBM Plex Sans', sans-serif;
    font-weight: 400;
    font-size: var(--fs-body);
    line-height: 1.65;
    letter-spacing: 0.01em;
    color: var(--ash-white);
    background-color: var(--concrete-dark);
    overflow-x: hidden;
}

/* --- Concrete Texture Overlay --- */
.concrete-texture {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1000;
    opacity: 0.04;
    background-image:
        radial-gradient(circle at 20% 30%, rgba(255,255,255,0.15) 0.5px, transparent 0.5px),
        radial-gradient(circle at 80% 70%, rgba(255,255,255,0.1) 0.5px, transparent 0.5px),
        radial-gradient(circle at 50% 50%, rgba(255,255,255,0.12) 0.5px, transparent 0.5px),
        radial-gradient(circle at 10% 90%, rgba(255,255,255,0.08) 0.5px, transparent 0.5px),
        radial-gradient(circle at 90% 10%, rgba(255,255,255,0.1) 0.5px, transparent 0.5px);
    background-size: 4px 4px, 6px 6px, 5px 5px, 7px 7px, 3px 3px;
}

/* --- Typography --- */
.section-heading {
    font-family: 'Roboto Slab', serif;
    font-weight: 900;
    font-size: var(--fs-heading);
    letter-spacing: -0.03em;
    line-height: 1.05;
    text-transform: uppercase;
    color: var(--ash-white);
    margin-bottom: 1rem;
}

.mono-label {
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 400;
    font-size: var(--fs-mono);
    letter-spacing: 0.05em;
    color: var(--concrete-mid);
    display: block;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
}

.body-text {
    font-family: 'IBM Plex Sans', sans-serif;
    font-weight: 400;
    font-size: var(--fs-body);
    line-height: 1.65;
    letter-spacing: 0.01em;
    color: var(--ash-white);
    margin-bottom: 1.5rem;
}

/* --- Spray-Can Navigation --- */
.spray-nav-btn {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 2000;
    background: rgba(37, 40, 48, 0.85);
    border: 2px solid var(--concrete-mid);
    border-radius: 50%;
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: border-color 0.3s ease, transform 0.3s ease, background-color 0.3s ease;
}

.spray-nav-btn:hover {
    border-color: var(--nozzle-cyan);
    transform: scale(1.1);
    background: rgba(37, 40, 48, 0.95);
}

.spray-nav-btn.active {
    border-color: var(--cap-pink);
    transform: rotate(45deg) scale(1.1);
}

/* --- Navigation Overlay --- */
.nav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1500;
    background: rgba(26, 29, 35, 0.92);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

.nav-overlay.open {
    opacity: 1;
    pointer-events: all;
}

.nav-overlay-inner {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.nav-tag {
    font-family: 'Roboto Slab', serif;
    font-weight: 900;
    font-size: clamp(2rem, 5vw, 4rem);
    text-transform: uppercase;
    letter-spacing: -0.03em;
    text-decoration: none;
    color: var(--ash-white);
    transition: color 0.2s ease, transform 0.2s ease;
    transform: rotate(-2deg);
    display: inline-block;
}

.nav-tag:nth-child(2) { transform: rotate(1deg); }
.nav-tag:nth-child(3) { transform: rotate(-1deg); }
.nav-tag:nth-child(4) { transform: rotate(2deg); }
.nav-tag:nth-child(5) { transform: rotate(0deg); }

.nav-tag[data-accent="cyan"]:hover { color: var(--nozzle-cyan); }
.nav-tag[data-accent="pink"]:hover { color: var(--cap-pink); }
.nav-tag[data-accent="lime"]:hover { color: var(--tag-lime); }
.nav-tag[data-accent="violet"]:hover { color: var(--marker-violet); }
.nav-tag[data-accent="white"]:hover { color: var(--slate-mist); }

.nav-tag:hover {
    transform: rotate(0deg) scale(1.05);
}

/* --- Perspective Container --- */
.perspective-container {
    perspective: 1200px;
    perspective-origin: 50% 50%;
}

/* --- Wall Segments (shared) --- */
.wall-segment {
    min-height: 100vh;
    position: relative;
    overflow: hidden;
    transition: background-color 0.8s ease;
}

.wall-inner {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: var(--section-padding);
}

/* --- WALL 1: THE TAG --- */
.wall-tag {
    background-color: var(--concrete-dark);
    transform: rotateY(-1deg);
}

.wall-tag .wall-inner {
    justify-content: center;
    align-items: center;
    position: relative;
}

.tag-composition {
    display: flex;
    align-items: baseline;
    justify-content: center;
    flex-wrap: wrap;
    position: relative;
    z-index: 10;
    cursor: default;
}

.tag-char {
    font-family: 'Alfa Slab One', serif;
    font-weight: 400;
    font-size: clamp(4rem, 10vw, 9rem);
    text-transform: lowercase;
    color: var(--ash-white);
    display: inline-block;
    opacity: 0;
    transform: translateY(120%) rotateX(-90deg);
    animation: tagCharEnter 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.tag-char:nth-child(1) { animation-delay: 0.2s; }
.tag-char:nth-child(2) { animation-delay: 0.27s; }
.tag-char:nth-child(3) { animation-delay: 0.34s; }
.tag-char:nth-child(4) { animation-delay: 0.41s; }
.tag-char:nth-child(5) { animation-delay: 0.48s; color: var(--nozzle-cyan); }
.tag-char:nth-child(6) { animation-delay: 0.55s; }
.tag-char:nth-child(7) { animation-delay: 0.62s; }
.tag-char:nth-child(8) { animation-delay: 0.69s; }
.tag-char:nth-child(9) { animation-delay: 0.76s; }

@keyframes tagCharEnter {
    0% {
        opacity: 0;
        transform: translateY(120%) rotateX(-90deg);
    }
    100% {
        opacity: 1;
        transform: translateY(0) rotateX(0deg);
    }
}

/* Drip container */
.drip-container {
    position: absolute;
    top: 60%;
    left: 10%;
    width: 80%;
    height: 200px;
    pointer-events: none;
    z-index: 5;
}

/* --- Drips (global) --- */
.drip {
    position: absolute;
    width: 3px;
    border-radius: 0 0 50% 50%;
    transform-origin: top;
    transform: scaleY(0);
    animation: dripGrow 1.2s cubic-bezier(0.25, 1, 0.5, 1) forwards;
    animation-play-state: paused;
}

.drip.animate {
    animation-play-state: running;
}

.drip-cyan { background-color: rgba(0, 212, 255, 0.4); }
.drip-pink { background-color: rgba(255, 51, 102, 0.4); }
.drip-lime { background-color: rgba(168, 255, 4, 0.35); }
.drip-violet { background-color: rgba(139, 92, 246, 0.35); }

@keyframes dripGrow {
    0% { transform: scaleY(0); }
    100% { transform: scaleY(1); }
}

/* --- Organic Blobs --- */
.blob {
    position: absolute;
    pointer-events: none;
    mix-blend-mode: screen;
    animation: blobMorph var(--morph-duration, 10s) ease-in-out infinite;
    animation-delay: var(--morph-delay, 0s);
}

.blob-1 {
    width: 300px;
    height: 300px;
    top: 10%;
    left: -5%;
    background: radial-gradient(ellipse, rgba(0, 212, 255, 0.25), transparent 70%);
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
}

.blob-2 {
    width: 250px;
    height: 250px;
    bottom: 15%;
    right: -3%;
    background: radial-gradient(ellipse, rgba(255, 51, 102, 0.2), transparent 70%);
    border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
}

.blob-3 {
    width: 200px;
    height: 200px;
    top: 15%;
    left: 5%;
    background: radial-gradient(ellipse, rgba(255, 51, 102, 0.3), transparent 70%);
    border-radius: 40% 60% 55% 45% / 55% 40% 60% 45%;
    z-index: 1;
}

.blob-4 {
    width: 220px;
    height: 220px;
    bottom: 20%;
    right: 8%;
    background: radial-gradient(ellipse, rgba(0, 212, 255, 0.25), transparent 70%);
    border-radius: 55% 45% 40% 60% / 40% 55% 45% 60%;
    z-index: 1;
}

.blob-5 {
    width: 180px;
    height: 180px;
    top: 30%;
    right: 5%;
    background: radial-gradient(ellipse, rgba(168, 255, 4, 0.2), transparent 70%);
    border-radius: 45% 55% 60% 40% / 50% 45% 55% 50%;
}

.blob-6 {
    width: 260px;
    height: 260px;
    top: 5%;
    left: -2%;
    background: radial-gradient(ellipse, rgba(139, 92, 246, 0.25), transparent 70%);
    border-radius: 35% 65% 50% 50% / 45% 55% 45% 55%;
}

.blob-7 {
    width: 200px;
    height: 200px;
    top: 40%;
    right: -5%;
    background: radial-gradient(ellipse, rgba(0, 212, 255, 0.2), transparent 70%);
    border-radius: 50% 50% 35% 65% / 55% 40% 60% 45%;
}

.blob-8 {
    width: 180px;
    height: 180px;
    bottom: 10%;
    left: 10%;
    background: radial-gradient(ellipse, rgba(255, 51, 102, 0.2), transparent 70%);
    border-radius: 65% 35% 45% 55% / 40% 60% 40% 60%;
}

@keyframes blobMorph {
    0% {
        border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
        transform: scale(1);
    }
    33% {
        border-radius: 55% 45% 40% 60% / 55% 45% 55% 45%;
        transform: scale(1.05);
    }
    66% {
        border-radius: 40% 60% 55% 45% / 40% 60% 40% 60%;
        transform: scale(0.95);
    }
    100% {
        border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
        transform: scale(1);
    }
}

/* --- Sharp Angle Interruptions --- */
.sharp-angle {
    position: absolute;
    pointer-events: none;
    z-index: 2;
}

.angle-1 {
    width: 120%;
    height: 3px;
    background: var(--concrete-mid);
    opacity: 0.6;
    top: 30%;
    left: -10%;
    transform: rotate(35deg);
}

.angle-2 {
    width: 80%;
    height: 2px;
    background: var(--nozzle-cyan);
    opacity: 0.5;
    bottom: 25%;
    right: -5%;
    transform: rotate(-45deg);
}

.angle-3 {
    width: 100%;
    height: 2px;
    background: var(--marker-violet);
    opacity: 0.5;
    top: 20%;
    left: -10%;
    transform: rotate(40deg);
}

.angle-4 {
    width: 60%;
    height: 3px;
    background: var(--cap-pink);
    opacity: 0.4;
    bottom: 15%;
    right: 0;
    transform: rotate(-50deg);
}

/* --- WALL 2: THE THROW-UP --- */
.wall-throwup {
    background-color: var(--concrete-charcoal);
    transform: rotateX(1deg) rotateY(1deg);
}

.wall-throwup .wall-inner {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 2rem;
    padding: var(--section-padding);
    align-items: center;
    justify-content: center;
}

.throwup-block {
    position: relative;
    width: clamp(280px, 40vw, 500px);
    padding: 2.5rem;
}

.throwup-left {
    transform: rotate(-2deg);
}

.throwup-right {
    transform: rotate(3deg);
    margin-top: -3rem;
}

.throwup-content {
    position: relative;
    z-index: 5;
}

/* --- WALL 3: THE PIECE --- */
.wall-piece {
    background-color: var(--concrete-dark);
    transform: rotateY(1.5deg);
    min-height: 150vh;
}

.wall-piece .wall-inner {
    justify-content: flex-start;
    align-items: flex-start;
    padding-top: 8rem;
    padding-bottom: 8rem;
}

.piece-column {
    max-width: 640px;
    margin-left: 8%;
    position: relative;
    z-index: 10;
}

@media (max-width: 768px) {
    .piece-column {
        margin-left: 5%;
        max-width: 90%;
    }
}

/* Interruption panels */
.interruption-panel {
    width: 100vw;
    margin-left: calc(-8% - var(--section-padding));
    padding: 2rem 4rem;
    background-color: var(--nozzle-cyan);
    transform: rotate(-3deg);
    margin-top: 2rem;
    margin-bottom: 2rem;
    position: relative;
    z-index: 15;
}

.interruption-alt {
    background-color: var(--cap-pink);
    transform: rotate(2deg);
}

.interruption-text {
    font-family: 'Roboto Slab', serif;
    font-weight: 700;
    font-size: clamp(1.2rem, 2.5vw, 2rem);
    color: var(--concrete-dark);
    text-transform: uppercase;
    letter-spacing: -0.02em;
}

/* --- WALL 4: THE WILDSTYLE --- */
.wall-wildstyle {
    background-color: var(--concrete-charcoal);
    transform: rotateX(-1deg) rotateY(-1.5deg);
    min-height: 120vh;
}

.wall-wildstyle .wall-inner {
    justify-content: flex-start;
    align-items: center;
    padding-top: 6rem;
    padding-bottom: 6rem;
}

.wildstyle-header {
    width: 100%;
    max-width: 1000px;
    margin-bottom: 3rem;
    text-align: left;
}

.sticker-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    width: 100%;
    max-width: 1000px;
    position: relative;
    z-index: 10;
}

/* Sticker cards */
.sticker {
    border: 3px solid var(--nozzle-cyan);
    border-radius: 12px;
    padding: 2rem;
    background: var(--concrete-dark);
    transform: rotate(var(--rotation, 0deg));
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.3s ease;
    cursor: default;
    position: relative;
}

.sticker:hover {
    border-color: var(--tag-lime);
    box-shadow: 0 8px 32px rgba(0, 212, 255, 0.15);
}

.sticker-inner {
    position: relative;
    z-index: 2;
}

.sticker-label {
    font-family: 'Roboto Slab', serif;
    font-weight: 700;
    font-size: var(--fs-sticker-label);
    text-transform: uppercase;
    letter-spacing: -0.02em;
    color: var(--ash-white);
    display: block;
    margin-bottom: 0.75rem;
}

.sticker-desc {
    font-family: 'IBM Plex Sans', sans-serif;
    font-weight: 400;
    font-size: 0.95rem;
    line-height: 1.55;
    color: var(--slate-mist);
    margin-bottom: 1rem;
}

.sticker .mono-label {
    margin-bottom: 0;
    color: var(--nozzle-cyan);
}

.sticker:hover .mono-label {
    color: var(--tag-lime);
}

/* --- WALL 5: THE HEAVEN --- */
.wall-heaven {
    background-color: var(--concrete-dark);
    transform: rotateY(0deg);
    min-height: 100vh;
}

.wall-heaven .wall-inner {
    justify-content: center;
    align-items: center;
}

.heaven-content {
    text-align: center;
    max-width: 600px;
}

.heaven-text {
    font-family: 'Roboto Slab', serif;
    font-weight: 700;
    font-size: clamp(1.5rem, 3vw, 2.5rem);
    letter-spacing: -0.02em;
    line-height: 1.2;
    color: var(--ash-white);
    margin-bottom: 2rem;
}

.heaven-label {
    color: var(--concrete-mid);
    margin-bottom: 0;
}

/* --- Scroll Reveal Animations --- */
.scroll-reveal {
    opacity: 0;
    transform: translateX(-60px) rotate(-3deg);
    transition: opacity 0.5s cubic-bezier(0.22, 1, 0.36, 1),
                transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.scroll-reveal[data-direction="right"] {
    transform: translateX(60px) rotate(3deg);
}

.scroll-reveal[data-direction="bottom"] {
    transform: translateY(40px) rotate(0deg);
}

.scroll-reveal.revealed {
    opacity: 1;
    transform: translateX(0) translateY(0) rotate(0deg);
}

/* Stagger children */
.scroll-reveal.revealed:nth-child(1) { transition-delay: 0ms; }
.scroll-reveal.revealed:nth-child(2) { transition-delay: 80ms; }
.scroll-reveal.revealed:nth-child(3) { transition-delay: 160ms; }
.scroll-reveal.revealed:nth-child(4) { transition-delay: 240ms; }
.scroll-reveal.revealed:nth-child(5) { transition-delay: 320ms; }
.scroll-reveal.revealed:nth-child(6) { transition-delay: 400ms; }

/* Stamp entrance for section headings */
.stamp-entrance {
    display: inline-block;
}

.stamp-entrance.stamp-active {
    animation: stampIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes stampIn {
    0% {
        transform: scale(1.2);
        letter-spacing: 0em;
        opacity: 0.7;
    }
    100% {
        transform: scale(1);
        letter-spacing: -0.03em;
        opacity: 1;
    }
}

/* --- Tilt-3D interaction class --- */
.tilt-3d {
    transition: transform 0.15s ease-out;
    transform-style: preserve-3d;
    will-change: transform;
}

.tilt-3d.tilt-reset {
    transition: transform 0.6s ease-out;
}

/* --- Wall background transitions --- */
.wall-segment.wall-active-dark {
    background-color: var(--concrete-dark);
}

.wall-segment.wall-active-charcoal {
    background-color: var(--concrete-charcoal);
}

/* Wall 5 desaturation */
.wall-heaven.wall-desaturated .blob {
    opacity: 0;
    transition: opacity 0.8s ease;
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .wall-throwup .wall-inner {
        flex-direction: column;
        align-items: center;
    }

    .throwup-block {
        width: 90%;
        transform: rotate(0deg);
    }

    .throwup-right {
        margin-top: 1rem;
    }

    .sticker-grid {
        grid-template-columns: 1fr;
    }

    .tag-char {
        font-size: clamp(3rem, 12vw, 5rem);
    }

    .interruption-panel {
        margin-left: calc(-5% - var(--section-padding));
        padding: 1.5rem 2rem;
    }

    .spray-nav-btn {
        bottom: 1rem;
        right: 1rem;
        width: 48px;
        height: 48px;
    }

    .blob {
        transform: scale(0.6);
    }
}

@media (max-width: 480px) {
    .sticker {
        padding: 1.5rem;
    }

    .nav-tag {
        font-size: clamp(1.5rem, 8vw, 2.5rem);
    }
}

/* --- Selection color --- */
::selection {
    background: var(--nozzle-cyan);
    color: var(--concrete-dark);
}
