/* ============================================
   Hui Viet Landing Page — Light Theme
   Synced with Flutter AppColors
   ============================================ */

:root {
    --primary: #1F6F4A;
    --primary-light: #A5F3C5;
    --primary-dim: #89D7AA;
    --primary-bg: rgba(31, 111, 74, 0.06);
    --surface: #F8FAF9;
    --surface-container: #F2F4F3;
    --surface-high: #E6E9E8;
    --on-surface: #191C1C;
    --on-surface-variant: #3F4942;
    --outline: #BFC9C0;
    --font-heading: 'Manrope', sans-serif;
    --font-body: 'Inter', sans-serif;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.04), 0 1px 2px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.06), 0 2px 4px rgba(0,0,0,0.04);
    --shadow-lg: 0 12px 40px rgba(31, 111, 74, 0.1), 0 4px 12px rgba(0,0,0,0.04);
    --radius: 20px;
}

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

html { scroll-behavior: smooth; }

body {
    background-color: var(--surface);
    color: var(--on-surface);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

.container { max-width: 1080px; margin: 0 auto; padding: 0 20px; }

h1, h2, h3, h4 { font-family: var(--font-heading); color: var(--on-surface); }

a { text-decoration: none; color: var(--primary); transition: opacity 0.2s; }
a:hover { opacity: 0.8; }

/* ── NAV ────────────────────────────────────── */
.nav {
    position: fixed; top: 0; left: 0; right: 0; z-index: 100;
    background: rgba(248, 250, 249, 0.85);
    backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--outline);
    transition: box-shadow 0.3s;
}
.nav.scrolled { box-shadow: var(--shadow-sm); }
.nav-inner { display: flex; justify-content: space-between; align-items: center; height: 64px; }
.nav-logo { display: flex; align-items: center; gap: 10px; font-family: var(--font-heading); font-weight: 800; font-size: 1.2rem; color: var(--on-surface); }
.nav-logo-icon { width: 36px; height: 36px; border-radius: 10px; overflow: hidden; }
.nav-logo-icon img { width: 100%; height: 100%; object-fit: cover; }
.nav-links { display: flex; align-items: center; gap: 32px; }
.nav-links a { color: var(--on-surface-variant); font-size: 0.9rem; font-weight: 500; }
.nav-links a:hover { color: var(--primary); opacity: 1; }
.nav-cta {
    display: inline-flex; padding: 10px 24px; border-radius: 50px;
    background: var(--primary); color: #fff !important; font-weight: 600; font-size: 0.875rem;
    transition: transform 0.2s, box-shadow 0.2s;
}
.nav-cta:hover { transform: translateY(-1px); box-shadow: var(--shadow-md); opacity: 1; }
.nav-hamburger { display: none; background: none; border: none; cursor: pointer; padding: 8px; }
.nav-hamburger span { display: block; width: 22px; height: 2px; background: var(--on-surface); margin: 5px 0; border-radius: 2px; transition: 0.3s; }

/* ── HERO ───────────────────────────────────── */
.hero {
    padding: 140px 0 80px;
    background: linear-gradient(180deg, rgba(31,111,74,0.04) 0%, var(--surface) 100%);
    position: relative; overflow: hidden;
}
.hero::before {
    content: ''; position: absolute; top: -200px; right: -200px;
    width: 600px; height: 600px; border-radius: 50%;
    background: radial-gradient(circle, rgba(31,111,74,0.06) 0%, transparent 70%);
    pointer-events: none;
}
.hero-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }
.hero-badge {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 6px 16px; border-radius: 50px;
    background: var(--primary-bg); color: var(--primary);
    font-size: 0.8rem; font-weight: 600; margin-bottom: 20px;
    border: 1px solid rgba(31,111,74,0.12);
}
.hero-badge-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--primary); }
.hero h1 {
    font-size: 3.2rem; font-weight: 800; line-height: 1.08;
    letter-spacing: -1.5px; margin-bottom: 20px;
}
.hero h1 span { color: var(--primary); }
.hero-desc {
    font-size: 1.1rem; color: var(--on-surface-variant);
    line-height: 1.7; margin-bottom: 32px; max-width: 440px;
}
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }
.btn-primary {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 16px 32px; border-radius: 50px;
    background: var(--primary); color: #fff;
    font-weight: 700; font-size: 1rem; font-family: var(--font-heading);
    transition: transform 0.2s, box-shadow 0.3s;
    box-shadow: 0 4px 16px rgba(31,111,74,0.25);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(31,111,74,0.3); opacity: 1; }
.btn-secondary {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 16px 32px; border-radius: 50px;
    background: transparent; color: var(--on-surface);
    font-weight: 600; font-size: 1rem; font-family: var(--font-heading);
    border: 1.5px solid var(--outline); transition: all 0.2s;
}
.btn-secondary:hover { border-color: var(--primary); color: var(--primary); opacity: 1; }

/* Store Badge Buttons */
.btn-store {
    display: inline-flex; align-items: center; gap: 12px;
    padding: 12px 22px; border-radius: 14px;
    background: var(--on-surface); color: #fff;
    font-family: var(--font-heading);
    border: 1.5px solid transparent;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
    text-decoration: none;
}
.btn-store:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,0.2); opacity: 1; }
.btn-store svg { flex-shrink: 0; }
.btn-store-text { display: flex; flex-direction: column; line-height: 1.2; }
.btn-store-text span { font-size: 0.68rem; font-weight: 400; opacity: 0.75; }
.btn-store-text strong { font-size: 1rem; font-weight: 700; }
.btn-store-outline {
    background: transparent; color: var(--on-surface);
    border-color: var(--outline);
    box-shadow: none;
}
.btn-store-outline:hover { border-color: var(--primary); color: var(--primary); box-shadow: none; }
.btn-store-white { background: #fff; color: #111; box-shadow: 0 4px 16px rgba(0,0,0,0.12); }
.btn-store-white:hover { box-shadow: 0 8px 24px rgba(0,0,0,0.18); }
.btn-store-glass {
    background: rgba(255,255,255,0.15);
    border-color: rgba(255,255,255,0.5);
    color: #fff; box-shadow: none;
    backdrop-filter: blur(8px);
}
.btn-store-glass:hover { background: rgba(255,255,255,0.25); box-shadow: none; }
.cta-actions { display: flex; gap: 16px; flex-wrap: wrap; justify-content: center; position: relative; z-index: 1; }

/* Phone Mockup */
.hero-phone { position: relative; display: flex; justify-content: center; }
.phone-frame {
    width: 280px; position: relative; z-index: 2;
    border-radius: 36px; padding: 10px;
    background: #1a1a1a; box-shadow: var(--shadow-lg);
    animation: float 6s ease-in-out infinite;
}
.phone-inner {
    border-radius: 28px; overflow: hidden;
    background: var(--surface);
}
.phone-screenshot {
    width: 100%; height: auto; display: block;
}
.phone-notch {
    width: 100px; height: 28px; margin: 0 auto;
    background: #1a1a1a; border-radius: 0 0 18px 18px;
}
.phone-content { flex: 1; padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.phone-greeting { font-family: var(--font-heading); font-weight: 700; font-size: 0.95rem; }
.phone-card {
    background: linear-gradient(135deg, #1F6F4A, #2D9B6A);
    border-radius: 16px; padding: 18px; color: #fff;
}
.phone-card-label { font-size: 0.7rem; opacity: 0.7; text-transform: uppercase; font-weight: 600; letter-spacing: 0.5px; }
.phone-card-amount { font-family: var(--font-heading); font-weight: 800; font-size: 1.5rem; margin-top: 4px; }
.phone-row { display: flex; gap: 8px; }
.phone-stat {
    flex: 1; background: var(--surface-container);
    border-radius: 12px; padding: 10px; text-align: center;
}
.phone-stat-val { font-family: var(--font-heading); font-weight: 800; font-size: 1.1rem; color: var(--primary); }
.phone-stat-label { font-size: 0.6rem; color: var(--on-surface-variant); margin-top: 2px; }
.phone-list-item {
    display: flex; align-items: center; gap: 10px;
    padding: 10px; background: var(--surface-container); border-radius: 12px;
}
.phone-list-dot { width: 8px; height: 8px; border-radius: 50%; background: #2ECC71; flex-shrink: 0; }
.phone-list-dot.closed { background: #9E9E9E; }
.phone-list-name { font-size: 0.75rem; font-weight: 600; flex: 1; }
.phone-list-amount { font-size: 0.7rem; color: var(--primary); font-weight: 700; }

.phone-glow {
    position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
    width: 340px; height: 340px; border-radius: 50%;
    background: radial-gradient(circle, rgba(31,111,74,0.12) 0%, transparent 70%);
    z-index: 1; filter: blur(40px);
}

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

/* ── FEATURES ───────────────────────────────── */
.features { padding: 100px 0; }
.section-label {
    display: inline-flex; align-items: center; gap: 8px;
    color: var(--primary); font-size: 0.8rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: 1.5px;
    margin-bottom: 12px;
}
.section-label::before {
    content: ''; width: 24px; height: 2px; background: var(--primary); border-radius: 2px;
}
.section-title {
    font-size: 2.4rem; font-weight: 800; letter-spacing: -1px;
    margin-bottom: 16px; line-height: 1.15;
}
.section-desc {
    font-size: 1.05rem; color: var(--on-surface-variant);
    line-height: 1.7; max-width: 520px; margin-bottom: 48px;
}
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.feature-card {
    padding: 32px 28px; border-radius: var(--radius);
    background: #fff; border: 1px solid var(--outline);
    transition: all 0.3s;
    opacity: 0; transform: translateY(16px);
}
.feature-card.visible { opacity: 1; transform: translateY(0); }
.feature-card:hover { border-color: var(--primary); box-shadow: var(--shadow-md); transform: translateY(-4px); }
.feature-icon {
    width: 52px; height: 52px; border-radius: 14px;
    background: var(--primary-bg);
    display: flex; align-items: center; justify-content: center;
    margin-bottom: 20px;
    color: var(--primary);
    transition: background 0.25s, transform 0.25s;
}
.feature-card:hover .feature-icon {
    background: var(--primary);
    color: #fff;
    transform: scale(1.08);
}
.feature-card h3 {
    font-size: 1.15rem; font-weight: 700; margin-bottom: 10px;
    font-family: var(--font-heading);
}
.feature-card p { font-size: 0.9rem; color: var(--on-surface-variant); line-height: 1.6; margin: 0; }

/* ── PRICING ────────────────────────────────── */
.pricing { padding: 100px 0; background-color: var(--surface-container); }
.pricing-header { text-align: center; margin-bottom: 60px; }
.pricing-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 30px; max-width: 800px; margin: 0 auto; }
.pricing-card {
    background: #fff; border-radius: var(--radius); padding: 40px 32px;
    border: 1px solid var(--outline); position: relative;
    transition: transform 0.3s, box-shadow 0.3s;
}
.pricing-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--primary); }
.pricing-card.pro {
    border: 2px solid var(--primary); box-shadow: var(--shadow-md);
    background: linear-gradient(180deg, #fff 0%, var(--primary-bg) 100%);
}
.pricing-badge {
    position: absolute; top: -14px; left: 50%; transform: translateX(-50%);
    background: var(--primary); color: #fff; font-size: 0.75rem; font-weight: 700;
    padding: 6px 16px; border-radius: 50px; text-transform: uppercase; letter-spacing: 1px;
}
.pricing-name { font-size: 1.4rem; font-family: var(--font-heading); font-weight: 800; margin-bottom: 8px; }
.pricing-price { font-size: 2.8rem; font-family: var(--font-heading); font-weight: 800; color: var(--primary); margin-bottom: 8px; line-height: 1; }
.pricing-price span { font-size: 1rem; color: var(--on-surface-variant); font-weight: 500; }
.pricing-desc { font-size: 0.9rem; color: var(--on-surface-variant); margin-bottom: 24px; padding-bottom: 24px; border-bottom: 1px solid var(--outline); }
.pricing-features { list-style: none; margin-bottom: 32px; }
.pricing-features li { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 16px; font-size: 0.95rem; }
.pricing-features li svg { width: 20px; height: 20px; min-width: 20px; max-width: 20px; max-height: 20px; color: var(--primary); flex-shrink: 0; margin-top: 2px; }
.pricing-features li.disabled { color: var(--on-surface-variant); opacity: 0.6; }
.pricing-features li.disabled svg { color: var(--on-surface-variant); }

/* ── VIDEO SECTION ──────────────────────────── */
.video-section { padding: 80px 0; }
/* Shorts: tỉ lệ dọc 9:16 — giới hạn max-width, căn giữa */
.video-wrapper {
    position: relative;
    width: 100%;
    max-width: 360px;
    margin: 40px auto 0;
    aspect-ratio: 9 / 16;    /* KHÔNG dùng height: 0 khi đã có aspect-ratio */
    border-radius: 24px;
    box-shadow: 0 20px 60px rgba(31, 111, 74, 0.18), 0 8px 24px rgba(0,0,0,0.12);
    overflow: hidden;
    background: var(--on-surface);
}
.video-wrapper iframe {
    position: absolute; top: 0; left: 0;
    width: 100%; height: 100%; border: 0;
}
/* Fallback padding-bottom cho browser cũ không hỗ trợ aspect-ratio */
@supports not (aspect-ratio: 9 / 16) {
    .video-wrapper {
        padding-bottom: 177.78%; /* 16/9 * 100% */
    }
}
@media (max-width: 400px) {
    .video-wrapper { max-width: calc(100% - 32px); }
}

/* ── CTA SECTION ────────────────────────────── */
.cta-section {
    padding: 80px 0;
    background: linear-gradient(135deg, #1F6F4A 0%, #2D9B6A 100%);
    margin: 60px 20px; border-radius: 28px;
    text-align: center; color: #fff; position: relative; overflow: hidden;
}
.cta-section::before {
    content: ''; position: absolute; top: -60px; right: -60px;
    width: 200px; height: 200px; border-radius: 50%;
    background: rgba(255,255,255,0.08);
}
.cta-section::after {
    content: ''; position: absolute; bottom: -80px; left: -40px;
    width: 240px; height: 240px; border-radius: 50%;
    background: rgba(255,255,255,0.05);
}
.cta-section h2 { font-size: 2.2rem; font-weight: 800; margin-bottom: 14px; letter-spacing: -0.5px; color: #fff; position: relative; z-index: 1; }
.cta-section p { font-size: 1.05rem; opacity: 0.85; margin-bottom: 32px; position: relative; z-index: 1; color: #fff; }
.btn-white {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 16px 36px; border-radius: 50px;
    background: #fff; color: var(--primary);
    font-weight: 700; font-size: 1rem; font-family: var(--font-heading);
    transition: transform 0.2s, box-shadow 0.3s;
    position: relative; z-index: 1;
}
.btn-white:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,0.15); opacity: 1; }

/* ── FOOTER ─────────────────────────────────── */
footer {
    padding: 48px 0 24px;
    border-top: 1px solid var(--outline);
    background: var(--surface-container);
}
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; margin-bottom: 40px; }
.footer-col h3 { font-size: 1.3rem; font-weight: 800; margin-bottom: 8px; }
.footer-col p { font-size: 0.9rem; color: var(--on-surface-variant); }
.footer-col h4 { font-size: 0.95rem; font-weight: 700; margin-bottom: 16px; color: var(--on-surface); }
.footer-col a {
    display: block; color: var(--on-surface-variant);
    font-size: 0.9rem; margin-bottom: 10px; transition: color 0.2s;
}
.footer-col a:hover { color: var(--primary); opacity: 1; }
.footer-bottom {
    text-align: center; font-size: 0.8rem; color: var(--on-surface-variant);
    padding-top: 24px; border-top: 1px solid var(--outline);
}

/* ── RESPONSIVE ─────────────────────────────── */
@media (max-width: 768px) {
    .nav-links { display: none; }
    .nav-hamburger { display: block; }

    /* Mobile menu */
    .nav-links.active {
        display: flex; flex-direction: column;
        position: absolute; top: 64px; left: 0; right: 0;
        background: var(--surface); padding: 20px;
        border-bottom: 1px solid var(--outline);
        box-shadow: var(--shadow-md);
        gap: 16px;
    }
    .nav-links.active .nav-cta { text-align: center; justify-content: center; }

    .hero { padding: 100px 0 40px; }
    .hero-grid { grid-template-columns: 1fr; text-align: center; gap: 32px; }
    .hero h1 { font-size: 2rem; letter-spacing: -1px; }
    .hero-desc { margin: 0 auto 24px; font-size: 0.95rem; }
    .hero-actions { justify-content: center; flex-direction: column; align-items: center; }
    .hero-text { order: 1; }
    .hero-phone { order: 2; }
    .phone-frame { width: 200px; }
    .phone-glow { width: 240px; height: 240px; }

    .btn-primary, .btn-secondary { padding: 14px 28px; font-size: 0.9rem; width: 100%; max-width: 280px; justify-content: center; }

    .features { padding: 60px 0; }
    .section-title { font-size: 1.6rem; }
    .section-desc { font-size: 0.9rem; margin-bottom: 32px; }
    .feature-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
    .feature-card { padding: 20px 16px; }
    .feature-icon { width: 44px; height: 44px; margin-bottom: 14px; }
    .feature-card h3 { font-size: 1rem; }
    .feature-card p { font-size: 0.82rem; }

    .pricing { padding: 60px 0; }
    .pricing-grid { grid-template-columns: 1fr; gap: 48px; }
    .pricing-card { padding: 32px 24px; }
    .pricing-card.pro { padding-top: 48px; }
    .pricing-price { font-size: 2.4rem; }

    .cta-section { margin: 40px 16px; padding: 48px 20px; border-radius: 20px; }
    .cta-section h2 { font-size: 1.4rem; }
    .cta-section p { font-size: 0.9rem; margin-bottom: 24px; }
    .btn-white { padding: 14px 28px; font-size: 0.9rem; }

    .footer-grid { grid-template-columns: 1fr 1fr; gap: 24px; }
    .footer-col:first-child { grid-column: 1 / -1; }
}

@media (max-width: 380px) {
    .hero h1 { font-size: 1.7rem; }
    .phone-frame { width: 180px; }
    .feature-grid { grid-template-columns: 1fr; }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .hero h1 { font-size: 2.6rem; }
    .feature-grid { grid-template-columns: repeat(2, 1fr); }
    .phone-frame { width: 250px; }
}

/* ── FLOATING CONTACT ──────────────────────────── */
.floating-contact {
    position: fixed; bottom: 24px; right: 24px; z-index: 1000;
    display: flex; flex-direction: column; gap: 16px; align-items: center;
}
.floating-btn {
    width: 60px; height: 60px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    transition: transform 0.3s;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    text-decoration: none;
}
.floating-btn.zalo {
    animation: pulse-zalo 2s infinite;
}
.floating-btn.zalo img {
    width: 100%; height: 100%; object-fit: contain; border-radius: 50%;
}
.floating-btn.phone {
    background-color: #2ECC71; color: white;
}
.floating-btn.phone svg {
    width: 28px; height: 28px;
}
.floating-btn:hover {
    transform: scale(1.1);
    animation: none;
}

@keyframes pulse-zalo {
    0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(0, 132, 255, 0.6); }
    70% { transform: scale(1.05); box-shadow: 0 0 0 15px rgba(0, 132, 255, 0); }
    100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(0, 132, 255, 0); }
}

@media (max-width: 768px) {
    .floating-contact { bottom: 16px; right: 16px; gap: 12px; }
    .floating-btn { width: 50px; height: 50px; }
    .floating-btn.phone svg { width: 24px; height: 24px; }
}
