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

:root {
    --coral: #FF6B6B;
    --charcoal: #2D2D2D;
    --pink: #FF6B9D;
    --purple: #7B68EE;
    --cream: #F5F0E0;
    --yellow: #FFE066;
    --teal: #2A9D8F;
    --warm-white: #FFF8F0;
}

body {
    background-color: var(--warm-white);
    color: var(--charcoal);
    font-family: 'Quicksand', sans-serif;
    font-weight: 400;
    font-size: 16px;
    line-height: 1.6;
    overflow-x: hidden;
}

/* ============================================================
   SCORECARD INTRO
   ============================================================ */

#scorecard-intro {
    position: relative;
    width: 100%;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--warm-white);
    overflow: hidden;
}

.scorecard {
    position: absolute;
    width: 160px;
    height: 220px;
    background-color: white;
    border: 4px solid var(--card-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Bungee', cursive;
    font-size: 64px;
    color: var(--card-color);
    opacity: 0;
    transform: scale(0);
    z-index: 10;
    box-shadow: 4px 4px 0 var(--charcoal);
}

.scorecard::after {
    content: attr(data-score);
}

.scorecard:nth-child(1) { top: -220px; left: 50%; transform: translateX(-50%) translateY(-100%); }
.scorecard:nth-child(2) { bottom: -220px; left: 20%; transform: translateY(100%); }
.scorecard:nth-child(3) { top: 50%; left: -160px; transform: translateX(-100%) translateY(-50%); }
.scorecard:nth-child(4) { top: 50%; right: -160px; transform: translateX(100%) translateY(-50%); }
.scorecard:nth-child(5) { top: 50%; left: 50%; transform: translate(-50%, -50%) scale(0); }

.scorecard.slam {
    opacity: 1;
}

.scorecard:nth-child(1).slam { top: 20%; left: 50%; transform: translateX(-50%); }
.scorecard:nth-child(2).slam { top: 30%; left: 15%; transform: none; }
.scorecard:nth-child(3).slam { top: 25%; left: 35%; transform: none; }
.scorecard:nth-child(4).slam { top: 20%; right: 15%; left: auto; transform: none; }
.scorecard:nth-child(5).slam { top: 30%; left: 50%; transform: translateX(-50%) scale(1); }

.scorecard.scatter {
    transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.scorecard:nth-child(1).scatter { top: -5%; left: 5%; transform: rotate(-15deg); opacity: 0.3; }
.scorecard:nth-child(2).scatter { bottom: -5%; left: -2%; top: auto; transform: rotate(10deg); opacity: 0.3; }
.scorecard:nth-child(3).scatter { top: 10%; left: -3%; transform: rotate(-20deg); opacity: 0.3; }
.scorecard:nth-child(4).scatter { top: -5%; right: -2%; left: auto; transform: rotate(25deg); opacity: 0.3; }
.scorecard:nth-child(5).scatter { top: auto; bottom: -3%; left: 80%; transform: rotate(12deg); opacity: 0.3; }

.hero-title {
    position: relative;
    z-index: 20;
    text-align: center;
    opacity: 0;
    transform: scale(0.5);
    transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.hero-title.visible {
    opacity: 1;
    transform: scale(1);
}

.hero-title h1 {
    font-family: 'Bungee', cursive;
    font-size: 72px;
    letter-spacing: 0.04em;
    color: var(--charcoal);
    text-transform: uppercase;
    text-shadow: 4px 4px 0 var(--coral), 8px 8px 0 var(--purple);
}

.hero-subtitle {
    font-family: 'Space Mono', monospace;
    font-size: 14px;
    letter-spacing: 0.15em;
    color: var(--pink);
    margin-top: 8px;
    text-transform: uppercase;
}

/* ============================================================
   GEOMETRIC SHAPES
   ============================================================ */

#geometric-shapes {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

.geo-shape {
    position: absolute;
}

.geo-shape.circle {
    border-radius: 50%;
}

.geo-shape.triangle {
    clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
}

.geo-shape.square {
    transform: rotate(45deg);
}

.shape-1 { width: 200px; height: 200px; background: var(--coral); opacity: 0.15; top: 15%; left: -40px; }
.shape-2 { width: 150px; height: 150px; background: var(--purple); opacity: 0.2; top: 40%; right: 30px; }
.shape-3 { width: 120px; height: 120px; background: var(--teal); opacity: 0.18; top: 60%; left: 10%; }
.shape-4 { width: 250px; height: 250px; background: var(--yellow); opacity: 0.12; bottom: 20%; right: -60px; }
.shape-5 { width: 100px; height: 100px; background: var(--pink); opacity: 0.2; top: 80%; left: 30%; }
.shape-6 { width: 180px; height: 180px; background: var(--coral); opacity: 0.1; top: 25%; right: 20%; }

/* ============================================================
   MASONRY GRID
   ============================================================ */

#masonry-grid {
    position: relative;
    z-index: 1;
    max-width: 1100px;
    margin: 0 auto;
    padding: 40px 20px 80px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    grid-auto-flow: dense;
}

.masonry-item {
    position: relative;
    overflow: hidden;
    opacity: 0;
    transform: translateY(30px) rotate(-2deg);
    transition: opacity 0.5s ease, transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.masonry-item.visible {
    opacity: 1;
    transform: translateY(0) rotate(0);
}

.masonry-item.size-small {
    grid-column: span 1;
    min-height: 180px;
}

.masonry-item.size-medium {
    grid-column: span 2;
    min-height: 220px;
}

.masonry-item.size-large {
    grid-column: span 3;
    min-height: 260px;
}

.masonry-item.pattern-stripes {
    background-image: repeating-linear-gradient(
        45deg,
        var(--pink),
        var(--pink) 8px,
        transparent 8px,
        transparent 16px
    );
    background-color: var(--warm-white);
}

.masonry-item.pattern-dots {
    background-image: radial-gradient(circle 4px at 12px 12px, var(--teal) 4px, transparent 4px);
    background-size: 24px 24px;
    background-color: var(--cream);
}

.masonry-item.pattern-zigzag {
    background-image:
        linear-gradient(135deg, var(--purple) 25%, transparent 25%),
        linear-gradient(225deg, var(--purple) 25%, transparent 25%),
        linear-gradient(315deg, var(--purple) 25%, transparent 25%),
        linear-gradient(45deg, var(--purple) 25%, transparent 25%);
    background-size: 20px 20px;
    background-position: 0 0, 10px 0, 10px -10px, 0 10px;
    background-color: var(--warm-white);
}

.masonry-item.pattern-grid {
    background-image:
        linear-gradient(var(--yellow) 1px, transparent 1px),
        linear-gradient(90deg, var(--yellow) 1px, transparent 1px);
    background-size: 20px 20px;
    background-color: var(--warm-white);
}

.item-content {
    position: relative;
    z-index: 1;
    padding: 28px 24px;
    background: rgba(255, 248, 240, 0.88);
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.item-content h2 {
    font-family: 'Bungee', cursive;
    font-size: 28px;
    letter-spacing: 0.04em;
    color: var(--charcoal);
    text-transform: uppercase;
    margin-bottom: 12px;
}

.item-content h3 {
    font-family: 'Bungee', cursive;
    font-size: 20px;
    letter-spacing: 0.04em;
    color: var(--charcoal);
    text-transform: uppercase;
    text-align: center;
}

.item-content p {
    font-family: 'Quicksand', sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--charcoal);
}

.score-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    background: var(--coral);
    color: white;
    font-family: 'Bungee', cursive;
    font-size: 24px;
    border-radius: 50%;
    margin-top: 16px;
    box-shadow: 3px 3px 0 var(--charcoal);
}

.score-badge.large {
    width: 90px;
    height: 90px;
    font-size: 36px;
    margin: 0 auto 12px;
    background: var(--purple);
}

.score-row {
    display: flex;
    gap: 12px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.mini-score {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: var(--sc);
    color: white;
    font-family: 'Bungee', cursive;
    font-size: 18px;
    box-shadow: 2px 2px 0 var(--charcoal);
}

/* ============================================================
   FOOTER
   ============================================================ */

#memphis-footer {
    position: relative;
    text-align: center;
    padding: 80px 20px;
    background-color: var(--charcoal);
    overflow: hidden;
}

.footer-shapes {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
}

.footer-circle {
    position: absolute;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: var(--coral);
    opacity: 0.2;
    top: -30px;
    left: 10%;
}

.footer-triangle {
    position: absolute;
    width: 100px;
    height: 100px;
    clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
    background: var(--purple);
    opacity: 0.2;
    bottom: -20px;
    right: 15%;
}

.footer-square {
    position: absolute;
    width: 80px;
    height: 80px;
    background: var(--teal);
    opacity: 0.15;
    top: 20px;
    right: 30%;
    transform: rotate(45deg);
}

.footer-text {
    font-family: 'Bungee', cursive;
    font-size: 32px;
    color: var(--warm-white);
    letter-spacing: 0.04em;
    position: relative;
    z-index: 1;
    margin-bottom: 8px;
}

.footer-tagline {
    font-family: 'Space Mono', monospace;
    font-size: 13px;
    color: var(--yellow);
    letter-spacing: 0.1em;
    position: relative;
    z-index: 1;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 768px) {
    .hero-title h1 {
        font-size: 40px;
        text-shadow: 2px 2px 0 var(--coral), 4px 4px 0 var(--purple);
    }

    .scorecard {
        width: 100px;
        height: 140px;
        font-size: 40px;
    }

    #masonry-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .masonry-item.size-large,
    .masonry-item.size-medium {
        grid-column: span 2;
    }

    .masonry-item.size-small {
        grid-column: span 1;
    }

    .item-content h2 {
        font-size: 22px;
    }
}
