/* ============================================================
   VAST.WANG  —  styles.css
   The single source of truth for the visual representation of
   the Sovereign Network. [LAW:one-source-of-truth]
   The concept is fused into the form: engraved imperial caps
   (the Crown) paired with terminal monospace (the Net).
   ============================================================ */

/* ---- self-hosted faces (no CDN; the look must never silently
        degrade to Times) [LAW:no-silent-failure] ---- */
@font-face {
  font-family: "Cinzel";
  src: url("assets/img/Cinzel.woff2") format("woff2");
  font-weight: 400 900;           /* variable face */
  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;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("assets/img/IBMPlexMono-500.woff2") format("woff2");
  font-weight: 500; font-display: swap;
}

:root {
  --obsidian:  #07070c;
  --ink:       #0d0d16;
  --panel:     #11101d;
  --gold:      #cda349;
  --gold-lit:  #f0d99a;
  --gold-deep: #8a6d2c;
  --purple:    #2a1c47;
  --purple-lit:#6b4fa0;
  --parchment: #e9e3d3;
  --muted:     #9a93a8;
  --display: "Cinzel", "Times New Roman", serif;
  --serif:   "EB Garamond", "Iowan Old Style", Georgia, serif;
  --mono:    "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  /* CJK fallback rides on every family so 王 / 网 always render */
  --cjk: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
}

* { 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;
}

/* ---- shared rhythm ---- */
.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.42em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 1.4em;
}
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.5rem); text-align: center; }
.lede { font-size: 1.22rem; color: var(--parchment); }
em { color: var(--gold-lit); }

/* thin engraved gold rule */
.rule {
  height: 1px; width: 220px; margin: 40px auto;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  opacity: 0.7;
}
.rule.short { width: 90px; }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  min-height: 100vh;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  text-align: center;
  padding: 80px 24px;
  background:
    radial-gradient(ellipse 90% 70% at 50% 18%, rgba(42,28,71,0.55), transparent 70%),
    linear-gradient(180deg, rgba(7,7,12,0.30) 0%, rgba(7,7,12,0.78) 62%, var(--obsidian) 100%),
    url("assets/img/hero-bg.jpg") center 30% / cover no-repeat;
  background-color: var(--obsidian);
}
.crest {
  width: min(260px, 56vw);
  height: auto;
  filter: drop-shadow(0 0 34px rgba(205,163,73,0.42));
  animation: breathe 7s ease-in-out infinite;
}
@keyframes breathe {
  50% { filter: drop-shadow(0 0 50px rgba(240,217,154,0.62)); }
}
.wordmark {
  font-family: var(--display), var(--cjk);
  font-weight: 900;
  font-size: clamp(2.6rem, 9vw, 5.6rem);
  letter-spacing: 0.14em;
  margin: 0.5em 0 0;
  background: linear-gradient(180deg, var(--gold-lit) 0%, var(--gold) 48%, var(--gold-deep) 100%);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
  text-shadow: 0 1px 0 rgba(0,0,0,0.4);
}
.wordmark .dot {
  display: inline-block;
  width: 0.17em; height: 0.17em;
  margin: 0 0.12em;
  border-radius: 50%;
  background: var(--purple-lit);
  vertical-align: 0.30em;        /* lift to the optical center of the caps */
}
.motto {
  font-family: var(--display), var(--cjk);
  font-size: clamp(1.1rem, 3vw, 1.6rem);
  letter-spacing: 0.34em;
  color: var(--gold);
  margin: 1.1em 0 0.2em;
}
.glyphs {
  margin-top: 2.4em;
  font-family: var(--cjk);
  font-size: 1.5rem;
  color: var(--gold-deep);
  letter-spacing: 0.5em;
}
.scrollcue {
  position: absolute; bottom: 26px; left: 50%; transform: translateX(-50%);
  font-family: var(--mono); font-size: 0.66rem; letter-spacing: 0.4em;
  color: var(--muted); text-transform: uppercase;
}

/* ============================================================
   DECLARATION
   ============================================================ */
.declaration { text-align: center; }
.declaration .lede + .lede { margin-top: 1.4em; }
.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);
}

/* ============================================================
   THREE DOMINIONS
   ============================================================ */
.dominions {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px;
  margin-top: 56px;
}
.dominion {
  border: 1px solid rgba(205,163,73,0.22);
  background: linear-gradient(180deg, rgba(20,18,33,0.6), rgba(13,13,22,0.6));
  border-radius: 4px;
  padding: 34px 26px;
  text-align: center;
}
.dominion .glyph {
  font-family: var(--cjk);
  font-size: 2.6rem; color: var(--gold-lit);
  display: block; margin-bottom: 0.2em;
  text-shadow: 0 0 22px rgba(205,163,73,0.4);
}
.dominion h3 {
  font-size: 1.15rem; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--gold); margin-bottom: 0.5em;
}
.dominion p { font-size: 1rem; color: var(--muted); margin: 0; }

/* ============================================================
   THE CODEX
   ============================================================ */
.codex { background: linear-gradient(180deg, var(--obsidian), var(--ink) 50%, var(--obsidian)); }
.articles { margin-top: 48px; }
.article {
  display: grid; grid-template-columns: 84px 1fr; gap: 22px;
  padding: 26px 0;
  border-top: 1px solid rgba(205,163,73,0.14);
}
.article:last-child { border-bottom: 1px solid rgba(205,163,73,0.14); }
.article .num {
  font-family: var(--mono); font-size: 0.78rem; letter-spacing: 0.18em;
  color: var(--gold); padding-top: 0.5em; text-transform: uppercase;
}
.article .body { }
.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 / CLOSING
   ============================================================ */
.seal { text-align: center; }
.seal img {
  width: min(220px, 50vw); height: auto;
  filter: drop-shadow(0 0 30px rgba(205,163,73,0.34));
}
.seal .benediction {
  font-family: var(--display), var(--cjk);
  font-size: clamp(1.2rem, 3.4vw, 1.9rem);
  letter-spacing: 0.16em; color: var(--gold-lit);
  margin-top: 1em;
}

/* ============================================================
   FOOTER
   ============================================================ */
.foot {
  border-top: 1px solid rgba(205,163,73,0.16);
  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 a { color: var(--gold); text-decoration: none; }
.foot a:hover { color: var(--gold-lit); }
.foot .node { color: var(--gold-deep); }

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