/* ============================================
   mosun.xyz - Solar-Punk Optimistic Design
   ============================================ */

/* --- Reset & Base --- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Nunito', sans-serif;
    font-weight: 400;
    font-size: clamp(14px, 1vw, 17px);
    line-height: 1.7;
    color: #1A2828;
    background: #F8F8FC;
    overflow-x: hidden;
}

/* --- Aurora Gradient Animation --- */
@keyframes auroraShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes sunSpin {
    from { transform: translate(-50%, -50%) rotate(0deg); }
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

@keyframes logoBounce {
    0% { transform: scale(0.3); opacity: 0; }
    50% { transform: scale(1.06); opacity: 1; }
    70% { transform: scale(0.97); }
    100% { transform: scale(1); opacity: 1; }
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes particlePulse {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

/* --- Hero Section --- */
.hero-section {
    position: relative;
    width: 100%;
    height: 100vh;
    min-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.aurora-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #80D8A0 0%, #F0D060 50%, #F0A0B0 100%);
    background-size: 200% 200%;
    animation: auroraShift 8s ease infinite;
    z-index: 0;
}

#generativeCanvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

.sun-rays {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(0deg);
    width: 80vmin;
    height: 80vmin;
    max-width: 800px;
    max-height: 800px;
    z-index: 2;
    animation: sunSpin 30s linear infinite;
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 3;
    text-align: center;
}

.logotype {
    font-family: 'Quicksand', sans-serif;
    font-weight: 700;
    font-size: clamp(28px, 4vw, 56px);
    color: #1A2828;
    letter-spacing: 0.02em;
    animation: logoBounce 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55) forwards;
    opacity: 0;
    text-shadow: 0 2px 20px rgba(240, 208, 96, 0.3);
}

.hero-tagline {
    font-family: 'Nunito', sans-serif;
    font-weight: 400;
    font-size: clamp(14px, 1.5vw, 22px);
    color: #1A2828;
    margin-top: 16px;
    opacity: 0;
    animation: fadeInUp 0.8s ease 0.5s forwards;
}

/* --- Diagonal Sections --- */
.diagonal-section {
    position: relative;
    padding: 120px 40px 100px;
    margin-top: -5vh;
}

.diagonal-section--light {
    background: #F8F8FC;
    clip-path: polygon(0 8%, 100% 0, 100% 100%, 0 100%);
}

.diagonal-section--light + .diagonal-section--aurora {
    clip-path: polygon(0 0, 100% 8%, 100% 92%, 0 100%);
}

.diagonal-section--aurora {
    background: linear-gradient(135deg, #80D8A0 0%, #F0D060 50%, #F0A0B0 100%);
    background-size: 200% 200%;
    animation: auroraShift 8s ease infinite;
    clip-path: polygon(0 0, 100% 8%, 100% 92%, 0 100%);
}

.diagonal-section--aurora-reverse {
    clip-path: polygon(0 8%, 100% 0, 100% 100%, 0 92%);
}

.section-inner {
    max-width: 1000px;
    margin: 0 auto;
    padding: 60px 40px;
    position: relative;
}

/* --- Section Sun Rays --- */
.section-sun-rays {
    position: absolute;
    top: -20px;
    right: -40px;
    width: 200px;
    height: 200px;
    opacity: 0.5;
    pointer-events: none;
}

.mini-sun-rays {
    width: 100%;
    height: 100%;
    animation: sunSpin 30s linear infinite;
}

/* --- Typography --- */
.section-heading {
    font-family: 'Quicksand', sans-serif;
    font-weight: 700;
    font-size: clamp(28px, 3.5vw, 48px);
    color: #1A2828;
    margin-bottom: 24px;
    position: relative;
}

.section-heading--light {
    color: #1A2828;
}

.section-text {
    font-family: 'Nunito', sans-serif;
    font-weight: 400;
    font-size: clamp(14px, 1vw, 17px);
    line-height: 1.7;
    color: #1A2828;
    max-width: 700px;
    margin-bottom: 40px;
}

.section-text--light {
    color: #1A2828;
}

/* --- Spring Hover Animation --- */
.spring-hover {
    transition: transform 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    cursor: pointer;
}

.spring-hover:hover {
    transform: scale(1.04);
}

.spring-hover:active {
    transform: scale(0.98);
}

/* --- Stat Cards --- */
.stat-row {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
}

.stat-card {
    background: white;
    border-radius: 20px;
    padding: 32px 40px;
    flex: 1;
    min-width: 160px;
    text-align: center;
    box-shadow: 0 4px 24px rgba(26, 40, 40, 0.06);
}

.stat-number {
    display: block;
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 500;
    font-size: 36px;
    color: #308060;
    margin-bottom: 8px;
}

.stat-label {
    display: block;
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 500;
    font-size: 12px;
    color: #1A2828;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

/* --- Project Cards --- */
.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 28px;
}

.project-card {
    background: rgba(248, 248, 252, 0.92);
    border-radius: 20px;
    padding: 40px 32px;
    text-align: center;
    box-shadow: 0 4px 24px rgba(26, 40, 40, 0.08);
    backdrop-filter: blur(8px);
}

.project-icon {
    margin-bottom: 20px;
}

.project-title {
    font-family: 'Quicksand', sans-serif;
    font-weight: 700;
    font-size: 22px;
    color: #1A2828;
    margin-bottom: 12px;
}

.project-desc {
    font-family: 'Nunito', sans-serif;
    font-weight: 400;
    font-size: 15px;
    color: #1A2828;
    line-height: 1.6;
}

/* --- Community Cards --- */
.community-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 28px;
}

.community-card {
    background: white;
    border-radius: 20px;
    padding: 40px 32px;
    text-align: center;
    box-shadow: 0 4px 24px rgba(26, 40, 40, 0.06);
}

.community-emoji {
    display: block;
    font-size: 40px;
    margin-bottom: 16px;
}

.community-title {
    font-family: 'Quicksand', sans-serif;
    font-weight: 700;
    font-size: 22px;
    color: #308060;
    margin-bottom: 12px;
}

.community-desc {
    font-family: 'Nunito', sans-serif;
    font-weight: 400;
    font-size: 15px;
    color: #1A2828;
    line-height: 1.6;
}

/* --- Manifesto --- */
.manifesto-content {
    max-width: 800px;
}

.manifesto-quote {
    font-family: 'Quicksand', sans-serif;
    font-weight: 700;
    font-size: clamp(18px, 2.5vw, 28px);
    color: #1A2828;
    line-height: 1.5;
    margin-bottom: 48px;
    padding-left: 24px;
    border-left: 4px solid #E0A030;
}

.manifesto-principles {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.principle {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 20px 24px;
    background: rgba(248, 248, 252, 0.85);
    border-radius: 16px;
    backdrop-filter: blur(8px);
}

.principle-number {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 500;
    font-size: 12px;
    color: #E0A030;
    min-width: 28px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.principle-text {
    font-family: 'Nunito', sans-serif;
    font-weight: 600;
    font-size: 16px;
    color: #1A2828;
}

/* --- Footer --- */
.footer {
    background: #1A2828;
    padding: 80px 40px 40px;
    text-align: center;
    clip-path: polygon(0 8%, 100% 0, 100% 100%, 0 100%);
    margin-top: -5vh;
}

.footer-inner {
    max-width: 1000px;
    margin: 0 auto;
}

.footer-logo {
    font-family: 'Quicksand', sans-serif;
    font-weight: 700;
    font-size: 28px;
    color: #80D8A0;
    margin-bottom: 12px;
}

.footer-text {
    font-family: 'Nunito', sans-serif;
    font-weight: 400;
    font-size: 16px;
    color: rgba(248, 248, 252, 0.7);
    margin-bottom: 32px;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 32px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.footer-link {
    font-family: 'Quicksand', sans-serif;
    font-weight: 700;
    font-size: 14px;
    color: #F0D060;
    text-decoration: none;
    letter-spacing: 0.02em;
}

.footer-link:hover {
    color: #E0A030;
}

.footer-copy {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 500;
    font-size: 12px;
    color: rgba(248, 248, 252, 0.4);
    letter-spacing: 0.1em;
}

/* --- Scroll Reveal --- */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

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

/* --- Responsive --- */
@media (max-width: 768px) {
    .diagonal-section {
        padding: 100px 20px 80px;
    }

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

    .stat-row {
        flex-direction: column;
    }

    .stat-card {
        min-width: auto;
    }

    .project-grid,
    .community-cards {
        grid-template-columns: 1fr;
    }

    .footer-links {
        gap: 20px;
    }

    .section-sun-rays {
        display: none;
    }

    .hero-section {
        min-height: 100vh;
    }

    .sun-rays {
        width: 100vmin;
        height: 100vmin;
    }

    .manifesto-quote {
        padding-left: 16px;
    }

    .principle {
        flex-direction: column;
        text-align: center;
        gap: 8px;
    }
}

@media (max-width: 480px) {
    .logotype {
        font-size: 28px;
    }

    .hero-tagline {
        font-size: 14px;
    }

    .footer {
        padding: 60px 20px 30px;
    }
}
