/* ============================================================
   SERIES HUB — shared layout for the six series index pages
   (Objects, Glass Cases, Portraits, Music, Food, Learning).
   Loads after codex-room.css: the room supplies the vellum ground and
   the opening band, this file supplies the series-specific browsing
   grid. Per-series identity is a single custom property, --room-pigment,
   set inline on each page - nothing else about the layout varies.
   ============================================================ */

/* ── Hero extras: .series-hero extends .room-opening ── */
.series-hero {
  padding-bottom: clamp(2.5rem, 5vw, 4rem);
}
.series-hero .heb-bg {
  position: absolute; top: -0.1em; right: -0.05em;
  font-family: var(--display); font-weight: 900;
  font-size: clamp(8rem, 22vw, 16rem); line-height: 1;
  color: color-mix(in srgb, var(--room-pigment, var(--gold)) 12%, transparent);
  pointer-events: none; user-select: none;
}
.series-hero .series-intro {
  margin-top: 1.3rem;
  font-size: clamp(0.95rem, 1.5vw, 1.06rem);
  line-height: 1.7;
  max-width: 60ch;
  color: color-mix(in srgb, var(--ink) 88%, transparent);
}

/* ── Content well ── */
.series-content {
  max-width: 1200px; margin: 0 auto;
  padding: clamp(2.5rem, 6vw, 4.5rem) clamp(1.25rem, 4vw, 3rem);
}

/* ── Lead figure: .article-figure (style.css) is built for the narrow
   article reading column (--measure, ~64ch) and stretches to width:100%
   there. Inside the wide series-content well that same rule blows a
   portrait photo up past viewport height, burying the pieces grid.
   Cap it to a modest banner size instead. ── */
.series-content > .article-figure {
  max-width: 300px;
  margin: 0 auto 1.75rem;
}
.series-content > .article-figure img {
  max-height: 220px;
  object-fit: cover;
}

.section-label {
  font-family: var(--utility); font-size: 0.72rem; font-weight: 600;
  letter-spacing: 0.22em; text-transform: uppercase;
  color: color-mix(in srgb, var(--room-pigment, var(--gold)) 75%, var(--ink) 15%);
  margin-bottom: 1.4rem;
  display: flex; align-items: center; gap: 0.8rem;
}
.section-label::after {
  content: ""; flex: 1;
  height: 1px; background: color-mix(in srgb, var(--gold) 30%, transparent);
}

/* ── Piece cards: jewel-toned boxes set on the vellum ground ── */
.pieces-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
  margin-bottom: clamp(3rem, 7vw, 5rem);
}

.piece-card {
  display: flex; flex-direction: column;
  background: var(--night-2);
  border: 1px solid color-mix(in srgb, var(--room-pigment, var(--techelet)) 35%, transparent);
  border-radius: 4px;
  padding: 1.6rem;
  text-decoration: none;
  color: var(--vellum);
  transition: transform 0.22s ease, border-color 0.22s ease;
  position: relative;
  overflow: hidden;
}
.piece-card:hover,
.piece-card:focus-visible {
  transform: translateY(-3px);
  border-color: var(--gold);
}
.piece-card .card-glyph {
  position: absolute; top: 0.5rem; right: 1rem;
  font-family: var(--display); font-weight: 900;
  font-size: 5.5rem; line-height: 1; opacity: 0.1;
  user-select: none; pointer-events: none;
}
.piece-card h3 {
  font-family: var(--display); font-weight: 700;
  font-size: 1.32rem; line-height: 1.18;
  margin-bottom: 0.65rem;
}
.piece-card p {
  font-size: 0.92rem; line-height: 1.6;
  color: color-mix(in srgb, var(--vellum) 82%, transparent);
  flex: 1;
}
.piece-card .card-cta {
  margin-top: 1.1rem;
  font-family: var(--utility); font-size: 0.68rem; font-weight: 600;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--gold-soft);
}

/* ── Workshop (in-progress list) ── */
.workshop {
  border-top: 1px solid color-mix(in srgb, var(--gold) 25%, transparent);
  padding-top: clamp(2rem, 5vw, 3.5rem);
}
.workshop-list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.55rem 1.5rem;
  margin-top: 0.5rem;
}
.workshop-list li {
  font-family: var(--body); font-style: italic;
  font-size: 0.95rem; line-height: 1.5;
  color: color-mix(in srgb, var(--ink) 55%, transparent);
  padding: 0.35rem 0;
  border-bottom: 1px solid color-mix(in srgb, var(--ink) 10%, transparent);
}
.workshop-list li::before {
  content: "· ";
  color: color-mix(in srgb, var(--room-pigment, var(--gold)) 65%, var(--ink) 10%);
}

/* ── Back link, now sitting inside the room's colophon ── */
.back-link {
  display: inline-block;
  font-family: var(--utility); font-size: 0.72rem; font-weight: 600;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: color-mix(in srgb, var(--ink) 68%, transparent);
  text-decoration: none;
  border-bottom: 1px solid color-mix(in srgb, var(--gold) 40%, transparent);
  padding-bottom: 2px;
  transition: color 0.18s, border-color 0.18s;
}
.back-link:hover,
.back-link:focus-visible {
  color: var(--gold);
  border-bottom-color: var(--gold);
}
