/* New247 Network — trang chủ */
:root {
    --navy: #0A1A3A;
    --navy-line: #2F4E8C;
    --navy-line-soft: #1E3360;
    --accent: #2563EB;
    --accent-hover: #1D4ED8;
    --accent-soft: #EEF2FF;
    --ink: #0B1220;
    --ink-2: #344054;
    --muted: #475467;
    --line: #E4E7EC;
    --soft-bg: #F6F8FB;
    --on-navy: #E6ECF7;
    --on-navy-muted: #C9D4EA;
    --on-navy-subtle: #A9B6D3;
    --green: #067647;
    --red: #B42318;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0; background: #fff; color: var(--ink);
    font-family: 'Be Vietnam Pro', system-ui, -apple-system, "Segoe UI", sans-serif;
    font-size: 16px; line-height: 1.6;
}
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }
h1, h2, h3, p { margin: 0; }
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* Nút */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px;
    border-radius: 10px; font-weight: 600; font-size: 15px; border: 1px solid transparent; cursor: pointer;
    font-family: inherit; white-space: nowrap;
}
.btn-lg { min-height: 52px; padding: 0 26px; border-radius: 12px; font-size: 16px; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); color: #fff; }
.btn-outline { border-color: #3A5385; color: #fff; }
.btn-outline:hover { background: rgba(255, 255, 255, 0.06); color: #fff; }

/* Đầu trang + phần mở đầu */
.hero-area { background: var(--navy); color: var(--on-navy); position: relative; overflow: hidden; }
.hero-network { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0.55; pointer-events: none; }
.site-header { position: relative; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; padding-top: 20px; padding-bottom: 20px; }
.logo { display: flex; align-items: center; gap: 10px; color: #fff; font-weight: 700; font-size: 18px; letter-spacing: -0.01em; }
.logo:hover { color: #fff; }
.logo-mark { width: 36px; height: 36px; border-radius: 10px; background: var(--accent); display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 16px; color: #fff; }
.site-nav { display: flex; flex-wrap: wrap; gap: 4px 28px; font-size: 15px; }
.site-nav a { color: var(--on-navy-muted); }
.site-nav a:hover { color: #fff; }
.header-actions { display: flex; gap: 10px; }
.hero { position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: 56px; padding-top: 72px; padding-bottom: 96px; }
.hero-copy { flex: 1 1 520px; min-width: 0; display: flex; flex-direction: column; gap: 24px; }
.hero-badge {
    align-self: flex-start; display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--navy-line);
    background: rgba(59, 130, 246, 0.12); color: #BFD3FF; border-radius: 999px; padding: 6px 14px; font-size: 14px; font-weight: 600;
}
.hero-badge .dot { width: 8px; height: 8px; border-radius: 50%; background: #34D399; }
.hero h1 { font-size: 56px; line-height: 1.1; font-weight: 800; letter-spacing: -0.025em; color: #fff; }
.hero-sub { font-size: 19px; color: var(--on-navy-muted); max-width: 560px; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-checks { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px 28px; font-size: 15px; color: var(--on-navy-muted); }
.hero-checks li { display: flex; align-items: center; gap: 8px; }

/* Ảnh minh họa trang theo dõi */
.preview { flex: 1 1 420px; min-width: 0; max-width: 520px; background: #fff; color: #101828; border-radius: 18px; box-shadow: 0 30px 60px rgba(2, 8, 23, 0.45); overflow: hidden; }
.preview-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; border-bottom: 1px solid #EEF0F4; font-size: 14px; }
.preview-head b { font-weight: 700; }
.preview-head span { font-size: 12px; color: var(--muted); }
.preview-kpis { padding: 18px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.preview-kpi { border: 1px solid #EEF0F4; border-radius: 12px; padding: 14px; }
.preview-kpi span { display: block; font-size: 12px; color: var(--muted); }
.preview-kpi strong { display: block; font-size: 22px; font-weight: 800; letter-spacing: -0.02em; }
.preview-bars { margin: 0 18px; height: 130px; display: flex; align-items: flex-end; gap: 8px; border-bottom: 1px solid #EEF0F4; }
.preview-bars i { flex: 1; background: #B9C8F5; border-radius: 4px 4px 0 0; }
.preview-bars i:last-child { background: var(--accent); }
.preview-axis { display: flex; justify-content: space-between; font-size: 11px; color: #667085; padding: 6px 18px 16px; }
.preview-foot { padding: 12px 18px; background: #F8FAFC; border-top: 1px solid #EEF0F4; display: flex; justify-content: space-between; align-items: center; font-size: 13px; color: var(--muted); }
.pill-paid { font-weight: 700; color: var(--green); background: #ECFDF3; border-radius: 999px; padding: 2px 10px; font-size: 12px; }

/* Dải số liệu */
.stats { border-bottom: 1px solid #EEF0F4; }
.stats-grid { padding-top: 36px; padding-bottom: 36px; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 24px; }
.stat strong { display: block; font-size: 34px; font-weight: 800; letter-spacing: -0.02em; line-height: 1.2; }
.stat span { font-size: 15px; color: var(--muted); }

/* Phần nội dung */
.section { padding-top: 96px; padding-bottom: 96px; display: flex; flex-direction: column; gap: 48px; }
.section-soft { background: var(--soft-bg); }
.section-dark { background: var(--navy); color: var(--on-navy); }
.section-head { max-width: 700px; display: flex; flex-direction: column; gap: 12px; }
.eyebrow { font-size: 14px; font-weight: 700; letter-spacing: 0.08em; color: var(--accent); text-transform: uppercase; }
.section-dark .eyebrow { color: #93B4FF; }
.section h2 { font-size: 40px; line-height: 1.15; font-weight: 800; letter-spacing: -0.02em; }
.section-dark h2 { color: #fff; }
.lead { font-size: 18px; color: var(--muted); }
.section-dark .lead { color: var(--on-navy-muted); }
.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.split { display: flex; flex-wrap: wrap; gap: 48px; align-items: flex-start; }
.split > * { min-width: 0; }

.card { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 26px; display: flex; flex-direction: column; gap: 12px; }
.card h3 { font-size: 19px; font-weight: 700; }
.card p { font-size: 15px; color: var(--muted); }
.card-sm { border-radius: 14px; padding: 20px 22px; gap: 6px; }
.card-sm h3 { font-size: 17px; }
.step-num { width: 40px; height: 40px; border-radius: 12px; background: var(--accent-soft); color: var(--accent); font-weight: 800; display: flex; align-items: center; justify-content: center; }
.steps { list-style: none; margin: 0; padding: 0; }
.icon { color: var(--accent); }

.income-card { border: 1px solid var(--navy-line); background: rgba(255, 255, 255, 0.04); border-radius: 16px; padding: 24px; }
.income-card span { display: block; font-size: 14px; color: var(--on-navy-subtle); }
.income-card strong { display: block; font-size: 30px; font-weight: 800; color: #fff; line-height: 1.25; }

.rule-ok { border-color: #ABEFC6; background: #F6FEF9; }
.rule-ok h3 { color: var(--green); }
.rule-no { border-color: #FECDCA; background: #FFFBFA; }
.rule-no h3 { color: var(--red); }
.rule-list { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 8px; color: var(--ink-2); font-size: 15px; }

/* Hỏi đáp */
.faq { max-width: 880px; margin: 0 auto; }
.faq h2 { text-align: center; }
.faq-list { display: flex; flex-direction: column; gap: 12px; }
.faq details { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 0 24px; }
.faq summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 16px; min-height: 64px; font-weight: 700; font-size: 17px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary .plus { font-size: 26px; color: var(--accent); transition: transform 0.15s; flex: none; }
.faq details[open] .plus { transform: rotate(45deg); }
.faq details p { padding-bottom: 20px; color: var(--muted); }

/* Form đăng ký */
.join-info { flex: 1 1 380px; display: flex; flex-direction: column; gap: 16px; }
.contact-list { display: flex; flex-direction: column; gap: 10px; margin-top: 8px; font-size: 15px; color: var(--ink-2); }
.join-form { flex: 1 1 520px; border: 1px solid var(--line); border-radius: 18px; padding: 32px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; box-shadow: 0 12px 32px rgba(16, 24, 40, 0.06); }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field-full { grid-column: 1 / -1; }
.field label { font-size: 14px; font-weight: 600; color: var(--ink-2); }
.field input, .field select, .field textarea {
    border: 1px solid #D0D5DD; border-radius: 10px; padding: 0 14px; min-height: 46px; font: inherit; color: var(--ink); background: #fff; width: 100%;
}
.field textarea { padding: 12px 14px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--accent-soft); border-color: var(--accent); }
.agree { grid-column: 1 / -1; display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--muted); }
.agree input { width: 18px; height: 18px; margin-top: 3px; flex: none; accent-color: var(--accent); }
.hp-field { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.join-msg { grid-column: 1 / -1; border-radius: 10px; padding: 12px 16px; font-size: 15px; border: 1px solid; }
.join-msg.ok { background: #ECFDF3; border-color: #ABEFC6; color: var(--green); }
.join-msg.err { background: #FEF3F2; border-color: #FECDCA; color: var(--red); }

/* Chân trang */
.site-footer { background: var(--navy); color: var(--on-navy-subtle); font-size: 14px; }
.footer-top { padding-top: 48px; padding-bottom: 48px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 24px; }
.footer-brand { display: flex; flex-direction: column; gap: 10px; max-width: 380px; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 12px 32px; align-items: flex-start; }
.footer-nav a { color: var(--on-navy-muted); }
.footer-nav a:hover { color: #fff; }
.footer-bottom { border-top: 1px solid var(--navy-line-soft); padding: 18px 24px; text-align: center; font-size: 13px; }

/* ===================== Chuyển động & hiệu ứng ===================== */

/* Thanh menu dính trên cùng, nền mờ như kính khi cuộn */
.site-header-bar { position: sticky; top: 0; z-index: 50; background: var(--navy); transition: background 0.3s, box-shadow 0.3s; }
.site-header-bar.scrolled {
    background: rgba(10, 26, 58, 0.86); box-shadow: 0 8px 24px rgba(2, 8, 23, 0.25);
    -webkit-backdrop-filter: saturate(160%) blur(12px); backdrop-filter: saturate(160%) blur(12px);
}
.site-header { transition: padding 0.3s; }
.site-header-bar.scrolled .site-header { padding-top: 12px; padding-bottom: 12px; }
section[id], div[id] { scroll-margin-top: 84px; }
.site-nav a { position: relative; }
.site-nav a::after {
    content: ""; position: absolute; left: 0; right: 0; bottom: -4px; height: 2px; border-radius: 2px;
    background: #7DB1FF; transform: scaleX(0); transform-origin: left; transition: transform 0.25s ease;
}
.site-nav a:hover::after { transform: scaleX(1); }

/* Họa tiết mạng lưới: tín hiệu chạy trên đường nối, điểm nút nhấp nháy */
.hero-network { animation: net-drift 24s ease-in-out infinite alternate; }
@keyframes net-drift { from { transform: translate3d(0, 0, 0); } to { transform: translate3d(-24px, 12px, 0); } }
.net-signals path { stroke-dasharray: 6 94; stroke-dashoffset: 100; opacity: 0.9; animation: net-signal 6s linear infinite; }
.net-signals path:nth-child(2) { animation-duration: 7.5s; animation-delay: -2s; }
.net-signals path:nth-child(3) { animation-duration: 9s; animation-delay: -4s; }
.net-signals path:nth-child(4) { animation-duration: 8s; animation-delay: -1s; }
@keyframes net-signal { to { stroke-dashoffset: 0; } }
.net-nodes circle { transform-box: fill-box; transform-origin: center; animation: net-pulse 4s ease-in-out infinite; }
.net-nodes circle:nth-child(3n) { animation-delay: -1.3s; }
.net-nodes circle:nth-child(3n + 1) { animation-delay: -2.6s; }
@keyframes net-pulse { 0%, 100% { opacity: 0.55; transform: scale(1); } 50% { opacity: 1; transform: scale(1.6); } }

/* Phần mở đầu hiện dần khi vào trang */
.js .hero-intro > * { opacity: 0; transform: translateY(18px); animation: rise 0.8s cubic-bezier(0.2, 0.7, 0.2, 1) forwards; }
.js .hero-intro > *:nth-child(1) { animation-delay: 0.05s; }
.js .hero-intro > *:nth-child(2) { animation-delay: 0.15s; }
.js .hero-intro > *:nth-child(3) { animation-delay: 0.25s; }
.js .hero-intro > *:nth-child(4) { animation-delay: 0.35s; }
.js .hero-intro > *:nth-child(5) { animation-delay: 0.45s; }
@keyframes rise { to { opacity: 1; transform: none; } }
.hero-badge .dot { animation: ping 2s ease-out infinite; }
@keyframes ping { 0% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.6); } 70%, 100% { box-shadow: 0 0 0 8px rgba(52, 211, 153, 0); } }

/* Khung minh họa nổi nhẹ, cột biểu đồ mọc lên lần lượt */
.preview { animation: float 7s ease-in-out infinite; }
.js .preview-intro {
    opacity: 0; transform: translateY(24px) scale(0.98);
    animation: rise 0.9s 0.35s cubic-bezier(0.2, 0.7, 0.2, 1) forwards, float 7s 1.4s ease-in-out infinite;
}
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
.preview-bars i { transform-origin: bottom; animation: grow 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) both; animation-delay: calc(0.6s + var(--i, 0) * 60ms); }
@keyframes grow { from { transform: scaleY(0); } }

/* Các phần nội dung trượt lên khi cuộn tới */
.js .reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1); }
.js .reveal.is-visible { opacity: 1; transform: none; }
.js .reveal-group > * {
    opacity: 0; transform: translateY(24px);
    transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1), box-shadow 0.25s, border-color 0.25s;
    transition-delay: calc(var(--i, 0) * 90ms);
}
.js .reveal-group.is-visible > * { opacity: 1; transform: none; }

/* Nhấc nhẹ khi rê chuột */
.card { transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease; }
.card:hover, .js .reveal-group.is-visible > .card:hover {
    transform: translateY(-4px); box-shadow: 0 14px 32px rgba(16, 24, 40, 0.08); border-color: #C7D2EE; transition-delay: 0s;
}
.rule-ok:hover, .js .reveal-group.is-visible > .rule-ok:hover { border-color: #75E0A7; }
.rule-no:hover, .js .reveal-group.is-visible > .rule-no:hover { border-color: #FDA29B; }
.step-num { transition: background 0.25s, color 0.25s; }
.card:hover .step-num { background: var(--accent); color: #fff; }
.card .icon { transition: transform 0.25s ease; }
.card:hover .icon { transform: scale(1.12) rotate(-4deg); }
.income-card { transition: border-color 0.25s, background 0.25s, transform 0.25s; }
.income-card:hover, .js .reveal-group.is-visible > .income-card:hover { border-color: #5B83D6; background: rgba(255, 255, 255, 0.07); transform: translateY(-3px); transition-delay: 0s; }
.faq details { transition: border-color 0.2s, box-shadow 0.2s; }
.faq details:hover, .faq details[open] { border-color: #C7D2EE; box-shadow: 0 8px 20px rgba(16, 24, 40, 0.05); }

.btn { transition: background 0.2s, transform 0.2s, box-shadow 0.2s, border-color 0.2s; }
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 10px 24px rgba(37, 99, 235, 0.35); }
.btn-outline:hover { border-color: #6F8BC4; }
.btn svg { transition: transform 0.2s; }
.btn:hover svg { transform: translateX(3px); }
.btn.is-loading { opacity: 0.8; cursor: progress; transform: none; box-shadow: none; }

/* Người dùng chọn "giảm chuyển động": tắt toàn bộ hiệu ứng */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* Điện thoại / máy tính bảng */
@media (max-width: 1024px) {
    .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .hero h1 { font-size: 44px; }
}
@media (max-width: 640px) {
    .grid-4, .grid-3, .grid-2, .join-form { grid-template-columns: minmax(0, 1fr); }
    .hero { padding-top: 40px; padding-bottom: 64px; gap: 40px; }
    .hero h1 { font-size: 34px; }
    .hero-sub { font-size: 17px; }
    .section { padding-top: 64px; padding-bottom: 64px; gap: 32px; }
    .section h2 { font-size: 30px; }
    .site-nav { display: none; }
    .site-header { gap: 12px; }
    .header-actions .btn { min-height: 40px; padding: 0 14px; font-size: 14px; }
    .join-form { padding: 22px; }
    .preview-kpi strong { font-size: 19px; }
}
