/* ============================================================
   ppuzzl.party - mcbling earth-tone design system
   ============================================================ */

:root {
    /* Color Palette */
    --color-cream: #FFF5E8;
    --color-dark-brown: #2A241E;
    --color-bronze: #A0704A;
    --color-tan: #C4A882;
    --color-gold: #D4A853;
    --color-beige: #D4B896;
    --color-olive: #6B7B3E;
    --color-earth: #8B6B3E;
    --color-rose: #C4868A;
    --color-sage: #4A6341;

    /* Typography */
    --font-display: 'Cormorant Garamond', serif;
    --font-body: 'Quicksand', sans-serif;
    --font-accent: 'Kalam', cursive;

    /* Spacing & Layout */
    --spacing-unit: 1rem;
}

/* ============================================================
   Global Styles
   ============================================================ */

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background: linear-gradient(135deg, var(--color-cream) 0%, #FAF1E6 50%, #F5E8D8 100%);
    color: var(--color-dark-brown);
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    font-weight: 700;
    letter-spacing: 0.02em;
}

p {
    line-height: 1.6;
    font-weight: 400;
}

/* ============================================================
   Entrance Zone (Hero Section)
   ============================================================ */

.entrance-zone {
    position: relative;
    width: 100%;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(
        180deg,
        var(--color-cream) 0%,
        var(--color-beige) 50%,
        var(--color-tan) 100%
    );
    overflow: hidden;
}

.wordmark-container {
    position: relative;
    z-index: 10;
    text-align: center;
}

.wordmark {
    font-size: clamp(3rem, 8vw, 7rem);
    font-weight: 700;
    color: var(--color-dark-brown);
    text-shadow:
        3px 3px 0px rgba(212, 168, 83, 0.5),
        6px 6px 0px rgba(160, 112, 74, 0.3),
        9px 9px 15px rgba(42, 36, 30, 0.2);
    letter-spacing: -0.02em;
    animation: entrance-scale 1.2s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
    text-transform: lowercase;
}

@keyframes entrance-scale {
    from {
        opacity: 0;
        transform: scale(0.8) translateY(20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.glitter-burst {
    position: absolute;
    width: 300px;
    height: 300px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    animation: glitter-pulse 2s ease-in-out infinite;
}

@keyframes glitter-pulse {
    0%, 100% {
        box-shadow:
            0 0 20px rgba(212, 168, 83, 0.4),
            30px 30px 40px rgba(160, 112, 74, 0.2),
            -30px -30px 40px rgba(196, 168, 130, 0.2);
    }
    50% {
        box-shadow:
            0 0 40px rgba(212, 168, 83, 0.7),
            40px 40px 60px rgba(160, 112, 74, 0.4),
            -40px -40px 60px rgba(196, 168, 130, 0.4);
    }
}

.entrance-accent {
    position: absolute;
    font-size: 120px;
    bottom: 10%;
    right: 5%;
    opacity: 0.6;
    animation: float-rotate 6s ease-in-out infinite;
    z-index: 5;
}

@keyframes float-rotate {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    50% {
        transform: translateY(-30px) rotate(180deg);
    }
}

/* ============================================================
   Portfolio Grid Section
   ============================================================ */

.portfolio-section {
    padding: 80px 40px;
    background: linear-gradient(
        to bottom,
        var(--color-cream) 0%,
        #F5E8D8 50%,
        var(--color-tan) 100%
    );
    position: relative;
    overflow: hidden;
}

.section-title {
    font-size: clamp(2rem, 6vw, 4rem);
    text-align: center;
    margin-bottom: 60px;
    color: var(--color-dark-brown);
    position: relative;
    z-index: 2;
    text-transform: lowercase;
}

.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto;
    perspective: 1200px;
}

/* Card Base Styles */
.card {
    position: relative;
    aspect-ratio: 1 / 1;
    cursor: pointer;
    opacity: 0;
    transform: translateY(30px) rotate(var(--rotation));
    transition: all 500ms cubic-bezier(0.23, 1, 0.320, 1);
}

.grid-container.visible .card {
    opacity: 1;
    transform: translateY(0) rotate(var(--rotation));
}

.card:nth-child(1) { transition-delay: 0ms; }
.card:nth-child(2) { transition-delay: 100ms; }
.card:nth-child(3) { transition-delay: 200ms; }
.card:nth-child(4) { transition-delay: 300ms; }
.card:nth-child(5) { transition-delay: 400ms; }
.card:nth-child(6) { transition-delay: 500ms; }
.card:nth-child(7) { transition-delay: 600ms; }
.card:nth-child(8) { transition-delay: 700ms; }

.card:hover {
    transform: translateY(-10px) rotate(var(--rotation)) scale(1.05);
    filter: drop-shadow(0 20px 40px rgba(42, 36, 30, 0.3));
}

.card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    background: #FFFBF5;
    border: 12px solid #FFFBF5;
    box-shadow: 3px 3px 10px rgba(42, 36, 30, 0.3);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.card-photo {
    flex: 1;
    background: linear-gradient(135deg, #E8D4B8 0%, #D4A853 50%, #A0704A 100%);
    filter: sepia(0.4) contrast(1.1) brightness(0.95);
    position: relative;
    overflow: hidden;
}

.card-photo::after {
    content: '';
    position: absolute;
    inset: 0;
    background:
        repeating-linear-gradient(
            90deg,
            transparent,
            transparent 2px,
            rgba(0,0,0,0.03) 2px,
            rgba(0,0,0,0.03) 4px
        ),
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 2px,
            rgba(0,0,0,0.03) 2px,
            rgba(0,0,0,0.03) 4px
        );
    pointer-events: none;
}

.card-photo::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(
        ellipse at 30% 30%,
        transparent 0%,
        rgba(0,0,0,0.2) 100%
    );
    pointer-events: none;
    opacity: 0.3;
}

.card-caption {
    padding: 16px 12px;
    background: #FFFBF5;
    border-top: 2px dashed rgba(74, 99, 65, 0.2);
}

.card-caption h3 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 4px;
    color: var(--color-dark-brown);
    text-transform: capitalize;
    font-family: var(--font-accent);
}

.card-caption p {
    font-size: 0.9rem;
    color: var(--color-bronze);
    font-weight: 400;
    font-family: var(--font-accent);
}

/* Decorative Corners */
.decorative-corner {
    position: absolute;
    width: 20px;
    height: 20px;
    border: 2px solid var(--color-gold);
}

.corner-tl {
    top: 4px;
    left: 4px;
    border-right: none;
    border-bottom: none;
}

.corner-tr {
    top: 4px;
    right: 4px;
    border-left: none;
    border-bottom: none;
}

.corner-bl {
    bottom: 4px;
    left: 4px;
    border-right: none;
    border-top: none;
}

.corner-br {
    bottom: 4px;
    right: 4px;
    border-left: none;
    border-top: none;
}

/* ============================================================
   Aquarium Section
   ============================================================ */

.aquarium-section {
    position: relative;
    padding: 80px 40px;
    background: linear-gradient(to bottom, #F5E8D8, #E8D9C3);
    overflow: hidden;
}

.aquarium-section .section-title {
    position: relative;
    z-index: 10;
    margin-bottom: 60px;
}

.aquarium-container {
    position: relative;
    height: 300px;
    max-width: 1200px;
    margin: 0 auto;
    background: linear-gradient(
        180deg,
        rgba(74, 99, 65, 0.08) 0%,
        rgba(160, 112, 74, 0.1) 50%,
        rgba(106, 123, 62, 0.08) 100%
    );
    border: 3px dashed var(--color-olive);
    border-radius: 20px;
    overflow: hidden;
    z-index: 5;
}

.aquarium-bg {
    position: absolute;
    inset: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 400 200"><defs><pattern id="water" x="0" y="0" width="100" height="100" patternUnits="userSpaceOnUse"><path d="M0,50 Q25,40 50,50 T100,50" fill="none" stroke="%23D4A85330" stroke-width="1"/><path d="M0,80 Q25,70 50,80 T100,80" fill="none" stroke="%23A0704A30" stroke-width="1"/></pattern></defs><rect width="400" height="200" fill="%23FFF5E8"/><rect width="400" height="200" fill="url(%23water)"/></svg>');
    pointer-events: none;
}

.fish {
    position: absolute;
    width: 100px;
    height: 60px;
    opacity: 0.8;
}

.fish-1 {
    top: 20%;
    animation: swim-right 8s linear infinite;
}

.fish-2 {
    top: 50%;
    animation: swim-left 10s linear infinite;
    transform: scaleX(-1);
}

.fish-3 {
    top: 70%;
    animation: swim-right 12s linear infinite 2s;
}

.fish-4 {
    top: 35%;
    animation: swim-left 11s linear infinite 1s;
    transform: scaleX(-1);
}

@keyframes swim-right {
    from {
        left: -100px;
    }
    to {
        left: 100%;
    }
}

@keyframes swim-left {
    from {
        right: -100px;
    }
    to {
        right: 100%;
    }
}

/* ============================================================
   Awards Section (Celebration)
   ============================================================ */

.awards-section {
    padding: 120px 40px;
    background: linear-gradient(
        135deg,
        var(--color-dark-brown) 0%,
        #3A2F27 50%,
        #2A241E 100%
    );
    color: var(--color-cream);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.awards-content {
    position: relative;
    z-index: 2;
    max-width: 600px;
    margin: 0 auto;
}

.awards-section h2 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    margin-bottom: 20px;
    color: var(--color-gold);
    text-transform: lowercase;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.4);
}

.awards-section p {
    font-size: 1.1rem;
    margin-bottom: 40px;
    opacity: 0.95;
}

.awards-accent {
    width: 100px;
    height: 100px;
    margin: 0 auto;
    border: 3px solid var(--color-gold);
    border-radius: 50%;
    position: relative;
    animation: pulse-glow 2s ease-in-out infinite;
}

@keyframes pulse-glow {
    0%, 100% {
        box-shadow: 0 0 20px rgba(212, 168, 83, 0.4);
    }
    50% {
        box-shadow: 0 0 40px rgba(212, 168, 83, 0.8);
    }
}

/* Background shimmer effect */
.awards-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 20% 50%, rgba(212, 168, 83, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(196, 136, 138, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

/* ============================================================
   Responsive Design
   ============================================================ */

@media (max-width: 768px) {
    .grid-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px;
    }

    .portfolio-section {
        padding: 60px 30px;
    }

    .aquarium-section {
        padding: 60px 30px;
    }

    .aquarium-container {
        height: 250px;
    }

    .wordmark {
        font-size: clamp(2rem, 6vw, 5rem);
    }
}

@media (max-width: 480px) {
    .grid-container {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .portfolio-section {
        padding: 40px 20px;
    }

    .aquarium-section {
        padding: 40px 20px;
    }

    .aquarium-container {
        height: 200px;
    }

    .entrance-accent {
        font-size: 80px;
    }

    .awards-section {
        padding: 80px 20px;
    }
}

/* ============================================================
   Print & Utility
   ============================================================ */

@media print {
    body {
        background: white;
    }

    .entrance-zone {
        page-break-after: always;
    }
}
