/* =========================================================
   新浦京棋牌 · /assets/site.css
   复古赌场账簿 × 数字档案室
   ========================================================= */

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

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

body, h1, h2, h3, h4, h5, p, ul, ol, li, figure, figcaption, blockquote, dl, dd, hr {
  margin: 0;
  padding: 0;
}

ul, ol { list-style: none; }

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

button, input, select, textarea { font: inherit; color: inherit; }

button { background: none; border: 0; cursor: pointer; }

a { color: inherit; text-decoration: none; }

table { border-collapse: collapse; border-spacing: 0; }

hr { border: 0; }

/* ---------- Tokens ---------- */
:root {
  --ink-900: #0B1F1A;
  --ink-700: #123128;
  --velvet-500: #1E4D3C;
  --gold-500: #C9A227;
  --gold-600: #9A7A15;
  --gold-300: #E3C766;
  --gold-100: #F2E4B3;
  --paper-50: #F6F1E4;
  --paper-200: #E7DFCB;
  --crimson-700: #6E1F27;
  --brown-900: #171410;
  --gray-600: #5C564C;

  --line: rgba(23, 20, 16, 0.16);
  --line-soft: rgba(23, 20, 16, 0.09);
  --line-gold: rgba(201, 162, 39, 0.55);
  --line-gold-soft: rgba(201, 162, 39, 0.24);

  --font-title: "Noto Serif SC", "Source Han Serif SC", "Songti SC", "SimSun", Georgia, serif;
  --font-body: "Noto Sans SC", "Source Han Sans SC", "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", sans-serif;
  --font-mono: "IBM Plex Mono", "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, "Courier New", monospace;

  --shell-max: 1280px;
  --gutter: clamp(16px, 4vw, 32px);

  --track: 0.16em;
  --radius-pill: 999px;

  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --t-fast: 0.12s var(--ease);
  --t-mid: 0.18s var(--ease);
}

/* ---------- Base ---------- */
html { background-color: var(--paper-50); }

body {
  min-height: 100vh;
  background-color: var(--paper-50);
  background-image:
    linear-gradient(rgba(23, 20, 16, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(23, 20, 16, 0.04) 1px, transparent 1px),
    radial-gradient(circle at 14% 10%, rgba(201, 162, 39, 0.07), transparent 44%),
    radial-gradient(circle at 88% 84%, rgba(11, 31, 26, 0.06), transparent 48%);
  background-size: 64px 64px, 64px 64px, 100% 100%, 100% 100%;
  background-attachment: fixed;
  color: var(--brown-900);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
}

:focus-visible {
  outline: 2px solid var(--gold-500);
  outline-offset: 2px;
}

#main-content,
[data-section] { scroll-margin-top: 128px; }

/* ---------- Layout primitives ---------- */
.container {
  width: 100%;
  max-width: var(--shell-max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section { padding-block: clamp(48px, 7vw, 88px); }

.section--paper { background: var(--paper-50); }

.section--ink {
  background: var(--ink-900);
  color: var(--paper-50);
}

.section--ink .section-title,
.section--ink .poster-title { color: var(--paper-50); }

.grid {
  display: grid;
  gap: clamp(16px, 2.4vw, 28px);
}

.grid--split { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }

.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

@media (max-width: 980px) {
  .grid--split,
  .grid--3 { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- Typography ---------- */
.poster-title {
  font-family: var(--font-title);
  font-weight: 700;
  font-size: clamp(2.4rem, 7vw, 5rem);
  line-height: 1.06;
  letter-spacing: -0.01em;
  color: var(--brown-900);
}

.section-title {
  font-family: var(--font-title);
  font-weight: 600;
  font-size: clamp(1.5rem, 3.4vw, 2.125rem);
  line-height: 1.26;
  letter-spacing: -0.01em;
  color: var(--brown-900);
}

.lede {
  max-width: 52ch;
  font-size: clamp(1.0625rem, 1.35vw, 1.375rem);
  line-height: 1.7;
  color: var(--gray-600);
}

.section--ink .lede { color: rgba(246, 241, 228, 0.76); }

.prose { max-width: 72ch; }

.prose > * + * { margin-top: 1em; }

.prose h2,
.prose h3 {
  font-family: var(--font-title);
  font-weight: 600;
  line-height: 1.32;
  margin-top: 1.7em;
}

.prose h2 { font-size: 1.5rem; }

.prose h3 { font-size: 1.1875rem; }

.prose a {
  color: var(--gold-600);
  border-bottom: 1px solid var(--line-gold);
  transition: color var(--t-fast), border-color var(--t-fast);
}

.prose a:hover {
  color: var(--ink-900);
  border-bottom-color: var(--ink-900);
}

.prose ul li {
  position: relative;
  padding-left: 1.5em;
  margin-bottom: 0.4em;
}

.prose ul li::before {
  content: "—";
  position: absolute;
  left: 0;
  color: var(--gold-500);
  font-family: var(--font-mono);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: var(--track);
  text-transform: uppercase;
  color: var(--gold-600);
}

.eyebrow::before {
  content: "";
  display: block;
  width: 22px;
  height: 1px;
  background: currentColor;
}

.section--ink .eyebrow { color: var(--gold-300); }

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px 32px;
  margin-bottom: clamp(20px, 3vw, 36px);
}

.rule-gold {
  height: 1px;
  border: 0;
  margin: clamp(28px, 4vw, 48px) 0;
  background: linear-gradient(90deg, var(--gold-500), rgba(201, 162, 39, 0.06));
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  font-family: var(--font-body);
  font-size: 0.9375rem;
  font-weight: 500;
  line-height: 1.4;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color var(--t-mid), color var(--t-mid),
              border-color var(--t-mid), transform var(--t-mid);
}

.btn--sm { padding: 8px 14px; font-size: 0.875rem; }

.btn--gold {
  background: var(--gold-500);
  border-color: var(--gold-500);
  color: var(--ink-900);
}

.btn--gold:hover { background: var(--gold-300); border-color: var(--gold-300); }

.btn--ghost {
  background: transparent;
  border-color: var(--line-gold);
  color: var(--gold-100);
}

.btn--ghost:hover { background: rgba(201, 162, 39, 0.16); color: var(--paper-50); }

.btn--outline {
  background: transparent;
  border-color: var(--line);
  color: var(--brown-900);
}

.btn--outline:hover { border-color: var(--gold-500); }

.btn--ink {
  background: var(--ink-900);
  border-color: var(--ink-900);
  color: var(--paper-50);
}

.btn--ink:hover { background: var(--velvet-500); border-color: var(--velvet-500); }

/* ---------- Skip link ---------- */
.skip-link {
  position: absolute;
  left: 50%;
  top: -120px;
  transform: translateX(-50%);
  z-index: 999;
  padding: 10px 20px;
  border-radius: 0 0 8px 8px;
  background: var(--gold-500);
  color: var(--ink-900);
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  letter-spacing: 0.1em;
  transition: top var(--t-mid);
}

.skip-link:focus { top: 0; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  padding: 12px var(--gutter) 0;
}

.site-header::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--paper-50);
  pointer-events: none;
}

.site-header__shell {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: clamp(12px, 2vw, 28px);
  max-width: var(--shell-max);
  margin-inline: auto;
  padding: 10px 14px;
  border: 1px solid var(--line-gold);
  border-radius: var(--radius-pill);
  background: var(--ink-900);
  color: var(--paper-50);
  box-shadow: 0 10px 30px rgba(11, 31, 26, 0.22);
  transition: padding var(--t-mid), background-color var(--t-mid), border-color var(--t-mid);
}

.site-header__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.brand__mark {
  flex: none;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 6px;
  background: linear-gradient(160deg, var(--gold-300), var(--gold-500));
  color: var(--ink-900);
  font-family: var(--font-title);
  font-size: 1.125rem;
  font-weight: 700;
  transition: width var(--t-mid), height var(--t-mid), font-size var(--t-mid);
}

.brand__text { display: block; min-width: 0; }

.brand__name {
  display: block;
  font-family: var(--font-title);
  font-size: 1.0625rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.brand__sub {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: var(--track);
  color: var(--gold-300);
  white-space: nowrap;
}

.record-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border: 1px solid var(--line-gold);
  border-radius: var(--radius-pill);
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.14em;
  color: var(--gold-100);
  white-space: nowrap;
}

.record-badge__num { color: var(--gold-300); font-weight: 600; }

/* Nav */
.site-nav { min-width: 0; }

.site-nav__list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 2px;
}

.site-nav__link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  font-size: 0.9375rem;
  color: rgba(246, 241, 228, 0.82);
  white-space: nowrap;
  transition: background-color var(--t-fast), color var(--t-fast), border-color var(--t-fast);
}

.site-nav__link:hover {
  background: rgba(201, 162, 39, 0.14);
  border-color: var(--line-gold);
  color: var(--paper-50);
}

.site-nav__link[aria-current="page"] {
  background: var(--velvet-500);
  border-color: var(--line-gold);
  color: var(--gold-100);
}

.site-nav__num {
  font-family: var(--font-mono);
  font-size: 0.625rem;
  letter-spacing: 0.12em;
  color: var(--gold-500);
}

.site-nav__link[aria-current="page"] .site-nav__num { color: var(--gold-300); }

/* Actions */
.site-header__actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.util-link {
  padding-bottom: 2px;
  border-bottom: 1px solid transparent;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.14em;
  color: var(--gold-300);
  white-space: nowrap;
  transition: color var(--t-fast), border-color var(--t-fast);
}

.util-link:hover { color: var(--gold-100); border-bottom-color: var(--gold-300); }

.nav-toggle {
  display: none;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid var(--line-gold);
  border-radius: var(--radius-pill);
  color: var(--gold-100);
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.14em;
  transition: background-color var(--t-fast), color var(--t-fast);
}

.nav-toggle:hover { background: rgba(201, 162, 39, 0.16); color: var(--paper-50); }

.nav-toggle__bars {
  display: inline-flex;
  flex-direction: column;
  gap: 4px;
  width: 16px;
}

.nav-toggle__bars span {
  display: block;
  height: 1px;
  background: currentColor;
}

/* Shrunk state */
.site-header[data-shrink] .site-header__shell { padding: 6px 12px; }

.site-header[data-shrink] .brand__mark { width: 28px; height: 28px; font-size: 0.9375rem; }

.site-header[data-shrink] .brand__sub,
.site-header[data-shrink] .record-badge { display: none; }

.site-header[data-shrink] .site-nav__link { padding: 6px 10px; font-size: 0.875rem; }

/* Scroll progress */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  z-index: 90;
  pointer-events: none;
}

.scroll-progress__bar {
  display: block;
  width: 100%;
  height: 100%;
  transform: scaleX(0);
  transform-origin: 0 50%;
  background: linear-gradient(90deg, var(--gold-500), var(--gold-300));
}

/* ---------- Footer ---------- */
.site-footer {
  position: relative;
  z-index: 1;
  margin-top: clamp(48px, 8vw, 96px);
  border-top: 1px solid var(--line-gold);
  background: var(--ink-900);
  color: rgba(246, 241, 228, 0.78);
}

.site-footer::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(201, 162, 39, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(201, 162, 39, 0.055) 1px, transparent 1px);
  background-size: 48px 48px;
}

.site-footer > .container { position: relative; z-index: 1; }

.footer-top {
  display: grid;
  grid-template-columns: minmax(230px, 1.5fr) repeat(4, minmax(130px, 1fr));
  gap: clamp(24px, 3.2vw, 52px);
  padding: clamp(40px, 6vw, 76px) 0 clamp(28px, 4vw, 44px);
}

.footer-brand { min-width: 0; }

.footer-brand__mark {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 6px;
  background: linear-gradient(160deg, var(--gold-300), var(--gold-500));
  color: var(--ink-900);
  font-family: var(--font-title);
  font-size: 1.25rem;
  font-weight: 700;
}

.footer-brand__name {
  margin-top: 14px;
  font-family: var(--font-title);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--paper-50);
}

.footer-brand__desc {
  margin-top: 10px;
  max-width: 30ch;
  font-size: 0.9375rem;
  line-height: 1.7;
  color: rgba(246, 241, 228, 0.68);
}

.footer-brand__badge {
  display: inline-flex;
  margin-top: 16px;
  padding: 4px 12px;
  border: 1px solid var(--line-gold);
  border-radius: var(--radius-pill);
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.14em;
  color: var(--gold-100);
}

.footer-col { min-width: 0; }

.footer-col__title {
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line-gold-soft);
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: var(--track);
  color: var(--gold-300);
}

.footer-col__list { display: flex; flex-direction: column; gap: 2px; }

.footer-col__link {
  display: inline-block;
  padding: 5px 0;
  font-size: 0.9375rem;
  color: rgba(246, 241, 228, 0.78);
  transition: color var(--t-fast), transform var(--t-fast);
}

.footer-col__link:hover {
  color: var(--gold-300);
  transform: translateX(2px);
}

.footer-contact {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px 34px;
  padding: clamp(22px, 3vw, 30px) 0;
  border-top: 1px solid var(--line-gold-soft);
}

.footer-contact__item { min-width: 0; }

.footer-contact__label {
  display: block;
  margin-bottom: 4px;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: var(--track);
  color: var(--gold-500);
}

.footer-contact__value {
  display: block;
  font-size: 0.9375rem;
  line-height: 1.65;
  color: rgba(246, 241, 228, 0.86);
  word-break: break-word;
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 28px;
  padding: 22px 0 clamp(30px, 5vw, 46px);
  border-top: 1px solid var(--line-gold-soft);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  color: rgba(246, 241, 228, 0.6);
}

.footer-bottom__links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
}

.footer-bottom__links a {
  padding-bottom: 1px;
  border-bottom: 1px solid rgba(201, 162, 39, 0.35);
  color: rgba(246, 241, 228, 0.74);
  transition: color var(--t-fast), border-color var(--t-fast);
}

.footer-bottom__links a:hover {
  color: var(--gold-300);
  border-bottom-color: var(--gold-300);
}

/* To top */
.to-top {
  position: fixed;
  right: clamp(14px, 3vw, 26px);
  bottom: clamp(14px, 3vw, 26px);
  z-index: 70;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line-gold);
  border-radius: 50%;
  background: var(--ink-900);
  color: var(--gold-300);
  font-family: var(--font-mono);
  font-size: 1rem;
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: opacity var(--t-mid), transform var(--t-mid),
              visibility var(--t-mid), background-color var(--t-mid), color var(--t-mid);
}

.to-top.is-shown { opacity: 1; visibility: visible; transform: none; }

.to-top:hover { background: var(--velvet-500); color: var(--gold-100); }

/* ---------- Breadcrumb ---------- */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  color: var(--gray-600);
}

.breadcrumb a { transition: color var(--t-fast); }

.breadcrumb a:hover { color: var(--gold-600); }

.breadcrumb__sep { color: rgba(23, 20, 16, 0.28); }

/* ---------- Index rail ---------- */
.index-rail {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-left: 16px;
  border-left: 1px solid var(--line);
}

.index-rail__item {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid transparent;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  color: var(--gray-600);
  transition: color var(--t-fast), border-color var(--t-fast);
}

.index-rail__item:hover { color: var(--brown-900); }

.index-rail__item[aria-current="true"] {
  color: var(--gold-600);
  border-bottom-color: var(--line-gold);
}

.index-rail__num { color: inherit; }

@media (max-width: 980px) {
  .index-rail {
    flex-direction: row;
    gap: 18px;
    padding: 0 0 8px;
    border-left: 0;
    border-bottom: 1px solid var(--line);
    overflow-x: auto;
  }

  .index-rail__item { white-space: nowrap; border-bottom: 0; }
}

/* ---------- Cards ---------- */
.card {
  padding: clamp(18px, 2.4vw, 28px);
  border: 1px solid var(--line);
  border-radius: 0;
  background: var(--paper-50);
  transition: border-color var(--t-fast), transform var(--t-fast), background-color var(--t-fast);
}

.card:hover {
  border-color: var(--gold-500);
  transform: translateY(-2px);
}

.card--ink {
  background: var(--ink-900);
  border-color: var(--line-gold);
  color: var(--paper-50);
}

.card--ink:hover { border-color: var(--gold-300); }

.card--flat:hover { transform: none; }

/* ---------- Data table ---------- */
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  background: var(--paper-50);
}

.data-table {
  width: 100%;
  min-width: 640px;
  font-size: 0.9375rem;
}

.data-table caption {
  padding: 12px 16px;
  text-align: left;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  color: var(--gray-600);
  border-bottom: 1px solid var(--line);
}

.data-table th,
.data-table td {
  padding: 12px 16px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--line-soft);
}

.data-table thead th {
  border-bottom: 1px solid var(--line-gold);
  background: var(--gold-100);
  color: var(--brown-900);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.1em;
}

.data-table tbody tr:nth-child(even) { background: var(--paper-200); }

.data-table tbody tr:hover { background: rgba(201, 162, 39, 0.12); }

.data-table tbody tr:last-child td { border-bottom: 0; }

.data-table .num {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  text-align: right;
  color: var(--brown-900);
  letter-spacing: -0.01em;
}

.section--ink .table-wrap { background: var(--ink-700); border-color: var(--line-gold); }

/* ---------- Chips ---------- */
.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--gray-600);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  transition: border-color var(--t-fast), color var(--t-fast), background-color var(--t-fast);
}

.chip:hover { border-color: var(--gold-500); color: var(--brown-900); }

.chip[aria-pressed="true"] {
  background: var(--ink-900);
  border-color: var(--ink-900);
  color: var(--gold-100);
}

/* ---------- Stats ---------- */
.stat {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-top: 16px;
  border-top: 1px solid var(--line-gold);
}

.stat__num {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--gold-500);
}

.stat__label {
  font-size: 0.8125rem;
  letter-spacing: 0.04em;
  color: var(--gray-600);
}

/* ---------- Figure (page-level image containers) ---------- */
.figure {
  margin: 0;
  border: 1px solid var(--line);
  background: var(--paper-200);
}

.figure__frame {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background:
    linear-gradient(155deg, var(--ink-900) 0%, var(--ink-700) 58%, var(--velvet-500) 100%);
}

.figure__frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.figure__frame::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(125% 95% at 50% 38%, transparent 28%, rgba(11, 31, 26, 0.68) 100%);
}

.figure__cap {
  display: flex;
  gap: 12px;
  justify-content: space-between;
  align-items: baseline;
  padding: 10px 14px;
  border-top: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  color: var(--gray-600);
}

.figure--wide .figure__frame { aspect-ratio: 21 / 9; }

.figure--tall .figure__frame { aspect-ratio: 3 / 4; }

.figure--square .figure__frame { aspect-ratio: 1 / 1; }

/* ---------- Reveal ---------- */
[data-reveal] {
  transition: opacity var(--t-fast), transform var(--t-fast);
}

[data-reveal].is-armed {
  opacity: 0;
  transform: translateY(6px);
}

[data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

/* ---------- Responsive: header / footer ---------- */
@media (max-width: 1100px) {
  .util-link { display: none; }
}

@media (max-width: 1040px) {
  .site-header__shell {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "brand actions"
      "nav nav";
    padding: 10px 12px 12px;
    border-radius: 22px;
  }

  .site-header__brand { grid-area: brand; }

  .site-header__actions { grid-area: actions; }

  .site-nav {
    grid-area: nav;
    display: none;
    margin-top: 10px;
    padding-top: 8px;
    border-top: 1px solid var(--line-gold-soft);
  }

  .site-nav[data-open] { display: block; }

  .site-nav__list {
    flex-wrap: nowrap;
    justify-content: flex-start;
    gap: 4px;
    padding-bottom: 6px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
  }

  .site-nav__list::-webkit-scrollbar { height: 4px; }

  .site-nav__list::-webkit-scrollbar-thumb {
    background: rgba(201, 162, 39, 0.45);
  }

  .nav-toggle { display: inline-flex; }

  .site-header[data-shrink] .site-header__shell { padding: 8px 12px 10px; }

  .site-header[data-shrink] .site-nav[data-open] { display: block; }
}

@media (max-width: 760px) {
  .btn--ghost { display: none; }
}

@media (max-width: 620px) {
  .record-badge { display: none; }

  .brand__sub { display: none; }

  .site-header { padding-top: 8px; }

  .footer-bottom { font-size: 0.6875rem; }
}

@media (max-width: 1100px) {
  .footer-top {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 600px) {
  .footer-top { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 768px) {
  body { background-attachment: scroll; }
}

/* ---------- Motion preferences ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }

  [data-reveal].is-armed { opacity: 1; transform: none; }

  .card:hover,
  .footer-col__link:hover { transform: none; }
}
