/* ==========================================================
   p9r.dev — Graffiti Aesthetic / Magazine-Spread / Navy-Metallic
   Colors: #0A1830, #B0B8C8, #E0E4E8, #E04880, #D8B040, #40C8C0, #182840
   Font: Cormorant Garamond
   ========================================================== */

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    background-color: #0A1830;
    color: #B0B8C8;
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-weight: 400;
    font-size: clamp(15px, 1vw, 17px);
    line-height: 1.8;
    overflow-x: hidden;
}

/* ---- Global Graffiti Tag Watermark ---- */
#graffiti-tag-watermark {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80vw;
    max-width: 800px;
    opacity: 0.04;
    pointer-events: none;
    z-index: 0;
}

/* ---- Typography ---- */
h1, h2, h3 {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-weight: 700;
    letter-spacing: 0.01em;
    color: #E0E4E8;
}

.tag-label {
    display: inline-block;
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-weight: 700;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #E04880;
    margin-bottom: 12px;
}

/* =======================================
   WALL ENTRANCE (Hero)
   ======================================= */
#wall-entrance {
    position: relative;
    width: 100%;
    height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    z-index: 1;
}

/* Metallic sheen gradient */
.metallic-sheen {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        135deg,
        #0A1830 0%,
        #12243E 25%,
        #1A3050 40%,
        #0E1E34 55%,
        #0A1830 70%,
        #162C48 85%,
        #0A1830 100%
    );
    background-size: 400% 400%;
    animation: metallicSheen 15s ease infinite;
    z-index: -2;
}

@keyframes metallicSheen {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

#wall-entrance:hover .metallic-sheen {
    animation-duration: 6s;
}

/* Spray dots */
.spray-dots {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 1;
}

.spray-dot {
    position: absolute;
    border-radius: 50%;
    opacity: 0;
    animation: sprayIn 0.4s ease forwards;
}

.dot-magenta { background-color: #E04880; }
.dot-gold { background-color: #D8B040; }
.dot-teal { background-color: #40C8C0; }

.spray-dot:nth-child(1) { animation-delay: 0.7s; }
.spray-dot:nth-child(2) { animation-delay: 0.8s; }
.spray-dot:nth-child(3) { animation-delay: 0.9s; }
.spray-dot:nth-child(4) { animation-delay: 1.0s; }
.spray-dot:nth-child(5) { animation-delay: 1.1s; }
.spray-dot:nth-child(6) { animation-delay: 1.2s; }
.spray-dot:nth-child(7) { animation-delay: 1.3s; }
.spray-dot:nth-child(8) { animation-delay: 1.4s; }
.spray-dot:nth-child(9) { animation-delay: 1.5s; }
.spray-dot:nth-child(10) { animation-delay: 1.6s; }
.spray-dot:nth-child(11) { animation-delay: 1.7s; }
.spray-dot:nth-child(12) { animation-delay: 1.8s; }
.spray-dot:nth-child(13) { animation-delay: 1.9s; }
.spray-dot:nth-child(14) { animation-delay: 2.0s; }
.spray-dot:nth-child(15) { animation-delay: 2.1s; }
.spray-dot:nth-child(16) { animation-delay: 2.2s; }
.spray-dot:nth-child(17) { animation-delay: 2.3s; }
.spray-dot:nth-child(18) { animation-delay: 2.4s; }

@keyframes sprayIn {
    0% {
        opacity: 0;
        transform: scale(0);
    }
    60% {
        opacity: 0.6;
        transform: scale(1.3);
    }
    100% {
        opacity: 0.45;
        transform: scale(1);
    }
}

/* Paint drips */
.paint-drip {
    position: absolute;
    width: 20px;
    z-index: 1;
    pointer-events: none;
}

.drip-1 {
    top: 0;
    left: 15%;
    height: 80px;
}

.drip-2 {
    top: 0;
    right: 22%;
    height: 60px;
}

.drip-3 {
    top: 0;
    left: 45%;
    height: 70px;
}

/* Graffiti tag behind hero title */
.graffiti-tag-bg {
    position: absolute;
    width: 60vw;
    max-width: 600px;
    opacity: 0;
    animation: tagFadeIn 1.5s ease 0.8s forwards;
    z-index: -1;
    pointer-events: none;
}

@keyframes tagFadeIn {
    to { opacity: 1; }
}

/* Hero content */
.hero-content {
    text-align: center;
    z-index: 2;
    opacity: 0;
    animation: heroFadeIn 0.6s ease 0.2s forwards;
}

@keyframes heroFadeIn {
    to { opacity: 1; }
}

.hero-title {
    font-size: clamp(40px, 8vw, 100px);
    font-weight: 700;
    letter-spacing: 0.01em;
    color: #E0E4E8;
    line-height: 1.1;
    margin-bottom: 16px;
}

.hero-tagline {
    font-size: clamp(14px, 1.4vw, 20px);
    font-weight: 400;
    font-style: italic;
    color: #B0B8C8;
    letter-spacing: 0.02em;
    opacity: 0.7;
}

/* Scroll indicator */
.scroll-indicator {
    position: absolute;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    animation: fadeInBounce 1s ease 1.5s forwards;
}

@keyframes fadeInBounce {
    0% { opacity: 0; transform: translateX(-50%) translateY(-10px); }
    100% { opacity: 0.5; transform: translateX(-50%) translateY(0); }
}

.scroll-indicator svg {
    animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(8px); }
}

/* =======================================
   DEV SPREADS (Two-column magazine)
   ======================================= */
#dev-spreads {
    position: relative;
    z-index: 1;
    max-width: 1200px;
    margin: 0 auto;
    padding: 80px 40px;
}

.spread {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 28px;
    margin-bottom: 100px;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.spread.in-view {
    opacity: 1;
    transform: translateY(0);
}

.spread-left {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-right: 20px;
}

.spread-title {
    font-size: clamp(28px, 3.5vw, 52px);
    line-height: 1.15;
    margin-bottom: 20px;
    color: #E0E4E8;
}

.spread-body {
    margin-bottom: 16px;
    color: #B0B8C8;
}

.spread-right {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Tool tags */
.tool-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
}

.tool-tag {
    display: inline-block;
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #40C8C0;
    border: 1px solid rgba(64, 200, 192, 0.3);
    padding: 4px 12px;
    border-radius: 2px;
    transition: border-color 0.3s ease, color 0.3s ease;
}

.tool-tag:hover {
    border-color: #40C8C0;
    color: #E0E4E8;
}

/* ---- Code Panels ---- */
.code-panel {
    position: relative;
    background-color: #182840;
    border: 1px solid rgba(176, 184, 200, 0.1);
    border-radius: 6px;
    overflow: hidden;
    width: 100%;
    cursor: pointer;
    transition: border-color 0.3s ease, box-shadow 0.3s ease, transform 0.4s ease;
}

.code-panel:hover {
    border-color: #E04880;
    box-shadow: 0 0 20px rgba(224, 72, 128, 0.15);
}

.code-panel.in-view {
    box-shadow: 0 0 15px rgba(176, 184, 200, 0.08);
}

.code-panel.wobble {
    animation: wobble 0.6s ease;
}

@keyframes wobble {
    0% { transform: rotate(0deg); }
    25% { transform: rotate(0.5deg); }
    50% { transform: rotate(-0.5deg); }
    75% { transform: rotate(0.3deg); }
    100% { transform: rotate(0deg); }
}

.code-panel-header {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 14px;
    background-color: rgba(10, 24, 48, 0.6);
    border-bottom: 1px solid rgba(176, 184, 200, 0.08);
}

.code-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.code-dot.dot-r { background-color: #E04880; }
.code-dot.dot-y { background-color: #D8B040; }
.code-dot.dot-g { background-color: #40C8C0; }

.code-filename {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-weight: 600;
    font-size: 12px;
    letter-spacing: 0.04em;
    color: #B0B8C8;
    margin-left: 8px;
    opacity: 0.7;
}

.code-content {
    padding: 18px 20px;
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-weight: 600;
    font-size: 14px;
    line-height: 1.7;
    color: #B0B8C8;
    overflow-x: auto;
    white-space: pre;
    tab-size: 4;
}

.code-content code {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-weight: 600;
}

/* Code syntax colors */
.code-keyword { color: #E04880; }
.code-type { color: #40C8C0; }
.code-func { color: #D8B040; }
.code-field { color: #E0E4E8; }
.code-string { color: #40C8C0; opacity: 0.85; }
.code-literal { color: #D8B040; opacity: 0.9; }

/* Spray accents on code panels */
.spray-accent {
    position: absolute;
    width: 40px;
    height: 40px;
    pointer-events: none;
}

.spray-accent-tr {
    top: -5px;
    right: -5px;
}

.spray-accent-bl {
    bottom: -5px;
    left: -5px;
}

/* =======================================
   STREET GALLERY (Horizontal scroll)
   ======================================= */
#street-gallery {
    position: relative;
    z-index: 1;
    padding: 60px 0 80px;
    overflow: hidden;
}

.gallery-header {
    max-width: 1200px;
    margin: 0 auto 40px;
    padding: 0 40px;
}

.gallery-title {
    font-size: clamp(28px, 3.5vw, 52px);
    color: #E0E4E8;
}

.gallery-track {
    display: flex;
    gap: 28px;
    padding: 0 40px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    -ms-overflow-style: none;
    cursor: grab;
}

.gallery-track::-webkit-scrollbar {
    display: none;
}

.gallery-track:active {
    cursor: grabbing;
}

.gallery-card {
    flex: 0 0 340px;
    scroll-snap-align: start;
    position: relative;
}

.gallery-card-inner {
    position: relative;
    background-color: #182840;
    border-radius: 6px;
    overflow: hidden;
    padding: 32px 28px;
    min-height: 260px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gallery-card-inner:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
}

.graffiti-frame {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.gallery-card-content {
    position: relative;
    z-index: 1;
}

.gallery-card-title {
    font-size: clamp(24px, 2.5vw, 36px);
    color: #E0E4E8;
    margin-bottom: 10px;
}

.gallery-card-desc {
    font-size: clamp(14px, 0.9vw, 16px);
    color: #B0B8C8;
    margin-bottom: 14px;
    line-height: 1.7;
}

.gallery-card-tech {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-weight: 700;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #D8B040;
}

/* =======================================
   CREW CREDITS (Footer)
   ======================================= */
#crew-credits {
    position: relative;
    z-index: 1;
    max-width: 1200px;
    margin: 0 auto;
    padding: 80px 40px 40px;
    border-top: 1px solid rgba(176, 184, 200, 0.1);
}

/* Footer drips */
.footer-drip {
    position: absolute;
    top: -1px;
    width: 16px;
    pointer-events: none;
}

.footer-drip-1 { left: 10%; height: 50px; }
.footer-drip-2 { left: 50%; height: 40px; }
.footer-drip-3 { right: 18%; height: 45px; }

/* Footer tag watermark */
.footer-tag-watermark {
    position: absolute;
    bottom: 20px;
    right: 40px;
    width: 300px;
    pointer-events: none;
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 60px;
}

.footer-heading {
    font-size: clamp(20px, 2vw, 28px);
    color: #E0E4E8;
    margin-bottom: 12px;
}

.footer-text {
    color: #B0B8C8;
    font-size: clamp(14px, 0.9vw, 16px);
    line-height: 1.7;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 8px;
}

.footer-links a {
    color: #B0B8C8;
    text-decoration: none;
    font-weight: 600;
    font-size: 16px;
    transition: color 0.3s ease;
    position: relative;
}

.footer-links a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background-color: #E04880;
    transition: width 0.3s ease;
}

.footer-links a:hover {
    color: #E04880;
}

.footer-links a:hover::after {
    width: 100%;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 20px;
    border-top: 1px solid rgba(176, 184, 200, 0.06);
}

.footer-copyright {
    font-size: 13px;
    color: rgba(176, 184, 200, 0.5);
}

.footer-tag-mark {
    font-size: 13px;
    font-style: italic;
    color: rgba(176, 184, 200, 0.3);
}

/* =======================================
   ZOOM OVERLAY
   ======================================= */
#zoom-overlay {
    position: fixed;
    inset: 0;
    background-color: rgba(10, 24, 48, 0.92);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
    cursor: pointer;
}

#zoom-overlay.active {
    opacity: 1;
    pointer-events: all;
}

#zoom-content {
    max-width: 90vw;
    max-height: 90vh;
    overflow: auto;
    transform: scale(0.9);
    transition: transform 0.4s ease;
}

#zoom-overlay.active #zoom-content {
    transform: scale(1);
}

#zoom-content .code-panel {
    cursor: default;
    border-color: rgba(224, 72, 128, 0.3);
    box-shadow: 0 0 40px rgba(224, 72, 128, 0.15);
    max-width: 700px;
}

#zoom-content .code-panel:hover {
    border-color: rgba(224, 72, 128, 0.3);
}

#zoom-content .code-content {
    font-size: 16px;
    padding: 24px 28px;
}

/* =======================================
   Graffiti watermark parallax/hover
   ======================================= */
#graffiti-tag-watermark {
    transition: opacity 0.5s ease;
}

body:hover #graffiti-tag-watermark {
    opacity: 0.07;
}

/* =======================================
   RESPONSIVE
   ======================================= */
@media (max-width: 768px) {
    .spread {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .spread-left {
        padding-right: 0;
    }

    #dev-spreads {
        padding: 40px 20px;
    }

    .gallery-header {
        padding: 0 20px;
    }

    .gallery-track {
        padding: 0 20px;
    }

    .gallery-card {
        flex: 0 0 280px;
    }

    #crew-credits {
        padding: 60px 20px 30px;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }

    .paint-drip {
        display: none;
    }

    .hero-title {
        font-size: clamp(36px, 12vw, 72px);
    }
}

@media (max-width: 480px) {
    .gallery-card {
        flex: 0 0 260px;
    }

    .gallery-card-inner {
        padding: 24px 20px;
        min-height: 220px;
    }
}
