/* The Roman Era — imperial skin layered over the parent gallery stylesheet.
   Same pattern as napoleon.css: style.css supplies the whole component system;
   this file only re-tunes tokens (Tyrian purple + bronze gilt instead of the
   Empire's crimson) and carries the bespoke pieces — collection bar, laurel
   SPQR cypher, the dek. Everything stays on the parent's type scale, spacing
   rhythm and easing so the collections read as one site. */

body.roman {
  /* bronze gilt: a touch deeper than the parent's museum gold — aged aes */
  --gold:     #c6a35e;
  --gold-2:   #e3cd92;
  --gold-dim: rgba(198,163,94,.20);
  /* Tyrian purple — the emperor's dye. Secondary accent only (cypher, rules,
     chips), never body text: on --bg it sits below AA. */
  --roman:      #6e2b4e;
  --roman-soft: #93446e;
  /* warm the gallery wall toward porphyry-marble */
  --bg:   #0d0b0e;
  --bg-2: #141017;
  background:
    radial-gradient(1100px 620px at 50% -260px, rgba(110,43,78,.17), transparent 68%),
    radial-gradient(900px 520px at 50% -200px, rgba(198,163,94,.07), transparent 70%),
    linear-gradient(180deg, var(--bg-2), var(--bg) 380px);
}

@media (prefers-color-scheme: light) {
  body.roman:not([data-theme="dark"]) {
    --gold:     #8b6c2e;
    --gold-2:   #a4823e;
    --gold-dim: rgba(139,108,46,.14);
    --roman:      #5e2443;
    --roman-soft: #6e2b4e;
    --bg:   #f3efe7;
    --bg-2: #efe8dd;
    background:
      radial-gradient(1100px 620px at 50% -260px, rgba(94,36,67,.07), transparent 68%),
      linear-gradient(180deg, var(--bg-2), var(--bg) 380px);
  }
}

/* ---------------- skip link (keyboard users land on the paintings) ------------ */

.skip-link {
  position: absolute;
  left: -9999px;
  top: 8px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--surface-2);
  color: var(--ink);
  border: 1px solid var(--gold);
  border-radius: var(--radius);
  font-size: 13px;
  text-decoration: none;
}
.skip-link:focus { left: 12px; }

/* ---------------- collection bar ---------------- */

.collection-bar {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 14px;
  flex-wrap: wrap;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 16px 24px 0;
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.collection-back,
.collection-here {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 12px;                 /* keeps the hit area comfortable */
  border-radius: var(--radius);
  text-decoration: none;
  transition: color .2s var(--ease), background .2s var(--ease);
}
.collection-back { color: var(--ink-mute); }
.collection-back svg { width: 13px; height: 13px; }
.collection-back:hover { color: var(--gold); background: var(--gold-dim); }
.collection-back:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.collection-here {
  color: var(--ink-soft);
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--roman) 16%, transparent);
}

/* ---------------- masthead ---------------- */

.imperial-masthead { padding-top: clamp(26px, 4vw, 48px); }
.imperial-masthead .overline { color: var(--gold); }
.imperial-masthead h1 { letter-spacing: -.012em; }

/* laurel cypher, SPQR variant */
.cypher {
  position: relative;
  width: 116px;
  height: 92px;
  margin: clamp(14px, 2.4vw, 24px) 0 0;
  color: var(--gold);
}
.cypher svg {
  width: 100%;
  height: 100%;
  display: block;
  opacity: .85;
  filter: drop-shadow(0 1px 0 rgba(0,0,0,.35));
}
.cypher .leaf { opacity: .95; }
.cypher-letter {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding-top: 6px;
  font-family: var(--serif);
  font-size: 40px;
  font-weight: 500;
  font-style: italic;
  color: var(--gold-2);
  text-shadow: 0 1px 0 rgba(0,0,0,.45);
}
.cypher-spqr {
  font-size: 19px;
  font-style: normal;
  font-weight: 600;
  letter-spacing: .18em;
  padding-left: .18em;               /* optically recenter the tracked text */
}

/* the parent rule is plain gold; give this one a purple core */
.imperial-masthead .gold-rule::after {
  background: linear-gradient(90deg, transparent, var(--roman-soft), var(--gold-2), var(--roman-soft), transparent);
}

.dek {
  max-width: 63ch;                   /* keeps the measure readable */
  margin: 18px 0 0;
  padding: 0 8px;
  font-size: 15px;
  line-height: 1.72;
  color: var(--ink-soft);
  text-wrap: pretty;
}

/* ---------------- cards: a hint of purple in the frame ---------------- */

body.roman .card:hover .frame::after { border-color: var(--gold-2); }
body.roman .card:hover .frame {
  box-shadow: var(--shadow-lift), 0 0 0 1px color-mix(in srgb, var(--roman) 48%, transparent);
}

/* ---------------- lightbox ----------------
   style.css pins the lightbox tokens to the parent's dark palette (the overlay
   is near-black in both themes); re-pin the golds so the bronze gilt carries
   into the panel. */

body.roman .lightbox {
  --gold:     #c6a35e;
  --gold-2:   #e3cd92;
  --gold-dim: rgba(198,163,94,.20);
}

/* ---------------- colophon ---------------- */

.colophon a {
  color: var(--ink-soft);
  text-decoration: none;
  border-bottom: 1px solid var(--gold-dim);
  transition: color .2s var(--ease), border-color .2s var(--ease);
}
.colophon a:hover { color: var(--gold); border-bottom-color: var(--gold); }
.colophon a:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

/* ---------------- motion ---------------- */

@media (prefers-reduced-motion: reduce) {
  .collection-back,
  .colophon a { transition: none; }
}

@media (max-width: 560px) {
  .cypher { width: 96px; height: 76px; }
  .cypher-letter { font-size: 33px; }
  .cypher-spqr { font-size: 16px; }
  .dek { font-size: 14.5px; }
}
