/*
 * Homepage layout (2026-10-12), modelled on actagroup.com (hexagon hero) and dotcon.com (rhythm,
 * blue bands, pill buttons). Texts come from the same settings/I18n sources as before.
 * Every class is prefixed "h-" so nothing collides with site.css (also used by other pages).
 */
:root {
    --h-blue: #1D4F91; --h-blue-2: #2766B8; --h-blue-deep: #143A6D; --h-navy: #0B1D33;
    --h-green: #5E9F26; --h-green-2: #6DB32B;
    --h-text: #18222E; --h-muted: #56636F; --h-pill: #F1F4F8; --h-tint: #EAF1FA; --h-hx-bg: #EEF2F6;
}
body.site.home { line-height: 1.8; }
html { scroll-behavior: smooth; }
.h-wrap { max-width: 1240px; margin: 0 auto; padding-inline: 24px; }
.h-sec { padding-block: clamp(80px, 12vw, 150px); }
.h-title { margin: 0; font-size: clamp(30px, 4vw, 46px); line-height: 1.25; font-weight: 800; letter-spacing: .03em; text-wrap: balance; }
.h-muted { color: var(--h-muted); }

/* Pill buttons */
.h-pill {
    display: inline-flex; align-items: center; justify-content: space-between; gap: 32px; min-width: 220px;
    padding: 16px 28px; border-radius: 999px; background: var(--h-pill); color: var(--h-text) !important;
    text-decoration: none; font-weight: 600; line-height: 1.5; transition: background .25s;
}
.h-pill::after { content: "›"; color: var(--h-blue); font-size: 24px; line-height: 1; font-weight: 700; transition: transform .25s; }
.h-pill:hover { background: #E4E9F0; }
.h-pill:hover::after { transform: translateX(4px); }
.h-pill--blue { background: var(--h-blue); color: #fff !important; }
.h-pill--blue::after { color: #fff; }
.h-pill--blue:hover { background: var(--h-blue-deep); }
.h-pill--white { background: #fff; }
.h-pill--green { background: var(--h-green-2); color: var(--h-navy) !important; }
.h-pill--green::after { color: var(--h-navy); }
.h-pill--green:hover { background: #7CC43A; }

/* ---------- Opening animation: particles assemble the logo, then a circle opens ---------- */
@property --h-hole { syntax: '<length-percentage>'; inherits: false; initial-value: 0%; }
.h-splash {
    position: fixed; inset: 0; z-index: 200; background: #fff; cursor: pointer;
    -webkit-mask: radial-gradient(circle at 50% 50%, transparent var(--h-hole), #000 calc(var(--h-hole) + 1px));
    mask: radial-gradient(circle at 50% 50%, transparent var(--h-hole), #000 calc(var(--h-hole) + 1px));
    animation: h-hole .9s cubic-bezier(.7, 0, .2, 1) 3s forwards;
}
.h-splash.is-done { animation: h-hole .45s cubic-bezier(.7, 0, .2, 1) forwards; }
@keyframes h-hole { to { --h-hole: 150%; visibility: hidden; } }
.h-splash canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.h-splash-logo {
    position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); opacity: 0;
    animation: h-logo-in .6s ease 2s forwards, h-logo-out .9s cubic-bezier(.7, 0, .2, 1) 3s forwards;
}
.h-splash-logo img { width: var(--lw, 420px); max-width: none; height: auto; }
@keyframes h-logo-in { to { opacity: 1; } }
@keyframes h-logo-out { from { opacity: 1; } to { opacity: 0; transform: translate(-50%, -50%) scale(1.3); } }
.h-splash-line {
    position: absolute; left: 50%; top: calc(50% + var(--lh, 230px) / 2 + 20px); width: 0; height: 3px; border-radius: 3px;
    transform: translateX(-50%); background: linear-gradient(90deg, var(--h-blue), var(--h-green-2));
    animation: h-line .55s ease 2.35s forwards;
}
@keyframes h-line { to { width: min(240px, 50vw); } }

/* ---------- Hero: chemical scenes and the Vietnamese flag seen through hexagon windows ---------- */
.h-hx { position: relative; overflow: hidden; background: var(--h-hx-bg); min-height: min(760px, calc(100svh - 70px)); display: flex; align-items: center; }
.h-hx-slides { position: absolute; inset: 0; }
.h-hx-slides img { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; object-fit: cover; opacity: 0; transition: opacity 1.4s ease; }
.h-hx-slides img.on { opacity: 1; animation: h-kb 7s linear both; }
@keyframes h-kb { from { transform: scale(1.12); } to { transform: scale(1); } }
.h-hx-panel { position: absolute; inset: 0; width: 100%; height: 100%; }
.h-hx-tint { transform-box: fill-box; transform-origin: center; animation: h-drift 9s ease-in-out infinite alternate; }
.h-hx-tint:nth-of-type(2n) { animation-duration: 12s; animation-direction: alternate-reverse; }
@keyframes h-drift { from { transform: translate(0, 0); } to { transform: translate(0, -10px); } }
.h-hx .h-wrap { position: relative; z-index: 1; width: 100%; max-width: 1360px; display: flex; justify-content: flex-end; }
.h-hx-text { width: min(560px, 100%); display: flex; flex-direction: column; gap: 30px; padding-block: 72px; }
.h-hx h1 { margin: 0; font-size: clamp(34px, 4.4vw, 62px); line-height: 1.18; font-weight: 800; letter-spacing: .01em; color: var(--h-navy); text-wrap: balance; }
.h-hx .h-pill { align-self: flex-start; }
.h-hx-dots { display: flex; gap: 10px; }
.h-hx-dots button { width: 34px; height: 4px; border: 0; border-radius: 2px; background: #C3CEDB; cursor: pointer; padding: 0; }
.h-hx-dots button.on { background: var(--h-green-2); }

/* ---------- Statement (hero_subtitle) in large type ---------- */
.h-statement p { margin: 0; font-size: clamp(19px, 2.2vw, 27px); line-height: 1.9; font-weight: 500; max-width: 46em; }

/* ---------- Blue bands with round shapes ---------- */
.h-blue { position: relative; overflow: hidden; background: var(--h-blue); color: #fff; }
.h-blob { position: absolute; border-radius: 50%; background: var(--h-blue-2); pointer-events: none; }
.h-blue .h-wrap { position: relative; }
.h-cards3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px; }
.h-card3 {
    display: flex; flex-direction: column; align-items: center; text-align: center; gap: 16px; background: #fff;
    color: var(--h-text) !important; border-radius: 28px; padding: 48px 30px; text-decoration: none; transition: transform .3s;
}
.h-card3:hover { transform: translateY(-6px); }
.h-disc { width: 84px; height: 84px; border-radius: 50%; background: var(--h-tint); display: flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.h-card3 h2 { margin: 0; font-size: 21px; color: var(--h-blue); letter-spacing: .03em; line-height: 1.45; }
.h-card3 p { margin: 0; color: var(--h-muted); font-size: 15px; }

/* ---------- Guides: sideways rail ---------- */
.h-rail-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 24px; }
.h-rail-head p { margin: 16px 0 0; max-width: 56ch; }
.h-arrows { display: flex; gap: 12px; }
.h-arrow { width: 58px; height: 58px; border-radius: 50%; border: 1.5px solid var(--h-blue); background: #fff; color: var(--h-blue); font-size: 22px; cursor: pointer; }
.h-arrow:hover { background: var(--h-blue); color: #fff; }
.h-rail {
    display: grid; grid-auto-flow: column; grid-auto-columns: minmax(270px, 320px); gap: 24px; overflow-x: auto;
    scroll-snap-type: x mandatory; padding: 48px 24px 24px; margin-inline: -24px; scrollbar-width: thin;
}
.h-guide {
    scroll-snap-align: start; display: flex; flex-direction: column; gap: 16px; background: var(--h-pill); border-radius: 28px;
    padding: 40px 30px 34px; text-decoration: none; color: var(--h-text) !important; min-height: 380px; transition: background .3s, transform .3s;
}
.h-guide:hover { background: var(--h-tint); transform: translateY(-6px); }
.h-guide .h-no { font-size: 14px; font-weight: 800; color: var(--h-green); letter-spacing: .1em; }
.h-guide .h-disc { background: #fff; }
.h-guide h3 { margin: 0; font-size: 19px; line-height: 1.45; color: var(--h-blue); }
.h-guide p { margin: 0; font-size: 15px; color: var(--h-muted); }
.h-guide .h-more { margin-top: auto; font-weight: 700; color: var(--h-blue); }

/* ---------- About (text only) ---------- */
.h-about-text { max-width: 820px; }
.h-about-text p { margin: 24px 0 0; font-size: 18px; color: #E5EEF9; }
.h-clients-head { margin: 120px 0 0; font-size: clamp(22px, 2.4vw, 28px); font-weight: 800; letter-spacing: .04em; }
.h-clients { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 24px; margin: 36px 0 0; }
.h-client { background: #fff; color: var(--h-text); border-radius: 28px; padding: 36px 30px; }
.h-client strong { display: block; font-size: 19px; color: var(--h-blue); margin-bottom: 12px; line-height: 1.45; }
.h-client span { font-size: 15px; color: var(--h-muted); }

/* ---------- Services ---------- */
.h-svc { display: flex; flex-wrap: wrap; gap: 32px 80px; }
.h-svc > * { min-width: 0; }
.h-svc-left { flex: 1 1 300px; }
.h-svc-left h3 { margin: 28px 0 0; font-size: clamp(22px, 2.4vw, 30px); line-height: 1.45; color: var(--h-blue); }
.h-svc-right { flex: 1.6 1 480px; font-size: 18px; }
.h-svc-right p { margin: 0; }
.h-sub { margin: 110px 0 0; font-size: clamp(22px, 2.4vw, 28px); font-weight: 800; letter-spacing: .04em; }
.h-offers { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 24px; margin-top: 36px; }
.h-offer { display: flex; flex-direction: column; gap: 16px; background: var(--h-pill); border-radius: 28px; padding: 40px 32px; }
.h-offer .h-disc { background: #fff; width: 72px; height: 72px; }
.h-offer h4 { margin: 0; font-size: 19px; line-height: 1.45; color: var(--h-blue); }
.h-offer p { margin: 0; font-size: 15px; color: var(--h-muted); }
.h-offer--wide { grid-column: 1 / -1; background: var(--h-blue); color: #fff; }
.h-offer--wide h4 { color: #fff; }
.h-offer--wide p { color: #E5EEF9; }
.h-offer--wide .h-disc { background: rgba(255, 255, 255, .14); }
.h-dots { list-style: none; margin: 4px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 12px 40px; }
.h-dots li { position: relative; padding-left: 24px; font-size: 15px; }
.h-dots li::before { content: ""; position: absolute; left: 2px; top: .66em; width: 10px; height: 10px; border-radius: 50%; background: var(--h-green-2); }
.h-cta-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px 40px; margin-top: 80px; padding: 48px 52px; border-radius: 32px; background: var(--h-tint); }
.h-cta-row strong { font-size: clamp(20px, 2vw, 24px); color: var(--h-blue); }
.h-cta-row p { margin: 8px 0 0; color: var(--h-muted); }

/* ---------- Process ---------- */
.h-steps { list-style: none; margin: 72px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 40px 24px; counter-reset: hs; position: relative; }
.h-steps::before { content: ""; position: absolute; left: 5%; right: 5%; top: 46px; height: 2px; background: repeating-linear-gradient(90deg, #B8CBE4 0 8px, transparent 8px 16px); }
.h-steps li { position: relative; counter-increment: hs; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 12px; }
.h-steps li::before {
    content: counter(hs, decimal-leading-zero); width: 92px; height: 92px; border-radius: 50%; background: var(--h-blue); color: #fff;
    display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 28px; letter-spacing: .05em; box-shadow: 0 0 0 12px #F6F9FC;
}
.h-steps h3 { margin: 14px 0 0; font-size: 18px; }
.h-steps p { margin: 0; font-size: 14px; color: var(--h-muted); }

/* ---------- Knowledge & news ---------- */
.h-faq { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(380px, 1fr)); gap: 14px 24px; margin: 32px 0 0; }
.h-faq .h-pill { min-width: 0; width: 100%; box-sizing: border-box; border-radius: 22px; padding: 20px 28px; font-size: 15px; height: 100%; }
.h-faq .h-pill span { min-width: 0; }
.h-h3 { margin: 0; font-size: clamp(20px, 2vw, 24px); font-weight: 800; letter-spacing: .04em; }
.h-empty { margin-top: 20px; padding: 32px; border-radius: 28px; background: var(--h-pill); color: var(--h-muted); text-align: center; }
.h-news { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px; margin-top: 24px; }
.h-news a { display: block; text-decoration: none; color: var(--h-text); background: var(--h-pill); border-radius: 28px; overflow: hidden; }
.h-news img, .h-news .h-news-ph { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.h-news .h-news-ph { background: linear-gradient(135deg, var(--h-blue), var(--h-green-2)); }
.h-news div { padding: 20px 24px 26px; }
.h-news span { font-size: 13px; color: var(--h-muted); }
.h-news h3 { margin: 4px 0 6px; font-size: 17px; line-height: 1.45; }
.h-news p { margin: 0; font-size: 14px; color: var(--h-muted); }

/* ---------- Recruit ---------- */
.h-recruit { border-radius: 36px; overflow: hidden; background: var(--h-navy); color: #fff; }
.h-recruit .h-txt { min-width: 0; max-width: 900px; padding: 64px 56px; display: flex; flex-direction: column; gap: 16px; align-items: flex-start; }
.h-recruit h3 { margin: 0; font-size: clamp(24px, 2.6vw, 32px); letter-spacing: .03em; }
.h-recruit p { margin: 0; color: #C9D6E5; }

/* ---------- Contact ---------- */
.h-contact { display: flex; flex-wrap: wrap; gap: 24px; margin-top: 40px; }
.h-contact > * { min-width: 0; }
.h-addr { flex: 1 1 320px; background: var(--h-pill); border-radius: 28px; padding: 40px; list-style: none; margin: 0; display: flex; flex-direction: column; gap: 18px; }
.h-addr span { display: block; font-size: 13px; color: var(--h-muted); margin-bottom: 4px; letter-spacing: .06em; }
.h-addr b, .h-addr a { font-size: 19px; font-weight: 700; color: var(--h-text); }
.h-ccta { flex: 1.3 1 420px; background: var(--h-blue); color: #fff; border-radius: 28px; padding: 40px; display: flex; flex-direction: column; gap: 14px; align-items: flex-start; }
.h-ccta strong { font-size: 22px; }
.h-ccta p { margin: 0; color: #E5EEF9; }
.h-map { margin-top: 24px; border-radius: 28px; overflow: hidden; }
.h-map iframe { display: block; width: 100%; height: 320px; border: 0; }

/* Reveal on scroll: only elements that start below the first screen are hidden (by home.js) */
.h-pre { opacity: 0; transform: translateY(36px); }
.h-reveal { transition: opacity .9s ease, transform .9s ease; }

@media (max-width: 900px) {
    .h-hx { display: block; min-height: 0; }
    .h-hx-slides, .h-hx-panel { height: 380px; }
    .h-hx .h-wrap { justify-content: flex-start; padding-top: 380px; }
    .h-hx-text { padding-block: 40px 56px; }
    .h-faq { grid-template-columns: 1fr; }
    .h-steps::before { display: none; }
    .h-recruit .h-txt, .h-cta-row { padding: 40px 28px; }
}
@media (prefers-reduced-motion: reduce) {
    .h-splash { display: none; }
    .h-hx-slides img { transition: none; }
    .h-hx-slides img.on, .h-hx-tint { animation: none; }
    .h-reveal, .h-pill, .h-card3, .h-guide { transition: none; }
    .h-pre { opacity: 1; transform: none; }
}
