/* Giao diện chung "hồ sơ cá nhân": màu, chữ, đầu/chân trang, nút nổi, nhạc nền và các hiệu ứng. Dùng cho mọi trang. */
:root {
  --esp: #1a1510; --esp-2: #231c16; --esp-3: #2e251d;
  --cream: #f4ede3; --paper: #faf6f0; --card: #fffdf9;
  --ink: #2a221b; --ink-2: #6b5f53; --ink-3: #9a8d7f;
  --gold: #b38b52; --gold-l: #d9bc8c; --gold-d: #8e6a37; --gold-hi: #f6e3be;
  --on-dark: #efe6d8; --on-dark-2: #b9ab98; --line-d: rgba(217, 188, 140, .18); --line-l: rgba(42, 34, 27, .12);
  --serif: "Playfair Display", Georgia, serif; --sans: "Be Vietnam Pro", system-ui, sans-serif;
  --r: 18px; --ease: cubic-bezier(.2, .7, .2, 1);
}
html { scroll-behavior: smooth; scroll-padding-top: 76px; }
body { margin: 0; background: var(--esp); color: var(--on-dark); font: 300 16px/1.75 var(--sans); -webkit-font-smoothing: antialiased; }
::selection { background: var(--gold); color: #1a1510; }
.wrap { width: min(1160px, 100% - 40px); margin: 0 auto; }

/* chữ nhỏ trang trí */
.eyebrow { display: inline-flex; align-items: center; gap: 12px; font: 500 12px/1.6 var(--sans); letter-spacing: .32em; text-transform: uppercase; color: var(--gold); }
.dark .eyebrow { color: var(--gold-l); }
.eyebrow.pre::before, .eyebrow.line::before, .eyebrow.line::after { content: ""; width: 28px; height: 1px; background: currentColor; opacity: .6; flex: none; }
.mono { display: inline-grid; place-items: center; width: 84px; height: 84px; border: 1px solid var(--gold-l); border-radius: 50%; font: italic 500 30px/1 var(--serif); color: var(--gold-l); letter-spacing: -.04em; }
.mono.sm { width: 40px; height: 40px; font-size: 15px; flex: none; }

/* nút: viên thuốc, vệt sáng lướt qua khi rê chuột */
.btn.gold, .btn.ghost { position: relative; overflow: hidden; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 26px; border-radius: 999px; font: 500 15px/1 var(--sans); letter-spacing: 0; text-transform: none; cursor: pointer; border: 1px solid transparent; box-shadow: none; transition: background .3s, color .3s, border-color .3s, box-shadow .3s; will-change: transform; }
.btn.gold { background: linear-gradient(135deg, #e3c795, #b38b52); color: #1a1510; border: 0; }
.btn.gold:hover { color: #1a1510; box-shadow: 0 14px 34px -12px rgba(227, 199, 149, .6); }
.btn.ghost { background: transparent; border-color: var(--line-d); color: var(--on-dark); }
.btn.ghost:hover { border-color: var(--gold-l); color: var(--gold-l); background: rgba(217, 188, 140, .06); }
.btn.gold::after, .btn.ghost::after, .btn-gold::after { content: ""; position: absolute; top: 0; bottom: 0; left: -60%; width: 40%; background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .45), transparent); transform: skewX(-20deg); transition: left .7s var(--ease); pointer-events: none; }
.btn.gold:hover::after, .btn.ghost:hover::after, .btn-gold:hover::after { left: 130%; }
.cream .btn.ghost, .paper .btn.ghost { border-color: var(--line-l); color: var(--ink); }
.cream .btn.ghost:hover, .paper .btn.ghost:hover { border-color: var(--gold); color: var(--gold-d); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* thanh tiến độ đọc */
.progress { position: fixed; top: 0; left: 0; right: 0; height: 2px; z-index: 90; background: linear-gradient(90deg, #b38b52, #f6e3be); transform-origin: 0 50%; transform: scaleX(0); pointer-events: none; }

/* thanh trên cùng: ẩn khi cuộn xuống, hiện lại khi cuộn lên */
.top { position: sticky; top: 0; z-index: 50; background: rgba(26, 21, 16, .78); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--line-d); color: var(--on-dark); transition: transform .45s var(--ease), background .3s; }
.top.solid { background: rgba(20, 16, 12, .94); }
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 20px; height: 68px; }
.top .brand { display: flex; align-items: center; gap: 12px; color: var(--on-dark); }
.top .brand b { display: block; font: 500 19px/1.1 var(--serif); color: #f3e6cf; letter-spacing: 0; }
.top .brand small { display: block; font-size: 10px; letter-spacing: .3em; text-transform: uppercase; color: var(--on-dark-2); }
.top .brand b { transition: color .3s; }
.top .brand:hover b { color: var(--gold-hi); }
.menu { display: flex; gap: 24px; }
.menu a { position: relative; font-size: 12.5px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--on-dark-2); padding: 6px 0; transition: color .25s; white-space: nowrap; }
.menu a::after { content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 1px; background: var(--gold-l); transform: scaleX(0); transform-origin: right; transition: transform .45s var(--ease); }
.menu a:hover, .menu a.on { color: var(--gold-l); }
.menu a:hover::after, .menu a.on::after { transform: scaleX(1); transform-origin: left; }
.top .menu-btn { display: none; width: 44px; height: 44px; border: 1px solid var(--line-d); border-radius: 50%; background: none; cursor: pointer; flex-direction: column; align-items: center; justify-content: center; gap: 6px; color: var(--on-dark); }
.top .menu-btn span { width: 18px; height: 1px; background: var(--on-dark); transition: transform .3s; }
.top .menu-btn[aria-expanded="true"] span:first-child { transform: translateY(3.5px) rotate(45deg); }
.top .menu-btn[aria-expanded="true"] span:last-child { transform: translateY(-3.5px) rotate(-45deg); }

/* chân trang */
.foot { background: #120e0a; color: var(--on-dark-2); border-top: 1px solid var(--line-d); padding: 72px 0 0; font-size: 15px; }
.foot-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 40px; }
.foot .brand { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.foot .brand b { display: block; font: 500 22px/1.1 var(--serif); color: #f3e6cf; }
.foot .brand small { font-size: 10px; letter-spacing: .3em; text-transform: uppercase; }
.foot h4 { font: 500 12px/1 var(--sans); letter-spacing: .3em; text-transform: uppercase; color: var(--gold-l); margin: 8px 0 20px; }
.foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.foot a { color: var(--on-dark-2); transition: color .2s; }
.foot a:hover { color: var(--gold-l); }
.foot-bottom { margin-top: 56px; padding: 22px 0; border-top: 1px solid var(--line-d); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; font-size: 13px; }

/* nút nổi: nhạc, gọi, Zalo */
.fab { position: fixed; right: 18px; bottom: 18px; z-index: 60; display: flex; flex-direction: column; gap: 10px; }
.fab a, .fab button { display: grid; place-items: center; width: 50px; height: 50px; border-radius: 50%; background: var(--esp-2); border: 1px solid var(--gold); color: var(--gold-l); box-shadow: 0 10px 24px rgba(0, 0, 0, .35); font: 600 13px/1 var(--sans); cursor: pointer; padding: 0; transition: background .3s; }
.fab a:hover, .fab button:hover { color: var(--gold-hi); background: var(--esp-3); }
.fab svg { width: 20px; height: 20px; }
.fab .zalo { background: linear-gradient(135deg, #e3c795, #b38b52); color: #1a1510; border: 0; }
.fab .zalo:hover { color: #1a1510; background: linear-gradient(135deg, #f0d6a8, #c29a60); }
.music { position: relative; }
.music .eq { display: flex; align-items: flex-end; gap: 3px; height: 16px; }
.music .eq i { width: 3px; height: 4px; border-radius: 2px; background: currentColor; transition: height .3s; }
.music[aria-pressed="true"] .eq i { animation: eq 1.1s ease-in-out infinite; }
.music[aria-pressed="true"] .eq i:nth-child(2) { animation-delay: -.4s; }
.music[aria-pressed="true"] .eq i:nth-child(3) { animation-delay: -.8s; }
.music[aria-pressed="false"] .eq i { height: 4px; }
.music[aria-pressed="false"]::after { content: ""; position: absolute; width: 26px; height: 1px; background: currentColor; transform: rotate(-45deg); opacity: .8; }
.music.invite { animation: invite 2.4s ease-in-out infinite; }
.music-tip { position: absolute; right: 60px; top: 50%; transform: translateY(-50%); white-space: nowrap; background: var(--esp-2); border: 1px solid var(--line-d); color: var(--on-dark); font: 400 13px/1 var(--sans); padding: 9px 12px; border-radius: 999px; opacity: 0; pointer-events: none; transition: opacity .3s; }
.music:hover .music-tip, .music.invite .music-tip { opacity: 1; }
@keyframes eq { 0%, 100% { height: 4px; } 50% { height: 16px; } }
@keyframes invite { 0%, 100% { box-shadow: 0 0 0 0 rgba(217, 188, 140, .45); } 60% { box-shadow: 0 0 0 12px rgba(217, 188, 140, 0); } }

/* màn chào */
.splash { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; background: radial-gradient(60% 60% at 50% 45%, #3a2d20, #120e0a); color: var(--on-dark); text-align: center; cursor: pointer; transition: opacity 1s ease, visibility 1s, transform 1.2s var(--ease); }
.splash.gone { opacity: 0; visibility: hidden; transform: scale(1.04); }
.splash-in { display: flex; flex-direction: column; align-items: center; gap: 18px; padding: 24px; }
.splash-in > * { opacity: 0; animation: rise 1.1s var(--ease) forwards; }
.splash-in > :nth-child(2) { animation-delay: .25s; } .splash-in > :nth-child(3) { animation-delay: .5s; } .splash-in > :nth-child(4) { animation-delay: .9s; }
.splash-name { font: 500 clamp(40px, 7vw, 72px)/1.1 var(--serif); color: #f3e6cf; }
.splash i { font-family: var(--serif); color: var(--gold-l); font-size: 18px; }
.splash .tap { font-size: 12px; letter-spacing: .3em; text-transform: uppercase; color: var(--on-dark-2); margin-top: 18px; }
.splash .tap::before { content: "♪ "; color: var(--gold-l); }
.corner { position: absolute; width: 34px; height: 34px; border: 1px solid var(--line-d); }
.corner.tl { top: 24px; left: 24px; border-right: 0; border-bottom: 0; } .corner.tr { top: 24px; right: 24px; border-left: 0; border-bottom: 0; }
.corner.bl { bottom: 24px; left: 24px; border-right: 0; border-top: 0; } .corner.br { bottom: 24px; right: 24px; border-left: 0; border-top: 0; }
@keyframes rise { from { opacity: 0; transform: translateY(18px); filter: blur(6px); } to { opacity: 1; transform: none; filter: none; } }

/* hiện dần khi cuộn tới */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 1s var(--ease), transform 1s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.reveal.d1 { transition-delay: .1s; } .reveal.d2 { transition-delay: .2s; } .reveal.d3 { transition-delay: .3s; }
/* ảnh mở màn từ dưới lên */
.wipe { clip-path: inset(100% 0 0 0); transition: clip-path 1.4s var(--ease); }
.wipe.in { clip-path: inset(0 0 0 0); }

/* chữ: từng từ trồi lên, từng chữ cái hiện mờ dần */
.split .w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .12em; margin-bottom: -.12em; }
.split .wi { display: inline-block; transform: translateY(105%); transition: transform 1s var(--ease); transition-delay: calc(var(--i) * 55ms); }
.split.in .wi { transform: none; }
.gold-text .wi, .split .gold-text .wi { background: inherit; -webkit-background-clip: text; background-clip: text; }
.letters .ch { display: inline-block; opacity: 0; transform: translateY(.35em); filter: blur(8px); transition: opacity .9s ease, transform .9s var(--ease), filter .9s ease; transition-delay: calc(var(--i) * 45ms + .15s); }
.letters.in .ch { opacity: 1; transform: none; filter: none; }
/* chữ vàng có vệt sáng chạy chậm */
.shimmer { background: linear-gradient(110deg, #b38b52 0%, #e9cf9f 30%, #fff4dc 45%, #e9cf9f 60%, #b38b52 100%); background-size: 250% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: shimmer 6s linear infinite; }
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: -150% 0; } }
/* đường gạch vàng tự vẽ dưới tiêu đề */
.draw-line { display: block; width: 72px; height: 1px; background: var(--gold); transform: scaleX(0); transform-origin: left; transition: transform 1.2s var(--ease) .3s; }
.in .draw-line, .draw-line.in { transform: scaleX(1); }

/* bụi vàng lơ lửng trên nền tối */
.dust { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 0; }
.has-dust { position: relative; isolation: isolate; }
.has-dust > .wrap { position: relative; z-index: 1; }

/* thẻ nghiêng theo chuột + vùng sáng theo con trỏ */
[data-tilt] { transform-style: preserve-3d; transition: transform .6s var(--ease), border-color .35s, box-shadow .35s; will-change: transform; }
[data-tilt].tilting { transition: transform .12s linear, border-color .35s, box-shadow .35s; }
.spot { position: relative; }
.spot::before { content: ""; position: absolute; inset: 0; border-radius: inherit; background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%), rgba(246, 227, 190, .12), transparent 45%); opacity: 0; transition: opacity .4s; pointer-events: none; z-index: 1; }
.spot:hover::before { opacity: 1; }

/* con trỏ chuột vàng (chỉ máy tính) */
.cur-dot, .cur-ring { position: fixed; top: 0; left: 0; z-index: 9999; pointer-events: none; border-radius: 50%; opacity: 0; transition: opacity .3s; }
.cur-dot { width: 6px; height: 6px; margin: -3px 0 0 -3px; background: var(--gold-l); }
.cur-ring { width: 36px; height: 36px; margin: -18px 0 0 -18px; border: 1px solid rgba(217, 188, 140, .6); display: grid; place-items: center; transition: opacity .3s, width .35s var(--ease), height .35s var(--ease), margin .35s var(--ease), background .35s, border-color .35s; }
.cur-ring span { font: 500 11px/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: #1a1510; opacity: 0; transition: opacity .2s; }
.cur-on .cur-dot, .cur-on .cur-ring { opacity: 1; }
.cur-ring.big { width: 60px; height: 60px; margin: -30px 0 0 -30px; background: rgba(217, 188, 140, .12); border-color: var(--gold-l); }
.cur-ring.label { width: 78px; height: 78px; margin: -39px 0 0 -39px; background: var(--gold-l); border-color: var(--gold-l); }
.cur-ring.label span { opacity: 1; }
.cur-ring.down { transform: scale(.85); }

@media (max-width: 1100px) {
  .top .menu-btn { display: inline-flex; }
  .menu { position: absolute; top: 68px; left: 0; right: 0; flex-direction: column; gap: 0; background: rgba(20, 16, 12, .98); border-bottom: 1px solid var(--line-d); padding: 8px 20px 18px; display: none; }
  .menu.open { display: flex; }
  .menu a { padding: 14px 0; border-bottom: 1px solid var(--line-d); font-size: 13px; }
  .menu a::after { display: none; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .wrap { width: calc(100% - 32px); }
  .top .brand b { font-size: 17px; }
  .foot-grid { grid-template-columns: 1fr; gap: 28px; }
  .fab { right: 12px; bottom: 12px; }
  .fab a, .fab button { width: 46px; height: 46px; }
  .music-tip { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal, .wipe, .split .wi, .letters .ch { opacity: 1 !important; transform: none !important; filter: none !important; clip-path: none !important; transition: none !important; }
  .splash { display: none; }
  .shimmer, .music.invite, .music .eq i { animation: none !important; }
}
