/* Kairos Gambit — About This Game (/about/). One vertical column; the homepage's palette and type families. */
:root {
  --night: #0b0e19;
  --ink: #07080d;
  --steel: #131a2c;
  --line: #262f45;
  --gold: #f3c35b;
  --gold-soft: #d9b56a;
  --teal: #4fd6c4;
  --text: #eef0fa;
  --fog: #aab1cf;
  --title: #f1ead9;
  --col: 880px;
  --gutter: clamp(16px, 5vw, 40px);
  --sans-zh: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", "Heiti TC", sans-serif;
  --serif-zh: "Noto Serif TC", "Songti TC", "PMingLiU", serif;
  --sans-en: "Barlow", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --label: "Saira Condensed", "Barlow", system-ui, sans-serif;
  --display: "Cormorant Garamond", "Times New Roman", Georgia, serif;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--night);
  background-image: radial-gradient(120% 60% at 50% 0%, #121a2e 0%, rgba(18, 26, 46, 0) 60%);
  background-repeat: no-repeat;
  color: var(--text);
  font-family: var(--sans-zh);
  font-size: 17px;
  line-height: 1.85;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
:lang(en) { font-family: var(--sans-en); }
img, video { display: block; max-width: 100%; }
a { color: inherit; }

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

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

.skip {
  position: absolute; left: var(--gutter); top: -100px; z-index: 10;
  padding: 10px 16px; background: var(--gold); color: var(--ink); font-weight: 700; text-decoration: none;
}
.skip:focus { top: 12px; }

/* ---------- top bar ---------- */
.topbar { border-bottom: 1px solid var(--line); }
.topbar-in { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 60px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; padding: 6px 0; }
.brand img { width: 28px; height: auto; }
.brand-name { font-family: var(--label); font-weight: 700; font-size: 15px; letter-spacing: .16em; color: var(--text); }
.brand-zh { font-family: var(--serif-zh); font-weight: 600; font-size: 14px; letter-spacing: .3em; color: var(--gold-soft); }
.home-link {
  font-size: 14px; color: var(--fog); text-decoration: none; padding: 8px 2px; white-space: nowrap;
}
.home-link :lang(en) { font-size: 14px; }
.home-link:hover { color: var(--text); }

/* ---------- shared text ---------- */
.eyebrow {
  margin: 0 0 18px;
  font-size: 13px; font-weight: 500; letter-spacing: .06em; color: var(--gold);
}
.eyebrow :lang(en) { font-family: var(--label); font-weight: 700; font-size: 14px; letter-spacing: .16em; }
.eyebrow .slash { opacity: .6; margin: 0 2px; }

p { margin: 0; text-wrap: pretty; }
.ph { display: inline-block; }  /* a Chinese heading wraps between its phrases, never inside one */
.zh { font-weight: 400; color: var(--text); }
.en { margin-top: 6px; font-size: 16px; line-height: 1.7; color: var(--fog); }

/* ---------- intro ---------- */
.intro { padding: clamp(48px, 9vw, 96px) 0 clamp(16px, 3vw, 24px); }
h1 { margin: 0; font-weight: normal; }
.title-en {
  display: block;
  font-family: var(--display); font-weight: 600;
  font-size: clamp(46px, 8vw, 80px); line-height: 1.02; letter-spacing: .005em; color: var(--title);
}
.title-zh {
  display: block; margin-top: 14px;
  font-family: var(--serif-zh); font-weight: 600;
  font-size: clamp(19px, 2.4vw, 24px); line-height: 1.3; letter-spacing: .5em; color: var(--gold);
}
.rule { height: 1px; margin: clamp(28px, 4vw, 40px) 0; background: linear-gradient(90deg, rgba(243, 195, 91, .55), rgba(243, 195, 91, .18) 70%, rgba(243, 195, 91, 0)); }
.lead { font-size: clamp(18px, 2vw, 20px); line-height: 1.9; }
.lead-en { margin-top: 14px; font-size: clamp(16px, 1.7vw, 17px); }

/* ---------- features ---------- */
.feature { padding-top: clamp(64px, 10vw, 112px); }
.feature-head { display: flex; align-items: flex-start; gap: clamp(14px, 2.4vw, 22px); margin-bottom: 22px; }
.num {
  flex: none;
  font-family: var(--display); font-weight: 500;
  font-size: clamp(30px, 3.6vw, 38px); line-height: 1; color: var(--gold);
  font-variant-numeric: lining-nums; font-feature-settings: "lnum" 1;
  padding: 4px clamp(14px, 2.4vw, 22px) 4px 0;
  border-right: 1px solid rgba(243, 195, 91, .35);
}
h2 { margin: 0; font-weight: normal; }
.h-zh {
  display: block;
  font-family: var(--sans-zh); font-weight: 700;
  font-size: clamp(25px, 3.4vw, 34px); line-height: 1.3; letter-spacing: .02em; color: var(--text);
}
.h-en {
  display: block; margin-top: 8px;
  font-family: var(--label); font-weight: 700; font-size: 14px; line-height: 1.4;
  letter-spacing: .14em; text-transform: uppercase; color: var(--teal);
}

/* ---------- clips ---------- */
.clip { position: relative; margin: clamp(26px, 4vw, 36px) 0 0; padding: 7px 7px 0; border: 1px solid var(--line); background: #0a0d16; }
.clip::before, .clip::after {
  content: ""; position: absolute; width: 18px; height: 18px; pointer-events: none;
  border-color: var(--gold); border-style: solid; opacity: .85;
}
.clip::before { left: -6px; top: -6px; border-width: 2px 0 0 2px; }
.clip::after { right: -6px; bottom: -6px; border-width: 0 2px 2px 0; }

.frame { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: #05070c; }
.frame > img, .frame > video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.frame > video { z-index: 1; }
.frame > img { z-index: 2; transition: opacity .35s ease; }
.clip.is-playing .frame > img { opacity: 0; }
.clip.has-frames .frame > img { opacity: 0; transition: none; }

.toggle {
  position: absolute; z-index: 3; right: 10px; bottom: 10px;
  display: inline-flex; align-items: center; gap: 7px;
  min-height: 36px; padding: 6px 12px 6px 10px;
  border: 1px solid rgba(238, 240, 250, .28); border-radius: 999px;
  background: rgba(7, 8, 13, .72); color: var(--text);
  font: 600 13px/1 var(--sans-zh); letter-spacing: .02em;
  cursor: pointer; -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
}
.toggle:hover { background: rgba(7, 8, 13, .9); border-color: rgba(243, 195, 91, .7); }
.toggle svg { width: 14px; height: 14px; flex: none; }
.toggle .t-en { font-family: var(--sans-en); font-weight: 600; }
.toggle .t-sep { opacity: .5; }
.toggle[hidden] { display: none; }
/* the big centred play button when a clip waits for the viewer (reduced motion, data saver, autoplay blocked) */
.clip.is-manual:not(.is-playing) .toggle {
  right: 50%; bottom: 50%; transform: translate(50%, 50%);
  min-height: 52px; padding: 10px 20px 10px 16px; font-size: 15px;
  background: rgba(7, 8, 13, .8); border-color: rgba(243, 195, 91, .75);
}
.clip.is-manual:not(.is-playing) .toggle svg { width: 18px; height: 18px; color: var(--gold); }

figcaption {
  display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 4px 16px;
  padding: 9px 4px 10px;
  font-size: 12px; line-height: 1.4; color: #8d95b3; letter-spacing: .04em;
}
figcaption :lang(en) { font-family: var(--label); font-weight: 600; font-size: 12.5px; letter-spacing: .12em; }

/* ---------- combat lab ---------- */
.lab { margin-top: clamp(72px, 11vw, 120px); padding: clamp(40px, 6vw, 56px) 0 clamp(64px, 9vw, 96px); border-top: 1px solid rgba(243, 195, 91, .4); }
.lab h2 { margin-bottom: 22px; }
.lab .h-zh { font-size: clamp(27px, 3.8vw, 38px); }
.h-en-plain { color: var(--fog); }
.cta {
  display: flex; align-items: center; justify-content: space-between; gap: 18px;
  width: 100%; max-width: 620px; min-height: 84px; margin-top: clamp(30px, 4vw, 40px);
  padding: 18px clamp(20px, 3vw, 30px);
  background: linear-gradient(180deg, #f6cd6f, #e7b44c);
  color: #1a1307; text-decoration: none;
  border-radius: 3px;
  box-shadow: 0 0 0 1px rgba(255, 228, 160, .35) inset, 0 14px 34px -18px rgba(243, 195, 91, .7);
  transition: transform .18s ease, box-shadow .18s ease, filter .18s ease;
}
.cta:hover { filter: brightness(1.06); transform: translateY(-2px); box-shadow: 0 0 0 1px rgba(255, 228, 160, .5) inset, 0 20px 40px -18px rgba(243, 195, 91, .85); }
.cta:active { transform: translateY(0); }
.cta:focus-visible { outline: 3px solid var(--teal); outline-offset: 5px; }
.cta-text { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 12px; }
.cta-en { font-family: var(--sans-en); font-weight: 700; font-size: clamp(21px, 2.6vw, 25px); letter-spacing: .01em; line-height: 1.25; }
.cta-sep { font-size: 20px; opacity: .45; }
.cta-zh { font-family: var(--sans-zh); font-weight: 700; font-size: clamp(19px, 2.3vw, 22px); letter-spacing: .06em; line-height: 1.35; }
.cta-arrow { flex: none; }

/* ---------- footer ---------- */
.foot { border-top: 1px solid var(--line); }
.foot-in { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px 24px; padding-top: 26px; padding-bottom: 34px; }
.foot p { font-size: 13px; color: #8d95b3; }
.foot p :lang(en) { font-size: 13px; }
.foot a { font-family: var(--label); font-weight: 700; font-size: 13px; letter-spacing: .16em; color: var(--gold); text-decoration: none; padding: 6px 0; }
.foot a:hover { text-decoration: underline; text-underline-offset: 4px; }

/* ---------- small screens ---------- */
@media (max-width: 560px) {
  body { font-size: 16px; }
  .topbar-in { min-height: 54px; }
  .brand-zh { display: none; }
  .feature-head { gap: 14px; }
  .clip { padding: 5px 5px 0; }
  .clip::before { left: -5px; top: -5px; }
  .clip::after { right: -5px; bottom: -5px; }
  /* on a small frame the control is a round icon button (its aria-label stays bilingual) */
  .toggle { right: 6px; bottom: 6px; width: 38px; height: 38px; min-height: 0; padding: 0; justify-content: center; }
  .toggle .t-zh, .toggle .t-sep, .toggle .t-en { display: none; }
  .clip.is-manual:not(.is-playing) .toggle { width: auto; height: auto; min-height: 46px; padding: 8px 16px 8px 13px; font-size: 14px; }
  .clip.is-manual:not(.is-playing) .toggle .t-zh, .clip.is-manual:not(.is-playing) .toggle .t-sep,
  .clip.is-manual:not(.is-playing) .toggle .t-en { display: inline; }
  figcaption { font-size: 11.5px; }
  .cta { min-height: 92px; }
  .cta-sep { display: none; }
  .cta-text { flex-direction: column; gap: 2px; }
}

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