/* Trang giới thiệu — dùng chung biến màu sáng/tối với game (style.css) */
body.landing { font-family: "Be Vietnam Pro", "Segoe UI", system-ui, sans-serif; background: var(--bg); color: var(--text); line-height: 1.6; height: auto; }
html:has(body.landing) { height: auto; scroll-behavior: smooth; }
.landing a { color: inherit; }
.landing h3 { text-transform: none; letter-spacing: 0; color: var(--text); }
.landing .btn { font-family: inherit; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.landing .btn.primary { color: #fff; }

/* Thanh trên */
.ld-nav { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 20px; padding: 12px max(16px, calc((100% - 1160px) / 2));
  background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--border); }
.ld-brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 17px; text-decoration: none; white-space: nowrap; }
.ld-brand img { border-radius: 8px; }
.ld-links { display: flex; gap: 22px; margin-left: auto; font-size: 14.5px; }
.ld-links a { text-decoration: none; color: var(--muted); } .ld-links a:hover { color: var(--text); }
.ld-theme { font: inherit; background: none; border: 1px solid var(--border); border-radius: 999px; width: 36px; height: 36px; cursor: pointer; }
.landing .ld-cta-sm { padding: 8px 16px; border-radius: 999px; font-weight: 600; white-space: nowrap; }

/* Mở đầu */
.ld-hero { display: grid; grid-template-columns: 0.92fr 1.08fr; gap: 44px; align-items: center; padding: 64px max(16px, calc((100% - 1160px) / 2)) 72px;
  background: radial-gradient(1100px 500px at 85% 10%, rgba(59,130,246,.16), transparent 60%), radial-gradient(700px 380px at 10% 90%, rgba(47,191,143,.12), transparent 60%); }
.ld-pill { display: inline-block; font-size: 13px; font-weight: 600; color: var(--accent); border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent);
  background: color-mix(in srgb, var(--accent) 10%, transparent); padding: 4px 12px; border-radius: 999px; margin-bottom: 18px; }
.ld-hero h1 { font-size: clamp(30px, 3.7vw, 48px); text-wrap: balance; line-height: 1.12; margin: 0 0 18px; letter-spacing: -.02em; font-weight: 800; }
.ld-lead { font-size: 17.5px; color: var(--muted); margin: 0 0 28px; max-width: 560px; }
.ld-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.ld-actions .btn.big { border-radius: 12px; padding: 14px 28px; }
.ld-ghost { background: transparent; }
.ld-facts { list-style: none; padding: 0; margin: 34px 0 0; display: grid; grid-template-columns: repeat(3, auto); justify-content: start; gap: 28px; color: var(--muted); font-size: 13.5px; line-height: 1.35; }
.ld-facts li { max-width: 150px; }
.ld-facts strong { display: block; font-size: 28px; color: var(--text); font-weight: 800; line-height: 1.1; }

/* Khung "màn hình game" */
.ld-device { border-radius: 18px; border: 1px solid var(--border); background: var(--surface); box-shadow: 0 30px 80px rgba(0,0,0,.35), 0 0 0 1px rgba(255,255,255,.03) inset; overflow: hidden; }
.ld-device-bar { display: flex; align-items: center; gap: 7px; padding: 10px 14px; border-bottom: 1px solid var(--border); background: var(--surface-2); }
.ld-device-bar span { width: 11px; height: 11px; border-radius: 50%; background: #e5534b; } .ld-device-bar span:nth-child(2) { background: #e3a82b; } .ld-device-bar span:nth-child(3) { background: #3fb950; }
.ld-device-bar em { font-style: normal; font-size: 12.5px; color: var(--muted); margin-left: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ld-device-body { position: relative; display: grid; grid-template-columns: 1fr; gap: 12px; padding: 12px; }
.ld-device-body .ld-monitor canvas#pleth { display: none; }
.ld-device-body .ld-monitor { display: grid; grid-template-columns: 1.4fr 1fr; gap: 10px; align-items: center; }
.ld-device-body .ld-monitor .vitals { margin-top: 0; }
.ld-monitor .vitals { grid-template-columns: repeat(3, 1fr); }
.ld-monitor .vital .val { font-size: 22px; }
.ld-scene .pv-svg { height: auto; min-height: 0; width: 100%; }
.ld-scene { display: flex; align-items: stretch; }
.ld-scene #pv { width: 100%; }
.ld-bubble { position: absolute; right: 22px; bottom: 20px; max-width: 46%; font-size: 12.5px; line-height: 1.4; background: #fdeeee; color: #7a1c1c; border: 1px solid var(--danger);
  border-radius: 12px 12px 2px 12px; padding: 7px 11px; box-shadow: 0 8px 24px rgba(0,0,0,.25); animation: ldpop 6s ease-in-out infinite; }
@keyframes ldpop { 0%, 8% { opacity: 0; transform: translateY(6px); } 14%, 80% { opacity: 1; transform: none; } 92%, 100% { opacity: 0; } }

/* Các phần */
.ld-section { padding: 72px max(16px, calc((100% - 1160px) / 2)); border-top: 1px solid var(--border); scroll-margin-top: 64px; }
.ld-section h2, .ld-final h2 { font-size: clamp(26px, 3vw, 36px); line-height: 1.2; margin: 0 0 12px; letter-spacing: -.015em; font-weight: 800; }
.ld-sub { color: var(--muted); max-width: 760px; margin: 0 0 28px; }
.ld-grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 28px; }
.ld-card { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 24px; }
.ld-card h3 { margin: 10px 0 8px; font-size: 18px; text-transform: none; letter-spacing: 0; color: var(--text); }
.ld-card p { margin: 0; color: var(--muted); }
.ld-ic { font-size: 28px; }
.ld-features { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 28px; }
.ld-features > div { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 18px 18px 16px; transition: transform .15s, border-color .15s; }
.ld-features > div:hover { transform: translateY(-3px); border-color: var(--primary); }
.ld-features span { font-size: 26px; }
.ld-features h3 { margin: 8px 0 6px; font-size: 16px; text-transform: none; letter-spacing: 0; color: var(--text); }
.ld-features p { margin: 0; font-size: 14px; color: var(--muted); line-height: 1.55; }
.ld-cases { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px 24px; }
.ld-case { display: flex; align-items: center; gap: 12px; padding: 10px 4px; border-bottom: 1px dashed var(--border); }
.ld-case-t { flex: 1; }
.ld-steps { counter-reset: s; list-style: none; padding: 0; margin: 28px 0 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; }
.ld-steps li { counter-increment: s; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 18px; font-size: 14.5px; color: var(--muted); }
.ld-steps li::before { content: counter(s); display: flex; width: 32px; height: 32px; border-radius: 50%; background: var(--primary); color: #fff; font-weight: 800;
  align-items: center; justify-content: center; margin-bottom: 10px; }
.ld-steps strong { display: block; color: var(--text); margin-bottom: 4px; }
.ld-note { margin-top: 20px; font-size: 14px; color: var(--muted); }

/* Tác giả */
.ld-author { display: flex; gap: 28px; align-items: flex-start; margin-top: 24px; background: var(--surface); border: 1px solid var(--border); border-radius: 18px; padding: 28px; }
.ld-avatar { width: 112px; height: 112px; border-radius: 50%; flex: none; overflow: hidden; background: linear-gradient(135deg, var(--primary), var(--accent));
  display: flex; align-items: center; justify-content: center; color: #fff; font-size: 44px; font-weight: 800; }
.ld-avatar img { width: 100%; height: 100%; object-fit: cover; }
.ld-author h3 { margin: 0; font-size: 22px; text-transform: none; letter-spacing: 0; color: var(--text); }
.ld-a-role { color: var(--accent); font-weight: 600; margin: 2px 0 10px; }
.ld-author p { margin: 0 0 8px; }
.ld-a-contact { display: flex; gap: 18px; flex-wrap: wrap; margin-top: 8px; }
.ld-a-contact a { color: var(--primary); text-decoration: none; font-weight: 600; }
.ld-review { margin-top: 18px; padding: 20px 24px; border-radius: 14px; border: 1px dashed var(--border); }
.ld-review h3 { margin: 0 0 6px; font-size: 15px; }
.ld-review p, .ld-review ul { margin: 0; color: var(--muted); }

/* Hỏi đáp */
.ld-faq { margin-top: 24px; display: flex; flex-direction: column; gap: 10px; max-width: 860px; }
.ld-faq details { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 14px 18px; }
.ld-faq summary { cursor: pointer; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.ld-faq summary::after { content: '+'; font-size: 20px; line-height: 1; color: var(--muted); }
.ld-faq details[open] summary::after { content: '−'; }
.ld-faq p { margin: 10px 0 0; color: var(--muted); }

.ld-final { text-align: center; padding: 80px 16px; border-top: 1px solid var(--border);
  background: radial-gradient(700px 300px at 50% 0%, rgba(59,130,246,.14), transparent 70%); }
.ld-final p { color: var(--muted); margin: 0 0 24px; }
.ld-final .btn.big { border-radius: 12px; padding: 14px 32px; }
.ld-footer { padding: 28px max(16px, calc((100% - 1160px) / 2)); border-top: 1px solid var(--border); font-size: 13.5px; color: var(--muted); }
.ld-footer p { margin: 6px 0 0; } .ld-footer-small { font-size: 12.5px; }

/* ---------- Làm đẹp (bản 2) ---------- */
.ld-grad { background: linear-gradient(90deg, #5aa9ff, #2fbf8f); -webkit-background-clip: text; background-clip: text; color: transparent; }
html[data-theme="light"] .ld-grad { background-image: linear-gradient(90deg, #1f6feb, #0f8a6a); }
.ld-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); margin-right: 6px; vertical-align: 1px; box-shadow: 0 0 0 0 rgba(47,191,143,.6); animation: lddot 2s infinite; }
@keyframes lddot { 70% { box-shadow: 0 0 0 8px rgba(47,191,143,0); } 100% { box-shadow: 0 0 0 0 rgba(47,191,143,0); } }
.ld-byline { display: inline-flex; align-items: center; gap: 10px; margin-top: 26px; text-decoration: none; color: var(--muted); font-size: 14px; }
.ld-byline:hover strong { color: var(--primary); }
.ld-byline strong { color: var(--text); }
.ld-byline-ava { width: 32px; height: 32px; border-radius: 50%; background: linear-gradient(135deg, var(--primary), var(--accent)); color: #fff; font-weight: 800; display: flex; align-items: center; justify-content: center; font-size: 14px; }
.ld-trust { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; padding: 22px max(16px, calc((100% - 1160px) / 2)); border-top: 1px solid var(--border); background: var(--surface); }
.ld-trust > div { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--muted); line-height: 1.4; }
.ld-trust .ld-svg { width: 34px; height: 34px; padding: 7px; flex: none; }
.ld-eyebrow { font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); margin-bottom: 8px; }
.ld-svg { display: inline-flex; width: 44px; height: 44px; padding: 10px; border-radius: 12px; color: var(--primary);
  background: color-mix(in srgb, var(--primary) 13%, transparent); border: 1px solid color-mix(in srgb, var(--primary) 25%, transparent); }
.ld-svg svg { width: 100%; height: 100%; }
.ld-card .ld-svg { margin-bottom: 4px; }
.ld-features .ld-svg { width: 40px; height: 40px; padding: 9px; color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, transparent); border-color: color-mix(in srgb, var(--accent) 25%, transparent); }
.ld-aud .ld-svg { color: #c084fc; background: rgba(192,132,252,.12); border-color: rgba(192,132,252,.3); }
.ld-section:nth-of-type(even) { background: color-mix(in srgb, var(--surface) 45%, transparent); }
.ld-gallery { display: grid; grid-template-columns: 1.4fr 1fr; grid-template-rows: auto auto; gap: 16px; margin-top: 28px; }
.ld-gallery figure { margin: 0; border-radius: 16px; overflow: hidden; border: 1px solid var(--border); background: var(--surface); box-shadow: 0 18px 50px rgba(0,0,0,.25); }
.ld-gallery figure:first-child { grid-row: span 2; }
.ld-gallery img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; object-position: top left; transition: transform .4s; }
.ld-gallery figure:first-child img { aspect-ratio: auto; height: calc(100% - 44px); }
.ld-gallery figure:hover img { transform: scale(1.02); }
.ld-gallery figcaption { padding: 11px 16px; font-size: 13.5px; color: var(--muted); border-top: 1px solid var(--border); }
.ld-case-filter { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.ld-case { text-decoration: none; color: inherit; border-radius: 8px; padding: 10px 8px; transition: background .15s; }
.ld-case:hover { background: var(--surface); }
.ld-case:hover .ld-case-t { color: var(--primary); }
.ld-author-main { flex: 1; }
.ld-a-tags { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 12px; }
.ld-a-tags span { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; padding: 4px 12px 4px 8px; border-radius: 99px;
  background: var(--surface-2); border: 1px solid var(--border); }
.ld-a-tags svg, .ld-a-contact svg { width: 16px; height: 16px; }
.ld-a-contact a { display: inline-flex; align-items: center; gap: 6px; }
.ld-a-note { font-size: 12.5px; color: var(--muted); margin: 12px 0 0; font-style: italic; }
.ld-js .ld-reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.ld-js .ld-reveal.in { opacity: 1; transform: none; }
.ld-footer-top { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 10px; }
.ld-footer-top .ld-brand { color: var(--text); }
.ld-footer .ld-footer-links { display: flex; gap: 18px; flex-wrap: wrap; margin: 0; }
@media (max-width: 900px) {
  .ld-trust { grid-template-columns: 1fr 1fr; }
  .ld-gallery { grid-template-columns: 1fr; }
  .ld-gallery figure:first-child { grid-row: auto; }
  .ld-gallery figure:first-child img { height: auto; aspect-ratio: 16 / 9; }
}
@media (max-width: 600px) { .ld-trust { grid-template-columns: 1fr; } }

/* Trang chính sách, điều khoản */
.ld-doc { max-width: 860px; margin: 0 auto; padding: 48px 16px 64px; }
.ld-doc h1 { font-size: clamp(28px, 3.4vw, 40px); margin: 0 0 6px; letter-spacing: -.015em; }
.ld-doc h2 { font-size: 20px; margin: 34px 0 10px; text-transform: none; letter-spacing: 0; color: var(--text); }
.ld-doc p, .ld-doc li { color: var(--text); }
.ld-doc ul { padding-left: 22px; } .ld-doc li { margin: 6px 0; }
.ld-doc a { color: var(--primary); }
.ld-doc-meta { color: var(--muted) !important; margin: 0 0 20px; font-size: 14px; }
.ld-doc-lead { font-size: 16.5px; padding: 16px 20px; border-left: 4px solid var(--accent); background: var(--surface); border-radius: 0 12px 12px 0; }
.ld-table { width: 100%; border-collapse: collapse; font-size: 14.5px; margin: 8px 0 12px; display: block; overflow-x: auto; }
.ld-table th, .ld-table td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--border); }
.ld-table th { color: var(--muted); font-weight: 600; font-size: 13px; text-transform: uppercase; letter-spacing: .03em; white-space: nowrap; }
.ld-draft { position: sticky; top: 0; z-index: 30; background: #b7791f; color: #fff; text-align: center; font-size: 13px; font-weight: 700; padding: 6px 12px; }
.ld-blank { background: color-mix(in srgb, var(--warn) 22%, transparent); border-radius: 4px; padding: 0 4px; }
.ld-footer-links a { color: var(--primary); text-decoration: none; }

/* Màn hình hẹp (trang giới thiệu đọc tốt trên điện thoại; bản chơi trên điện thoại làm sau) */
@media (max-width: 1080px) {
  .ld-features { grid-template-columns: repeat(2, 1fr); }
  .ld-steps { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 900px) {
  .ld-hero { grid-template-columns: 1fr; padding-top: 40px; gap: 32px; }
  .ld-links { display: none; }
  .ld-theme { margin-left: auto; }
  .ld-grid3 { grid-template-columns: 1fr; }
  .ld-device-body { grid-template-columns: 1fr; }
  .ld-bubble { max-width: 70%; top: auto; bottom: 18px; }
}
@media (max-width: 600px) {
  .ld-features, .ld-steps, .ld-cases { grid-template-columns: 1fr; }
  .ld-author { flex-direction: column; align-items: center; text-align: center; padding: 22px; }
  .ld-a-contact { justify-content: center; }
  .ld-facts { gap: 22px; }
  .landing .ld-cta-sm { padding: 7px 12px; font-size: 13.5px; }
  .ld-brand { font-size: 15px; }
  .ld-nav { gap: 10px; }
  .ld-section { padding-top: 52px; padding-bottom: 52px; }
}
