/* ========================================
   CSS RESET & BASE STYLES
   ======================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Color Palette - Inspired by App Design */
    --primary-purple: #6C5CE7;
    --primary-purple-dark: #5B4BC4;
    --accent-green: #52B788;
    --accent-green-dark: #40916C;
    --accent-orange: #F77F00;
    --accent-brown: #8B6F47;
    
    /* Neutral Colors */
    --dark-bg: #1A1A2E;
    --dark-bg-light: #2D2D44;
    --text-primary: #FFFFFF;
    --text-secondary: #B8B8D1;
    --text-muted: #8B8B9E;
    
    /* Gradients */
    --gradient-purple: linear-gradient(135deg, #6C5CE7 0%, #A29BFE 100%);
    --gradient-green: linear-gradient(135deg, #52B788 0%, #95D5B2 100%);
    --gradient-warm: linear-gradient(135deg, #F77F00 0%, #FCBF49 100%);
    
    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 3rem;
    --spacing-xl: 5rem;
    
    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-xl: 32px;
    
    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.15);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.2);
    --shadow-glow: 0 0 40px rgba(108, 92, 231, 0.3);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: var(--dark-bg);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

/* ========================================
   HERO SECTION
   ======================================== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: var(--spacing-xl) 0;
    background: linear-gradient(180deg, var(--dark-bg) 0%, var(--dark-bg-light) 100%);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, rgba(108, 92, 231, 0.15) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-xl);
    align-items: center;
    position: relative;
    z-index: 1;
}

.hero-text {
    animation: fadeInUp 0.8s ease-out;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: var(--spacing-md);
    letter-spacing: -0.02em;
}

.gradient-text {
    background: var(--gradient-purple);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: var(--spacing-lg);
    line-height: 1.8;
    max-width: 90%;
}

.app-badges {
    display: flex;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-md);
    flex-wrap: wrap;
}

.badge-link {
    display: block;
    transition: transform 0.3s ease, opacity 0.3s ease;
    opacity: 0.9;
}

.badge-link:hover {
    transform: translateY(-3px);
    opacity: 1;
}

.badge-link img {
    height: 50px;
    width: auto;
}

.coming-soon {
    color: var(--accent-green);
    font-weight: 600;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
}

/* Phone Mockup */
.hero-image {
    display: flex;
    justify-content: center;
    align-items: center;
    animation: fadeInRight 1s ease-out;
}

.phone-mockup {
    position: relative;
    width: 320px;
    height: 650px;
    background: linear-gradient(135deg, #2D2D44 0%, #1A1A2E 100%);
    border-radius: 45px;
    padding: 12px;
    box-shadow: var(--shadow-lg), var(--shadow-glow);
    border: 3px solid rgba(108, 92, 231, 0.3);
}

.phone-screen {
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, #3D3D5C 0%, #2D2D44 100%);
    border-radius: 35px;
    overflow: hidden;
    position: relative;
}

.app-preview {
    padding: var(--spacing-md);
    height: 100%;
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.preview-header {
    text-align: center;
    margin-bottom: var(--spacing-sm);
}

.preview-avatar {
    width: 40px;
    height: 40px;
    background: var(--gradient-purple);
    border-radius: 50%;
    margin: 0 auto var(--spacing-xs);
}

.preview-header h3 {
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    color: var(--text-secondary);
}

.preview-camera {
    text-align: center;
    padding: var(--spacing-md);
    background: rgba(108, 92, 231, 0.1);
    border-radius: var(--radius-lg);
    border: 2px dashed rgba(108, 92, 231, 0.3);
    margin-bottom: var(--spacing-sm);
}

.preview-camera p {
    font-size: 0.7rem;
    margin-top: var(--spacing-xs);
    color: var(--text-secondary);
    letter-spacing: 0.05em;
}

.preview-food {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: var(--spacing-sm) 0;
}

.food-circle {
    width: 150px;
    height: 150px;
    background: linear-gradient(135deg, #8B6F47 0%, #A68A64 50%, #6C5CE7 100%);
    border-radius: 50%;
    box-shadow: 0 0 30px rgba(139, 111, 71, 0.4);
    position: relative;
}

.food-circle::before {
    content: '';
    position: absolute;
    width: 120px;
    height: 120px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.preview-results {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
}

.result-card {
    display: flex;
    gap: var(--spacing-sm);
    padding: var(--spacing-sm);
    border-radius: var(--radius-md);
    align-items: center;
    font-size: 0.7rem;
}

.result-card.safe {
    background: rgba(82, 183, 136, 0.15);
    border: 1px solid rgba(82, 183, 136, 0.3);
}

.result-card.warning {
    background: rgba(247, 127, 0, 0.15);
    border: 1px solid rgba(247, 127, 0, 0.3);
}

.result-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    flex-shrink: 0;
}

.result-card.safe .result-icon {
    background: var(--accent-green);
}

.result-card.warning .result-icon {
    background: var(--accent-orange);
}

.result-text strong {
    display: block;
    font-size: 0.65rem;
    margin-bottom: 2px;
    letter-spacing: 0.05em;
}

.result-text p {
    color: var(--text-muted);
    font-size: 0.65rem;
}

/* ========================================
   FEATURES SECTION
   ======================================== */
.features {
    padding: var(--spacing-xl) 0;
    background: var(--dark-bg-light);
    position: relative;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: var(--spacing-sm);
    background: var(--gradient-purple);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-subtitle {
    text-align: center;
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin-bottom: var(--spacing-lg);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-lg);
    margin-top: var(--spacing-lg);
}

.feature-card {
    background: rgba(45, 45, 68, 0.5);
    padding: var(--spacing-lg);
    border-radius: var(--radius-lg);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid rgba(108, 92, 231, 0.1);
}

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(108, 92, 231, 0.3);
}

.feature-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto var(--spacing-md);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    transition: transform 0.3s ease;
}

.feature-card:hover .feature-icon {
    transform: scale(1.1);
}

.camera-icon {
    background: var(--gradient-purple);
    color: white;
}

.alert-icon {
    background: var(--gradient-warm);
    color: white;
}

.history-icon {
    background: var(--gradient-green);
    color: white;
}

.feature-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: var(--spacing-sm);
}

.feature-description {
    color: var(--text-secondary);
    line-height: 1.7;
}

/* ========================================
   HOW IT WORKS SECTION
   ======================================== */
.how-it-works {
    padding: var(--spacing-xl) 0;
    background: var(--dark-bg);
}

.steps {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-md);
    margin-top: var(--spacing-lg);
    flex-wrap: wrap;
}

.step {
    flex: 1;
    min-width: 250px;
    max-width: 300px;
    background: rgba(45, 45, 68, 0.5);
    padding: var(--spacing-lg);
    border-radius: var(--radius-lg);
    text-align: center;
    border: 2px solid rgba(108, 92, 231, 0.2);
    transition: border-color 0.3s ease, transform 0.3s ease;
}

.step:hover {
    border-color: rgba(108, 92, 231, 0.5);
    transform: scale(1.05);
}

.step-number {
    width: 60px;
    height: 60px;
    background: var(--gradient-purple);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    font-weight: 700;
    margin: 0 auto var(--spacing-md);
    box-shadow: var(--shadow-md);
}

.step-content h3 {
    font-size: 1.25rem;
    margin-bottom: var(--spacing-sm);
}

.step-content p {
    color: var(--text-secondary);
    line-height: 1.6;
}

.step-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* ========================================
   EMAIL SIGNUP SECTION
   ======================================== */
.email-signup {
    padding: var(--spacing-xl) 0;
    background: var(--dark-bg-light);
}

.signup-box {
    max-width: 700px;
    margin: 0 auto;
    background: linear-gradient(135deg, rgba(108, 92, 231, 0.1) 0%, rgba(82, 183, 136, 0.1) 100%);
    padding: var(--spacing-xl);
    border-radius: var(--radius-xl);
    text-align: center;
    border: 1px solid rgba(108, 92, 231, 0.2);
}

.signup-box h2 {
    font-size: 2rem;
    margin-bottom: var(--spacing-sm);
    background: var(--gradient-purple);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.signup-box > p {
    color: var(--text-secondary);
    margin-bottom: var(--spacing-lg);
    font-size: 1.1rem;
}

.signup-form {
    margin-top: var(--spacing-md);
}

.form-group {
    display: flex;
    gap: var(--spacing-sm);
    max-width: 500px;
    margin: 0 auto;
}

.form-group input {
    flex: 1;
    padding: 1rem 1.5rem;
    border: 2px solid rgba(108, 92, 231, 0.3);
    background: rgba(45, 45, 68, 0.5);
    color: var(--text-primary);
    border-radius: var(--radius-md);
    font-size: 1rem;
    transition: border-color 0.3s ease, background 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-purple);
    background: rgba(45, 45, 68, 0.8);
}

.form-group input::placeholder {
    color: var(--text-muted);
}

.submit-btn {
    padding: 1rem 2rem;
    background: var(--gradient-purple);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    white-space: nowrap;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(108, 92, 231, 0.4);
}

.submit-btn:active {
    transform: translateY(0);
}

.form-message {
    margin-top: var(--spacing-sm);
    font-size: 0.9rem;
    min-height: 20px;
}

.form-message.success {
    color: var(--accent-green);
}

.form-message.error {
    color: var(--accent-orange);
}

/* ========================================
   FOOTER
   ======================================== */
.footer {
    background: var(--dark-bg);
    padding: var(--spacing-lg) 0 var(--spacing-md);
    border-top: 1px solid rgba(108, 92, 231, 0.1);
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
}

.footer-brand h3 {
    font-size: 1.5rem;
    margin-bottom: var(--spacing-xs);
    background: var(--gradient-purple);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.footer-brand p {
    color: var(--text-secondary);
}

.footer-links {
    display: flex;
    gap: var(--spacing-lg);
}

.footer-column h4 {
    font-size: 1rem;
    margin-bottom: var(--spacing-sm);
    color: var(--text-primary);
}

.footer-column p,
.footer-column a {
    color: var(--text-secondary);
    font-size: 0.9rem;
    display: block;
    margin-bottom: var(--spacing-xs);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-column a:hover {
    color: var(--primary-purple);
}

.footer-bottom {
    text-align: center;
    padding-top: var(--spacing-md);
    border-top: 1px solid rgba(108, 92, 231, 0.1);
}

.footer-bottom p {
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* ========================================
   ANIMATIONS
   ======================================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.btn-loading svg {
    animation: spin 1s linear infinite;
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */
@media (max-width: 968px) {
    .hero-content {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
    }
    
    .hero-text {
        text-align: center;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        max-width: 100%;
    }
    
    .app-badges {
        justify-content: center;
    }
    
    .coming-soon {
        justify-content: center;
    }
    
    .phone-mockup {
        width: 280px;
        height: 570px;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
    }
    
    .steps {
        flex-direction: column;
    }
    
    .step-divider {
        transform: rotate(90deg);
    }
}

@media (max-width: 640px) {
    :root {
        --spacing-xl: 3rem;
        --spacing-lg: 2rem;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .section-subtitle {
        font-size: 1rem;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .form-group {
        flex-direction: column;
    }
    
    .submit-btn {
        width: 100%;
    }
    
    .phone-mockup {
        width: 240px;
        height: 490px;
    }
    
    .app-preview {
        padding: var(--spacing-sm);
    }
    
    .food-circle {
        width: 100px;
        height: 100px;
    }
    
    .footer-links {
        flex-direction: column;
    }
    
    .signup-box {
        padding: var(--spacing-md);
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 var(--spacing-sm);
    }
    
    .badge-link img {
        height: 40px;
    }
}
