/* =========================================================
   Maxviral.Net — login.css (landing + auth)
   Giữ nguyên toàn bộ class/ID mà auth.with-api.js đang dùng:
   .field.invalid, .err, .form-pane.active, .tab.active,
   .overlay.show, .toast .item(.err) .badge, .btn, .input, .eye
   ========================================================= */

:root {
    /* --- biến cũ, giữ lại để tương thích --- */
    --bg: #FBFAF8;
    --card: #ffffff;
    --text: #16103A;
    --muted: #6B6494;
    --line: #E4DEF6;
    --primary1: #6D28FF;
    --primary2: #8B4BFF;
    --shadow: 0 18px 44px -22px rgba(35, 18, 92, .34);
    --shadow2: 0 6px 18px rgba(35, 18, 92, .08);

    /* --- token mới --- */
    --ink: #16103A;
    --violet: #6D28FF;
    --violet-dark: #5416DB;
    --violet-soft: #EFE9FF;
    --paper: #FBFAF8;
    --hero-base: #FBFAF8;
    --mint: #00B884;
    --amber: #F0921B;
    --danger: #EF4444;

    --display: "Archivo", system-ui, -apple-system, sans-serif;
    --body: "Be Vietnam Pro", system-ui, -apple-system, sans-serif;
    --mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", monospace;

    --maxw: 1400px;
    --maxw-wide: 1760px;
    --gut: clamp(22px, 3.6vw, 56px);
    --r: 14px;
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 84px;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--body);
    background: var(--paper);
    color: var(--ink);
    font-size: 16px;
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

a {
    color: inherit;
    text-decoration: none;
}

img, svg {
    display: block;
    max-width: 100%;
}

input, select, button, textarea {
    font: inherit;
}

button {
    cursor: pointer;
    border: 0;
    background: none;
    color: inherit;
}

:focus-visible {
    outline: 3px solid var(--violet);
    outline-offset: 3px;
    border-radius: 6px;
}

h1, h2, h3, .display {
    font-family: var(--display);
    font-weight: 800;
    font-stretch: 112%;
    letter-spacing: -.022em;
    line-height: 1.06;
}

.wrap {
    width: 100%;
    max-width: var(--maxw);
    margin-inline: auto;
    padding-inline: 22px;
}

.eyebrow {
    font-family: var(--mono);
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: var(--violet);
}

.lead {
    color: var(--muted);
    font-size: 16.5px;
    max-width: 56ch;
}

/* ================= BUTTON ================= */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 46px;
    padding: 0 22px;
    border-radius: 11px;
    font-weight: 600;
    font-size: 15px;
    white-space: nowrap;
    transition: transform .16s ease, background .16s ease, border-color .16s ease, box-shadow .16s ease;
}

.btn-primary {
    background: var(--violet);
    color: #fff;
    box-shadow: 0 12px 26px -12px rgba(109, 40, 255, .75);
}

.btn-primary:hover {
    background: var(--violet-dark);
    transform: translateY(-2px);
}

.btn-ghost {
    border: 1.5px solid var(--line);
    background: #fff;
    color: var(--ink);
}

.btn-ghost:hover {
    border-color: var(--violet);
    color: var(--violet);
}

.btn-light {
    background: rgba(255, 255, 255, .10);
    border: 1.5px solid rgba(255, 255, 255, .28);
    color: #fff;
}

.btn-light:hover {
    background: rgba(255, 255, 255, .18);
}

.btn-block {
    width: 100%;
}

.btn[disabled] {
    opacity: .55;
    pointer-events: none;
}

.link {
    color: var(--violet);
    font-weight: 600;
}

.link:hover {
    text-decoration: underline;
}

/* ================= TOPBAR ================= */
.topbar {
    position: sticky;
    top: 0;
    z-index: 60;
    background: rgba(250, 249, 255, .86);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid transparent;
    transition: border-color .2s ease, box-shadow .2s ease;
}

.topbar.stuck {
    border-bottom-color: var(--line);
    box-shadow: 0 8px 24px -20px rgba(35, 18, 92, .55);
}

.topbar .inner {
    width: 100%;
    max-width: var(--maxw-wide);
    margin-inline: auto;
    padding-inline: var(--gut);
    height: 70px;
    display: flex;
    align-items: center;
    gap: 22px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 11px;
    flex-shrink: 0;
}

.logo {
    width: 38px;
    height: 38px;
    border-radius: 11px;
    flex-shrink: 0;
    background: linear-gradient(150deg, var(--primary1), var(--primary2));
    color: #fff;
    font-family: var(--display);
    font-weight: 800;
    font-size: 16px;
    display: grid;
    place-items: center;
}

.brand .t b {
    display: block;
    font-family: var(--display);
    font-weight: 800;
    font-size: 15.5px;
    line-height: 1.15;
    letter-spacing: -.01em;
}

.brand .t span {
    display: block;
    font-family: var(--mono);
    font-size: 10.5px;
    letter-spacing: .1em;
    color: var(--muted);
}

.nav-links {
    display: flex;
    gap: 24px;
    margin-left: 10px;
    font-size: 14.5px;
    font-weight: 500;
    color: var(--muted);
}

.nav-links a:hover {
    color: var(--violet);
}

.top-actions {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 10px;
}

.pill {
    display: flex;
    align-items: center;
    gap: 8px;
    height: 42px;
    padding: 0 12px;
    border: 1.5px solid var(--line);
    border-radius: 11px;
    background: #fff;
}

.pill input {
    border: 0;
    outline: 0;
    background: transparent;
    width: 150px;
    font-size: 14px;
    color: var(--ink);
}

.pill input::placeholder {
    color: #9A93C0;
}

.kbd {
    font-family: var(--mono);
    font-size: 10px;
    font-weight: 700;
    color: var(--muted);
    background: var(--violet-soft);
    border-radius: 5px;
    padding: 3px 6px;
}

.top-actions .btn {
    height: 42px;
    padding: 0 18px;
    font-size: 14.5px;
}

.burger {
    display: none;
    width: 42px;
    height: 42px;
    border-radius: 11px;
    border: 1.5px solid var(--line);
    background: #fff;
    place-items: center;
}

.burger i {
    display: block;
    width: 17px;
    height: 1.8px;
    background: var(--ink);
    box-shadow: 0 -5.5px 0 var(--ink), 0 5.5px 0 var(--ink);
}

/* ================= HERO ================= */
.hero-sec {
    position: relative;
    padding: 60px 0 84px;
    overflow: hidden;
    isolation: isolate;
}

/* =========================================================
   HERO BACKGROUND — Modern SaaS
   Lớp nền tách riêng khỏi nội dung để mask-image ở đáy chỉ
   làm mờ nền, không đụng tới chữ và form.
   ========================================================= */
.hero-bg {
    position: absolute;
    inset: 0;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
    background: var(--hero-base, #FBFAF8);

    /* (4) tan dần ở đáy để nối mịn xuống dải logo */
    -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 62%, rgba(0, 0, 0, .45) 84%, transparent 100%);
    mask-image: linear-gradient(to bottom, #000 0%, #000 62%, rgba(0, 0, 0, .45) 84%, transparent 100%);
}

/* (1) lưới ô vuông SVG 28px */
.hero-grid-pattern {
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='28' viewBox='0 0 28 28'%3E%3Cpath d='M28 0H0v28' fill='none' stroke='%2316103A' stroke-opacity='0.055' stroke-width='1'/%3E%3C/svg%3E");
    background-repeat: repeat;
    /* lưới nhạt dần ra rìa, tránh cảm giác dán một tấm giấy kẻ ô */
    -webkit-mask-image: radial-gradient(ellipse 78% 68% at 50% 38%, #000 35%, transparent 100%);
    mask-image: radial-gradient(ellipse 78% 68% at 50% 38%, #000 35%, transparent 100%);
}

/* (2) hai blob gradient so le hai bên */
.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    will-change: transform;
    transform: translate3d(0, 0, 0);
    backface-visibility: hidden;
}

.blob-violet {
    width: 40vw;
    height: 40vw;
    min-width: 380px;
    min-height: 380px;
    left: -10%;
    top: -12%;
    background: radial-gradient(circle at 50% 50%, rgba(124, 58, 237, .34), rgba(124, 58, 237, .10) 60%, transparent 72%);
    animation: floatA 24s cubic-bezier(.45, .05, .55, .95) infinite;
}

.blob-cyan {
    width: 34vw;
    height: 34vw;
    min-width: 320px;
    min-height: 320px;
    right: -8%;
    bottom: -16%;
    background: radial-gradient(circle at 50% 50%, rgba(6, 182, 212, .30), rgba(6, 182, 212, .09) 60%, transparent 72%);
    animation: floatB 30s cubic-bezier(.45, .05, .55, .95) infinite;
}

@keyframes floatA {
    0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
    33%      { transform: translate3d(5vw, 4vh, 0) scale(1.10); }
    66%      { transform: translate3d(2vw, -3vh, 0) scale(.95); }
}

@keyframes floatB {
    0%, 100% { transform: translate3d(0, 0, 0) scale(1.04); }
    50%      { transform: translate3d(-6vw, -5vh, 0) scale(.92); }
}

/* dừng khi hero khuất khỏi màn hình / đổi tab (JS gắn class) */
.hero-sec.off .blob { animation-play-state: paused; }

/* màn trắng rất nhẹ, KHÔNG dùng backdrop-filter để lưới không bị nhoè */
.hero-veil {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(255, 255, 255, .30) 0%, rgba(255, 255, 255, .10) 40%, rgba(255, 255, 255, .55) 100%);
}

/* --- khung hero mở rộng ra 2 mép --- */
.hero-sec .wrap {
    max-width: var(--maxw-wide);
    padding-inline: var(--gut);
}

.grid {
    position: relative;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: clamp(32px, 4vw, 72px);
    align-items: center;
}

/* --- vào trang: hai bên trượt vào giữa --- */
.slide-l {
    animation: slideL .85s cubic-bezier(.22, .85, .25, 1) both;
}

.slide-r {
    animation: slideR .85s cubic-bezier(.22, .85, .25, 1) .08s both;
}

@keyframes slideL {
    from { opacity: 0; transform: translateX(-56px); }
    to   { opacity: 1; transform: none; }
}

@keyframes slideR {
    from { opacity: 0; transform: translateX(56px); }
    to   { opacity: 1; transform: none; }
}

.hero h1 {
    font-size: clamp(34px, 4.9vw, 58px);
    margin: 14px 0 18px;
}

.hero h1 em {
    font-style: normal;
    color: var(--violet);
}

.hero > p {
    color: var(--muted);
    font-size: 16.5px;
    max-width: 54ch;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 28px 0 30px;
}

.trust {
    display: flex;
    gap: 34px;
    flex-wrap: wrap;
    padding-top: 24px;
    border-top: 1px solid var(--line);
}

.trust dt {
    font-family: var(--mono);
    font-size: 23px;
    font-weight: 700;
    letter-spacing: -.03em;
    font-variant-numeric: tabular-nums;
}

.trust dd {
    font-size: 13px;
    color: var(--muted);
    margin-top: 2px;
}

/* --- bảng chạy đơn (signature) --- */
.board {
    margin-top: 30px;
    background: var(--ink);
    color: #fff;
    border-radius: 18px;
    padding: 20px;
    box-shadow: 0 40px 80px -44px rgba(22, 16, 58, .85);
}

.board-top {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-bottom: 14px;
    border-bottom: 1px solid rgba(255, 255, 255, .1);
}

.board-top b {
    font-family: var(--display);
    font-size: 14px;
    font-weight: 700;
}

.board-top .tag {
    margin-left: auto;
    font-family: var(--mono);
    font-size: 10.5px;
    letter-spacing: .12em;
    color: rgba(255, 255, 255, .5);
}

.live-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--mint);
    box-shadow: 0 0 0 0 rgba(0, 184, 132, .55);
    animation: ping 2.4s infinite;
}

@keyframes ping {
    70% { box-shadow: 0 0 0 9px rgba(0, 184, 132, 0); }
    100% { box-shadow: 0 0 0 0 rgba(0, 184, 132, 0); }
}

.counter {
    padding: 18px 2px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, .1);
}

.counter .num {
    font-family: var(--mono);
    font-size: clamp(26px, 4vw, 34px);
    font-weight: 700;
    letter-spacing: -.03em;
    font-variant-numeric: tabular-nums;
}

.counter .lbl {
    font-size: 12.5px;
    color: rgba(255, 255, 255, .52);
    margin-top: 2px;
}

.rows {
    display: flex;
    flex-direction: column;
    gap: 13px;
    padding-top: 16px;
}

.row-head {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13.5px;
}

.row-head .id {
    font-family: var(--mono);
    font-size: 11px;
    color: rgba(255, 255, 255, .42);
}

.row-head .pct {
    margin-left: auto;
    font-family: var(--mono);
    font-size: 12px;
    font-variant-numeric: tabular-nums;
    color: rgba(255, 255, 255, .72);
}

.bar {
    height: 5px;
    border-radius: 99px;
    background: rgba(255, 255, 255, .12);
    margin-top: 8px;
    overflow: hidden;
}

.bar i {
    display: block;
    height: 100%;
    border-radius: 99px;
    background: var(--violet);
    transition: width .9s cubic-bezier(.3, .9, .3, 1);
}

.bar.done i {
    background: var(--mint);
}

/* ================= AUTH CARD ================= */
.card {
    position: relative;
    width: 100%;
    max-width: 460px;
    margin-inline: auto;
    border-radius: 18px;

    /* (3) Glassmorphism: bg-white/80 + border-gray-200/60 + backdrop-blur-md + shadow-xl */
    background: rgba(255, 255, 255, .80);
    border: 1px solid rgba(229, 231, 235, .60);
    -webkit-backdrop-filter: blur(12px) saturate(140%);
    backdrop-filter: blur(12px) saturate(140%);
    box-shadow:
        0 20px 25px -5px rgba(16, 10, 48, .10),
        0 8px 10px -6px rgba(16, 10, 48, .10);
}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
    .card { background: #fff; border-color: var(--line); }
}

/* quầng sáng thở nhẹ — animate opacity/transform nên chạy trên compositor */
.card::before {
    content: "";
    position: absolute;
    inset: -22%;
    z-index: -1;
    border-radius: inherit;
    background: radial-gradient(closest-side, rgba(139, 92, 246, .22), rgba(139, 92, 246, 0) 72%);
    will-change: opacity, transform;
    animation: breathe 9s ease-in-out 1.1s infinite;
}

.card.slide-r {
    animation: slideR .85s cubic-bezier(.22, .85, .25, 1) .08s both;
}

@keyframes breathe {
    0%, 100% { opacity: .45; transform: scale(.94); }
    50%      { opacity: 1;   transform: scale(1.06); }
}

.card .foot {
    border-radius: 0 0 17px 17px;
}

.card-head {
    padding: 16px 18px 0;
}

.tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
    padding: 4px;
    background: var(--violet-soft);
    border-radius: 12px;
}

.tab {
    height: 38px;
    border-radius: 9px;
    font-size: 14px;
    font-weight: 600;
    color: var(--muted);
    transition: background .16s ease, color .16s ease;
}

.tab.active {
    background: #fff;
    color: var(--ink);
    box-shadow: 0 2px 8px rgba(35, 18, 92, .10);
}

.card-body {
    padding: 20px 18px 4px;
}

.title h2 {
    font-size: 21px;
}

.title p {
    font-size: 13.5px;
    color: var(--muted);
    margin-top: 4px;
}

.form-pane {
    display: none;
}

.form-pane.active {
    display: block;
    animation: fadeIn .22s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: none; }
}

.form {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-top: 18px;
}

.field label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 6px;
}

.field .hint {
    font-weight: 500;
    color: var(--muted);
    font-size: 11px;
}

.input {
    position: relative;
}

.input input,
.input select {
    width: 100%;
    height: 46px;
    padding: 0 14px;
    border: 1.5px solid var(--line);
    border-radius: 11px;
    background: #fff;
    color: var(--ink);
    font-size: 15px;
    outline: 0;
    transition: border-color .16s ease, box-shadow .16s ease;
}

.input input::placeholder {
    color: #A49DC7;
}

.input input:focus,
.input select:focus {
    border-color: var(--violet);
    box-shadow: 0 0 0 4px rgba(109, 40, 255, .12);
}

.input select {
    appearance: none;
    padding-right: 40px;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 14 14' fill='none'><path d='M3 5.5L7 9.5L11 5.5' stroke='%236B6494' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/></svg>");
    background-repeat: no-repeat;
    background-position: right 14px center;
}

.input select:disabled {
    background-color: #F7F5FF;
    color: #A49DC7;
}

.eye {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    border-radius: 9px;
    display: grid;
    place-items: center;
    font-size: 15px;
    line-height: 1;
    color: var(--muted);
}

.eye:hover {
    background: var(--violet-soft);
}

.err {
    display: none;
    font-size: 12.5px;
    color: var(--danger);
    margin-top: 6px;
    font-weight: 600;
}

.field.invalid .err {
    display: block;
}

.field.invalid .input input,
.field.invalid .input select {
    border-color: rgba(239, 68, 68, .65);
    box-shadow: 0 0 0 4px rgba(239, 68, 68, .10);
}

.form .row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.form .btn-ghost {
    margin-top: -4px;
}

.foot {
    padding: 16px 18px;
    margin-top: 18px;
    border-top: 1px solid var(--line);
    background: #FCFBFF;
    font-size: 12.5px;
    color: var(--muted);
}

/* ================= PLATFORM STRIP ================= */
.strip {
    background: #fff;
    border-block: 1px solid var(--line);
}

.strip .inner {
    max-width: var(--maxw);
    margin-inline: auto;
    padding: 18px 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 28px;
    flex-wrap: wrap;
}

.strip p {
    font-family: var(--mono);
    font-size: 11px;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--muted);
}

.strip ul {
    display: flex;
    gap: 26px;
    flex-wrap: wrap;
    list-style: none;
    font-family: var(--display);
    font-weight: 700;
    font-stretch: 106%;
    font-size: 16.5px;
    opacity: .72;
}

/* ================= SECTIONS ================= */
.sec {
    padding: 84px 0;
}

.sec-alt {
    background: #fff;
    border-block: 1px solid var(--line);
}

.sec-dark {
    background: var(--ink);
    color: #fff;
}

.sec-dark .lead {
    color: rgba(255, 255, 255, .62);
}

.sec-dark .eyebrow {
    color: #B49BFF;
}

.sec-head {
    max-width: 62ch;
    margin-bottom: 42px;
}

.sec-head h2 {
    font-size: clamp(27px, 3.5vw, 41px);
    margin: 12px 0 14px;
}

/* --- dịch vụ --- */
.svc {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(16px, 1.6vw, 22px);
    align-items: stretch;
}

.scard {
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--r);
    padding: 22px;
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.scard:hover {
    transform: translateY(-4px);
    border-color: #CBB8FF;
    box-shadow: var(--shadow);
}

.scard h3 {
    font-size: 18px;
    margin-bottom: 6px;
}

.scard p {
    font-size: 14px;
    color: var(--muted);
}

.scard-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 12px;
}

.plat {
    font-family: var(--mono);
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--violet);
    background: var(--violet-soft);
    padding: 4px 9px;
    border-radius: 6px;
}

.price {
    font-family: var(--mono);
    font-size: 15px;
    font-weight: 700;
    white-space: nowrap;
}

.price small {
    font-weight: 400;
    font-size: 11.5px;
    color: var(--muted);
}

.meta {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    margin-top: auto;
    padding-top: 16px;
    padding-top: 14px;
    border-top: 1px dashed var(--line);
    font-family: var(--mono);
    font-size: 11.5px;
    color: var(--muted);
}

.meta b {
    color: var(--ink);
    font-weight: 700;
}

/* --- quy trình --- */
.steps {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: clamp(18px, 2.4vw, 32px);
}

.step {
    /* v45.19: the reference skin turns these into full cards, so keep real
       inner spacing on every side instead of the legacy top-only padding. */
    padding: 22px 22px 20px;
    border-top: 2px solid var(--ink);
    transition: border-color .2s ease;
    box-sizing: border-box;
}

.step:hover {
    border-top-color: var(--violet);
}

.step .n {
    font-family: var(--mono);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .1em;
    color: var(--violet);
}

.step h3 {
    font-size: 17.5px;
    margin: 12px 0 8px;
}

.step p {
    font-size: 14px;
    color: var(--muted);
}

/* --- API --- */
.api-grid {
    display: grid;
    grid-template-columns: 1fr 1.08fr;
    gap: 46px;
    align-items: center;
}

.api-grid h2 {
    font-size: clamp(27px, 3.5vw, 41px);
    margin: 12px 0 14px;
}

.api-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 13px;
    margin-top: 24px;
}

.api-list li {
    display: flex;
    gap: 12px;
    font-size: 15px;
    color: rgba(255, 255, 255, .8);
}

.api-list svg {
    flex-shrink: 0;
    margin-top: 5px;
}

.code {
    background: #0E0927;
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 16px;
    overflow: hidden;
    font-family: var(--mono);
    font-size: 13px;
    line-height: 1.75;
}

.code-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, .1);
    font-size: 11px;
    letter-spacing: .06em;
    color: rgba(255, 255, 255, .45);
}

.code-bar i {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .18);
}

.code pre {
    padding: 18px 16px;
    overflow-x: auto;
    color: rgba(255, 255, 255, .82);
}

.code .k { color: #B49BFF; }
.code .s { color: #4EE0AF; }
.code .v { color: #FFC06B; }
.code .c { color: rgba(255, 255, 255, .34); }

/* --- đại lý --- */
.tiers {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(16px, 1.6vw, 22px);
    align-items: stretch;
}

.tier {
    transition: transform .18s ease, box-shadow .18s ease;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--r);
    padding: 26px;
    display: flex;
    flex-direction: column;
}

.tier:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
}

.tier.hi {
    border: 2px solid var(--violet);
    box-shadow: var(--shadow);
    position: relative;
}

.tier-badge {
    position: absolute;
    top: -11px;
    right: 22px;
    background: var(--violet);
    color: #fff;
    font-family: var(--mono);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    padding: 4px 10px;
    border-radius: 6px;
}

.tier h3 {
    font-size: 20px;
}

.tier .amt {
    font-family: var(--mono);
    font-size: 29px;
    font-weight: 700;
    letter-spacing: -.03em;
    margin: 14px 0 4px;
}

.tier .amt small {
    font-size: 13px;
    font-weight: 400;
    color: var(--muted);
}

.tier ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 20px 0 24px;
    font-size: 14.5px;
    color: var(--muted);
}

.tier li::before {
    content: "—";
    color: var(--violet);
    font-weight: 700;
    margin-right: 8px;
}

.tier .btn {
    width: 100%;
    margin-top: auto;
}

/* ================= LOCAL LANGUAGE SWITCHER ================= */
.login-i18n {
    line-height: 1;
}

/* --- FAQ --- */
.faq {
    max-width: 820px;
}

.faq details {
    border-bottom: 1px solid var(--line);
}

.faq summary {
    list-style: none;
    cursor: pointer;
    position: relative;
    padding: 20px 40px 20px 0;
    font-family: var(--display);
    font-weight: 700;
    font-stretch: 108%;
    font-size: 17.5px;
}

.faq summary::-webkit-details-marker {
    display: none;
}

.faq summary::after {
    content: "+";
    position: absolute;
    right: 6px;
    top: 16px;
    font-family: var(--mono);
    font-size: 22px;
    color: var(--violet);
    transition: transform .2s ease;
}

.faq details[open] summary::after {
    transform: rotate(45deg);
}

.faq details p {
    padding: 0 40px 20px 0;
    font-size: 15px;
    color: var(--muted);
}

/* --- CTA cuối --- */
.final {
    background: linear-gradient(135deg, var(--primary1), var(--primary2) 55%, var(--violet-dark));
    color: #fff;
    border-radius: 24px;
    padding: 58px 44px;
    text-align: center;
}

.final h2 {
    font-size: clamp(27px, 3.9vw, 43px);
    margin-bottom: 14px;
}

.final p {
    color: rgba(255, 255, 255, .84);
    max-width: 52ch;
    margin: 0 auto 28px;
}

.final .cta-row {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.final .btn-primary {
    background: #fff;
    color: var(--violet);
    box-shadow: none;
}

.final .btn-primary:hover {
    background: #F3EEFF;
}

/* ================= FOOTER ================= */
.site-foot {
    padding: 58px 0 32px;
    border-top: 1px solid var(--line);
}

.foot-grid {
    display: grid;
    grid-template-columns: 1.5fr repeat(3, 1fr);
    gap: 34px;
}

.foot-grid h4 {
    font-family: var(--mono);
    font-size: 11px;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 14px;
}

.foot-grid ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 9px;
    font-size: 14.5px;
    color: var(--muted);
}

.foot-grid ul a:hover {
    color: var(--violet);
}

.foot-note {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-top: 42px;
    padding-top: 22px;
    border-top: 1px solid var(--line);
    font-size: 13px;
    color: var(--muted);
}

/* ================= OVERLAY (giữ hành vi cũ) ================= */
.overlay {
    position: fixed;
    inset: 0;
    background: rgba(22, 16, 58, .22);
    backdrop-filter: blur(2px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.overlay.show {
    display: flex;
}

.overlay-card {
    background: rgba(255, 255, 255, .95);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
    border-radius: 16px;
    padding: 16px 20px;
    min-width: 220px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.overlay-card b {
    font-size: 14px;
}

.overlay-card .dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--violet);
    animation: pulse 1s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: .35; transform: scale(.7); }
}

/* ================= TOAST (giữ cấu trúc cũ) ================= */
.toast {
    position: fixed;
    top: 16px;
    right: 16px;
    z-index: 10000;
    display: grid;
    gap: 10px;
    width: min(360px, calc(100vw - 32px));
}

.toast .item {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 14px;
    box-shadow: var(--shadow2);
    padding: 12px;
    display: flex;
    gap: 10px;
    align-items: flex-start;
    animation: toastIn .18s ease;
}

.toast .badge {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-top: 5px;
    flex-shrink: 0;
    background: var(--mint);
}

.toast .item.err .badge {
    background: var(--danger);
}

.toast .item b {
    display: block;
    font-size: 13px;
}

.toast .item span {
    display: block;
    font-size: 12.5px;
    color: var(--muted);
    margin-top: 2px;
    line-height: 1.5;
}

@keyframes toastIn {
    from { opacity: 0; transform: translateX(12px); }
    to { opacity: 1; transform: none; }
}

/* ================= REVEAL ================= */
.rv {
    opacity: 0;
    transform: translateY(22px);
    transition: opacity .6s ease, transform .6s ease;
}

.rv.in {
    opacity: 1;
    transform: none;
}

/* ================= RESPONSIVE ================= */
@media (max-width: 1080px) {
    .nav-links { display: none; }
    .pill input { width: 110px; }
}

@media (max-width: 980px) {
    .grid { grid-template-columns: 1fr; gap: 44px; justify-items: center; }
    .hero { max-width: 620px; }
    .api-grid { grid-template-columns: 1fr; gap: 40px; }
    .svc, .tiers { grid-template-columns: 1fr 1fr; }
    .steps { grid-template-columns: 1fr 1fr; }
    .foot-grid { grid-template-columns: 1fr 1fr; }
    .pill, .top-actions .btn-ghost { display: none; }
}

@media (max-width: 720px) {
    .slide-l, .slide-r {
        animation-name: fadeUp;
        animation-delay: 0s;
    }

    @keyframes fadeUp {
        from { opacity: 0; transform: translateY(20px); }
        to   { opacity: 1; transform: none; }
    }

    /* blur 80px trên màn nhỏ tốn hơn nhiều so với diện tích hiển thị */
    .blob { filter: blur(56px); }
    .hero-grid-pattern { opacity: .7; }}

@media (max-width: 640px) {
    html { scroll-padding-top: 76px; }
    .sec { padding: 60px 0; }
    .hero-sec { padding: 44px 0 64px; }
    .svc, .tiers, .steps, .foot-grid { grid-template-columns: 1fr; }
    .final { padding: 42px 20px; border-radius: 18px; }
    .trust { gap: 22px; }
    .hero-actions .btn { width: 100%; }
    .card { max-width: 460px; }
    .burger { display: grid; }
    .brand .t span { display: none; }
}

/* menu mobile */
@media (max-width: 1080px) {
    .topbar.open .nav-links {
        display: flex;
        flex-direction: column;
        gap: 0;
        position: absolute;
        left: 0;
        right: 0;
        top: 70px;
        margin: 0;
        padding: 8px 22px 16px;
        background: #fff;
        border-bottom: 1px solid var(--line);
        box-shadow: var(--shadow2);
    }

    .topbar.open .nav-links a {
        padding: 13px 0;
        border-bottom: 1px solid var(--line);
        color: var(--ink);
        font-weight: 600;
    }

    .topbar.open .nav-links a:last-child {
        border-bottom: 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: .001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .001ms !important;
    }
    html { scroll-behavior: auto; }
    .rv { opacity: 1; transform: none; }
}