/* ==========================================================
   p9r.dev v2 — Graffiti Aesthetic / Magazine-Spread / Navy-Metallic
   Workshop log edition
   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;
    position: relative;
}

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

/* ---- Tag labels (uppercase, gold) ---- */
.tag-label {
    display: inline-block;
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-weight: 700;
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #D8B040;
    margin-bottom: 14px;
}

/* ==========================================================
   WALL ENTRANCE
   ========================================================== */
#wall-entrance {
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 28px;
    overflow: hidden;
}

.metallic-sheen {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(135deg,
            #0A1830 0%,
            #142648 25%,
            #0A1830 50%,
            #182840 75%,
            #0A1830 100%);
    background-size: 400% 400%;
    animation: sheen-shift 15s linear infinite;
    z-index: 0;
}

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

/* spray dots */
.spray-dots {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
}
.spray-dot {
    position: absolute;
    border-radius: 50%;
    opacity: 0;
    animation: dot-fade 600ms ease forwards;
}
.dot-magenta { background: #E04880; box-shadow: 0 0 6px rgba(224,72,128,0.5); }
.dot-gold    { background: #D8B040; box-shadow: 0 0 6px rgba(216,176,64,0.45); }
.dot-teal    { background: #40C8C0; box-shadow: 0 0 6px rgba(64,200,192,0.45); }

@keyframes dot-fade {
    from { opacity: 0; transform: scale(0.4); }
    to   { opacity: 0.85; transform: scale(1); }
}

/* paint drips */
.paint-drip {
    position: absolute;
    z-index: 1;
    pointer-events: none;
    animation: drip-drift 9s ease-in-out infinite alternate;
}
.drip-1 { top: 0;     left: 12%; width: 18px; height: auto; }
.drip-2 { top: 0;     right: 18%; width: 18px; height: auto; animation-delay: -3s; }
.drip-3 { top: 0;     left: 48%; width: 18px; height: auto; animation-delay: -5s; }
.drip-4 { top: 0;     right: 7%;  width: 18px; height: auto; animation-delay: -7s; }

@keyframes drip-drift {
    from { transform: translateY(0); }
    to   { transform: translateY(8px); }
}

.graffiti-tag-bg {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80vw;
    max-width: 900px;
    z-index: 1;
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 760px;
    animation: hero-rise 800ms ease 200ms both;
}

@keyframes hero-rise {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: translateY(0); }
}

.hero-tag {
    display: block;
    color: #40C8C0;
    margin-bottom: 18px;
}

.hero-title {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-weight: 700;
    font-size: clamp(56px, 9vw, 124px);
    letter-spacing: 0.01em;
    line-height: 1.05;
    color: #E0E4E8;
    margin-bottom: 18px;
    text-shadow: 0 4px 20px rgba(0,0,0,0.4);
}

.hero-tagline {
    font-style: italic;
    font-size: clamp(17px, 1.4vw, 22px);
    color: #B0B8C8;
    margin-bottom: 26px;
    line-height: 1.6;
}

.hero-meta {
    display: flex;
    justify-content: center;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
    color: #B0B8C8;
    font-size: 14px;
    letter-spacing: 0.05em;
}
.hero-meta-item em {
    font-style: italic;
    color: #D8B040;
    font-weight: 600;
}
.hero-meta-divider {
    color: #40C8C0;
    opacity: 0.6;
}

.scroll-indicator {
    position: absolute;
    bottom: 36px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    animation: scroll-bob 2.4s ease-in-out infinite;
}
.scroll-text {
    font-size: 12px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #B0B8C8;
    opacity: 0.7;
}
@keyframes scroll-bob {
    0%, 100% { transform: translate(-50%, 0); }
    50%      { transform: translate(-50%, 6px); }
}

/* ==========================================================
   INDEX BAND
   ========================================================== */
#index-band {
    position: relative;
    z-index: 2;
    background: linear-gradient(180deg, rgba(24,40,64,0.5), rgba(10,24,48,0.95));
    border-top: 1px solid rgba(176,184,200,0.12);
    border-bottom: 1px solid rgba(176,184,200,0.12);
    padding: 56px 28px;
}
.index-inner {
    max-width: 1280px;
    margin: 0 auto;
}
.index-list {
    list-style: none;
    margin-top: 16px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 0;
    border-top: 1px solid rgba(176,184,200,0.18);
}
.index-list li {
    border-bottom: 1px solid rgba(176,184,200,0.14);
    border-right: 1px solid rgba(176,184,200,0.14);
}
.index-list li:last-child { border-right: none; }
.index-list a {
    display: flex;
    align-items: baseline;
    gap: 14px;
    padding: 22px 18px;
    color: #B0B8C8;
    text-decoration: none;
    transition: background-color 250ms ease, color 250ms ease;
}
.index-list a:hover {
    background: rgba(224,72,128,0.06);
    color: #E0E4E8;
}
.index-num {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-weight: 700;
    font-size: 28px;
    color: #E04880;
    min-width: 38px;
}
.index-title {
    flex: 1;
    font-style: italic;
    font-size: 17px;
}
.index-time {
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #D8B040;
}

/* ==========================================================
   DEV SPREADS
   ========================================================== */
#dev-spreads {
    position: relative;
    z-index: 2;
    padding: 90px 28px 60px;
    max-width: 1280px;
    margin: 0 auto;
}

.spread {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 56px;
    margin-bottom: 110px;
    align-items: start;
    opacity: 0;
    transform: translateY(20px) rotate(-0.5deg);
    transition: opacity 700ms ease, transform 700ms ease;
}
.spread.in-view {
    opacity: 1;
    transform: translateY(0) rotate(0);
}

.spread-left { padding: 12px 0; }

.spread-title {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-weight: 700;
    font-size: clamp(28px, 3.2vw, 46px);
    letter-spacing: 0.01em;
    line-height: 1.1;
    color: #E0E4E8;
    margin-bottom: 22px;
}

.spread-lede {
    font-style: italic;
    font-size: 18px;
    line-height: 1.7;
    color: #E0E4E8;
    margin-bottom: 18px;
    border-left: 2px solid #E04880;
    padding-left: 16px;
}

.spread-body {
    margin-bottom: 16px;
    line-height: 1.85;
}

.spread-checklist {
    list-style: none;
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid rgba(176,184,200,0.18);
}
.spread-checklist li {
    display: flex;
    gap: 12px;
    padding: 8px 0;
    font-size: 16px;
    line-height: 1.5;
    color: #B0B8C8;
}
.check-mark {
    display: inline-block;
    color: #40C8C0;
    font-weight: 700;
    font-size: 18px;
    width: 14px;
}

/* ---- Code Panels ---- */
.code-panel {
    position: relative;
    background: #182840;
    border: 1px solid rgba(176,184,200,0.18);
    border-radius: 6px;
    overflow: hidden;
    cursor: zoom-in;
    transition: border-color 350ms ease, box-shadow 350ms ease, transform 350ms ease;
}
.code-panel:hover {
    border-color: #E04880;
    box-shadow: 0 0 0 1px rgba(224,72,128,0.35), 0 12px 30px rgba(0,0,0,0.35);
    transform: translateY(-2px);
}
.code-panel-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    background: #0F1E38;
    border-bottom: 1px solid rgba(176,184,200,0.14);
}
.code-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
}
.dot-r { background: #E04880; }
.dot-y { background: #D8B040; }
.dot-g { background: #40C8C0; }
.code-filename {
    margin-left: 12px;
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-weight: 600;
    font-size: 13px;
    color: #B0B8C8;
    letter-spacing: 0.02em;
}
.code-content {
    margin: 0;
    padding: 22px 22px 26px;
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-weight: 600;
    font-size: 14px;
    line-height: 1.7;
    color: #E0E4E8;
    overflow-x: auto;
    white-space: pre;
}
.code-content code { font-family: inherit; }
.code-keyword { color: #E04880; font-weight: 700; }
.code-type    { color: #40C8C0; }
.code-func    { color: #D8B040; }
.code-field   { color: #B0B8C8; }
.code-string  { color: #D8B040; font-style: italic; }
.code-literal { color: #40C8C0; font-style: italic; }
.code-comment { color: #6F7C92; font-style: italic; }

.spray-accent {
    position: absolute;
    width: 64px;
    height: 64px;
    pointer-events: none;
}
.spray-accent-tr { top: -10px; right: -10px; }
.spray-accent-bl { bottom: -10px; left: -10px; }

.panel-caption {
    margin-top: 14px;
    display: flex;
    gap: 12px;
    align-items: baseline;
    color: #B0B8C8;
    font-size: 13px;
    line-height: 1.5;
}
.caption-label {
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 11px;
    color: #D8B040;
}
.caption-text { font-style: italic; }

/* ==========================================================
   STREET GALLERY
   ========================================================== */
#street-gallery {
    position: relative;
    z-index: 2;
    padding: 80px 0 90px;
    border-top: 1px solid rgba(176,184,200,0.12);
    border-bottom: 1px solid rgba(176,184,200,0.12);
    background: linear-gradient(180deg, rgba(10,24,48,0.95), rgba(24,40,64,0.6), rgba(10,24,48,0.95));
}
.gallery-header {
    max-width: 1280px;
    margin: 0 auto 36px;
    padding: 0 28px;
}
.gallery-title {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-weight: 700;
    font-size: clamp(28px, 3.2vw, 46px);
    color: #E0E4E8;
    margin-bottom: 10px;
}
.gallery-sub {
    font-style: italic;
    font-size: 16px;
    color: #B0B8C8;
    max-width: 520px;
}
.gallery-track {
    display: flex;
    gap: 28px;
    padding: 14px 28px 22px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-color: #E04880 transparent;
    scrollbar-width: thin;
}
.gallery-track::-webkit-scrollbar { height: 6px; }
.gallery-track::-webkit-scrollbar-track { background: transparent; }
.gallery-track::-webkit-scrollbar-thumb { background: #E04880; border-radius: 3px; }

.gallery-card {
    flex: 0 0 320px;
    scroll-snap-align: start;
    transition: transform 350ms ease;
}
.gallery-card:hover { transform: translateY(-4px) rotate(0.4deg); }

.gallery-card-inner {
    position: relative;
    background: #182840;
    border-radius: 6px;
    padding: 26px 24px;
    height: 100%;
    overflow: hidden;
}
.graffiti-frame {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}
.gallery-card-content { position: relative; z-index: 2; }
.gallery-card-title {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-weight: 700;
    font-size: 30px;
    color: #E0E4E8;
    margin: 6px 0 12px;
    letter-spacing: 0.01em;
}
.gallery-card-desc {
    font-size: 14.5px;
    line-height: 1.65;
    color: #B0B8C8;
    margin-bottom: 14px;
}
.gallery-card-tech {
    display: block;
    font-size: 12px;
    letter-spacing: 0.06em;
    color: #40C8C0;
    text-transform: uppercase;
    font-weight: 600;
}
.gallery-card-version {
    display: inline-block;
    margin-top: 6px;
    font-size: 12px;
    color: #D8B040;
    font-style: italic;
}

/* ==========================================================
   WORKSHOP NOTES
   ========================================================== */
#workshop-notes {
    position: relative;
    z-index: 2;
    padding: 90px 28px;
    max-width: 1280px;
    margin: 0 auto;
}
.notes-inner { max-width: 1100px; margin: 0 auto; }
.notes-title {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-style: italic;
    font-weight: 600;
    font-size: clamp(28px, 3vw, 42px);
    color: #E0E4E8;
    margin-bottom: 38px;
}
.notes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 0;
    border-top: 1px solid rgba(176,184,200,0.18);
}
.note {
    padding: 26px 22px;
    border-bottom: 1px solid rgba(176,184,200,0.14);
    border-right: 1px solid rgba(176,184,200,0.14);
}
.note:last-child { border-right: none; }
.note-num {
    display: inline-block;
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-weight: 700;
    font-size: 13px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #E04880;
    margin-bottom: 10px;
}
.note-body {
    font-style: italic;
    font-size: 16px;
    line-height: 1.7;
    color: #B0B8C8;
}

/* ==========================================================
   CREW CREDITS / FOOTER
   ========================================================== */
#crew-credits {
    position: relative;
    z-index: 2;
    padding: 70px 28px 38px;
    background: linear-gradient(180deg, #0A1830, #060F22);
    border-top: 1px solid rgba(176,184,200,0.18);
    overflow: hidden;
}
.footer-drip {
    position: absolute;
    top: 0;
    width: 14px;
    pointer-events: none;
}
.footer-drip-1 { left: 12%; }
.footer-drip-2 { left: 50%; }
.footer-drip-3 { right: 14%; }

.footer-tag-watermark {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60vw;
    max-width: 700px;
    pointer-events: none;
}

.footer-content {
    position: relative;
    z-index: 2;
    max-width: 1280px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 48px;
    margin-bottom: 36px;
}
.footer-heading {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-weight: 700;
    font-size: 28px;
    color: #E0E4E8;
    margin-bottom: 12px;
}
.footer-text {
    font-size: 15px;
    line-height: 1.75;
    color: #B0B8C8;
}
.footer-links {
    list-style: none;
}
.footer-links li { padding: 4px 0; }
.footer-links a {
    color: #B0B8C8;
    text-decoration: none;
    border-bottom: 1px dotted rgba(176,184,200,0.4);
    transition: color 250ms ease, border-color 250ms ease;
}
.footer-links a:hover { color: #E04880; border-color: #E04880; }

.footer-bottom {
    position: relative;
    z-index: 2;
    max-width: 1280px;
    margin: 0 auto;
    padding-top: 22px;
    border-top: 1px solid rgba(176,184,200,0.18);
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 13px;
    color: #B0B8C8;
}
.footer-tag-mark {
    color: #40C8C0;
    font-style: italic;
    letter-spacing: 0.04em;
}

/* ==========================================================
   ZOOM OVERLAY
   ========================================================== */
#zoom-overlay {
    position: fixed;
    inset: 0;
    background: rgba(6, 12, 26, 0.92);
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 40px;
    cursor: zoom-out;
    backdrop-filter: blur(2px);
}
#zoom-overlay.active {
    display: flex;
    animation: overlay-fade 320ms ease;
}
@keyframes overlay-fade {
    from { opacity: 0; }
    to { opacity: 1; }
}
#zoom-content {
    transform: scale(0.96);
    transition: transform 400ms ease;
    max-width: 1000px;
    width: 100%;
    max-height: 90vh;
    overflow: auto;
}
#zoom-overlay.active #zoom-content { transform: scale(1); }
#zoom-content .code-panel {
    cursor: default;
    box-shadow: 0 0 0 1px rgba(224,72,128,0.45), 0 30px 60px rgba(0,0,0,0.6);
}

/* ==========================================================
   RESPONSIVE
   ========================================================== */
@media (max-width: 900px) {
    .spread {
        grid-template-columns: 1fr;
        gap: 30px;
        margin-bottom: 70px;
    }
    .footer-content { grid-template-columns: 1fr; gap: 28px; }
    .index-list li, .note { border-right: none; }
    .gallery-card { flex: 0 0 270px; }
    #dev-spreads { padding: 50px 22px 30px; }
    .hero-title { font-size: clamp(48px, 12vw, 84px); }
}

@media (max-width: 560px) {
    .hero-meta { gap: 8px; }
    .gallery-card { flex: 0 0 240px; }
    .code-content { font-size: 13px; }
    .footer-bottom { flex-direction: column; align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
    .metallic-sheen, .paint-drip, .scroll-indicator, .spray-dot {
        animation: none !important;
    }
    .spread {
        opacity: 1;
        transform: none;
    }
}
