/* Trang chủ piglance.com */
h1, h2, h3 { font-weight: 800; margin: 0; text-wrap: balance; }
h1 { font-size: clamp(42px, 7.4vw, 72px); line-height: .98; letter-spacing: -.02em; }
h2 { font-size: clamp(34px, 5.2vw, 52px); line-height: 1.02; letter-spacing: -.015em; }
p { margin: 0; }
.lead { font-size: clamp(19px, 2.4vw, 22px); color: var(--ink2); max-width: 34em; }
.kicker { display: inline-block; font-weight: 800; font-size: 15px; letter-spacing: .08em; text-transform: none; color: var(--violet-ink); background: var(--violet-soft); padding: 5px 14px 3px; border-radius: 99px; margin-bottom: 14px; }
.fine { font-size: 16px; color: var(--ink2); }

/* ---------- hero ---------- */
.hero { position: relative; background: var(--violet-soft); padding: 46px 0 120px; overflow: hidden; }
.hero-grid { display: grid; gap: 28px; align-items: center; }
.hero-text { display: grid; gap: 20px; justify-items: start; position: relative; z-index: 2; }
.hero h1 .hl { color: var(--violet); }
.cta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 6px; }
.eyebrow { font-weight: 800; font-size: 16px; color: var(--violet-ink); display: inline-flex; align-items: center; gap: 8px; background: var(--surface); padding: 6px 16px 4px; border-radius: 99px; box-shadow: 0 3px 0 rgba(75,47,184,.14); }
.eyebrow i { width: 10px; height: 10px; border-radius: 50%; background: var(--lime); border: 2px solid var(--lime-ink); display: inline-block; }
@media (min-width: 900px) { .hero { padding: 64px 0 130px; } .hero-grid { grid-template-columns: 1.05fr .95fr; gap: 40px; } }

.stage { position: relative; width: min(100%, 470px); margin: 0 auto; aspect-ratio: 1; container-type: inline-size; }
.stage::before { content: ""; position: absolute; inset: 5%; border-radius: 50%; background: var(--pig-soft); box-shadow: 0 0 0 10px rgba(255,255,255,.7), 0 30px 60px rgba(75,47,184,.2); }
.hero-pig { position: absolute; left: 8%; width: 84%; bottom: 8%; background: none; border: 0; padding: 0; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.bubble { position: absolute; z-index: 3; left: -1%; top: 3%; display: grid; background: var(--surface); border-radius: 22px 22px 22px 6px; padding: 10px 20px 6px; font-weight: 800; font-size: clamp(17px, 4.6cqw, 23px); box-shadow: 0 6px 0 rgba(75,47,184,.15); }
.bubble span { grid-area: 1/1; white-space: nowrap; }
.bubble .b-vui { color: var(--income); }
.chip-ghi { position: absolute; z-index: 4; left: 66%; top: 24%; background: var(--lime); color: var(--ink); font-weight: 800; font-size: clamp(14px, 3.8cqw, 18px); padding: 7px 14px 4px; border-radius: 99px; box-shadow: 0 4px 0 var(--lime-ink); white-space: nowrap; opacity: 0; }
.bit { position: absolute; z-index: 1; pointer-events: none; }
.coin { width: clamp(34px, 9cqw, 48px); aspect-ratio: 1; border-radius: 50%; background: var(--surface); border: 4px solid var(--violet); color: var(--violet); font-weight: 800; display: grid; place-items: center; font-size: clamp(16px, 4.4cqw, 22px); line-height: 1; padding-top: 3px; box-shadow: 0 5px 0 rgba(75,47,184,.2); animation: float var(--d, 5s) ease-in-out infinite; animation-delay: var(--w, 0s); }
.spark { width: clamp(22px, 6cqw, 34px); aspect-ratio: 1; animation: twinkle var(--d, 3s) ease-in-out infinite; animation-delay: var(--w, 0s); }
.spark svg { width: 100%; height: 100%; display: block; }

/* ---------- heo Mỡ: chuyển động ---------- */
.pig { display: block; width: 100%; height: auto; overflow: visible; }
.pig .p-bounce { transform-box: view-box; transform-origin: 60px 110px; }
.pig .p-breath { transform-box: view-box; transform-origin: 60px 104px; animation: breathe 3.2s ease-in-out infinite; }
.pig .p-blink { transform-box: fill-box; transform-origin: center; animation: blink 5s infinite; animation-delay: var(--w, 0s); }
.pig .p-ear { transform-box: fill-box; }
.pig .p-earL { transform-origin: 56% 83%; animation: twL 7s infinite; }
.pig .p-earR { transform-origin: 43% 83%; animation: twR 7s infinite; animation-delay: 1.2s; }
.pig .p-heart { transform-box: fill-box; transform-origin: 50% 100%; animation: beat 1.1s ease-in-out infinite; }
.pig .p-sweat { animation: drip 2.2s ease-in infinite; }
.pig .p-pupil { transition: transform .12s ease-out; }
.pig .p-shadow { transform-box: view-box; transform-origin: 60px 110px; }
.pig .on-doi { opacity: 1; }
.pig .on-vui { opacity: 0; }
.pig.vui .on-doi { opacity: 0; }
.pig.vui .on-vui { opacity: 1; }
.pig.cycle .on-doi { animation: showDoi 10s infinite; }
.pig.cycle .on-vui { animation: showVui 10s infinite; }
.pig.cycle .p-bounce { animation: eat 10s infinite; }
.pig.cycle .p-shadow { animation: shadowEat 10s infinite; }
.jump .p-bounce { animation: hop .7s cubic-bezier(.3,1.6,.5,1) 1 !important; }
.jump .on-doi { opacity: 0 !important; animation: none !important; }
.jump .on-vui { opacity: 1 !important; animation: none !important; }
.bubble .b-doi { animation: showDoi 10s infinite; }
.bubble .b-vui { animation: showVui 10s infinite; }
.chip-ghi { animation: chip 10s infinite; }

/* ---------- khối chung của các phần ---------- */
.sec { position: relative; padding: 76px 0; }
@media (max-width: 700px) { .sec { padding: 52px 0; } }
.split { display: grid; gap: 40px; align-items: center; }
@media (min-width: 900px) {
  .split { grid-template-columns: 1fr 1fr; gap: 64px; }
  .split.flip .col-art { order: 2; }
}
.col-text { display: grid; gap: 18px; justify-items: start; }
.wave { position: absolute; left: 0; width: 100%; height: clamp(34px, 6vw, 70px); display: block; pointer-events: none; }
.wave { fill: var(--bg); }
.wave.down { bottom: -1px; }
.wave.up { top: -1px; transform: scaleY(-1); }
.sec.white { background: var(--surface); }
.sec.lime { background: var(--lime-soft); padding: 110px 0; }
.sec.violet { background: var(--violet); color: #fff; padding: 120px 0 70px; }

/* điện thoại */
.col-art { position: relative; display: grid; place-items: center; }
.phone { position: relative; width: min(290px, 70vw); aspect-ratio: 1080 / 2220; border: 9px solid var(--ink); border-radius: 44px; background: var(--surface); overflow: hidden; box-shadow: 0 34px 60px rgba(31,26,61,.22); animation: bob 6s ease-in-out infinite; }
.phone img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.phone .s2 { opacity: 0; }
.phone.fade .s1 { animation: fadeA 9s infinite; }
.phone.fade .s2 { animation: fadeB 9s infinite; }
.sticker { position: absolute; z-index: 3; background: var(--violet); color: #fff; font-weight: 800; line-height: 1.1; font-size: 19px; padding: 12px 18px 9px; border-radius: 20px; box-shadow: 0 6px 0 var(--violet-ink); display: flex; gap: 8px; align-items: center; animation: pulse 3.2s ease-in-out infinite; }
.sticker svg { width: 22px; height: 22px; flex: none; }
.sticker.a { right: -4%; top: 14%; transform: rotate(6deg); }
.sticker.b { left: -6%; bottom: 34%; transform: rotate(-5deg); animation-delay: -1.4s; }
@media (max-width: 520px) { .sticker { font-size: 16px; } .sticker.a { right: 0; } .sticker.b { left: 0; } }
.cap { margin-top: 20px; min-height: 34px; display: grid; justify-items: center; }
.cap span { grid-area: 1/1; font-weight: 800; font-size: 17px; color: var(--violet-ink); background: var(--violet-soft); padding: 6px 16px 3px; border-radius: 99px; }
.cap .c1 { animation: fadeA 9s infinite; }
.cap .c2 { animation: fadeB 9s infinite; opacity: 0; }
.duo { position: relative; width: min(430px, 100%); height: 560px; }
.duo .phone { position: absolute; width: 260px; }
.duo .p1 { left: 0; top: 10px; transform: rotate(-4deg); }
.duo .p2 { right: 0; top: 56px; transform: rotate(5deg); animation-delay: -3s; }
@media (max-width: 480px) { .duo { height: 480px; } .duo .phone { width: 210px; } }

.steps { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 16px; counter-reset: s; }
.steps li { counter-increment: s; display: grid; grid-template-columns: 46px 1fr; gap: 14px; align-items: start; }
.steps li::before { content: counter(s); width: 46px; height: 46px; border-radius: 50%; background: var(--violet-soft); color: var(--violet-ink); font-weight: 800; font-size: 24px; display: grid; place-items: center; padding-top: 4px; box-shadow: 0 4px 0 rgba(75,47,184,.18); }
.steps b { display: block; font-size: 22px; font-weight: 800; line-height: 1.15; }
.steps span { color: var(--ink2); font-size: 18px; }
.ticks { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 14px; }
.ticks li { display: grid; grid-template-columns: 34px 1fr; gap: 12px; align-items: start; }
.ticks li::before { content: ""; width: 34px; height: 34px; border-radius: 50%; background: var(--income-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 12.5l4 4 8-9' fill='none' stroke='%231F8A6A' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/20px no-repeat; margin-top: 2px; }
.ticks b { font-weight: 800; }
.ticks span { color: var(--ink2); }

/* dải tên ngân hàng */
.marquee { margin-top: 70px; overflow: hidden; -webkit-mask: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.marquee .lab { text-align: center; font-weight: 800; color: var(--ink2); font-size: 17px; margin-bottom: 16px; }
.track { display: flex; gap: 12px; width: max-content; animation: scroll 46s linear infinite; }
.marquee:hover .track { animation-play-state: paused; }
.track span { background: var(--surface); border: 3px solid var(--line); border-radius: 99px; padding: 8px 20px 4px; font-weight: 800; font-size: 20px; white-space: nowrap; box-shadow: 0 4px 0 var(--line); }
.track span.mo { background: var(--lime); border-color: var(--lime-ink); box-shadow: 0 4px 0 var(--lime-ink); }

/* 4 cấp heo */
.center { text-align: center; display: grid; gap: 16px; justify-items: center; }
.pigrow { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px 14px; margin-top: 44px; position: relative; z-index: 2; }
@media (min-width: 860px) { .pigrow { grid-template-columns: repeat(4, 1fr); gap: 22px; } }
.lv { background: var(--surface); border-radius: 28px; padding: 18px 12px 18px; text-align: center; box-shadow: 0 7px 0 rgba(63,74,16,.18); position: relative; }
.lv .art { width: min(100%, 170px); margin: 0 auto 6px; background: var(--pig-soft); border-radius: 50%; padding: 6%; aspect-ratio: 1; display: grid; align-items: end; }
.lv .art .pig { transition: transform .25s; }
.lv:hover .art .pig { transform: scale(1.08) rotate(-3deg); }
.lv h3 { font-size: 26px; line-height: 1.1; }
.lv p { font-size: 16px; color: var(--ink2); }
.lv .gear { display: inline-block; margin-top: 8px; font-weight: 800; font-size: 15px; background: var(--lime); color: var(--ink); padding: 4px 12px 1px; border-radius: 99px; }
.lv .gear.none { background: var(--violet-soft); color: var(--violet-ink); }
.js .pigrow .lv { opacity: 0; transform: translateY(26px) scale(.9); }
.js .pigrow.in .lv { animation: pop .7s cubic-bezier(.3,1.5,.5,1) forwards; animation-delay: calc(var(--i) * .5s); }
.arrow { display: none; }
@media (min-width: 860px) {
  .arrow { display: block; position: absolute; top: 40%; right: -19px; width: 20px; z-index: 3; }
  .lv:last-child .arrow { display: none; }
}

/* thẻ dữ liệu */
.tiles { display: grid; gap: 18px; margin-top: 38px; }
@media (min-width: 800px) { .tiles { grid-template-columns: repeat(3, 1fr); gap: 22px; } }
.tile { background: var(--surface); border-radius: 28px; padding: 26px 24px 24px; box-shadow: 0 7px 0 var(--line); display: grid; gap: 10px; justify-items: start; align-content: start; transition: transform .2s; }
.tile:hover { transform: translateY(-4px); }
.tile .ic { width: 60px; height: 60px; border-radius: 20px; background: var(--violet-soft); display: grid; place-items: center; }
.tile .ic svg { width: 32px; height: 32px; }
.tile h3 { font-size: 26px; line-height: 1.1; }
.tile p { color: var(--ink2); font-size: 18px; }

/* phần cuối */
.close { display: grid; gap: 30px; justify-items: center; text-align: center; }
.close .stage { width: min(80%, 300px); }
.close .stage::before { background: var(--pig-soft); box-shadow: 0 0 0 8px rgba(255,255,255,.25); }
.close h2 { color: #fff; max-width: 14em; }
.close .lead { color: #E3DBFF; max-width: 30em; }
.close .cta { justify-content: center; }
.close .btn.ghost { background: transparent; color: #fff; box-shadow: inset 0 0 0 3px rgba(255,255,255,.55), 0 5px 0 rgba(0,0,0,0); }
.close .btn.ghost:hover { background: rgba(255,255,255,.12); }

/* hiện dần khi cuộn tới */
.js .reveal { opacity: 0; transform: translateY(28px); transition: opacity .7s ease, transform .7s cubic-bezier(.2,.8,.3,1); }
.js .reveal.in { opacity: 1; transform: none; }

/* ---------- chuyển động ---------- */
@keyframes breathe { 0%,100% { transform: scale(1,1); } 50% { transform: scale(1.014,.986); } }
@keyframes blink { 0%,93%,100% { transform: scaleY(1); } 96.5% { transform: scaleY(.08); } }
@keyframes twL { 0%,86%,100% { transform: rotate(0); } 90% { transform: rotate(-9deg); } 94% { transform: rotate(4deg); } }
@keyframes twR { 0%,86%,100% { transform: rotate(0); } 90% { transform: rotate(9deg); } 94% { transform: rotate(-4deg); } }
@keyframes beat { 0%,100% { transform: scale(1); } 50% { transform: scale(1.18); } }
@keyframes drip { 0% { transform: translateY(-3px); opacity: 0; } 20% { opacity: 1; } 100% { transform: translateY(9px); opacity: 0; } }
@keyframes showDoi { 0%,43% { opacity: 1; } 46%,93% { opacity: 0; } 96%,100% { opacity: 1; } }
@keyframes showVui { 0%,43% { opacity: 0; } 46%,93% { opacity: 1; } 96%,100% { opacity: 0; } }
@keyframes eat { 0%,43% { transform: none; } 45% { transform: scale(1.07,.92); } 48% { transform: translateY(-9px) scale(.97,1.05); } 52% { transform: none; } 100% { transform: none; } }
@keyframes shadowEat { 0%,43% { transform: none; } 48% { transform: scale(.8); } 53%,100% { transform: none; } }
@keyframes hop { 0% { transform: none; } 30% { transform: translateY(-14px) scale(.96,1.06); } 60% { transform: scale(1.06,.93); } 100% { transform: none; } }
@keyframes chip { 0%,34% { opacity: 0; transform: translate(0,0) scale(1); } 38% { opacity: 1; transform: translate(0,-6px) scale(1.05); } 44% { opacity: 1; transform: translate(-5cqw, 4cqw) scale(1); } 49% { opacity: .9; transform: translate(-19cqw, 33cqw) scale(.55); } 51%,100% { opacity: 0; transform: translate(-21cqw, 36cqw) scale(.2); } }
@keyframes float { 0%,100% { transform: translateY(0) rotate(-4deg); } 50% { transform: translateY(-14px) rotate(5deg); } }
@keyframes twinkle { 0%,100% { transform: scale(.7) rotate(0); opacity: .75; } 50% { transform: scale(1.15) rotate(25deg); opacity: 1; } }
@keyframes bob { 0%,100% { translate: 0 0; } 50% { translate: 0 -9px; } }
@keyframes pulse { 0%,100% { scale: 1; } 50% { scale: 1.06; } }
@keyframes fadeA { 0%,42% { opacity: 1; } 50%,92% { opacity: 0; } 100% { opacity: 1; } }
@keyframes fadeB { 0%,42% { opacity: 0; } 50%,92% { opacity: 1; } 100% { opacity: 0; } }
@keyframes scroll { to { transform: translateX(-50%); } }
@keyframes pop { 0% { opacity: 0; transform: translateY(26px) scale(.86); } 60% { opacity: 1; transform: translateY(-6px) scale(1.04); } 100% { opacity: 1; transform: none; } }

/* Chủ trang chọn: hoạt hình luôn chạy đủ, không theo chế độ "giảm chuyển động" của máy người xem. */
