/* Scala PDF — landing page. Bảng màu lấy từ logo: cam #FF8A3D → đỏ #E02F55, kem #FFD9BF, tím than #2B1B3D. */
:root {
  --orange: #ff8a3d;
  --red: #e02f55;
  --peach: #ffd9bf;
  --peach-2: #ffc2a0;
  --ink: #2b1b3d;
  --ink-2: #5e4f6e;
  --ink-3: #8f839b;
  --paper: #ffffff;
  --warm: #fff6ef;
  --line: #efe3da;
  --grad: linear-gradient(135deg, var(--orange), var(--red));
  --radius: 14px;
  --font: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --max: 1120px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--red); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 3px; border-radius: 4px; }

h1, h2, h3 { line-height: 1.15; margin: 0; font-weight: 700; letter-spacing: -0.015em; }
h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); letter-spacing: -0.03em; }
h2 { font-size: clamp(1.7rem, 3.2vw, 2.4rem); }
h3 { font-size: 1.35rem; }
p { margin: 0 0 1rem; max-width: 62ch; }
.muted { color: var(--ink-2); }

.wrap { width: min(var(--max), 100% - 32px); margin-inline: auto; }
section { padding: clamp(56px, 9vw, 112px) 0; }
section + section { border-top: 1px solid var(--line); }
.lead { font-size: 1.2rem; color: var(--ink-2); }

/* Nút */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 22px; border-radius: 999px; font-weight: 700; font-size: 1.02rem;
  text-decoration: none; border: 0; cursor: pointer; line-height: 1.2;
}
.btn:hover { text-decoration: none; }
.btn-primary { color: #fff; background: var(--grad); box-shadow: 0 10px 28px -12px rgba(224, 47, 85, 0.6); }
.btn-primary:hover { filter: brightness(1.05); }
.btn-ghost { color: var(--ink); background: var(--paper); border: 1.5px solid var(--line); }
.btn-ghost:hover { border-color: var(--peach-2); background: var(--warm); }
.btn svg { width: 20px; height: 20px; flex: none; }

/* Header */
.top {
  position: sticky; top: 0; z-index: 20;
  background: rgba(255, 255, 255, 0.9); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.top .wrap { display: flex; align-items: center; gap: 24px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; color: var(--ink); font-size: 1.1rem; }
.brand img { width: 32px; height: 32px; }
.top nav { margin-left: auto; display: flex; align-items: center; gap: 22px; font-weight: 600; font-size: 0.95rem; }
.top nav a { color: var(--ink-2); }
.top nav a:hover { color: var(--ink); text-decoration: none; }
.lang { border: 1.5px solid var(--line); border-radius: 999px; padding: 5px 12px; color: var(--ink) !important; font-size: 0.85rem; }
.top nav .btn-primary { padding: 9px 16px; font-size: 0.92rem; color: #fff; }
@media (max-width: 760px) { .top nav a:not(.lang):not(.btn) { display: none; } }

/* Hero */
.hero { padding-top: clamp(40px, 7vw, 88px); background: radial-gradient(900px 500px at 85% -10%, var(--peach) 0%, transparent 60%); }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(28px, 5vw, 64px); align-items: center; }
.hero h1 { margin-bottom: 18px; }
.hero h1 span { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero .lead { margin-bottom: 28px; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.cta-meta { margin-top: 14px; font-size: 0.92rem; color: var(--ink-3); }
.cta-meta b { color: var(--ink-2); font-weight: 600; }
@media (max-width: 900px) { .hero .wrap { grid-template-columns: minmax(0, 1fr); } }

/* Khung ảnh chụp: viền gradient mảnh theo màu logo */
.shot { position: relative; border-radius: var(--radius); padding: 1.5px; background: var(--grad); box-shadow: 0 30px 60px -30px rgba(43, 27, 61, 0.45); }
.shot img { border-radius: calc(var(--radius) - 1.5px); background: #fff; }
.shot-plain { border-radius: var(--radius); border: 1px solid var(--line); overflow: hidden; box-shadow: 0 24px 48px -32px rgba(43, 27, 61, 0.4); }
.shot-plain img { background: #fff; }

/* Dải tính năng: thanh bên trái mô phỏng sidebar của app */
.features .wrap { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: clamp(28px, 5vw, 72px); align-items: start; }
.rail { position: sticky; top: 88px; display: flex; flex-direction: column; gap: 4px; padding: 10px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--warm); }
.rail a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; color: var(--ink-2); font-weight: 600; font-size: 0.98rem; }
.rail a:hover { text-decoration: none; color: var(--ink); background: #fff; }
.rail a.active { color: var(--red); background: #fff; box-shadow: 0 1px 2px rgba(43, 27, 61, 0.08); }
.rail a svg { width: 20px; height: 20px; flex: none; }
.rail hr { border: 0; border-top: 1px solid var(--line); margin: 6px 4px; }
.feature { padding: 36px 0; scroll-margin-top: 88px; }
.feature + .feature { border-top: 1px solid var(--line); }
.feature h3 { font-size: 1.6rem; margin-bottom: 10px; }
.feature .shot-plain { margin-top: 22px; }
.feature ul { padding-left: 1.2em; margin: 0 0 8px; color: var(--ink-2); max-width: 62ch; }
.feature li { margin-bottom: 6px; }
.tag { display: inline-block; font-size: 0.78rem; font-weight: 700; color: var(--red); background: var(--peach); padding: 3px 10px; border-radius: 999px; vertical-align: middle; margin-left: 8px; }
@media (max-width: 900px) {
  .features .wrap { grid-template-columns: minmax(0, 1fr); }
  .rail { min-width: 0; }
  .rail { position: static; flex-direction: row; overflow-x: auto; gap: 6px; }
  .rail hr { display: none; }
  .rail a { white-space: nowrap; padding: 8px 12px; }
}

/* Sửa chữ: hai cột */
.edit-deep { background: var(--warm); }
.edit-deep .cols { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; margin-top: 32px; }
.edit-deep h4 { margin: 0 0 8px; font-size: 1.05rem; }
.edit-deep ul { padding-left: 1.2em; margin: 0; color: var(--ink-2); }
.edit-deep li { margin-bottom: 8px; }
@media (max-width: 760px) { .edit-deep .cols { grid-template-columns: 1fr; } }

/* Vì sao */
.why-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 28px 40px; margin-top: 32px; }
.why-grid h3 { font-size: 1.15rem; margin-bottom: 6px; display: flex; align-items: center; gap: 10px; }
.why-grid h3 svg { width: 22px; height: 22px; color: var(--red); flex: none; }
.why-grid p { color: var(--ink-2); margin: 0; }
@media (max-width: 700px) { .why-grid { grid-template-columns: 1fr; } }

/* Tải về */
.download { background: var(--ink); color: #fff; }
.download h2, .download h3 { color: #fff; }
.download .lead, .download p, .download li { color: #d8cfe2; }
.download .wrap { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: 48px; align-items: start; }
.download .cta { margin: 24px 0 12px; }
.download .btn-ghost { background: transparent; color: #fff; border-color: #5b4a6b; }
.download .btn-ghost:hover { background: rgba(255, 255, 255, 0.06); }
.download .cta-meta { color: #a99bb8; }
.download .cta-meta b { color: #fff; }
.spec { border: 1px solid #4a3a5c; border-radius: var(--radius); padding: 22px 24px; }
.spec dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 10px 18px; font-size: 0.95rem; }
.spec dt { color: #a99bb8; }
.spec dd { margin: 0; color: #fff; }
.note { margin-top: 20px; padding: 14px 16px; border-radius: 10px; background: rgba(255, 138, 61, 0.12); border: 1px solid rgba(255, 138, 61, 0.35); font-size: 0.93rem; }
.note b { color: var(--peach); }
@media (max-width: 860px) { .download .wrap { grid-template-columns: 1fr; } }

/* FAQ */
.faq details { border-top: 1px solid var(--line); padding: 16px 0; }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; font-weight: 700; font-size: 1.05rem; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; color: var(--red); font-size: 1.4rem; line-height: 1; flex: none; }
.faq details[open] summary::after { content: '−'; }
.faq details p { margin: 12px 0 0; color: var(--ink-2); max-width: 70ch; }
.faq .wrap { max-width: 820px; }

/* Footer */
footer { padding: 36px 0; font-size: 0.92rem; color: var(--ink-3); border-top: 1px solid var(--line); }
footer .wrap { display: flex; flex-wrap: wrap; gap: 12px 28px; align-items: center; }
footer a { color: var(--ink-2); }
footer .brand { font-size: 1rem; }
footer .brand img { width: 24px; height: 24px; }

/* Logo header: chạy một lần lúc mở trang, cùng trình tự với video intro (landing/video/intro.html) */
.brand .logo-anim { overflow: visible; }
.brand .a { transform-box: fill-box; transform-origin: center; }
.brand .back  { animation: hl-back .45s cubic-bezier(.2,.9,.3,1) .1s both; }
.brand .front { animation: hl-front .5s cubic-bezier(.25,1.35,.45,1) .2s both; }
.brand .s     { animation: hl-draw .4s cubic-bezier(.4,0,.2,1) .48s both; }
.brand .dot   { animation: hl-pop .22s cubic-bezier(.3,1.6,.5,1) .76s both; }
.brand .beam  { animation: hl-beam .22s cubic-bezier(.3,1.4,.5,1) .82s both; }
@keyframes hl-back  { from { opacity: 0; transform: translate(-4px, 3px) rotate(-22deg) scale(.86) } to { opacity: 1; transform: none } }
@keyframes hl-front { from { opacity: 0; transform: translateY(6px) scale(.72) } to { opacity: 1; transform: none } }
@keyframes hl-draw  { from { stroke-dashoffset: 1.08 } to { stroke-dashoffset: 0 } }
@keyframes hl-pop   { from { opacity: 0; transform: scale(0) } to { opacity: 1; transform: scale(1) } }
@keyframes hl-beam  { from { opacity: 0; transform: scaleY(0) } to { opacity: 1; transform: scaleY(1) } }
@media (prefers-reduced-motion: reduce) { .brand .back, .brand .front, .brand .s, .brand .dot, .brand .beam { animation: none; } }

/* Video tính năng: ảnh chụp làm thumb, bấm Play mới chèn <video> và tải */
[data-video] { position: relative; cursor: pointer; }
.play { position: absolute; inset: 0; display: grid; place-items: center; border: 0; background: transparent; cursor: pointer; padding: 0; }
.play span { width: 72px; height: 72px; border-radius: 50%; display: grid; place-items: center; background: var(--grad); color: #fff; box-shadow: 0 12px 28px -8px rgba(224, 47, 85, 0.6); transition: transform .15s ease; }
.play svg { width: 28px; height: 28px; margin-left: 4px; }
[data-video]:hover .play span { transform: scale(1.06); }
.play:focus-visible { outline: 3px solid var(--orange); outline-offset: 2px; border-radius: var(--radius); }
.shot video, .shot-plain video { display: block; width: 100%; aspect-ratio: 16 / 9; background: var(--warm); }
.shot video { border-radius: calc(var(--radius) - 1.5px); }

/* Hướng dẫn cài đặt: danh sách bước đánh số bằng vòng tròn gradient */
.steps { list-style: none; counter-reset: step; padding: 0; margin: 36px 0 0; max-width: 760px; }
.steps li { counter-increment: step; position: relative; padding: 0 0 28px 64px; }
.steps li:not(:last-child)::before { content: ""; position: absolute; left: 21px; top: 48px; bottom: 4px; border-left: 2px solid var(--line); }
.steps li::after { content: counter(step); position: absolute; left: 0; top: -2px; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--grad); color: #fff; font-weight: 800; font-size: 1.05rem; }
.steps h3 { font-size: 1.15rem; margin: 0 0 6px; }
.steps p { margin: 0; color: var(--ink-2); }
.steps code { font-size: 0.9em; background: var(--warm); border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; color: var(--ink); }
.install-more { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; margin-top: 12px; }
.install-more > div { padding: 20px 22px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--warm); }
.install-more h3 { font-size: 1.05rem; margin: 0 0 6px; }
.install-more p { margin: 0; color: var(--ink-2); font-size: 0.97rem; }
@media (max-width: 760px) { .install-more { grid-template-columns: 1fr; } .steps li { padding-left: 54px; } .steps li::after { width: 38px; height: 38px; } .steps li:not(:last-child)::before { left: 18px; top: 42px; } }
