/* CSS Variables */
:root {
    --primary-green: #299b8e;
    --primary-green-dark: #237a70;
    --primary-green-light: #3fb5a8;
    --secondary-yellow: #f7b801;
    --secondary-yellow-light: #ffd43b;
    --secondary-orange: #d8a442;
    --accent-purple: #8b5cf6;
    --accent-pink: #ec4899;
    --text-dark: #293340;
    --text-gray: #6b7280;
    --text-light: #9ca3af;
    --bg-light: #f9fafb;
    --bg-lighter: #ffffff;
    --border-light: #e5e7eb;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;
}

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: var(--text-dark);
    line-height: 1.6;
    background: var(--bg-light);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Montserrat', sans-serif;
    line-height: 1.3;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

h1 {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800;
}

h2 {
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 700;
}

h3 {
    font-size: clamp(1.125rem, 2.5vw, 1.5rem);
    font-weight: 600;
}

p {
    font-size: 1rem;
    line-height: 1.75;
    margin-bottom: 1.25rem;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
    position: relative;
    z-index: 1;
}

.content-wrapper {
    max-width: 1000px;
    margin: 0 auto;
}

.content-wrapper-narrow {
    max-width: 800px;
    margin: 0 auto;
}

/* Hero Section */
.hero {
    padding: 5rem 0;
    background: linear-gradient(135deg, var(--primary-green) 0%, var(--primary-green-dark) 100%);
    color: white;
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-xl);
    margin: 1.5rem;
    box-shadow: var(--shadow-lg);
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: url('data:image/svg+xml,<svg width="40" height="40" xmlns="http://www.w3.org/2000/svg"><circle cx="20" cy="20" r="2" fill="white" opacity="0.1"/></svg>');
    animation: patternMove 20s linear infinite;
}

@keyframes patternMove {
    0% { transform: translate(0, 0); }
    100% { transform: translate(40px, 40px); }
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
}

.hero-icon {
    width: 80px;
    height: 80px;
    background: var(--secondary-yellow);
    color: var(--text-dark);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin: 0 auto 2rem;
}

.hero h1 {
    color: white;
    margin-bottom: 1.5rem;
}

.hero-subtitle {
    font-size: 1.25rem;
    margin-bottom: 2.5rem;
    opacity: 0.9;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-cta {
    margin-top: 2rem;
}

.subscribe-btn {
    background: var(--secondary-yellow);
    color: var(--text-dark);
    padding: 1rem 2rem;
    border-radius: var(--radius-full);
    text-decoration: none;
    font-weight: 700;
    font-size: 1.125rem;
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-lg);
    border: none;
    cursor: pointer;
}

.subscribe-btn:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-xl);
    background: var(--secondary-yellow-light);
}

/* Newsletter Benefits Section */
.benefits-section {
    padding: 5rem 0;
    background: var(--bg-lighter);
    position: relative;
    border-radius: var(--radius-xl);
    margin: 1.5rem;
    box-shadow: var(--shadow-lg);
}

.benefits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.benefit-card {
    background: white;
    padding: 2rem;
    border-radius: var(--radius-xl);
    border: 1px solid var(--border-light);
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.benefit-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-green), var(--secondary-yellow));
    transform: translateX(-100%);
    transition: transform 0.3s ease;
}

.benefit-card:hover::before {
    transform: translateX(0);
}

.benefit-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
}

.benefit-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary-green), var(--primary-green-light));
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin: 0 auto 1.5rem;
}

.benefit-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 1rem;
}

.benefit-desc {
    color: var(--text-gray);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* Form Section */
.form-section {
    padding: 5rem 0;
    background: linear-gradient(135deg, var(--bg-light) 0%, var(--bg-lighter) 100%);
    position: relative;
    border-radius: var(--radius-xl);
    margin: 1.5rem;
    box-shadow: var(--shadow-lg);
}

.form-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: start;
}

.form-intro h2 {
    color: var(--text-dark);
    margin-bottom: 1.5rem;
}

.form-intro p {
    color: var(--text-gray);
    font-size: 1.125rem;
    margin-bottom: 2rem;
}

.features-list {
    list-style: none;
}

.features-list li {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 1rem;
    color: var(--text-gray);
}

.features-list li::before {
    content: '✨';
    font-size: 1.2rem;
    flex-shrink: 0;
}

/* Custom Form Styling - Wrapper for proper display */
.newsletter-form-wrapper {
    background: white;
    border-radius: var(--radius-xl);
    padding: 1rem;
    box-shadow: var(--shadow-lg);
    overflow: visible;
}

/* Ensure Brevo form displays properly */
.sib-form {
    overflow: visible !important;
}

#sib-container {
    margin: 0 auto;
    overflow: visible !important;
}

/* Fix form dimensions */
.sib-form-container {
    min-height: auto !important;
    overflow: visible !important;
}

/* Section Headers */
.section-header-centered {
    text-align: center;
    margin-bottom: 3rem;
}

.section-title {
    margin-bottom: 1.5rem;
    color: var(--text-dark);
}

.section-subtitle {
    font-size: 1.125rem;
    color: var(--text-gray);
    font-weight: 400;
    max-width: 600px;
    margin: 0 auto;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .form-container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 1rem;
    }
    
    .hero,
    .benefits-section,
    .form-section {
        margin: 0.5rem;
        padding: 3rem 0;
        border-radius: var(--radius-lg);
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1.125rem;
    }
    
    .benefits-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .subscribe-btn {
        padding: 0.875rem 1.75rem;
        font-size: 1rem;
    }
    
    .form-container {
        gap: 2rem;
    }
    
    .newsletter-form-wrapper {
        padding: 0.75rem;
    }
    
    /* Ensure form is responsive on mobile */
    #sib-container {
        max-width: 100% !important;
        width: 100% !important;
        border: none !important;
    }
}

/* NO FLICKER ANIMATIONS - Elements start completely invisible */
section, .benefit-card {
    opacity: 0;
    transform: translateY(30px);
    /* NO transition here - prevents any flickering */
}

/* Only add transition and animate when the class is applied */
section.animate-in, .benefit-card.animate-in {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

/* Stagger the animations for benefit cards */
.benefit-card:nth-child(1).animate-in {
    transition-delay: 0ms;
}

.benefit-card:nth-child(2).animate-in {
    transition-delay: 150ms;
}

.benefit-card:nth-child(3).animate-in {
    transition-delay: 300ms;
}

.benefit-card:nth-child(4).animate-in {
    transition-delay: 450ms;
}