/* ppuzzl.party - Scandinavian Dark-Neon Design */
/* Colors: #0f0f0f, #1a1a1a, #2d2d2d, #8b5cf6, #22d3ee, #f5f5f0, #e2e8f0, #f8fafc */
/* Fonts: EB Garamond (primary), Work Sans (secondary) */

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

:root {
    --color-bg-deep: #0f0f0f;
    --color-bg-dark: #1a1a1a;
    --color-bg-card: #2d2d2d;
    --color-accent-violet: #8b5cf6;
    --color-accent-cyan: #22d3ee;
    --color-text-cream: #f5f5f0;
    --color-text-gray: #e2e8f0;
    --color-text-white: #f8fafc;
    --font-primary: 'EB Garamond', Georgia, serif;
    --font-secondary: 'Work Sans', 'Inter', sans-serif;
    --grid-unit: 8px;
    --spring-ease: cubic-bezier(0.34, 1.56, 0.64, 1);
    --smooth-ease: cubic-bezier(0.4, 0, 0.2, 1);
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-secondary);
    background-color: var(--color-bg-deep);
    color: var(--color-text-cream);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 calc(var(--grid-unit) * 4);
}

/* ========== Section Shared ========== */

.section {
    position: relative;
    overflow: hidden;
}

.section-divider {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 120px;
    display: block;
    z-index: 2;
}

.section__title {
    font-family: var(--font-primary);
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 500;
    color: var(--color-text-white);
    text-align: center;
    margin-bottom: calc(var(--grid-unit) * 8);
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.text-accent {
    color: var(--color-accent-violet);
}

.text-accent-cyan {
    color: var(--color-accent-cyan);
}

/* ========== Hero Section ========== */

.section--hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-bg-deep);
    padding-bottom: 120px;
    position: relative;
}

.hero__crystalline {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

.crystal {
    position: absolute;
    clip-path: polygon(50% 0%, 100% 38%, 82% 100%, 18% 100%, 0% 38%);
    opacity: 0.06;
}

.crystal--1 {
    width: 200px;
    height: 200px;
    background: var(--color-accent-violet);
    top: 10%;
    right: 8%;
    animation: crystalFloat 12s ease-in-out infinite;
}

.crystal--2 {
    width: 120px;
    height: 120px;
    background: var(--color-accent-cyan);
    top: 60%;
    left: 5%;
    animation: crystalFloat 15s ease-in-out infinite reverse;
}

.crystal--3 {
    width: 80px;
    height: 80px;
    background: var(--color-accent-violet);
    bottom: 25%;
    right: 15%;
    animation: crystalFloat 10s ease-in-out infinite 2s;
}

.crystal--4 {
    width: 150px;
    height: 150px;
    background: var(--color-accent-cyan);
    top: 20%;
    left: 12%;
    animation: crystalFloat 18s ease-in-out infinite 4s;
}

.crystal--5 {
    width: 60px;
    height: 60px;
    background: var(--color-accent-violet);
    top: 45%;
    right: 35%;
    animation: crystalFloat 9s ease-in-out infinite 1s;
}

@keyframes crystalFloat {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    33% { transform: translateY(-20px) rotate(5deg); }
    66% { transform: translateY(10px) rotate(-3deg); }
}

.hero__content {
    text-align: center;
    z-index: 1;
    position: relative;
}

.hero__title {
    font-family: var(--font-primary);
    font-size: clamp(3rem, 10vw, 7rem);
    font-weight: 700;
    color: var(--color-text-white);
    letter-spacing: -0.03em;
    line-height: 1;
    margin-bottom: calc(var(--grid-unit) * 3);
}

.hero__dot {
    color: var(--color-accent-violet);
    display: inline-block;
}

.hero__tagline {
    font-family: var(--font-secondary);
    font-size: clamp(1rem, 2.5vw, 1.4rem);
    font-weight: 300;
    color: var(--color-text-gray);
    margin-bottom: calc(var(--grid-unit) * 5);
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.hero__cta {
    display: inline-block;
    font-family: var(--font-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--color-text-white);
    background: transparent;
    border: 1.5px solid var(--color-accent-violet);
    padding: calc(var(--grid-unit) * 2) calc(var(--grid-unit) * 5);
    text-decoration: none;
    transition: all 0.4s var(--spring-ease);
    position: relative;
    overflow: hidden;
}

.hero__cta::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--color-accent-violet);
    transition: left 0.4s var(--smooth-ease);
    z-index: -1;
}

.hero__cta:hover::before {
    left: 0;
}

.hero__cta:hover {
    color: var(--color-text-white);
    transform: scale(1.05);
    box-shadow: 0 0 30px rgba(139, 92, 246, 0.3);
}

.hero__illustration {
    position: absolute;
    right: 5%;
    top: 50%;
    transform: translateY(-50%);
    width: 350px;
    height: 350px;
    z-index: 0;
    opacity: 0.5;
}

.hero__svg {
    width: 100%;
    height: 100%;
    animation: heroSvgRotate 40s linear infinite;
}

@keyframes heroSvgRotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* ========== Features Section ========== */

.section--features {
    background: var(--color-bg-dark);
    padding: calc(var(--grid-unit) * 16) 0 calc(var(--grid-unit) * 20);
}

.features__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: calc(var(--grid-unit) * 4);
}

.feature-card {
    background: var(--color-bg-deep);
    border: 1px solid rgba(139, 92, 246, 0.1);
    border-radius: calc(var(--grid-unit) * 1.5);
    padding: calc(var(--grid-unit) * 5);
    transition: transform 0.5s var(--spring-ease), box-shadow 0.4s var(--smooth-ease), border-color 0.4s var(--smooth-ease);
    cursor: default;
    opacity: 0;
    transform: translateY(40px);
}

.feature-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.feature-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 60px rgba(139, 92, 246, 0.12);
    border-color: rgba(139, 92, 246, 0.3);
}

.feature-card__icon {
    width: 64px;
    height: 64px;
    margin-bottom: calc(var(--grid-unit) * 3);
}

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

.feature-card__title {
    font-family: var(--font-primary);
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--color-text-white);
    margin-bottom: calc(var(--grid-unit) * 1.5);
}

.feature-card__text {
    font-family: var(--font-secondary);
    font-size: 0.95rem;
    font-weight: 300;
    color: var(--color-text-gray);
    line-height: 1.7;
}

/* ========== How It Works Section ========== */

.section--how {
    background: var(--color-bg-deep);
    padding: calc(var(--grid-unit) * 16) 0 calc(var(--grid-unit) * 20);
}

.steps {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: calc(var(--grid-unit) * 6);
}

.step {
    display: flex;
    align-items: flex-start;
    gap: calc(var(--grid-unit) * 4);
    padding: calc(var(--grid-unit) * 4);
    border-radius: calc(var(--grid-unit) * 1.5);
    border: 1px solid transparent;
    transition: all 0.5s var(--spring-ease);
    opacity: 0;
    transform: translateX(-40px);
}

.step.visible {
    opacity: 1;
    transform: translateX(0);
}

.step:hover {
    border-color: rgba(34, 211, 238, 0.15);
    background: rgba(26, 26, 26, 0.5);
    transform: translateX(8px);
}

.step__number {
    font-family: var(--font-primary);
    font-size: 3rem;
    font-weight: 700;
    color: var(--color-accent-cyan);
    opacity: 0.4;
    line-height: 1;
    min-width: 80px;
    transition: opacity 0.4s var(--smooth-ease);
}

.step:hover .step__number {
    opacity: 0.8;
}

.step__title {
    font-family: var(--font-primary);
    font-size: 1.6rem;
    font-weight: 600;
    color: var(--color-text-white);
    margin-bottom: calc(var(--grid-unit) * 1);
}

.step__text {
    font-family: var(--font-secondary);
    font-size: 0.95rem;
    font-weight: 300;
    color: var(--color-text-gray);
    line-height: 1.7;
}

/* ========== Showcase Section ========== */

.section--showcase {
    background: var(--color-bg-dark);
    padding: calc(var(--grid-unit) * 16) 0 calc(var(--grid-unit) * 20);
}

.showcase__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: calc(var(--grid-unit) * 4);
}

.showcase__item {
    border-radius: calc(var(--grid-unit) * 1.5);
    overflow: hidden;
    background: var(--color-bg-deep);
    border: 1px solid rgba(139, 92, 246, 0.08);
    transition: transform 0.5s var(--spring-ease), box-shadow 0.4s var(--smooth-ease);
    opacity: 0;
    transform: translateY(30px);
}

.showcase__item.visible {
    opacity: 1;
    transform: translateY(0);
}

.showcase__item:hover {
    transform: translateY(-6px) scale(1.01);
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.4);
}

.showcase__visual {
    aspect-ratio: 3/2;
    overflow: hidden;
}

.showcase__visual svg {
    width: 100%;
    height: 100%;
    display: block;
    transition: transform 0.6s var(--smooth-ease);
}

.showcase__item:hover .showcase__visual svg {
    transform: scale(1.05);
}

.showcase__info {
    padding: calc(var(--grid-unit) * 3);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.showcase__label {
    font-family: var(--font-primary);
    font-size: 1.15rem;
    font-weight: 500;
    color: var(--color-text-white);
}

.showcase__pieces {
    font-family: var(--font-secondary);
    font-size: 0.8rem;
    font-weight: 400;
    color: var(--color-accent-cyan);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

/* ========== Join / CTA Section ========== */

.section--join {
    background: var(--color-bg-deep);
    padding: calc(var(--grid-unit) * 16) 0;
    position: relative;
}

.section--join .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: calc(var(--grid-unit) * 8);
}

.join__content {
    max-width: 600px;
}

.join__title {
    font-family: var(--font-primary);
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 500;
    color: var(--color-text-white);
    margin-bottom: calc(var(--grid-unit) * 3);
    line-height: 1.2;
}

.join__text {
    font-family: var(--font-secondary);
    font-size: 1.05rem;
    font-weight: 300;
    color: var(--color-text-gray);
    margin-bottom: calc(var(--grid-unit) * 5);
    line-height: 1.7;
}

.join__actions {
    display: flex;
    gap: calc(var(--grid-unit) * 2);
    flex-wrap: wrap;
}

.btn {
    display: inline-block;
    font-family: var(--font-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    padding: calc(var(--grid-unit) * 2) calc(var(--grid-unit) * 4);
    border-radius: calc(var(--grid-unit) * 0.5);
    transition: all 0.4s var(--spring-ease);
    cursor: pointer;
    letter-spacing: 0.05em;
}

.btn--primary {
    background: var(--color-accent-violet);
    color: var(--color-text-white);
    border: 1.5px solid var(--color-accent-violet);
}

.btn--primary:hover {
    background: transparent;
    color: var(--color-accent-violet);
    transform: scale(1.06);
    box-shadow: 0 0 40px rgba(139, 92, 246, 0.25);
}

.btn--secondary {
    background: transparent;
    color: var(--color-text-cream);
    border: 1.5px solid var(--color-text-gray);
}

.btn--secondary:hover {
    border-color: var(--color-accent-cyan);
    color: var(--color-accent-cyan);
    transform: scale(1.06);
    box-shadow: 0 0 30px rgba(34, 211, 238, 0.15);
}

.join__decoration {
    flex-shrink: 0;
}

.join__svg {
    width: 200px;
    height: 200px;
    animation: crystalFloat 14s ease-in-out infinite;
}

/* ========== Footer ========== */

.footer {
    background: var(--color-bg-dark);
    border-top: 1px solid rgba(139, 92, 246, 0.08);
    padding: calc(var(--grid-unit) * 8) 0 calc(var(--grid-unit) * 4);
}

.footer__grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: calc(var(--grid-unit) * 6);
    margin-bottom: calc(var(--grid-unit) * 6);
}

.footer__logo {
    font-family: var(--font-primary);
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--color-text-white);
    display: block;
    margin-bottom: calc(var(--grid-unit) * 1.5);
}

.footer__tagline {
    font-family: var(--font-secondary);
    font-size: 0.85rem;
    font-weight: 300;
    color: var(--color-text-gray);
    opacity: 0.7;
}

.footer__heading {
    font-family: var(--font-secondary);
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--color-text-white);
    margin-bottom: calc(var(--grid-unit) * 2);
}

.footer__links ul {
    list-style: none;
}

.footer__links li {
    margin-bottom: calc(var(--grid-unit) * 1);
}

.footer__links a {
    font-family: var(--font-secondary);
    font-size: 0.9rem;
    font-weight: 300;
    color: var(--color-text-gray);
    text-decoration: none;
    transition: color 0.3s var(--smooth-ease);
}

.footer__links a:hover {
    color: var(--color-accent-violet);
}

.footer__bottom {
    border-top: 1px solid rgba(245, 245, 240, 0.06);
    padding-top: calc(var(--grid-unit) * 3);
    text-align: center;
}

.footer__bottom p {
    font-family: var(--font-secondary);
    font-size: 0.8rem;
    font-weight: 300;
    color: var(--color-text-gray);
    opacity: 0.5;
}

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

@media (max-width: 768px) {
    .hero__illustration {
        display: none;
    }

    .section--join .container {
        flex-direction: column;
        text-align: center;
    }

    .join__actions {
        justify-content: center;
    }

    .join__decoration {
        display: none;
    }

    .footer__grid {
        grid-template-columns: 1fr 1fr;
        gap: calc(var(--grid-unit) * 4);
    }

    .step {
        flex-direction: column;
        gap: calc(var(--grid-unit) * 2);
    }

    .step__number {
        min-width: auto;
    }
}

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

    .features__grid {
        grid-template-columns: 1fr;
    }

    .showcase__grid {
        grid-template-columns: 1fr;
    }
}
