/* The Napoleon Era — Empire skin layered over the parent gallery stylesheet.
   style.css supplies the whole component system (masthead, controls, grid, card,
   lightbox, pager). This file only:
     1. re-tunes the design tokens toward First Empire gilt + crimson,
     2. adds the pieces the parent has no equivalent of — collection bar, the
        laurel cypher, the dek.
   Everything stays on the parent's type scale, spacing rhythm and easing so the
   two collections read as one site. */

body.empire {
  /* Empire gilding: a touch warmer and brighter than the parent's museum gold,
     which is what ormolu on mahogany actually looks like. */
  --gold:     #d0ae66;
  --gold-2:   #eed9a4;
  --gold-dim: rgba(208,174,102,.20);
  /* imperial crimson — used only as a secondary accent (cypher, rules, links),
     never for body text: on --bg it sits well below AA. */
  --empire:      #8c2733;
  --empire-soft: #b04250;
  /* warm the gallery wall very slightly toward porphyry */
  --bg:   #0c0b0e;
  --bg-2: #131117;
  background:
    radial-gradient(1100px 620px at 50% -260px, rgba(140,39,51,.16), transparent 68%),
    radial-gradient(900px 520px at 50% -200px, rgba(208,174,102,.07), transparent 70%),
    linear-gradient(180deg, var(--bg-2), var(--bg) 380px);
}

@media (prefers-color-scheme: light) {
  body.empire:not([data-theme="dark"]) {
    --gold:     #8f6f2b;
    --gold-2:   #a8853c;
    --gold-dim: rgba(143,111,43,.14);
    --empire:      #7c2029;
    --empire-soft: #8c2733;
    --bg:   #f3efe6;
    --bg-2: #efe9dd;
    background:
      radial-gradient(1100px 620px at 50% -260px, rgba(124,32,41,.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(--empire) 14%, transparent);
}

/* ---------------- masthead ---------------- */

.imperial-masthead { padding-top: clamp(26px, 4vw, 48px); }
.imperial-masthead .overline { color: var(--gold); }
.imperial-masthead h1 {
  /* the parent already sets the serif display face; only the tracking changes,
     Empire lettering is cut tighter and taller than the house style */
  letter-spacing: -.012em;
}

/* laurel cypher */
.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);
}

/* the parent rule is plain gold; give this one a crimson core */
.imperial-masthead .gold-rule::after {
  background: linear-gradient(90deg, transparent, var(--empire-soft), var(--gold-2), var(--empire-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 crimson in the frame ---------------- */

body.empire .card:hover .frame::after { border-color: var(--gold-2); }
body.empire .card:hover .frame {
  box-shadow: var(--shadow-lift), 0 0 0 1px color-mix(in srgb, var(--empire) 45%, 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 Empire gilding carries into
   the panel instead of falling back to the parent's museum gold. */

body.empire .lightbox {
  --gold:     #d0ae66;
  --gold-2:   #eed9a4;
  --gold-dim: rgba(208,174,102,.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; }
  .dek { font-size: 14.5px; }
}
