/* ==========================================================================
   VOLTRUMITE EMPIRE — Imperial Government Portal (in exile)
   Black & gold system. One stylesheet, shared by every page.
   ========================================================================== */

/* --- Tokens ------------------------------------------------------------- */
:root {
  /* Surfaces: base -> elevated -> floating */
  --void:        #050506;
  --surface:     #0b0b0d;
  --surface-2:   #121214;
  --surface-3:   #191919;

  /* Gold ramp, derived from the sigil */
  --gold:        #d4af6e;
  --gold-bright: #f2dcab;
  --gold-mid:    #c19a4f;
  --gold-deep:   #8f6f2e;
  --gold-ghost:  rgba(212, 175, 110, 0.10);

  --line:        rgba(212, 175, 110, 0.16);
  --line-strong: rgba(212, 175, 110, 0.38);

  --text:        #e9e5dc;
  --muted:       #a09a8e;
  --dim:         #6d6860;

  /* Spacing scale — intentional steps, used everywhere */
  --s1: 0.375rem;
  --s2: 0.75rem;
  --s3: 1.25rem;
  --s4: 2rem;
  --s5: 3.25rem;
  --s6: 5rem;
  --s7: 7.5rem;

  --shell: 1140px;
  --measure: 68ch;

  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);

  /* Layered, colour-tinted shadows */
  --lift-1: 0 1px 2px rgba(0,0,0,.6), 0 6px 18px rgba(0,0,0,.45);
  --lift-2: 0 1px 2px rgba(0,0,0,.7), 0 14px 40px rgba(0,0,0,.55),
            0 0 0 1px rgba(212,175,110,.10);
  --glow:   0 0 28px rgba(212,175,110,.16);
}

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

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

body {
  margin: 0;
  background-color: var(--void);
  color: var(--text);
  font-family: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 1rem;
  line-height: 1.75;
  letter-spacing: 0.005em;
  overflow-x: hidden;
  /* Layered radial gradients for depth */
  background-image:
    radial-gradient(ellipse 90% 55% at 50% -8%,  rgba(212,175,110,.13), transparent 70%),
    radial-gradient(ellipse 60% 45% at 8%  22%,  rgba(143,111,46,.09),  transparent 72%),
    radial-gradient(ellipse 55% 50% at 96% 62%,  rgba(212,175,110,.07), transparent 70%),
    radial-gradient(ellipse 80% 40% at 50% 104%, rgba(143,111,46,.10),  transparent 75%);
  background-attachment: fixed;
}

/* Film grain — sits above the gradients, below everything else */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: .32;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.82' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.5'/%3E%3C/svg%3E");
}

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

/* --- Typography --------------------------------------------------------- */
h1, h2, h3, h4, .display {
  font-family: "Cinzel", "Optima", "Palatino Linotype", Georgia, serif;
  font-weight: 600;
  color: var(--gold-bright);
  letter-spacing: -0.01em;
  line-height: 1.18;
  margin: 0 0 var(--s2);
  text-wrap: balance;
}

h1 { font-size: clamp(2rem, 5.4vw, 3.5rem); letter-spacing: -0.03em; }
h2 { font-size: clamp(1.5rem, 3.4vw, 2.25rem); letter-spacing: -0.02em; }
h3 { font-size: clamp(1.125rem, 2.1vw, 1.375rem); color: var(--gold); }
h4 { font-size: 1rem; color: var(--gold); letter-spacing: .04em; text-transform: uppercase; }

p { margin: 0 0 var(--s3); max-width: var(--measure); }
p:last-child { margin-bottom: 0; }

a { color: var(--gold); text-decoration-color: rgba(212,175,110,.35); text-underline-offset: 3px; }
a:hover { color: var(--gold-bright); }

strong { color: var(--gold-bright); font-weight: 600; }
em { color: var(--text); }

.lede {
  font-size: clamp(1.0625rem, 1.8vw, 1.25rem);
  color: var(--muted);
  line-height: 1.7;
}

.eyebrow {
  font-family: "Cinzel", Georgia, serif;
  font-size: .6875rem;
  letter-spacing: .34em;
  text-transform: uppercase;
  color: var(--gold-deep);
  margin: 0 0 var(--s2);
}

.small { font-size: .8125rem; color: var(--dim); line-height: 1.6; }

/* Focus — every interactive element, no exceptions */
:where(a, button, input, textarea, select, summary):focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: 2px;
}

/* --- Layout ------------------------------------------------------------- */
.shell {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: var(--s3);
  position: relative;
  z-index: 1;
}

section { padding-block: var(--s6); position: relative; z-index: 1; }
section.tight { padding-block: var(--s5); }

.stack > * + * { margin-top: var(--s3); }
.narrow { max-width: 760px; }

/* --- Ornaments ---------------------------------------------------------- */
/* The four-point star from the sigil, reused as the empire's punctuation. */
.star {
  display: inline-block;
  width: 1em;
  height: 1em;
  background: currentColor;
  color: var(--gold);
  flex: none;
  clip-path: polygon(50% 0%, 58% 42%, 100% 50%, 58% 58%, 50% 100%, 42% 58%, 0% 50%, 42% 42%);
}

.rule {
  display: flex;
  align-items: center;
  gap: var(--s2);
  margin-block: var(--s4);
  color: var(--gold-deep);
}
.rule::before, .rule::after {
  content: "";
  height: 1px;
  flex: 1;
  background: linear-gradient(90deg, transparent, var(--line-strong), transparent);
}
.rule .star { width: .6rem; height: .6rem; opacity: .85; }

/* --- Header / navigation ------------------------------------------------ */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(5,5,6,.82);
  backdrop-filter: blur(14px) saturate(120%);
  -webkit-backdrop-filter: blur(14px) saturate(120%);
  border-bottom: 1px solid var(--line);
}

.topbar__in {
  display: flex;
  align-items: center;
  gap: var(--s3);
  min-height: 68px;
  flex-wrap: wrap;
  padding-block: var(--s2);
}

.brand {
  display: flex;
  align-items: center;
  gap: var(--s2);
  text-decoration: none;
  margin-right: auto;
  transition: opacity .3s var(--ease);
}
.brand:hover { opacity: .78; }
.brand img { width: 34px; height: 34px; flex: none; }
.brand__name {
  font-family: "Cinzel", Georgia, serif;
  font-size: .8125rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--gold-bright);
  line-height: 1.3;
}
.brand__sub {
  display: block;
  font-family: "Inter", sans-serif;
  font-size: .625rem;
  letter-spacing: .14em;
  color: var(--dim);
  text-transform: uppercase;
}

.nav {
  display: flex;
  align-items: center;
  gap: var(--s1);
  flex-wrap: wrap;
}
.nav a {
  position: relative;
  font-size: .8125rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  padding: .45rem .6rem;
  border-radius: 2px;
  transition: color .3s var(--ease), background-color .3s var(--ease);
}
.nav a:hover { color: var(--gold-bright); background: var(--gold-ghost); }
.nav a:active { transform: translateY(1px); }
.nav a[aria-current="page"] { color: var(--gold-bright); }
.nav a[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: .6rem; right: .6rem; bottom: .15rem;
  height: 1px;
  background: var(--gold);
}

/* --- Hero --------------------------------------------------------------- */
.hero { position: relative; border-bottom: 1px solid var(--line); }

.hero__figure {
  position: relative;
  overflow: hidden;
  background: #000;
}
.hero__figure img {
  width: 100%;
  aspect-ratio: 2056 / 765;
  object-fit: cover;
  max-width: 100%;
}
/* Gradient overlay + colour treatment layer, per house style */
.hero__figure::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(5,5,6,.92) 2%, rgba(5,5,6,.10) 55%, rgba(5,5,6,.45));
}
.hero__figure::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: radial-gradient(ellipse at 50% 70%, rgba(212,175,110,.22), transparent 62%);
  mix-blend-mode: multiply;
}

.hero__body { padding-block: var(--s5) var(--s6); text-align: center; }
.hero__body p { margin-inline: auto; }

.hero--page { padding-block: var(--s5) 0; border-bottom: 1px solid var(--line); }
.hero--page .shell { padding-bottom: var(--s5); }

/* --- Status strip ------------------------------------------------------- */
.strip {
  border-block: 1px solid var(--line);
  background: linear-gradient(180deg, var(--surface), var(--void));
}
.strip__in {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s3);
  padding-block: var(--s4);
}
.stat__k {
  font-family: "Cinzel", Georgia, serif;
  font-size: .625rem;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: var(--gold-deep);
  margin-bottom: .3rem;
}
.stat__v {
  font-family: "Cinzel", Georgia, serif;
  font-size: clamp(1.25rem, 2.6vw, 1.75rem);
  color: var(--gold-bright);
  line-height: 1.2;
}
.stat__n { font-size: .75rem; color: var(--dim); margin-top: .2rem; }

/* --- Cards -------------------------------------------------------------- */
.grid { display: grid; gap: var(--s3); grid-template-columns: 1fr; }

.card {
  position: relative;
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: var(--s4) var(--s3);
  box-shadow: var(--lift-1);
  transition: transform .4s var(--ease), border-color .4s var(--ease), box-shadow .4s var(--ease);
}
.card::before {
  content: "";
  position: absolute;
  inset-inline: 0; top: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--line-strong), transparent);
  opacity: 0;
  transition: opacity .4s var(--ease);
}
.card:hover { transform: translateY(-3px); border-color: var(--line-strong); box-shadow: var(--lift-2); }
.card:hover::before { opacity: 1; }
.card h3 { margin-bottom: var(--s1); }
.card p { color: var(--muted); font-size: .9375rem; }

a.card { text-decoration: none; display: block; color: inherit; }
a.card:active { transform: translateY(-1px); }
a.card .more {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  margin-top: var(--s2);
  font-size: .75rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--gold);
}
a.card .more span { transition: transform .4s var(--ease); }
a.card:hover .more span { transform: translateX(4px); }

/* --- Panel (elevated prose block) --------------------------------------- */
.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: var(--s4) var(--s3);
  box-shadow: var(--lift-1);
}
.panel--seal { border-color: var(--line-strong); box-shadow: var(--lift-2), var(--glow); }

/* --- Epigraph ----------------------------------------------------------- */
.epigraph {
  margin: 0 0 var(--s4);
  padding-left: var(--s3);
  border-left: 1px solid var(--line-strong);
  max-width: 62ch;
}
.epigraph p {
  font-family: "Cinzel", Georgia, serif;
  font-style: italic;
  font-size: clamp(1rem, 2vw, 1.1875rem);
  color: var(--gold-bright);
  line-height: 1.6;
}
.epigraph cite {
  display: block;
  margin-top: var(--s2);
  font-family: "Inter", sans-serif;
  font-style: normal;
  font-size: .75rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--dim);
}

/* --- Register table ----------------------------------------------------- */
.table-wrap { overflow-x: auto; }
table.register {
  width: 100%;
  border-collapse: collapse;
  font-size: .9375rem;
  text-align: left;
}
table.register th, table.register td {
  padding: .8rem var(--s2);
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
table.register th {
  width: 34%;
  font-family: "Cinzel", Georgia, serif;
  font-weight: 600;
  font-size: .75rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--gold-deep);
  white-space: nowrap;
}
table.register td { color: var(--muted); }
table.register tr:last-child th, table.register tr:last-child td { border-bottom: 0; }

/* --- Lists -------------------------------------------------------------- */
ul.marked { list-style: none; padding: 0; margin: 0 0 var(--s3); max-width: var(--measure); }
ul.marked li {
  position: relative;
  padding-left: var(--s3);
  margin-bottom: var(--s2);
  color: var(--muted);
}
ul.marked li::before {
  content: "";
  position: absolute;
  left: 0; top: .62em;
  width: .5rem; height: .5rem;
  background: var(--gold-deep);
  clip-path: polygon(50% 0%, 58% 42%, 100% 50%, 58% 58%, 50% 100%, 42% 58%, 0% 50%, 42% 42%);
}
ul.marked li strong { color: var(--gold-bright); }

ol.decree { counter-reset: d; list-style: none; padding: 0; margin: 0; max-width: var(--measure); }
ol.decree li {
  counter-increment: d;
  position: relative;
  padding-left: var(--s4);
  margin-bottom: var(--s3);
  color: var(--muted);
}
ol.decree li::before {
  content: counter(d, upper-roman) ".";
  position: absolute;
  left: 0; top: 0;
  font-family: "Cinzel", Georgia, serif;
  font-size: .8125rem;
  color: var(--gold-deep);
  letter-spacing: .06em;
}

/* --- Buttons ------------------------------------------------------------ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  font-family: "Cinzel", Georgia, serif;
  font-size: .75rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  padding: .85rem 1.6rem;
  border-radius: 2px;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid var(--gold-deep);
  background: transparent;
  color: var(--gold-bright);
  transition: transform .35s var(--ease), background-color .35s var(--ease),
              border-color .35s var(--ease), color .35s var(--ease), box-shadow .35s var(--ease);
}
.btn:hover {
  background: var(--gold-ghost);
  border-color: var(--gold);
  color: var(--gold-bright);
  transform: translateY(-2px);
  box-shadow: var(--glow);
}
.btn:active { transform: translateY(0); }

.btn--solid {
  background: linear-gradient(180deg, var(--gold), var(--gold-mid));
  border-color: var(--gold);
  color: #17120a;
  font-weight: 700;
}
.btn--solid:hover {
  background: linear-gradient(180deg, var(--gold-bright), var(--gold));
  color: #17120a;
}

.btn-row { display: flex; flex-wrap: wrap; gap: var(--s2); }
.hero__body .btn-row { justify-content: center; }

/* --- Badge -------------------------------------------------------------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-size: .6875rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--gold);
  border: 1px solid var(--line-strong);
  border-radius: 100px;
  padding: .35rem .85rem;
  background: var(--gold-ghost);
}
.badge .star { width: .5rem; height: .5rem; }

/* --- Sigil -------------------------------------------------------------- */
.sigil {
  width: clamp(110px, 20vw, 168px);
  margin: 0 auto var(--s3);
  filter: drop-shadow(0 0 26px rgba(212,175,110,.30));
}

/* --- Split (portrait / text) -------------------------------------------- */
.split { display: grid; gap: var(--s4); grid-template-columns: 1fr; align-items: start; }

.plate {
  position: relative;
  border: 1px solid var(--line-strong);
  border-radius: 3px;
  padding: var(--s4) var(--s3);
  background: radial-gradient(ellipse at 50% 0%, rgba(212,175,110,.10), transparent 65%), var(--surface);
  text-align: center;
  box-shadow: var(--lift-2);
}
.plate__name {
  font-family: "Cinzel", Georgia, serif;
  font-size: 1.375rem;
  color: var(--gold-bright);
  margin: 0 0 .2rem;
}
.plate__title { font-size: .75rem; letter-spacing: .16em; text-transform: uppercase; color: var(--dim); }

/* --- Form --------------------------------------------------------------- */
.field { margin-bottom: var(--s3); max-width: 560px; }
.field label {
  display: block;
  font-family: "Cinzel", Georgia, serif;
  font-size: .6875rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--gold-deep);
  margin-bottom: .45rem;
}
.field input, .field textarea, .field select {
  width: 100%;
  font-family: inherit;
  font-size: .9375rem;
  color: var(--text);
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 2px;
  padding: .75rem .85rem;
  transition: border-color .3s var(--ease), box-shadow .3s var(--ease);
}
.field input::placeholder, .field textarea::placeholder { color: var(--dim); }
.field input:hover, .field textarea:hover, .field select:hover { border-color: var(--line-strong); }
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(212,175,110,.14);
}
.field textarea { resize: vertical; min-height: 130px; }
.field .hint { font-size: .75rem; color: var(--dim); margin-top: .35rem; }
.hp { position: absolute; left: -9999px; }

/* --- Footer ------------------------------------------------------------- */
.foot {
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, var(--void), #000);
  padding-block: var(--s5) var(--s4);
  position: relative;
  z-index: 1;
}
.foot__grid { display: grid; gap: var(--s4); grid-template-columns: 1fr; }
.foot__grid h4 { margin-bottom: var(--s2); font-size: .6875rem; letter-spacing: .2em; color: var(--gold-deep); }
.foot__grid ul { list-style: none; padding: 0; margin: 0; }
.foot__grid li { margin-bottom: .45rem; }
.foot__grid a { font-size: .875rem; color: var(--muted); text-decoration: none; transition: color .3s var(--ease); }
.foot__grid a:hover { color: var(--gold-bright); }
.foot__base {
  margin-top: var(--s4);
  padding-top: var(--s3);
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: var(--s2);
  justify-content: space-between;
  align-items: center;
}
.foot__seal { display: flex; align-items: center; gap: var(--s2); }
.foot__seal img { width: 28px; height: 28px; opacity: .85; }

/* --- Prose (article pages) ---------------------------------------------- */
.prose h2 { margin-top: var(--s5); }
.prose h2:first-child { margin-top: 0; }
.prose h3 { margin-top: var(--s4); }
.prose > p, .prose > ul, .prose > ol { color: var(--muted); }
.prose .callout {
  border-left: 2px solid var(--gold-deep);
  padding: var(--s2) 0 var(--s2) var(--s3);
  margin-block: var(--s4);
  background: linear-gradient(90deg, var(--gold-ghost), transparent 70%);
}
.prose .callout p { color: var(--gold-bright); font-family: "Cinzel", Georgia, serif; font-size: 1.0625rem; }

/* --- Responsive --------------------------------------------------------- */
@media (min-width: 640px) {
  .grid--2 { grid-template-columns: repeat(2, 1fr); }
  .strip__in { grid-template-columns: repeat(2, 1fr); gap: var(--s4); }
  .foot__grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 900px) {
  .shell { padding-inline: var(--s4); }
  .grid--3 { grid-template-columns: repeat(3, 1fr); }
  .grid--4 { grid-template-columns: repeat(4, 1fr); }
  .strip__in { grid-template-columns: repeat(4, 1fr); }
  .split { grid-template-columns: 320px 1fr; gap: var(--s5); }
  .foot__grid { grid-template-columns: 1.4fr 1fr 1fr 1fr; }
  .hero__body { padding-block: var(--s6) var(--s7); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
}

/* --- Print -------------------------------------------------------------- */
@media print {
  body { background: #fff; color: #000; }
  body::before, .topbar, .foot, .hero__figure { display: none; }
  h1, h2, h3, .plate__name { color: #000; }
}
