/* ===========================================
   Allergy Logger - Fresh Nature-Inspired Design
   Color Palette: White, Green, Yellow
   =========================================== */

/* CSS Variables */
:root {
    /* Core Colors - Green & Yellow Nature Palette */
    --green: #2D5A3D;
    --green-light: #4A7C59;
    --green-pale: #E8F0E9;
    --green-dark: #1A3D28;
    
    --yellow: #E8B931;
    --yellow-light: #F5D76E;
    --yellow-pale: #FEF9E7;
    
    --white: #FFFFFF;
    --off-white: #FAFDF8;
    --cream: #F5F7F2;
    
    --text-primary: #1A2E1F;
    --text-secondary: #4A5D4F;
    --text-tertiary: #7A8D7F;
    
    --divider: #D4DDD6;
    --shadow: rgba(45, 90, 61, 0.1);
    
    /* Risk Colors */
    --risk-low: #4A7C59;
    --risk-moderate: #E8B931;
    --risk-high: #D64545;
    
    /* Spacing */
    --space-xs: 0.5rem;
    --space-sm: 1rem;
    --space-md: 1.5rem;
    --space-lg: 3rem;
    --space-xl: 6rem;
    --space-2xl: 10rem;
    
    /* Typography */
    --font-display: 'Fraunces', Georgia, serif;
    --font-body: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    
    /* Transitions */
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Dark Mode */
@media (prefers-color-scheme: dark) {
    :root {
        --green: #6BA37A;
        --green-light: #8BC49A;
        --green-pale: #1A2E1F;
        --green-dark: #4A7C59;
        
        --yellow: #F5D76E;
        --yellow-light: #FFEAA0;
        --yellow-pale: #2A2510;
        
        --white: #0F1610;
        --off-white: #141A15;
        --cream: #1A211B;
        
        --text-primary: #E8F0E9;
        --text-secondary: #B4C4B8;
        --text-tertiary: #7A8D7F;
        
        --divider: #2A3A2D;
        --shadow: rgba(0, 0, 0, 0.3);
    }
}

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

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
}

body {
    font-family: var(--font-body);
    background: var(--off-white);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Grain Texture */
.grain {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    opacity: 0.03;
    z-index: 1000;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 512 512' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
}

/* Floating Pollen Effect */
.floating-pollen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
}

.floating-pollen::before,
.floating-pollen::after {
    content: '';
    position: absolute;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: radial-gradient(circle, var(--yellow-light) 0%, transparent 70%);
    opacity: 0.15;
    animation: float 20s ease-in-out infinite;
}

.floating-pollen::before {
    top: 10%;
    right: -100px;
    animation-delay: -5s;
}

.floating-pollen::after {
    bottom: 20%;
    left: -100px;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, var(--green-light) 0%, transparent 70%);
    animation-delay: -10s;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(30px, -30px) scale(1.05); }
    50% { transform: translate(-20px, 20px) scale(0.95); }
    75% { transform: translate(20px, 10px) scale(1.02); }
}

/* Navigation */
nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: rgba(250, 253, 248, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--divider);
}

@media (prefers-color-scheme: dark) {
    nav {
        background: rgba(15, 22, 16, 0.85);
    }
}

.nav-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--space-sm) var(--space-md);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    text-decoration: none;
    color: var(--text-primary);
}

.logo-icon {
    font-size: 1.5rem;
}

.logo-text {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 600;
    letter-spacing: -0.02em;
}

.nav-links {
    display: flex;
    gap: var(--space-md);
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9375rem;
    font-weight: 500;
    transition: color 0.2s var(--ease-out);
}

.nav-links a:hover {
    color: var(--green);
}

.mobile-menu {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.mobile-menu span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    transition: all 0.3s var(--ease-out);
}

.mobile-menu.open span:first-child {
    transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu.open span:last-child {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* Main Content */
main {
    position: relative;
    z-index: 2;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: calc(80px + var(--space-xl)) var(--space-md) var(--space-xl);
    position: relative;
    overflow: hidden;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    padding: 0.5rem 1rem;
    background: var(--green-pale);
    border: 1px solid var(--green-light);
    border-radius: 100px;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--green);
    margin-bottom: var(--space-md);
    animation: fadeInUp 0.8s var(--ease-out) both;
}

.badge-dot {
    width: 8px;
    height: 8px;
    background: var(--yellow);
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(1.2); }
}

.hero h1 {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 8vw, 5rem);
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.03em;
    margin-bottom: var(--space-md);
}

.hero-line {
    display: block;
    animation: fadeInUp 0.8s var(--ease-out) both;
}

.hero-line:nth-child(1) { animation-delay: 0.1s; }
.hero-line:nth-child(2) { animation-delay: 0.2s; }
.hero-line:nth-child(3) { animation-delay: 0.3s; }
.hero-line:nth-child(4) { animation-delay: 0.4s; }

.hero-line.highlight {
    color: var(--green);
    font-style: italic;
}

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

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    max-width: 540px;
    margin-bottom: var(--space-lg);
    animation: fadeInUp 0.8s var(--ease-out) 0.5s both;
}

.hero-cta {
    display: flex;
    gap: var(--space-sm);
    flex-wrap: wrap;
    justify-content: center;
    animation: fadeInUp 0.8s var(--ease-out) 0.6s both;
}

/* Buttons */
.btn-primary, .btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    padding: 1rem 1.75rem;
    border-radius: 100px;
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s var(--ease-out);
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: var(--green);
    color: var(--white);
    box-shadow: 0 4px 20px var(--shadow), 0 0 0 0 var(--green);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px var(--shadow), 0 0 0 4px rgba(45, 90, 61, 0.1);
}

.btn-primary.large {
    padding: 1.25rem 2.25rem;
    font-size: 1.125rem;
}

.btn-secondary {
    background: var(--white);
    color: var(--text-primary);
    border: 1px solid var(--divider);
}

.btn-secondary:hover {
    border-color: var(--green);
    color: var(--green);
    background: var(--green-pale);
}

/* Hero Visual - Floating Cards */
.hero-visual {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    pointer-events: none;
    perspective: 1000px;
}

.pollen-card, .prediction-card {
    position: absolute;
    background: var(--white);
    border: 1px solid var(--divider);
    border-radius: 16px;
    padding: var(--space-sm);
    box-shadow: 0 8px 40px var(--shadow);
    transition: transform 0.1s ease-out;
    animation: cardFloat 6s ease-in-out infinite;
    transform-style: preserve-3d;
}

.card-birch {
    top: 15%;
    right: 8%;
    animation-delay: 0s;
}

.card-grass {
    top: 45%;
    left: 5%;
    animation-delay: -2s;
}

.card-ragweed {
    bottom: 20%;
    right: 12%;
    animation-delay: -4s;
}

.prediction-card {
    bottom: 25%;
    left: 8%;
    padding: var(--space-md);
    animation-delay: -3s;
}

@keyframes cardFloat {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-15px) rotate(1deg); }
}

.pollen-level {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: var(--space-xs);
}

.pollen-level.high {
    background: rgba(214, 69, 69, 0.1);
    color: var(--risk-high);
}

.pollen-level.moderate {
    background: rgba(232, 185, 49, 0.15);
    color: #B8920A;
}

.pollen-level.low {
    background: rgba(74, 124, 89, 0.1);
    color: var(--risk-low);
}

.pollen-type {
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 0.25rem;
}

.pollen-count {
    font-size: 0.875rem;
    color: var(--text-tertiary);
}

.prediction-header {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-tertiary);
    margin-bottom: var(--space-xs);
}

.prediction-risk {
    display: flex;
    align-items: baseline;
    gap: var(--space-xs);
    margin-bottom: var(--space-xs);
}

.risk-value {
    font-family: var(--font-display);
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--risk-high);
}

.risk-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.prediction-tip {
    font-size: 0.875rem;
    padding: var(--space-xs);
    background: var(--yellow-pale);
    border-radius: 8px;
    color: var(--text-secondary);
}

/* Features Section */
.features {
    padding: var(--space-2xl) var(--space-md);
    max-width: 1200px;
    margin: 0 auto;
}

.section-header {
    text-align: center;
    margin-bottom: var(--space-xl);
}

.section-tag {
    display: inline-block;
    padding: 0.375rem 1rem;
    background: var(--green-pale);
    color: var(--green);
    border-radius: 100px;
    font-size: 0.8125rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: var(--space-sm);
}

.section-header h2 {
    font-family: var(--font-display);
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.section-header h2 em {
    color: var(--green);
    font-style: italic;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: var(--space-md);
}

.feature-card {
    background: var(--white);
    border: 1px solid var(--divider);
    border-radius: 24px;
    padding: var(--space-lg);
    transition: all 0.4s var(--ease-out);
    opacity: 0;
    transform: translateY(30px);
}

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

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 60px var(--shadow);
    border-color: var(--green-light);
}

.feature-icon {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--green-pale);
    border-radius: 16px;
    color: var(--green);
    margin-bottom: var(--space-md);
}

.feature-card h3 {
    font-family: var(--font-display);
    font-size: 1.375rem;
    font-weight: 600;
    margin-bottom: var(--space-xs);
    letter-spacing: -0.01em;
}

.feature-card p {
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.6;
}

/* Feature Visuals */
.feature-visual {
    margin-top: var(--space-md);
    padding-top: var(--space-md);
    border-top: 1px solid var(--divider);
}

.pollen-bars {
    display: flex;
    gap: var(--space-sm);
    align-items: flex-end;
    height: 100px;
}

.pollen-bars .bar {
    flex: 1;
    height: var(--height);
    background: var(--color);
    border-radius: 8px 8px 0 0;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding-bottom: var(--space-xs);
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--white);
}

.prediction-preview {
    display: flex;
    gap: var(--space-sm);
}

.prediction-preview .day {
    flex: 1;
    text-align: center;
    padding: var(--space-sm);
    background: var(--cream);
    border-radius: 12px;
}

.prediction-preview .day-name {
    display: block;
    font-size: 0.75rem;
    color: var(--text-tertiary);
    margin-bottom: 0.25rem;
}

.prediction-preview .day-risk {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 700;
}

.prediction-preview .day-risk.low { color: var(--risk-low); }
.prediction-preview .day-risk.moderate { color: var(--risk-moderate); }
.prediction-preview .day-risk.high { color: var(--risk-high); }

.trigger-tags {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-xs);
}

.trigger-tags .tag {
    padding: 0.375rem 0.75rem;
    background: var(--cream);
    border-radius: 100px;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-secondary);
}

/* How It Works */
.how-it-works {
    padding: var(--space-2xl) var(--space-md);
    background: var(--green);
    color: var(--white);
}

.how-it-works .section-tag {
    background: rgba(255, 255, 255, 0.15);
    color: var(--white);
}

.how-it-works .section-header h2 {
    color: var(--white);
}

.how-it-works .section-header h2 em {
    color: var(--yellow-light);
}

.steps {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
}

.step {
    display: flex;
    gap: var(--space-md);
    align-items: flex-start;
    opacity: 0;
    transform: translateX(-30px);
    transition: all 0.6s var(--ease-out);
}

.step.visible {
    opacity: 1;
    transform: translateX(0);
}

.step-number {
    font-family: var(--font-display);
    font-size: 3rem;
    font-weight: 700;
    color: var(--yellow);
    line-height: 1;
    min-width: 80px;
}

.step-content h3 {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: var(--space-xs);
}

.step-content p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.0625rem;
    line-height: 1.6;
}

/* Social Proof */
.social-proof {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: var(--space-lg);
    padding: var(--space-xl) var(--space-md);
    background: var(--cream);
    flex-wrap: wrap;
}

.proof-stat {
    text-align: center;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s var(--ease-out);
}

.proof-stat.visible {
    opacity: 1;
    transform: translateY(0);
}

.stat-number {
    display: block;
    font-family: var(--font-display);
    font-size: 3.5rem;
    font-weight: 700;
    color: var(--green);
    line-height: 1;
    margin-bottom: var(--space-xs);
}

.stat-label {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.proof-divider {
    width: 1px;
    height: 60px;
    background: var(--divider);
}

/* CTA Section */
.cta-section {
    padding: var(--space-2xl) var(--space-md);
    text-align: center;
}

.cta-content {
    max-width: 600px;
    margin: 0 auto;
}

.cta-icon {
    font-size: 4rem;
    margin-bottom: var(--space-md);
    display: inline-block;
    animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.cta-section h2 {
    font-family: var(--font-display);
    font-size: clamp(2rem, 5vw, 2.75rem);
    font-weight: 700;
    margin-bottom: var(--space-sm);
    letter-spacing: -0.02em;
}

.cta-section p {
    font-size: 1.125rem;
    color: var(--text-secondary);
    margin-bottom: var(--space-lg);
}

.cta-note {
    display: block;
    margin-top: var(--space-md);
    font-size: 0.875rem;
    color: var(--text-tertiary);
}

/* Footer */
footer {
    background: var(--white);
    border-top: 1px solid var(--divider);
    padding: var(--space-xl) var(--space-md) var(--space-md);
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: var(--space-lg);
    margin-bottom: var(--space-lg);
}

.footer-brand {
    max-width: 280px;
}

.footer-brand .logo-icon {
    font-size: 1.75rem;
}

.footer-brand .logo-text {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 600;
}

.footer-brand p {
    color: var(--text-secondary);
    font-size: 0.9375rem;
    margin-top: var(--space-xs);
}

.footer-links {
    display: flex;
    gap: var(--space-xl);
}

.footer-col h4 {
    font-size: 0.8125rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-tertiary);
    margin-bottom: var(--space-sm);
}

.footer-col a {
    display: block;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9375rem;
    margin-bottom: var(--space-xs);
    transition: color 0.2s var(--ease-out);
}

.footer-col a:hover {
    color: var(--green);
}

.footer-bottom {
    max-width: 1200px;
    margin: 0 auto;
    padding-top: var(--space-md);
    border-top: 1px solid var(--divider);
    text-align: center;
}

.footer-bottom p {
    font-size: 0.875rem;
    color: var(--text-tertiary);
}

/* Responsive */
@media (max-width: 768px) {
    .nav-links {
        position: fixed;
        top: 60px;
        left: 0;
        right: 0;
        background: var(--white);
        padding: var(--space-md);
        flex-direction: column;
        gap: var(--space-sm);
        border-bottom: 1px solid var(--divider);
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s var(--ease-out);
    }

    .nav-links.open {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }

    .mobile-menu {
        display: flex;
    }

    .hero {
        padding-top: calc(60px + var(--space-lg));
    }

    .hero-visual {
        display: none;
    }

    .hero-cta {
        flex-direction: column;
        width: 100%;
        max-width: 300px;
    }

    .btn-primary, .btn-secondary {
        justify-content: center;
    }

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

    .step {
        flex-direction: column;
        text-align: center;
    }

    .step-number {
        min-width: auto;
    }

    .social-proof {
        gap: var(--space-md);
    }

    .proof-divider {
        display: none;
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
    }

    .footer-brand {
        max-width: none;
    }

    .footer-links {
        flex-direction: column;
        gap: var(--space-md);
    }
}

/* Legal Pages */
.legal-page {
    max-width: 800px;
    margin: 0 auto;
    padding: calc(80px + var(--space-xl)) var(--space-md) var(--space-xl);
}

.legal-page h1 {
    font-family: var(--font-display);
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: var(--space-xs);
}

.legal-page .updated {
    color: var(--text-tertiary);
    font-size: 0.9375rem;
    margin-bottom: var(--space-lg);
}

.legal-page h2 {
    font-family: var(--font-display);
    font-size: 1.75rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    margin-top: var(--space-xl);
    margin-bottom: var(--space-sm);
    color: var(--green);
}

.legal-page h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-top: var(--space-md);
    margin-bottom: var(--space-xs);
}

.legal-page p, .legal-page li {
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.8;
    margin-bottom: var(--space-sm);
}

.legal-page ul {
    margin-left: var(--space-md);
    margin-bottom: var(--space-md);
}

.legal-page a {
    color: var(--green);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s var(--ease-out);
}

.legal-page a:hover {
    border-bottom-color: var(--green);
}

.legal-page strong {
    color: var(--text-primary);
    font-weight: 600;
}

.legal-page .summary {
    margin-top: var(--space-xl);
    padding-top: var(--space-md);
    border-top: 1px solid var(--divider);
    background: var(--green-pale);
    padding: var(--space-md);
    border-radius: 12px;
}
