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

:root {
    /* ===== DESIGN SYSTEM FOUNDATION ===== */
    /* Color Harmony: Analogous blues + complementary orange accent
       Strategy: Build trust (blue) with energetic CTA (orange)
       Reference: Analogous 200-240-280° range, with 40° accent */
    
    /* Primary Color Palette (Blues) - Analogous harmony */
    --color-primary-darkest: #0f3a66;    /* Deep trust, main text */
    --color-primary-dark: #1a5490;       /* Headings, strong emphasis */
    --color-primary-base: #2563eb;       /* Primary brand, interactive */
    --color-primary-light: #60a5fa;      /* Hover states, secondary UI */
    --color-primary-lightest: #dbeafe;   /* Backgrounds, subtle accents */
    
    /* Secondary Color Palette (Teal) - Analogous harmony */
    --color-secondary-dark: #0d7377;     /* Supporting element */
    --color-secondary-base: #14b8a6;     /* Secondary UI, callouts */
    --color-secondary-light: #5eead4;    /* Light backgrounds */
    
    /* Accent Color (Orange) - Complementary, energizes CTA */
    --color-accent-dark: #d97706;        /* Hover/active state */
    --color-accent-base: #f59e0b;        /* Primary CTA button */
    --color-accent-light: #fcd34d;       /* Light accents, highlights */
    
    /* Semantic Colors */
    --color-success: #10b981;             /* Confirmation, positive states */
    --color-neutral-dark: #1f2937;        /* Secondary text */
    --color-neutral-mid: #6b7280;         /* Tertiary text, hints */
    --color-neutral-light: #f3f4f6;       /* Subtle backgrounds */
    --color-neutral-lightest: #ffffff;    /* Pure white for contrast */
    
    /* 60-30-10 Rule Implementation:
       60%: --color-neutral-lightest (white backgrounds)
       30%: --color-primary-base (form, primary elements)
       10%: --color-accent-base (CTA button) */
    
    /* Typography System: Humanist sans serif for warmth */
    --font-family-base: 'Inter', 'Segoe UI', Roboto, -apple-system, BlinkMacSystemFont, sans-serif;
    --font-family-display: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    
    /* Type Scale (Major Third, 1.25 ratio)
       Base: 1rem (16px)
       Level 1: 1.25rem (20px) - body
       Level 2: 1.56rem (25px) - subtitle/labels  
       Level 3: 1.95rem (31px) - section headings
       Level 4: 2.44rem (39px) - page title */
    
    --font-size-xs: 0.75rem;       /* 12px - captions, disclaimers */
    --font-size-sm: 0.875rem;      /* 14px - labels, help text */
    --font-size-base: 1rem;        /* 16px - body text, inputs */
    --font-size-lg: 1.125rem;      /* 18px - emphasis, callouts */
    --font-size-xl: 1.5rem;        /* 24px - subtitle, section heads */
    --font-size-2xl: 1.875rem;     /* 30px - feature sections */
    --font-size-3xl: 2.25rem;      /* 36px - main heading */
    
    /* Line Height (leading) */
    --line-height-tight: 1.2;      /* Headlines */
    --line-height-normal: 1.5;     /* Body text, form labels */
    --line-height-relaxed: 1.75;   /* Long-form content */
    
    /* Spacing System (8px base)
       Fibonacci-inspired: 8, 16, 24, 32, 48, 64 */
    --space-xs: 0.5rem;     /* 8px */
    --space-sm: 1rem;       /* 16px */
    --space-md: 1.5rem;     /* 24px */
    --space-lg: 2rem;       /* 32px */
    --space-xl: 3rem;       /* 48px */
    --space-2xl: 4rem;      /* 64px */
    
    /* Border radius (rounded corners) */
    --radius-sm: 4px;       /* Subtle rounding for inputs */
    --radius-md: 8px;       /* Standard UI elements */
    --radius-lg: 12px;      /* Larger containers */
    --radius-full: 9999px;  /* Fully rounded */
    
    /* Shadows (depth) */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    
    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-normal: 250ms ease;
    --transition-slow: 350ms ease;
}

body {
    font-family: var(--font-family-base);
    background: linear-gradient(135deg, var(--color-neutral-light) 0%, var(--color-neutral-lightest) 100%);
    color: var(--color-primary-darkest);
    line-height: var(--line-height-normal);
    font-size: var(--font-size-base);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-md);
}

.container {
    width: 100%;
    max-width: 600px;
}

.newsletter-section {
    background: var(--color-neutral-lightest);
    border-radius: var(--radius-lg);
    padding: var(--space-2xl) var(--space-lg);
    box-shadow: var(--shadow-lg);
    display: grid;
    gap: var(--space-2xl);
}

/* ===== TYPOGRAPHY HIERARCHY ===== */
/* H1: Main heading - Level 4 of type scale (39px) */
h1 {
    font-size: var(--font-size-3xl);
    font-weight: 700;
    color: var(--color-primary-dark);
    margin-bottom: var(--space-sm);
    line-height: var(--line-height-tight);
    letter-spacing: -0.5px;  /* Tighter for large text */
}

/* Subtitle: Supporting context - Level 2 (25px) */
.subtitle {
    font-size: var(--font-size-lg);
    font-weight: 400;
    color: var(--color-neutral-mid);
    margin-bottom: var(--space-lg);
    line-height: var(--line-height-normal);
    max-width: 500px;  /* Measure constraint for readability */
}

.newsletter-form {
    margin-bottom: var(--space-lg);
}

.form-group {
    display: flex;
    gap: var(--space-xs);
    margin-bottom: var(--space-sm);
}

.form-group input {
    flex: 1;
    padding: var(--space-sm) var(--space-sm);
    border: 1px solid var(--color-primary-lightest);
    border-radius: var(--radius-sm);
    font-size: var(--font-size-base);
    font-family: inherit;
    line-height: var(--line-height-normal);
    color: var(--color-primary-darkest);
    background: var(--color-neutral-lightest);
    transition: all var(--transition-normal);
}

.form-group input::placeholder {
    color: var(--color-neutral-mid);
}

.form-group input:hover {
    border-color: var(--color-primary-base);
}

.form-group input:focus {
    outline: none;
    border-color: var(--color-primary-base);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* CTA Button: Primary accent, 10% of 60-30-10 */
.form-group button {
    padding: var(--space-sm) var(--space-lg);
    background: var(--color-accent-base);
    color: var(--color-neutral-lightest);
    border: none;
    border-radius: var(--radius-sm);
    font-size: var(--font-size-base);
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all var(--transition-normal);
    white-space: nowrap;
    box-shadow: var(--shadow-md);
}

.form-group button:hover {
    background: var(--color-accent-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.form-group button:active {
    transform: translateY(0);
    box-shadow: var(--shadow-md);
}

/* Form note: Tertiary text - small weight */
.form-note {
    font-size: var(--font-size-sm);
    color: var(--color-neutral-mid);
    font-weight: 400;
    margin: 0;
    line-height: var(--line-height-normal);
}

.social-proof {
    text-align: center;
    padding-top: var(--space-md);
    border-top: 1px solid var(--color-primary-lightest);
}

/* Social proof: Secondary text, builds trust */
.proof-text {
    font-size: var(--font-size-sm);
    color: var(--color-neutral-mid);
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-xs);
}

/* Benefits sidebar: Supporting section with teal accent (analogous) */
.benefits {
    background: var(--color-secondary-light);
    background: linear-gradient(135deg, rgba(94, 234, 212, 0.08) 0%, rgba(20, 184, 166, 0.04) 100%);
    padding: var(--space-lg);
    border-radius: var(--radius-md);
    border-left: 4px solid var(--color-secondary-base);
}

.benefits h2 {
    font-size: var(--font-size-lg);
    font-weight: 600;
    color: var(--color-primary-dark);
    margin-bottom: var(--space-md);
    line-height: var(--line-height-tight);
}

.benefits ul {
    list-style: none;
}

.benefits li {
    padding: var(--space-xs) 0;
    padding-left: var(--space-md);
    position: relative;
    font-size: var(--font-size-sm);
    color: var(--color-primary-darkest);
    font-weight: 500;
    line-height: var(--line-height-normal);
}

.benefits li:before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--color-secondary-base);
    font-weight: 700;
    font-size: var(--font-size-lg);
}

/* Success message: Confirmation state */
.success-message {
    display: none;
    text-align: center;
    animation: slideIn var(--transition-normal) ease;
    padding: var(--space-lg);
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.05) 0%, rgba(16, 185, 129, 0.02) 100%);
    border: 1px solid var(--color-success);
}

.success-message.show {
    display: block;
}

.success-message h2 {
    font-size: var(--font-size-xl);
    font-weight: 700;
    color: var(--color-success);
    margin-bottom: var(--space-sm);
    line-height: var(--line-height-tight);
}

.success-message p {
    font-size: var(--font-size-base);
    color: var(--color-neutral-mid);
    line-height: var(--line-height-normal);
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Loading state with spinner animation */
.newsletter-form.loading button {
    opacity: 0.8;
    pointer-events: none;
}

.newsletter-form.loading button::after {
    content: '';
    display: inline-block;
    width: 12px;
    height: 12px;
    margin-left: var(--space-xs);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: var(--color-neutral-lightest);
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ===== RESPONSIVE DESIGN (MOBILE-FIRST) ===== */
@media (max-width: 768px) {
    .newsletter-section {
        padding: var(--space-lg) var(--space-md);
        gap: var(--space-xl);
    }

    h1 {
        font-size: var(--font-size-2xl);
    }

    .form-group {
        flex-direction: column;
    }

    .form-group button {
        width: 100%;
    }
}
