/* brushwick.keellabs.dev — giao diện của app: nền than chì ấm, hổ phách #EDA23A, xanh lục đồng #6DB3A3, Space Grotesk. */

:root {
  --bg: #151412;
  --surface: #1b1a18;
  --surface-high: #201f1c;
  --surface-higher: #2a2824;
  --line: #36332d;
  --text: #ece8e0;
  --muted: #c2bcb0;
  --faint: #98928a;
  --accent: #eda23a;
  --accent-deep: #c9811f;
  --cyan: #6db3a3;
  --on-accent: #2a1700;
  --radius: 20px;
  --font: "Space Grotesk", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 112px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: var(--font); font-size: 17px; line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--cyan); }
a:hover { color: #9bd0c4; }
:focus-visible { outline: 3px solid var(--cyan); outline-offset: 3px; border-radius: 8px; }
h1, h2, h3 { line-height: 1.12; letter-spacing: -0.025em; margin: 0; }
p { margin: 0; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 16px; top: -60px; background: var(--accent); color: var(--on-accent); padding: 8px 14px; border-radius: 10px; z-index: 10; font-weight: 700; }
.skip:focus { top: 12px; }

.wrap { width: min(1160px, 100% - 32px); margin-inline: auto; }

/* ---------- Đầu trang ---------- */
.top { position: sticky; top: 0; z-index: 5; background: rgb(17 19 23 / 0.86); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.top-row { display: flex; align-items: center; gap: 16px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); font-weight: 700; font-size: 20px; letter-spacing: -0.02em; margin-right: auto; }
.brand:hover { color: var(--text); }
.brand img { border-radius: 9px; }
.nav { display: flex; gap: 2px; }
.nav a { color: var(--muted); text-decoration: none; padding: 6px 10px; border-radius: 10px; font-size: 15px; font-weight: 500; }
.nav a:hover { color: var(--text); background: var(--surface-high); }

/* Bộ chọn ngôn ngữ: <details> mở danh sách, không cần JS. */
.lang-menu { position: relative; }
.top .lang-menu { background: none; border: 0; border-radius: 0; padding: 0; margin: 0; }
.top .lang-menu summary { list-style: none; display: flex; margin: 0; align-items: center; gap: 6px; cursor: pointer; color: var(--muted);
  padding: 6px 10px; border: 1px solid var(--line); border-radius: 10px; font-size: 15px; font-weight: 600; white-space: nowrap; }
.top .lang-menu summary::-webkit-details-marker { display: none; }
.top .lang-menu summary:hover, .top .lang-menu[open] summary { color: var(--text); background: var(--surface-high); }
.top .lang-menu > ul { padding-bottom: 6px; }
.lang-menu ul { position: absolute; right: 0; top: calc(100% + 8px); z-index: 10; list-style: none; margin: 0; padding: 6px;
  min-width: 200px; max-height: min(70vh, 520px); overflow-y: auto; background: var(--surface-high);
  border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 16px 40px rgb(0 0 0 / 0.45); }
.lang-menu a { display: block; padding: 8px 12px; border-radius: 9px; color: var(--muted); text-decoration: none; font-size: 15px; }
.lang-menu a:hover { color: var(--text); background: rgb(255 255 255 / 0.06); }
.lang-menu a[aria-current] { color: var(--text); font-weight: 600; }
.lang-menu a[aria-current]::after { content: " ✓"; color: var(--cyan); }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; padding: 72px 0 40px; }
.hero-grid { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 48px; align-items: center; }
.app-icon { width: 96px; height: 96px; border-radius: 22px; margin-bottom: 24px; }
.eyebrow { color: var(--cyan); font-weight: 600; font-size: 15px; margin-bottom: 14px; }
.hero h1 { font-size: clamp(38px, 5.4vw, 64px); font-weight: 700; }
.grad { color: inherit; } /* the headline's second half is set in the same colour: emphasis comes from the wording, not a gradient */
.lead { margin-top: 20px; font-size: 19px; color: var(--muted); max-width: 32em; }
.stores { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.badge {
  display: inline-flex; align-items: center; gap: 12px; min-height: 56px; padding: 8px 18px 8px 14px;
  border-radius: 14px; background: var(--surface-high); border: 1px solid var(--line); color: var(--text);
}
.badge svg { width: 26px; height: 26px; flex: none; fill: var(--text); }
.badge small { display: block; font-size: 12px; color: var(--faint); line-height: 1.2; }
.badge b { display: block; font-size: 17px; line-height: 1.2; }
.notify { display: inline-flex; align-items: center; gap: 8px; margin-top: 18px; font-weight: 600; text-decoration: none; }
.notify:hover { text-decoration: underline; }
.note { margin-top: 10px; font-size: 14px; color: var(--faint); }

/* Khung thiết bị đơn giản bằng CSS */
.devices { position: relative; padding: 0 0 6% 14%; }
.ipad, .phone { background: #050608; border: 1px solid #3a3d42; box-shadow: 0 30px 80px rgb(0 0 0 / 0.55), inset 0 0 0 1px #000; overflow: hidden; }
.ipad { border-radius: 26px; padding: 10px; }
.ipad img { border-radius: 16px; }
.phone { border-radius: 34px; padding: 7px; }
.phone img { border-radius: 27px; }
.devices .phone { position: absolute; left: 0; bottom: 0; width: 34%; }

/* ---------- Mục chung ---------- */
.section { padding: 88px 0; }
.section.alt { background: var(--surface); border-block: 1px solid var(--line); }
.section-head { max-width: 46em; margin-bottom: 44px; }
.section-head h2 { font-size: clamp(30px, 3.6vw, 44px); }
.section-head p { margin-top: 14px; color: var(--muted); font-size: 18px; }
.kicker { color: var(--accent); font-weight: 600; font-size: 15px; margin-bottom: 10px; }

/* Lưới tính năng */
.features { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 36px 28px; list-style: none; margin: 0; padding: 0; }
.feature { border-top: 1px solid var(--line); padding-top: 18px; }
.feature .ico { color: var(--accent); margin-bottom: 12px; }
.feature .ico svg { width: 26px; height: 26px; }
.feature h3 { font-size: 19px; margin-bottom: 8px; }
.feature p { color: var(--muted); font-size: 15.5px; }

/* Trình diễn: ảnh + chữ xen kẽ */
.show { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 56px; align-items: center; }
.show + .show { margin-top: 96px; }
.show:nth-of-type(even) .show-media { order: 2; }
.show-media { max-width: 500px; justify-self: center; width: 100%; }
.show h3 { font-size: clamp(26px, 3vw, 36px); margin-bottom: 14px; }
.show p { color: var(--muted); }
.ticks { list-style: none; padding: 0; margin: 20px 0 0; display: grid; gap: 10px; }
.ticks li { position: relative; padding-left: 28px; color: var(--text); }
.ticks li::before { content: ""; position: absolute; left: 4px; top: 0.55em; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; padding: 0; list-style: none; }
.chips li { font-size: 14px; padding: 4px 12px; border-radius: 99px; background: var(--surface-higher); color: var(--muted); border: 1px solid var(--line); }

/* iPad + điện thoại */
.devices-row { display: grid; grid-template-columns: 1.25fr 1fr; gap: 48px; align-items: center; }
.phones { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.phones figure { margin: 0; }
.phones figcaption { text-align: center; font-size: 14px; color: var(--faint); margin-top: 10px; }
.platforms { display: grid; gap: 14px; margin-top: 24px; }
.platform { background: var(--surface-high); border: 1px solid var(--line); border-radius: 16px; padding: 16px 18px; }
.platform b { display: block; margin-bottom: 2px; }
.platform span { color: var(--muted); font-size: 15.5px; }

/* Định dạng xuất */
.formats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; list-style: none; padding: 0; margin: 0; }
.format { display: flex; gap: 16px; align-items: flex-start; background: var(--surface-high); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.ext { flex: none; min-width: 64px; text-align: center; font-weight: 700; font-size: 15px; padding: 10px 8px; border-radius: 12px; background: var(--surface-higher); color: var(--cyan); border: 1px solid var(--line); }
.format h3 { font-size: 18px; margin-bottom: 4px; }
.format p { color: var(--muted); font-size: 15.5px; }

/* Riêng tư */
.privacy-band { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 28px; align-items: center; padding: 36px; border-radius: 28px;
  background: var(--surface-high); border: 1px solid rgb(237 162 58 / 0.35); }
.privacy-band .ico { width: 64px; height: 64px; border-radius: 18px; display: grid; place-items: center; background: var(--accent); color: var(--on-accent); }
.privacy-band .ico svg { width: 34px; height: 34px; }
.privacy-band h2 { font-size: clamp(26px, 3vw, 36px); }
.privacy-band p { margin-top: 10px; color: var(--muted); }

/* ---------- Trang văn bản (Quyền riêng tư, Hỗ trợ) ---------- */
.doc { padding: 56px 0 88px; }
.doc .wrap { max-width: 780px; }
.doc h1 { font-size: clamp(34px, 4.6vw, 48px); margin-bottom: 10px; }
.doc .meta { color: var(--faint); margin-bottom: 32px; }
.doc h2 { font-size: 24px; margin: 44px 0 12px; }
.doc h3 { font-size: 19px; margin: 26px 0 8px; }
.doc p, .doc li { color: var(--muted); }
.doc p + p { margin-top: 12px; }
.doc ul, .doc ol { padding-left: 22px; display: grid; gap: 8px; margin: 12px 0 0; }
.doc strong { color: var(--text); }
.doc ul + p, .doc ol + p, .doc dl + p { margin-top: 14px; }
.doc code { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 0.9em; background: var(--surface-higher); padding: 1px 6px; border-radius: 6px; color: var(--text); }
.doc .toc { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 8px; padding: 0; list-style: none; }
.toc a { display: inline-block; padding: 6px 12px; border-radius: 99px; background: var(--surface-high); border: 1px solid var(--line); text-decoration: none; color: var(--muted); font-size: 15px; }
.toc a:hover { color: var(--text); }
.card { background: var(--surface-high); border: 1px solid var(--line); border-radius: 16px; padding: 18px 20px; margin-top: 14px; }
.gestures { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 0; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; margin-top: 14px; }
.gestures dt, .gestures dd { margin: 0; padding: 12px 16px; border-top: 1px solid var(--line); }
.gestures dt { font-weight: 600; color: var(--text); background: var(--surface-high); }
.gestures dd { color: var(--muted); }
.gestures dt:first-of-type, .gestures dt:first-of-type + dd { border-top: 0; }
details { background: var(--surface-high); border: 1px solid var(--line); border-radius: 14px; padding: 0 18px; margin-top: 10px; }
summary { cursor: pointer; padding: 14px 0; font-weight: 600; color: var(--text); }
details[open] summary { border-bottom: 1px solid var(--line); margin-bottom: 12px; }
details > :last-child { padding-bottom: 16px; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 22px; border-radius: 14px; background: var(--accent); color: var(--on-accent); font-weight: 700; text-decoration: none; margin-top: 16px; }
.button:hover { background: #b9a2fc; color: var(--on-accent); }

/* ---------- Chân trang ---------- */
.foot { border-top: 1px solid var(--line); padding: 36px 0 44px; color: var(--faint); font-size: 15px; }
.foot-row { display: flex; flex-wrap: wrap; gap: 20px 32px; align-items: center; justify-content: space-between; }
.maker { display: inline-flex; align-items: center; gap: 10px; color: var(--muted); text-decoration: none; }
.maker img { border-radius: 8px; box-shadow: 0 0 0 1px var(--line); }
.maker b { color: var(--text); }
.maker:hover { color: var(--text); }
.foot nav { display: flex; flex-wrap: wrap; gap: 6px 20px; }
.foot nav a { color: var(--muted); text-decoration: none; }
.foot nav a:hover { color: var(--text); text-decoration: underline; }
.foot nav.foot-langs { flex-basis: 100%; gap: 6px 16px; font-size: 14px; }

/* ---------- Màn hình nhỏ ---------- */
@media (max-width: 1000px) {
  .features { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .formats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  /* the section links stay reachable: they drop to a second, scrollable row under the brand */
  .top-row { flex-wrap: wrap; height: auto; min-height: 64px; row-gap: 0; }
  .nav { order: 3; flex-basis: 100%; overflow-x: auto; margin: 0 -10px; padding-bottom: 6px; scrollbar-width: none; }
  .nav a { white-space: nowrap; }
  .hero { padding: 40px 0 24px; }
  .hero-grid, .show, .devices-row { grid-template-columns: minmax(0, 1fr); gap: 36px; }
  .show:nth-of-type(even) .show-media { order: 0; }
  .show + .show { margin-top: 72px; }
  .section { padding: 64px 0; }
  .devices { max-width: 520px; margin-inline: auto; width: 100%; }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .app-icon { width: 76px; height: 76px; border-radius: 18px; }
  .features, .formats { grid-template-columns: minmax(0, 1fr); }
  .badge { flex: 1 1 100%; }
  .privacy-band { grid-template-columns: minmax(0, 1fr); padding: 24px; }
  .gestures { grid-template-columns: minmax(0, 1fr); }
  .gestures dd { border-top: 0; padding-top: 0; background: var(--surface-high); }
  .gestures dt { padding-bottom: 4px; }
  .ipad { border-radius: 18px; padding: 6px; }
  .ipad img { border-radius: 12px; }
  .phone { border-radius: 24px; padding: 5px; }
  .phone img { border-radius: 19px; }
  .phones { gap: 10px; }
  .lang-menu summary span { max-width: 8.5em; overflow: hidden; text-overflow: ellipsis; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* ---------- Đồng bộ với keellabs.dev: tiêu đề lớn, ít nhãn thừa, hàng có đường kẻ thay cho khung hộp ---------- */
.hero h1 { font-size: clamp(40px, 5.6vw, 72px); line-height: 1.04; letter-spacing: -0.035em; text-wrap: balance; }
.section-head h2 { font-size: clamp(32px, 4.4vw, 56px); line-height: 1.05; letter-spacing: -0.035em; }
.kicker { display: none; } /* nhãn nhỏ lặp lại tiêu đề ngay bên dưới */
.platforms { gap: 0; border-bottom: 1px solid var(--line); }
.platform { background: none; border: 0; border-top: 1px solid var(--line); border-radius: 0; padding: 18px 0; }
.platform b { font-size: 19px; letter-spacing: -0.015em; }
.formats { gap: 0 32px; }
.format { background: none; border: 0; border-top: 1px solid var(--line); border-radius: 0; padding: 22px 0 26px; }

/* Đường sóng: phần tính năng nằm "dưới mặt nước", cùng ý tưởng với keellabs.dev. Chỉ dùng CSS nên áp cho mọi ngôn ngữ. */
:root { --deep: #0e0d0c; }
.section.deep { position: relative; background: var(--deep); border-top: 0; margin-top: 44px; }
.section.deep::before {
  content: ""; position: absolute; left: 0; right: 0; top: -43px; height: 44px; background: var(--deep);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 44' preserveAspectRatio='none'%3E%3Cpath d='M0 22C120 4 240 40 360 22S600 4 720 22s240 18 360 0 240-18 360 0V44H0z'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 44' preserveAspectRatio='none'%3E%3Cpath d='M0 22C120 4 240 40 360 22S600 4 720 22s240 18 360 0 240-18 360 0V44H0z'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
}
.hero { padding-bottom: 8px; }

/* Vẽ thử trên hero: canvas nằm dưới nội dung, nét bắt đầu ở chỗ trống (assets/site.js). */
.hero .sketch { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.hero.sketchable { cursor: crosshair; }
.hero.sketchable :is(h1, p) { cursor: text; }
.hero.sketchable :is(img, .stores, .badge, .devices > div) { cursor: default; }

/* Trình diễn: ảnh iPad nhỏ lại để ba hàng không quá cao. */
.show-media { max-width: 420px; }
.show + .show { margin-top: 72px; }
