/* ============================================================
   VAST.WANG  —  styles.css
   Single source of truth for the visual representation of
   天下 — the realm under the Sovereign Network. [LAW:one-source-of-truth]
   Imperial Chinese register: black lacquer · 明黄 gold · 朱红 vermilion.
   All 文字 is real text (verified brush subset + system CJK), never
   baked into imagery. [FRAMING:representation]
   ============================================================ */

@font-face {
  font-family: "Cinzel";
  src: url("assets/img/Cinzel.woff2") format("woff2");
  font-weight: 400 900; font-display: swap;
}
@font-face {
  font-family: "EB Garamond";
  src: url("assets/img/EBGaramond-400.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "EB Garamond";
  src: url("assets/img/EBGaramond-400i.woff2") format("woff2");
  font-weight: 400; font-style: italic; font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("assets/img/IBMPlexMono-400.woff2") format("woff2");
  font-weight: 400; font-display: swap;
}
/* brush calligraphy — subset to exactly the 28 characters used.
   Stack falls back to system CJK so an out-of-subset char never tofus. */
@font-face {
  font-family: "Ma Shan Zheng";
  src: url("assets/img/MaShanZheng-subset.woff2") format("woff2");
  font-display: swap;
}

:root {
  --obsidian:  #0b0707;
  --ink:       #130c0c;
  --panel:     #1a1010;
  --gold:      #d6ad48;
  --gold-lit:  #f4dd97;
  --gold-deep: #8a6a25;
  --red:       #b81f17;
  --red-lit:   #e0392b;
  --red-deep:  #6f120d;
  --parchment: #ece4d3;
  --muted:     #a8967e;
  --display: "Cinzel", "Times New Roman", serif;
  --serif:   "EB Garamond", "Iowan Old Style", Georgia, serif;
  --mono:    "IBM Plex Mono", ui-monospace, Menlo, monospace;
  --cjk: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", "Noto Serif CJK SC", sans-serif;
  --brush: "Ma Shan Zheng", var(--cjk);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--obsidian);
  color: var(--parchment);
  font-family: var(--serif), var(--cjk);
  font-size: 19px; line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.wrap { max-width: 880px; margin: 0 auto; padding: 0 28px; }
section { padding: 96px 0; position: relative; }

.eyebrow {
  font-family: var(--mono);
  font-size: 0.72rem; letter-spacing: 0.4em; text-transform: uppercase;
  color: var(--gold); margin: 0 0 1.4em;
}
.eyebrow .cn { font-family: var(--brush); font-size: 1.5em; letter-spacing: 0.18em; vertical-align: -0.12em; margin-right: 0.5em; }

h1, h2, h3 {
  font-family: var(--display), var(--cjk);
  font-weight: 700; letter-spacing: 0.06em; line-height: 1.18;
  color: var(--gold-lit); margin: 0 0 0.6em;
}
h2 { font-size: clamp(1.7rem, 4vw, 2.4rem); text-align: center; }
.h2-cn {                         /* Chinese section title, brush, dominant */
  font-family: var(--brush); font-weight: 400;
  font-size: clamp(2.2rem, 6vw, 3.4rem); letter-spacing: 0.22em;
  text-align: center; color: var(--gold-lit);
  margin: 0 0 0.15em; text-shadow: 0 0 28px rgba(214,173,72,0.35);
}
.h2-en {                         /* English subtitle, quiet, beneath */
  font-family: var(--display); font-size: 0.95rem; letter-spacing: 0.3em;
  text-transform: uppercase; color: var(--muted); text-align: center; margin: 0;
}
.lede { font-size: 1.2rem; color: var(--parchment); }
em { color: var(--gold-lit); font-style: normal; }

.rule {
  height: 1px; width: 220px; margin: 34px auto;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  opacity: 0.7;
}
.rule.short { width: 90px; }
/* a vermilion seam, used as the imperial divider accent */
.rule.red { background: linear-gradient(90deg, transparent, var(--red-lit), transparent); }

/* ============================================================ HERO */
.hero {
  min-height: 100vh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 90px 24px;
  background:
    radial-gradient(ellipse 70% 55% at 50% 50%, rgba(11,7,7,0.62), rgba(11,7,7,0.86) 70%, var(--obsidian) 100%),
    linear-gradient(180deg, rgba(11,7,7,0.55) 0%, rgba(11,7,7,0.35) 40%, var(--obsidian) 100%),
    url("assets/img/hero-cn.jpg") center / cover no-repeat;
  background-color: var(--obsidian);
}
.crest {
  width: min(230px, 52vw); height: auto;
  filter: drop-shadow(0 0 30px rgba(214,173,72,0.40));
  animation: breathe 7s ease-in-out infinite;
}
@keyframes breathe { 50% { filter: drop-shadow(0 0 48px rgba(244,221,151,0.60)); } }

/* the fierce 王 — the unstoppable Wang, brush, gold, commanding */
.sovereign {
  font-family: var(--brush);
  font-size: clamp(5rem, 22vw, 12rem); line-height: 1;
  margin: 0.05em 0 0.1em;
  background: linear-gradient(180deg, var(--gold-lit) 0%, var(--gold) 46%, var(--gold-deep) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  text-shadow: 0 0 60px rgba(214,173,72,0.45);
  display: inline-block;
}
.wordmark {
  font-family: var(--display), var(--cjk);
  font-weight: 900; font-size: clamp(1.7rem, 6vw, 3.2rem); letter-spacing: 0.18em;
  margin: 0;
  background: linear-gradient(180deg, var(--gold-lit) 0%, var(--gold) 50%, var(--gold-deep) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.wordmark .dot {
  display: inline-block; width: 0.15em; height: 0.15em; margin: 0 0.14em;
  border-radius: 50%; background: var(--red-lit); vertical-align: 0.32em;
}
.motto {
  font-family: var(--brush);
  font-size: clamp(1.8rem, 5.5vw, 2.9rem); letter-spacing: 0.3em;
  color: var(--gold-lit); margin: 0.9em 0 0; text-shadow: 0 0 24px rgba(214,173,72,0.4);
}
.glyphs {
  margin-top: 2em; font-family: var(--brush);
  font-size: 1.7rem; color: var(--gold-deep); letter-spacing: 0.1em;
}
.glyphs .sep { color: var(--red); margin: 0 0.4em; }
.scrollcue {
  position: absolute; bottom: 26px; left: 50%; transform: translateX(-50%);
  font-family: var(--brush); font-size: 1.1rem; letter-spacing: 0.3em; color: var(--muted);
}

/* ============================================================ DECLARATION */
.declaration { text-align: center; }
.declaration .lede + .lede { margin-top: 1.3em; }
.dropcap::first-letter {
  font-family: var(--display); font-weight: 900; font-size: 3.4em; line-height: 0.8;
  float: left; margin: 0.06em 0.12em 0 0; color: var(--gold-lit);
}

/* ============================================================ DOMINIONS */
.dominions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 52px; }
.dominion {
  border: 1px solid rgba(214,173,72,0.22);
  background: linear-gradient(180deg, rgba(26,16,16,0.7), rgba(19,12,12,0.7));
  border-radius: 4px; padding: 36px 24px; text-align: center;
  position: relative;
}
.dominion::before {                /* a thin vermilion crown-line at the top edge */
  content: ""; position: absolute; top: -1px; left: 22%; right: 22%; height: 2px;
  background: linear-gradient(90deg, transparent, var(--red-lit), transparent);
}
.dominion .glyph {
  font-family: var(--brush); font-size: 3.2rem; color: var(--gold-lit);
  display: block; margin-bottom: 0.1em; text-shadow: 0 0 22px rgba(214,173,72,0.45);
}
.dominion .cn {
  font-family: var(--brush); font-size: 1.35rem; letter-spacing: 0.16em;
  color: var(--gold); display: block; margin-bottom: 0.45em;
}
.dominion .en {
  font-family: var(--mono); font-size: 0.66rem; letter-spacing: 0.26em;
  text-transform: uppercase; color: var(--muted); display: block; margin-bottom: 0.9em;
}
.dominion p { font-size: 0.98rem; color: var(--muted); margin: 0; }

/* ============================================================ EDICTS (CODEX) */
.codex { background: linear-gradient(180deg, var(--obsidian), var(--ink) 50%, var(--obsidian)); }
.articles { margin-top: 44px; }
.article {
  display: grid; grid-template-columns: 70px 1fr; gap: 24px;
  padding: 26px 0; border-top: 1px solid rgba(214,173,72,0.14);
}
.article:last-child { border-bottom: 1px solid rgba(214,173,72,0.14); }
.article .num {
  font-family: var(--brush); font-size: 2rem; color: var(--red-lit);
  line-height: 1; padding-top: 0.1em; text-align: center;
}
.article .body strong {
  font-family: var(--display); font-weight: 700; color: var(--gold-lit);
  letter-spacing: 0.04em; display: block; margin-bottom: 0.25em; font-size: 1.1rem;
}
.article .body span { color: var(--parchment); }

/* ============================================================ SEAL */
.seal { text-align: center; }
.seal-stamp { position: relative; display: inline-block; width: min(230px, 56vw); }
.seal-stamp img { width: 100%; height: auto; display: block;
  filter: drop-shadow(0 0 26px rgba(184,31,23,0.5)); }
.seal-stamp .seal-char {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-family: var(--brush); color: var(--red-lit);
  font-size: min(8.5rem, 30vw); line-height: 1; padding-bottom: 0.06em;
  text-shadow: 0 0 18px rgba(224,57,43,0.5);
}
.seal .benediction {
  font-family: var(--brush); font-size: clamp(2rem, 6vw, 3rem); letter-spacing: 0.26em;
  color: var(--gold-lit); margin-top: 0.9em; text-shadow: 0 0 24px rgba(214,173,72,0.4);
}

/* ============================================================ FOOTER */
.foot {
  border-top: 1px solid rgba(184,31,23,0.3);
  padding: 46px 28px 64px; text-align: center;
  font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.16em;
  color: var(--muted); text-transform: uppercase; line-height: 2.2;
}
.foot .cn { font-family: var(--brush); font-size: 1.5em; letter-spacing: 0.18em; color: var(--gold); text-transform: none; }
.foot a { color: var(--gold); text-decoration: none; }
.foot a:hover { color: var(--gold-lit); }
.foot .node { color: var(--red-deep); }

@media (max-width: 680px) {
  .dominions { grid-template-columns: 1fr; }
  .article { grid-template-columns: 1fr; gap: 8px; }
  .article .num { text-align: left; }
  body { font-size: 18px; }
}
@media (prefers-reduced-motion: reduce) {
  .crest { animation: none; }
  html { scroll-behavior: auto; }
}
