/* =========================================================
   Khoảng Studio – template nt-04 (thietkeweb.dev)
   Mobile-first · no framework
   ========================================================= */
:root {
  --bg: #f2f1ed;
  --surface: #e8e6e0;
  --ink: #111111;
  --muted: #6b6a66;
  --pri: #111111;
  --acc: #e5482b;
  --acc-text: #c63a20;
  --line: #d9d7d0;
  --line-strong: #c4c1b8;
  --shadow: none;
  --font: "Inter Tight", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --head: "Inter Tight", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
  --head-w: 600;
  --header-h: 64px;
  --call: #111111;
  --footer-bg: #111111;
  --btn-r: 0;
  --input-r: 0;
  --header-bg: rgba(242,241,237,.95);
  --input-bg: transparent;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); font-size: 16px; line-height: 1.65; color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; overflow-x: clip; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { margin: 0; line-height: 1.2; font-variant-numeric: lining-nums; }
h1, h2 { font-family: var(--head); font-weight: var(--head-w, 700); letter-spacing: var(--head-ls, -.01em); text-wrap: balance; }
h3 { font-size: 18px; font-weight: 600; }
p { margin: 0 0 1em; }
ul, ol { margin: 0; padding: 0; list-style: none; }
button, input, select, textarea { font: inherit; color: inherit; }
svg { fill: currentColor; }
:focus-visible { outline: 2px solid var(--acc); outline-offset: 3px; }
.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.skip { position: absolute; left: -999px; top: 0; z-index: 999; background: var(--pri); color: #fff; padding: 10px 16px; }
.skip:focus { left: 10px; top: 10px; }
[hidden] { display: none !important; }
.vh { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 12px 24px; border-radius: var(--btn-r, 10px); border: 1.5px solid transparent; font-weight: 600; font-size: 15px; cursor: pointer; transition: background .25s, color .25s, border-color .25s, transform .2s, box-shadow .25s; white-space: nowrap; line-height: 1.2; }
.btn:hover { transform: translateY(-1px); }
.btn svg { width: 18px; height: 18px; }
.btn--pri { background: var(--pri); color: var(--pri-ink, #fff); }
.btn--pri:hover { filter: brightness(1.08); box-shadow: var(--shadow); }
.btn--acc { background: var(--acc); color: var(--acc-ink, #fff); }
.btn--acc:hover { filter: brightness(1.06); box-shadow: var(--shadow); }
.btn--ghost { border-color: rgba(255,255,255,.7); color: #fff; }
.btn--ghost:hover { background: rgba(255,255,255,.12); }
.btn--line { border-color: currentColor; color: var(--pri); }
.btn--line:hover { background: var(--pri); color: var(--pri-ink, #fff); border-color: var(--pri); }
.btn--sm { min-height: 40px; padding: 8px 16px; font-size: 14px; }
.btn--block { width: 100%; }

.eyebrow { display: inline-block; font-size: 13px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--acc-text, var(--acc)); margin-bottom: 10px; }

/* ---------- Header ---------- */
.header { position: sticky; top: 0; z-index: 50; background: var(--header-bg, rgba(255,255,255,.96)); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); transition: box-shadow .3s; }
.header.is-scrolled { box-shadow: 0 8px 24px -16px rgba(0,0,0,.35); }
.header__inner { display: flex; align-items: center; justify-content: space-between; height: var(--header-h); gap: 16px; }
.logo { display: inline-flex; align-items: center; gap: 10px; color: var(--logo, var(--ink)); flex: none; }
.logo__mark { width: 38px; height: 38px; flex: none; color: var(--acc); }
.logo__text { font-family: var(--head); font-size: 21px; font-weight: 700; line-height: 1; display: flex; flex-direction: column; letter-spacing: -.01em; }
.logo__text small { font-family: var(--font); font-size: 10px; letter-spacing: .18em; text-transform: uppercase; font-weight: 600; color: var(--muted); margin-top: 5px; }
.header__actions { display: flex; align-items: center; gap: 8px; }
.burger { width: 44px; height: 44px; border: 0; background: transparent; display: grid; place-content: center; gap: 5px; cursor: pointer; border-radius: 8px; color: var(--logo, var(--ink)); }
.burger span { display: block; width: 22px; height: 2px; background: currentColor; border-radius: 2px; transition: transform .3s, opacity .3s; }
.menu-open .burger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-open .burger span:nth-child(2) { opacity: 0; }
.menu-open .burger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.nav { position: absolute; top: 100%; left: 0; right: 0; height: calc(100vh - var(--header-h)); height: calc(100dvh - var(--header-h)); background: var(--nav-bg, var(--bg)); color: var(--nav-ink, var(--ink)); padding: 12px 20px 40px; opacity: 0; transform: translateY(-8px); visibility: hidden; transition: opacity .3s, transform .3s, visibility .3s; overflow-y: auto; display: flex; flex-direction: column; gap: 22px; border-top: 1px solid var(--line); }
.menu-open .nav { opacity: 1; transform: none; visibility: visible; }
.menu-open { overflow: hidden; }
.nav ul { display: flex; flex-direction: column; }
.nav li a { display: block; padding: 13px 4px; font-size: 17px; font-weight: 500; border-bottom: 1px solid var(--line); }
.nav li a:hover { color: var(--acc-text, var(--acc)); }

/* ---------- Sections ---------- */
.section { padding: 64px 0; }
.section--alt { background: var(--surface); }
.sec-head { max-width: 680px; margin: 0 0 32px; }
.sec-head--center { margin-left: auto; margin-right: auto; text-align: center; }
.sec-head h2 { font-size: clamp(28px, 5vw, 42px); margin-bottom: 12px; }
.sec-head p { color: var(--muted); margin: 0; }
.sec-head--light h2 { color: #fff; }
.sec-head--light p { color: rgba(255,255,255,.78); }
.muted { color: var(--muted); }
.note { font-size: 13px; color: var(--muted); margin-top: 18px; }

/* ---------- Forms ---------- */
.form { display: grid; gap: 14px; }
.field label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 6px; }
.field label span { color: var(--acc-text, var(--acc)); }
.field input, .field select, .field textarea { width: 100%; min-height: 48px; padding: 11px 14px; border-radius: var(--input-r, 8px); border: 1.5px solid var(--line-strong, var(--line)); background: var(--input-bg, #fff); color: var(--input-ink, var(--ink)); transition: border-color .2s, box-shadow .2s; appearance: none; -webkit-appearance: none; }
.field select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 10l5 5 5-5z' fill='%23777'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; background-size: 22px; padding-right: 38px; }
.field textarea { min-height: 96px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--acc); box-shadow: 0 0 0 3px color-mix(in srgb, var(--acc) 22%, transparent); }
.field [aria-invalid="true"] { border-color: #d33c3c; }
.err { display: block; color: #d33c3c; font-size: 13px; min-height: 0; margin-top: 4px; }
.err:empty { display: none; }
.form__privacy { font-size: 12.5px; color: var(--muted); margin: 0; }
.form__ok { padding: 14px 16px; border-radius: 10px; background: #e8f6ec; color: #1d5e33; border: 1px solid #b9e2c6; font-size: 14.5px; }

/* ---------- Footer ---------- */
.footer { background: var(--footer-bg, #111); color: var(--footer-ink, rgba(255,255,255,.72)); padding: 56px 0 0; font-size: 14.5px; }
.footer__grid { display: grid; gap: 32px; padding-bottom: 36px; }
.footer .logo { color: #fff; }
.footer .logo__text small { color: rgba(255,255,255,.55); }
.footer__brand p { margin: 16px 0 0; max-width: 360px; }
.footer__title { font-family: var(--font); font-size: 13px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: #fff; margin-bottom: 14px; }
.footer__links li { margin-bottom: 9px; }
.footer__links a:hover { color: #fff; text-decoration: underline; }
.footer__bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 20px; border-top: 1px solid rgba(255,255,255,.12); padding-top: 18px; padding-bottom: 72px; font-size: 13px; }
.footer__bottom p { margin: 0; }
.footer__bottom a { text-decoration: underline; }

/* ---------- Floating contact + demo badge ---------- */
.float { position: fixed; right: 16px; bottom: 18px; z-index: 60; display: flex; flex-direction: column; gap: 12px; }
.float__btn { width: 50px; height: 50px; border-radius: 50%; display: grid; place-items: center; box-shadow: 0 8px 20px -6px rgba(0,0,0,.35); position: relative; transition: transform .2s; }
.float__btn:hover { transform: scale(1.06); }
.float__btn--zalo { background: #0068ff; }
.float__btn--zalo svg { width: 38px; height: 38px; }
.float__btn--call { background: var(--call, var(--acc)); }
.float__btn--call svg { width: 24px; height: 24px; fill: var(--call-ink, #fff); }
.float__btn--call::after { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--call, var(--acc)); animation: ring 2s infinite; }
@keyframes ring { 0% { transform: scale(1); opacity: .8; } 100% { transform: scale(1.5); opacity: 0; } }
.demo-badge { position: fixed; left: 10px; bottom: 10px; z-index: 65; max-width: calc(100% - 90px); font: 500 11px/1.3 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color: #fff; background: rgba(17,17,17,.82); padding: 6px 11px; border-radius: 999px; box-shadow: 0 4px 12px rgba(0,0,0,.2); opacity: .9; transition: opacity .2s; }
.demo-badge:hover { opacity: 1; text-decoration: underline; }
@media (min-width: 600px) { .demo-badge { font-size: 12px; } }

@media (min-width: 768px) {
  .section { padding: 88px 0; }
  .footer__grid { grid-template-columns: 1.4fr 1fr 1fr 1.2fr; }
  .float { right: 24px; bottom: 28px; }
  .float__btn { width: 56px; height: 56px; }
}
@media (min-width: 1024px) {
  .burger { display: none; }
  .nav { position: static; height: auto; background: none; color: inherit; padding: 0; opacity: 1; transform: none; visibility: visible; flex-direction: row; align-items: center; gap: 24px; border: 0; overflow: visible; }
  .nav ul { flex-direction: row; gap: 26px; }
  .nav li a { padding: 6px 0; font-size: 15px; border: 0; color: var(--logo, var(--ink)); }
  .nav__cta { display: none; }
  .container { padding: 0 32px; }
}
@media (max-width: 1023.98px) { .header__actions .btn--hide-m { display: none; } }
.logo { min-width: 0; flex: 0 1 auto; }
.logo__text { min-width: 0; white-space: nowrap; }
.logo__text small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 480px) {
  .header__inner { gap: 8px; }
  .logo { gap: 8px; }
  .logo__mark { width: 32px; height: 32px; }
  .logo__text { font-size: 18px; }
  .logo__text small { font-size: 8.5px; letter-spacing: .1em; }
  .header__actions { gap: 2px; }
  .header__actions .btn--sm { padding: 8px 12px; font-size: 13px; min-height: 38px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

.social { display: flex; gap: 10px; margin-top: 20px; }
.social a { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.22); }
.social a:hover { background: rgba(255,255,255,.1); }
.social svg { width: 17px; height: 17px; fill: #fff; }

/* ===== template-specific ===== */
.header { border-bottom: 1px solid var(--ink); }
.logo__mark { color: var(--ink); width: 30px; height: 30px; }
.logo__text { font-weight: 600; letter-spacing: -.03em; }
.nav li a { font-family: var(--mono); font-size: 13px !important; text-transform: uppercase; letter-spacing: .04em; }
.mono { font-family: var(--mono); font-size: 12.5px; letter-spacing: .02em; text-transform: uppercase; }
.btn { text-transform: uppercase; font-family: var(--mono); font-size: 13px; letter-spacing: .04em; }
.hero { padding: 40px 0 0; }
.hero__meta { display: flex; flex-wrap: wrap; gap: 6px 24px; color: var(--muted); margin-bottom: 28px; }
.hero h1 { font-size: clamp(54px, 13.5vw, 184px); line-height: .9; letter-spacing: -.055em; font-weight: 600; margin-bottom: 32px; }
.hero h1 i { font-style: normal; color: var(--acc); }
.hero__row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 20px; border-top: 1px solid var(--ink); padding-top: 20px; }
.hero__lead { max-width: 520px; font-size: 18px; margin: 0; }
.arrow-link { display: inline-flex; align-items: center; gap: 10px; font-family: var(--mono); text-transform: uppercase; font-size: 13px; border-bottom: 1px solid currentColor; padding-bottom: 4px; }
.arrow-link svg { width: 18px; height: 18px; transition: transform .2s; }
.arrow-link:hover svg { transform: translateX(4px); }
.hero__img { margin: 40px 0 0; }
.hero__img img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.hero__img figcaption { padding: 10px 20px 0; color: var(--muted); }
.line-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; border-bottom: 1px solid var(--ink); padding-bottom: 14px; margin-bottom: 36px; }
.line-head h2 { font-size: clamp(34px, 6vw, 72px); letter-spacing: -.045em; font-weight: 600; line-height: 1; }
.works { display: grid; gap: 48px; }
.work__img { display: block; overflow: hidden; background: var(--surface); }
.work__img img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; transition: transform .8s, filter .4s; filter: grayscale(.25); }
.work:hover .work__img img { transform: scale(1.03); filter: none; }
.work__meta { display: grid; grid-template-columns: 40px 1fr; gap: 2px 12px; padding-top: 14px; }
.work__meta h3 { font-size: 24px; font-weight: 600; letter-spacing: -.02em; }
.work__meta p { grid-column: 2; margin: 0; color: var(--muted); }
.work__meta .mono:first-child { padding-top: 6px; }
.table-wrap { overflow-x: auto; }
.index { width: 100%; min-width: 640px; border-collapse: collapse; font-size: 16px; }
.index th, .index td { text-align: left; padding: 16px 12px 16px 0; border-bottom: 1px solid var(--line-strong); vertical-align: baseline; }
.index thead th { font-family: var(--mono); font-size: 12px; font-weight: 400; text-transform: uppercase; color: var(--muted); }
.index tbody th { font-size: 20px; font-weight: 600; letter-spacing: -.02em; }
.index tbody tr { transition: background .2s; }
.index tbody tr:hover { background: #fff; }
@media (max-width: 639px) {
  .index { min-width: 0; font-size: 15px; }
  .index tr > :nth-child(3), .index tr > :nth-child(4) { display: none; }
  .index tbody th { font-size: 17px; }
}
.st { font-family: var(--mono); font-size: 12px; text-transform: uppercase; }
.st--on { color: var(--acc); }
.studio { display: grid; gap: 28px; }
.big { font-size: clamp(24px, 3.4vw, 38px); line-height: 1.25; letter-spacing: -.025em; font-weight: 500; margin-bottom: 24px; }
.studio__text > p:not(.big) { color: var(--muted); max-width: 560px; }
.facts { display: flex; gap: 40px; margin: 32px 0 0; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; font-size: 56px; font-weight: 600; letter-spacing: -.05em; line-height: 1; }
.studio__img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; filter: grayscale(1); }
.svc { display: grid; border-top: 1px solid var(--ink); }
.svc li { display: grid; grid-template-columns: 48px 1fr; gap: 4px 12px; padding: 22px 0; border-bottom: 1px solid var(--line-strong); }
.svc .mono { color: var(--acc); padding-top: 6px; }
.svc h3 { font-size: 26px; font-weight: 600; letter-spacing: -.03em; }
.svc p { grid-column: 2; margin: 0; color: var(--muted); }
.contact { display: grid; gap: 40px; }
.contact__mail { display: inline-block; font-size: clamp(26px, 5vw, 54px); letter-spacing: -.04em; font-weight: 600; border-bottom: 2px solid var(--acc); line-height: 1.15; word-break: break-all; }
.contact__info { margin-top: 24px; line-height: 2; color: var(--muted); }
.mform .field input, .mform .field select, .mform .field textarea { border: 0; border-bottom: 1.5px solid var(--ink); border-radius: 0; background-color: transparent; padding-left: 0; }
.mform .field label { font-family: var(--mono); font-size: 12px; text-transform: uppercase; font-weight: 400; color: var(--muted); }
.mform .btn { justify-self: start; padding: 14px 32px; }
@media (min-width: 600px) {
  .mform { grid-template-columns: 1fr 1fr; gap: 22px 28px; }
  .field--full { grid-column: 1 / -1; }
}
@media (min-width: 900px) {
  .hero { padding-top: 72px; }
  .hero__img figcaption { padding-left: 32px; }
  .works { grid-template-columns: repeat(12, 1fr); gap: 96px 32px; }
  .work--a { grid-column: 1 / span 7; }
  .work--b { grid-column: 9 / span 4; margin-top: 160px; }
  .work--b .work__img img { aspect-ratio: 4 / 5; }
  .studio { grid-template-columns: repeat(12, 1fr); gap: 32px; }
  .studio__head { grid-column: 1 / -1; margin-bottom: 8px; }
  .studio__text { grid-column: 1 / span 7; }
  .studio__img { grid-column: 9 / span 4; }
  .svc { grid-template-columns: repeat(4, 1fr); border-top: 0; }
  .svc li { grid-template-columns: 1fr; border-bottom: 0; border-left: 1px solid var(--line-strong); padding: 8px 24px 8px 20px; }
  .svc li p { grid-column: 1; }
  .contact { grid-template-columns: 1fr 1fr; gap: 80px; }
}
