/* Màu chính của web: đổi --accent (sáng) và --accent trong khối tối bên dưới */
@font-face {
  font-family: "Bricolage";
  src: url("assets/fonts/bricolage.woff2") format("woff2");
  font-weight: 200 800;
  font-display: swap;
}
@font-face {
  font-family: "Geist";
  src: url("assets/fonts/geist.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --bg: #f3f4f1;
  --surface: #fbfcfa;
  --ink: #15181c;
  --on-ink: #f3f4f1;
  --muted: #565c63;
  --on-ink-muted: #b9bec3;
  --line: #d9dcd6;
  --field-line: #7d848a;
  --accent: #d23f14;
  --accent-hover: #b83610;
  --on-accent: #fbfcfa;
  --error: #ad2e0a;
  --cell-ink: #15181c;
  --check-on-ink: #ff6a3d;
  --radius-large: 20px;
  --radius: 12px;
  --font-display: "Bricolage", "Segoe UI", sans-serif;
  --font-body: "Geist", "Segoe UI", sans-serif;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121417;
    --surface: #1a1d21;
    --ink: #eceee9;
    --on-ink: #eceee9;
    --muted: #a6abb0;
    --on-ink-muted: #b0b5ba;
    --line: #2c3035;
    --field-line: #7f858b;
    --accent: #ff6a3d;
    --accent-hover: #ff855f;
    --on-accent: #15181c;
    --error: #ff9473;
    --cell-ink: #24282d;
  }
  .hero-media img { filter: brightness(0.92); }
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-padding-top: 88px; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, p, ul, ol, fieldset { margin: 0; padding: 0; }
ul, ol { list-style: none; }
fieldset { border: 0; min-width: 0; }
img { display: block; max-width: 100%; }
a { color: inherit; }

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.04;
}

.wrap {
  width: 100%;
  max-width: 1320px;
  margin-inline: auto;
  padding-inline: clamp(20px, 4vw, 48px);
}

.lead {
  color: var(--muted);
  font-size: clamp(1.0625rem, 1.5vw, 1.25rem);
  max-width: 46ch;
}

/* Nút */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 15px 24px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: var(--accent);
  color: var(--on-accent);
  font: inherit;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.2s var(--ease), border-color 0.2s var(--ease), transform 0.2s var(--ease);
}
.btn:hover { background: var(--accent-hover); }
.btn:active { transform: translateY(1px) scale(0.985); }
.btn-small { padding: 10px 16px; font-size: 0.9375rem; }
.btn-ghost { background: transparent; border-color: var(--field-line); color: var(--ink); }
.btn-ghost:hover { background: var(--surface); border-color: var(--ink); }
.icon { width: 18px; height: 18px; flex: none; }

:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.btn:focus-visible { border-radius: var(--radius); }

/* Thanh trên cùng */
.nav {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}
.nav-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 68px; }
.nav-links { display: flex; align-items: center; gap: clamp(16px, 2vw, 28px); margin-left: auto; }
.nav-link { font-size: 0.9375rem; font-weight: 500; text-decoration: none; white-space: nowrap; }
.nav-link:hover, .nav-link[aria-current="page"] { text-decoration: underline; text-underline-offset: 6px; text-decoration-thickness: 2px; }
.nav-link[aria-current="page"] { font-weight: 700; }
.nav-link-quote { display: none; }
.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--field-line);
  border-radius: var(--radius);
  background: transparent;
  color: var(--ink);
  cursor: pointer;
}
.nav-toggle .icon { width: 22px; height: 22px; }
.nav-toggle .icon-close { display: none; }
.nav-toggle[aria-expanded="true"] .icon-open { display: none; }
.nav-toggle[aria-expanded="true"] .icon-close { display: block; }
.nav-toggle:focus-visible { border-radius: var(--radius); }

.brand {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.125rem;
  letter-spacing: -0.01em;
  text-decoration: none;
  white-space: nowrap;
}
.brand span { font-weight: 400; color: var(--muted); }

/* Đầu trang */
.hero {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  align-items: center;
  gap: clamp(32px, 5vw, 72px);
  padding-block: clamp(24px, 3vw, 40px);
}
.hero h1 { font-size: clamp(2.5rem, 4.4vw, 3.9rem); margin-bottom: 24px; text-wrap: balance; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.hero-media { height: min(calc(100dvh - 68px - 2 * clamp(24px, 3vw, 40px)), 760px); min-height: 440px; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; border-radius: var(--radius-large); }

/* Dịch vụ */
.services { padding-block: clamp(56px, 7vw, 96px); }
.services h2, .quote h2 { font-size: clamp(2.25rem, 4vw, 3.5rem); }
.services h2 { margin-bottom: clamp(24px, 3vw, 40px); }

.services-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 16px; }
.cell {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 40px;
  min-height: 360px;
  padding: clamp(24px, 3vw, 40px);
  border: 1px solid var(--line);
  border-radius: var(--radius-large);
  background: var(--surface);
}
.cell-wide { grid-column: span 7; }
.cell-narrow { grid-column: span 5; }
.cell h3 { font-size: clamp(1.75rem, 3vw, 2.75rem); margin-bottom: 12px; }
.cell p { color: var(--muted); max-width: 44ch; }

.checks { display: grid; gap: 8px; font-weight: 500; }
.checks li { display: flex; align-items: flex-start; gap: 10px; }
.checks li::before {
  content: "";
  flex: none;
  width: 18px;
  height: 18px;
  margin-top: 4px;
  background: var(--accent);
  mask: url("assets/check.svg") center / contain no-repeat;
  -webkit-mask: url("assets/check.svg") center / contain no-repeat;
}

.cell-ink { background: var(--cell-ink); border-color: transparent; color: var(--on-ink); }
.cell-ink p { color: var(--on-ink-muted); }
.cell-ink .checks li::before { background: var(--check-on-ink); }
.cell-accent { background: var(--accent); border-color: transparent; color: var(--on-accent); }
.cell-accent p { color: var(--on-accent); }
.cell-accent .checks li::before { background: var(--on-accent); }
.cell-foot { display: grid; gap: 24px; }
.cell-link { display: inline-flex; align-items: center; gap: 8px; justify-self: start; font-weight: 600; text-decoration: underline; text-underline-offset: 5px; text-decoration-thickness: 1px; }
.cell-link:hover { text-decoration-thickness: 2px; }
.cell-link .icon { transition: transform 0.2s var(--ease); }
.cell-link:hover .icon { transform: translateX(3px); }

/* Xin báo giá */
.quote {
  display: grid;
  grid-template-columns: 5fr 7fr;
  align-items: start;
  gap: clamp(32px, 6vw, 96px);
  padding-block: clamp(24px, 3vw, 40px) clamp(64px, 8vw, 112px);
}
.quote h2 { margin-bottom: 16px; }
.quote-intro { position: sticky; top: 100px; }

.next { display: grid; gap: 20px; margin-top: clamp(32px, 4vw, 48px); max-width: 44ch; }
.next li { color: var(--muted); }
.next strong {
  display: block;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 1.375rem;
  font-weight: 700;
  letter-spacing: -0.015em;
}
.prefer { margin-top: 32px; color: var(--muted); }
.prefer a { color: var(--ink); font-weight: 600; }

.form {
  display: grid;
  gap: 22px;
  padding: clamp(20px, 3vw, 40px);
  border: 1px solid var(--line);
  border-radius: var(--radius-large);
  background: var(--surface);
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.field { display: grid; gap: 8px; align-content: start; }
.field label, .field legend { font-weight: 600; font-size: 0.9375rem; }
.field legend { padding: 0; margin-bottom: 8px; }
.optional { color: var(--muted); font-weight: 400; }

.field input[type="text"],
.field input[type="email"],
.field select,
.field textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--field-line);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--ink);
  font: inherit;
  transition: border-color 0.2s var(--ease);
}
.field textarea { resize: vertical; min-height: 112px; }
.field input:hover, .field select:hover, .field textarea:hover { border-color: var(--ink); }
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible { border-radius: var(--radius); outline-offset: 0; }
.field [aria-invalid="true"] { border-color: var(--error); }

.picks { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pick { position: relative; display: block; cursor: pointer; }
.pick input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.pick span {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 100%;
  padding: 12px 14px;
  border: 1px solid var(--field-line);
  border-radius: var(--radius);
  background: var(--bg);
  font-weight: 500;
  font-size: 0.9375rem;
  line-height: 1.3;
  transition: background-color 0.2s var(--ease), border-color 0.2s var(--ease), color 0.2s var(--ease);
}
.pick:hover span { border-color: var(--ink); }
.pick span::before {
  content: "";
  flex: none;
  width: 16px;
  height: 16px;
  background: currentColor;
  mask: url("assets/check.svg") center / contain no-repeat;
  -webkit-mask: url("assets/check.svg") center / contain no-repeat;
  opacity: 0;
}
.pick input:checked + span { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.pick input:checked + span::before { opacity: 1; }
.pick input:focus-visible + span { outline: 3px solid var(--accent); outline-offset: 2px; }

.error { color: var(--error); font-size: 0.9375rem; font-weight: 500; }
.btn-submit { width: 100%; }
.form-status { padding: 12px 14px; border-radius: var(--radius); background: var(--bg); border: 1px solid var(--field-line); font-size: 0.9375rem; }
.form-status a { font-weight: 600; }
.form-status.is-error { border-color: var(--error); color: var(--error); }

/* Trang dịch vụ */
.page-hero {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  align-items: center;
  gap: clamp(32px, 5vw, 72px);
  padding-block: clamp(32px, 4vw, 56px);
}
.page-hero h1 { font-size: clamp(2.5rem, 4.4vw, 3.9rem); margin-bottom: 20px; text-wrap: balance; }
.page-hero .hero-media { height: auto; min-height: 0; }
.page-hero img { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius-large); }

.handle h2, .process h2, .ask h2, .faq h2, .band h2 { font-size: clamp(1.75rem, 3vw, 2.5rem); }
.handle {
  display: grid;
  grid-template-columns: 4fr 8fr;
  align-items: start;
  gap: clamp(32px, 6vw, 96px);
  padding-block: clamp(40px, 5vw, 72px);
}
.handle-title { position: sticky; top: 100px; }
.handle-title p { margin-top: 14px; color: var(--muted); max-width: 38ch; }
.handle-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 36px 40px; }
.handle-list h3, .faq-list h3 { font-size: 1.25rem; letter-spacing: -0.015em; line-height: 1.2; margin-bottom: 8px; }
.handle-list p, .faq-list p { color: var(--muted); }

.process {
  margin-top: clamp(8px, 2vw, 24px);
  padding: clamp(28px, 4vw, 56px);
  border-radius: var(--radius-large);
  background: var(--cell-ink);
  color: var(--on-ink);
}
.process h2 { margin-bottom: clamp(24px, 3vw, 40px); }
.process-steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px; }
.process-steps li { padding-top: 16px; border-top: 2px solid var(--check-on-ink); color: var(--on-ink-muted); }
.process-steps strong {
  display: block;
  margin-bottom: 8px;
  color: var(--on-ink);
  font-family: var(--font-display);
  font-size: 1.375rem;
  font-weight: 700;
  letter-spacing: -0.015em;
}

.asks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; padding-block: 16px 0; }
.ask { padding: clamp(24px, 3vw, 40px); border: 1px solid var(--line); border-radius: var(--radius-large); background: var(--surface); }
.ask h2 { margin-bottom: 20px; }

.faq { padding-block: clamp(56px, 7vw, 96px); }
.faq h2 { margin-bottom: clamp(24px, 3vw, 40px); }
.faq-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 36px clamp(32px, 5vw, 72px); }
.faq-list p { max-width: 58ch; }

.band {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  margin-bottom: clamp(56px, 7vw, 96px);
  padding: clamp(28px, 4vw, 56px);
  border-radius: var(--radius-large);
  background: var(--accent);
  color: var(--on-accent);
}
.band h2 { margin-bottom: 8px; }
.btn-on-accent { flex: none; background: var(--cell-ink); color: var(--on-ink); }
.btn-on-accent:hover { background: var(--cell-ink); border-color: var(--on-accent); }

/* Chân trang */
.footer { border-top: 1px solid var(--line); padding-block: 32px; }
.footer-row { display: grid; grid-template-columns: auto 1fr; gap: clamp(24px, 6vw, 96px); align-items: start; }
.footer-copy { margin-top: 8px; color: var(--muted); font-size: 0.875rem; }
.footer-contact { justify-self: end; color: var(--muted); font-size: 0.875rem; font-style: normal; line-height: 1.7; text-align: right; }
.footer-contact strong { display: block; color: var(--ink); }
.footer-contact a { text-underline-offset: 3px; }

/* Hiệu ứng lúc mở trang: chữ hiện lần lượt để mắt đọc tiêu đề trước */
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
  .hero-copy > * { animation: rise 0.7s var(--ease) both; }
  .hero-copy > :nth-child(2) { animation-delay: 70ms; }
  .hero-copy > :nth-child(3) { animation-delay: 140ms; }
  .hero-media { animation: fade 0.9s var(--ease) both; }
  @keyframes rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
  @keyframes fade { from { opacity: 0; } to { opacity: 1; } }
}
@media (prefers-reduced-motion: reduce) {
  .btn, .pick span, .field input, .field select, .field textarea { transition: none; }
}

/* Màn nhỏ: mọi khối về một cột */
@media (max-width: 1023px) {
  .nav-row { position: relative; }
  .nav-row .btn-small { margin-left: auto; }
  .nav-toggle { display: inline-flex; }
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin: 0;
    padding: 8px clamp(20px, 4vw, 48px) 16px;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }
  .nav-links.is-open { display: flex; }
  .nav-link { display: flex; align-items: center; min-height: 48px; font-size: 1.0625rem; }
  .nav-link-quote { display: none; }
  .quote { grid-template-columns: 1fr; }
  .quote-intro, .handle-title { position: static; }
  .handle { grid-template-columns: 1fr; }
  .process-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cell { min-height: 320px; }
}
@media (max-width: 767px) {
  .hero { grid-template-columns: 1fr; padding-block: 32px 16px; }
  .hero-media { height: auto; min-height: 0; aspect-ratio: 4 / 3; }
  .services-grid { grid-template-columns: 1fr; }
  .cell-wide, .cell-narrow { grid-column: auto; }
  .cell { min-height: 0; }
  .form-row, .picks { grid-template-columns: 1fr; }
  .page-hero, .handle-list, .process-steps, .asks, .faq-list { grid-template-columns: 1fr; }
  .band { flex-direction: column; align-items: flex-start; }
  .footer-row { grid-template-columns: 1fr; }
  .footer-contact { justify-self: start; text-align: left; }
}
/* Điện thoại: thanh trên không đủ chỗ cho cả nút, Get a quote chuyển vào menu */
@media (max-width: 479px) {
  .nav-row .btn-small { display: none; }
  .nav-toggle { margin-left: auto; }
  .nav-link-quote { display: flex; font-weight: 700; }
}
