/* ppuzzle.net - Memphis + Glassmorphism Design */
/* Colors: #2d3436 #3bceac #ffd23f #ee4266 #636e72 #ff5e5b #f8f9fa */
/* Fonts: Archivo Black (display substitute for Clash Display), Space Grotesk (body) */

:root {
    --charcoal: #2d3436;
    --teal: #3bceac;
    --yellow: #ffd23f;
    --pink: #ee4266;
    --gray: #636e72;
    --coral: #ff5e5b;
    --white: #f8f9fa;
    --frost: rgba(248, 249, 250, 0.15);
    --frost-heavy: rgba(248, 249, 250, 0.25);
    --elastic: cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Space Grotesk', sans-serif;
    background: var(--charcoal);
    color: var(--white);
    overflow: hidden;
    width: 100vw;
    height: 100vh;
}

/* Memphis repeating pattern background */
.memphis-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    background-color: var(--charcoal);
    background-image:
        url("data:image/svg+xml,%3Csvg width='200' height='200' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='30' cy='30' r='8' fill='%23ee4266' opacity='0.3'/%3E%3Ccircle cx='150' cy='80' r='5' fill='%233bceac' opacity='0.3'/%3E%3Ccircle cx='80' cy='160' r='6' fill='%23ffd23f' opacity='0.3'/%3E%3Cpolygon points='170,20 185,50 155,50' fill='%23ff5e5b' opacity='0.25'/%3E%3Cpolygon points='50,110 65,140 35,140' fill='%23ffd23f' opacity='0.25'/%3E%3Cline x1='100' y1='10' x2='120' y2='50' stroke='%233bceac' stroke-width='2' opacity='0.3'/%3E%3Cline x1='10' y1='80' x2='40' y2='90' stroke='%23ee4266' stroke-width='2' opacity='0.3'/%3E%3Cline x1='160' y1='130' x2='190' y2='160' stroke='%23ffd23f' stroke-width='2' opacity='0.3'/%3E%3Ccircle cx='120' cy='120' r='3' fill='%23636e72' opacity='0.4'/%3E%3Ccircle cx='45' cy='60' r='3' fill='%23636e72' opacity='0.4'/%3E%3Ccircle cx='175' cy='170' r='3' fill='%23636e72' opacity='0.4'/%3E%3C/svg%3E");
    background-repeat: repeat;
    background-size: 200px 200px;
}

/* Scroll container with snap */
.scroll-container {
    position: relative;
    z-index: 1;
    width: 100vw;
    height: 100vh;
    overflow-y: auto;
    overflow-x: hidden;
    scroll-snap-type: y mandatory;
    scroll-behavior: smooth;
}

/* Section base */
.section {
    position: relative;
    width: 100vw;
    height: 100vh;
    min-height: 100vh;
    scroll-snap-align: start;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* Depth layers */
.depth-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.depth-back { z-index: 1; }
.depth-mid { z-index: 2; }
.depth-front { z-index: 4; }

/* Shape base */
.shape {
    position: absolute;
    transition: transform 0.6s var(--elastic);
}

/* Shape colors */
.shape-pink { color: var(--pink); }
.shape-yellow { color: var(--yellow); }
.shape-teal { color: var(--teal); }
.shape-coral { color: var(--coral); }
.shape-gray { color: var(--gray); }

/* Circle */
.shape-circle {
    width: clamp(60px, 10vw, 140px);
    height: clamp(60px, 10vw, 140px);
    border-radius: 50%;
    background: currentColor;
    opacity: 0.6;
}

.shape-circle-outline {
    width: clamp(80px, 12vw, 180px);
    height: clamp(80px, 12vw, 180px);
    border-radius: 50%;
    border: 4px solid currentColor;
    background: transparent;
    opacity: 0.5;
}

/* Triangle */
.shape-triangle {
    width: 0;
    height: 0;
    border-left: clamp(30px, 5vw, 70px) solid transparent;
    border-right: clamp(30px, 5vw, 70px) solid transparent;
    border-bottom: clamp(52px, 8.7vw, 121px) solid currentColor;
    opacity: 0.6;
    background: transparent;
}

/* Line */
.shape-line {
    width: clamp(60px, 12vw, 160px);
    height: 4px;
    background: currentColor;
    opacity: 0.5;
    transform: rotate(-30deg);
}

/* Squiggle (using box shadows for a wavy effect) */
.shape-squiggle {
    width: clamp(80px, 14vw, 180px);
    height: 40px;
    background: 
        radial-gradient(circle at 10px 20px, currentColor 4px, transparent 4px),
        radial-gradient(circle at 30px 10px, currentColor 4px, transparent 4px),
        radial-gradient(circle at 50px 20px, currentColor 4px, transparent 4px),
        radial-gradient(circle at 70px 10px, currentColor 4px, transparent 4px),
        radial-gradient(circle at 90px 20px, currentColor 4px, transparent 4px);
    opacity: 0.5;
}

/* Dot grid */
.shape-dot-grid {
    width: clamp(60px, 10vw, 120px);
    height: clamp(60px, 10vw, 120px);
    background-image: radial-gradient(circle, currentColor 3px, transparent 3px);
    background-size: 15px 15px;
    opacity: 0.4;
}

/* Dots cluster */
.shape-dots {
    width: clamp(50px, 8vw, 100px);
    height: clamp(50px, 8vw, 100px);
    background-image: radial-gradient(circle, currentColor 4px, transparent 4px);
    background-size: 20px 20px;
    opacity: 0.5;
}

/* Line cross */
.shape-line-cross {
    width: clamp(40px, 6vw, 80px);
    height: clamp(40px, 6vw, 80px);
    position: absolute;
    opacity: 0.5;
}
.shape-line-cross::before,
.shape-line-cross::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    height: 4px;
    background: currentColor;
}
.shape-line-cross::before { transform: translateY(-50%) rotate(45deg); }
.shape-line-cross::after { transform: translateY(-50%) rotate(-45deg); }

/* Zigzag */
.shape-zigzag {
    width: clamp(60px, 10vw, 120px);
    height: 30px;
    background:
        linear-gradient(135deg, currentColor 25%, transparent 25%) -10px 0,
        linear-gradient(225deg, currentColor 25%, transparent 25%) -10px 0,
        linear-gradient(315deg, currentColor 25%, transparent 25%),
        linear-gradient(45deg, currentColor 25%, transparent 25%);
    background-size: 20px 20px;
    background-color: transparent;
    opacity: 0.5;
}

/* Frost panels */
.frost-panel {
    position: relative;
    z-index: 3;
    background: var(--frost-heavy);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(248, 249, 250, 0.2);
    border-radius: 24px;
    padding: clamp(2rem, 5vw, 4rem);
    max-width: 900px;
    width: 90%;
    transition: transform 0.4s var(--elastic), box-shadow 0.4s ease;
}

.frost-panel:hover {
    transform: scale(1.02);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

/* Oversized display typography */
.display-text {
    font-family: 'Archivo Black', sans-serif;
    font-size: clamp(5rem, 12vw, 10rem);
    line-height: 0.9;
    color: var(--white);
    margin-bottom: 1rem;
    text-transform: lowercase;
    letter-spacing: -0.03em;
}

.subtitle {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(1.2rem, 2.5vw, 2rem);
    font-weight: 300;
    color: var(--teal);
    letter-spacing: 0.05em;
}

.body-text {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(1rem, 1.5vw, 1.3rem);
    line-height: 1.7;
    color: rgba(248, 249, 250, 0.85);
    max-width: 600px;
    margin-top: 1rem;
}

/* Hero frost */
.hero-frost {
    text-align: center;
}

/* About frost */
.about-frost {
    text-align: left;
}

/* Features */
.features-frost {
    text-align: center;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-top: 2rem;
}

@media (max-width: 768px) {
    .feature-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

.feature-card {
    background: var(--frost);
    border: 1px solid rgba(248, 249, 250, 0.1);
    border-radius: 16px;
    padding: 1.5rem;
    transition: transform 0.4s var(--elastic), background 0.3s ease;
    cursor: pointer;
}

.feature-card:hover {
    transform: translateY(-8px) scale(1.04);
    background: var(--frost-heavy);
}

.feature-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1rem;
}

.feature-svg {
    width: 100%;
    height: 100%;
}

.feature-title {
    font-family: 'Archivo Black', sans-serif;
    font-size: 1.3rem;
    color: var(--white);
    margin-bottom: 0.5rem;
    text-transform: lowercase;
}

.feature-desc {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.95rem;
    color: rgba(248, 249, 250, 0.7);
    line-height: 1.5;
}

/* Showcase mosaic */
.showcase-frost {
    text-align: center;
}

.puzzle-mosaic {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(2, 120px);
    gap: 12px;
    margin-top: 2rem;
}

@media (max-width: 768px) {
    .puzzle-mosaic {
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: repeat(3, 100px);
    }
}

.mosaic-piece {
    border-radius: 12px;
    transition: transform 0.5s var(--elastic), opacity 0.3s ease;
    cursor: pointer;
    opacity: 0.85;
}

.mosaic-piece:hover {
    transform: scale(1.08) rotate(2deg);
    opacity: 1;
}

.mosaic-piece-1 {
    background: linear-gradient(135deg, var(--pink), var(--coral));
}
.mosaic-piece-2 {
    background: linear-gradient(135deg, var(--yellow), #ffb347);
}
.mosaic-piece-3 {
    background: linear-gradient(135deg, var(--teal), #2ecc71);
}
.mosaic-piece-4 {
    background: linear-gradient(135deg, var(--coral), var(--pink));
}
.mosaic-piece-5 {
    background: linear-gradient(135deg, #8e44ad, var(--pink));
}
.mosaic-piece-6 {
    background: linear-gradient(135deg, var(--teal), var(--yellow));
}

/* CTA */
.cta-frost {
    text-align: center;
}

.cta-button {
    display: inline-block;
    margin-top: 2rem;
    padding: 1rem 3rem;
    font-family: 'Archivo Black', sans-serif;
    font-size: 1.2rem;
    text-transform: lowercase;
    color: var(--charcoal);
    background: var(--yellow);
    border: none;
    border-radius: 60px;
    cursor: pointer;
    transition: transform 0.4s var(--elastic), background 0.3s ease, box-shadow 0.3s ease;
}

.cta-button:hover {
    transform: scale(1.1);
    background: var(--teal);
    box-shadow: 0 10px 40px rgba(59, 206, 172, 0.4);
}

.cta-button:active {
    transform: scale(0.95);
}

/* Footer */
.site-footer {
    position: absolute;
    bottom: 2rem;
    left: 0;
    width: 100%;
    text-align: center;
    z-index: 5;
    color: var(--gray);
    font-size: 0.85rem;
}

/* Scroll progress */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    width: 0%;
    background: linear-gradient(90deg, var(--pink), var(--yellow), var(--teal));
    z-index: 100;
    transition: width 0.15s ease;
}

/* Section navigation dots */
.section-nav {
    position: fixed;
    right: 2rem;
    top: 50%;
    transform: translateY(-50%);
    z-index: 100;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.nav-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 2px solid var(--white);
    background: transparent;
    cursor: pointer;
    transition: all 0.4s var(--elastic);
    padding: 0;
}

.nav-dot.active {
    background: var(--yellow);
    border-color: var(--yellow);
    transform: scale(1.3);
}

.nav-dot:hover {
    background: var(--teal);
    border-color: var(--teal);
    transform: scale(1.2);
}

/* Parallax animation classes */
.section.visible .frost-panel {
    animation: frostedIn 0.8s var(--elastic) forwards;
}

@keyframes frostedIn {
    from {
        opacity: 0;
        transform: translateY(60px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Shape float animations */
@keyframes floatSlow {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-15px) rotate(3deg); }
}

@keyframes floatMedium {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-25px) rotate(-5deg); }
}

@keyframes floatFast {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-10px) rotate(2deg); }
}

.depth-back .shape {
    animation: floatSlow 8s ease-in-out infinite;
}

.depth-mid .shape {
    animation: floatMedium 6s ease-in-out infinite;
}

.depth-front .shape {
    animation: floatFast 4s ease-in-out infinite;
}

/* Stagger animations per shape */
.depth-back .shape:nth-child(2) { animation-delay: -2s; }
.depth-back .shape:nth-child(3) { animation-delay: -4s; }
.depth-mid .shape:nth-child(2) { animation-delay: -1.5s; }
.depth-front .shape:nth-child(2) { animation-delay: -2.5s; }

/* Responsive */
@media (max-width: 480px) {
    .section-nav {
        right: 1rem;
    }
    .nav-dot {
        width: 10px;
        height: 10px;
    }
    .frost-panel {
        padding: 1.5rem;
        border-radius: 16px;
    }
    .display-text {
        font-size: clamp(3rem, 15vw, 5rem);
    }
}
