/* ===== Reset & Base ===== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    font-family: 'Inter', 'Noto Sans SC', -apple-system, BlinkMacSystemFont, sans-serif;
    color: #1a1a2e;
    line-height: 1.6;
    overflow-x: hidden;
    background: #fff;
}
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
img { max-width: 100%; display: block; }

/* ===== Variables ===== */
:root {
    --primary: #4CAF50;
    --primary-dark: #388E3C;
    --primary-light: #C8E6C9;
    --accent: #FF9800;
    --gradient: linear-gradient(135deg, #4CAF50, #2196F3);
    --gradient-warm: linear-gradient(135deg, #FF9800, #FF5722);
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 20px rgba(0,0,0,0.12);
    --shadow-lg: 0 8px 40px rgba(0,0,0,0.15);
    --radius: 16px;
    --radius-sm: 8px;
    --radius-lg: 24px;
}

/* ===== Container ===== */
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* ===== Navbar ===== */
.navbar {
    position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
    padding: 16px 0;
    transition: all 0.3s ease;
    background: transparent;
}
.navbar.scrolled {
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(20px);
    box-shadow: var(--shadow-sm);
    padding: 10px 0;
}
.nav-container { display: flex; align-items: center; justify-content: space-between; }
.logo { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 1.4rem; }
.logo-icon { font-size: 1.6rem; }
.nav-links { display: flex; gap: 32px; }
.nav-links a {
    font-size: 0.95rem; font-weight: 500; color: #555;
    transition: color 0.3s;
}
.nav-links a:hover { color: var(--primary); }
.navbar:not(.scrolled) .nav-links a { color: rgba(255,255,255,0.85); }
.navbar:not(.scrolled) .nav-links a:hover { color: #fff; }
.navbar:not(.scrolled) .logo { color: #fff; }
.nav-toggle { display: none; background: none; border: none; cursor: pointer; padding: 4px; }
.nav-toggle span {
    display: block; width: 24px; height: 2px; background: #333;
    margin: 5px 0; transition: 0.3s;
}
.navbar:not(.scrolled) .nav-toggle span { background: #fff; }

/* ===== Buttons ===== */
.btn {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 12px 28px; border-radius: 50px; font-weight: 600;
    font-size: 0.95rem; transition: all 0.3s ease; cursor: pointer;
    border: none;
}
.btn-primary {
    background: var(--gradient); color: #fff;
    box-shadow: 0 4px 15px rgba(76,175,80,0.4);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 6px 25px rgba(76,175,80,0.5); }
.btn-outline {
    background: transparent; color: #fff;
    border: 2px solid rgba(255,255,255,0.6);
}
.btn-outline:hover { background: rgba(255,255,255,0.15); border-color: #fff; }
.btn-lg { padding: 16px 40px; font-size: 1.1rem; }

/* ===== Hero ===== */
.hero {
    position: relative; min-height: 100vh; display: flex; align-items: center;
    padding: 120px 0 80px; overflow: hidden;
}
.hero-bg {
    position: absolute; inset: 0;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
}
.hero-bg::before {
    content: ''; position: absolute; inset: 0;
    background: radial-gradient(circle at 30% 50%, rgba(76,175,80,0.15) 0%, transparent 60%),
                radial-gradient(circle at 70% 30%, rgba(33,150,243,0.1) 0%, transparent 50%);
}
.hero-content {
    position: relative; display: grid;
    grid-template-columns: 1fr 1fr; gap: 60px; align-items: center;
}
.hero-text { color: #fff; }
.hero-badge {
    display: inline-block; padding: 8px 20px;
    background: rgba(255,255,255,0.1); border-radius: 50px;
    font-size: 0.85rem; font-weight: 500; margin-bottom: 24px;
    backdrop-filter: blur(10px); border: 1px solid rgba(255,255,255,0.15);
}
.hero h1 { font-size: 3.2rem; font-weight: 800; line-height: 1.2; margin-bottom: 20px; }
.gradient-text {
    background: var(--gradient); -webkit-background-clip: text;
    -webkit-text-fill-color: transparent; background-clip: text;
}
.hero-desc { font-size: 1.15rem; color: rgba(255,255,255,0.7); margin-bottom: 32px; line-height: 1.8; }
.hero-actions { display: flex; gap: 16px; margin-bottom: 48px; }
.hero-stats { display: flex; gap: 24px; align-items: center; }
.stat { display: flex; flex-direction: column; }
.stat-num { font-size: 1.5rem; font-weight: 700; color: #fff; }
.stat-label { font-size: 0.8rem; color: rgba(255,255,255,0.5); }
.stat-divider { width: 1px; height: 40px; background: rgba(255,255,255,0.2); }

/* Phone Mockup */
.hero-visual { display: flex; justify-content: center; }
.phone-mockup {
    width: 280px; height: 560px; background: #1a1a2e;
    border-radius: 36px; padding: 12px; position: relative;
    box-shadow: 0 20px 60px rgba(0,0,0,0.4);
    border: 2px solid rgba(255,255,255,0.1);
}
.phone-screen {
    background: #fff; border-radius: 26px; height: 100%;
    padding: 20px 16px; overflow: hidden;
}
.mock-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; font-size: 0.85rem; color: #666; }
.mock-avatar { width: 28px; height: 28px; background: var(--primary-light); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 0.7rem; }
.mock-calories { text-align: center; margin-bottom: 20px; }
.mock-ring {
    width: 120px; height: 120px; margin: 0 auto 10px;
    border: 8px solid #e8e8e8; border-radius: 50%;
    border-top-color: var(--primary); border-right-color: var(--primary);
    transform: rotate(45deg);
}
.mock-cal-text { display: flex; flex-direction: column; }
.mock-cal-num { font-size: 1.6rem; font-weight: 700; color: var(--primary); }
.mock-cal-unit { font-size: 0.7rem; color: #999; }
.mock-actions { display: flex; gap: 8px; margin-bottom: 16px; }
.mock-action-btn {
    flex: 1; padding: 8px 4px; background: #f5f5f5; border-radius: 10px;
    text-align: center; font-size: 0.7rem; color: #555;
}
.mock-records { display: flex; flex-direction: column; gap: 8px; }
.mock-record {
    display: flex; justify-content: space-between; padding: 10px 12px;
    background: #f8f9fa; border-radius: 10px; font-size: 0.75rem; color: #444;
}

.hero-wave { position: absolute; bottom: -2px; left: 0; right: 0; }
.hero-wave svg { display: block; width: 100%; height: 80px; }

/* ===== Section Base ===== */
.section { padding: 100px 0; }
.section-gray { background: #f8f9fa; }
.section-dark { background: linear-gradient(135deg, #1a1a2e, #16213e); color: #fff; }
.section-header { text-align: center; margin-bottom: 60px; }
.section-tag {
    display: inline-block; padding: 6px 16px; background: var(--primary-light);
    color: var(--primary-dark); border-radius: 50px; font-size: 0.85rem;
    font-weight: 600; margin-bottom: 16px;
}
.section-dark .section-tag { background: rgba(76,175,80,0.2); color: #81C784; }
.section-header h2 { font-size: 2.4rem; font-weight: 700; margin-bottom: 12px; }
.section-header p { font-size: 1.1rem; color: #666; max-width: 600px; margin: 0 auto; }
.section-dark .section-header p { color: rgba(255,255,255,0.6); }

/* ===== Features Grid ===== */
.features-grid {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px;
}
.feature-card {
    padding: 36px 28px; background: #fff; border-radius: var(--radius);
    box-shadow: var(--shadow-sm); transition: all 0.3s ease;
    border: 1px solid #f0f0f0; position: relative;
}
.feature-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.feature-highlight { grid-column: span 1; background: var(--gradient); color: #fff; }
.feature-highlight p { color: rgba(255,255,255,0.85); }
.feature-icon { font-size: 2.4rem; margin-bottom: 16px; }
.feature-card h3 { font-size: 1.2rem; font-weight: 600; margin-bottom: 10px; }
.feature-card p { font-size: 0.95rem; color: #666; line-height: 1.7; }
.feature-tag {
    position: absolute; top: 16px; right: 16px;
    padding: 4px 12px; background: rgba(255,255,255,0.25);
    border-radius: 50px; font-size: 0.75rem; font-weight: 600;
}

/* ===== Platforms Grid ===== */
.platforms-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.platform-card {
    padding: 36px 28px; background: #fff; border-radius: var(--radius);
    box-shadow: var(--shadow-sm); border: 1px solid #f0f0f0;
    transition: all 0.3s ease; position: relative; overflow: hidden;
}
.platform-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.platform-icon { font-size: 2.8rem; margin-bottom: 16px; }
.platform-card h3 { font-size: 1.15rem; font-weight: 600; margin-bottom: 8px; }
.platform-card > p { font-size: 0.9rem; color: #666; margin-bottom: 16px; line-height: 1.6; }
.platform-features { margin-bottom: 20px; }
.platform-features li { font-size: 0.85rem; color: #555; padding: 4px 0; }
.platform-status {
    display: inline-block; padding: 4px 14px; border-radius: 50px;
    font-size: 0.8rem; font-weight: 600;
}
.status-live { background: #E8F5E9; color: #2E7D32; }
.status-dev { background: #FFF3E0; color: #E65100; }

/* ===== AI Section ===== */
.ai-showcase { max-width: 900px; margin: 0 auto; }
.ai-flow {
    display: flex; align-items: flex-start; justify-content: center;
    gap: 12px; margin-bottom: 48px; flex-wrap: wrap;
}
.ai-step {
    text-align: center; flex: 1; min-width: 140px; padding: 20px 12px;
    background: #f8f9fa; border-radius: var(--radius); transition: all 0.3s;
}
.ai-step:hover { background: #fff; box-shadow: var(--shadow-md); }
.ai-step-icon { font-size: 2.4rem; margin-bottom: 12px; }
.ai-step h4 { font-size: 1rem; font-weight: 600; margin-bottom: 6px; }
.ai-step p { font-size: 0.8rem; color: #888; }
.ai-arrow { font-size: 1.5rem; color: var(--primary); padding-top: 36px; font-weight: 700; }
.ai-features-row {
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px;
}
.ai-feature {
    text-align: center; padding: 24px 16px;
    background: var(--gradient); border-radius: var(--radius); color: #fff;
}
.ai-feature-num { display: block; font-size: 2rem; font-weight: 800; margin-bottom: 4px; }
.ai-feature-label { font-size: 0.85rem; opacity: 0.85; }

/* ===== Tech Grid ===== */
.tech-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-bottom: 48px; }
.tech-category {
    padding: 28px; background: rgba(255,255,255,0.05);
    border-radius: var(--radius); border: 1px solid rgba(255,255,255,0.1);
}
.tech-category h3 { font-size: 1.1rem; margin-bottom: 16px; }
.tech-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tech-tag {
    padding: 6px 14px; background: rgba(255,255,255,0.1);
    border-radius: 50px; font-size: 0.8rem; color: rgba(255,255,255,0.8);
    border: 1px solid rgba(255,255,255,0.15);
}

/* Architecture Diagram */
.arch-diagram {
    max-width: 700px; margin: 0 auto; text-align: center;
}
.arch-layer {
    padding: 20px; background: rgba(255,255,255,0.05);
    border-radius: var(--radius-sm); border: 1px solid rgba(255,255,255,0.1);
    margin-bottom: 4px;
}
.arch-label {
    font-size: 0.75rem; text-transform: uppercase; letter-spacing: 2px;
    color: rgba(255,255,255,0.4); margin-bottom: 10px;
}
.arch-items { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.arch-items span {
    padding: 8px 16px; background: rgba(76,175,80,0.15);
    border-radius: 50px; font-size: 0.85rem; color: #81C784;
}
.arch-connector { color: rgba(255,255,255,0.3); font-size: 1.2rem; padding: 4px 0; }


/* ===== Screenshots ===== */
.screenshots-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.screenshot-card { text-align: center; }
.screenshot-card h4 { font-size: 1.1rem; font-weight: 600; margin-top: 16px; margin-bottom: 4px; }
.screenshot-card > p { font-size: 0.9rem; color: #888; }
.screenshot-mock {
    background: #1a1a2e; border-radius: 24px; padding: 8px;
    box-shadow: var(--shadow-lg);
}
.mock-top-bar {
    height: 20px; background: #111; border-radius: 16px 16px 0 0;
    margin-bottom: 0;
}
.screenshot-content {
    background: #fff; border-radius: 0 0 18px 18px;
    padding: 20px 16px; min-height: 280px;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
}

/* Home screenshot */
.sc-greeting { font-size: 0.9rem; color: #666; margin-bottom: 12px; }
.sc-progress-ring { position: relative; width: 100px; height: 100px; margin-bottom: 12px; }
.sc-progress-ring svg { width: 100%; height: 100%; }
.sc-cal {
    position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
    font-size: 1.2rem; font-weight: 700; color: var(--primary);
}
.sc-cal small { display: block; font-size: 0.6rem; font-weight: 400; color: #999; }
.sc-btns { display: flex; gap: 12px; }
.sc-btns span {
    width: 40px; height: 40px; background: #f0f0f0; border-radius: 50%;
    display: flex; align-items: center; justify-content: center; font-size: 1.1rem;
}

/* Camera screenshot */
.sc-viewfinder {
    width: 140px; height: 140px; border: 3px solid var(--primary);
    border-radius: 16px; display: flex; align-items: center; justify-content: center;
    margin-bottom: 16px; position: relative; background: #f8f8f8;
}
.sc-food-emoji { font-size: 3rem; }
.sc-result {
    text-align: center;
}
.sc-result strong { display: block; font-size: 1rem; margin-bottom: 2px; }
.sc-result span { font-size: 0.8rem; color: var(--primary); }

/* Stats screenshot */
.sc-chart { display: flex; gap: 6px; align-items: flex-end; height: 120px; margin-bottom: 16px; }
.sc-bar {
    flex: 1; background: var(--primary-light); border-radius: 4px 4px 0 0;
    display: flex; align-items: flex-end; justify-content: center; padding-bottom: 4px;
    min-height: 20px; transition: all 0.3s;
}
.sc-bar.active { background: var(--primary); }
.sc-bar span { font-size: 0.55rem; color: #666; writing-mode: vertical-rl; transform: rotate(180deg); }
.sc-bar.active span { color: #fff; }
.sc-stat-row {
    display: flex; justify-content: space-between; width: 100%;
    font-size: 0.85rem; color: #666; padding: 8px 4px;
    border-top: 1px solid #eee;
}
.sc-stat-row strong { color: var(--primary); }

/* ===== CTA Section ===== */
.section-cta {
    background: var(--gradient); padding: 80px 0;
}
.cta-content { text-align: center; color: #fff; }
.cta-content h2 { font-size: 2.2rem; font-weight: 700; margin-bottom: 12px; }
.cta-content p { font-size: 1.1rem; opacity: 0.85; margin-bottom: 28px; }
.cta-actions .btn-primary {
    background: #fff; color: var(--primary-dark);
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}
.cta-actions .btn-primary:hover {
    transform: translateY(-2px); box-shadow: 0 6px 25px rgba(0,0,0,0.3);
}

/* ===== Footer ===== */
.footer { background: #1a1a2e; color: rgba(255,255,255,0.7); padding: 60px 0 30px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; margin-bottom: 40px; }
.footer-brand .logo { margin-bottom: 12px; color: #fff; }
.footer-brand p { font-size: 0.9rem; line-height: 1.7; }
.footer-links h4 { color: #fff; font-size: 0.95rem; margin-bottom: 16px; }
.footer-links a {
    display: block; font-size: 0.85rem; padding: 4px 0;
    color: rgba(255,255,255,0.5); transition: color 0.3s;
}
.footer-links a:hover { color: #fff; }
.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 24px; text-align: center; font-size: 0.8rem;
    color: rgba(255,255,255,0.4);
}


/* ===== Animations ===== */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}
.feature-card, .platform-card, .ai-step, .screenshot-card {
    animation: fadeInUp 0.6s ease forwards;
}

/* ===== Responsive ===== */
@media (max-width: 1024px) {
    .hero-content { grid-template-columns: 1fr; text-align: center; }
    .hero-actions { justify-content: center; }
    .hero-stats { justify-content: center; }
    .hero-visual { order: -1; }
    .phone-mockup { width: 240px; height: 480px; }
    .hero h1 { font-size: 2.5rem; }
    .platforms-grid { grid-template-columns: repeat(2, 1fr); }
    .tech-grid { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
    .nav-links {
        display: none; position: absolute; top: 100%; left: 0; right: 0;
        background: #fff; flex-direction: column; padding: 20px;
        box-shadow: var(--shadow-md); gap: 12px;
    }
    .nav-links.active { display: flex; }
    .nav-links a { color: #333 !important; }
    .nav-toggle { display: block; }
    .hero h1 { font-size: 2rem; }
    .hero { padding: 100px 0 60px; }
    .features-grid { grid-template-columns: 1fr; }
    .platforms-grid { grid-template-columns: 1fr; }
    .ai-flow { flex-direction: column; align-items: center; }
    .ai-arrow { transform: rotate(90deg); padding: 0; }
    .ai-features-row { grid-template-columns: repeat(2, 1fr); }
    .screenshots-grid { grid-template-columns: 1fr; max-width: 320px; margin: 0 auto; }
    .section-header h2 { font-size: 1.8rem; }
    .section { padding: 60px 0; }
    .footer-grid { grid-template-columns: 1fr; gap: 24px; }
    .arch-items { flex-direction: column; }
}

@media (max-width: 480px) {
    .hero h1 { font-size: 1.6rem; }
    .hero-desc { font-size: 0.95rem; }
    .hero-stats { flex-direction: column; gap: 12px; }
    .stat-divider { width: 40px; height: 1px; }
    .hero-actions { flex-direction: column; }
    .btn { width: 100%; }
}