/* Base Styles & Variables */
:root {
    --primary-color: #10b981;
    --primary-dark: #059669;
    --primary-light: #d1fae5;
    --text-main: #1f2937;
    --text-muted: #6b7280;
    --bg-main: #f9fafb;
    --bg-white: #ffffff;
    --accent: #f59e0b;
    --danger: #ef4444;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Outfit', sans-serif;
    color: var(--text-main);
    background-color: var(--bg-main);
    line-height: 1.6;
    overflow-x: hidden;
}

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

.text-center {
    text-align: center;
}

.highlight {
    color: var(--primary-color);
}

/* Typography */
h1, h2, h3, h4 {
    line-height: 1.2;
    font-weight: 700;
}

h1 {
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    margin-bottom: 1.5rem;
}

h2 {
    font-size: clamp(2rem, 4vw, 3rem);
    margin-bottom: 1rem;
}

p {
    color: var(--text-muted);
    font-size: 1.125rem;
    margin-bottom: 2rem;
}

/* Buttons */
.btn-primary, .btn-secondary, .btn-small {
    display: inline-block;
    padding: 1rem 2rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    cursor: pointer;
    border: none;
    font-family: inherit;
    font-size: 1rem;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
    box-shadow: 0 4px 14px 0 rgba(16, 185, 129, 0.39);
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
}

.btn-secondary {
    background: var(--bg-white);
    color: var(--text-main);
    border: 2px solid #e5e7eb;
}

.btn-secondary:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.btn-small {
    padding: 0.5rem 1.5rem;
    background: var(--primary-light);
    color: var(--primary-dark);
}

.btn-small:hover {
    background: var(--primary-color);
    color: white;
}

/* Navbar */
nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    z-index: 1000;
    transition: var(--transition);
    padding: 1.5rem 0;
}

nav.scrolled {
    padding: 1rem 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    text-decoration: none;
    color: var(--text-main);
    letter-spacing: -0.5px;
}

.logo span {
    color: var(--primary-color);
}

.nav-links {
    display: flex;
    list-style: none;
    align-items: center;
    gap: 2.5rem;
}

.nav-links a:not(.btn-small) {
    text-decoration: none;
    color: var(--text-main);
    font-weight: 500;
    transition: var(--transition);
}

.nav-links a:not(.btn-small):hover {
    color: var(--primary-color);
}

.hamburger {
    display: none;
    cursor: pointer;
}

.hamburger .bar {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px auto;
    transition: all 0.3s ease-in-out;
    background-color: var(--text-main);
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 5rem;
}

.hero-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
}

.hero-image-wrapper {
    position: relative;
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
}

.blob-bg {
    position: absolute;
    top: -10%;
    left: -10%;
    width: 120%;
    height: 120%;
    background: radial-gradient(circle, var(--primary-light) 0%, rgba(209, 250, 229, 0) 70%);
    z-index: -1;
    border-radius: 50%;
    animation: pulse 4s infinite alternate;
}

@keyframes pulse {
    0% { transform: scale(0.95); opacity: 0.8; }
    100% { transform: scale(1.05); opacity: 1; }
}

.hero-image {
    width: 100%;
    border-radius: 30px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    transform: rotate(2deg);
    transition: var(--transition);
}

.hero-image:hover {
    transform: rotate(0deg) scale(1.02);
}

/* Mission Section */
.mission-section {
    padding: 6rem 0;
    background: var(--bg-white);
}

.section-title {
    max-width: 600px;
    margin: 0 auto 4rem;
}

.mission-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2.5rem;
}

.mission-card {
    padding: 3rem 2rem;
    background: var(--bg-main);
    border-radius: 24px;
    text-align: center;
    transition: var(--transition);
    border: 1px solid #f3f4f6;
}

.mission-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.05);
    background: var(--bg-white);
    border-color: var(--primary-light);
}

.mission-card .icon {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    display: inline-block;
    padding: 1rem;
    background: var(--primary-light);
    border-radius: 20px;
}

.mission-card h3 {
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

/* Swaps Section */
.swaps-section {
    padding: 6rem 0;
}

.swaps-container {
    display: flex;
    flex-direction: column;
    gap: 4rem;
    max-width: 900px;
    margin: 0 auto;
}

.swap-card {
    background: var(--bg-white);
    border-radius: 30px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    transition: var(--transition);
    opacity: 0;
    transform: translateY(30px);
}

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

.swap-card:hover {
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.1);
}

.swap-images {
    display: flex;
    height: 400px;
    position: relative;
}

.junk-side, .healthy-side {
    flex: 1;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    color: white;
    position: relative;
    overflow: hidden;
    background-size: cover;
    background-position: center;
}

.junk-side::before, .healthy-side::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0) 100%);
    z-index: 1;
}

.junk-side h4, .junk-side p, .healthy-side h4, .healthy-side p {
    position: relative;
    z-index: 2;
}

.junk-side h4 { color: #fca5a5; }
.healthy-side h4 { color: var(--primary-light); }

.junk-side {
    background-color: #4b5563; /* Fallback */
    /* Add a generic junk food gradient pattern */
    background-image: linear-gradient(45deg, #7f1d1d, #450a0a);
}

.healthy-side {
    /* Uses the image loaded in HTML inline style */
}

/* Alt images for static cards */
.alt-junk-1 { background-image: linear-gradient(45deg, #1e3a8a, #0f172a); }
.alt-healthy-1 { background-image: linear-gradient(45deg, #047857, #064e3b); }

.vs-badge {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background: var(--bg-white);
    color: var(--text-main);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.2rem;
    z-index: 10;
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}

.swap-details {
    padding: 2.5rem;
    text-align: center;
}

.swap-details p {
    margin-bottom: 0;
    font-size: 1.1rem;
    color: var(--text-main);
}

/* CTA Section */
.cta-section {
    padding: 6rem 0;
    background: var(--primary-light);
    position: relative;
    overflow: hidden;
}

.cta-container {
    position: relative;
    z-index: 2;
}

.cta-content {
    background: var(--bg-white);
    padding: 4rem;
    border-radius: 40px;
    box-shadow: 0 20px 40px rgba(16, 185, 129, 0.1);
    max-width: 800px;
    margin: 0 auto;
}

.join-form {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.join-form input {
    flex: 1;
    padding: 1rem 1.5rem;
    border: 2px solid #e5e7eb;
    border-radius: 50px;
    font-family: inherit;
    font-size: 1rem;
    outline: none;
    transition: var(--transition);
}

.join-form input:focus {
    border-color: var(--primary-color);
}

/* Footer */
footer {
    background: var(--text-main);
    color: white;
    padding: 4rem 0 2rem;
}

.footer-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 2rem;
}

.footer-logo p {
    color: #9ca3af;
    font-size: 0.9rem;
    margin-top: 0.5rem;
    margin-bottom: 0;
}

.footer-logo .logo {
    color: white;
}

.footer-links {
    display: flex;
    gap: 2rem;
}

.footer-links a {
    color: #9ca3af;
    text-decoration: none;
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--primary-color);
}

/* Responsive Design */
@media (max-width: 992px) {
    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .hero-buttons {
        justify-content: center;
    }
    
    .hero-image-wrapper {
        order: -1;
    }
}

@media (max-width: 768px) {
    .hamburger {
        display: block;
        z-index: 1001;
    }
    
    .hamburger.active .bar:nth-child(2) {
        opacity: 0;
    }
    
    .hamburger.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }
    
    .hamburger.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }
    
    .nav-links {
        position: fixed;
        left: -100%;
        top: 0;
        gap: 0;
        flex-direction: column;
        background-color: var(--bg-white);
        width: 100%;
        height: 100vh;
        text-align: center;
        transition: 0.3s;
        justify-content: center;
    }
    
    .nav-links.active {
        left: 0;
    }
    
    .nav-links li {
        margin: 1.5rem 0;
    }
    
    .swap-images {
        flex-direction: column;
        height: 600px;
    }
    
    .join-form {
        flex-direction: column;
    }
    
    .cta-content {
        padding: 3rem 1.5rem;
    }
}
