/* VSES 2027 v4 «Nghị trường» — design tokens + thành phần. Xem DESIGN-GUIDE-v4.md.
   Bố cục: lề rộng, tràn ngang trong lề; section xen kẽ nền Mực / Giấy; khuôn đầu mục ba cột. */
:root {
  --ink: #12151C; --ink-2: #1B1F29; --paper: #F7F5EE; --paper-2: #EFECE2;
  --cream: #F2EBDD; --stone: #9AA3B5; --slate: #5C6272;
  --rule-d: rgba(242, 235, 221, .14); --rule-l: rgba(18, 21, 28, .12);
  --blue: #0065F2; --navy: #003D91; --sky: #8DB7FF; --sand: #E7D8BF; --track: #D4512B;
  --serif: "Newsreader", "Iowan Old Style", Georgia, serif;
  --sans: "Be Vietnam Pro", "Helvetica Neue", Arial, sans-serif;
  --gutter: clamp(16px, 3.7vw, 56px);
  --sec: clamp(96px, 11vw, 160px);
  --ease: cubic-bezier(.16, 1, .3, 1);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--ink); color: var(--cream); font: 400 16px/1.55 var(--sans); letter-spacing: -.01em; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p, ol, ul, dl, dd, figure { margin: 0; padding: 0; }
ol, ul { list-style: none; }
:focus-visible { outline: 2px solid var(--sky); outline-offset: 3px; border-radius: 4px; }
.light :focus-visible { outline-color: var(--blue); }

/* ---- Nền section ---- */
.dark { background: var(--ink); color: var(--cream); }
.light { background: var(--paper); color: var(--ink); }

/* ---- Chữ ---- */
.h2 { font: 300 clamp(38px, 4.4vw, 68px)/1.04 var(--serif); letter-spacing: -.035em; text-wrap: balance; }
.h2--sm { font-size: clamp(32px, 3.4vw, 52px); }
.label { display: inline-flex; align-items: center; gap: 10px; font: 600 12px/1 var(--sans); letter-spacing: .04em; text-transform: uppercase; }
.chip__mark { display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 3px; background: var(--cream); color: var(--ink);
  font: 400 14px/1 var(--serif); letter-spacing: 0; text-transform: none; flex: none; }
.light .chip__mark { background: var(--ink); color: var(--paper); }
.chip__mark--lg { width: 28px; height: 28px; font-size: 20px; }

/* ---- Nút ---- */
.btn { display: inline-flex; align-items: center; gap: 10px; height: 44px; padding: 0 22px; border-radius: 6px; border: 1px solid transparent;
  font: 500 15px/1 var(--sans); letter-spacing: -.01em; white-space: nowrap; transition: background-color .2s, border-color .2s, color .2s; }
.btn .arr { transition: transform .2s ease-out; }
.btn:hover .arr { transform: translateX(3px); }
.btn--light { background: var(--paper-2); color: var(--ink); }
.btn--light:hover { background: #fff; }
.btn--ghost { border-color: var(--rule-d); color: var(--cream); background: rgba(242, 235, 221, .04); }
.btn--ghost:hover { border-color: rgba(242, 235, 221, .4); }
.light .btn--ghost { border-color: var(--rule-l); color: var(--ink); background: transparent; }
.btn--blue { background: var(--blue); color: #fff; }
.btn--blue:hover { background: var(--navy); }

/* ---- Header ---- */
.hdr { position: fixed; z-index: 30; inset: 0 0 auto; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 24px;
  padding: 18px var(--gutter); color: var(--cream); transition: background-color .3s; }
.hdr.is-solid { background: rgba(18, 21, 28, .86); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.hdr__nav { display: flex; gap: 28px; font: 500 14px/1 var(--sans); }
.hdr__nav a span { font-size: 11px; opacity: .7; }
.hdr__nav a:hover { color: #fff; }
.wordmark { font: 400 26px/1 var(--serif); letter-spacing: -.02em; display: inline-flex; align-items: baseline; gap: 6px; }
.wordmark span { font: 500 11px/1 var(--sans); letter-spacing: .04em; color: var(--stone); }
.hdr__acts { display: flex; gap: 10px; justify-content: flex-end; }

/* ---- Hào quang (thay ảnh khi chưa có ảnh thật) ---- */
.aura { position: relative; overflow: hidden; border-radius: 4px; isolation: isolate; background: var(--c0, #0B2A6B); }
.aura > i { position: absolute; border-radius: 50%; filter: blur(60px); opacity: .9; animation: drift var(--d, 48s) linear infinite; z-index: -1; }
.aura::before { content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background-image: radial-gradient(circle, rgba(255, 255, 255, .22) 1px, transparent 1.4px); background-size: 14px 14px; opacity: .55; }
.aura::after { content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none; opacity: .07; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='160' height='160' filter='url(%23n)'/></svg>"); }
@keyframes drift {
  0% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(6%, -5%) scale(1.08); }
  66% { transform: translate(-5%, 4%) scale(.94); }
  100% { transform: translate(0, 0) scale(1); }
}
/* bộ màu từng hào quang: xanh WEF làm chủ, xanh nhạt và cát ấm làm điểm */
.aura--hero { position: absolute; inset: 0; border-radius: 0; --c0: #071B4D; }
.aura--hero::before { opacity: .35; }

.aura--a { --c0: #0A2C78; } .aura--a > i:nth-child(1) { width: 90%; height: 70%; left: -10%; top: 40%; background: var(--blue); }
.aura--a > i:nth-child(2) { width: 60%; height: 50%; left: 50%; top: -10%; background: var(--sky); opacity: .6; --d: 52s; }
.aura--a > i:nth-child(3) { width: 40%; height: 40%; left: 60%; top: 60%; background: var(--sand); opacity: .45; --d: 44s; }
.aura--b { --c0: #102457; } .aura--b > i:nth-child(1) { width: 80%; height: 70%; left: 30%; top: 30%; background: var(--blue); --d: 56s; }
.aura--b > i:nth-child(2) { width: 60%; height: 60%; left: -20%; top: -10%; background: var(--sand); opacity: .5; }
.aura--b > i:nth-child(3) { width: 40%; height: 40%; left: 10%; top: 70%; background: var(--sky); opacity: .5; --d: 46s; }
.aura--c { --c0: #0B1F4A; } .aura--c > i:nth-child(1) { width: 90%; height: 60%; left: 10%; top: -10%; background: var(--sky); opacity: .6; --d: 50s; }
.aura--c > i:nth-child(2) { width: 70%; height: 70%; left: 20%; top: 50%; background: var(--blue); }
.aura--c > i:nth-child(3) { width: 30%; height: 30%; left: -10%; top: 40%; background: var(--sand); opacity: .4; --d: 42s; }
.aura--d { --c0: #0D2A66; } .aura--d > i:nth-child(1) { width: 70%; height: 70%; left: 40%; top: 50%; background: var(--sand); opacity: .55; --d: 58s; }
.aura--d > i:nth-child(2) { width: 80%; height: 60%; left: -20%; top: 0%; background: var(--blue); }
.aura--d > i:nth-child(3) { width: 40%; height: 40%; left: 50%; top: -10%; background: var(--sky); opacity: .55; --d: 44s; }
.aura--wide { --c0: #E9E6DC; margin-top: 56px; min-height: clamp(360px, 42vw, 560px); display: grid; place-items: center; }
.aura--wide > i:nth-child(1) { width: 50%; height: 80%; left: 50%; top: 30%; background: var(--sky); opacity: .7; }
.aura--wide > i:nth-child(2) { width: 40%; height: 70%; left: 10%; top: 40%; background: var(--sand); opacity: .8; --d: 56s; }
.aura--wide > i:nth-child(3) { width: 30%; height: 50%; left: 72%; top: -10%; background: #C9DBFF; opacity: .8; --d: 44s; }
.aura--wide > i:nth-child(4) { width: 20%; height: 40%; left: 30%; top: -10%; background: #FFFFFF; opacity: .7; --d: 40s; }
.aura--wide::before { background-image: radial-gradient(circle, rgba(18, 21, 28, .2) 1px, transparent 1.4px); }
.aura--cta { position: absolute; inset: 0 var(--gutter); border-radius: 4px; --c0: #061A4A; }
.aura--cta > i:nth-child(1) { width: 60%; height: 120%; left: 45%; top: -20%; background: var(--blue); }
.aura--cta > i:nth-child(2) { width: 40%; height: 80%; left: 70%; top: 40%; background: var(--sky); opacity: .5; --d: 56s; }
.aura--cta > i:nth-child(3) { width: 40%; height: 80%; left: -10%; top: 30%; background: var(--navy); --d: 50s; }

/* ---- Hero ---- */
.hero { position: relative; min-height: 100svh; display: flex; overflow: hidden; }
.hero__in { position: relative; z-index: 1; width: 100%; display: flex; flex-direction: column; justify-content: flex-end; gap: clamp(28px, 4vw, 56px);
  padding: 140px var(--gutter) clamp(28px, 4vw, 48px); }
.chip { display: inline-flex; align-items: center; gap: 10px; font: 600 12px/1 var(--sans); letter-spacing: .04em; text-transform: uppercase; }
.hero__title { font: 300 clamp(56px, 9.2vw, 164px)/.92 var(--serif); letter-spacing: -.045em; max-width: 12.5em; text-wrap: balance; color: #FAF6EC; }
.hero__foot { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 24px 48px; padding-top: 22px; border-top: 1px solid rgba(242, 235, 221, .22); }
.hero__lead { max-width: 34em; font-size: 16px; color: var(--cream); }
.facts { display: flex; gap: clamp(24px, 4vw, 56px); }
.facts dt { font: 500 12px/1.2 var(--sans); color: rgba(250, 246, 236, .78); letter-spacing: 0; margin-bottom: 8px; }
.facts dd { font: 300 clamp(24px, 2.2vw, 32px)/1 var(--serif); letter-spacing: -.02em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.facts dd b { font-weight: 400; }

/* ---- Section và khuôn đầu mục ---- */
.sec { padding: var(--sec) var(--gutter) 0; }
.sec:last-of-type { padding-bottom: var(--sec); }
.sec--tight { padding-top: clamp(64px, 7vw, 112px); padding-bottom: var(--sec); }
.head { border-top: 1px solid var(--rule-d); padding-top: 16px; }
.light .head { border-top-color: var(--rule-l); }
.head__row { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 24px; align-items: start; margin-top: 28px; }
.head__row .h2 { grid-column: 1 / span 6; }
.head__text { grid-column: 7 / span 3; font-size: 15px; line-height: 1.5; color: var(--stone); padding-top: 8px; }
.light .head__text { color: var(--slate); }
.head__btn { grid-column: 11 / span 2; justify-self: end; margin-top: 4px; }

/* ---- Số liệu lớn ---- */
.numbers { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: end; gap: 32px; margin-top: clamp(56px, 7vw, 112px); }
.num__v { display: block; font: 300 clamp(64px, 10vw, 176px)/.9 var(--serif); letter-spacing: -.05em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.num__v small { font: 500 clamp(14px, 1.3vw, 18px)/1 var(--sans); letter-spacing: 0; margin-left: .5em; color: var(--stone); vertical-align: top; }
.num--goal .num__v { color: var(--sky); }
.num figcaption { margin-top: 20px; max-width: 26em; font-size: 15px; color: var(--stone); }
.num figcaption b { color: var(--cream); font-weight: 500; }
.num__arrow { align-self: center; width: clamp(48px, 8vw, 140px); height: 1px; background: var(--rule-d); position: relative; }
.num__arrow span { position: absolute; right: 0; top: -4px; width: 9px; height: 9px; border-top: 1px solid var(--stone); border-right: 1px solid var(--stone); transform: rotate(45deg); }
.note { margin-top: 40px; font-size: 13px; color: var(--stone); }

/* ---- Thẻ phiên ---- */
.cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; margin-top: 56px; }
.card .aura { aspect-ratio: 3 / 4; display: flex; align-items: flex-end; padding: 18px; }
.card__no { position: relative; z-index: 1; font: 300 clamp(40px, 4vw, 64px)/1 var(--serif); letter-spacing: -.04em; color: #FAF6EC; }
.card__t { margin-top: 18px; font: 600 13px/1.2 var(--sans); letter-spacing: .04em; text-transform: uppercase; }
.card__p { margin-top: 10px; font-size: 14.5px; line-height: 1.5; color: var(--stone); max-width: 28em; }

/* ---- Bánh xe chữ ---- */
.wheel { height: 260vh; padding: 0 var(--gutter); margin-top: var(--sec); }
.wheel__stick { position: sticky; top: 0; height: 100vh; display: grid; place-items: center; overflow: hidden; }
.wheel__rule { position: absolute; left: 0; right: 0; top: 50%; height: 1px; background: var(--rule-d); }
.wheel__label { position: absolute; left: 0; top: calc(50% + 16px); }
.wheel__btn { position: absolute; right: 0; top: calc(50% + 12px); }
.wheel__list { position: relative; height: 100%; width: 100%; }
.wheel__list li { position: absolute; left: 50%; top: 50%; white-space: nowrap; font: 300 clamp(40px, 5.4vw, 88px)/1 var(--serif); letter-spacing: -.035em;
  transform: translate(-50%, calc(-50% + var(--y, 0px))); opacity: var(--o, 0); color: var(--cream); padding: 0 24px; background: var(--ink); }

/* ---- Thẻ nổi trong hào quang ---- */
.float { position: relative; z-index: 1; width: min(560px, calc(100% - 32px)); background: rgba(255, 255, 255, .82); border: 1px solid rgba(255, 255, 255, .9);
  border-radius: 10px; padding: 18px 22px 22px; box-shadow: 0 20px 50px rgba(18, 21, 28, .12); backdrop-filter: blur(8px); color: var(--ink); }
.float__k { display: flex; align-items: center; gap: 8px; font: 500 13px/1 var(--sans); color: var(--slate); padding-bottom: 14px; border-bottom: 1px solid var(--rule-l); }
.float__row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; padding-top: 18px; }
.float__row b { display: block; font: 300 clamp(36px, 4vw, 56px)/1 var(--serif); letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.float__row span { display: block; margin-top: 6px; font-size: 13px; color: var(--slate); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--track); display: inline-block; flex: none; }

/* ---- Lưới ô ---- */
.grid-cells { display: grid; grid-template-columns: 2fr repeat(4, 1fr); border: 1px solid var(--rule-l); }
.cell { padding: 28px 24px; border-left: 1px solid var(--rule-l); display: flex; flex-direction: column; justify-content: space-between; gap: 48px; min-height: 260px; }
.cell:first-child { border-left: 0; }
.cell--head { gap: 24px; justify-content: flex-start; }
.cell b { font: 300 clamp(44px, 4.4vw, 72px)/1 var(--serif); letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.cell > span { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--slate); }
.cell--now b { color: var(--blue); }

/* ---- Kêu gọi ---- */
.cta { position: relative; padding: 0 0 var(--sec); }
.cta__in { position: relative; z-index: 1; margin: 0 var(--gutter); min-height: clamp(420px, 46vw, 640px); padding: clamp(32px, 4vw, 56px);
  display: flex; flex-direction: column; justify-content: flex-end; gap: 28px; }
.cta .aura--cta { top: 0; bottom: var(--sec); }
.cta__title { font: 300 clamp(48px, 8vw, 140px)/.94 var(--serif); letter-spacing: -.045em; max-width: 10em; color: #FAF6EC; text-wrap: balance; }
.cta__acts { display: flex; flex-wrap: wrap; gap: 10px; }

/* ---- Footer ---- */
.ftr { padding: 56px var(--gutter) 0; overflow: hidden; border-top: 1px solid var(--rule-d); }
.ftr__row { display: grid; grid-template-columns: auto 1fr auto; gap: 48px; align-items: start; }
.ftr__meta { font-size: 14px; color: var(--stone); line-height: 1.6; }
.ftr__cols { display: flex; gap: 64px; }
.ftr__cols div { display: grid; gap: 12px; align-content: start; font-size: 14px; }
.ftr__h { font: 400 18px/1 var(--serif); color: var(--stone); margin-bottom: 6px; }
.ftr__giant { font: 300 31vw/.78 var(--serif); letter-spacing: -.06em; color: var(--ink-2); margin: 64px 0 0 -0.04em; user-select: none; white-space: nowrap; transform: translateY(14%); }
.ftr__copy { position: absolute; left: -9999px; }

/* ---- Tiêu đề hiện theo dòng ---- */
/* mặt nạ nới rộng lên trên .32em để giữ trọn dấu tiếng Việt chồng hai tầng (ể, ầ, ỗ…) và đỉnh chữ hoa */
.js .reveal.is-split .w { display: inline-block; overflow: hidden; vertical-align: top; padding: .32em .04em .12em; margin: -.32em -.04em -.12em; }
.js .reveal.is-split .w > span { display: inline-block; transform: translateY(140%); transition: transform .9s var(--ease); }
.js .reveal.is-in .w > span { transform: none; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

@media (prefers-reduced-motion: reduce) {
  .aura > i { animation: none; }
  .js .reveal.is-split .w > span { transform: none; transition: none; }
}

/* ---- Màn hình hẹp ---- */
@media (max-width: 1100px) {
  .hdr__nav { display: none; }
  .hdr { grid-template-columns: auto 1fr; }
  .wordmark { order: -1; }
  .head__row .h2 { grid-column: 1 / -1; }
  .head__text { grid-column: 1 / span 8; padding-top: 0; }
  .head__btn { grid-column: 9 / -1; }
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-cells { grid-template-columns: repeat(4, 1fr); }
  .cell--head { grid-column: 1 / -1; border-bottom: 1px solid var(--rule-l); min-height: 0; }
  .grid-cells .cell:nth-child(2) { border-left: 0; }
}
@media (max-width: 680px) {
  .hdr__acts .btn--ghost { display: none; }
  .hdr__acts .btn { height: 38px; padding: 0 14px; font-size: 14px; }
  .hero__foot { grid-template-columns: 1fr; }
  .facts { gap: 20px; flex-wrap: wrap; }
  .facts dd { font-size: 22px; }
  .head__text, .head__btn { grid-column: 1 / -1; justify-self: start; }
  .numbers { grid-template-columns: 1fr; gap: 40px; }
  .num__arrow { display: none; }
  .cards { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 14px; margin-right: calc(var(--gutter) * -1); padding-right: var(--gutter); }
  .card { flex: 0 0 78%; scroll-snap-align: start; }
  .wheel__label, .wheel__btn { top: auto; bottom: 48px; }
  .grid-cells { grid-template-columns: 1fr 1fr; }
  .cell { min-height: 160px; gap: 24px; }
  .grid-cells .cell:nth-child(4) { border-left: 0; }
  .grid-cells .cell:nth-child(n+4) { border-top: 1px solid var(--rule-l); }
  .ftr__row { grid-template-columns: 1fr; gap: 28px; }
  .ftr__cols { gap: 40px; }
}

/* ---- Hero: 2 khối sáng (xanh chính, xanh đậm) tự đi lại khắp hero và bị con trỏ đẩy ra.
   Toàn bộ chuyển động do assets/v4.js tính và đặt qua --px, --py. */
.aura--hero > i { animation: none; translate: var(--px, 0px) var(--py, 0px); will-change: translate; }
.aura--hero > .b-blue { width: 44vw; height: 44vw; left: 48vw; top: calc(42% - 22vw); background: var(--blue); opacity: .95; }   /* tâm ở ~70% bề ngang */
.aura--hero > .b-navy { width: 36vw; height: 36vw; left: 6vw; top: calc(62% - 18vw); background: #1F5BD6; opacity: .75; }   /* tâm ở ~24% bề ngang */
.aura--hero > i { filter: blur(48px); }
@media (prefers-reduced-motion: reduce) { .aura--hero > i { translate: none; } }

/* ---- Bản «đèn sân»: chùm đèn pha rọi chéo từ hai cột đèn ở góc trên (assets/beams.js) ---- */
.floodlit { position: absolute; inset: 0; background:
    radial-gradient(120% 70% at 50% 108%, rgba(0, 101, 242, .38) 0%, rgba(0, 101, 242, 0) 60%),   /* ánh sáng đọng ở mặt sân */
    linear-gradient(180deg, #050E2C 0%, #071B4D 55%, #0A2560 100%); }
.floodlit::before { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .3;
  background-image: radial-gradient(circle, rgba(255, 255, 255, .22) 1px, transparent 1.4px); background-size: 14px 14px; }
.beams { position: absolute; inset: 0; width: 100%; height: 100%; display: block; mix-blend-mode: screen; }

.floodlit::before { display: none; }   /* lưới chấm do canvas vẽ */

/* ---- Màn hiện nội dung sau loading (assets/intro.js). Màn loading viết thẳng trong <head> của index.html ---- */
.intro .hdr, .intro .hero .chip, .intro .hero__foot { opacity: 0; }
.intro .hdr { transform: translateY(-14px); }
.intro .hero .chip, .intro .hero__foot { transform: translateY(16px); }
.intro.intro-go .hdr, .intro.intro-go .hero .chip, .intro.intro-go .hero__foot { opacity: 1; transform: none;
  transition: opacity .8s var(--ease), transform 1s var(--ease); }
.intro.intro-go .hdr { transition-delay: .35s; }
.intro.intro-go .hero .chip { transition-delay: .45s; }
.intro.intro-go .hero__foot { transition-delay: 1.05s; }
.intro-skip .hdr, .intro-skip .hero .chip, .intro-skip .hero__foot, .intro-skip #ld, .intro-skip .reveal .w > span { transition: none !important; }
