/* ==========================================================================
   Trang chủ — chỉ nạp ở trang này nên không làm nặng phần ứng dụng.
   ========================================================================== */

.landing { padding: 0 0 0; max-width: 100%; }
.landing .container { width: min(1240px, 100% - 2.5rem); margin-inline: auto; }

.btn-lg { padding: .7rem 1.3rem; font-size: 1rem; border-radius: 11px; }

.pill {
  display: inline-block; padding: .3rem .8rem; border-radius: 999px;
  background: var(--ok-soft); color: #14532d; border: 1px solid #cdeed9;
  font-size: .82rem; font-weight: 650;
}

/* ------------------------------------------------------------------- hero */
.hero-wrap {
  background:
    radial-gradient(1100px 460px at 12% -10%, #e5edff 0%, transparent 60%),
    radial-gradient(900px 420px at 92% 0%, #e2f6f2 0%, transparent 55%),
    linear-gradient(180deg, #fbfcfe 0%, var(--bg) 100%);
  border-bottom: 1px solid var(--line);
  padding: 2.6rem 0 3rem;
}
.hero-grid { display: grid; grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
             gap: 2.4rem; align-items: center; }
@media (max-width: 980px) { .hero-grid { grid-template-columns: 1fr; gap: 1.6rem; } }

.hero-text h1 { font-size: clamp(1.9rem, 3.6vw, 2.9rem); line-height: 1.15;
                margin: .9rem 0 .7rem; letter-spacing: -0.015em; }
.hero-text h1 em { font-style: normal; color: var(--brand);
                   background: linear-gradient(180deg, transparent 62%, #cfe0ff 62%); }
.hero-text .lead { font-size: 1.06rem; color: var(--ink-soft); max-width: 54ch;
                   line-height: 1.65; }
.hero-cta { display: flex; gap: .7rem; flex-wrap: wrap; margin-top: 1.3rem; }

/* khung trình duyệt giả bao quanh ảnh thật */
.frame { background: var(--surface); border: 1px solid var(--line-strong);
         border-radius: 14px; overflow: hidden; box-shadow: 0 18px 50px rgba(16,34,46,.14); }
.frame-bar { display: flex; align-items: center; gap: .4rem; padding: .5rem .8rem;
             background: linear-gradient(180deg, #fafbfd, #f1f4f8);
             border-bottom: 1px solid var(--line); }
.frame-bar .dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.frame-bar .dot.red { background: #f0736a; }
.frame-bar .dot.amber { background: #f3c04c; }
.frame-bar .dot.green { background: #64c47a; }
.frame-title { margin-left: .5rem; font-size: .78rem; color: var(--muted); font-weight: 600;
               white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.frame-metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: .1rem;
                 border-bottom: 1px solid var(--line); background: var(--surface-2); }
.frame-metrics > div { padding: .55rem .8rem; display: flex; flex-direction: column;
                       border-right: 1px solid var(--line); }
.frame-metrics > div:last-child { border-right: none; }
.frame-metrics .k { font-size: .68rem; text-transform: uppercase; letter-spacing: .04em;
                    color: var(--muted); }
.frame-metrics .v { font-size: .98rem; font-weight: 700; color: var(--ink); }
.frame-canvas { padding: .6rem; overflow: hidden; background: #fff; }
/* Vừa khung: dùng cho sơ đồ gọn, đọc được nguyên vẹn */
.frame-canvas svg { display: block; width: 100%; height: auto; max-height: 340px; }

/* Cắt viền: sơ đồ lớn giữ đúng cỡ thật cho chữ đọc được, phần thừa cắt đi và
   mờ dần ở mép phải — trông như đang nhìn vào cửa sổ ứng dụng thật. */
.frame-canvas.crop { position: relative; height: 300px; padding: 0; }
.frame-canvas.crop svg { width: auto; max-width: none; height: auto;
                         transform: scale(.82); transform-origin: 4px 0; }
.frame-canvas.crop::after {
  content: ""; position: absolute; top: 0; right: 0; bottom: 0; width: 84px;
  background: linear-gradient(90deg, rgba(255,255,255,0), #fff 78%); pointer-events: none;
}
.frame-canvas.crop::before {
  content: "kéo để xem tiếp →"; position: absolute; right: .7rem; bottom: .5rem; z-index: 2;
  font-size: .7rem; color: var(--muted); background: rgba(255,255,255,.92);
  padding: .12rem .5rem; border-radius: 999px; border: 1px solid var(--line);
}
.hero-figure { margin: 0; }
.hero-figure figcaption { margin-top: .6rem; line-height: 1.5; }

/* ------------------------------------------------------------- dải chung */
.band { padding: 3rem 0 1rem; }
.band-title { font-size: clamp(1.3rem, 2.2vw, 1.75rem); text-align: center;
              margin-bottom: .4rem; }
.band-sub { text-align: center; margin-bottom: 1.6rem; }
.band > .band-title + .number-grid, .band > .band-title + .usecase-grid,
.band > .band-title + .sample-grid { margin-top: 1.6rem; }

/* -------------------------------------------------------------- ba con số */
.number-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(258px, 1fr));
               gap: 1rem; }
.number-card { background: var(--surface); border: 1px solid var(--line);
               border-radius: var(--radius-lg); padding: 1.2rem; box-shadow: var(--shadow);
               display: flex; flex-direction: column; gap: .35rem; }
.number-card.accent { border-color: #bfd3fb;
                      background: linear-gradient(180deg, #fbfcff, #f2f6ff); }
.number-label { font-size: .78rem; text-transform: uppercase; letter-spacing: .04em;
                color: var(--muted); font-weight: 650; }
.number-value { font-size: 1.7rem; font-weight: 750; line-height: 1.15; color: var(--ink); }
.number-hint { font-size: .86rem; color: var(--ink-soft); line-height: 1.55; }

/* ------------------------------------------------------------ hàng tính năng */
.feature-row { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
               gap: 2.4rem; align-items: center; padding: 3rem 0; }
.feature-row.reverse .feature-copy { order: 2; }
.feature-row.reverse .feature-visual { order: 1; }
@media (max-width: 980px) {
  .feature-row { grid-template-columns: 1fr; gap: 1.4rem; padding: 2rem 0; }
  .feature-row.reverse .feature-copy { order: 1; }
  .feature-row.reverse .feature-visual { order: 2; }
}
.feature-band { background: var(--surface); border-block: 1px solid var(--line); }
.step-badge { display: inline-grid; place-items: center; width: 34px; height: 34px;
              border-radius: 10px; background: var(--brand); color: #fff;
              font-weight: 750; font-size: .86rem; margin-bottom: .7rem; }
.feature-copy h2 { font-size: clamp(1.2rem, 2vw, 1.6rem); margin-bottom: .5rem; }
.feature-copy p { color: var(--ink-soft); line-height: 1.7; }
.check-list { list-style: none; padding: 0; margin: .9rem 0; }
.check-list li { position: relative; padding-left: 1.6rem; margin-bottom: .45rem;
                 color: var(--ink-soft); }
.check-list li::before { content: "✓"; position: absolute; left: 0; top: 0;
                         color: var(--ok); font-weight: 800; }
.link-arrow { display: inline-block; margin-top: .6rem; font-weight: 600; }

/* ------------------------------------------------------ bảng bước minh hoạ */
.mock-table { font-size: .82rem; }
.mock-head, .mock-row { display: grid; grid-template-columns: 2.1fr 1fr .6fr 1fr;
                        gap: .5rem; padding: .5rem .8rem; align-items: center; }
.mock-head { background: var(--surface-2); color: var(--muted); font-size: .7rem;
             text-transform: uppercase; letter-spacing: .04em; font-weight: 700;
             border-bottom: 1px solid var(--line); }
.mock-row { border-bottom: 1px solid #f1f5f9; }
.mock-row span:not(:first-child) { text-align: right; font-variant-numeric: tabular-nums; }
.mock-row.editing { background: #fffdf3; }
.mock-row.editing .typing { display: inline-block; padding: .1rem .45rem; border-radius: 5px;
                            background: #fff; border: 1.5px solid var(--brand);
                            font-weight: 700; color: var(--brand-dark); }
.mock-foot { display: flex; align-items: center; gap: .6rem; padding: .6rem .8rem;
             background: var(--surface-2); border-top: 1px solid var(--line); }
.mock-save { background: var(--brand); color: #fff; padding: .3rem .7rem; border-radius: 7px;
             font-size: .8rem; font-weight: 650; }
.mock-state { font-size: .8rem; color: var(--warn); }

/* ------------------------------------------------------------- rework chip */
.rework-chips { display: flex; gap: .45rem; flex-wrap: wrap; margin: .8rem 0 .5rem; }
.rework-chip { background: var(--warn-soft); border: 1px solid #f0d9a8; color: #7c2d12;
               border-radius: 999px; padding: .22rem .7rem; font-size: .84rem; }

/* ------------------------------------------------------------------- SLA */
.sla-row { display: flex; gap: .7rem; flex-wrap: wrap; margin: 1rem 0 .3rem; }
.sla-row > div { flex: 1; min-width: 150px; border: 1px solid var(--line);
                 border-radius: var(--radius); padding: .7rem .9rem; background: var(--surface);
                 display: flex; flex-direction: column; }
.sla-row .highlight { border-color: #bfd3fb; background: var(--brand-soft); }
.sla-row .k { font-size: .74rem; text-transform: uppercase; letter-spacing: .04em;
              color: var(--muted); }
.sla-row .v { font-size: 1.2rem; font-weight: 720; }

.chart-pad { padding: 1rem .9rem .8rem; }
.bars.tall { height: 190px; }

/* -------------------------------------------------------------- công thức */
.formula-band { background: linear-gradient(180deg, #101c2c, #16273c); color: #e6edf6;
                padding: 3rem 0; margin-top: 2rem; }
.formula-head { text-align: center; max-width: 62ch; margin: 0 auto 1.8rem; }
.formula-band h2 { color: #fff; font-size: clamp(1.3rem, 2.2vw, 1.75rem); }
.formula-band .lead { color: #a9bad0; }
.formula-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(238px, 1fr));
                 gap: .9rem; }
.fcard { background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .12);
         border-radius: var(--radius); padding: 1rem; display: flex; flex-direction: column;
         gap: .5rem; }
.fcard code { font-family: "Cambria Math", Cambria, Georgia, serif; font-size: 1.1rem;
              color: #8fb6ff; font-style: italic; }
.fcard span { font-size: .86rem; color: #b9c7d9; line-height: 1.55; }
.formula-band .btn { background: #fff; border-color: #fff; color: #16273c; font-weight: 650; }
.formula-band .btn:hover { background: #e8eefb; }

/* -------------------------------------------------------------- use case */
.usecase-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
                gap: 1rem; }
.usecase { background: var(--surface); border: 1px solid var(--line);
           border-radius: var(--radius-lg); padding: 1.1rem; }
.usecase-icon { font-size: 1.5rem; }
.usecase h3 { font-size: 1rem; margin: .5rem 0 .35rem; }
.usecase p { font-size: .88rem; color: var(--ink-soft); line-height: 1.6; margin: 0; }

/* -------------------------------------------------------------- mẫu sẵn */
.sample-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(268px, 1fr));
               gap: 1rem; }
.sample-card { background: var(--surface); border: 1px solid var(--line);
               border-radius: var(--radius-lg); padding: 1.1rem; }
.sample-card h3 { font-size: .98rem; margin-bottom: .35rem; }
.sample-stats { display: flex; gap: .9rem; flex-wrap: wrap; margin-top: .7rem;
                padding-top: .7rem; border-top: 1px solid var(--line); font-size: .82rem;
                color: var(--muted); }
.sample-stats strong { color: var(--ink); }

/* ------------------------------------------------------------------- CTA */
.cta-band { background: linear-gradient(135deg, var(--brand), #1e40af); color: #fff;
            padding: 3.2rem 0; margin-top: 2.5rem; }
.cta-band h2 { color: #fff; font-size: clamp(1.3rem, 2.4vw, 1.9rem); }
.cta-band .lead { color: #d8e3fb; margin-bottom: 1.3rem; }
.cta-band .btn-primary { background: #fff; border-color: #fff; color: var(--brand-dark); }
.cta-band .btn-primary:hover { background: #eef3ff; border-color: #eef3ff; }
.cta-band a { color: #fff; text-decoration: underline; }
