/* =========================================================================
   KAI STUDIO — Brand System V1 → Web
   Palette, type scale & grid taken from KAI_STUDIO_Brand_Guidelines_v1.pdf
   ========================================================================= */

:root {
  /* Fire / Blaze (primary) */
  --flame-red: #ff282b;
  --fire-orange: #ff6a00;
  --ember-gold: #ffb347;
  --warm-white: #fff2e6;
  --carbon: #0b0b0b;

  /* Lightning / Raijin (secondary) */
  --electric-blue: #0a84ff;
  --arc-cyan: #00d1ff;
  --ice: #b9efff;
  --white: #ffffff;
  --midnight: #080f1a;

  /* Neutrals for UI */
  --bg: #07090d;
  --bg-2: #0d1016;
  --surface: #12161e;
  --line: rgba(255, 255, 255, 0.08);
  --line-2: rgba(255, 255, 255, 0.14);
  --text: #f4f5f7;
  --muted: #9aa3b2;

  /* Active element (defaults to Blaze) */
  --accent: var(--fire-orange);
  --accent-2: var(--ember-gold);
  --accent-hot: var(--flame-red);
  --accent-ink: #120700; /* dark text on bright accent */
  --accent-rgb: 255, 106, 0;

  --font-display: "Rajdhani", "Be Vietnam Pro", system-ui, sans-serif;
  --font-body: "Be Vietnam Pro", system-ui, -apple-system, "Segoe UI", sans-serif;

  --gutter: 24px;
  --margin: clamp(24px, 5vw, 80px);
  --maxw: 1280px;
  --radius: 4px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

/* Cards always keep their own game's element, whatever the page theme */
.card[data-element="blaze"], .guide-row[data-element="blaze"] {
  --accent: var(--fire-orange);
  --accent-2: var(--ember-gold);
  --accent-ink: #120700;
  --accent-rgb: 255, 106, 0;
}

[data-element="raijin"] {
  --accent: var(--electric-blue);
  --accent-2: var(--arc-cyan);
  --accent-hot: var(--ice);
  --accent-ink: #00121f;
  --accent-rgb: 10, 132, 255;
  --bg: var(--midnight);
  --bg-2: #0b1524;
  --surface: #0f1b2c;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 26px;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }

/* Boot gate (see inline script in <head>): hide until ready, then fade in once.
   Failsafe animation reveals the page after 3s even if JS fails. */
body > * { transition: opacity .5s ease; }
.is-booting body > :not(.fx-intro) { opacity: 0; animation: boot-failsafe 0s 3s forwards; }
@keyframes boot-failsafe { to { opacity: 1; } }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }

:focus-visible {
  outline: 2px solid var(--accent-2);
  outline-offset: 3px;
}

.skip {
  position: absolute; left: 16px; top: -60px; z-index: 100;
  background: var(--accent); color: var(--accent-ink);
  padding: 10px 16px; font-weight: 700;
}
.skip:focus { top: 16px; }

/* ---------- Layout ---------- */
.wrap {
  width: 100%;
  max-width: calc(var(--maxw) + var(--margin) * 2);
  margin: 0 auto;
  padding: 0 var(--margin);
}

.section { padding: clamp(72px, 10vw, 128px) 0; position: relative; }
.section--tight { padding: clamp(48px, 7vw, 80px) 0; }

/* Diagonal pattern — from the K slant, 8–16% opacity on dark */
.pattern { position: relative; isolation: isolate; }
.pattern::before {
  content: "";
  position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image: repeating-linear-gradient(
    -58deg,
    rgba(var(--accent-rgb), 0.12) 0 1px,
    transparent 1px 72px
  );
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 45%, #000 100%);
  mask-image: linear-gradient(90deg, transparent 0%, #000 45%, #000 100%);
}

/* ---------- Typography ---------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: 12px;
  font-family: var(--font-display); font-weight: 600;
  font-size: 14px; line-height: 18px;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--muted);
}
.eyebrow::before {
  content: ""; width: 28px; height: 3px;
  background: linear-gradient(90deg, var(--accent) 0 60%, var(--accent-2) 60%);
}

.display {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(44px, 7.4vw, 104px);
  line-height: 0.92;
  letter-spacing: -0.01em;
  text-transform: uppercase;
  margin: 0;
}
.display .hl { color: var(--accent); }

.h1 { font-family: var(--font-display); font-weight: 700; font-size: clamp(40px, 5vw, 64px); line-height: 1.06; margin: 0; text-transform: uppercase; }
.h2 { font-family: var(--font-display); font-weight: 700; font-size: clamp(32px, 3.6vw, 40px); line-height: 1.15; margin: 0; text-transform: uppercase; }
/* Vietnamese headings use Be Vietnam Pro Bold (guideline §11) */
.h2-vi { font-family: var(--font-body); font-weight: 700; font-size: clamp(26px, 3vw, 36px); line-height: 1.25; margin: 0; letter-spacing: -0.01em; }
.h3 { font-family: var(--font-body); font-weight: 700; font-size: 22px; line-height: 30px; margin: 0; }
.lead { font-size: 18px; line-height: 30px; color: var(--muted); max-width: 60ch; }
.caption { font-size: 12px; line-height: 18px; color: var(--muted); }
.tracked { font-family: var(--font-display); font-weight: 600; letter-spacing: 0.32em; text-transform: uppercase; }

.section-head {
  display: flex; align-items: end; justify-content: space-between;
  gap: 24px; flex-wrap: wrap; margin-bottom: 48px;
}
.section-head > div { display: grid; gap: 16px; }

/* ---------- Buttons ---------- */
.btn {
  --h: 52px;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: var(--h); padding: 0 26px;
  font-family: var(--font-display); font-weight: 700; font-size: 17px;
  letter-spacing: 0.08em; text-transform: uppercase;
  border: 1px solid transparent; border-radius: var(--radius);
  cursor: pointer;
  transition: transform .2s var(--ease), background-color .2s, border-color .2s, color .2s;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 12px), calc(100% - 12px) 100%, 0 100%);
}
.btn--primary { background: var(--accent); color: var(--accent-ink); }
.btn--primary:hover { background: var(--accent-2); transform: translateY(-2px); }
.btn--ghost { border-color: var(--line-2); color: var(--text); background: rgba(255,255,255,0.02); }
.btn--ghost:hover { border-color: var(--accent); color: var(--accent-2); }
.btn[aria-disabled="true"] { opacity: .55; pointer-events: none; }
.btn svg { width: 18px; height: 18px; }

.link-arrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-display); font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--accent-2);
}
.link-arrow svg { width: 18px; height: 18px; transition: transform .2s var(--ease); }
.link-arrow:hover svg { transform: translateX(4px); }

/* ---------- Header ---------- */
.header {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  transition: background-color .3s, border-color .3s, backdrop-filter .3s;
  border-bottom: 1px solid transparent;
}
.header.is-scrolled {
  background: rgba(7, 9, 13, 0.82);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom-color: var(--line);
}
[data-element="raijin"] .header.is-scrolled { background: rgba(8, 15, 26, 0.85); }
.header__inner { display: flex; align-items: center; justify-content: space-between; height: 80px; gap: 24px; }
.brand { display: inline-flex; align-items: center; }
.brand img { height: 38px; width: auto; }

.nav { display: flex; align-items: center; gap: 36px; }
.nav__links { display: flex; gap: 32px; list-style: none; margin: 0; padding: 0; }
.nav__links a {
  font-family: var(--font-display); font-weight: 600; font-size: 16px;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted);
  position: relative; padding: 6px 0;
  transition: color .2s;
}
.nav__links a::after {
  content: ""; position: absolute; left: 0; right: 100%; bottom: 0; height: 2px;
  background: var(--accent); transition: right .25s var(--ease);
}
.nav__links a:hover, .nav__links a[aria-current="page"] { color: var(--text); }
.nav__links a:hover::after, .nav__links a[aria-current="page"]::after { right: 0; }
.nav .btn { --h: 42px; padding: 0 18px; font-size: 15px; }

.menu-btn {
  display: none; width: 44px; height: 44px; border: 1px solid var(--line-2);
  background: transparent; border-radius: var(--radius); cursor: pointer;
  align-items: center; justify-content: center;
}
.menu-btn span { display: block; width: 18px; height: 2px; background: var(--text); position: relative; transition: background .2s; }
.menu-btn span::before, .menu-btn span::after {
  content: ""; position: absolute; left: 0; width: 18px; height: 2px; background: var(--text); transition: transform .25s var(--ease);
}
.menu-btn span::before { top: -6px; }
.menu-btn span::after { top: 6px; }
.menu-open .menu-btn span { background: transparent; }
.menu-open .menu-btn span::before { transform: translateY(6px) rotate(45deg); }
.menu-open .menu-btn span::after { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 860px) {
  .menu-btn { display: inline-flex; }
  .brand img { height: 30px; }
  .nav {
    position: fixed; inset: 72px 0 auto 0; flex-direction: column; align-items: stretch; gap: 0;
    background: var(--bg); border-bottom: 1px solid var(--line);
    padding: 8px 24px 24px;
    transform: translateY(-8px); opacity: 0; visibility: hidden;
    transition: opacity .2s, transform .25s var(--ease), visibility .2s;
  }
  .menu-open .nav { transform: none; opacity: 1; visibility: visible; }
  .nav__links { flex-direction: column; gap: 0; }
  .nav__links a { display: block; padding: 16px 0; font-size: 20px; border-bottom: 1px solid var(--line); }
  .nav__links a::after { display: none; }
  .nav .btn { margin-top: 20px; --h: 52px; }
  .header__inner { height: 72px; }
}

/* ---------- Hero (home) ---------- */
.hero {
  min-height: 100svh;
  display: grid; align-items: center;
  padding: 120px 0 72px;
  overflow: hidden;
}
.hero__grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: var(--gutter); align-items: center; }
.hero__copy { display: grid; gap: 28px; position: relative; z-index: 2; }
.hero__copy > * { margin: 0; }
.hero__tag { font-size: clamp(14px, 1.6vw, 20px); letter-spacing: clamp(0.18em, 0.9vw, 0.42em); color: var(--warm-white); }
.element-switch { justify-self: start; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 8px; }
.hero__art { position: relative; aspect-ratio: 3 / 2; }
.hero__art img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain;
  transition: opacity .7s var(--ease), transform .7s var(--ease);
}
.hero__art img.is-hidden { opacity: 0; transform: scale(0.97); }
.hero__art::before {
  content: ""; position: absolute; inset: 10% 8% 0; z-index: -1;
  background: radial-gradient(closest-side, rgba(var(--accent-rgb), 0.28), transparent 70%);
  filter: blur(20px); transition: background .7s;
}
.hero__floor {
  position: absolute; left: 0; right: 0; bottom: 0; height: 30%;
  background: linear-gradient(180deg, transparent, var(--bg) 85%);
}

.element-switch {
  display: inline-flex; gap: 4px; padding: 4px;
  border: 1px solid var(--line); border-radius: 999px;
  background: rgba(255, 255, 255, 0.02);
}
.element-switch button {
  border: 0; background: transparent; cursor: pointer;
  padding: 8px 16px; border-radius: 999px;
  font-family: var(--font-display); font-weight: 700; letter-spacing: 0.14em; font-size: 13px; color: var(--muted);
  display: inline-flex; align-items: center; gap: 8px;
}
.element-switch button::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.element-switch button[data-el="blaze"]::before { background: var(--fire-orange); }
.element-switch button[data-el="raijin"]::before { background: var(--electric-blue); }
.element-switch button[aria-pressed="true"] { background: rgba(255, 255, 255, 0.08); color: var(--text); }

.scroll-cue {
  position: absolute; left: 50%; bottom: 28px; transform: translateX(-50%);
  display: grid; justify-items: center; gap: 10px; color: var(--muted);
  font-family: var(--font-display); font-size: 12px; letter-spacing: 0.3em;
}
.scroll-cue i { width: 1px; height: 40px; background: linear-gradient(var(--accent), transparent); }

@media (max-width: 960px) {
  .hero { padding-top: 104px; min-height: auto; }
  .hero__grid { grid-template-columns: 1fr; }
  .hero__art { order: -1; max-width: 560px; width: 100%; margin: 0 auto; }
  .scroll-cue { display: none; }
}

/* ---------- Marquee strip ---------- */
.strip {
  border-block: 1px solid var(--line);
  overflow: hidden; white-space: nowrap;
  background: var(--bg-2);
}
.strip__track { display: inline-flex; gap: 48px; padding: 18px 0; animation: marquee 40s linear infinite; }
.strip__track span { font-family: var(--font-display); font-weight: 700; font-size: 22px; letter-spacing: 0.24em; color: var(--muted); display: inline-flex; align-items: center; gap: 48px; }
.strip__track span::after { content: ""; width: 14px; height: 14px; background: var(--accent); clip-path: polygon(0 0, 100% 0, 40% 100%, 0 100%); }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- Game cards ---------- */
.games-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: var(--gutter); }
.games-grid > * { grid-column: span 4; }
.games-grid--feature > :first-child { grid-column: span 8; grid-row: span 2; }
@media (max-width: 1080px) {
  .games-grid > * { grid-column: span 6; }
  .games-grid--feature > :first-child { grid-column: span 12; grid-row: auto; }
}
@media (max-width: 640px) { .games-grid > * { grid-column: span 12; } }

.card {
  position: relative; display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden;
  transition: transform .3s var(--ease), border-color .3s;
}
.card:hover { transform: translateY(-4px); border-color: rgba(var(--accent-rgb), 0.55); }
.card[data-element="raijin"]:hover { border-color: rgba(10, 132, 255, 0.6); }
.card__media { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: #000; }
.games-grid--feature > :first-child .card__media { aspect-ratio: auto; flex: 1; min-height: 300px; }
.card .keyart { place-items: center; padding: 0; }
.card .keyart img { width: 38%; }
.card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.card:hover .card__media img { transform: scale(1.04); }
.card__media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 50%, rgba(0,0,0,.65)); }
.card__body { padding: 22px 24px 24px; display: grid; gap: 10px; }
.card__title { font-family: var(--font-display); font-weight: 700; font-size: 28px; line-height: 1; letter-spacing: 0.02em; margin: 0; }
.games-grid--feature > :first-child .card__title { font-size: clamp(32px, 4vw, 48px); }
.card__text { color: var(--muted); margin: 0; font-size: 15px; line-height: 24px; }
.card__meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.card a.card__link::after { content: ""; position: absolute; inset: 0; z-index: 1; }

/* Generated key-art when a game has no cover yet */
.keyart {
  position: absolute; inset: 0;
  background:
    radial-gradient(60% 80% at 75% 55%, rgba(var(--ka-rgb), .45), transparent 70%),
    repeating-linear-gradient(-58deg, rgba(var(--ka-rgb), .14) 0 1px, transparent 1px 44px),
    linear-gradient(135deg, var(--ka-bg), #000);
  display: grid; place-items: center end; padding-right: 8%;
}
.keyart img { width: 46%; height: auto; object-fit: contain; filter: drop-shadow(0 0 30px rgba(var(--ka-rgb), .55)); }
.keyart span {
  position: absolute; left: 7%; bottom: 14%; z-index: 2;
  font-family: var(--font-display); font-weight: 700; font-size: clamp(28px, 4.5vw, 56px); line-height: .9;
  color: #fff; letter-spacing: .02em; max-width: 60%;
  text-shadow: 0 2px 24px rgba(0,0,0,.6);
}
.keyart[data-el="blaze"] { --ka-rgb: 255, 106, 0; --ka-bg: #1a0a02; }
.keyart[data-el="raijin"] { --ka-rgb: 10, 132, 255; --ka-bg: #04142a; }

/* ---------- Chips & badges ---------- */
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 10px; border-radius: 999px;
  font-size: 12px; line-height: 18px; font-weight: 600;
  background: rgba(255,255,255,.06); color: var(--muted); border: 1px solid var(--line);
}
.status {
  position: absolute; top: 16px; left: 16px; z-index: 2;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 12px; border-radius: 2px;
  font-family: var(--font-display); font-weight: 700; font-size: 13px; letter-spacing: .14em; text-transform: uppercase;
  background: rgba(0,0,0,.65); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  border: 1px solid var(--line-2);
}
/* Status uses label + icon shape, not colour alone (guideline §18) */
.status::before { content: ""; width: 8px; height: 8px; }
.status--live::before { background: #3ddc84; border-radius: 50%; }
.status--beta::before { background: var(--ember-gold); transform: rotate(45deg); }
.status--soon::before { border: 2px solid var(--muted); border-radius: 50%; width: 6px; height: 6px; }

/* ---------- Filters ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 36px; }
.filters button {
  border: 1px solid var(--line-2); background: transparent; color: var(--muted);
  padding: 8px 16px; border-radius: 999px; cursor: pointer;
  font-family: var(--font-display); font-weight: 600; font-size: 15px; letter-spacing: .1em; text-transform: uppercase;
  transition: all .2s;
}
.filters button:hover { color: var(--text); border-color: var(--text); }
.filters button[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.search {
  margin-left: auto; position: relative; min-width: 240px;
}
.search input {
  width: 100%; height: 44px; padding: 0 16px 0 42px;
  background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--radius);
  color: var(--text); font: inherit; font-size: 15px;
}
.search input::placeholder { color: var(--muted); }
.search svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--muted); }
@media (max-width: 640px) { .search { margin-left: 0; width: 100%; } }
.empty { padding: 48px; text-align: center; color: var(--muted); border: 1px dashed var(--line-2); border-radius: var(--radius); grid-column: 1 / -1; }

/* ---------- Worlds (Blaze / Raijin) ---------- */
.worlds { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gutter); }
.world {
  position: relative; overflow: hidden; border-radius: var(--radius);
  border: 1px solid var(--line); background: var(--surface);
  display: flex; flex-direction: column;
}
.world__media { aspect-ratio: 16 / 9; overflow: hidden; background: #000; }
.world__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease); }
.world:hover .world__media img { transform: scale(1.04); }
.world__body { padding: 28px 32px 32px; border-top: 3px solid var(--fire-orange); }
.world--raijin .world__body { border-top-color: var(--electric-blue); }
.world__label { font-family: var(--font-display); font-weight: 700; letter-spacing: .2em; font-size: 14px; }
.world--blaze .world__label { color: var(--fire-orange); }
.world--raijin .world__label { color: var(--arc-cyan); }
.world h3 { font-family: var(--font-display); font-size: 40px; line-height: 1; margin: 8px 0 10px; text-transform: uppercase; }
.world p { margin: 0; color: #cfd5de; max-width: 44ch; }
@media (max-width: 860px) { .worlds { grid-template-columns: 1fr; } }

/* ---------- Studio values ---------- */
.values { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--gutter); counter-reset: v; }
.value { border-top: 1px solid var(--line-2); padding-top: 24px; display: grid; gap: 12px; }
.value::before {
  counter-increment: v; content: "0" counter(v);
  font-family: var(--font-display); font-weight: 700; font-size: 14px; letter-spacing: .2em; color: var(--accent);
}
.value p { margin: 0; color: var(--muted); }
@media (max-width: 860px) { .values { grid-template-columns: 1fr; } }

.about { display: grid; grid-template-columns: 5fr 7fr; gap: clamp(32px, 6vw, 96px); align-items: start; }
@media (max-width: 960px) { .about { grid-template-columns: 1fr; } }

/* ---------- Guides hub ---------- */
.guide-list { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.guide-row {
  display: grid; grid-template-columns: 72px 1fr auto; gap: 24px; align-items: center;
  padding: 20px 24px; background: var(--bg);
  transition: background .2s;
}
.guide-row:hover { background: var(--surface); }
.guide-row__icon { width: 72px; height: 72px; border-radius: var(--radius); overflow: hidden; position: relative; }
.guide-row__icon .keyart { padding: 0; place-items: center; }
.guide-row__icon .keyart img { width: 64%; }
.guide-row__icon .keyart span { display: none; }
.guide-row h3 { margin: 0 0 4px; }
.guide-row p { margin: 0; color: var(--muted); font-size: 15px; }
.guide-row__topics { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
@media (max-width: 640px) {
  .guide-row { grid-template-columns: 56px 1fr; gap: 16px; padding: 16px; }
  .guide-row__icon { width: 56px; height: 56px; }
  .guide-row .link-arrow { grid-column: 2; }
}

/* ---------- CTA band ---------- */
.cta {
  position: relative; overflow: hidden; border-radius: var(--radius);
  border: 1px solid var(--line);
  background: linear-gradient(120deg, rgba(var(--accent-rgb), .16), transparent 60%), var(--bg-2);
  padding: clamp(36px, 6vw, 72px);
  display: grid; grid-template-columns: 1fr auto; gap: 32px; align-items: center;
}
.cta img.cta__k { position: absolute; right: -40px; bottom: -60px; width: 340px; opacity: .08; pointer-events: none; }
@media (max-width: 760px) { .cta { grid-template-columns: 1fr; } }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--line); padding: 64px 0 32px; background: var(--bg); }
.footer__grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: var(--gutter); }
.footer__brand img { height: 44px; width: auto; margin-bottom: 16px; }
.footer h4 { font-family: var(--font-display); letter-spacing: .18em; font-size: 14px; text-transform: uppercase; color: var(--muted); margin: 0 0 14px; }
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.footer ul a { color: #cfd5de; transition: color .2s; }
.footer ul a:hover { color: var(--accent-2); }
.footer__bottom { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 56px; padding-top: 24px; border-top: 1px solid var(--line); }
@media (max-width: 860px) { .footer__grid { grid-template-columns: 1fr 1fr; } .footer__brand { grid-column: 1 / -1; } }

/* ---------- Page hero (inner pages) ---------- */
.page-hero { padding: 168px 0 64px; border-bottom: 1px solid var(--line); }
.page-hero .lead { margin-top: 20px; }
@media (max-width: 860px) { .page-hero { padding-top: 128px; } }

/* ---------- Game detail ---------- */
.ghero { position: relative; min-height: 78svh; display: flex; align-items: flex-end; padding: 140px 0 64px; overflow: hidden; isolation: isolate; }
.ghero__bg { position: absolute; inset: 0; z-index: -2; }
.ghero__bg > img { width: 100%; height: 100%; object-fit: cover; }
.ghero__bg .keyart { place-items: center end; padding-right: 6%; }
.ghero__bg .keyart img { width: min(42%, 520px); opacity: .9; }
.ghero__bg .keyart span { display: none; }
.ghero::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, var(--bg) 0%, rgba(0,0,0,.4) 60%, transparent), linear-gradient(0deg, var(--bg), transparent 45%); }
.ghero__content { display: grid; gap: 20px; max-width: 720px; }
.ghero__meta { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.ghero__meta .status { position: static; }
.breadcrumb { font-size: 14px; color: var(--muted); display: flex; gap: 8px; flex-wrap: wrap; }
.breadcrumb a:hover { color: var(--accent-2); }

.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--gutter); }
.feature { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; display: grid; gap: 10px; align-content: start; position: relative; overflow: hidden; }
.feature::before { content: ""; position: absolute; top: 0; left: 0; width: 48px; height: 3px; background: var(--accent); }
.feature p { margin: 0; color: var(--muted); }
@media (max-width: 860px) { .features { grid-template-columns: 1fr; } }

.facts { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--line); border-radius: var(--radius); }
.fact { padding: 20px 24px; border-right: 1px solid var(--line); display: grid; gap: 4px; }
.fact:last-child { border-right: 0; }
.fact dt { font-family: var(--font-display); letter-spacing: .16em; font-size: 13px; color: var(--muted); text-transform: uppercase; }
.fact dd { margin: 0; font-weight: 600; }
@media (max-width: 760px) { .facts { grid-template-columns: 1fr 1fr; } .fact:nth-child(2) { border-right: 0; } .fact:nth-child(-n+2) { border-bottom: 1px solid var(--line); } }

/* Guide layout with sticky TOC */
.guide { display: grid; grid-template-columns: 240px 1fr; gap: clamp(32px, 6vw, 80px); align-items: start; }
.toc { position: sticky; top: 104px; display: grid; gap: 4px; }
.toc p { margin: 0 0 10px; }
.toc a {
  display: block; padding: 8px 14px; border-left: 2px solid var(--line-2);
  color: var(--muted); font-size: 15px; transition: color .2s, border-color .2s;
}
.toc a:hover { color: var(--text); }
.toc a.is-active { color: var(--text); border-left-color: var(--accent); }
@media (max-width: 960px) {
  .guide { grid-template-columns: 1fr; }
  .toc { position: static; display: flex; overflow-x: auto; gap: 8px; padding-bottom: 4px; }
  .toc p { display: none; }
  .toc a { border: 1px solid var(--line-2); border-radius: 999px; white-space: nowrap; padding: 6px 14px; }
}

.guide__body { display: grid; gap: 56px; min-width: 0; }
.guide__section { scroll-margin-top: 104px; display: grid; gap: 20px; }
.guide__section h2, .guide__section h3 { display: flex; align-items: center; gap: 14px; }
.guide__section .n { font-family: var(--font-display); color: var(--accent); font-size: 16px; letter-spacing: .14em; }
.guide__section p { margin: 0; color: #cfd5de; max-width: 70ch; }

.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; counter-reset: s; }
.steps li {
  counter-increment: s; display: grid; grid-template-columns: 44px 1fr; gap: 16px; align-items: start;
  padding: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
}
.steps li::before {
  content: counter(s); display: grid; place-items: center; width: 44px; height: 44px;
  font-family: var(--font-display); font-weight: 700; font-size: 20px;
  background: rgba(var(--accent-rgb), .14); color: var(--accent-2); border-radius: 2px;
}
.steps li span { padding-top: 9px; }

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; font-size: 15px; }
th, td { text-align: left; padding: 14px 18px; border-bottom: 1px solid var(--line); }
th { font-family: var(--font-display); letter-spacing: .14em; text-transform: uppercase; font-size: 13px; color: var(--muted); background: var(--bg-2); }
tr:last-child td { border-bottom: 0; }
td:not(:first-child) kbd, td kbd {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px;
  padding: 2px 8px; border: 1px solid var(--line-2); border-bottom-width: 2px; border-radius: 4px; background: var(--surface);
}

.tips { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.tips li { display: grid; grid-template-columns: 22px 1fr; gap: 12px; color: #cfd5de; }
.tips li::before { content: ""; width: 12px; height: 12px; margin-top: 7px; background: var(--accent); clip-path: polygon(0 0, 100% 0, 40% 100%, 0 100%); }

.faq { display: grid; gap: 10px; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.faq summary {
  cursor: pointer; list-style: none; padding: 18px 20px; font-weight: 600;
  display: flex; justify-content: space-between; gap: 16px; align-items: center;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: var(--font-display); font-size: 24px; color: var(--accent); transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin: 0; padding: 0 20px 20px; color: var(--muted); }

.notice {
  display: grid; grid-template-columns: 24px 1fr; gap: 14px;
  padding: 18px 20px; border-radius: var(--radius);
  background: rgba(var(--accent-rgb), .08); border: 1px solid rgba(var(--accent-rgb), .3);
}
.notice svg { width: 22px; height: 22px; color: var(--accent-2); }
.notice p { margin: 0; color: #cfd5de; }

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

/* Vietnamese UI labels: Be Vietnam Pro (Rajdhani lacks Vietnamese diacritics — guideline §11) */
.nav__links a, .btn, .filters button, .link-arrow, .status, .toc a, .fact dt, th {
  font-family: var(--font-body);
}
.nav__links a { font-size: 14px; letter-spacing: .06em; font-weight: 600; }
.btn { font-size: 15px; letter-spacing: .04em; font-weight: 700; }
.filters button { font-size: 13px; letter-spacing: .04em; }
.link-arrow { font-size: 14px; letter-spacing: .04em; }
.status { font-size: 11px; letter-spacing: .08em; }
.fact dt, th { font-size: 12px; letter-spacing: .08em; font-weight: 600; }
@media (max-width: 860px) { .nav__links a { font-size: 18px; } }

/* =========================================================================
   Company pages: about / contact / privacy
   ========================================================================= */
@media (max-width: 1180px) and (min-width: 861px) {
  .nav { gap: 24px; }
  .nav__links { gap: 20px; }
}

.text-link { color: var(--accent-2); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.text-link:hover { color: var(--text); }

.prose { display: grid; gap: 18px; }
.prose p { margin: 0; color: #cfd5de; font-size: 17px; line-height: 30px; max-width: 68ch; }
.prose strong { color: var(--text); }
.prose--legal p { font-size: 16px; line-height: 28px; }

.facts--about { margin-top: 48px; }
.facts--about[hidden] { display: none; }

/* Mission / vision / promise */
.mv { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--gutter); }
.mv__item {
  display: grid; gap: 14px; align-content: start;
  padding: 32px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  position: relative; overflow: hidden;
}
.mv__item::after {
  content: ""; position: absolute; right: -30px; top: -30px; width: 120px; height: 120px;
  background: rgba(var(--accent-rgb), .08); clip-path: polygon(0 0, 100% 0, 40% 100%, 0 100%);
}
.mv__item p { margin: 0; color: var(--muted); }
@media (max-width: 960px) { .mv { grid-template-columns: 1fr; } }

.values--6 { grid-template-columns: repeat(3, 1fr); row-gap: 48px; }
@media (max-width: 960px) { .values--6 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) { .values--6 { grid-template-columns: 1fr; } }

/* Process timeline */
.process { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: var(--gutter); position: relative; }
.process::before { content: ""; position: absolute; left: 0; right: 0; top: 22px; height: 1px; background: linear-gradient(90deg, var(--accent), var(--line-2) 70%); }
.process li { display: grid; gap: 12px; align-content: start; position: relative; }
.process__n {
  width: 44px; height: 44px; display: grid; place-items: center;
  font-family: var(--font-display); font-weight: 700; font-size: 18px;
  background: var(--bg); border: 1px solid var(--accent); color: var(--accent-2);
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%);
  margin-bottom: 8px;
}
.process p { margin: 0; color: var(--muted); font-size: 15px; line-height: 24px; }
@media (max-width: 1080px) {
  .process { grid-template-columns: 1fr; gap: 0; }
  .process::before { left: 22px; right: auto; top: 0; bottom: 0; width: 1px; height: auto; background: linear-gradient(180deg, var(--accent), var(--line-2)); }
  .process li { grid-template-columns: 44px 1fr; column-gap: 20px; padding-bottom: 32px; }
  .process li > :not(.process__n) { grid-column: 2; }
  .process__n { grid-row: 1 / span 2; }
}

/* Commitments */
.commit { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.commit li { background: var(--bg); padding: 28px; display: grid; gap: 10px; align-content: start; }
.commit p { margin: 0; color: var(--muted); }
@media (max-width: 640px) { .commit { grid-template-columns: 1fr; } }

/* Team disciplines */
.disciplines { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--gutter); }
.discipline { padding: 28px; border: 1px solid var(--line); border-radius: var(--radius); display: grid; gap: 10px; align-content: start; transition: border-color .3s, background-color .3s; }
.discipline:hover { border-color: rgba(var(--accent-rgb), .5); background: var(--surface); }
.discipline p { margin: 0; color: var(--muted); }
.discipline__tag { font-family: var(--font-display); font-weight: 700; font-size: 13px; letter-spacing: .2em; color: var(--accent); }
@media (max-width: 960px) { .disciplines { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) { .disciplines { grid-template-columns: 1fr; } }

/* Careers */
.careers { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 80px); align-items: start; }
.jobs { display: grid; gap: 12px; }
.job {
  display: flex; justify-content: space-between; align-items: center; gap: 24px;
  padding: 24px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
}
.job p { margin: 6px 0 0; color: var(--muted); }
.job--open { flex-direction: column; align-items: flex-start; border-style: dashed; border-color: var(--line-2); }
@media (max-width: 860px) { .careers { grid-template-columns: 1fr; } .job { flex-direction: column; align-items: flex-start; } }

/* Contact */
.channels { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--gutter); }
.channel { padding: 28px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); display: grid; gap: 12px; align-content: start; grid-template-rows: auto auto 1fr auto; }
.channel p { margin: 0; color: var(--muted); font-size: 15px; line-height: 24px; }
@media (max-width: 1080px) { .channels { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) { .channels { grid-template-columns: 1fr; } }

.contact { display: grid; grid-template-columns: 5fr 7fr; gap: clamp(32px, 6vw, 96px); align-items: start; }
@media (max-width: 960px) { .contact { grid-template-columns: 1fr; } }

.contact-info { display: grid; gap: 16px; margin: 28px 0 0; }
.contact-info div { display: grid; gap: 2px; }
.contact-info dt { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.contact-info dd { margin: 0; }

.form { display: grid; gap: 20px; padding: clamp(24px, 4vw, 40px); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.field { display: grid; gap: 8px; }
.field[hidden] { display: none; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 640px) { .field-row { grid-template-columns: 1fr; } }
.field label { font-weight: 600; font-size: 14px; }
.field input, .field select, .field textarea {
  width: 100%; padding: 12px 14px; min-height: 48px;
  background: var(--bg); color: var(--text); font: inherit; font-size: 15px;
  border: 1px solid var(--line-2); border-radius: var(--radius);
  transition: border-color .2s;
}
.field textarea { resize: vertical; min-height: 140px; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(var(--accent-rgb), .2); }
.field select { appearance: none; -webkit-appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 20px) 50%, calc(100% - 15px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 40px; }
.form .btn { justify-self: start; }
.form__error { margin: 0; padding: 12px 14px; border-radius: var(--radius); background: rgba(255, 40, 43, .1); border: 1px solid rgba(255, 40, 43, .4); color: #ffd0d0; font-size: 14px; }
.form__error::before { content: "⚠ "; }

.notice--warn { background: rgba(255, 179, 71, .08); border-color: rgba(255, 179, 71, .35); }
.notice--warn svg { color: var(--ember-gold); }
section[id] { scroll-margin-top: 72px; }

/* =========================================================================
   Language switcher + per-language typography
   ========================================================================= */
.lang { position: relative; }
.lang__btn {
  display: inline-flex; align-items: center; gap: 8px; height: 42px; padding: 0 12px;
  background: transparent; border: 1px solid var(--line-2); border-radius: var(--radius); cursor: pointer;
  font-family: var(--font-display); font-weight: 700; font-size: 14px; letter-spacing: .1em; color: var(--text);
  transition: border-color .2s, color .2s;
}
.lang__btn svg { width: 18px; height: 18px; color: var(--muted); }
.lang__btn:hover, .lang.is-open .lang__btn { border-color: var(--accent); }
.lang__menu {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 60; min-width: 200px;
  list-style: none; margin: 0; padding: 6px;
  background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--radius);
  box-shadow: 0 20px 40px rgba(0, 0, 0, .45);
  opacity: 0; visibility: hidden; transform: translateY(-6px);
  transition: opacity .18s, transform .18s var(--ease), visibility .18s;
}
.lang.is-open .lang__menu { opacity: 1; visibility: visible; transform: none; }
.lang__menu a {
  display: grid; grid-template-columns: 40px 1fr; align-items: center; gap: 8px;
  padding: 10px 12px; border-radius: 2px; font-size: 15px; color: #cfd5de;
}
.lang__menu a b { font-family: var(--font-display); font-size: 13px; letter-spacing: .1em; color: var(--muted); }
.lang__menu a:hover { background: rgba(255, 255, 255, .05); color: var(--text); }
.lang__menu a[aria-current="true"] { color: var(--text); background: rgba(var(--accent-rgb), .12); }
.lang__menu a[aria-current="true"] b { color: var(--accent-2); }

@media (max-width: 860px) {
  .lang { margin-top: 16px; }
  .lang__btn { display: none; }
  .lang__menu {
    position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none;
    display: flex; flex-wrap: wrap; gap: 8px; padding: 0; background: none; border: 0; min-width: 0;
  }
  .lang__menu a { display: inline-flex; padding: 8px 12px; border: 1px solid var(--line-2); border-radius: 999px; }
  .lang__menu a span { display: none; }
  .lang__menu a b { color: var(--text); }
}

/* CJK: Latin glyphs keep the brand fonts, CJK falls back to Noto Sans */
:root[data-lang="ja"] { --font-body: "Be Vietnam Pro", "Noto Sans JP", system-ui, sans-serif; --font-display: "Rajdhani", "Noto Sans JP", sans-serif; }
:root[data-lang="ko"] { --font-body: "Be Vietnam Pro", "Noto Sans KR", system-ui, sans-serif; --font-display: "Rajdhani", "Noto Sans KR", sans-serif; }
:root[data-lang="zh"] { --font-body: "Be Vietnam Pro", "Noto Sans SC", system-ui, sans-serif; --font-display: "Rajdhani", "Noto Sans SC", sans-serif; }
:root[data-lang="ko"] body { word-break: keep-all; }
:root[data-lang="ja"] body, :root[data-lang="zh"] body { line-break: strict; }
:root[data-lang="ja"] .h2-vi, :root[data-lang="ko"] .h2-vi, :root[data-lang="zh"] .h2-vi { letter-spacing: 0; line-height: 1.35; }

/* Long translations (e.g. French) on narrow desktops: never wrap nav items; drop the duplicate header CTA */
.nav__links a, .nav .btn, .lang__btn { white-space: nowrap; }
@media (max-width: 1200px) and (min-width: 861px) {
  .nav > .btn { display: none; }
}

/* =========================================================================
   News + article + library
   ========================================================================= */
.news-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--gutter); }
@media (max-width: 1080px) { .news-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) { .news-grid { grid-template-columns: 1fr; } }

.news-card {
  position: relative; display: flex; flex-direction: column; overflow: hidden;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  transition: transform .3s var(--ease), border-color .3s;
}
.news-card[data-element="blaze"] { --accent: var(--fire-orange); --accent-2: var(--ember-gold); --accent-rgb: 255, 106, 0; }
.news-card:hover { transform: translateY(-4px); border-color: rgba(var(--accent-rgb), .55); }
.news-card__media { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: #000; }
.news-card__media > img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.news-card:hover .news-card__media > img { transform: scale(1.04); }
.news-card__media .keyart { place-items: center; padding: 0; }
.news-card__media .keyart img { width: 30%; }
.news-card__body { padding: 22px 24px 26px; display: grid; gap: 10px; align-content: start; }
.news-card__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; font-size: 13px; color: var(--muted); }
.news-cat {
  font-family: var(--font-display); font-weight: 700; font-size: 12px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--accent-2);
}
.news-card__title { margin: 0; font-size: 20px; line-height: 28px; font-weight: 700; }
.news-card__text { margin: 0; color: var(--muted); font-size: 15px; line-height: 24px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

.news-card--big { display: grid; grid-template-columns: 1.2fr 1fr; margin-bottom: var(--gutter); }
.news-card--big .news-card__media { aspect-ratio: auto; min-height: 320px; }
.news-card--big .news-card__body { padding: clamp(24px, 4vw, 48px); align-content: center; gap: 16px; }
.news-card--big .news-card__title { font-size: clamp(24px, 3vw, 36px); line-height: 1.2; }
.news-card--big .news-card__text { -webkit-line-clamp: 4; font-size: 17px; line-height: 28px; }
@media (max-width: 860px) {
  .news-card--big { grid-template-columns: 1fr; }
  .news-card--big .news-card__media { min-height: 0; aspect-ratio: 16 / 9; }
}

/* Article */
.article-hero { padding: 152px 0 48px; }
.article-hero__inner { display: grid; gap: 18px; max-width: 860px; }
.article-title { margin: 0; font-family: var(--font-body); font-weight: 700; font-size: clamp(32px, 4.6vw, 54px); line-height: 1.15; letter-spacing: -0.01em; }
.article-hero .lead { margin: 0; }
.article-cover { position: relative; aspect-ratio: 21 / 9; overflow: hidden; border-radius: var(--radius); border: 1px solid var(--line); background: #000; }
.article-cover > img { width: 100%; height: 100%; object-fit: cover; }
.article-cover .keyart { place-items: center; padding: 0; }
.article-cover .keyart img { width: 18%; }
.article-layout { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: clamp(32px, 6vw, 80px); padding: 56px 0 24px; align-items: start; }
.article-aside { position: sticky; top: 104px; display: grid; gap: 32px; }
.article-share__btns { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.article-share__btns .chip { cursor: pointer; font-size: 13px; padding: 6px 14px; transition: border-color .2s, color .2s; }
.article-share__btns .chip:hover { border-color: var(--accent); color: var(--text); }
.article-game__card { display: grid; grid-template-columns: 72px 1fr; gap: 14px; align-items: center; margin-top: 12px; padding: 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); transition: border-color .2s; }
.article-game__card:hover { border-color: rgba(var(--accent-rgb), .6); }
.article-game__card strong { display: block; font-family: var(--font-display); font-size: 20px; letter-spacing: .02em; }
.article-game__media { position: relative; width: 72px; height: 72px; border-radius: 2px; overflow: hidden; }
.article-game__media .keyart { padding: 0; place-items: center; }
.article-game__media .keyart img { width: 60%; }
@media (max-width: 960px) {
  .article-layout { grid-template-columns: 1fr; }
  .article-aside { position: static; }
  .article-cover { aspect-ratio: 16 / 9; }
}
@media (max-width: 860px) { .article-hero { padding-top: 120px; } }

.article-body { max-width: 720px; gap: 22px; }
.article-body h2 { margin: 18px 0 0; font-size: clamp(22px, 2.4vw, 28px); line-height: 1.3; }
.article-body ul, .article-body ol { margin: 0; padding-left: 22px; display: grid; gap: 10px; color: #cfd5de; font-size: 17px; line-height: 30px; }
.article-body li::marker { color: var(--accent); }
.article-body a { color: var(--accent-2); text-decoration: underline; text-underline-offset: 3px; }
.article-body blockquote {
  margin: 8px 0; padding: 18px 24px; border-left: 3px solid var(--accent);
  background: rgba(var(--accent-rgb), .06); font-size: 20px; line-height: 32px; font-weight: 600; color: var(--text);
}
.article-body img { width: 100%; height: auto; border-radius: var(--radius); border: 1px solid var(--line); }

/* Library */
.lib-group + .lib-group { margin-top: 56px; }
.lib-group__title {
  display: flex; align-items: center; gap: 12px; margin: 0 0 20px;
  font-size: 22px; line-height: 30px; font-weight: 700;
}
.lib-group__title span {
  font-family: var(--font-display); font-size: 13px; letter-spacing: .1em; color: var(--muted);
  padding: 2px 10px; border: 1px solid var(--line-2); border-radius: 999px;
}
.lib-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gutter); }
@media (max-width: 960px) { .lib-grid { grid-template-columns: 1fr; } }

.lib-item {
  position: relative; overflow: hidden; display: grid; grid-template-columns: 64px 1fr auto; gap: 20px; align-items: center;
  padding: 20px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  transition: border-color .3s;
}
.lib-item[data-element="blaze"] { --accent: var(--fire-orange); --accent-2: var(--ember-gold); --accent-rgb: 255, 106, 0; }
.lib-item:hover { border-color: rgba(var(--accent-rgb), .5); }
.lib-item__icon {
  width: 64px; height: 64px; border-radius: 4px; overflow: hidden; display: grid; place-items: center;
  background: linear-gradient(135deg, rgba(var(--accent-rgb), .25), rgba(var(--accent-rgb), .05)); border: 1px solid var(--line-2);
}
.lib-item__icon img { width: 100%; height: 100%; object-fit: cover; }
.lib-item__icon--studio img { width: 62%; height: auto; object-fit: contain; }
.lib-item__icon span { font-family: var(--font-display); font-weight: 700; font-size: 30px; color: var(--accent-2); }
.lib-item__title { margin: 0 0 4px; font-size: 18px; line-height: 26px; font-weight: 700; }
.lib-item__desc { margin: 0; color: var(--muted); font-size: 14px; line-height: 22px; }
.lib-item__meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.chip--price { color: #9ff0c0; border-color: rgba(61, 220, 132, .35); background: rgba(61, 220, 132, .08); }
.lib-item__cta { display: grid; justify-items: end; gap: 6px; }
.lib-item__cta .btn { --h: 40px; padding: 0 16px; font-size: 13px; }
.lib-item__host { font-size: 12px; color: var(--muted); }
@media (max-width: 560px) {
  .lib-item { grid-template-columns: 52px 1fr; }
  .lib-item__icon { width: 52px; height: 52px; }
  .lib-item__cta { grid-column: 1 / -1; grid-template-columns: auto 1fr; justify-items: start; align-items: center; gap: 12px; }
}
@media (max-width: 1320px) and (min-width: 861px) {
  .nav { gap: 20px; }
  .nav__links { gap: 22px; }
}
