@import url('/gioi-thieu/css/modern-fonts.css');
@font-face { font-family: 'XiangqiGlyphs'; src: url('../fonts/xiangqi-glyphs.woff2') format('woff2'); font-display: swap; }
:root {
  --bg: #0E1714; --bg2: #111C18; --cream: #F3EEE3; --gold: #E0BE78; --muted: #A9B4AC; --jade: #1D4538;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--cream); font-family: 'Be Vietnam Pro', system-ui, sans-serif; -webkit-font-smoothing: antialiased; }
a { color: inherit; }
img { display: block; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 4px; }

/* ---------- hero: exactly one viewport ---------- */
.hero { position: relative; min-height: 100svh; overflow: hidden; display: flex; flex-direction: column;
  background: radial-gradient(ellipse 55% 70% at 74% 50%, var(--jade) 0%, rgba(14,23,20,0) 70%), var(--bg); }
.hero-grid { position: absolute; right: 8%; top: 50%; width: min(576px, 45vw); aspect-ratio: 576 / 648; transform: translateY(-50%); opacity: .09; pointer-events: none; }
.topbar { position: relative; z-index: 2; display: flex; align-items: center; justify-content: space-between; padding: 28px clamp(20px, 8vw, 120px) 0; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand-mark { width: 38px; height: 38px; border-radius: 9px; background: var(--gold); color: var(--bg); display: grid; place-items: center; font: 900 21px/1 'XiangqiGlyphs', serif; }
.brand-name { font-weight: 800; font-size: 23px; letter-spacing: -.03em; }
.brand-name span { color: var(--gold); }
.btn-ghost { display: inline-flex; align-items: center; height: 46px; padding: 0 22px; border-radius: 99px; border: 1px solid rgba(243,238,227,.28); font-weight: 600; font-size: 15px; text-decoration: none; transition: background-color .2s; }
.btn-ghost:hover { background: rgba(243,238,227,.08); }
.hero-body { position: relative; z-index: 1; flex: 1; display: flex; align-items: center; justify-content: space-between; gap: 40px; padding: 0 clamp(20px, 8vw, 120px); }
.hero-copy { max-width: 760px; display: flex; flex-direction: column; gap: 28px; }
.hero h1 { margin: 0; font-weight: 800; font-size: clamp(48px, 6.6vw, 96px); line-height: 1.02; letter-spacing: -.045em; }
.hero h1 span { color: var(--gold); }
.hero p { margin: 0; }
.sub { max-width: 500px; font-size: clamp(17px, 1.4vw, 20px); line-height: 1.6; color: var(--muted); }
.btn-primary { align-self: flex-start; display: inline-flex; align-items: center; gap: 14px; height: 60px; padding: 0 30px; border-radius: 99px; background: var(--cream); color: var(--bg); font-weight: 700; font-size: 17px; text-decoration: none; transition: transform .15s, box-shadow .2s; }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 14px 30px rgba(224,190,120,.25); }
.btn-primary svg { width: 20px; height: 20px; }
.note { font-size: 14px; color: var(--muted); }
.hero-phone { position: relative; flex-shrink: 0; width: min(324px, 26vw, calc((100svh - 200px) * 0.46)); }
.hero-phone::before { content: ""; position: absolute; inset: -5% -18%; border-radius: 50%; background: radial-gradient(circle, rgba(224,190,120,.28) 0%, rgba(224,190,120,0) 65%); }
.phone { position: relative; padding: 3%; border-radius: 15% / 7%; background: #050807; box-shadow: 0 0 0 1px rgba(243,238,227,.14), 0 40px 80px rgba(0,0,0,.55); animation: float 6s ease-in-out infinite; }
.phone img { width: 100%; height: auto; aspect-ratio: 603 / 1312; object-fit: cover; border-radius: 12% / 5.6%; }
@keyframes float { 0%,100% { transform: translateY(0) rotate(4deg); } 50% { transform: translateY(-10px) rotate(4deg); } }
.cue { position: relative; z-index: 1; align-self: center; margin-bottom: 24px; display: flex; flex-direction: column; align-items: center; gap: 4px; min-height: 44px; font-size: 13px; font-weight: 600; letter-spacing: .12em; color: var(--muted); text-decoration: none; }
.cue svg { width: 20px; height: 20px; animation: cue 2s ease-in-out infinite; }
@keyframes cue { 0%,100% { transform: translateY(0); opacity: .6; } 50% { transform: translateY(5px); opacity: 1; } }

/* ---------- gameplay coverflow ---------- */
.gameplay { padding: 100px 0 80px; display: flex; flex-direction: column; align-items: center; gap: 36px; background: linear-gradient(180deg, var(--bg) 0%, var(--bg2) 100%); overflow: hidden; }
.gameplay h2 { margin: 0; padding: 0 20px; text-align: center; font-weight: 800; font-size: clamp(32px, 3.6vw, 52px); line-height: 1.1; letter-spacing: -.04em; }
.stage { position: relative; width: 100%; touch-action: pan-y; }
.card { position: absolute; left: 50%; top: 12px; padding: 0; border: 0; background: #050807; cursor: pointer; border-radius: 6%/2.8%; overflow: hidden;
  box-shadow: 0 0 0 1px rgba(243,238,227,.14), 0 30px 60px rgba(0,0,0,.55);
  transition: transform .7s cubic-bezier(.22,.8,.24,1), filter .7s ease, opacity .5s ease; }
.card img { width: 100%; height: 100%; object-fit: cover; pointer-events: none; user-select: none; -webkit-user-drag: none; }
.arrow { position: absolute; top: 50%; z-index: 10; width: 56px; height: 56px; margin-top: -28px; border: 0; background: transparent; cursor: pointer; display: grid; place-items: center; transition: transform .15s; }
.arrow:hover { transform: scale(1.12); }
.arrow svg { width: 44px; height: 44px; fill: none; stroke: #fff; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; filter: drop-shadow(0 2px 6px rgba(0,0,0,.6)); }
.caption { min-height: 64px; padding: 0 20px; display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; }
.caption strong { font-size: clamp(19px, 1.6vw, 22px); line-height: 1.3; }
.caption span { max-width: 460px; font-size: clamp(15px, 1.2vw, 16px); line-height: 1.55; color: var(--muted); }
.dots { display: flex; gap: 2px; }
.dots button { width: 30px; height: 44px; border: 0; background: transparent; cursor: pointer; display: grid; place-items: center; padding: 0; }
.dots i { display: block; height: 6px; width: 8px; border-radius: 3px; background: rgba(243,238,227,.3); transition: width .3s, background-color .3s; }
.dots button[aria-current="true"] i { width: 26px; background: var(--gold); }

footer { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 28px clamp(20px, 8vw, 120px); border-top: 1px solid rgba(243,238,227,.1); background: var(--bg2); color: var(--muted); font-size: 14px; }
footer p { margin: 0; }
footer nav { display: flex; gap: 28px; }
footer nav a { min-height: 44px; display: flex; align-items: center; text-decoration: none; }
footer .brand-mark { width: 30px; height: 30px; font-size: 17px; border-radius: 7px; }
footer .brand-name { font-size: 18px; color: var(--cream); }

/* ---------- phone layout ---------- */
@media (max-width: 760px) {
  .topbar { padding-top: 14px; }
  .brand-mark { width: 32px; height: 32px; font-size: 18px; }
  .brand-name { font-size: 19px; }
  .btn-ghost { height: 44px; padding: 0 18px; font-size: 14px; }
  .hero { height: 100svh; min-height: 640px; background: radial-gradient(ellipse 90% 45% at 50% 88%, var(--jade) 0%, rgba(14,23,20,0) 70%), var(--bg); }
  .hero-body { flex-direction: column; align-items: stretch; justify-content: flex-start; gap: 0; padding-top: 36px; }
  .hero-copy { gap: 18px; }
  .btn-primary { align-self: stretch; justify-content: space-between; height: 56px; }
  .note { text-align: center; }
  .hero-grid { right: auto; left: 50%; top: auto; bottom: -40px; width: 320px; transform: translateX(-50%); }
  .hero-phone { width: 250px; align-self: center; margin-top: 36px; }
  .phone { animation: none; }
  .cue { display: none; }
  .gameplay { padding-top: 72px; gap: 24px; }
  .arrow svg { width: 32px; height: 32px; }
  footer { flex-direction: column; align-items: flex-start; }
}
@media (prefers-reduced-motion: reduce) {
  .phone, .cue svg { animation: none; }
  .card, .dots i { transition: none; }
}
