/* ppuzzl.com - Avant-Garde Pastel Geometric */

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

html {
    scroll-behavior: smooth;
}

body {
    background: #fefcfa;
    color: #1a1a2e;
    font-family: 'Work Sans', sans-serif;
    font-weight: 300;
    font-size: 16px;
    line-height: 1.75;
    overflow-x: hidden;
}

/* Gradient Mesh Background */
.gradient-mesh {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    background:
        radial-gradient(ellipse at 20% 30%, rgba(242, 196, 206, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 70% 20%, rgba(212, 197, 226, 0.12) 0%, transparent 45%),
        radial-gradient(ellipse at 50% 70%, rgba(194, 230, 212, 0.1) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 80%, rgba(245, 213, 184, 0.12) 0%, transparent 40%),
        radial-gradient(ellipse at 10% 80%, rgba(189, 216, 232, 0.1) 0%, transparent 45%);
    opacity: 0;
    transition: opacity 2s ease;
    animation: mesh-drift 25s ease-in-out infinite;
}

.gradient-mesh.visible {
    opacity: 1;
}

@keyframes mesh-drift {
    0%, 100% { background-position: 0% 0%, 0% 0%, 0% 0%, 0% 0%, 0% 0%; }
    50% { background-position: 5% 3%, -3% 5%, 4% -2%, -5% 4%, 3% -3%; }
}

/* Z-Path SVG */
.z-path-svg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

.z-line {
    stroke-dasharray: 6000;
    stroke-dashoffset: 6000;
    opacity: 0.5;
    animation: pulse-line 3s ease-in-out infinite;
}

@keyframes pulse-line {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 0.8; }
}

/* Stations */
.station {
    position: relative;
    z-index: 2;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
}

.station[data-station="1"] { justify-content: flex-start; padding-left: 10%; }
.station[data-station="2"] { justify-content: flex-end; padding-right: 10%; }
.station[data-station="3"] { justify-content: center; }
.station[data-station="4"] { justify-content: flex-start; padding-left: 10%; }
.station[data-station="5"] { justify-content: flex-end; padding-right: 10%; }

/* Form Shapes */
.form-shape {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: scale(0.7);
    transition: opacity 0.8s ease, transform 0.8s ease, box-shadow 0.3s ease;
    animation: form-pulse 4s ease-in-out infinite;
    animation-play-state: paused;
    overflow: hidden;
}

.form-shape.visible {
    opacity: 1;
    transform: scale(1);
    animation-play-state: running;
}

.form-shape:hover {
    box-shadow: 0 16px 48px rgba(26, 26, 46, 0.12);
}

@keyframes form-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.015); }
}

/* Gateway Circle */
.gateway-circle {
    width: 60vw;
    height: 60vw;
    max-width: 600px;
    max-height: 600px;
    border-radius: 50%;
    background: linear-gradient(135deg, #f2c4ce 0%, #d4c5e2 40%, #c2e6d4 70%, #bdd8e8 100%);
    box-shadow: 0 8px 32px rgba(26, 26, 46, 0.08);
    border: 1px solid rgba(212, 197, 226, 0.4);
    opacity: 0;
    transform: scale(0);
    transition: opacity 1.5s ease, transform 1.5s ease;
}

.gateway-circle.visible {
    opacity: 1;
    transform: scale(1);
    animation: form-pulse 4s ease-in-out infinite;
}

/* Rhombus */
.form-rhombus {
    width: 400px;
    height: 400px;
    clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
    background: rgba(242, 196, 206, 0.3);
    border: none;
}

/* Station Circle */
.form-station-circle {
    width: 380px;
    height: 380px;
    border-radius: 50%;
    background: rgba(189, 216, 232, 0.3);
    border: 1px solid rgba(189, 216, 232, 0.4);
    box-shadow: 0 8px 32px rgba(26, 26, 46, 0.08);
}

/* Triangle */
.form-triangle {
    width: 420px;
    height: 380px;
    clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
    background: rgba(194, 230, 212, 0.3);
}

/* Trapezoid */
.form-trapezoid {
    width: 400px;
    height: 300px;
    clip-path: polygon(20% 0%, 80% 0%, 100% 100%, 0% 100%);
    background: rgba(245, 213, 184, 0.3);
}

/* Rectangle */
.form-rectangle {
    width: 380px;
    height: 300px;
    background: rgba(212, 197, 226, 0.3);
    border: 1px solid rgba(212, 197, 226, 0.4);
    box-shadow: 0 8px 32px rgba(26, 26, 46, 0.08);
    transform: rotate(12deg) scale(0.7);
}

.form-rectangle.visible {
    transform: rotate(12deg) scale(1);
}

/* Local Mesh */
.local-mesh {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease 0.3s;
    pointer-events: none;
}

.form-shape.visible .local-mesh {
    opacity: 1;
}

.mesh-gateway {
    background: radial-gradient(circle at 40% 40%, rgba(212, 197, 226, 0.2) 0%, transparent 50%);
}

.mesh-1 {
    background: radial-gradient(circle at 50% 50%, rgba(242, 196, 206, 0.15) 0%, transparent 60%);
}

.mesh-2 {
    background: radial-gradient(circle at 30% 60%, rgba(189, 216, 232, 0.2) 0%, transparent 50%);
}

.mesh-3 {
    background: radial-gradient(circle at 50% 70%, rgba(194, 230, 212, 0.15) 0%, transparent 50%);
}

.mesh-4 {
    background: radial-gradient(circle at 60% 40%, rgba(245, 213, 184, 0.2) 0%, transparent 50%);
}

.mesh-5 {
    background: radial-gradient(circle at 40% 50%, rgba(212, 197, 226, 0.15) 0%, transparent 50%);
}

/* Form Content */
.form-content {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 40px 30px;
    max-width: 45ch;
    opacity: 0;
    transition: opacity 0.5s ease 0.3s;
}

.form-shape.visible .form-content,
.gateway-circle.visible .form-content {
    opacity: 1;
}

.wordmark {
    font-family: 'Poiret One', cursive;
    font-weight: 400;
    font-size: clamp(3rem, 10vw, 9rem);
    color: #1a1a2e;
    letter-spacing: 0.08em;
    opacity: 0;
    transition: opacity 0.8s ease 0.5s;
}

.gateway-circle.visible .wordmark {
    opacity: 1;
}

.form-label {
    font-family: 'Work Sans', sans-serif;
    font-weight: 500;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #d4c5e2;
    display: block;
    margin-bottom: 10px;
}

.form-heading {
    font-family: 'Poiret One', cursive;
    font-weight: 400;
    font-size: clamp(1.5rem, 4vw, 3rem);
    letter-spacing: 0.08em;
    color: #1a1a2e;
    margin-bottom: 16px;
}

.form-body {
    font-family: 'Work Sans', sans-serif;
    font-weight: 300;
    font-size: 16px;
    line-height: 1.75;
    color: #1a1a2e;
    max-width: 45ch;
}

/* Station Art */
.station-art {
    width: 120px;
    height: 120px;
    margin: 0 auto;
}

/* End Station */
.end-station {
    min-height: 80vh;
}

.convergence {
    text-align: center;
    opacity: 0;
    transform: scale(0.8);
    transition: opacity 1s ease, transform 1s ease;
}

.convergence.visible {
    opacity: 1;
    transform: scale(1);
}

.end-wordmark {
    font-family: 'Poiret One', cursive;
    font-weight: 400;
    font-size: clamp(3rem, 8vw, 7rem);
    letter-spacing: 0.08em;
    color: #1a1a2e;
    display: block;
}

.end-domain {
    font-family: 'Work Sans', sans-serif;
    font-weight: 300;
    font-size: 14px;
    color: #d4c5e2;
    margin-top: 12px;
    letter-spacing: 0.1em;
}

/* f5d5b8 peach accent reference */
.form-trapezoid .form-label {
    color: #f5d5b8;
}

/* Responsive */
@media (max-width: 700px) {
    .station[data-station] {
        justify-content: center;
        padding-left: 20px;
        padding-right: 20px;
    }

    .form-shape {
        width: 85vw;
        height: 85vw;
        max-width: 350px;
        max-height: 350px;
    }

    .form-trapezoid {
        height: 70vw;
        max-height: 280px;
    }

    .gateway-circle {
        width: 80vw;
        height: 80vw;
    }

    .form-content {
        padding: 25px 15px;
    }

    .form-rectangle {
        transform: rotate(6deg) scale(0.7);
    }

    .form-rectangle.visible {
        transform: rotate(6deg) scale(1);
    }
}
