/* ==========================================================================
   Bán Nhàn — landing page
   Hướng thiết kế: SÁNG, ẤM, NHIỀU HÌNH VẼ. Nền giấy kem, chữ bo tròn,
   tranh minh hoạ phẳng vẽ bằng SVG ngay trong trang (không ảnh ngoài).
   Trang cố ý chỉ một tông sáng nên mọi màu nền/màu chữ đều tô tường minh,
   trình duyệt bật chế độ tối cũng không bị chữ trắng trên nền trắng.
   ========================================================================== */

:root {
    /* --- nền --- */
    --paper: #FFF8F3;
    --white: #FFFFFF;
    --paper-2: #FFF1E7;

    /* --- màu thương hiệu + màu phụ dùng cho tranh vẽ --- */
    --brand: #DC2626;
    --brand-deep: #B01B1B;
    --sun: #F9A825;
    --mint: #12A578;
    --sky: #3B82C4;

    /* --- nền nhạt theo màu --- */
    --tint-brand: #FFEDEA;
    --tint-sun: #FFF3DC;
    --tint-mint: #E4F6EF;
    --tint-sky: #E8F1FA;

    /* --- chữ & nét --- */
    --ink: #2E2320;
    --muted: #7B6A63;
    --line: #F0E2D8;
    --line-strong: #E3D0C4;

    /* --- khung --- */
    --container: 1160px;
    --gutter: clamp(18px, 4vw, 44px);

    --r: 22px;
    --r-sm: 14px;
    --r-pill: 999px;

    --shadow-sm: 0 4px 14px -8px rgba(94, 50, 35, .28);
    --shadow: 0 16px 36px -22px rgba(94, 50, 35, .38);
    --shadow-lg: 0 30px 60px -34px rgba(94, 50, 35, .45);

    --font-display: "Baloo 2", "Be Vietnam Pro", "Segoe UI", system-ui, sans-serif;
    --font-body: "Be Vietnam Pro", "Segoe UI", system-ui, sans-serif;

    color-scheme: light;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: var(--font-body);
    font-size: 16.5px;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

img, svg { max-width: 100%; }
a { color: inherit; }

h1, h2, h3 {
    margin: 0;
    font-family: var(--font-display);
    font-weight: 700;
    line-height: 1.14;
    letter-spacing: -.012em;
    text-wrap: balance;
}

h1 { font-size: clamp(2.15rem, 5.2vw, 3.6rem); line-height: 1.08; }
h2 { font-size: clamp(1.7rem, 3.5vw, 2.5rem); }
h3 { font-size: 1.25rem; }

p { margin: 0; }

.wrap {
    width: 100%;
    max-width: var(--container);
    margin-inline: auto;
    padding-inline: var(--gutter);
}

.lead {
    font-size: clamp(1.03rem, 1.5vw, 1.18rem);
    color: var(--muted);
    max-width: 58ch;
}

.section { padding-block: clamp(54px, 7vw, 96px); }
.section--tint { background: var(--paper-2); }
.section--white { background: var(--white); }

.section__head { display: grid; gap: 14px; justify-items: center; text-align: center; max-width: 64ch; margin-inline: auto; }
.section__head .lead { text-align: center; }

/* --- nhãn chip --- */
.chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 15px 7px 11px;
    border-radius: var(--r-pill);
    background: var(--tint-brand);
    color: var(--brand-deep);
    font-size: .875rem;
    font-weight: 600;
}
.chip svg { width: 18px; height: 18px; }
.chip--sun { background: var(--tint-sun); color: #8A5A00; }
.chip--mint { background: var(--tint-mint); color: #0A6B4D; }
.chip--sky { background: var(--tint-sky); color: #2A5F93; }

/* ==========================================================================
   Nút
   ========================================================================== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 26px;
    border: 2px solid transparent;
    border-radius: var(--r-pill);
    font-family: var(--font-display);
    font-size: 1.0625rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: transform .15s ease, background-color .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.btn svg { width: 20px; height: 20px; }

.btn--brand { background: var(--brand); color: #fff; box-shadow: 0 10px 22px -12px rgba(220, 38, 38, .8); }
.btn--brand:hover { background: var(--brand-deep); transform: translateY(-2px); }

.btn--soft { background: var(--white); color: var(--ink); border-color: var(--line-strong); }
.btn--soft:hover { border-color: var(--brand); color: var(--brand-deep); transform: translateY(-2px); }

.btn--white { background: #fff; color: var(--brand-deep); }
.btn--white:hover { transform: translateY(-2px); }

.btn--clear { border-color: rgba(255, 255, 255, .65); color: #fff; }
.btn--clear:hover { background: rgba(255, 255, 255, .16); transform: translateY(-2px); }

.btn--sm { padding: 10px 20px; font-size: .9375rem; }

:focus-visible { outline: 3px solid var(--sun); outline-offset: 3px; }

/* ==========================================================================
   Thanh điều hướng
   ========================================================================== */

.nav {
    position: sticky;
    top: 0;
    z-index: 60;
    background: rgba(255, 248, 243, .92);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid transparent;
    transition: border-color .2s ease, box-shadow .2s ease;
}
.nav.is-stuck { border-bottom-color: var(--line); box-shadow: 0 6px 20px -18px rgba(94, 50, 35, .6); }

.nav__in { display: flex; align-items: center; gap: 30px; height: 74px; }
.nav__logo { flex: none; display: flex; align-items: center; text-decoration: none; }
.nav__logo img { height: 30px; width: auto; display: block; }

/* Mục menu KHÔNG được xuống dòng: thiếu chỗ thì giảm khoảng cách, rồi chuyển sang nút ☰ —
   để chữ gãy thành "Cách hoạt / động" là thanh menu cao gấp đôi và vỡ hàng. */
.nav__links { display: flex; gap: 28px; margin-left: auto; }
.nav__links a { font-weight: 500; text-decoration: none; color: var(--ink); white-space: nowrap; transition: color .15s ease; }
.nav__links a:hover { color: var(--brand); }

.nav__cta { flex: none; margin-left: auto; white-space: nowrap; }
.nav__links + .nav__cta { margin-left: 0; }

/* Nút ☰ — chỉ hiện ở màn hẹp (app.js bật/tắt lớp .is-open trên .nav) */
.nav__toggle {
    display: none; flex: none;
    width: 44px; height: 44px; margin-left: 4px;
    border: 1px solid var(--line-strong); border-radius: 12px;
    background: var(--white); cursor: pointer;
    place-items: center;
}
.nav__toggle span, .nav__toggle span::before, .nav__toggle span::after {
    display: block; width: 18px; height: 2px; border-radius: 2px; background: var(--ink);
    transition: transform .2s ease, background-color .2s ease;
}
.nav__toggle span { position: relative; }
.nav__toggle span::before, .nav__toggle span::after { content: ""; position: absolute; left: 0; }
.nav__toggle span::before { top: -6px; }
.nav__toggle span::after { top: 6px; }
.nav.is-open .nav__toggle span { background: transparent; }
.nav.is-open .nav__toggle span::before { transform: translateY(6px) rotate(45deg); }
.nav.is-open .nav__toggle span::after { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 1080px) { .nav__in { gap: 22px; } .nav__links { gap: 20px; } }

@media (max-width: 900px) {
    .nav__toggle { display: grid; }
    .nav__links {
        display: none;
        position: absolute; top: 100%; left: 0; right: 0;
        flex-direction: column; gap: 0;
        margin: 0; padding: 8px var(--gutter) 14px;
        background: var(--white);
        border-bottom: 1px solid var(--line);
        box-shadow: 0 18px 30px -24px rgba(94, 50, 35, .55);
    }
    .nav.is-open .nav__links { display: flex; }
    .nav__links a { padding: 12px 0; border-bottom: 1px dashed var(--line); }
    .nav__links a:last-child { border-bottom: 0; }
    .nav__cta { margin-left: auto; }
}

@media (max-width: 420px) { .nav__cta { padding-inline: 14px; font-size: .875rem; } }

/* ==========================================================================
   Hero
   ========================================================================== */

.hero { padding-block: clamp(30px, 4vw, 58px) clamp(46px, 6vw, 78px); }

.hero__in {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.02fr);
    gap: clamp(26px, 4vw, 56px);
    align-items: center;
}

.hero h1 { margin-block: 18px 18px; }
.hero h1 em { font-style: normal; color: var(--brand); }

.hero__cta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 30px; }

.hero__trust { display: flex; flex-wrap: wrap; gap: 10px 22px; margin-top: 28px; }
.hero__trust span { display: inline-flex; align-items: center; gap: 8px; font-size: .9375rem; color: var(--muted); }
.hero__trust svg { width: 20px; height: 20px; color: var(--mint); flex: none; }

.hero__art { justify-self: center; width: 100%; }
.hero__art > svg { display: block; width: 100%; height: auto; }

@media (max-width: 940px) {
    .hero__in { grid-template-columns: 1fr; }
    .hero__art { order: -1; max-width: 520px; }
}

/* ==========================================================================
   Dải "phù hợp với"
   ========================================================================== */

.fits { display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px; margin-top: 34px; }

.fit {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--r-sm);
    padding: 18px 12px 16px;
    text-align: center;
    display: grid;
    gap: 8px;
    justify-items: center;
    font-size: .9375rem;
    font-weight: 600;
    box-shadow: var(--shadow-sm);
}
.fit svg { width: 34px; height: 34px; }

@media (max-width: 900px) { .fits { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 520px) { .fits { grid-template-columns: repeat(2, 1fr); } }

/* ==========================================================================
   Năm bước
   ========================================================================== */

.steps { display: grid; grid-template-columns: repeat(5, 1fr); gap: 18px; margin-top: 40px; }

.step { display: grid; gap: 10px; justify-items: center; text-align: center; }
.step__badge {
    width: 82px;
    height: 82px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    position: relative;
}
.step__badge svg { width: 40px; height: 40px; }
.step__badge b {
    position: absolute;
    right: -4px;
    top: -4px;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--brand);
    color: #fff;
    font-family: var(--font-display);
    font-size: .8125rem;
    display: grid;
    place-items: center;
    border: 3px solid var(--paper-2);
}
.step h3 { font-size: 1.125rem; }
.step p { font-size: .9375rem; color: var(--muted); }

@media (max-width: 900px) { .steps { grid-template-columns: repeat(2, 1fr); gap: 28px; } }
@media (max-width: 520px) { .steps { grid-template-columns: 1fr; } }

/* ==========================================================================
   Thẻ tính năng
   ========================================================================== */

.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 40px; }

.card {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--r);
    padding: 26px 24px 24px;
    display: grid;
    gap: 10px;
    align-content: start;
    box-shadow: var(--shadow-sm);
    transition: transform .18s ease, box-shadow .18s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }

.card__icon { width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; }
.card__icon svg { width: 30px; height: 30px; }
.card p { font-size: .9375rem; color: var(--muted); }

.tags { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 4px; }
.tags span {
    font-size: .8125rem;
    padding: 4px 11px;
    border-radius: var(--r-pill);
    background: var(--paper-2);
    color: #6E5A51;
}

.bg-brand { background: var(--tint-brand); color: var(--brand); }
.bg-sun { background: var(--tint-sun); color: #B97B06; }
.bg-mint { background: var(--tint-mint); color: var(--mint); }
.bg-sky { background: var(--tint-sky); color: var(--sky); }

@media (max-width: 940px) { .cards { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .cards { grid-template-columns: 1fr; } }

/* ==========================================================================
   Khối đi sâu (chữ + tranh)
   ========================================================================== */

.feature {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: clamp(28px, 5vw, 68px);
    align-items: center;
}
.feature + .feature { margin-top: clamp(48px, 6vw, 86px); }
.feature--flip .feature__art { order: -1; }

.feature__body { display: grid; gap: 16px; align-content: start; justify-items: start; }
.feature__body h2 { max-width: 16ch; }

.feature__art { display: grid; place-items: center; }
.feature__art > svg { display: block; width: 100%; height: auto; }

.points { display: grid; gap: 14px; margin: 4px 0 0; padding: 0; list-style: none; }
.points li { display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 12px; align-items: start; }
.points svg { width: 26px; height: 26px; margin-top: 3px; color: var(--mint); }
.points b { display: block; font-family: var(--font-display); font-size: 1.0625rem; font-weight: 600; }
.points span { font-size: .9375rem; color: var(--muted); }

@media (max-width: 900px) {
    .feature { grid-template-columns: 1fr; }
    .feature--flip .feature__art { order: 0; }
}

/* ==========================================================================
   Dải con số
   ========================================================================== */

.numbers { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-top: 38px; }

.number {
    background: var(--white);
    border-radius: var(--r);
    border: 1px solid var(--line);
    padding: 24px 22px;
    text-align: center;
    box-shadow: var(--shadow-sm);
}
.number b {
    display: block;
    font-family: var(--font-display);
    font-size: 2.6rem;
    font-weight: 700;
    line-height: 1.1;
    color: var(--brand);
    font-variant-numeric: tabular-nums;
}
.number span { font-size: .9375rem; color: var(--muted); }

@media (max-width: 860px) { .numbers { grid-template-columns: repeat(2, 1fr); } }

/* ==========================================================================
   Mọi việc đều có phiếu
   ========================================================================== */

.papers { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 34px; }
.paper-pill {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 11px 20px 11px 14px;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--r-pill);
    font-weight: 500;
    box-shadow: var(--shadow-sm);
}
.paper-pill svg { width: 22px; height: 22px; color: var(--brand); flex: none; }

/* ==========================================================================
   An tâm
   ========================================================================== */

.safe { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; margin-top: 38px; }

.safe__cell {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--r);
    padding: 26px 26px 24px;
    display: grid;
    grid-template-columns: 58px minmax(0, 1fr);
    gap: 6px 18px;
    box-shadow: var(--shadow-sm);
}
.safe__cell .card__icon { grid-row: span 2; }
.safe__cell p { font-size: .9375rem; color: var(--muted); }

@media (max-width: 760px) { .safe { grid-template-columns: 1fr; } }

/* ==========================================================================
   Gói dịch vụ
   ========================================================================== */

.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-top: 40px; align-items: start; }

.plan {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--r);
    padding: 30px 26px 30px;
    display: grid;
    gap: 14px;
    align-content: start;
    box-shadow: var(--shadow-sm);
}
.plan--lead {
    border-color: var(--brand);
    border-width: 2px;
    box-shadow: var(--shadow-lg);
    position: relative;
}
.plan__flag {
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--brand);
    color: #fff;
    font-family: var(--font-display);
    font-weight: 600;
    font-size: .875rem;
    padding: 4px 18px;
    border-radius: var(--r-pill);
    white-space: nowrap;
}
.plan__price { font-family: var(--font-display); font-size: 2rem; font-weight: 700; line-height: 1.2; color: var(--brand); }
.plan__price small { display: block; font-family: var(--font-body); font-size: .875rem; font-weight: 400; color: var(--muted); }
.plan__for { font-size: .9375rem; color: var(--muted); }
.plan ul { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 11px; }
.plan li { display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: 10px; font-size: .9375rem; align-items: start; }
.plan li svg { width: 21px; height: 21px; margin-top: 4px; color: var(--mint); }
.plan .btn { width: 100%; margin-top: 6px; }

@media (max-width: 940px) { .plans { grid-template-columns: 1fr; max-width: 520px; margin-inline: auto; } }

/* ==========================================================================
   Hỏi đáp
   ========================================================================== */

.faq { display: grid; gap: 14px; margin-top: 36px; max-width: 860px; margin-inline: auto; }

.faq details {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--r-sm);
    padding: 4px 22px;
    box-shadow: var(--shadow-sm);
}
.faq summary {
    list-style: none;
    cursor: pointer;
    padding: 16px 34px 16px 0;
    position: relative;
    font-family: var(--font-display);
    font-size: 1.125rem;
    font-weight: 600;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
    content: "";
    position: absolute;
    right: 4px;
    top: 50%;
    width: 11px;
    height: 11px;
    margin-top: -8px;
    border-right: 2.5px solid var(--brand);
    border-bottom: 2.5px solid var(--brand);
    transform: rotate(45deg);
    transition: transform .2s ease;
}
.faq details[open] summary::after { transform: rotate(225deg); margin-top: -3px; }
.faq p { padding-bottom: 20px; color: var(--muted); font-size: .9875rem; }

/* ==========================================================================
   Kêu gọi cuối trang
   ========================================================================== */

.cta {
    background: linear-gradient(135deg, #E8412F 0%, var(--brand) 55%, #B81E1E 100%);
    color: #fff;
    text-align: center;
    padding-block: clamp(52px, 7vw, 86px);
}
.cta h2 { max-width: 22ch; margin-inline: auto; }
.cta p { color: rgba(255, 255, 255, .9); max-width: 54ch; margin: 16px auto 0; }
.cta__row { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; margin-top: 30px; }
.cta__note { margin-top: 20px; font-size: .9375rem; color: rgba(255, 255, 255, .82); }

/* ==========================================================================
   Chân trang
   ========================================================================== */

.footer { background: var(--white); border-top: 1px solid var(--line); padding-block: 52px 30px; }
.footer__in { display: grid; grid-template-columns: minmax(0, 1.5fr) repeat(3, minmax(0, 1fr)); gap: 34px; }
.footer__logo img { height: 30px; display: block; }
.footer__note { margin-top: 14px; color: var(--muted); font-size: .9375rem; max-width: 36ch; }
.footer h4 { font-family: var(--font-display); font-size: 1.0625rem; font-weight: 600; margin: 0 0 12px; }
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.footer a { text-decoration: none; color: var(--muted); font-size: .9375rem; }
.footer a:hover { color: var(--brand); }
.footer__bottom {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid var(--line);
    display: flex;
    flex-wrap: wrap;
    gap: 8px 24px;
    justify-content: space-between;
    color: var(--muted);
    font-size: .875rem;
}

@media (max-width: 860px) { .footer__in { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 460px) { .footer__in { grid-template-columns: 1fr; } }

/* ==========================================================================
   Chuyển động — nhẹ, và tắt hẳn khi người dùng yêu cầu
   ========================================================================== */

.float-a { animation: bob 5.5s ease-in-out infinite; transform-origin: center; }
.float-b { animation: bob 6.5s ease-in-out infinite .8s; transform-origin: center; }

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

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .float-a, .float-b { animation: none; }
    .card:hover, .btn:hover { transform: none; }
}

/* ==========================================================================
   Ảnh chụp màn hình phần mềm
   ========================================================================== */

.shots { margin-top: 34px; }

.shots__tabs { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-bottom: 26px; }

.shot-tab {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 10px 18px;
    border: 1px solid var(--line);
    border-radius: var(--r-pill);
    background: var(--white);
    color: var(--ink);
    font-family: var(--font-display);
    font-size: .9375rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color .15s ease, border-color .15s ease, color .15s ease, transform .15s ease;
}
.shot-tab svg { width: 19px; height: 19px; color: var(--muted); }
.shot-tab:hover { border-color: var(--line-strong); transform: translateY(-2px); }
.shot-tab[aria-selected="true"] { background: var(--brand); border-color: var(--brand); color: #fff; }
.shot-tab[aria-selected="true"] svg { color: #fff; }

.screen {
    border: 1px solid var(--line);
    border-radius: 18px;
    overflow: hidden;
    background: var(--white);
    box-shadow: var(--shadow-lg);
}

.screen__bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 18px;
    background: var(--paper-2);
    border-bottom: 1px solid var(--line);
}
.screen__bar i { display: block; width: 11px; height: 11px; border-radius: 50%; background: #E3D0C4; }
.screen__bar i:first-child { background: #F0A9A2; }
.screen__bar i:nth-child(2) { background: #F3CE96; }
.screen__bar em { margin-left: 10px; font-style: normal; font-size: .8125rem; color: var(--muted); }

.shot-panel { margin: 0; }
.shot-panel img { display: block; width: 100%; height: auto; }
.shot-panel figcaption {
    padding: 16px 20px;
    border-top: 1px solid var(--line);
    font-size: .9375rem;
    color: var(--muted);
}
.shot-panel figcaption b { color: var(--ink); font-family: var(--font-display); font-weight: 600; }

.shots__note { margin-top: 16px; text-align: center; font-size: .875rem; color: var(--muted); }

@media (max-width: 700px) {
    .shot-tab { padding: 9px 14px; font-size: .875rem; }
    .screen__bar em { display: none; }
}
