/* pzz.lu - Graffiti Puzzle Wall */
/* Palette: Deep Violet #1A0A2E, Aurora Green #00E5A0, Electric Pink #FF2D7B, Pale Gold #FFD700, Soft White #F0EDF5, Charcoal Mist #2A2540 */
/* Fonts: Space Grotesk (display), Inter (body) */

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    line-height: 1.7;
    font-weight: 400;
    background-color: #1A0A2E;
    color: #F0EDF5;
    min-height: 100vh;
    overflow-x: hidden;
}

/* ===== HEADER ===== */
#site-header {
    position: relative;
    padding: 80px 24px 60px;
    text-align: center;
    background: linear-gradient(180deg, #1A0A2E 0%, #2A2540 50%, #1A0A2E 100%);
    overflow: hidden;
}

#site-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(ellipse 600px 300px at 20% 50%, rgba(0, 229, 160, 0.12) 0%, transparent 70%),
        radial-gradient(ellipse 500px 250px at 80% 30%, rgba(255, 45, 123, 0.10) 0%, transparent 70%),
        radial-gradient(ellipse 400px 200px at 50% 80%, rgba(255, 215, 0, 0.08) 0%, transparent 70%);
    pointer-events: none;
}

.header-drip {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: linear-gradient(90deg, #00E5A0, #FF2D7B, #FFD700, #00E5A0);
    background-size: 300% 100%;
    animation: drip-flow 8s linear infinite;
}

.header-drip::after {
    content: '';
    position: absolute;
    top: 6px;
    left: 15%;
    width: 4px;
    height: 30px;
    background: linear-gradient(180deg, #00E5A0, transparent);
    border-radius: 0 0 2px 2px;
}

.header-drip-bottom {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #FF2D7B, #FFD700, #00E5A0, #FF2D7B);
    background-size: 300% 100%;
    animation: drip-flow 8s linear infinite reverse;
}

.header-drip-bottom::before {
    content: '';
    position: absolute;
    bottom: -20px;
    right: 25%;
    width: 3px;
    height: 20px;
    background: linear-gradient(180deg, #FF2D7B, transparent);
    border-radius: 0 0 2px 2px;
}

.header-drip-bottom::after {
    content: '';
    position: absolute;
    bottom: -35px;
    left: 60%;
    width: 3px;
    height: 35px;
    background: linear-gradient(180deg, #FFD700, transparent);
    border-radius: 0 0 2px 2px;
}

@keyframes drip-flow {
    0% { background-position: 0% 0%; }
    100% { background-position: 300% 0%; }
}

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

.site-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(2rem, 5vw, 4rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    color: #F0EDF5;
    text-transform: lowercase;
    position: relative;
    display: inline-block;
}

.site-title::before {
    content: 'pzz.lu';
    position: absolute;
    top: 3px;
    left: 3px;
    color: #FF2D7B;
    z-index: -1;
    opacity: 0.6;
}

.site-title::after {
    content: 'pzz.lu';
    position: absolute;
    top: -2px;
    left: -2px;
    color: #00E5A0;
    z-index: -1;
    opacity: 0.4;
}

.title-dot {
    color: #FFD700;
}

.site-tagline {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1rem;
    font-weight: 400;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: #00E5A0;
    margin-top: 8px;
    opacity: 0.8;
}

/* ===== SECTION HEADERS ===== */
.section-header {
    padding: 60px 24px 16px;
    position: relative;
}

.section-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(1.5rem, 3vw, 2.5rem);
    font-weight: 700;
    color: #F0EDF5;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, #FF2D7B, #FFD700, transparent);
}

.spray-border {
    margin-top: 12px;
    height: 2px;
    background: linear-gradient(90deg,
        #00E5A0 0%, #00E5A0 5%,
        transparent 5%, transparent 8%,
        #FF2D7B 8%, #FF2D7B 20%,
        transparent 20%, transparent 22%,
        #FFD700 22%, #FFD700 30%,
        transparent 30%, transparent 100%
    );
    opacity: 0.6;
}

/* ===== CARD GRID ===== */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
    padding: 16px 24px 40px;
    max-width: 1400px;
    margin: 0 auto;
}

/* ===== PUZZLE CARDS ===== */
.puzzle-card {
    position: relative;
    background: #2A2540;
    border-radius: 8px;
    overflow: hidden;
    min-height: 260px;
    display: flex;
    flex-direction: column;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.puzzle-card:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 12px 40px rgba(0, 229, 160, 0.15), 0 4px 16px rgba(255, 45, 123, 0.10);
}

/* Collage layers */
.card-collage-layer {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
}

.card-collage-layer.layer-1 {
    background:
        linear-gradient(135deg, rgba(0, 229, 160, 0.08) 0%, transparent 50%),
        linear-gradient(225deg, rgba(255, 45, 123, 0.06) 0%, transparent 50%);
    mix-blend-mode: overlay;
}

.card-collage-layer.layer-2 {
    background:
        radial-gradient(circle at 80% 20%, rgba(255, 215, 0, 0.10) 0%, transparent 40%),
        radial-gradient(circle at 20% 80%, rgba(0, 229, 160, 0.06) 0%, transparent 40%);
    mix-blend-mode: multiply;
}

/* Different collage tints per card category */
.puzzle-card[data-category="logic"] .layer-1 {
    background:
        linear-gradient(135deg, rgba(0, 229, 160, 0.12) 0%, transparent 60%),
        linear-gradient(315deg, rgba(255, 215, 0, 0.06) 0%, transparent 40%);
}

.puzzle-card[data-category="pattern"] .layer-1 {
    background:
        linear-gradient(135deg, rgba(255, 45, 123, 0.12) 0%, transparent 60%),
        linear-gradient(315deg, rgba(0, 229, 160, 0.06) 0%, transparent 40%);
}

.puzzle-card[data-category="spatial"] .layer-1 {
    background:
        linear-gradient(135deg, rgba(255, 215, 0, 0.12) 0%, transparent 60%),
        linear-gradient(315deg, rgba(255, 45, 123, 0.06) 0%, transparent 40%);
}

.puzzle-card[data-category="visual"] .layer-1 {
    background:
        linear-gradient(135deg, rgba(0, 229, 160, 0.06) 0%, transparent 40%),
        linear-gradient(315deg, rgba(255, 45, 123, 0.10) 0%, transparent 50%);
}

.puzzle-card[data-category="math"] .layer-1 {
    background:
        linear-gradient(135deg, rgba(255, 215, 0, 0.14) 0%, transparent 60%),
        linear-gradient(315deg, rgba(0, 229, 160, 0.04) 0%, transparent 40%);
}

.puzzle-card[data-category="word"] .layer-1 {
    background:
        linear-gradient(180deg, rgba(255, 45, 123, 0.08) 0%, transparent 50%),
        linear-gradient(0deg, rgba(255, 215, 0, 0.08) 0%, transparent 50%);
}

.puzzle-card[data-category="sequence"] .layer-1 {
    background:
        linear-gradient(45deg, rgba(0, 229, 160, 0.10) 0%, transparent 50%),
        linear-gradient(225deg, rgba(255, 215, 0, 0.08) 0%, transparent 50%);
}

/* Nature leaf motifs via clip-path */
.leaf-motif {
    position: absolute;
    width: 60px;
    height: 60px;
    opacity: 0.12;
    pointer-events: none;
    z-index: 1;
}

.leaf-motif::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: #00E5A0;
    clip-path: path('M30 0 Q45 15 50 30 Q45 50 30 60 Q15 50 10 30 Q15 15 30 0');
}

.leaf-top-right {
    top: 10px;
    right: 10px;
    transform: rotate(30deg);
}

.leaf-top-left {
    top: 10px;
    left: 10px;
    transform: rotate(-20deg);
}

.leaf-bottom-right {
    bottom: 10px;
    right: 10px;
    transform: rotate(150deg);
}

.leaf-bottom-left {
    bottom: 10px;
    left: 10px;
    transform: rotate(-150deg);
}

.leaf-top-right::before {
    background: #00E5A0;
}

.leaf-bottom-left::before {
    background: #FF2D7B;
}

.leaf-top-left::before {
    background: #FFD700;
}

.leaf-bottom-right::before {
    background: #00E5A0;
}

/* Card content */
.card-content {
    position: relative;
    z-index: 2;
    padding: 24px 20px 20px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.card-tag {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: #00E5A0;
    background: rgba(0, 229, 160, 0.1);
    padding: 3px 10px;
    border-radius: 3px;
    display: inline-block;
    align-self: flex-start;
    border-left: 2px solid #00E5A0;
}

.puzzle-card[data-category="pattern"] .card-tag {
    color: #FF2D7B;
    background: rgba(255, 45, 123, 0.1);
    border-left-color: #FF2D7B;
}

.puzzle-card[data-category="spatial"] .card-tag {
    color: #FFD700;
    background: rgba(255, 215, 0, 0.1);
    border-left-color: #FFD700;
}

.puzzle-card[data-category="visual"] .card-tag {
    color: #FF2D7B;
    background: rgba(255, 45, 123, 0.1);
    border-left-color: #FF2D7B;
}

.puzzle-card[data-category="math"] .card-tag {
    color: #FFD700;
    background: rgba(255, 215, 0, 0.1);
    border-left-color: #FFD700;
}

.puzzle-card[data-category="word"] .card-tag {
    color: #F0EDF5;
    background: rgba(240, 237, 245, 0.08);
    border-left-color: #F0EDF5;
}

.puzzle-card[data-category="sequence"] .card-tag {
    color: #00E5A0;
    background: rgba(0, 229, 160, 0.1);
    border-left-color: #00E5A0;
}

.card-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.35rem;
    font-weight: 700;
    color: #F0EDF5;
    margin-top: 14px;
    line-height: 1.2;
}

.card-desc {
    font-family: 'Inter', sans-serif;
    font-size: 0.875rem;
    color: rgba(240, 237, 245, 0.7);
    margin-top: 10px;
    line-height: 1.6;
    flex: 1;
}

.card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid rgba(240, 237, 245, 0.08);
}

.difficulty {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: 2px 8px;
    border-radius: 3px;
}

.difficulty-easy {
    color: #00E5A0;
    background: rgba(0, 229, 160, 0.12);
}

.difficulty-medium {
    color: #FFD700;
    background: rgba(255, 215, 0, 0.12);
}

.difficulty-hard {
    color: #FF2D7B;
    background: rgba(255, 45, 123, 0.12);
}

.difficulty-expert {
    color: #F0EDF5;
    background: rgba(240, 237, 245, 0.10);
    border: 1px solid rgba(240, 237, 245, 0.2);
}

.card-count {
    font-family: 'Inter', sans-serif;
    font-size: 0.75rem;
    color: rgba(240, 237, 245, 0.4);
}

/* ===== FEATURED CARD PULSE ===== */
.puzzle-card.featured {
    border: 1px solid rgba(0, 229, 160, 0.15);
    animation: pulse 2s ease-in-out infinite;
}

.puzzle-card.featured:nth-child(2) {
    animation-delay: 0.5s;
    border-color: rgba(255, 45, 123, 0.15);
}

.puzzle-card.featured:nth-child(3) {
    animation-delay: 1s;
    border-color: rgba(255, 215, 0, 0.15);
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 4px 20px rgba(0, 229, 160, 0.08);
    }
    50% {
        transform: scale(1.015);
        box-shadow: 0 8px 30px rgba(0, 229, 160, 0.18), 0 0 60px rgba(0, 229, 160, 0.06);
    }
}

.puzzle-card.featured:nth-child(2) {
    animation-name: pulse-pink;
}

@keyframes pulse-pink {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 4px 20px rgba(255, 45, 123, 0.08);
    }
    50% {
        transform: scale(1.015);
        box-shadow: 0 8px 30px rgba(255, 45, 123, 0.18), 0 0 60px rgba(255, 45, 123, 0.06);
    }
}

.puzzle-card.featured:nth-child(3) {
    animation-name: pulse-gold;
}

@keyframes pulse-gold {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 4px 20px rgba(255, 215, 0, 0.08);
    }
    50% {
        transform: scale(1.015);
        box-shadow: 0 8px 30px rgba(255, 215, 0, 0.18), 0 0 60px rgba(255, 215, 0, 0.06);
    }
}

/* Hover overrides pulse */
.puzzle-card.featured:hover {
    animation-play-state: paused;
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 12px 40px rgba(0, 229, 160, 0.2), 0 4px 16px rgba(255, 45, 123, 0.12);
}

/* ===== GRAFFITI TEXTURE OVERLAY ===== */
.puzzle-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg,
        transparent 0%,
        #00E5A0 10%, #00E5A0 12%,
        transparent 12%, transparent 30%,
        #FF2D7B 30%, #FF2D7B 45%,
        transparent 45%, transparent 70%,
        #FFD700 70%, #FFD700 75%,
        transparent 75%
    );
    opacity: 0.5;
    z-index: 3;
}

.puzzle-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg,
        #FF2D7B 0%, #FF2D7B 8%,
        transparent 8%, transparent 50%,
        #FFD700 50%, #FFD700 55%,
        transparent 55%, transparent 80%,
        #00E5A0 80%, #00E5A0 90%,
        transparent 90%
    );
    opacity: 0.3;
    z-index: 3;
}

/* ===== FOOTER ===== */
#site-footer {
    position: relative;
    padding: 40px 24px 30px;
    text-align: center;
    margin-top: 40px;
}

.footer-drip {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #FF2D7B, #00E5A0, #FFD700, #FF2D7B);
    background-size: 300% 100%;
    animation: drip-flow 10s linear infinite;
}

.footer-drip::before {
    content: '';
    position: absolute;
    top: 3px;
    left: 40%;
    width: 3px;
    height: 18px;
    background: linear-gradient(180deg, #00E5A0, transparent);
    border-radius: 0 0 2px 2px;
}

.footer-drip::after {
    content: '';
    position: absolute;
    top: 3px;
    right: 20%;
    width: 2px;
    height: 12px;
    background: linear-gradient(180deg, #FFD700, transparent);
    border-radius: 0 0 2px 2px;
}

.footer-content {
    position: relative;
}

.footer-text {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.85rem;
    color: rgba(240, 237, 245, 0.4);
    letter-spacing: 0.05em;
}

.footer-vine {
    margin-top: 16px;
}

.vine-svg {
    width: 200px;
    height: 30px;
}

/* ===== AURORA BACKGROUND EFFECT ===== */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(ellipse 800px 400px at 10% 20%, rgba(0, 229, 160, 0.04) 0%, transparent 70%),
        radial-gradient(ellipse 600px 300px at 90% 60%, rgba(255, 45, 123, 0.03) 0%, transparent 70%),
        radial-gradient(ellipse 700px 350px at 50% 90%, rgba(255, 215, 0, 0.025) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

#site-header,
#puzzle-wall,
#site-footer {
    position: relative;
    z-index: 1;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 640px) {
    .card-grid {
        grid-template-columns: 1fr;
        padding: 12px 16px 32px;
    }

    .section-header {
        padding: 40px 16px 12px;
    }

    #site-header {
        padding: 60px 16px 40px;
    }
}

@media (min-width: 641px) and (max-width: 960px) {
    .card-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1200px) {
    #featured-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}
