@font-face { font-family: GSF; src: url(fonts/GoogleSansFlex.ttf) format('truetype'); font-weight: 100 1000; font-display: swap; }

:root {
  --gold: #f2c94c;
  --gold-dim: rgba(242, 201, 76, .18);
  --ink: #f4f4f2;
  --mute: #9a9a96;
  --dim: #5c5c58;
  --line: rgba(255, 255, 255, .12);
  --ease: cubic-bezier(.65, 0, .35, 1);       /* easeInOutCubic */
  --out: cubic-bezier(.22, 1, .36, 1);
  --w: min(1180px, 100vw - 48px);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: GSF, 'Google Sans', system-ui, sans-serif;
  color: var(--ink);
  background: #000;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
/* nền Ratio: đen tới 64% rồi sáng dần ở đáy — cố định, không chuyển động */
body::before {
  content: ''; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(180deg, #000 0 64%, #151515 100%);
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
em { font-style: normal; color: var(--gold); }
::selection { background: var(--gold); color: #000; }

/* ---------- con trỏ toạ độ ---------- */
#cursor { position: fixed; inset: 0; z-index: 90; pointer-events: none; }
#flash { position: fixed; inset: 0; z-index: 95; pointer-events: none; background: #fff; opacity: 0; }
#flash.go { animation: flash .32s ease-out; }
@keyframes flash { 0% { opacity: .16; } 100% { opacity: 0; } }

/* ---------- logo ---------- */
.logo { display: inline-flex; align-items: center; gap: .04em; font-weight: 300; letter-spacing: .32em; font-size: 15px; }
.logo svg { width: 1.05em; height: .95em; margin: 0 .26em 0 .02em; overflow: visible; }
.logo svg path { fill: none; stroke: var(--gold); stroke-width: 3; stroke-linejoin: round; filter: drop-shadow(0 0 4px rgba(242, 201, 76, .8)); }
.logo:hover svg { animation: tri 1.2s var(--ease); }
@keyframes tri { 50% { transform: rotate(120deg); } 100% { transform: rotate(120deg); } }
.logo.big { font-size: 34px; }

/* ---------- nav ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; justify-content: space-between; align-items: center;
  padding: 22px max(24px, (100vw - 1180px) / 2);
  transition: background .4s, padding .4s var(--ease), border-color .4s;
  border-bottom: 1px solid transparent;
}
.nav.solid { background: rgba(0, 0, 0, .72); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); padding-top: 14px; padding-bottom: 14px; border-color: var(--line); }
.nav nav { display: flex; gap: 30px; align-items: center; font-size: 14px; color: var(--mute); }
.nav nav a { position: relative; transition: color .25s; }
.nav nav a:not(.btn-sm)::after { content: ''; position: absolute; left: 0; right: 0; bottom: -6px; height: 1px; background: var(--gold); transform: scaleX(0); transform-origin: right; transition: transform .3s var(--ease); }
.nav nav a:hover { color: var(--ink); }
.nav nav a:hover::after, .nav nav a.cur::after { transform: scaleX(1); transform-origin: left; }
.nav nav a.cur { color: var(--ink); }
.btn-sm { border: 1px solid var(--gold); color: var(--gold) !important; padding: 7px 16px; border-radius: 999px; transition: background .25s, color .25s !important; }
.btn-sm:hover { background: var(--gold); color: #000 !important; }

/* ---------- nút ---------- */
.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: 52px; padding: 0 28px; border-radius: 999px; font-size: 16px; font-weight: 500;
  overflow: hidden; isolation: isolate; transition: transform .25s var(--out), box-shadow .3s;
}
.btn.gold { background: var(--gold); color: #000; }
.btn.gold::before { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, .55) 50%, transparent 70%); transform: translateX(-120%); }
.btn.gold:hover::before { transform: translateX(120%); transition: transform .7s var(--ease); }
.btn.gold:hover { box-shadow: 0 0 40px rgba(242, 201, 76, .35); }
.btn.ghost { border: 1px solid rgba(255, 255, 255, .28); color: var(--ink); }
.btn.ghost:hover { border-color: var(--ink); }
.btn b { font-weight: 400; transition: transform .25s var(--out); }
.btn:hover b { transform: translate(3px, -3px); }
.btn:active { transform: scale(.97); }
.btn.wide { width: 100%; margin-top: 12px; }

/* ---------- hero ---------- */
.hero { position: relative; height: 100svh; min-height: 620px; display: flex; align-items: center; overflow: hidden; }
#spiral { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero::after { content: ''; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(ellipse 60% 70% at 22% 55%, rgba(0, 0, 0, .86), transparent 75%), linear-gradient(0deg, #000, transparent 22%); }
.hero-in { position: relative; z-index: 2; width: var(--w); margin: 0 auto; }
.kicker, .part, .lbl { font-size: 12px; letter-spacing: .32em; color: var(--mute); font-weight: 500; }
.hero h1 { margin: 22px 0 26px; font-size: clamp(42px, 7.2vw, 96px); line-height: 1.02; font-weight: 500; letter-spacing: -.025em; max-width: 15ch; min-height: 2.04em; }
.hero h1 .g { color: var(--gold); }
.caret { font-style: normal; color: var(--gold); font-weight: 300; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.lede { max-width: 30em; font-size: clamp(16px, 1.5vw, 19px); line-height: 1.6; color: var(--mute); }
.cta { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 38px; }
.phi { position: absolute; z-index: 2; right: max(24px, (100vw - 1180px) / 2); bottom: 44px; text-align: right; }
.phi .val { display: block; margin-top: 8px; font-size: 20px; font-variant-numeric: tabular-nums; color: var(--ink); }
.phi b { font-weight: 400; color: var(--gold); }
.scroll { position: absolute; z-index: 2; left: 50%; bottom: 34px; width: 22px; height: 36px; margin-left: -11px; border: 1px solid rgba(255, 255, 255, .3); border-radius: 12px; }
.scroll span { position: absolute; left: 50%; top: 7px; width: 2px; height: 7px; margin-left: -1px; background: var(--gold); border-radius: 2px; animation: wheel 1.8s var(--ease) infinite; }
@keyframes wheel { 0% { transform: translateY(0); opacity: 1; } 70% { transform: translateY(12px); opacity: 0; } 100% { opacity: 0; } }

/* ---------- section ---------- */
.sec { position: relative; width: var(--w); margin: 0 auto; padding: 150px 0 40px; }
.head { max-width: 760px; margin-bottom: 64px; }
.head h2 { margin: 14px 0 16px; font-size: clamp(32px, 4.4vw, 58px); line-height: 1.08; font-weight: 500; letter-spacing: -.02em; }
.sub { font-size: 17px; line-height: 1.65; color: var(--mute); max-width: 38em; }

/* hiện dần khi cuộn: trượt + mờ, easeInOutCubic */
[data-rev] { opacity: 0; transform: translateY(28px); transition: opacity .7s var(--ease), transform .7s var(--ease); transition-delay: var(--d, 0s); }
[data-rev].in { opacity: 1; transform: none; }

/* ---------- lưới video ---------- */
.grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 22px; }
.card { grid-column: span 2; position: relative; display: block; opacity: 0; transform: translateY(40px) scale(.98); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.card:nth-child(1), .card:nth-child(2) { grid-column: span 3; }
.card.in { opacity: 1; transform: none; }
.card .fr { position: relative; aspect-ratio: 16 / 9; border-radius: 14px; overflow: hidden; background: #0b0b0b; border: 1px solid var(--line); transition: border-color .35s, transform .5s var(--out); }
.card img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .9s var(--out), filter .5s; }
.card canvas { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; transition: opacity .35s; }
.card .len { position: absolute; right: 10px; bottom: 10px; padding: 3px 7px; border-radius: 5px; font-size: 12px; background: rgba(0, 0, 0, .78); font-variant-numeric: tabular-nums; }
.card .hk { position: absolute; left: 16px; bottom: 14px; font-size: 13px; letter-spacing: .04em; color: var(--gold); opacity: 0; transform: translateY(8px); transition: opacity .35s .1s, transform .35s .1s var(--out); }
.card h3 { margin: 16px 2px 0; font-size: 19px; font-weight: 500; letter-spacing: -.01em; display: flex; justify-content: space-between; gap: 12px; }
.card h3 i { font-style: normal; color: var(--dim); font-weight: 400; transition: color .3s, transform .3s var(--out); }
.card:hover .fr, .card.act .fr { border-color: rgba(242, 201, 76, .5); transform: translateY(-4px); }
.card:hover img, .card.act img { transform: scale(1.04); filter: brightness(.1) saturate(.3) blur(3px); }
.card:hover canvas, .card.act canvas { opacity: 1; }
.card:hover .hk, .card.act .hk { opacity: 1; transform: none; }
.card:hover h3 i { color: var(--gold); transform: translate(3px, -3px); }
.card.soon .fr { display: grid; place-items: center; border-style: dashed; }
.card.soon .fr p { color: var(--dim); font-size: 14px; letter-spacing: .2em; }

/* ---------- cách làm ---------- */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.stat { padding: 46px 30px 42px; }
.stat + .stat { border-left: 1px solid var(--line); }
.stat .num { font-size: clamp(44px, 5.6vw, 76px); font-weight: 500; letter-spacing: -.03em; font-variant-numeric: tabular-nums; line-height: 1; }
.stat .num.hit { color: var(--gold); text-shadow: 0 0 30px rgba(242, 201, 76, .45); transition: color 1.2s, text-shadow 1.2s; }
.stat .lbl { margin-top: 18px; }
.stat .note { margin-top: 8px; color: var(--dim); font-size: 14px; }
.pipe { position: relative; display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; margin-top: 70px; padding-top: 50px; }
.pipe-line { position: absolute; top: 0; left: 0; width: 100%; height: 40px; overflow: visible; }
.pipe-line path { fill: none; stroke: var(--gold); stroke-width: 1.5; vector-effect: non-scaling-stroke; stroke-dasharray: 1200; stroke-dashoffset: 1200; transition: stroke-dashoffset 2.2s var(--ease) .2s; }
.pipe.in .pipe-line path { stroke-dashoffset: 0; }
.step { display: flex; flex-direction: column; gap: 8px; }
.step i { font-style: normal; font-size: 12px; color: var(--gold); letter-spacing: .2em; }
.step b { font-size: 20px; font-weight: 500; }
.step span { color: var(--mute); font-size: 15px; line-height: 1.5; }

/* ---------- ủng hộ ---------- */
.give > * { min-width: 0; }
.give { display: grid; grid-template-columns: 1.15fr 1fr; gap: 26px; align-items: start; }
.pick, .pay { border: 1px solid var(--line); border-radius: 20px; padding: 34px; background: linear-gradient(180deg, rgba(255, 255, 255, .025), transparent); }
.amounts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin: 20px 0 18px; }
.amounts button { text-align: left; padding: 18px 20px; border-radius: 14px; border: 1px solid var(--line); transition: border-color .25s, background .25s, transform .2s var(--out); }
.amounts button b { display: block; font-size: 22px; font-weight: 500; font-variant-numeric: tabular-nums; }
.amounts button span { display: block; margin-top: 4px; font-size: 13px; color: var(--mute); }
.amounts button:hover { border-color: rgba(255, 255, 255, .35); }
.amounts button:active { transform: scale(.97); }
.amounts button.on { border-color: var(--gold); background: var(--gold-dim); }
.amounts button.on b { color: var(--gold); }
.custom { display: flex; align-items: center; gap: 12px; padding: 0 18px; height: 56px; border-radius: 14px; border: 1px solid var(--line); transition: border-color .25s; }
.custom:focus-within { border-color: var(--gold); }
.custom span { color: var(--dim); font-size: 14px; white-space: nowrap; }
.custom input { flex: 1; min-width: 0; background: none; border: 0; outline: 0; color: var(--ink); font: inherit; font-size: 20px; text-align: right; font-variant-numeric: tabular-nums; }
.custom em { color: var(--mute); }
#ratiobar { display: block; width: 100%; height: 120px; margin-top: 26px; }
.ratio-cap { margin-top: 10px; font-size: 14px; color: var(--mute); min-height: 1.4em; }

.tabs { display: flex; gap: 6px; padding: 5px; border-radius: 999px; border: 1px solid var(--line); margin-bottom: 26px; position: relative; }
.tabs button { flex: 1; height: 38px; border-radius: 999px; font-size: 14px; color: var(--mute); position: relative; z-index: 1; transition: color .3s; }
.tabs button.on { color: #000; }
.tabs .pill { position: absolute; top: 5px; bottom: 5px; border-radius: 999px; background: var(--gold); transition: left .45s var(--ease), width .45s var(--ease); }
.panel { display: none; }
.panel.on { display: block; animation: pin .5s var(--ease); }
@keyframes pin { from { opacity: 0; transform: translateX(14px); } }
.qr { position: relative; width: 220px; height: 220px; margin: 0 auto 26px; padding: 12px; border-radius: 12px; background: #fff; }
.qr img { width: 100%; height: 100%; display: block; object-fit: contain; }
.qr-ph { position: absolute; inset: 12px; display: none; place-items: center; background: #111; color: var(--dim); letter-spacing: .3em; font-size: 13px; border-radius: 4px; }
.qr.empty { background: #111; }
.qr.empty .qr-ph { display: grid; }
.qr.empty img { visibility: hidden; }
.qr i { position: absolute; width: 22px; height: 22px; border: 2px solid var(--gold); }
.qr i:nth-of-type(1) { left: -10px; top: -10px; border-right: 0; border-bottom: 0; }
.qr i:nth-of-type(2) { right: -10px; top: -10px; border-left: 0; border-bottom: 0; }
.qr i:nth-of-type(3) { left: -10px; bottom: -10px; border-right: 0; border-top: 0; }
.qr i:nth-of-type(4) { right: -10px; bottom: -10px; border-left: 0; border-top: 0; }
.qr::after { content: ''; position: absolute; left: 12px; right: 12px; height: 2px; top: 12px; background: var(--gold); box-shadow: 0 0 14px var(--gold); animation: scan 2.6s var(--ease) infinite alternate; opacity: .8; }
@keyframes scan { to { top: calc(100% - 14px); } }
dl { display: grid; grid-template-columns: auto 1fr; gap: 14px 18px; align-items: center; }
dt { font-size: 11px; letter-spacing: .26em; color: var(--dim); }
dd { display: flex; justify-content: flex-end; align-items: center; gap: 10px; font-size: 16px; text-align: right; font-variant-numeric: tabular-nums; }
.copy { font-size: 12px; padding: 5px 10px; border-radius: 6px; border: 1px solid var(--line); color: var(--mute); transition: all .25s; }
.copy:hover { border-color: var(--gold); color: var(--gold); }
.copy.ok { background: var(--gold); border-color: var(--gold); color: #000; }
.pay .note { color: var(--mute); line-height: 1.6; }
.missing { color: var(--dim); font-style: italic; font-size: 14px; }

.other { margin-top: 80px; }
.ways { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-top: 22px; }
.ways div { padding: 24px 0 0; border-top: 1px solid var(--line); position: relative; }
.ways div::before { content: ''; position: absolute; top: -1px; left: 0; width: 34px; height: 1px; background: var(--gold); transition: width .6s var(--ease); }
.ways div:hover::before { width: 100%; }
.ways b { display: block; font-size: 18px; font-weight: 500; margin-bottom: 8px; }
.ways span { color: var(--mute); font-size: 15px; line-height: 1.55; }

/* ---------- gợi ý ---------- */
.suggest { padding-bottom: 140px; }
.ask-line { font-size: clamp(30px, 4.8vw, 64px); font-weight: 500; letter-spacing: -.02em; line-height: 1.15; color: var(--dim); }
.ask-line span { color: var(--gold); border-bottom: 2px solid var(--gold); padding-bottom: 2px; }
.ask-line span::after { content: '_'; animation: blink 1s steps(1) infinite; font-weight: 300; }
.chips { display: flex; flex-wrap: wrap; gap: 10px; margin: 40px 0 26px; }
.chips button { padding: 10px 18px; border-radius: 999px; border: 1px solid var(--line); color: var(--mute); font-size: 15px; transition: all .25s var(--out); }
.chips button:hover { border-color: var(--ink); color: var(--ink); transform: translateY(-2px); }
.chips button.on { border-color: var(--gold); color: var(--gold); }
#ask-form { display: flex; gap: 12px; max-width: 680px; }
#ask-in { flex: 1; min-width: 0; height: 52px; padding: 0 22px; border-radius: 999px; border: 1px solid var(--line); background: none; color: var(--ink); font: inherit; font-size: 16px; outline: 0; transition: border-color .25s; }
#ask-in:focus { border-color: var(--gold); }

/* ---------- footer ---------- */
.foot { border-top: 1px solid var(--line); padding: 80px 24px 50px; text-align: center; }
.foot .tag { margin-top: 18px; color: var(--mute); font-size: 15px; letter-spacing: .04em; }
.foot .links { display: flex; justify-content: center; gap: 30px; flex-wrap: wrap; margin-top: 36px; font-size: 14px; color: var(--mute); }
.foot .links a:hover { color: var(--gold); }
.copy-r { margin-top: 40px; font-size: 12px; color: var(--dim); letter-spacing: .1em; }

#toast { position: fixed; left: 50%; bottom: 34px; z-index: 99; padding: 12px 22px; border-radius: 999px; background: var(--gold); color: #000; font-size: 14px; font-weight: 500; transform: translate(-50%, 30px); opacity: 0; transition: all .4s var(--ease); pointer-events: none; }
#toast.on { transform: translate(-50%, 0); opacity: 1; }

[hidden] { display: none !important; }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .nav nav a:not(.btn-sm) { display: none; }
  .grid { grid-template-columns: 1fr 1fr; }
  .card, .card:nth-child(1), .card:nth-child(2) { grid-column: span 1; }
  .card:nth-child(1) { grid-column: span 2; }
  .stats, .pipe, .ways { grid-template-columns: 1fr; }
  .stat + .stat { border-left: 0; border-top: 1px solid var(--line); }
  .pipe-line { display: none; }
  .give { grid-template-columns: 1fr; }
  .phi { display: none; }
  .sec { padding-top: 110px; }
}
@media (max-width: 560px) {
  .grid { grid-template-columns: 1fr; }
  .card:nth-child(1) { grid-column: span 1; }
  .pick, .pay { padding: 22px 18px; }
  .amounts { gap: 8px; }
  .amounts button { padding: 14px; }
  .amounts button b { font-size: 18px; }
  .custom span { display: none; }
  .hero h1 { font-size: 40px; }
  #ask-form { flex-direction: column; }
  #ask-in { flex: none; }
  .foot-end { flex-direction: column; gap: 14px; }
}
@media (hover: none) { #cursor { display: none; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  html { scroll-behavior: auto; }
}

/* =========================================================
   LỚP CHI TIẾT (polish.js)
   ========================================================= */
html { scrollbar-color: #2a2a28 #000; scrollbar-width: thin; }
::-webkit-scrollbar { width: 8px; } ::-webkit-scrollbar-track { background: #000; } ::-webkit-scrollbar-thumb { background: #2a2a28; border-radius: 8px; }
:focus-visible { outline: 1.5px solid var(--gold); outline-offset: 4px; border-radius: 6px; }
a:focus:not(:focus-visible), button:focus:not(:focus-visible) { outline: 0; }

/* tiến độ cuộn */
.progress { position: absolute; left: 0; right: 0; bottom: -1px; height: 1px; overflow: hidden; }
.progress i { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(242, 201, 76, .2), var(--gold)); transform-origin: left; transform: scaleX(0); box-shadow: 0 0 8px var(--gold); }

/* mục lục bên trái như một cây thước */
.rail { position: fixed; z-index: 40; left: 28px; top: 50%; transform: translate(-14px, -50%); display: flex; flex-direction: column; gap: 22px; opacity: 0; pointer-events: none; transition: opacity .5s var(--ease), transform .5s var(--ease); }
.rail.show { opacity: 1; transform: translate(0, -50%); pointer-events: auto; }
.rail a { --p: 0; position: relative; display: flex; align-items: center; gap: 12px; font-size: 11px; color: var(--dim); letter-spacing: .2em; padding-left: 30px; }
.rail a::before { content: ''; position: absolute; left: 0; top: 50%; width: 18px; height: 1px; background: rgba(255, 255, 255, .2); transition: width .4s var(--ease), background .3s; }
.rail a::after { content: ''; position: absolute; left: 0; top: 50%; width: calc(18px * var(--p)); height: 1px; background: var(--gold); transition: width .15s linear; }
.rail a i { font-style: normal; transition: color .3s; }
.rail a span { opacity: 0; transform: translateX(-6px); transition: opacity .3s, transform .3s var(--out); letter-spacing: .06em; font-size: 13px; color: var(--ink); white-space: nowrap; }
.rail a.cur i { color: var(--gold); }
.rail a.cur::before, .rail a:hover::before { width: 24px; }
.rail:hover a span { opacity: 1; transform: none; }
.rail a.cur::after { width: calc(24px * var(--p)); }
@media (max-width: 1380px) { .rail { display: none; } }

/* hero trôi lên khi cuộn */
.hero { --hs: 0; }
.hero-in { transform: translateY(calc(var(--hs) * -90px)); opacity: calc(1 - var(--hs) * 1.6); }
.hero .phi, .hero .scroll { opacity: calc(1 - var(--hs) * 3); }
#spiral { transform: scale(calc(1 + var(--hs) * .08)); transform-origin: 68% 50%; }
.hero .phi[data-rev] { transform: none; transition: none; }
.hero .phi:not(.in) { opacity: 0; }
.hero .phi.in { opacity: calc(1 - var(--hs) * 3); animation: phin .9s var(--ease) 2s backwards; }
@keyframes phin { from { opacity: 0; transform: translateY(10px); } }

/* tiêu đề: từng từ trượt lên qua mặt nạ */
.head[data-rev] { opacity: 1; transform: none; }
.head h2 .w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .12em; margin-bottom: -.12em; }
.head h2 .w > span { display: inline-block; transform: translateY(105%); transition: transform .8s var(--ease); transition-delay: calc(.25s + var(--i) * .055s); }
.head.in h2 .w > span { transform: none; }
.head .sub { opacity: 0; transform: translateY(14px); transition: opacity .8s var(--ease) .55s, transform .8s var(--ease) .55s; }
.head.in .sub { opacity: 1; transform: none; }
.part { min-height: 1.3em; }
.part.typing::after { content: '_'; color: var(--gold); animation: blink 1s steps(1) infinite; margin-left: 2px; }

/* thước kẻ φⁿ */
.ruler { position: relative; height: 22px; margin-bottom: 56px; }
.ruler .tk { position: absolute; left: 0; right: 0; top: 0; height: 9px; border-top: 1px solid rgba(255, 255, 255, .14);
  background: repeating-linear-gradient(90deg, rgba(255, 255, 255, .16) 0 1px, transparent 1px 100%) 0 0 / calc(100% / 34) 5px repeat-x,
              repeating-linear-gradient(90deg, rgba(255, 255, 255, .28) 0 1px, transparent 1px 100%) 0 0 / calc(100% / 34 * 5) 9px repeat-x;
  transform: scaleX(0); transform-origin: left; transition: transform 1.4s var(--ease); }
.ruler em { position: absolute; right: 0; top: 16px; font-size: 11px; letter-spacing: .14em; color: var(--dim); opacity: 0; transition: opacity .6s .9s; font-variant-numeric: tabular-nums; }
.ruler em sup { font-size: .75em; }
.ruler.in .tk { transform: scaleX(1); }
.ruler.in em { opacity: 1; }
.sec { padding-top: 110px; }

/* chữ cuộn lên khi rê */
.roll { display: inline-block; overflow: hidden; height: 1.25em; line-height: 1.25em; vertical-align: top; }
.roll > span { display: block; transition: transform .45s var(--ease); }
.roll > span::after { content: attr(data-t); display: block; color: var(--gold); }
a:hover > .roll > span { transform: translateY(-1.25em); }
.btn-sm .roll > span::after { color: #000; }

/* nút hút */
.btn, .btn-sm, .chips button { --tx: 0px; --ty: 0px; }
.btn { transform: translate(var(--tx), var(--ty)); transition: transform .35s var(--out), box-shadow .3s; }
.btn:active { transform: translate(var(--tx), var(--ty)) scale(.97); }
.btn-sm { display: inline-block; transform: translate(var(--tx), var(--ty)); transition: background .25s, color .25s, transform .35s var(--out) !important; }
.chips button:hover { transform: translate(var(--tx), calc(var(--ty) - 2px)); }

/* card nghiêng 3D + vệt sáng */
.card { perspective: 1000px; }
.card .fr { --rx: 0deg; --ry: 0deg; --mx: 50%; --my: 50%; transform-style: preserve-3d; transform: rotateX(var(--rx)) rotateY(var(--ry)); transition: border-color .35s, transform .6s var(--out), box-shadow .5s; }
.card:hover .fr { transform: translateY(-6px) rotateX(var(--rx)) rotateY(var(--ry)); transition: border-color .35s, transform .18s linear, box-shadow .5s; box-shadow: 0 30px 60px -30px rgba(242, 201, 76, .25), 0 0 0 1px rgba(242, 201, 76, .08); }
.card.act .fr { transform: translateY(-4px); }
.card .fr::after { content: ''; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .4s; background: radial-gradient(circle at var(--mx) var(--my), rgba(255, 255, 255, .14), transparent 45%); mix-blend-mode: screen; }
.card:hover .fr::after { opacity: 1; }
.card .num-i { position: absolute; left: 14px; top: 12px; font-size: 11px; letter-spacing: .2em; color: rgba(255, 255, 255, .55); z-index: 2; transition: color .3s; }
.card:hover .num-i { color: var(--gold); }

/* viền sáng theo chuột */
.spot { position: relative; --mx: -999px; --my: -999px; }
.spot::before { content: ''; position: absolute; inset: -1px; border-radius: inherit; padding: 1px; pointer-events: none;
  background: radial-gradient(260px circle at var(--mx) var(--my), rgba(242, 201, 76, .6), transparent 70%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude;
  opacity: 0; transition: opacity .4s; }
.spot::after { content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; background: radial-gradient(420px circle at var(--mx) var(--my), rgba(242, 201, 76, .045), transparent 70%); opacity: 0; transition: opacity .4s; }
.spot:hover::before, .spot:hover::after { opacity: 1; }
.ways > div.spot::before { display: none; }

/* đồng hồ cơ */
.stat .num { display: flex; align-items: flex-start; height: 1em; overflow: visible; }
.od { display: inline-block; height: 1em; overflow: hidden; line-height: 1; }
.od i { display: block; font-style: normal; will-change: transform; }
.od b { display: block; height: 1em; font-weight: inherit; }
.sep { display: inline-block; line-height: 1; }
.stat .num { -webkit-mask: linear-gradient(180deg, transparent 0, #000 12%, #000 88%, transparent 100%); }
.stat .num.hit { -webkit-mask: none; }

/* footer */
.foot { position: relative; overflow: hidden; padding-top: 30px; }
#wave { display: block; width: 100%; height: 120px; margin: 0 0 30px; }
.mark { display: inline-flex; align-items: center; font-weight: 200; font-size: clamp(64px, 13vw, 190px); letter-spacing: .14em; line-height: 1; padding-left: .14em; }
.mark span { color: transparent; -webkit-text-stroke: 1px rgba(255, 255, 255, .28);
  background: linear-gradient(90deg, #f4f4f2 0 50%, transparent 50% 100%) 100% 0 / 200% 100% no-repeat; -webkit-background-clip: text; background-clip: text;
  transition: background-position 1.6s var(--ease) .3s; }
.mark.in span { background-position: 0 0; }
.mark svg { width: .82em; height: .74em; margin: 0 .16em 0 .02em; overflow: visible; }
.mark svg path { fill: none; stroke: var(--gold); stroke-width: 1.6; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 1.6s var(--ease); filter: drop-shadow(0 0 6px rgba(242, 201, 76, .8)); }
.mark.in svg path { stroke-dashoffset: 0; }
.mark:hover svg { animation: tri 1.2s var(--ease); }
.foot-end { display: flex; justify-content: space-between; align-items: center; width: var(--w); margin: 56px auto 0; padding-top: 22px; border-top: 1px solid var(--line); }
.foot-end .copy-r { margin: 0; }
.top { font-size: 13px; color: var(--mute); display: inline-flex; gap: 8px; align-items: center; }
.top b { font-weight: 400; color: var(--gold); transition: transform .3s var(--out); }
.top:hover b { transform: translateY(-3px); }

@media (prefers-reduced-motion: reduce) {
  .hero-in, #spiral { transform: none !important; }
  .head h2 .w > span { transform: none; }
}
.stat .num.hit { text-shadow: none; filter: drop-shadow(0 0 18px rgba(242, 201, 76, .45)); }

/* =========================================================
   ỦNG HỘ CÓ GHI NHẬN (donate.js)
   ========================================================= */
body:not(.live) .live-only { display: none !important; }
.field { display: block; margin: 0 0 22px; }
.field .lbl { display: flex; justify-content: space-between; margin-bottom: 10px; }
.field .lbl i { font-style: normal; letter-spacing: .1em; color: var(--dim); font-variant-numeric: tabular-nums; }
.field input, .field textarea { width: 100%; background: none; border: 1px solid var(--line); border-radius: 14px; color: var(--ink); font: inherit; font-size: 17px; padding: 15px 18px; outline: 0; resize: none; transition: border-color .25s, background .25s; }
.field textarea { line-height: 1.5; }
.field input::placeholder, .field textarea::placeholder { color: var(--dim); }
.field input:focus, .field textarea:focus { border-color: var(--gold); background: rgba(242, 201, 76, .03); }
.custom + .field { margin-top: 22px; }
.pick.locked { pointer-events: none; }
.pick.locked > *:not(#ratiobar):not(.ratio-cap) { opacity: .35; transition: opacity .5s var(--ease); }
#d-submit { margin-top: 22px; }
#d-submit.busy { pointer-events: none; }
#d-submit.busy b { display: inline-block; animation: nudge .7s var(--ease) infinite alternate; }
@keyframes nudge { to { transform: translateX(6px); } }
.form-err { margin-top: 12px; min-height: 1.3em; font-size: 14px; color: #ff8a7a; }

/* các màn trong khung bên phải */
.view { display: none; }
.view.on { display: block; animation: vin .55s var(--ease); }
@keyframes vin { from { opacity: 0; transform: translateY(12px); } }

.steps { display: grid; gap: 14px; margin-bottom: 26px; counter-reset: s; }
.steps div { display: flex; align-items: center; gap: 14px; color: var(--mute); font-size: 15px; line-height: 1.45; }
.steps i { flex: none; width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--gold); color: var(--gold); font-style: normal; font-size: 13px; }
.steps b { color: var(--ink); font-weight: 500; }
.or { display: flex; align-items: center; gap: 14px; margin: 0 0 22px; font-size: 11px; letter-spacing: .28em; color: var(--dim); }
.or::before, .or::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.direct-note { margin-top: 20px; font-size: 13px; color: var(--dim); text-align: center; }

.wait-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 30px; flex-wrap: wrap; }
.back { font-size: 14px; color: var(--mute); transition: color .25s; }
.back:hover { color: var(--gold); }
.pulse { display: inline-flex; align-items: center; gap: 10px; font-size: 14px; }
.pulse b { font-weight: 500; }
.pulse em { font-style: normal; color: var(--gold); font-variant-numeric: tabular-nums; min-width: 3.2em; text-align: right; }
.pulse i { position: relative; width: 8px; height: 8px; border-radius: 50%; background: var(--gold); }
.pulse i::after { content: ''; position: absolute; inset: 0; border-radius: 50%; background: var(--gold); animation: ping 1.6s var(--out) infinite; }
@keyframes ping { to { transform: scale(3.2); opacity: 0; } }
.pulse.off i { background: var(--dim); }
.pulse.off i::after { display: none; }
.pulse.off b { color: var(--mute); }
.qr.live { margin-bottom: 24px; }
.qr-cap { text-align: center; font-size: 13px; color: var(--dim); margin-bottom: 26px; }
.code { color: var(--gold); letter-spacing: .12em; font-weight: 500; }
.wait-note { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--line); font-size: 14px; line-height: 1.6; color: var(--mute); }
.wait-note b { color: var(--ink); font-weight: 500; }

/* đã nhận: vòng tròn + dấu tích tự vẽ */
.view[data-view="paid"] { text-align: center; padding: 30px 0 10px; }
.tick { width: 120px; height: 120px; display: block; margin: 0 auto 26px; overflow: visible; }
.tick circle, .tick path { fill: none; stroke: var(--gold); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 1; }
.tick circle { stroke-width: 1.5; transform: rotate(-90deg); transform-origin: 60px 60px; }
.tick.draw circle { animation: draw 1s var(--ease) forwards; }
.tick.draw path { animation: draw .6s var(--ease) .75s forwards; }
.tick.draw { animation: glow 1.8s ease-out 1.2s; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes glow { 30% { filter: drop-shadow(0 0 18px rgba(242, 201, 76, .7)); } }
.view[data-view="paid"] h3 { font-size: 30px; font-weight: 500; letter-spacing: -.01em; }
.thanks { margin: 14px auto 30px; max-width: 30ch; color: var(--mute); line-height: 1.6; }
.thanks b { color: var(--ink); font-weight: 500; }
.thanks em { font-style: normal; color: var(--gold); }

/* danh sách gần đây */
.recent { margin-top: 26px; border: 1px solid var(--line); border-radius: 20px; padding: 30px 34px 18px; }
.recent-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; margin-bottom: 8px; }
.recent-stats { font-size: 14px; color: var(--mute); font-variant-numeric: tabular-nums; }
.recent-stats b { color: var(--ink); font-weight: 500; }
.recent-stats em { font-style: normal; color: var(--gold); }
#r-list { list-style: none; display: grid; grid-template-columns: 1fr 1fr; column-gap: 40px; }
#r-list li { display: flex; gap: 16px; padding: 18px 0; border-top: 1px solid var(--line); min-width: 0; }
#r-list li.fresh { animation: fresh 1.1s var(--ease); }
@keyframes fresh { 0% { opacity: 0; transform: translateY(-14px); background: rgba(242, 201, 76, .12); } 60% { opacity: 1; transform: none; } }
#r-list li.empty { grid-column: 1 / -1; color: var(--dim); font-size: 15px; justify-content: center; padding: 34px 0; }
.av { flex: none; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-size: 16px; font-weight: 500; color: var(--gold); background: var(--gold-dim); box-shadow: inset 0 0 0 var(--ring, 1px) rgba(242, 201, 76, .55); }
.rb { min-width: 0; flex: 1; }
.rt { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.rt b { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rt em { flex: none; font-style: normal; color: var(--gold); font-variant-numeric: tabular-nums; }
.rb p { margin-top: 6px; color: var(--mute); font-size: 15px; line-height: 1.5; overflow-wrap: anywhere; }
.rb time { display: block; margin-top: 6px; font-size: 12px; color: var(--dim); letter-spacing: .04em; }
.more { display: block; margin: 12px auto 0; padding: 10px 22px; border-radius: 999px; border: 1px solid var(--line); font-size: 14px; color: var(--mute); transition: border-color .25s, color .25s; }
.more:hover { border-color: var(--gold); color: var(--gold); }
@media (max-width: 760px) {
  #r-list { grid-template-columns: 1fr; }
  .recent { padding: 22px 18px 12px; }
  .recent-head { flex-direction: column; gap: 4px; }
}
.more[hidden] { display: none; }
.pay { scroll-margin-top: 90px; }
.copy { white-space: nowrap; }
@media (max-width: 560px) {
  dl { grid-template-columns: 1fr; gap: 6px; }
  dd { justify-content: space-between; text-align: left; margin-bottom: 12px; min-height: 30px; }
}
