/* chamgu.vn site styles: tokens + components from wireframe B (spec 2026-10-15 section 6). Fonts: Be Vietnam Pro, OFL, self-hosted vi + latin. */
@font-face { font-family: "Be Vietnam Pro"; font-style: normal; font-weight: 400; font-display: swap; src: url(/fonts/be-vietnam-pro-400-vietnamese.woff2) format("woff2"); unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB; }
@font-face { font-family: "Be Vietnam Pro"; font-style: normal; font-weight: 400; font-display: swap; src: url(/fonts/be-vietnam-pro-400-latin.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Be Vietnam Pro"; font-style: normal; font-weight: 500; font-display: swap; src: url(/fonts/be-vietnam-pro-500-vietnamese.woff2) format("woff2"); unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB; }
@font-face { font-family: "Be Vietnam Pro"; font-style: normal; font-weight: 500; font-display: swap; src: url(/fonts/be-vietnam-pro-500-latin.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Be Vietnam Pro"; font-style: normal; font-weight: 700; font-display: swap; src: url(/fonts/be-vietnam-pro-700-vietnamese.woff2) format("woff2"); unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB; }
@font-face { font-family: "Be Vietnam Pro"; font-style: normal; font-weight: 700; font-display: swap; src: url(/fonts/be-vietnam-pro-700-latin.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
:root {
  --bg: #F7F3EC;
  --surface: #FFFFFF;
  --ink: #23211E;
  --muted: #6B645B;
  --accent: #7A4E2D;
  --accent-ink: #FFFFFF;
  --line: #E4DCD0;
  --radius: 10px;
  --gutter: 16px;
  --bar-h: 64px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.6 "Be Vietnam Pro", system-ui, sans-serif;
  overflow-wrap: anywhere;
  /* room for the sticky bar so it never covers the last content */
  padding-bottom: calc(var(--bar-h) + env(safe-area-inset-bottom) + 16px);
}
h1, h2, h3 { line-height: 1.3; margin: 0 0 .5em; font-weight: 700; }
h1 { font-size: clamp(1.5rem, 5.5vw, 2.25rem); }
h2 { font-size: 1.25rem; margin-top: 2rem; }
h3 { font-size: 1.05rem; }
p { margin: 0 0 1em; }
a { color: var(--accent); }
img { display: block; max-width: 100%; height: auto; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 var(--gutter); }
.muted { color: var(--muted); font-size: .9rem; }

/* site header */
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px var(--gutter); border-bottom: 1px solid var(--line); background: var(--surface); }
.logo { font-weight: 700; letter-spacing: .02em; color: var(--ink); text-decoration: none; }
.crumbs { font-size: .85rem; color: var(--muted); padding: 10px var(--gutter) 0; }
.crumbs a { color: var(--muted); }

.tag-inferred { display: inline-block; font-size: .78rem; font-weight: 600; color: var(--accent); border: 1px solid var(--accent); border-radius: 999px; padding: 0 .5em; margin-left: .25em; white-space: nowrap; }

/* photos */
.photo { margin: 0; }
.photo img { border-radius: var(--radius); width: 100%; object-fit: cover; }
.photo figcaption { font-size: .85rem; color: var(--muted); margin-top: 6px; }
.ratio-45 img { aspect-ratio: 4 / 5; }
.ratio-43 img { aspect-ratio: 4 / 3; }
.label-wip { display: inline-block; background: var(--ink); color: #fff; font-size: .75rem; padding: 2px 8px; border-radius: 999px; margin-bottom: 4px; }

/* hero: mobile stacked, desktop split (portrait photo left, text right) */
.hero-split { display: grid; gap: 16px; }
@media (min-width: 900px) {
  .hero-split { grid-template-columns: 5fr 6fr; align-items: center; gap: 40px; }
}

/* spec card */
.spec-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.spec-card dl { display: grid; grid-template-columns: minmax(96px, 38%) 1fr; gap: 8px 12px; margin: 0; }
.spec-card dt { color: var(--muted); font-size: .9rem; }
.spec-card dd { margin: 0; font-weight: 500; }
details.spec-card summary { cursor: pointer; font-weight: 700; min-height: 44px; display: flex; align-items: center; }
details.spec-card[open] summary { margin-bottom: 8px; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 12px; padding: 0; list-style: none; }
.chip { display: inline-flex; align-items: center; min-height: 32px; padding: 4px 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); font-size: .85rem; }

/* gallery: 2-column portrait */
.gallery { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.gallery .wide { grid-column: 1 / -1; }

/* progress strip: horizontal on wide screens, wraps on phones */
.progress-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; padding: 0; margin: 0; list-style: none; counter-reset: step; }
.progress-strip li { counter-increment: step; }
.progress-strip .step-no::before { content: counter(step) ". "; font-weight: 700; }
/* vertical timeline variant (direction B) */
.timeline { list-style: none; margin: 0; padding: 0 0 0 20px; border-left: 2px solid var(--line); display: grid; gap: 20px; }
.timeline li { position: relative; }
.timeline li::before { content: ""; position: absolute; left: -27px; top: 6px; width: 12px; height: 12px; border-radius: 50%; background: var(--accent); }

/* cards */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; color: inherit; text-decoration: none; }
.card img { border-radius: 0; }
.card-body { padding: 10px 12px 12px; }
.card-body h3 { font-size: .95rem; margin: 0 0 4px; }

/* full-bleed hero with title over a bottom gradient (direction B) */
.hero-bleed { position: relative; margin: 0; }
.hero-bleed img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.hero-bleed .over { position: absolute; inset: auto 0 0 0; padding: 48px var(--gutter) 16px; color: #fff; background: linear-gradient(transparent, rgba(20, 16, 12, .82)); }
.hero-bleed h1 { color: #fff; }
/* desktop: split hero, portrait photo left, text right (spec 5.4 item 1) */
@media (min-width: 900px) {
  .hero-bleed { display: grid; grid-template-columns: 5fr 6fr; gap: 40px; align-items: center; max-width: 1120px; margin: 24px auto 0; padding: 0 var(--gutter); }
  .hero-bleed img { aspect-ratio: 4 / 5; max-height: 80vh; border-radius: var(--radius); }
  .hero-bleed .over { position: static; padding: 0; color: var(--ink); background: none; }
  .hero-bleed h1 { color: var(--ink); }
  .hero-bleed .over .muted { color: var(--muted) !important; }
}

.note { border-left: 3px solid var(--accent); background: var(--surface); padding: 10px 12px; border-radius: 0 var(--radius) var(--radius) 0; font-size: .92rem; }

/* sticky bottom bar: exactly 2 buttons (Zalo, Gọi), safe-area padding */
.sticky-cta {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 10;
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px;
  padding: 8px var(--gutter); padding-bottom: max(8px, env(safe-area-inset-bottom));
  background: rgba(247, 243, 236, .96); border-top: 1px solid var(--line);
}
.sticky-cta a {
  display: flex; align-items: center; justify-content: center; min-height: 48px;
  border-radius: var(--radius); font-weight: 700; text-decoration: none; text-align: center; line-height: 1.2;
}
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-ghost { background: var(--surface); color: var(--ink); border: 1.5px solid var(--ink); }
@media (min-width: 900px) {
  .sticky-cta { left: auto; right: 24px; bottom: 24px; width: 360px; border: 1px solid var(--line); border-radius: 14px; padding: 8px; }
}

section { margin: 24px 0; }

/* home hero buttons; wrap on narrow phones */
.hero-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.hero-actions a { flex: 1 1 140px; display: flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 12px; border-radius: var(--radius); font-weight: 700; text-decoration: none; text-align: center; line-height: 1.2; }
.room-tiles { grid-template-columns: 1fr 1fr; }
@media (min-width: 900px) { .room-tiles { grid-template-columns: repeat(4, 1fr); } }

/* menu: one row, scrolls sideways inside itself on phones (page never scrolls sideways) */
.menu { display: flex; gap: 4px; overflow-x: auto; white-space: nowrap; padding: 0 var(--gutter); background: var(--surface); border-bottom: 1px solid var(--line); scrollbar-width: none; }
.menu a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 10px; color: var(--ink); text-decoration: none; font-size: .92rem; }
.menu a[aria-current="page"] { color: var(--accent); font-weight: 700; }
@media (min-width: 900px) { .menu { justify-content: center; } }

/* footer */
.site-footer { margin-top: 40px; padding: 24px 0; background: var(--surface); border-top: 1px solid var(--line); font-size: .92rem; }
.site-footer p { margin: 0 0 .5em; }

/* text pages */
.prose { max-width: 720px; }
.prose ul, .prose ol { padding-left: 1.2em; }
.faq-item { border-bottom: 1px solid var(--line); padding: 8px 0; }
.faq-item summary { cursor: pointer; font-weight: 700; min-height: 44px; display: flex; align-items: center; }
.author-byline { font-size: .9rem; color: var(--muted); }
@media (max-width: 899px) { .wrap > .hero-bleed:first-child { margin: 0 calc(-1 * var(--gutter)); } }
/* project page: title first in the HTML (spec 5.1); photo goes left on desktop */
@media (min-width: 900px) { .hero-chu-truoc > figure { order: -1; } }
