/* Layout: ảnh lớn mở đầu → mục lục dự án → mỗi dự án một chương riêng (ảnh + thông số + sản phẩm) → Minh là ai → form nhận bảng giá → footer navy */
:root {
  --blue: #89D0F5;        /* màu nhận diện, nút CTA */
  --blue-ink: #1F6E99;    /* chữ liên kết trên nền sáng (đủ tương phản) */
  --navy: #173653;        /* tiêu đề, menu, footer */
  --bg: #F7FAFC;
  --surface: #FFFFFF;
  --surface-2: #EAF5FC;
  --gold: #D4B483;
  --muted: #667788;
  --line: #D7E6F0;
  --fg: #173653;
  --body: #2E4559;
  --on-blue: #0F2A42;
  --footer-bg: #173653;
  --footer-fg: #FFFFFF;
  --shadow: 0 10px 30px -18px rgba(23,54,83,.35);
  --f-display: "Cormorant", "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --f-body: "Manrope", "Segoe UI", system-ui, -apple-system, sans-serif;
  --f-sign: "Allura", "Brush Script MT", cursive;
  --wrap: 1180px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --blue: #89D0F5; --blue-ink: #9FDAF8; --navy: #E6F1F9;
    --bg: #0C1C2C; --surface: #12283D; --surface-2: #0F2335;
    --gold: #D4B483; --muted: #93A6B8; --line: #22405C;
    --fg: #EEF5FB; --body: #C3D3E1; --on-blue: #0F2A42;
    --footer-bg: #081522; --footer-fg: #EEF5FB;
    --shadow: 0 10px 30px -18px rgba(0,0,0,.7);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --blue: #89D0F5; --blue-ink: #9FDAF8; --navy: #E6F1F9;
  --bg: #0C1C2C; --surface: #12283D; --surface-2: #0F2335;
  --gold: #D4B483; --muted: #93A6B8; --line: #22405C;
  --fg: #EEF5FB; --body: #C3D3E1; --on-blue: #0F2A42;
  --footer-bg: #081522; --footer-fg: #EEF5FB;
  --shadow: 0 10px 30px -18px rgba(0,0,0,.7);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; animation: none !important; } }
body { background: var(--bg); color: var(--body); font-family: var(--f-body); font-size: 16px; line-height: 1.65; }
h1, h2, h3 { font-family: var(--f-display); color: var(--fg); line-height: 1.12; margin: 0; text-wrap: balance; font-weight: 600; }
p { margin: 0; }
a { color: var(--blue-ink); }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }
img { display: block; max-width: 100%; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.eyebrow { font-size: 12px; letter-spacing: .18em; text-transform: uppercase; font-weight: 600; color: var(--muted); }
.eyebrow .dot { color: var(--gold); padding: 0 6px; }
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 12px 22px; border-radius: 999px; font: 600 15px/1 var(--f-body); text-decoration: none; border: 1px solid transparent; cursor: pointer; transition: transform .15s ease, background .15s ease; }
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--blue); color: var(--on-blue); }
.btn-ghost { background: transparent; color: var(--fg); border-color: var(--line); }

/* Header */
.site-head { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.site-head .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 10px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--fg); }
.brand-mark { width: 52px; height: 52px; border-radius: 10px; background: #FFFFFF; overflow: hidden; flex: none; border: 1px solid var(--line); }
.brand-mark img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.55); transform-origin: 50% 38%; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text b { font-family: var(--f-display); font-size: 21px; letter-spacing: .06em; font-weight: 700; }
.brand-text span { font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); }
.nav { display: flex; align-items: center; gap: 22px; }
.nav a.nl { color: var(--fg); text-decoration: none; font-weight: 500; font-size: 15px; }
.nav a.nl:hover { color: var(--blue-ink); }
@media (max-width: 860px) { .nav a.nl { display: none; } .brand-text span { display: none; } }

/* Hero */
.hero { position: relative; color: #FFFFFF; isolation: isolate; }
.hero-img { position: absolute; inset: 0; z-index: -2; }
.hero-img img { width: 100%; height: 100%; object-fit: cover; }
.hero::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(10,30,48,.15) 0%, rgba(10,30,48,.35) 45%, rgba(10,30,48,.88) 100%); }
.hero .wrap { padding-block: 150px 56px; display: grid; gap: 22px; }
.hero .eyebrow { color: #D9ECF7; }
.hero h1 { color: #FFFFFF; font-size: clamp(38px, 6.4vw, 74px); font-weight: 600; max-width: 15ch; letter-spacing: -.005em; }
.hero h1 em { font-style: italic; color: var(--blue); font-weight: 500; }
.hero p.lead { max-width: 58ch; font-size: 17px; color: #E3EEF6; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 6px; }
.hero .btn-ghost { color: #FFFFFF; border-color: rgba(255,255,255,.55); }
.hero-proof { display: flex; flex-wrap: wrap; gap: 10px 26px; margin-top: 18px; padding-top: 18px; border-top: 1px solid rgba(255,255,255,.22); font-size: 14px; color: #D6E6F1; }
.hero-proof b { color: var(--gold); font-weight: 600; }

/* Project index */
.index { background: var(--surface); border-bottom: 1px solid var(--line); }
.index .wrap { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; }
.index a { display: grid; gap: 2px; padding: 22px 18px; text-decoration: none; color: var(--fg); border-left: 1px solid var(--line); transition: background .15s ease; }
.index a:first-child { border-left: 0; }
.index a:hover { background: var(--surface-2); }
.index a small { font-size: 12px; color: var(--muted); letter-spacing: .04em; }
.index a strong { font-family: var(--f-display); font-size: 23px; font-weight: 600; line-height: 1.15; }
.index a span { font-size: 13px; color: var(--blue-ink); font-weight: 600; }
@media (max-width: 860px) { .index .wrap { grid-template-columns: repeat(2, minmax(0, 1fr)); } .index a:nth-child(3) { border-left: 0; } .index a:nth-child(n+3) { border-top: 1px solid var(--line); } }

/* Section scaffold */
section.block { padding-block: 88px; }
section.alt { background: var(--surface); }
.sec-head { display: grid; gap: 12px; margin-bottom: 36px; max-width: 760px; }
.sec-head h2 { font-size: clamp(32px, 4.4vw, 52px); }
.sec-head p { font-size: 17px; }

/* Project chapter */
.proj-top { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 48px; align-items: start; }
.proj-top .copy { display: grid; gap: 18px; min-width: 0; }
.proj-no { font-family: var(--f-display); font-size: 15px; color: var(--gold); letter-spacing: .14em; font-weight: 700; }
.proj-top h2 { font-size: clamp(36px, 5vw, 60px); }
.proj-top .intro { font-size: 17px; max-width: 56ch; }
.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; margin: 4px 0 0; border-top: 1px solid var(--line); }
.facts div { padding: 14px 0; border-bottom: 1px solid var(--line); min-width: 0; }
.facts div:nth-child(odd) { padding-right: 18px; }
.facts dt { font-size: 12px; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); font-weight: 600; }
.facts dd { margin: 2px 0 0; color: var(--fg); font-weight: 600; font-size: 16px; font-variant-numeric: tabular-nums; }
.gallery { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; min-width: 0; }
.gallery figure { margin: 0; position: relative; overflow: hidden; border-radius: 6px; background: var(--surface-2); }
.gallery figure:first-child { grid-column: 1 / -1; aspect-ratio: 16 / 10; }
.gallery figure:not(:first-child) { aspect-ratio: 4 / 3; }
.gallery img { width: 100%; height: 100%; object-fit: cover; }
.gallery figcaption { position: absolute; left: 0; right: 0; bottom: 0; padding: 22px 12px 8px; font-size: 12px; color: #FFFFFF; background: linear-gradient(transparent, rgba(10,30,48,.75)); }

.products { margin-top: 44px; display: grid; gap: 14px; }
.products h3 { font-size: 26px; }
.prod-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.prod-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 1000px) { .prod-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .prod-grid, .prod-grid.two { grid-template-columns: minmax(0, 1fr); } }
.prod { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 20px; display: grid; gap: 8px; align-content: start; min-width: 0; }
section.alt .prod { background: var(--bg); }
.prod .tag { justify-self: start; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; font-weight: 700; color: var(--fg); background: var(--surface-2); border: 1px solid var(--line); padding: 4px 9px; border-radius: 999px; }
section.alt .prod .tag { background: var(--surface); }
.prod h4 { margin: 0; font-family: var(--f-display); font-size: 25px; font-weight: 600; color: var(--fg); line-height: 1.15; }
.prod p { font-size: 15px; }
.prod .num { font-variant-numeric: tabular-nums; color: var(--fg); font-weight: 600; }

.policy { margin-top: 28px; border: 1px solid var(--gold); border-radius: 8px; padding: 24px; display: grid; gap: 14px; background: var(--surface); }
section.alt .policy { background: var(--bg); }
.policy h3 { font-size: 26px; }
.policy ul { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px 24px; }
.policy li { padding-left: 18px; position: relative; font-size: 15px; }
.policy li::before { content: ""; position: absolute; left: 0; top: .62em; width: 7px; height: 7px; transform: rotate(45deg); background: var(--gold); }
.policy .fine { font-size: 13px; color: var(--muted); }

.proj-cta { margin-top: 28px; display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.proj-cta .note { font-size: 14px; color: var(--muted); }

@media (max-width: 900px) { .proj-top { grid-template-columns: minmax(0, 1fr); gap: 28px; } }
@media (max-width: 480px) { .facts { grid-template-columns: minmax(0, 1fr); } .facts div:nth-child(odd) { padding-right: 0; } section.block { padding-block: 64px; } }

/* About */
.about { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 56px; align-items: start; }
.about-photo { margin: 0; position: relative; border-radius: 10px; overflow: hidden; box-shadow: var(--shadow); aspect-ratio: 4 / 5; max-width: 100%; background: var(--surface-2); }
.about-photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 40%; }
.about-photo figcaption { position: absolute; left: 0; right: 0; bottom: 0; padding: 48px 20px 16px; display: flex; align-items: baseline; justify-content: space-between; gap: 12px; color: #FFFFFF; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; background: linear-gradient(transparent, rgba(10,30,48,.82)); }
.about-photo .sign { color: #FFFFFF; font-size: 44px; text-transform: none; letter-spacing: 0; }
@media (max-width: 900px) { .about-photo { max-width: 460px; } }
.about-copy { display: grid; gap: 22px; min-width: 0; }
.sign { font-family: var(--f-sign); font-size: 46px; color: var(--blue-ink); line-height: 1; }
.traits { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.trait { border-top: 2px solid var(--gold); padding-top: 12px; display: grid; gap: 6px; }
.trait b { font-family: var(--f-display); font-size: 26px; color: var(--fg); font-weight: 600; }
.trait p { font-size: 15px; }
.services { display: grid; gap: 0; border-top: 1px solid var(--line); }
.services li { list-style: none; display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.services { margin: 0; padding: 0; }
.services .k { font-family: var(--f-display); color: var(--gold); font-size: 20px; font-weight: 700; }
.services b { color: var(--fg); }
@media (max-width: 900px) { .about { grid-template-columns: minmax(0, 1fr); gap: 32px; } .traits { grid-template-columns: minmax(0, 1fr); } }

.care { margin-top: 56px; background: var(--surface-2); border-radius: 10px; padding: 34px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 32px; align-items: center; }
.care h3 { font-size: clamp(28px, 3.4vw, 38px); }
.care ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 12px; }
.care li { padding-left: 22px; position: relative; }
.care li::before { content: ""; position: absolute; left: 0; top: .6em; width: 8px; height: 8px; border-radius: 50%; background: var(--blue); }
@media (max-width: 760px) { .care { grid-template-columns: minmax(0, 1fr); padding: 24px; } }

/* Contact */
.contact { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 48px; align-items: start; }
.contact-info { display: grid; gap: 18px; }
.ci { display: grid; gap: 2px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.ci small { font-size: 12px; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); font-weight: 600; }
.ci .val { color: var(--fg); font-weight: 600; font-size: 18px; font-variant-numeric: tabular-nums; word-break: break-word; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.copy-btn { font: 600 12px/1 var(--f-body); padding: 6px 10px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--fg); cursor: pointer; }
form.lead-form { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 28px; display: grid; gap: 16px; box-shadow: var(--shadow); }
form.lead-form h3 { font-size: 30px; }
.field { display: grid; gap: 6px; }
.field label { font-size: 13px; font-weight: 600; color: var(--fg); }
.field input, .field select, .field textarea { font: 400 16px/1.4 var(--f-body); color: var(--fg); background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; width: 100%; }
.field textarea { min-height: 88px; resize: vertical; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-note { font-size: 13px; color: var(--muted); }
.result { display: grid; gap: 10px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; padding: 16px; }
.result pre { margin: 0; white-space: pre-wrap; font: 500 14px/1.55 var(--f-body); color: var(--fg); }
.result .acts { display: flex; flex-wrap: wrap; gap: 10px; }
.err { color: #B4442F; font-size: 13px; }
@media (max-width: 900px) { .contact { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 480px) { .row2 { grid-template-columns: minmax(0, 1fr); } form.lead-form { padding: 20px; } }

/* Footer */
footer { background: var(--footer-bg); color: var(--footer-fg); }
footer .wrap { padding-block: 44px 96px; display: grid; gap: 18px; }
footer .fb { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 18px; align-items: end; }
footer .fname { font-family: var(--f-display); font-size: 28px; letter-spacing: .06em; font-weight: 700; }
footer a { color: var(--blue); }
footer .disc { font-size: 13px; opacity: .72; max-width: 90ch; }

/* Mobile action bar */
.mbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: none; gap: 10px; background: var(--surface); border-top: 1px solid var(--line); padding: 10px max(16px, env(safe-area-inset-right, 0px)) calc(10px + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px)); }
.mbar .btn { flex: 1; justify-content: center; }
@media (max-width: 760px) { .mbar { display: flex; } }

/* ===== Bổ sung cho bản Eleventy ===== */
body { margin: 0; }
[hidden] { display: none !important; }
picture { display: contents; }
.h3 { font-size: 26px; }
.proj-top h1 { font-size: clamp(36px, 5vw, 60px); }
.prod h3 { margin: 0; font-family: var(--f-display); font-size: 25px; font-weight: 600; color: var(--fg); line-height: 1.15; }
.prod-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 1000px) { .prod-grid.three { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .prod-grid.three { grid-template-columns: minmax(0, 1fr); } }
.crumbs { font-size: 13px; color: var(--muted); padding-top: 22px; }
.crumbs a { color: var(--muted); }
.more-head { padding-top: 56px; padding-bottom: 14px; }
.more-head h2 { font-size: 30px; }
.index.cols-3 .wrap { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 860px) { .index.cols-3 .wrap { grid-template-columns: minmax(0, 1fr); } .index.cols-3 a { border-left: 0; border-top: 1px solid var(--line); } .index.cols-3 a:first-child { border-top: 0; } }
.row-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 16px; max-width: none; }
.row-head > div { display: grid; gap: 12px; }
.flinks { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 14px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.ok-title { font-weight: 700; color: var(--fg); }

/* Giỏ hàng từ Google Sheet */
.stock { margin-top: 36px; display: grid; gap: 14px; }
.stock-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 16px; }
.stock-time { font-size: 13px; color: var(--muted); }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
section.alt .table-wrap { background: var(--bg); }
.stock-table { width: 100%; border-collapse: collapse; font-size: 15px; min-width: 640px; }
.stock-table th { text-align: left; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); font-weight: 600; padding: 12px 14px; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.stock-table td { padding: 12px 14px; border-bottom: 1px solid var(--line); color: var(--body); vertical-align: top; }
.stock-table tr:last-child td { border-bottom: 0; }
.stock-table td.num { font-variant-numeric: tabular-nums; color: var(--fg); font-weight: 600; white-space: nowrap; }
.pill { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; white-space: nowrap; border: 1px solid var(--line); color: var(--fg); background: var(--surface-2); }
.pill.con { background: #E3F5EA; color: #1E6B3E; border-color: #BFE5CD; }
.pill.giu { background: #FFF3DD; color: #8A5A0B; border-color: #F1D9A8; }
.pill.het { background: #F1F3F5; color: #6B7785; border-color: #DDE2E7; text-decoration: line-through; }
.pill.sap { background: var(--surface-2); color: var(--blue-ink); }

/* Bài viết */
.post-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
@media (max-width: 900px) { .post-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .post-grid { grid-template-columns: minmax(0, 1fr); } }
.post-card { display: grid; gap: 14px; align-content: start; min-width: 0; }
.post-thumb { display: block; aspect-ratio: 16 / 10; border-radius: 8px; overflow: hidden; background: var(--surface-2); }
.post-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s ease; }
.post-thumb:hover img { transform: scale(1.03); }
.post-body { display: grid; gap: 6px; }
.post-meta { font-size: 13px; color: var(--muted); }
.post-card h3 { font-size: 24px; }
.post-card h3 a { color: var(--fg); text-decoration: none; }
.post-card h3 a:hover { color: var(--blue-ink); }
.post-card p { font-size: 15px; }
.post-wrap { max-width: 860px; display: grid; gap: 28px; }
.post { padding-top: 32px; }
.post-head { display: grid; gap: 14px; }
.post-head h1 { font-size: clamp(34px, 4.8vw, 54px); }
.post-lead { font-size: 19px; color: var(--fg); }
.post-by { font-size: 14px; color: var(--muted); }
.post-cover { margin: 0; border-radius: 10px; overflow: hidden; aspect-ratio: 16 / 9; background: var(--surface-2); }
.post-cover img { width: 100%; height: 100%; object-fit: cover; }
.prose { font-size: 17px; line-height: 1.75; max-width: 70ch; min-width: 0; }
.prose > * + * { margin-top: 1em; }
.prose h2 { font-size: 32px; margin-top: 1.6em; }
.prose h3 { font-size: 25px; margin-top: 1.4em; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li + li { margin-top: .35em; }
.prose strong { color: var(--fg); }
.prose img { border-radius: 8px; height: auto; }
.prose blockquote { margin-left: 0; padding-left: 18px; border-left: 3px solid var(--gold); color: var(--fg); font-style: italic; }
.prose table { border-collapse: collapse; width: 100%; display: block; overflow-x: auto; }
.prose th, .prose td { border: 1px solid var(--line); padding: 8px 12px; text-align: left; }
.proj-prose { margin-top: 36px; }
.post-cta { border: 1px solid var(--gold); border-radius: 10px; padding: 24px; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 18px; background: var(--surface); }
.post-cta > div:first-child { display: grid; gap: 6px; }
.post-cta .acts { display: flex; flex-wrap: wrap; gap: 10px; }
