/* =====================================================================
   PLAYBILL — theatrical programme template
   All selectors scoped under .pg-playbill
   Colour: CSS vars only (--bg / --ink / --accent / --surface / --muted / --line)
   Layout: centered axis, @container page queries, 390px → 1400px
   ===================================================================== */

/* ── wrapper ── */
.pg-playbill {
  font-family: var(--font-serif);
  text-align: center;
  padding-bottom: 0;
}

/* ── shared rule and ornament ── */
.pg-playbill .b-rule {
  width: 100%;
  border: none;
  border-top: 1px solid var(--line);
  margin: 0;
}

.pg-playbill .b-orn {
  font: 400 clamp(.8rem, 1.8cqw, 1.1rem)/1 var(--font-serif);
  letter-spacing: .38em;
  color: var(--accent);
  padding: .15em 0;
  user-select: none;
}

/* ── section kicker (uppercase mono label above ruled sections) ── */
.pg-playbill .b-section-kicker {
  font: 400 9px/1.5 var(--font-mono);
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0;
}

/* ── "and N further …" overflow line ── */
.pg-playbill .b-bill-more {
  font: 400 9px/1.5 var(--font-mono);
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--muted);
  margin: .6rem 0 0;
}

/* ================================================================
   HEADER — programme masthead
   ================================================================ */
.pg-playbill .b-head {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(.8rem, 2cqw, 1.2rem);
  padding: clamp(1.8rem, 5cqw, 3rem) clamp(1.2rem, 4cqw, 2.4rem) clamp(1.4rem, 4cqw, 2.2rem);
  border-bottom: 1px solid var(--line);
}

.pg-playbill .b-logo {
  max-height: 56px;
  max-width: 180px;
  object-fit: contain;
}

/* Fallback initials badge when no logo */
.pg-playbill .b-logo-initials {
  display: inline-block;
  padding: .3em .7em;
  border: 1px solid var(--accent);
  color: var(--accent);
  font: 400 clamp(1.1rem, 2.8cqw, 1.6rem)/1 var(--font-serif);
  letter-spacing: .28em;
  text-transform: uppercase;
  min-height: 2em;
}

.pg-playbill .b-eyebrow {
  font: 400 9px/1.5 var(--font-mono);
  letter-spacing: .38em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0;
}

/* ================================================================
   TITLE — main billing card: rules, supra, enormous name, ornament
   ================================================================ */
.pg-playbill .b-title {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(.6rem, 1.8cqw, 1.1rem);
  padding: clamp(2rem, 6cqw, 4rem) clamp(1.4rem, 5cqw, 3.2rem) clamp(1.8rem, 5cqw, 3rem);
}

.pg-playbill .b-supratitle {
  font: 400 10px/1.5 var(--font-mono);
  letter-spacing: .28em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0;
}

.pg-playbill .b-name {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .04em;
  margin: clamp(.4rem, 1.5cqw, .9rem) 0;
  /* No font shorthand — size is set per span below */
  font-family: var(--font-serif);
  line-height: .88;
}

.pg-playbill .b-name-first {
  font-size: clamp(4.2rem, 19cqw, 13rem);
  font-weight: 400;
  font-style: normal;
  letter-spacing: .015em;
  display: block;
}

/* Italic second part in blush accent — the one "italic word" permitted */
.pg-playbill .b-name-rest {
  font-size: clamp(3.4rem, 15.5cqw, 10.5rem);
  font-weight: 400;
  font-style: italic;
  letter-spacing: .01em;
  color: var(--accent);
  display: block;
  margin-left: 6%;   /* classic billing offset */
}

/* ================================================================
   PROSCENIUM — hero image framed like a stage arch
   ================================================================ */
.pg-playbill .b-proscenium {
  padding: 0 clamp(1.4rem, 5cqw, 5.5rem);
  margin-bottom: clamp(2rem, 5cqw, 3.6rem);
}

/* The arch: border-radius on top creates the proscenium curve */
.pg-playbill .b-stage-frame {
  position: relative;
  max-width: 860px;
  margin: 0 auto;
  border: 3px solid var(--accent);
  border-radius: 46% 46% 0 0 / 9% 9% 0 0;
  overflow: hidden;
}

/* Inner inset hairline — second frame ring */
.pg-playbill .b-stage-frame::before {
  content: '';
  position: absolute;
  inset: 10px;
  border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent);
  border-radius: inherit;
  z-index: 1;
  pointer-events: none;
}

.pg-playbill .b-stage-frame img {
  display: block;
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  object-position: center 30%;
}

.pg-playbill .b-stage-caption {
  margin-top: .75rem;
  font: 400 8px/1.5 var(--font-mono);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ================================================================
   COMPANY NOTES — bio copy on a surface panel
   ================================================================ */
.pg-playbill .b-bio {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(.9rem, 2.2cqw, 1.4rem);
  padding: clamp(2.4rem, 6cqw, 4rem) clamp(1.4rem, 5cqw, 3.6rem);
  background: var(--surface);
}

.pg-playbill .b-bio-kicker {
  font: 400 9px/1.5 var(--font-mono);
  letter-spacing: .25em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0;
}

.pg-playbill .b-bio-body {
  width: min(640px, 100%);
}

.pg-playbill .b-bio-body p {
  font: 400 clamp(1rem, 2.1cqw, 1.15rem)/1.72 var(--font-serif);
  color: var(--ink);
  margin: 0;
  text-align: left;         /* left-set prose within the centered frame */
}

/* ================================================================
   INTERVAL — stats displayed as act cards
   ================================================================ */
.pg-playbill .b-interval {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(1rem, 2.6cqw, 1.8rem);
  padding: clamp(2.4rem, 6cqw, 4rem) clamp(1.2rem, 4cqw, 2.4rem);
  background: var(--ink);
  color: var(--bg);
}

/* Override ornament colour inside inverted band */
.pg-playbill .b-interval .b-orn {
  color: var(--accent);
}

.pg-playbill .b-interval-title {
  font: 400 italic clamp(1rem, 2.5cqw, 1.4rem)/1 var(--font-serif);
  letter-spacing: .06em;
  opacity: .8;
  margin: 0;
}

.pg-playbill .b-acts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  width: 100%;
  max-width: 800px;
  border: 1px solid color-mix(in srgb, var(--bg) 28%, transparent);
}

.pg-playbill .b-act-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .55rem;
  padding: clamp(1.2rem, 3cqw, 2rem) clamp(.8rem, 2cqw, 1.4rem);
  border-right: 1px solid color-mix(in srgb, var(--bg) 28%, transparent);
}
.pg-playbill .b-act-card:last-child { border-right: none; }

.pg-playbill .b-act-num {
  font: 400 9px/1 var(--font-mono);
  letter-spacing: .2em;
  text-transform: uppercase;
  opacity: .55;
  display: block;
}

.pg-playbill .b-act-value {
  font: 400 clamp(2rem, 7.5cqw, 5rem)/1 var(--font-serif);
  color: var(--accent);
  display: block;
}

.pg-playbill .b-act-label {
  font: 400 8px/1.4 var(--font-mono);
  letter-spacing: .16em;
  text-transform: uppercase;
  opacity: .65;
  display: block;
}

/* ================================================================
   PRODUCTIONS — theatrical billing block (descending size hierarchy)
   ================================================================ */
.pg-playbill .b-productions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(1.2rem, 3cqw, 2rem);
  padding: clamp(3rem, 8cqw, 5.6rem) clamp(1.4rem, 5cqw, 3.6rem);
}

.pg-playbill .b-billing {
  width: 100%;
  max-width: 780px;
}

.pg-playbill .b-bill-row {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: clamp(.5rem, 1.4cqw, .9rem) 0;
  border-bottom: 1px solid var(--line);
  gap: .28em;
}

.pg-playbill .b-bill-num {
  font: 400 8px/1 var(--font-mono);
  letter-spacing: .15em;
  color: var(--muted);
  display: block;
}

.pg-playbill .b-bill-title {
  font-family: var(--font-serif);
  font-weight: 400;
  font-style: normal;
  letter-spacing: .02em;
  display: block;
}

/* Star billing — above-the-title marquee name */
.pg-playbill .b-bill-star .b-bill-title {
  font-size: clamp(2.2rem, 7.5cqw, 5rem);
  line-height: .9;
}

/* Large supporting billing */
.pg-playbill .b-bill-lg .b-bill-title {
  font-size: clamp(1.55rem, 4.4cqw, 2.9rem);
  line-height: .96;
}

/* Medium credits */
.pg-playbill .b-bill-md .b-bill-title {
  font-size: clamp(1.05rem, 2.8cqw, 1.8rem);
  line-height: 1.1;
}

/* Small credits — small-caps, muted */
.pg-playbill .b-bill-sm .b-bill-title {
  font-size: clamp(.8rem, 1.9cqw, 1.1rem);
  line-height: 1.25;
  font-variant-caps: small-caps;
  letter-spacing: .09em;
  color: var(--muted);
}

/* ================================================================
   PROGRAMME PHOTOGRAPHS — columnar strip with captions
   ================================================================ */
.pg-playbill .b-gallery {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(1.2rem, 3cqw, 2rem);
  padding: clamp(2.4rem, 6cqw, 4rem) clamp(1.4rem, 5cqw, 3.6rem);
  background: var(--surface);
}

.pg-playbill .b-photo-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(.7rem, 1.8cqw, 1.2rem);
  width: 100%;
  max-width: 860px;
}

.pg-playbill .b-photo {
  display: grid;
  gap: .55rem;
  margin: 0;
}

.pg-playbill .b-photo img {
  width: 100%;
  aspect-ratio: 3/4;
  object-fit: cover;
  border: 1px solid var(--line);
  display: block;
  transition: filter .3s ease;
}
.pg-playbill .b-photo:hover img { filter: brightness(1.08); }

.pg-playbill .b-photo figcaption {
  font: 400 8px/1.5 var(--font-mono);
  letter-spacing: .11em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ================================================================
   REEL — YouTube embed
   ================================================================ */
.pg-playbill .b-reel {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(1.2rem, 3cqw, 2rem);
  padding: clamp(2.4rem, 6cqw, 4rem) clamp(1.4rem, 5cqw, 3.6rem);
}

.pg-playbill .b-embed {
  width: 100%;
  max-width: 800px;
}

/* ================================================================
   PRESENTED WITH — publishers as an inverted ceremonial band
   ================================================================ */
.pg-playbill .b-presented {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(.9rem, 2.2cqw, 1.4rem);
  padding: clamp(2.4rem, 6cqw, 4rem) clamp(1.4rem, 5cqw, 3.6rem);
  background: color-mix(in srgb, var(--ink) 12%, var(--bg));
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.pg-playbill .b-presented-label {
  font: 400 9px/1.5 var(--font-mono);
  letter-spacing: .32em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0;
}

.pg-playbill .b-presented-names {
  font: 400 clamp(1rem, 3.2cqw, 2rem)/1.35 var(--font-serif);
  letter-spacing: .03em;
  color: var(--ink);
  max-width: 640px;
  margin: 0;
}

/* ================================================================
   WORKS
   ================================================================ */
.pg-playbill .b-works {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(1rem, 2.4cqw, 1.6rem);
  padding: clamp(2.4rem, 6cqw, 4rem) clamp(1.4rem, 5cqw, 3.6rem);
}

.pg-playbill .b-works-list {
  list-style: none;
  padding: 0;
  margin: 0;
  width: min(560px, 100%);
}

.pg-playbill .b-works-list li {
  padding: .55rem 0;
  border-bottom: 1px solid var(--line);
  font: 400 clamp(.9rem, 2.1cqw, 1.1rem)/1.45 var(--font-serif);
  color: var(--ink);
}

/* ================================================================
   TERRITORIES
   ================================================================ */
.pg-playbill .b-territories {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(1rem, 2.4cqw, 1.6rem);
  padding: clamp(2rem, 5cqw, 3.4rem) clamp(1.4rem, 5cqw, 3.6rem);
  background: var(--surface);
}

.pg-playbill .b-terr-list {
  width: min(680px, 100%);
  font: 400 clamp(.75rem, 1.7cqw, .9rem)/2.1 var(--font-mono);
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0;
}

/* ================================================================
   CONTACT FOOTER — back page of the programme
   ================================================================ */
.pg-playbill .b-contact {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(1.2rem, 3cqw, 2rem);
  padding: clamp(3.4rem, 9cqw, 6rem) clamp(1.4rem, 5cqw, 3.6rem) 2.8rem;
  background: var(--ink);
  color: var(--bg);
}

.pg-playbill .b-contact .b-orn {
  color: var(--accent);
}

.pg-playbill .b-contact-kicker {
  font: 400 9px/1.5 var(--font-mono);
  letter-spacing: .22em;
  text-transform: uppercase;
  opacity: .72;
  margin: 0;
}

.pg-playbill .b-contact-head {
  font: 400 clamp(3.6rem, 14cqw, 9rem)/.86 var(--font-serif);
  letter-spacing: .015em;
  margin: 0;
}

.pg-playbill .b-contact-head em {
  font-style: italic;
  color: var(--accent);
}

.pg-playbill .b-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.6rem;
  margin-top: .4rem;
}

.pg-playbill .b-contact .soc {
  color: var(--bg);
}

/* Rule and colophon inside inverted footer */
.pg-playbill .b-contact .b-rule {
  border-top-color: color-mix(in srgb, var(--bg) 32%, transparent);
  width: 100%;
}

.pg-playbill .b-contact .colophon {
  color: var(--bg);
  opacity: .5;
  margin-top: .4rem;
}

/* ================================================================
   RESPONSIVE — @container page queries (NOT @media)
   ================================================================ */

/* Tablet / narrow container */
@container page (max-width: 620px) {
  .pg-playbill .b-name-rest {
    margin-left: 0;
  }

  .pg-playbill .b-proscenium {
    padding: 0 clamp(.8rem, 3cqw, 1.4rem);
  }

  .pg-playbill .b-stage-frame {
    border-radius: 40% 40% 0 0 / 7% 7% 0 0;
  }

  .pg-playbill .b-acts {
    grid-template-columns: repeat(2, 1fr);
  }

  .pg-playbill .b-photo-strip {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Mobile — single column */
@container page (max-width: 420px) {
  .pg-playbill .b-stage-frame {
    border-radius: 30% 30% 0 0 / 5% 5% 0 0;
  }

  .pg-playbill .b-acts {
    grid-template-columns: 1fr;
  }

  .pg-playbill .b-act-card {
    border-right: none;
    border-bottom: 1px solid color-mix(in srgb, var(--bg) 28%, transparent);
  }
  .pg-playbill .b-act-card:last-child { border-bottom: none; }

  .pg-playbill .b-photo-strip {
    grid-template-columns: 1fr;
  }

  .pg-playbill .b-bio-body p {
    text-align: center;
  }
}

/* ── Playbill: motion & detail polish ───────────────────────────────── */

.pg-playbill ::selection { background: var(--accent); color: var(--bg); }

/* Proscenium — arch frame already has overflow: hidden; image zooms on hover */
.pg-playbill .b-stage-frame img {
  transition: transform .95s cubic-bezier(.22, 1, .36, 1);
}
.pg-playbill .b-stage-frame:hover img { transform: scale(1.04); }

/* Billing rows — title and number reveal accent on hover */
.pg-playbill .b-bill-row:hover .b-bill-title { color: var(--accent); }
.pg-playbill .b-bill-row:hover .b-bill-num   { color: var(--accent); }

/* Works list items — accent tint on hover */
.pg-playbill .b-works-list li:hover { color: var(--accent); }

/* Ornament keyframe — defined outside media so it's always parseable */
@keyframes b-orn-pulse {
  0%, 100% { opacity: .65; transform: scale(1); }
  50%       { opacity: 1;   transform: scale(1.015); }
}

@media (prefers-reduced-motion: no-preference) {
  /* Ambient: ornament diamonds (✦·✦·✦) gently breathe — one loop, 13 s */
  .pg-playbill .b-orn {
    animation: b-orn-pulse 13s ease-in-out infinite;
  }

  /* Act cards stagger up when the interval band enters view */
  .stage.animate .pg-playbill .b-interval .b-act-card {
    opacity: 0;
    transform: translateY(12px);
    transition: opacity .5s ease, transform .5s ease;
  }
  .stage.animate .pg-playbill .b-interval.in .b-act-card         { opacity: 1; transform: none; }
  .stage.animate .pg-playbill .b-interval.in .b-act-card:nth-child(1)   { transition-delay: .10s; }
  .stage.animate .pg-playbill .b-interval.in .b-act-card:nth-child(2)   { transition-delay: .20s; }
  .stage.animate .pg-playbill .b-interval.in .b-act-card:nth-child(3)   { transition-delay: .30s; }
  .stage.animate .pg-playbill .b-interval.in .b-act-card:nth-child(n+4) { transition-delay: .40s; }

  /* Billing rows — descending theatre credit cascade into view */
  .stage.animate .pg-playbill .b-productions .b-bill-row {
    opacity: 0;
    transform: translateY(8px);
    transition: opacity .4s ease, transform .4s ease;
  }
  .stage.animate .pg-playbill .b-productions.in .b-bill-row         { opacity: 1; transform: none; }
  .stage.animate .pg-playbill .b-productions.in .b-bill-row:nth-child(1)   { transition-delay: .05s; }
  .stage.animate .pg-playbill .b-productions.in .b-bill-row:nth-child(2)   { transition-delay: .11s; }
  .stage.animate .pg-playbill .b-productions.in .b-bill-row:nth-child(3)   { transition-delay: .17s; }
  .stage.animate .pg-playbill .b-productions.in .b-bill-row:nth-child(4)   { transition-delay: .23s; }
  .stage.animate .pg-playbill .b-productions.in .b-bill-row:nth-child(5)   { transition-delay: .29s; }
  .stage.animate .pg-playbill .b-productions.in .b-bill-row:nth-child(6)   { transition-delay: .35s; }
  .stage.animate .pg-playbill .b-productions.in .b-bill-row:nth-child(7)   { transition-delay: .41s; }
  .stage.animate .pg-playbill .b-productions.in .b-bill-row:nth-child(n+8) { transition-delay: .47s; }

  /* Works list — items slide in from the left when the section enters */
  .stage.animate .pg-playbill .b-works .b-works-list li {
    opacity: 0;
    transform: translateX(-6px);
    transition: opacity .38s ease, transform .38s ease;
  }
  .stage.animate .pg-playbill .b-works.in .b-works-list li         { opacity: 1; transform: none; }
  .stage.animate .pg-playbill .b-works.in .b-works-list li:nth-child(1)   { transition-delay: .06s; }
  .stage.animate .pg-playbill .b-works.in .b-works-list li:nth-child(2)   { transition-delay: .12s; }
  .stage.animate .pg-playbill .b-works.in .b-works-list li:nth-child(3)   { transition-delay: .18s; }
  .stage.animate .pg-playbill .b-works.in .b-works-list li:nth-child(4)   { transition-delay: .24s; }
  .stage.animate .pg-playbill .b-works.in .b-works-list li:nth-child(5)   { transition-delay: .30s; }
  .stage.animate .pg-playbill .b-works.in .b-works-list li:nth-child(6)   { transition-delay: .36s; }
  .stage.animate .pg-playbill .b-works.in .b-works-list li:nth-child(7)   { transition-delay: .42s; }
  .stage.animate .pg-playbill .b-works.in .b-works-list li:nth-child(n+8) { transition-delay: .48s; }
}

/* ── Playbill: xsec flex-zone — theatrical programme voice ──────── */
.pg-playbill .xsec-zone { text-align: center; border-top: 1px solid var(--line); }
.pg-playbill .xsec-h { font-size: clamp(2rem, 7cqw, 3.8rem); }
.pg-playbill .xsec-title { letter-spacing: .3em; color: var(--accent); }
.pg-playbill .xsec-list ul { columns: 1; }
.pg-playbill .xsec-list li { justify-content: center; }
