/* =========================================================
   VIETMYIC · Refinements
   Editorial service cards, unified photo grading, calmer cards.
   Loaded after style.css / decorations.css.
   ========================================================= */

/* ---------- Services: editorial cards, no template badges ---------- */
.svc-grid { row-gap: clamp(36px, 4vw, 64px); }
.svc__link, .svc__link:hover { background: transparent; border: 0; box-shadow: none; transform: none; }
.svc__badge { display: none; }
.svc__media { position: relative; aspect-ratio: 4 / 3; }
.svc__media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(12, 11, 9, .5), rgba(12, 11, 9, 0) 55%); opacity: 0; transition: opacity .9s var(--ease-out); }
.svc__media::before { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; z-index: 1; background: var(--c); transform: scaleX(0); transform-origin: left; transition: transform .9s var(--ease-out); }
.svc__link:hover .svc__media::after { opacity: 1; }
.svc__link:hover .svc__media::before { transform: scaleX(1); }
.svc__link:hover .svc__media img { transform: scale(1.045); }
.svc__body { background: transparent; padding: 22px 0 4px; }
.svc__num { position: static; order: -1; display: flex; align-items: center; gap: 14px; margin-bottom: 14px; font-family: var(--f-body); font-size: 12px; font-weight: 600; letter-spacing: .22em; color: var(--c); }
.svc__num::after { content: ""; flex: 1; height: 1px; background: var(--line); transition: background .6s; }
.svc__link:hover .svc__num::after { background: color-mix(in srgb, var(--c) 55%, var(--line)); }
.svc h3 { transition: color .4s; }
.svc__link:hover h3 { color: var(--c); }
.svc p { max-width: 36ch; }
.svc__more { color: var(--ink); padding-top: 18px; }
.svc__more span { background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat; transition: background-size .6s var(--ease-out); padding-bottom: 3px; }
.svc__link:hover .svc__more { color: var(--c); }
.svc__link:hover .svc__more span { background-size: 100% 1px; }

/* ---------- Unified photo grading for event & community photos ----------
   Event photos arrive with loud red stage backdrops and mixed white balance;
   a gentle shared grade makes the grid read as one set. Full colour on hover. */
.ppl img, .cm-card img, .mechanized img, .infra__hero img, .atlas img {
  filter: saturate(.84) contrast(1.04) brightness(.985);
  transition: filter .8s var(--ease-out), transform 1.3s var(--ease-out);
}
.ppl:hover img, .cm-card:hover img, .mechanized figure:hover img { filter: none; }
.ppl, .cm-card { overflow: hidden; }
.ppl img, .cm-card img { transform-origin: 50% 40%; }
.ppl:hover img, .cm-card:hover img { transform: scale(1.035); }
.ppl figcaption, .cm-card figcaption { letter-spacing: .04em; }

/* ---------- Project cards: calmer hover, consistent grading ---------- */
.pcard img { filter: saturate(.92) contrast(1.03); transition: filter .8s var(--ease-out), transform 1.4s var(--ease-out) !important; }
.pcard:hover img { filter: none; }

/* ---------- Section heads: tighter rhythm ---------- */
.section-head .eyebrow { letter-spacing: .26em; }

/* ---------- Buttons: fill wipe instead of colour jump ---------- */
.btn { position: relative; overflow: hidden; isolation: isolate; }
.btn--gold::before, .btn--line::before, .btn--ghost-light::before {
  content: ""; position: absolute; inset: 0; z-index: -1; transform: scaleY(0); transform-origin: bottom; transition: transform .55s var(--ease-out);
}
.btn--gold::before { background: var(--gold-dark); }
.btn--line::before { background: var(--ink); }
.btn--ghost-light::before { background: #fff; }
.btn--gold:hover::before, .btn--line:hover::before, .btn--ghost-light:hover::before { transform: scaleY(1); }
.btn--gold:hover { background: var(--gold); }
.btn--line:hover { background: transparent; }
.btn--ghost-light:hover { background: transparent; }

/* ---------- Featured projects: pinned horizontal gallery ---------- */
.fx { position: relative; padding: 0; background: #12110F; color: #F3EEE4; }
.fx-sticky { padding: clamp(56px, 6vw, 96px) 0 clamp(36px, 4vw, 56px); display: flex; flex-direction: column; overflow: hidden; }
.fx.is-pinned .fx-sticky { position: sticky; top: 0; height: 100vh; height: 100svh; justify-content: center; gap: clamp(18px, 2.6vh, 34px); padding: calc(var(--header-h) - 10px) 0 28px; }
.fx-head { display: grid; grid-template-columns: 1.15fr 1fr; gap: clamp(24px, 5vw, 96px); align-items: end; margin-bottom: clamp(28px, 3vw, 44px); }
.fx.is-pinned .fx-head { margin-bottom: 0; }
.fx .h2 { color: #F6F1E8; }
.fx .h2 em { color: #E2C48E; }
.fx .eyebrow { color: #C7A673; }
.fx-head__aside p { color: rgba(243, 238, 228, .68); font-size: 15px; line-height: 1.75; max-width: 46ch; margin-bottom: 20px; }
.fx-viewport { overflow: hidden; }
.fx-track { display: flex; gap: clamp(18px, 2vw, 32px); padding: 0 var(--gutter); padding-left: max(var(--gutter), calc((100vw - var(--maxw)) / 2 + var(--gutter))); will-change: transform; }
.fx:not(.is-pinned) .fx-track { overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; -webkit-overflow-scrolling: touch; padding-bottom: 6px; }
.fx:not(.is-pinned) .fx-track::-webkit-scrollbar { display: none; }
.fx-card { flex: 0 0 auto; width: clamp(280px, 30vw, 440px); scroll-snap-align: start; }
.fx-card--lead { width: clamp(300px, 44vw, 660px); }
.fx-card a { display: block; color: inherit; }
.fx-card__media { position: relative; overflow: hidden; height: clamp(240px, 46vh, 470px); background: #1E1C19; }
.fx:not(.is-pinned) .fx-card__media { height: auto; aspect-ratio: 4 / 3.4; }
.fx-card__media img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.02); filter: saturate(.92); transition: transform 1.4s var(--ease-out), filter .8s; }
.fx-card a:hover .fx-card__media img { transform: scale(1.08); filter: none; }
.fx-card__media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,.45), transparent 40%); }
.fx-card__st { position: absolute; z-index: 1; left: 16px; bottom: 14px; padding: 6px 11px; font-size: 10.5px; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; color: #fff; background: rgba(18, 17, 15, .55); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); border-left: 2px solid #C7A673; }
.fx-card__st--progress { border-color: #D62730; }
.fx-card__st--done, .fx-card__st--real { border-color: #18A957; }
.fx-card__meta { display: flex; justify-content: space-between; align-items: center; margin-top: 16px; padding-top: 12px; border-top: 1px solid rgba(243, 238, 228, .16); font-size: 11.5px; letter-spacing: .2em; color: rgba(243, 238, 228, .5); }
.fx-card__code { color: #C7A673; font-weight: 600; }
.fx-card__name { margin-top: 10px; font-family: var(--f-display); font-weight: 400; font-size: clamp(20px, 1.7vw, 27px); line-height: 1.25; color: #F6F1E8; transition: color .4s; }
.fx-card a:hover .fx-card__name { color: #E2C48E; }
.fx-card__loc { margin-top: 6px; font-size: 13.5px; color: rgba(243, 238, 228, .62); }
.fx-card__scope { display: none; }
.fx-card__go { display: inline-flex; align-items: center; gap: 8px; margin-top: 12px; font-size: 11.5px; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; color: #C7A673; opacity: 0; translate: -8px 0; transition: opacity .5s, translate .6s var(--ease-out); }
.fx-card__go svg { width: 18px; height: 18px; }
.fx-card a:hover .fx-card__go, .fx-card a:focus-visible .fx-card__go { opacity: 1; translate: 0 0; }
.fx-foot { display: flex; align-items: center; gap: 22px; margin-top: clamp(22px, 2.6vw, 36px); font-size: 12px; letter-spacing: .2em; color: rgba(243, 238, 228, .55); }
.fx.is-pinned .fx-foot { margin-top: 0; }
.fx-count b { font-weight: 600; color: #F6F1E8; }
.fx-bar { flex: 1; height: 1px; background: rgba(243, 238, 228, .16); position: relative; overflow: hidden; }
.fx-bar i { position: absolute; inset: 0; background: linear-gradient(90deg, #C7A673, #E2C48E); transform: scaleX(.02); transform-origin: left; transition: transform .25s linear; }
.fx-hint { text-transform: uppercase; }
@media (max-height: 760px) { .fx.is-pinned .fx-card__media { height: 40vh; } .fx.is-pinned .fx-head__aside p { display: none; } }
@media (max-width: 1024px) {
  .fx-head { grid-template-columns: 1fr; align-items: start; }
  .fx-card { width: 78vw; max-width: 420px; }
  .fx-card--lead { width: 84vw; max-width: 520px; }
  .fx-card__go { opacity: 1; translate: 0 0; }
}

/* ---------- Báo giá 3D entry in the main nav ---------- */
.nav__link--q3d { display: inline-flex; align-items: center; gap: 6px; color: #DCC290; font-weight: 700; }
.header.is-scrolled .nav__link--q3d, .page-inner .header .nav__link--q3d { color: var(--gold-dark); }
.nav__link--q3d::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 0 rgba(166, 129, 76, .5); animation: q3dPulse 2.4s infinite; }
@keyframes q3dPulse { 70% { box-shadow: 0 0 0 7px rgba(166, 129, 76, 0); } 100% { box-shadow: 0 0 0 0 rgba(166, 129, 76, 0); } }
.page-cta__btns { display: inline-flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
@media (prefers-reduced-motion: reduce) { .nav__link--q3d::before { animation: none; } }


/* ---------- Homepage live 3D quote (#bao-gia-3d) ---------- */
.q3d { padding: clamp(44px, 5vw, 76px) 0 clamp(36px, 4vw, 64px); background: var(--bg); }
.q3d__head { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(20px, 4vw, 64px); align-items: end; margin-bottom: clamp(18px, 2.4vw, 30px); }
.q3d__head .eyebrow { margin-bottom: 14px; }
.q3d__aside { display: flex; flex-direction: column; align-items: flex-start; gap: 16px; }
.q3d__aside p { color: var(--ink-2); font-size: 16px; line-height: 1.65; font-weight: 300; margin: 0; }
.q3d__aside .btn { min-height: 46px; padding: 0 22px; }
.q3d__frame { position: relative; height: min(84vh, 860px); min-height: 560px; border: 1px solid var(--line); background: var(--sand); overflow: hidden; box-shadow: 0 40px 80px -50px rgba(20, 16, 10, .45); }
.q3d__frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; opacity: 0; transition: opacity .5s ease; }
.q3d__frame.is-live iframe { opacity: 1; }
.q3d__poster { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: opacity .5s ease; }
.q3d__frame.is-live .q3d__poster, .q3d__frame.is-live .q3d__start { opacity: 0; pointer-events: none; }
.q3d__start { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); display: inline-flex; align-items: center; gap: 12px; padding: 16px 26px; background: var(--gold); color: var(--on-gold); font-size: 13px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; box-shadow: 0 20px 40px -18px rgba(0, 0, 0, .5); transition: opacity .4s ease, background .3s ease; }
.q3d__start:hover { background: var(--gold-dark); }
.q3d__start-ic svg { width: 22px; height: 22px; display: block; }
.q3d__frame.is-loading .q3d__start { pointer-events: none; }
.q3d__frame.is-loading:not(.is-live) .q3d__start-ic { animation: q3dSpin 1.4s linear infinite; }
@keyframes q3dSpin { to { transform: rotate(360deg); } }
@media (max-width: 900px) {
  .q3d__head { grid-template-columns: 1fr; align-items: start; }
  .q3d__frame { height: 78svh; min-height: 480px; margin-inline: calc(var(--gutter) * -1); border-inline: 0; }
}
