/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #10b981;
    --secondary-color: #059669;
    --accent-color: #34d399;
    --jade-light: #6ee7b7;
    --jade-dark: #047857;
    --text-dark: #1f2937;
    --text-light: #6b7280;
    --bg-light: #f0fdf4;
    --bg-white: #ffffff;
    --track-tribe-color: #FF6B6B;
    --poly-panda-color: #4ECDC4;
    --transition: all 0.3s ease;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    overflow-x: hidden;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(ellipse at 20% 30%, rgba(16, 185, 129, 0.35) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(52, 211, 153, 0.28) 0%, transparent 50%),
        radial-gradient(ellipse at 40% 80%, rgba(5, 150, 105, 0.25) 0%, transparent 50%),
        radial-gradient(ellipse at 90% 70%, rgba(110, 231, 183, 0.2) 0%, transparent 50%),
        radial-gradient(ellipse at 10% 90%, rgba(16, 185, 129, 0.22) 0%, transparent 45%),
        linear-gradient(180deg, #e6faf0 0%, #d1f5e3 100%);
    z-index: -2;
    filter: url(#jade-noise) blur(2px);
}

body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(circle at 60% 40%, rgba(16, 185, 129, 0.15) 0%, transparent 35%),
        radial-gradient(circle at 30% 60%, rgba(52, 211, 153, 0.12) 0%, transparent 40%),
        radial-gradient(circle at 70% 80%, rgba(5, 150, 105, 0.1) 0%, transparent 38%),
        radial-gradient(circle at 15% 20%, rgba(110, 231, 183, 0.13) 0%, transparent 35%);
    z-index: -1;
    filter: blur(40px);
    animation: jadeFlow 12s ease-in-out infinite;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(20px) saturate(180%);
    box-shadow: 0 2px 20px rgba(16, 185, 129, 0.15);
    border-bottom: 1px solid rgba(16, 185, 129, 0.1);
    z-index: 1000;
    transition: var(--transition);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 20px;
}

.nav-brand h1 {
    font-size: 1.5rem;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: var(--transition);
}

.nav-link:hover::after {
    width: 100%;
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 4px;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: var(--text-dark);
    border-radius: 3px;
    transition: var(--transition);
}

/* Hero Section */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 100px 20px 50px;
    overflow: hidden;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(ellipse at 30% 20%, rgba(16, 185, 129, 0.5) 0%, transparent 50%),
        radial-gradient(ellipse at 70% 60%, rgba(52, 211, 153, 0.45) 0%, transparent 48%),
        radial-gradient(ellipse at 50% 80%, rgba(5, 150, 105, 0.4) 0%, transparent 45%),
        radial-gradient(ellipse at 90% 30%, rgba(110, 231, 183, 0.35) 0%, transparent 40%),
        radial-gradient(ellipse at 10% 70%, rgba(16, 185, 129, 0.38) 0%, transparent 50%),
        radial-gradient(ellipse at 60% 10%, rgba(52, 211, 153, 0.3) 0%, transparent 45%),
        linear-gradient(135deg, rgba(16, 185, 129, 0.15) 0%, rgba(52, 211, 153, 0.1) 100%);
    z-index: -1;
    animation: jadeDrift 15s ease-in-out infinite;
}

.hero-background::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background:
        radial-gradient(circle at 40% 40%, rgba(255, 255, 255, 0.6) 0%, transparent 25%),
        radial-gradient(circle at 60% 70%, rgba(255, 255, 255, 0.5) 0%, transparent 20%),
        radial-gradient(circle at 20% 80%, rgba(16, 185, 129, 0.4) 0%, transparent 30%),
        radial-gradient(circle at 80% 20%, rgba(110, 231, 183, 0.35) 0%, transparent 28%);
    filter: blur(50px);
    animation: jadeSwirl 18s linear infinite;
}

.hero-background::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(ellipse at 25% 50%, rgba(16, 185, 129, 0.3) 0%, transparent 35%),
        radial-gradient(ellipse at 75% 50%, rgba(52, 211, 153, 0.25) 0%, transparent 35%),
        radial-gradient(ellipse at 50% 30%, rgba(110, 231, 183, 0.2) 0%, transparent 40%);
    filter: blur(70px);
    animation: jadePulse 10.5s ease-in-out infinite;
}

@keyframes moveBackground {
    0% {
        transform: translate(0, 0);
    }
    100% {
        transform: translate(50px, 50px);
    }
}

@keyframes jadeFlow {
    0%, 100% {
        opacity: 1;
        transform: scale(1) translate(0, 0);
    }
    33% {
        opacity: 0.7;
        transform: scale(1.3) translate(-80px, 60px);
    }
    66% {
        opacity: 0.8;
        transform: scale(1.25) translate(70px, -50px);
    }
}

@keyframes jadeDrift {
    0%, 100% {
        transform: translate(0, 0) scale(1);
        opacity: 1;
    }
    50% {
        transform: translate(-100px, 80px) scale(1.3);
        opacity: 0.7;
    }
}

@keyframes jadeSwirl {
    0% {
        transform: translate(0, 0) rotate(0deg) scale(1);
    }
    50% {
        transform: translate(80px, -60px) rotate(180deg) scale(1.25);
    }
    100% {
        transform: translate(0, 0) rotate(360deg) scale(1);
    }
}

@keyframes jadePulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
        filter: blur(70px);
    }
    50% {
        opacity: 0.5;
        transform: scale(1.4);
        filter: blur(100px);
    }
}

.hero-content {
    max-width: 800px;
    z-index: 1;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: fadeInUp 1s ease-out;
}

.hero-subtitle {
    font-size: 1.5rem;
    color: var(--text-light);
    margin-bottom: 2rem;
    animation: fadeInUp 1s ease-out 0.2s backwards;
}

.cta-button {
    display: inline-block;
    padding: 1rem 2.5rem;
    background: linear-gradient(135deg, var(--primary-color), var(--jade-light));
    color: white;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1.1rem;
    transition: var(--transition);
    box-shadow: 0 10px 30px rgba(16, 185, 129, 0.4);
    animation: fadeInUp 1s ease-out 0.4s backwards;
}

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(16, 185, 129, 0.6);
    background: linear-gradient(135deg, var(--jade-dark), var(--primary-color));
}

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

/* Apps Section */
.apps-section {
    padding: 100px 20px;
    background: var(--bg-light);
    position: relative;
}

.apps-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(ellipse at 15% 25%, rgba(16, 185, 129, 0.18) 0%, transparent 45%),
        radial-gradient(ellipse at 85% 75%, rgba(52, 211, 153, 0.15) 0%, transparent 45%),
        radial-gradient(ellipse at 50% 50%, rgba(110, 231, 183, 0.12) 0%, transparent 50%);
    filter: blur(30px);
    z-index: 0;
    pointer-events: none;
    animation: jadeDrift 15s ease-in-out infinite reverse;
}

.section-title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 3rem;
    color: var(--text-dark);
    position: relative;
    z-index: 1;
}

.apps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 3rem;
    margin-top: 3rem;
    position: relative;
    z-index: 1;
}

.app-card {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px) saturate(180%);
    border: 1px solid rgba(16, 185, 129, 0.1);
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow: 0 10px 40px rgba(16, 185, 129, 0.15);
    transition: var(--transition);
    cursor: pointer;
}

.app-card:hover {
    transform: translateY(-10px);
    background: rgba(255, 255, 255, 0.85);
    box-shadow: 0 20px 60px rgba(16, 185, 129, 0.25);
    border-color: rgba(16, 185, 129, 0.2);
}

.app-icon {
    width: 100px;
    height: 100px;
    margin: 0 auto 1.5rem;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.app-card:hover .app-icon {
    transform: scale(1.1) rotate(5deg);
}

.app-icon svg {
    width: 100%;
    height: 100%;
}

.app-title {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    text-align: center;
}

.app-category {
    text-align: center;
    color: var(--text-light);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 1.5rem;
}

.app-description {
    color: var(--text-light);
    line-height: 1.8;
    margin-bottom: 1.5rem;
    text-align: center;
}

.app-features {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
    margin-bottom: 2rem;
}

.feature-tag {
    padding: 0.4rem 1rem;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-radius: 20px;
    font-size: 0.85rem;
    color: var(--jade-dark);
    font-weight: 500;
    backdrop-filter: blur(5px);
}

.app-button {
    width: 100%;
    padding: 1rem;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
}

.app-card[data-app="track-tribe"] .app-button {
    background: linear-gradient(135deg, var(--track-tribe-color), #ff8787);
}

.app-card[data-app="poly-panda"] .app-button {
    background: linear-gradient(135deg, var(--poly-panda-color), #69e7df);
}

.app-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
}

/* About Section */
.about-section {
    padding: 100px 20px;
    background: var(--bg-white);
    position: relative;
}

.about-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(ellipse at 50% 30%, rgba(16, 185, 129, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 70%, rgba(52, 211, 153, 0.12) 0%, transparent 48%),
        radial-gradient(ellipse at 20% 60%, rgba(110, 231, 183, 0.1) 0%, transparent 45%);
    filter: blur(35px);
    z-index: 0;
    pointer-events: none;
    animation: jadePulse 12s ease-in-out infinite;
}

.about-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    position: relative;
    z-index: 1;
}

.about-content p {
    font-size: 1.2rem;
    color: var(--text-light);
    margin-bottom: 2rem;
    line-height: 1.8;
}

.about-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-top: 4rem;
}

.stat {
    padding: 2rem;
    background: rgba(16, 185, 129, 0.08);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(16, 185, 129, 0.15);
    border-radius: 15px;
    transition: var(--transition);
}

.stat:hover {
    transform: scale(1.05);
    background: rgba(16, 185, 129, 0.12);
    box-shadow: 0 10px 30px rgba(16, 185, 129, 0.2);
}

.stat h3 {
    font-size: 3rem;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
}

.stat p {
    color: var(--text-light);
    font-size: 1rem;
    margin: 0;
}

/* Contact Section */
.contact-section {
    padding: 100px 20px;
    background: var(--bg-light);
    position: relative;
}

.contact-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(ellipse at 25% 40%, rgba(16, 185, 129, 0.2) 0%, transparent 48%),
        radial-gradient(ellipse at 75% 60%, rgba(52, 211, 153, 0.16) 0%, transparent 45%),
        radial-gradient(ellipse at 50% 20%, rgba(110, 231, 183, 0.13) 0%, transparent 50%);
    filter: blur(32px);
    z-index: 0;
    pointer-events: none;
    animation: jadeSwirl 18s linear infinite;
}

.contact-subtitle {
    text-align: center;
    font-size: 1.2rem;
    color: var(--text-light);
    margin-bottom: 3rem;
    position: relative;
    z-index: 1;
}

.contact-form {
    max-width: 600px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    border: 2px solid rgba(16, 185, 129, 0.2);
    border-radius: 10px;
    font-size: 1rem;
    font-family: inherit;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(5px);
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
}

.submit-button {
    width: 100%;
    padding: 1rem 2rem;
    background: linear-gradient(135deg, var(--primary-color), var(--jade-light));
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 5px 20px rgba(16, 185, 129, 0.3);
}

.submit-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(16, 185, 129, 0.4);
    background: linear-gradient(135deg, var(--jade-dark), var(--primary-color));
}

.form-message {
    margin-top: 1rem;
    padding: 1rem;
    border-radius: 10px;
    text-align: center;
    display: none;
}

.form-message.success {
    background: #d1fae5;
    color: #065f46;
    display: block;
}

.form-message.error {
    background: #fee2e2;
    color: #991b1b;
    display: block;
}

/* Footer */
.footer {
    padding: 3rem 20px;
    background: var(--text-dark);
    color: white;
    text-align: center;
}

.footer p {
    margin-bottom: 0.5rem;
    opacity: 0.8;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(20px) saturate(180%);
        border-top: 1px solid rgba(16, 185, 129, 0.1);
        width: 100%;
        text-align: center;
        transition: var(--transition);
        box-shadow: 0 10px 27px rgba(16, 185, 129, 0.15);
        padding: 2rem 0;
    }

    .nav-menu.active {
        left: 0;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1.2rem;
    }

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

    .about-stats {
        grid-template-columns: 1fr;
    }

    .section-title {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .apps-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .app-card {
        padding: 1.5rem;
    }
}

/* Comets Canvas */
#comets-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}
