/* ══════════════════════════════════════════════════════════════
   LORD SPUDNICK — The Royal Proclamation
   Near-black bronze void · drawn antique gold · ketchup wax seals
   ══════════════════════════════════════════════════════════════ */

:root {
  --void: #0d0a07;
  --bronze: #17110b;
  --gold: #c9a227;
  --gold-hi: #f0d878;
  --gold-deep: #7a5f1c;
  --ketchup: #b01e24;
  --cream: #f0e6cf;
  --cream-dim: #b9ab8d;
  --font-display: "Cinzel Decorative", serif;
  --font-caps: "Cinzel", serif;
  --font-body: "EB Garamond", serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background:
    radial-gradient(ellipse 120% 60% at 50% -10%, #241a0e 0%, transparent 60%),
    radial-gradient(ellipse 80% 40% at 50% 110%, #1c1409 0%, transparent 55%),
    var(--void);
  color: var(--cream);
  font-family: var(--font-body);
  font-size: 1.25rem;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

::selection { background: var(--gold-deep); color: var(--gold-hi); }

.nowrap { white-space: nowrap; }

/* ── Ornamental rule: a gold line that draws itself ────────── */
.rule {
  width: min(420px, 70%);
  height: 17px;
  margin: 0 auto 2.5rem;
  background:
    radial-gradient(circle at center, var(--gold) 0 2.5px, transparent 3px),
    linear-gradient(90deg, transparent, var(--gold-deep) 20%, var(--gold) 50%, var(--gold-deep) 80%, transparent);
  -webkit-mask-image: linear-gradient(90deg, #000 0 47%, transparent 47% 53%, #000 53% 100%);
  mask-image: linear-gradient(90deg, #000 0 47%, transparent 47% 53%, #000 53% 100%);
  height: 3px;
  opacity: .85;
  transform-origin: center;
  transition: transform 1.2s cubic-bezier(.22,1,.36,1);
}

/* ── Hero ──────────────────────────────────────────────────── */
.hero {
  display: grid;
  place-items: center;
  text-align: center;
  padding: clamp(2rem, 6vw, 4rem) 1.25rem 4rem;
  position: relative;
}

.hero-inner { max-width: 900px; position: relative; }

.hear-ye {
  font-family: var(--font-caps);
  font-size: clamp(.8rem, 2vw, 1rem);
  letter-spacing: .45em;
  color: var(--gold);
  text-transform: uppercase;
  margin-bottom: .9rem;
}

.by-decree {
  font-style: italic;
  color: var(--cream-dim);
  font-size: 1.15rem;
  margin-bottom: 2.2rem;
}

.marquee {
  font-family: var(--font-display);
  font-weight: 900;
  text-transform: uppercase;
  line-height: .95;
  margin-bottom: 1.6rem;
}

.marquee-line {
  display: block;
  font-size: clamp(2.2rem, 7vw, 4.5rem);
  letter-spacing: .18em;
  background: linear-gradient(180deg, var(--gold-hi) 15%, var(--gold) 48%, var(--gold-deep) 85%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 22px rgba(201,162,39,.35)) drop-shadow(0 2px 0 rgba(0,0,0,.6));
}

.marquee-big {
  font-size: clamp(3rem, 11vw, 7.5rem);
  letter-spacing: .06em;
}

.tagline {
  font-family: var(--font-caps);
  font-size: clamp(.85rem, 2.2vw, 1.15rem);
  letter-spacing: .32em;
  color: var(--cream-dim);
  text-transform: uppercase;
  margin-bottom: 3rem;
}

/* The royal portrait, in its frame */
.portrait-frame {
  display: inline-block;
  padding: clamp(10px, 2vw, 18px);
  border: 1px solid var(--gold-deep);
  outline: 1px solid var(--gold);
  outline-offset: 5px;
  background: var(--bronze);
  position: relative;
  box-shadow: 0 0 90px rgba(201,162,39,.14), 0 30px 60px rgba(0,0,0,.55);
}
.portrait-frame::before, .portrait-frame::after {
  content: "";
  position: absolute;
  width: 26px; height: 26px;
  border: 2px solid var(--gold);
}
.portrait-frame::before { top: -9px; left: -9px; border-right: none; border-bottom: none; }
.portrait-frame::after { bottom: -9px; right: -9px; border-left: none; border-top: none; }

.portrait-frame img {
  display: block;
  width: min(560px, 82vw);
  height: auto;
}

.portrait-wrap { position: relative; display: inline-block; }

/* The wax seal — pinned to the portrait's shoulder */
.seal {
  position: absolute;
  top: -34px;
  right: -26px;
  width: 92px; height: 92px;
  border-radius: 50% 46% 52% 48% / 48% 52% 46% 50%;
  background: radial-gradient(circle at 35% 30%, #d13a3f, var(--ketchup) 55%, #6d1013 90%);
  display: grid;
  place-items: center;
  transform: rotate(-12deg);
  box-shadow: 0 6px 18px rgba(0,0,0,.55), inset 0 -4px 10px rgba(0,0,0,.35);
}
.seal span {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.9rem;
  color: #f4d7c4;
  text-shadow: 0 1px 0 rgba(0,0,0,.5);
  border: 1.5px solid rgba(244,215,196,.5);
  border-radius: 50%;
  width: 62px; height: 62px;
  display: grid;
  place-items: center;
}

/* ── Decree sections ───────────────────────────────────────── */
.decree {
  max-width: 920px;
  margin: 0 auto;
  padding: clamp(4rem, 10vw, 7rem) 1.5rem 0;
}

#legend { padding-top: clamp(1.5rem, 4vw, 3rem); }

.decree h2, .hero h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.7rem, 5vw, 2.6rem);
  text-align: center;
  color: var(--gold);
  letter-spacing: .08em;
  margin-bottom: 2.8rem;
}

.hero .rule { margin-top: 3rem; }
.hero h2 { margin-bottom: 0; }

.h2-roman {
  display: block;
  font-family: var(--font-caps);
  font-weight: 400;
  font-size: .5em;
  letter-spacing: .5em;
  color: var(--cream-dim);
  margin-bottom: .7rem;
}

.decree p { margin-bottom: 1.6rem; }
.decree p:last-of-type { margin-bottom: 0; }

.decree a {
  color: var(--gold-hi);
  text-decoration: none;
  border-bottom: 1px solid var(--gold-deep);
  transition: color .25s, border-color .25s;
}
.decree a:hover { color: var(--gold); border-color: var(--gold); }

.dropcap::first-letter {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 3.4em;
  float: left;
  line-height: .82;
  padding: .06em .12em 0 0;
  color: var(--gold);
}

/* Throne figure */
.throne-figure {
  margin: 3rem auto 0;
  max-width: 700px;
  text-align: center;
  padding: 12px;
  border: 1px solid var(--gold-deep);
  outline: 1px solid rgba(201,162,39,.55);
  outline-offset: 4px;
  background: var(--bronze);
}
.throne-figure img { display: block; width: 100%; height: auto; }
.throne-figure figcaption {
  font-style: italic;
  color: var(--cream-dim);
  font-size: 1.075rem;
  padding: .9rem 0 .3rem;
}
.fig-sigil { color: var(--gold); font-style: normal; font-family: var(--font-caps); letter-spacing: .12em; }

/* ── The Royal Archives ────────────────────────────────────── */
.archives-intro { text-align: center; font-style: italic; color: var(--cream-dim); }

.archives-grid {
  margin-top: 3rem;
  display: grid;
  gap: 2.5rem;
}
@media (min-width: 700px) {
  .archives-grid { grid-template-columns: 1fr 1fr; }
}

.exhibit {
  border: 1px solid var(--gold-deep);
  outline: 1px solid rgba(201,162,39,.5);
  outline-offset: 4px;
  background: var(--bronze);
  padding: 12px;
}

.exhibit-slot {
  aspect-ratio: 9 / 16;
  position: relative;
  display: grid;
  place-items: center;
  text-align: center;
  color: var(--cream-dim);
  background:
    repeating-linear-gradient(45deg, transparent 0 14px, rgba(201,162,39,.05) 14px 15px),
    var(--void);
  border: 1px dashed rgba(201,162,39,.35);
  font-style: italic;
}
.exhibit-slot p { margin: 0; padding: 1rem; }
.exhibit-slot span { font-size: .9rem; color: var(--gold-deep); font-style: normal; font-family: var(--font-caps); letter-spacing: .1em; }

.exhibit-slot iframe {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  border: 0;
  display: block;
  opacity: 0;
  transition: opacity .6s ease;
}
.exhibit-slot.exhibit-ready iframe { opacity: 1; }

.exhibit-poster {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  filter: saturate(.9) brightness(.92);
}

.exhibit figcaption {
  font-family: var(--font-caps);
  letter-spacing: .25em;
  text-transform: uppercase;
  font-size: .85rem;
  color: var(--gold);
  text-align: center;
  padding: .9rem 0 .2rem;
}

/* ── The Royal Summons ─────────────────────────────────────── */
.summons { text-align: center; }
.summons p { max-width: 660px; margin-inline: auto; }

.summons-link {
  display: inline-block;
  margin-top: 1.5rem;
  font-family: var(--font-caps);
  font-size: clamp(.95rem, 2.4vw, 1.15rem);
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--gold-hi);
  text-decoration: none;
  padding: 1.1rem 2rem;
  border: 1px solid var(--gold);
  position: relative;
  transition: background .3s, color .3s, letter-spacing .3s;
}
.summons-link:hover {
  background: linear-gradient(180deg, rgba(201,162,39,.16), rgba(201,162,39,.05));
  letter-spacing: .3em;
}
.summons-ornament { color: var(--gold-deep); padding: 0 .6em; }

.summons-sub {
  margin-top: 1.4rem;
  font-size: 1.05rem;
  font-style: italic;
  color: var(--cream-dim);
}

/* ── The Blessing (footer) ─────────────────────────────────── */
.blessing {
  text-align: center;
  padding: clamp(4rem, 10vw, 7rem) 1.5rem 4.5rem;
  position: relative;
}
.blessing-big {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.6rem, 5vw, 2.8rem);
  background: linear-gradient(180deg, var(--gold-hi), var(--gold) 70%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 1rem;
}
.blessing-small {
  font-style: italic;
  color: var(--cream-dim);
  font-size: 1.125rem;
}
.seal-footer {
  position: static;
  margin: 2.5rem auto 0;
  width: 72px; height: 72px;
  transform: rotate(8deg);
}
.seal-footer span { width: 48px; height: 48px; font-size: 1.4rem; }

/* ── Unfurl on scroll (JS-gated so no-JS still reads the decree) ── */
.js .decree > *:not(.rule), .js .blessing > *:not(.rule) {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity .9s ease, transform .9s cubic-bezier(.22,1,.36,1);
}
.js .in-view > *:not(.rule), .js .in-view.blessing > *:not(.rule) {
  opacity: 1;
  transform: none;
}

.js .decree .rule, .js .blessing .rule { transform: scaleX(0); }
.js .in-view .rule, .js .in-view > .rule { transform: scaleX(1); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .decree > *, .blessing > *, .rule { opacity: 1 !important; transform: none !important; transition: none; }
}

/* ── Small screens ─────────────────────────────────────────── */
@media (max-width: 640px) {
  body { font-size: 1.1875rem; }
  .seal { width: 60px; height: 60px; top: -22px; right: -12px; }
  .seal span { width: 40px; height: 40px; font-size: 1.15rem; }
  .tagline { letter-spacing: .2em; }
  .portrait-frame::before, .portrait-frame::after { width: 16px; height: 16px; }
}
