/*
Theme Name: Minh Hoàng EACO
Theme URI: https://minhhoangeaco.com
Author: Minh Hoàng EACO
Description: Giao diện giới thiệu công ty Minh Hoàng EACO. Dự án, thông tin liên hệ và số liệu quản lý trong wp-admin.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: minhhoang-eaco
*/

/* Layout: trang giới thiệu công ty, cột trái đậm chữ, khối góc vát lấy từ hình học logo; thân sáng, dải tối ở cuối. */
:root {
  --bg: #FAF6F1;
  --surface: #FFFFFF;
  --ink: #17181C;
  --muted: #565B68;
  --line: #E9DFD3;
  --amber: #F4AC40;
  --orange: #E8743A;
  --red: #DE4130;
  --band: #1A130D;
  --band-ink: #F1F2F4;
  --band-muted: #B5A99B;
  --note-bg: #FFEBCB;
  --tint: #FBEBDA;
  --note-ink: #5A3300;
  --font: "Be Vietnam Pro", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #17110C; --surface: #211A14; --ink: #F5EEE6; --muted: #B5A99B; --line: #3A2E24;
    --band: #0F0B07; --tint: #1D1610; --note-bg: #2A2112; --note-ink: #F4D9A0; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #17110C; --surface: #211A14; --ink: #F5EEE6; --muted: #B5A99B; --line: #3A2E24;
  --band: #0F0B07; --tint: #1D1610; --note-bg: #2A2112; --note-ink: #F4D9A0; color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--font); font-size: 16px; line-height: 1.6;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); background: var(--bg); z-index: 20; }
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { text-wrap: balance; letter-spacing: -0.015em; line-height: 1.15; }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 3px; }
.wrap { max-width: 1120px; margin: 0 auto; }
section { padding-block: 72px; }
.eyebrow { font-size: 13px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); margin-bottom: 14px; }
.h2 { font-size: clamp(28px, 4vw, 40px); font-weight: 700; max-width: 22ch; }
.h2.caps { font-size: clamp(22px, 3vw, 32px); font-weight: 800; text-transform: uppercase; letter-spacing: 0.02em; line-height: 1.3; max-width: 30ch; }
.h2.caps span { font-weight: 500; color: var(--muted); }
.lead { color: var(--muted); font-size: 18px; max-width: 62ch; margin-top: 16px; }


/* header */
header.top { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 15; background: var(--bg); border-bottom: 1px solid var(--line); margin-inline: calc(-1 * max(16px, env(safe-area-inset-left, 0px))); padding-inline: max(16px, env(safe-area-inset-left, 0px)); }
.bar { display: flex; align-items: center; gap: 24px; min-height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand img { height: 32px; width: auto; }
.brand b { font-size: 19px; line-height: 1; font-weight: 800; letter-spacing: 0.02em; text-transform: uppercase; }
.brand span { font-weight: 500; color: var(--muted); }
nav.main { margin-left: auto; display: flex; gap: 4px; align-items: center; }
nav.main a { text-decoration: none; padding: 8px 12px; font-size: 15px; font-weight: 500; color: var(--muted); border-radius: 4px; }
nav.main a:hover { color: var(--ink); background: var(--surface); }
.menu-btn { display: none; margin-left: auto; background: none; border: 1px solid var(--line); color: var(--ink); padding: 8px 14px; border-radius: 4px; font: inherit; font-weight: 600; cursor: pointer; }

/* nút */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 13px 22px; font: inherit; font-weight: 700; font-size: 16px; text-decoration: none; border: 0; border-radius: 4px; cursor: pointer; }
.btn.primary { background: linear-gradient(90deg, var(--amber), var(--orange)); color: #17181C; }
.btn.primary:hover { filter: brightness(1.05); }
.btn.ghost { background: transparent; color: var(--ink); border: 1.5px solid var(--ink); }
.btn.ghost:hover { background: var(--surface); }

/* hero */
.hero { padding-block: 64px 72px; overflow-x: clip; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr); gap: 56px; align-items: center; }
.hero h1 { font-size: clamp(34px, 5.4vw, 58px); font-weight: 800; }
.hero h1 em { font-style: normal; background: linear-gradient(90deg, var(--amber), var(--red)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero .lead { margin-top: 22px; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.stage { position: relative; aspect-ratio: 1 / 1; width: 100%; max-width: 460px; margin-inline: auto; display: grid; place-items: center; }
.trail { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 0; }
.stage-logo { width: 31%; height: auto; position: relative; z-index: 1; }
.ring { position: absolute; border-radius: 50%; border: 1.5px dashed var(--amber); opacity: .55; }
.r1 { inset: 15%; }
.r2 { inset: 4%; border-style: solid; border-color: var(--line); opacity: 1; }
.fl { position: absolute; z-index: 2; width: 22px; height: 22px; border-radius: 50%; background: linear-gradient(180deg, var(--amber), var(--red)); box-shadow: 0 0 0 5px rgba(244,172,64,.22); cursor: pointer; --s: 1; translate: -50% -50%; transform: scale(var(--s)); transition: transform .14s ease-out, box-shadow .3s ease; }
.fl::after { content: ""; position: absolute; inset: -22px; border-radius: 50%; }
.fl::before { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--amber); animation: pulse 2.4s ease-out infinite; }
.fl b { position: absolute; left: 50%; bottom: calc(100% + 12px); white-space: nowrap; font-size: 14px; font-weight: 600; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 8px 14px; box-shadow: 0 14px 30px rgba(23,24,28,.16); opacity: 0; pointer-events: none; transform: translate(var(--tx, -50%), 8px) scale(calc(.8 / var(--s))); transform-origin: 50% 100%; transition: opacity .2s ease, transform .3s cubic-bezier(.34,1.56,.64,1); }
.fl.near { box-shadow: 0 0 0 5px rgba(244,172,64,.3), 0 8px 18px rgba(232,116,58,.4); }
.stage.dock .fl::before { animation: none; opacity: 0; }
.fl:hover, .fl:focus-visible { z-index: 3; }
.fl:hover b, .fl:focus-visible b { opacity: 1; transform: translate(var(--tx, -50%), 0) scale(calc((1 + (var(--s) - 1) * .45) / var(--s))); }
.fl.el { --tx: -12%; } .fl.er { --tx: -88%; }
.fl.on { z-index: 3; }
.fl.on b { opacity: 1; transform: translate(var(--tx, -50%), 0) scale(calc((1 + (var(--s) - 1) * .45) / var(--s))); }
@keyframes pulse { from { transform: scale(1); opacity: .8; } to { transform: scale(2.6); opacity: 0; } }
.f1 { top: 16%; left: 22%; }
.f2 { top: 28%; right: 12%; }
.f3 { top: 52%; left: 16%; }
.f4 { bottom: 22%; right: 12%; }
.f5 { bottom: 10%; left: 38%; }

/* số liệu */
.stats { padding-block: 44px; margin-inline: calc(-1 * max(16px, env(safe-area-inset-left, 0px))); padding-inline: max(16px, env(safe-area-inset-left, 0px)); background: linear-gradient(100deg, #F4AC40, #EA7F3C); color: #17181C; }
.stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.stat { padding: 4px 20px 4px 0; }
.stat + .stat { padding-left: 24px; border-left: 1px solid rgba(23,24,28,.22); }
.stat .n { font-size: clamp(38px, 5vw, 56px); font-weight: 800; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; line-height: 1; }
.stat .n small { font-size: 0.45em; font-weight: 700; color: rgba(23,24,28,.72); margin-left: 3px; }
.stat p { color: rgba(23,24,28,.82); font-size: 15px; font-weight: 500; margin-top: 10px; }
.sample-tag { margin-top: 16px; font-size: 13px; color: var(--muted); }

/* điểm khác biệt */
.diff-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 40px; border-top: 1px solid var(--line); }
.diff { padding: 28px 28px 8px 0; }
.diff + .diff { padding-left: 28px; border-left: 1px solid var(--line); }
.diff h3 { font-size: 21px; font-weight: 700; }
.diff p { color: var(--muted); margin-top: 10px; }
.diff ul { margin: 16px 0 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.diff li { padding-left: 22px; position: relative; font-size: 15px; }
.diff li::before { content: ""; position: absolute; left: 0; top: 0.6em; width: 10px; height: 2px; background: var(--orange); }

/* cam kết tận tâm */
.commit { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 32px; align-items: start; margin-top: 40px; padding-top: 28px; border-top: 2px solid var(--ink); }
.commit h3 { font-size: clamp(24px, 3vw, 32px); font-weight: 800; }
.commit h3 span { display: block; width: 44px; height: 6px; margin-top: 14px; background: linear-gradient(90deg, var(--amber), var(--red)); }
.commit p { color: var(--muted); font-size: 18px; max-width: 60ch; }

/* giải pháp */
.sol-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 40px; }
.sol { background: var(--surface); border: 1px solid var(--line); border-radius: 4px; padding: 24px; display: flex; flex-direction: column; gap: 10px; }
.sol { transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease; }
.sol:hover { transform: translateY(-4px); border-color: var(--amber); box-shadow: 0 14px 30px rgba(232,116,58,.14); }
.sol .ico { width: 34px; height: 34px; fill: none; stroke: var(--orange); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; margin-bottom: 10px; }
.sol .tag { font-size: 12px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--orange); }
.sol h3 { font-size: 19px; font-weight: 700; }
.sol p { color: var(--muted); font-size: 15px; }

/* dự án */
.proj-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin-top: 40px; }
.proj { background: var(--surface); border: 1px solid var(--line); border-radius: 4px; overflow: hidden; display: flex; flex-direction: column; }
.proj .ph { aspect-ratio: 16 / 10; display: grid; place-items: center; font-size: 13px; color: var(--muted); background: repeating-linear-gradient(135deg, var(--bg) 0 14px, color-mix(in srgb, var(--line) 60%, var(--bg)) 14px 28px); border-bottom: 1px solid var(--line); }
.proj .body { padding: 22px; display: grid; gap: 14px; }
.proj .tag { font-size: 12px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.proj h3 { font-size: 20px; font-weight: 700; }
.proj dl { margin: 0; display: grid; gap: 10px; }
.proj dt { font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--orange); }
.proj dd { margin: 2px 0 0; font-size: 15px; color: var(--muted); }

/* quy trình */
.steps { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0; margin: 40px 0 0; padding: 0; list-style: none; counter-reset: s; }
.steps li { counter-increment: s; padding: 0 20px 0 0; position: relative; }
.steps li::before { content: counter(s); display: grid; place-items: center; width: 40px; height: 40px; font-weight: 800; color: #17181C; background: linear-gradient(135deg, var(--amber), var(--orange)); clip-path: polygon(0 0, 100% 0, 100% 72%, 72% 100%, 0 100%); margin-bottom: 16px; }
.steps li::after { content: ""; position: absolute; top: 20px; left: 52px; right: 12px; height: 1px; background: var(--line); }
.steps li:last-child::after { display: none; }
.steps .ico { display: block; width: 30px; height: 30px; fill: none; stroke: var(--orange); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; margin-bottom: 10px; }
.steps h3 { font-size: 17px; font-weight: 700; }
.steps p { color: var(--muted); font-size: 14.5px; margin-top: 6px; }

/* hành trình */
.timeline { margin: 40px 0 0; padding: 0; list-style: none; display: grid; max-width: 760px; }
.timeline li { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 24px; padding: 20px 0; border-top: 1px solid var(--line); }
.timeline .when { font-weight: 800; font-variant-numeric: tabular-nums; }
.timeline h3 { font-size: 18px; font-weight: 700; }
.timeline p { color: var(--muted); margin-top: 4px; font-size: 15px; }

/* nhận xét (ô giữ chỗ) */
.quote { border: 1.5px dashed var(--line); padding: 36px; max-width: 820px; }
.quote p { font-size: clamp(20px, 2.6vw, 26px); font-weight: 600; line-height: 1.4; color: var(--muted); }
.quote small { display: block; margin-top: 14px; font-size: 14px; color: var(--muted); }

/* liên hệ */
.contact-grid { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 56px; margin-top: 36px; }
.info { margin: 0; display: grid; gap: 28px; align-self: center; align-content: center; }
.info dt { font-size: 12px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.info dd { margin: 2px 0 0; font-weight: 600; font-size: 18px; user-select: all; }
form.contact { background: var(--surface); border: 1px solid var(--line); border-radius: 4px; padding: 28px; display: grid; gap: 18px; }
form.contact label, form.contact legend { font-size: 14px; font-weight: 600; }
form.contact input[type="text"], form.contact input[type="tel"], form.contact textarea { width: 100%; margin-top: 6px; padding: 11px 12px; font: inherit; color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: 4px; }
form.contact textarea { min-height: 120px; resize: vertical; }
#formMsg:empty { display: none; }
#quy-trinh { background: var(--tint); margin-inline: calc(-1 * max(16px, env(safe-area-inset-left, 0px))); padding-inline: max(16px, env(safe-area-inset-left, 0px)); }
#lien-he .eyebrow, #lien-he .h2 { text-align: center; }
#lien-he .h2 { margin-inline: auto; max-width: 30ch; }
fieldset { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px 18px; }
fieldset legend { margin-bottom: 8px; }
fieldset label { font-weight: 500; display: flex; gap: 8px; align-items: center; }
fieldset label.other { flex: 1 1 100%; display: block; font-weight: 600; font-size: 14px; }
fieldset label.other[hidden] { display: none; }
fieldset label.other input { display: block; font-weight: 400; }
@keyframes pop { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
fieldset label.other:not([hidden]) { animation: pop .25s ease; }
.form-msg { font-size: 14px; color: var(--muted); min-height: 1.4em; }

/* footer */
footer { background: var(--band); color: var(--band-ink); margin-inline: calc(-1 * max(16px, env(safe-area-inset-left, 0px))); padding: 36px max(16px, env(safe-area-inset-left, 0px)) calc(36px + env(safe-area-inset-bottom, 0px)); }
footer .row { display: flex; flex-wrap: wrap; gap: 16px 32px; align-items: center; justify-content: space-between; }
footer .brand img { height: 28px; }
footer .brand b { font-size: 17px; }
footer p, footer a { color: var(--band-muted); font-size: 14px; }

/* điện thoại và máy tính bảng */
@media (max-width: 920px) {
  .hero-grid, .contact-grid { grid-template-columns: minmax(0, 1fr); gap: 36px; }
  .stage { max-width: 380px; }
  .sol-grid, .proj-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .diff-grid { grid-template-columns: minmax(0, 1fr); }
  .commit { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .diff, .diff + .diff { padding: 24px 0; border-left: 0; border-top: 1px solid var(--line); }
  .diff:first-child { border-top: 0; }
  .steps { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .steps li { padding: 0 0 0 56px; }
  .steps li::before { position: absolute; left: 0; top: 0; margin: 0; }
  .steps li::after { display: none; }
  .stat-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .stat:nth-child(3) { border-left: 0; padding-left: 0; }
  .stat:nth-child(n+3) { border-top: 1px solid rgba(23,24,28,.22); margin-top: 16px; padding-top: 22px; }
}
@media (max-width: 720px) {
  section { padding-block: 52px; }
  .menu-btn { display: inline-block; }
  nav.main { display: none; position: absolute; left: 0; right: 0; top: 100%; flex-direction: column; align-items: stretch; background: var(--bg); border-bottom: 1px solid var(--line); padding: 8px max(16px, env(safe-area-inset-left, 0px)) 14px; margin: 0; }
  nav.main.open { display: flex; }
  nav.main a { padding: 12px 8px; }
  .brand img { height: 28px; }
  .brand b { font-size: 16px; }
  .sol-grid, .proj-grid { grid-template-columns: minmax(0, 1fr); }
  .timeline li { grid-template-columns: 80px minmax(0, 1fr); gap: 14px; }
  .quote { padding: 24px; }
}
@media (max-width: 440px) {
  .stat-grid { grid-template-columns: minmax(0, 1fr); }
  .stat, .stat + .stat { padding-left: 0; border-left: 0; }
  .stat:nth-child(n+2) { border-top: 1px solid rgba(23,24,28,.22); margin-top: 16px; padding-top: 22px; }
}

/* chuyển động */
:root { --ease: cubic-bezier(.2,.7,.2,1); }
.progress { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 40; background: linear-gradient(90deg, var(--amber), var(--red)); transform: scaleX(0); transform-origin: 0 50%; pointer-events: none; }
header.top { transition: box-shadow .3s ease, background-color .3s ease; }
header.top.scrolled { box-shadow: 0 8px 24px rgba(23,24,28,.08); }
nav.main a:not(.btn) { position: relative; transition: color .2s ease, background-color .2s ease; }
nav.main a:not(.btn)::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: 3px; height: 2px; border-radius: 2px; background: linear-gradient(90deg, var(--amber), var(--red)); transform: scaleX(0); transform-origin: 0 50%; transition: transform .35s var(--ease); }
nav.main a:not(.btn).active { color: var(--ink); }
nav.main a:not(.btn).active::after { transform: scaleX(1); }
.btn { transition: transform .2s var(--ease), box-shadow .25s ease, filter .2s ease, background-color .2s ease; }
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn.primary:hover { box-shadow: 0 12px 24px rgba(232,116,58,.32); }
.btn.ghost:hover { box-shadow: 0 10px 22px rgba(23,24,28,.12); }
.proj { transition: transform .3s var(--ease), box-shadow .3s ease, border-color .3s ease; }
.proj:hover { transform: translateY(-4px); border-color: var(--amber); box-shadow: 0 14px 30px rgba(232,116,58,.14); }
@keyframes rise { from { opacity: 0; transform: translateY(26px); } to { opacity: 1; transform: none; } }
@keyframes appear { from { opacity: 0; transform: scale(.9); } to { opacity: 1; transform: none; } }
.hero .eyebrow, .hero h1, .hero .lead, .hero .cta { animation: rise .9s var(--ease) both; }
.hero h1 { animation-delay: .1s; }
.hero .lead { animation-delay: .22s; }
.hero .cta { animation-delay: .34s; }
.hero .stage { animation: appear 1.1s var(--ease) .25s both; }
.js .rv { opacity: 0; transform: translateY(26px); transition: opacity .8s var(--ease), transform .8s var(--ease); transition-delay: var(--d, 0ms); }
.js .rv.in { opacity: 1; transform: none; }

/* đối tác */
.partners { padding-block: 56px 0; }
.partners .eyebrow { text-align: center; }
.logos { list-style: none; margin: 22px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.logos li { aspect-ratio: 3 / 1; overflow: hidden; display: grid; place-items: center; padding: 0 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 4px; font-weight: 800; font-size: 18px; letter-spacing: .04em; color: var(--muted); transition: transform .3s var(--ease), box-shadow .3s ease, color .25s ease, border-color .3s ease; }
.logos li:hover { transform: translateY(-4px); color: var(--ink); border-color: var(--amber); box-shadow: 0 14px 28px rgba(232,116,58,.14); }
.logos li img { height: 54%; width: auto; max-width: 80%; }
.logos li img.wide { height: 46%; }
.logos li img.hpe { height: 36%; }
.logos li:not(.empty) { background: #fff; }
.logos li.fill { padding: 0; border: 0; }
.logos li.fill img { height: 100%; width: 100%; max-width: none; object-fit: cover; display: block; }
.logos li.fill:hover { box-shadow: 0 14px 28px rgba(224,17,10,.22); }
.logos li { padding: 0 16px; }
.logos li.empty { background: transparent; border-style: dashed; font-weight: 500; font-size: 13px; letter-spacing: 0; opacity: .7; }
.logos li.empty:hover { transform: none; box-shadow: none; border-color: var(--line); color: var(--muted); }
@media (max-width: 920px) { .logos { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .logos { gap: 12px; } }

/* quay bằng CSS thuần khi JavaScript bị tắt (ví dụ xem trước file trên iPhone) */
html:not(.js) .stage { container-type: inline-size; }
html:not(.js) .fl { left: 50%; top: 50%; right: auto; bottom: auto; animation: orb var(--dur) linear infinite; }
html:not(.js) .f1 { --a0: -110deg; --r: 35cqw; --dur: 40s; }
html:not(.js) .f3 { --a0: 10deg; --r: 35cqw; --dur: 40s; }
html:not(.js) .f5 { --a0: 130deg; --r: 35cqw; --dur: 40s; }
html:not(.js) .f2 { --a0: -35deg; --r: 46cqw; --dur: 65s; }
html:not(.js) .f4 { --a0: 145deg; --r: 46cqw; --dur: 65s; }
html:not(.js) .stage:hover .fl, html:not(.js) .fl:active { animation-play-state: paused; }
@keyframes orb {
  from { transform: rotate(var(--a0)) translateX(var(--r)) rotate(calc(-1 * var(--a0))); }
  to { transform: rotate(calc(var(--a0) + 360deg)) translateX(var(--r)) rotate(calc(-1 * (var(--a0) + 360deg))); }
}
section[hidden]{display:none!important}
.proj-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 1000px) { .proj-grid.three { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 720px) { .proj-grid.three { grid-template-columns: minmax(0, 1fr); } }
.proj .gal { position: relative; aspect-ratio: 16 / 10; background: radial-gradient(120% 90% at 30% 20%, var(--tint), var(--bg)); border-bottom: 1px solid var(--line); overflow: hidden; }
.proj .gal img { position: absolute; display: block; aspect-ratio: 4 / 3; height: auto; object-fit: cover; border: 5px solid #fff; border-radius: 3px; box-shadow: 0 10px 24px rgba(23,24,28,.26); transition: transform .4s var(--ease), box-shadow .4s ease; }
.proj .gal img:nth-child(1) { left: 5%; top: 10%; width: 53%; transform: rotate(-3.5deg); z-index: 1; }
.proj .gal img:nth-child(2) { right: 5%; bottom: 9%; width: 50%; transform: rotate(3deg); z-index: 2; }
.proj:hover .gal img:nth-child(1) { transform: rotate(-5deg) translate(-4px, -3px); }
.proj:hover .gal img:nth-child(2) { transform: rotate(4.5deg) translate(4px, 3px); }
.proj h3 { min-height: 2.5em; }

/* điện thoại: gọn lại để đỡ phải kéo */
@media (max-width: 720px) {
  section { padding-block: 36px; }
  .hero { padding-block: 28px 32px; }
  .hero-grid { gap: 8px; }
  .hero .lead { margin-top: 14px; font-size: 16px; }
  .hero .cta { margin-top: 20px; }
  .stage { max-width: 250px; }
  .stats { padding-block: 24px; }
  .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 0; }
  .stat, .stat + .stat { padding: 4px 8px 4px 0; border-left: 0; margin: 0; border-top: 0; }
  .stat:nth-child(even) { padding-left: 16px; border-left: 1px solid rgba(23,24,28,.22); }
  .stat:nth-child(n+3) { border-top: 1px solid rgba(23,24,28,.22); margin-top: 14px; padding-top: 14px; }
  .stat .n { font-size: 34px; }
  .stat p { font-size: 13.5px; margin-top: 6px; }
  .partners { padding-block: 32px 0; }
  .diff-grid { margin-top: 20px; }
  .diff, .diff + .diff { padding: 16px 0; }
  .diff h3 { font-size: 18px; }
  .diff p { font-size: 15px; margin-top: 6px; }
  .diff ul { margin-top: 10px; }
  .commit { margin-top: 12px; padding-top: 20px; }
  .commit p { font-size: 16px; }
  .h2 { font-size: 26px; }
  .sol-grid { gap: 10px; margin-top: 20px; }
  .sol { display: grid; grid-template-columns: 40px minmax(0, 1fr); column-gap: 14px; row-gap: 2px; padding: 14px 16px; align-items: center; }
  .sol .ico { grid-row: 1 / span 2; margin: 0; width: 30px; height: 30px; }
  .sol h3 { font-size: 16px; }
  .sol p { font-size: 13.5px; }
  .steps { gap: 16px; margin-top: 22px; }
  .steps .ico { display: none; }
  .steps li { padding-left: 52px; min-height: 40px; }
  .steps h3 { font-size: 16px; }
  .steps p { font-size: 14px; margin-top: 2px; }
  .info { gap: 14px; }
  .info dd { font-size: 17px; }
  .contact-grid { gap: 22px; }
}

/* tối ưu UX */
section[id], .hero { scroll-margin-top: 64px; }
.partners .eyebrow { text-align: left; }
fieldset { gap: 10px; }
fieldset label:not(.other) { position: relative; display: inline-flex; padding: 9px 16px; border: 1px solid var(--line); border-radius: 999px; background: var(--bg); cursor: pointer; font-size: 15px; transition: border-color .2s ease, background-color .2s ease, box-shadow .2s ease; }
fieldset label:not(.other) input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
fieldset label:not(.other):has(input:checked) { border-color: var(--orange); background: var(--tint); box-shadow: 0 0 0 1px var(--orange) inset; font-weight: 600; }
fieldset label:not(.other):has(input:focus-visible) { outline: 3px solid var(--orange); outline-offset: 2px; }
form.contact input[type="text"], form.contact input[type="tel"], form.contact textarea { font-size: 16px; transition: border-color .2s ease, box-shadow .2s ease; }
form.contact input:focus, form.contact textarea:focus { outline: 0; border-color: var(--orange); box-shadow: 0 0 0 3px rgba(234,127,60,.22); }
.callbar { display: none; }
@media (max-width: 720px) {
  body { padding-bottom: 76px; }
  .callbar { display: grid; grid-template-columns: 1fr; gap: 10px; position: fixed; left: 0; right: 0; bottom: 0; z-index: 35; padding: 10px max(14px, env(safe-area-inset-left, 0px)) calc(10px + env(safe-area-inset-bottom, 0px)); background: var(--bg); border-top: 1px solid var(--line); box-shadow: 0 -10px 28px rgba(23,24,28,.08); transition: transform .3s var(--ease); }
  .callbar.away { transform: translateY(110%); }
  .callbar .btn { justify-content: center; text-align: center; padding: 13px 10px; font-size: 16px; }
}

/* ===== WordPress ===== */
.hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; }
.form-msg.err { color: #C2410C; }
body.admin-bar header.top { top: 32px; }
body.admin-bar .progress { top: 32px; }
@media (max-width: 782px) { body.admin-bar header.top { top: 46px; } body.admin-bar .progress { top: 46px; } }
.proj-grid.one { grid-template-columns: minmax(0, 520px); }
.proj-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 720px) { .proj-grid.two { grid-template-columns: minmax(0, 1fr); } }
.proj .gal.solo img { left: 10%; top: 8%; width: 80%; transform: rotate(-1.5deg); }
.proj .gal.solo:hover img { transform: rotate(0deg); }
.proj .body dd { white-space: pre-line; }
