/* ==========================================================================
   Peninsula Ballet Arts — Hip Hop Nutcracker
   custom.css  —  loads AFTER bootstrap.min.css so it can override
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. BRAND TOKENS
   Change colors in one place. Everything else references these.
   -------------------------------------------------------------------------- */
:root {
  --pba-ink:        #111111;   /* body text / near-black */
  --pba-paper:      #ffffff;   /* page background (client wants white) */
  --pba-red:        #d81e28;   /* nutcracker soldier red — primary accent */
  --pba-red-dark:   #ad1720;   /* hover state */
  --pba-blue:       #1b3fa0;   /* snow-scene blue — secondary accent */
  --pba-muted:      #6b6b6b;   /* secondary text */
  --pba-line:       #e6e6e6;   /* hairline borders */
  --pba-wash:       #f7f7f7;   /* very light section background */

  --pba-header-h:   76px;      /* sticky header height, used by scroll-margin */

  /* Bootstrap variable overrides */
  --bs-body-color: var(--pba-ink);
  --bs-body-bg: var(--pba-paper);
  --bs-body-font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --bs-link-color: var(--pba-red);
  --bs-link-hover-color: var(--pba-red-dark);
  --bs-border-color: var(--pba-line);
}

/* --------------------------------------------------------------------------
   2. BASE TYPOGRAPHY
   -------------------------------------------------------------------------- */
body {
  font-family: var(--bs-body-font-family);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--pba-ink);
  background-color: var(--pba-paper);
  -webkit-font-smoothing: antialiased;
}

/* Display face — condensed poster caps for headlines */
.display-face,
h1, h2, .h1, .h2 {
  font-family: "Anton", "Arial Narrow", sans-serif;
  font-weight: 400;
  letter-spacing: 0.01em;
  line-height: 0.95;
  text-transform: uppercase;
}

h3, h4, h5, h6, .h3, .h4, .h5, .h6 {
  font-family: var(--bs-body-font-family);
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.2;
}

/* Fluid headline sizes */
.title-xxl { font-size: clamp(2.75rem, 8vw, 6.5rem); }
.title-xl  { font-size: clamp(2.25rem, 5.5vw, 4rem); }
.title-lg  { font-size: clamp(1.75rem, 3.5vw, 2.75rem); }

/* Small uppercase label above section headings */
.eyebrow {
  font-family: var(--bs-body-font-family);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--pba-red);
  margin-bottom: 0.75rem;
}
.eyebrow--light { color: rgba(255, 255, 255, 0.85); }

.lead-tight { font-size: 1.1875rem; line-height: 1.6; color: var(--pba-muted); }

.text-muted-brand { color: var(--pba-muted) !important; }

/* Short red rule used as a section divider */
.rule {
  width: 64px;
  height: 4px;
  background: var(--pba-red);
  border: 0;
  opacity: 1;
  margin: 0 0 1.5rem;
}
.rule--center { margin-left: auto; margin-right: auto; }

/* Generous vertical rhythm for content sections */
.section {
  padding-top: clamp(3.5rem, 8vw, 6.5rem);
  padding-bottom: clamp(3.5rem, 8vw, 6.5rem);
  scroll-margin-top: var(--pba-header-h);
}
.section--wash { background: var(--pba-wash); }

/* --------------------------------------------------------------------------
   3. BUTTONS
   -------------------------------------------------------------------------- */
.btn {
  --bs-btn-padding-y: 0.85rem;
  --bs-btn-padding-x: 2rem;
  --bs-btn-font-size: 0.9375rem;
  --bs-btn-font-weight: 700;
  --bs-btn-border-radius: 999px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: transform 0.15s ease, background-color 0.15s ease, color 0.15s ease;
}
.btn:active { transform: translateY(1px); }

/* Primary CTA — Get Tickets */
.btn-brand {
  --bs-btn-color: #fff;
  --bs-btn-bg: var(--pba-red);
  --bs-btn-border-color: var(--pba-red);
  --bs-btn-hover-color: #fff;
  --bs-btn-hover-bg: var(--pba-red-dark);
  --bs-btn-hover-border-color: var(--pba-red-dark);
  --bs-btn-active-bg: var(--pba-red-dark);
  --bs-btn-active-border-color: var(--pba-red-dark);
  --bs-btn-focus-shadow-rgb: 216, 30, 40;
}

/* Outline on white */
.btn-brand-outline {
  --bs-btn-color: var(--pba-ink);
  --bs-btn-bg: transparent;
  --bs-btn-border-color: var(--pba-ink);
  --bs-btn-hover-color: #fff;
  --bs-btn-hover-bg: var(--pba-ink);
  --bs-btn-hover-border-color: var(--pba-ink);
  --bs-btn-focus-shadow-rgb: 17, 17, 17;
}

/* Outline on top of the video (white border) */
.btn-brand-ghost {
  --bs-btn-color: #fff;
  --bs-btn-bg: transparent;
  --bs-btn-border-color: rgba(255, 255, 255, 0.7);
  --bs-btn-hover-color: var(--pba-ink);
  --bs-btn-hover-bg: #fff;
  --bs-btn-hover-border-color: #fff;
  --bs-btn-focus-shadow-rgb: 255, 255, 255;
}

/* Compact version for the header */
.btn-sm-brand {
  --bs-btn-padding-y: 0.55rem;
  --bs-btn-padding-x: 1.35rem;
  --bs-btn-font-size: 0.8125rem;
}

/* --------------------------------------------------------------------------
   4. HEADER / NAV
   -------------------------------------------------------------------------- */
.site-header {
  background: var(--pba-paper);
  border-bottom: 1px solid var(--pba-line);
  min-height: var(--pba-header-h);
  /* The navbar is shorter than the header's min-height, so without this it
     sits flush to the top and the whole lockup reads high. */
  display: flex;
  align-items: center;
}
.site-header > .navbar { flex: 1 1 auto; }

/* --- Brand logo -----------------------------------------------------------
   The lockup is stacked (400x325), so it needs real height to stay legible.
   Phones keep a shallow bar; desktop opens up and --pba-header-h moves with
   it, so the full-screen heroes (sized calc(100svh - header)) still fit the
   fold exactly. Zeroing the navbar-brand padding keeps that arithmetic
   predictable: logo height + the navbar's own py-2. */
.navbar-brand { padding-block: 0; }

.brand-logo {
  display: block;
  width: auto;
  height: 52px;
}

@media (min-width: 992px) {
  :root { --pba-header-h: 100px; }   /* 84px logo + 8px padding top/bottom */
  .brand-logo { height: 84px; }
}

.site-footer .brand-logo { height: 96px; }

.navbar-brand {
  font-family: "Anton", "Arial Narrow", sans-serif;
  text-transform: uppercase;
  line-height: 1;
  letter-spacing: 0.01em;
  color: var(--pba-ink);
}
.navbar-brand:hover { color: var(--pba-ink); }
.navbar-brand .brand-top {
  display: block;
  font-family: var(--bs-body-font-family);
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: var(--pba-muted);
  margin-bottom: 0.2rem;
}
.navbar-brand .brand-main { display: block; font-size: 1.375rem; }
.navbar-brand .brand-main em { font-style: normal; color: var(--pba-red); }

.navbar-nav .nav-link {
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--pba-ink);
  padding-inline: 0.9rem !important;
  position: relative;
}
.navbar-nav .nav-link:hover,
.navbar-nav .nav-link:focus-visible { color: var(--pba-red); }

/* Active page underline */
.navbar-nav .nav-link.active { color: var(--pba-red); }
.navbar-nav .nav-link.active::after {
  content: "";
  position: absolute;
  left: 0.9rem;
  right: 0.9rem;
  bottom: 0.25rem;
  height: 2px;
  background: var(--pba-red);
}
@media (max-width: 991.98px) {
  .navbar-nav .nav-link.active::after { display: none; }
  .navbar-nav .nav-link { padding-block: 0.6rem !important; }
  .navbar-collapse { padding-bottom: 1rem; }
  /* line the Tickets button up with the nav links' text, which is inset by
     the same 0.9rem the links carry as horizontal padding */
  .navbar-nav .nav-item > .btn { margin-left: 0.9rem; }
}

.navbar-toggler { border: 0; padding: 0.4rem 0.25rem; }
.navbar-toggler:focus { box-shadow: none; outline: 2px solid var(--pba-red); outline-offset: 2px; }

/* Skip link for keyboard users */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 2000;
  background: var(--pba-ink);
  color: #fff;
  padding: 0.75rem 1.25rem;
  font-weight: 700;
}
.skip-link:focus { left: 0; color: #fff; }

/* --------------------------------------------------------------------------
   5. HERO — full-screen video on desktop, inline embed on mobile
   -------------------------------------------------------------------------- */
.hero { position: relative; background: var(--pba-ink); }

.hero__media {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background-color: var(--pba-ink);
  background-position: center;
  background-size: cover;   /* poster image shows until the video paints */
}

/* The Vimeo iframe is 16:9 and cannot be cropped by object-fit, so it is
   over-sized in both axes and centered — the classic "cover" technique. */
.hero__media iframe {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100vw;
  height: 56.25vw;      /* 100vw ÷ 16 × 9 */
  min-height: 100vh;
  min-width: 177.78vh;  /* 100vh ÷ 9 × 16 */
  border: 0;
  pointer-events: none; /* background video is decorative — don't trap clicks */
}

/* Dark scrim so the overlaid headline stays legible over any frame */
.hero__scrim {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to bottom, rgba(0,0,0,0.55) 0%, rgba(0,0,0,0.15) 38%, rgba(0,0,0,0.75) 100%);
}

.hero__content { position: relative; z-index: 2; }

/* --- Desktop (≥992px): true full-viewport hero, text over video --- */
@media (min-width: 992px) {
  .hero {
    min-height: 100vh;
    min-height: 100svh; /* avoids the iOS/Android URL-bar jump */
    display: flex;
    align-items: center;
  }
  .hero__content { width: 100%; padding-block: 6rem; }

  /* The home page is the hero and nothing else — subtract the sticky header
     so the page fits exactly and never scrolls. */
  .hero--only {
    min-height: calc(100vh - var(--pba-header-h));
    min-height: calc(100svh - var(--pba-header-h));
  }
}

/* --- Below 992px, BACKGROUND MODE (PBA_CONFIG.mobileBackground = true) ---
   Phones get the same full-bleed treatment as desktop: silent looping video
   behind the title. js/main.js puts .hero--bg-mobile on the section. The
   cover sizing and scrim are inherited from the base rules above. */
@media (max-width: 991.98px) {
  .hero--bg-mobile {
    display: flex;
    align-items: center;
    min-height: 100vh;
    min-height: 100svh;
  }
  .hero--bg-mobile.hero--only {
    min-height: calc(100vh - var(--pba-header-h));
    min-height: calc(100svh - var(--pba-header-h));
  }
  .hero--bg-mobile .hero__content {
    width: 100%;
    padding-block: 3rem;
    text-align: center;
  }
  /* A phone crops the 16:9 frame hard, so lean the scrim darker to keep the
     title readable over whatever ends up behind it. */
  .hero--bg-mobile .hero__scrim {
    background: linear-gradient(to bottom,
      rgba(0,0,0,0.55) 0%, rgba(0,0,0,0.35) 40%, rgba(0,0,0,0.75) 100%);
  }
}

/* --- Below 992px, INLINE MODE (PBA_CONFIG.mobileBackground = false) ---
   Video sits in a 16:9 box with real controls, title below it on white. --- */
@media (max-width: 991.98px) {
  .hero:not(.hero--bg-mobile) { background: var(--pba-paper); }

  .hero:not(.hero--bg-mobile) .hero__media {
    position: relative;
    inset: auto;
    width: 100%;
    aspect-ratio: 16 / 9;
  }
  .hero:not(.hero--bg-mobile) .hero__media iframe {
    position: absolute;
    inset: 0;
    transform: none;
    width: 100%;
    height: 100%;
    min-width: 0;
    min-height: 0;
    pointer-events: auto; /* mobile player is interactive — user taps play */
  }

  .hero:not(.hero--bg-mobile) .hero__scrim { display: none; }

  .hero:not(.hero--bg-mobile) .hero__content {
    padding: 2.5rem 0 3rem;
    text-align: center;
  }
  /* Text is on white below the video, so flip it back to ink */
  .hero:not(.hero--bg-mobile) .hero__content .hero__title,
  .hero:not(.hero--bg-mobile) .hero__content .hero__meta { color: var(--pba-ink) !important; }
  /* the shadow exists for legibility over video — it only halos on white */
  .hero:not(.hero--bg-mobile) .hero__content .hero__title { text-shadow: none; }
  .hero__sub { margin-inline: auto; }
  .hero:not(.hero--bg-mobile) .hero__content .hero__sub { color: var(--pba-muted) !important; }
  .hero:not(.hero--bg-mobile) .hero__content .eyebrow { color: var(--pba-red) !important; }
  .hero:not(.hero--bg-mobile) .hero__content .btn-brand-ghost {
    --bs-btn-color: var(--pba-ink);
    --bs-btn-border-color: var(--pba-ink);
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: var(--pba-ink);
  }
}

.hero__title { color: #fff; text-shadow: 0 2px 30px rgba(0,0,0,0.35); }
.hero__title em { font-style: normal; color: var(--pba-red); }

/* "Stuck Sanders'" — the possessive line above the show name */
.hero__title .name-line {
  display: block;
  font-size: clamp(1.375rem, 3.2vw, 2.75rem);
  letter-spacing: 0.03em;
  margin-bottom: 0.15em;
}
.hero__sub { color: rgba(255,255,255,0.9); max-width: 34rem; }
.hero__meta {
  color: #fff;
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* Sound toggle sits over the desktop background video */
.hero__sound {
  position: absolute;
  right: 1.5rem;
  bottom: 1.5rem;
  z-index: 3;
  height: 46px;
  padding: 0 1.15rem 0 0.95rem;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.5);
  background: rgba(0,0,0,0.35);
  color: #fff;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  backdrop-filter: blur(4px);
  transition: background-color 0.2s ease, border-color 0.2s ease;
}
.hero__sound:hover { background: rgba(0,0,0,0.65); color: #fff; }

.hero__sound-label {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  line-height: 1;
}

/* Sound is on — make the control read as active rather than neutral */
.hero__sound[aria-pressed="true"] {
  background: var(--pba-red);
  border-color: var(--pba-red);
}
.hero__sound[aria-pressed="true"]:hover { background: var(--pba-red-dark); }
@media (max-width: 991.98px) { .hero__sound { display: none; } }

/* --------------------------------------------------------------------------
   6. PAGE HEADER (interior pages)
   -------------------------------------------------------------------------- */
.page-head {
  padding-top: clamp(3rem, 6vw, 5rem);
  padding-bottom: clamp(1.5rem, 3vw, 2.5rem);
  border-bottom: 1px solid var(--pba-line);
}

.bg-graphic {
	color: #fff;
	background-color: #000;
    background-size: cover;
    -webkit-background-size: cover;
    -moz-background-size: cover;
    background-position: center top;
    background-repeat: no-repeat;
    background-attachment: scroll;
}

.bg-graphic .lead-tight {
	color: #ccc;
}

/* --------------------------------------------------------------------------
   7. GALLERY
   -------------------------------------------------------------------------- */
.gallery-item {
  display: block;
  position: relative;
  width: 100%;
  padding: 0;
  border: 0;
  background: var(--pba-wash);
  overflow: hidden;
  aspect-ratio: 4 / 5;
  cursor: zoom-in;
}
.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.gallery-item:hover img,
.gallery-item:focus-visible img { transform: scale(1.05); }

.gallery-item::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(216, 30, 40, 0);
  transition: background 0.3s ease;
}
.gallery-item:hover::after { background: rgba(216, 30, 40, 0.16); }
.gallery-item:focus-visible { outline: 3px solid var(--pba-red); outline-offset: 3px; }

/* Lightbox modal */
.lightbox {
  --bs-backdrop-bg: #000;
  --bs-backdrop-opacity: 0.93;
}

.lightbox__nav {
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.lightbox .modal-content {
  background: transparent;
  border: 0;
}
.lightbox .modal-body {
  padding: 0;
  display: grid;
  place-items: center;
  min-height: 60vh;
}
.lightbox img {
  max-width: 100%;
  max-height: 84vh;
  width: auto;
  height: auto;
  object-fit: contain;
  background: #fff;
}
.lightbox .btn-close {
  position: absolute;
  top: -3rem;
  right: 0;
  filter: invert(1) grayscale(1) brightness(2);
  opacity: 0.9;
}
.lightbox__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.5);
  background: rgba(0,0,0,0.4);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 1.5rem;
  line-height: 1;
  z-index: 5;
}
.lightbox__nav:hover { background: var(--pba-red); border-color: var(--pba-red); color: #fff; }
.lightbox__nav--prev { left: -4rem; }
.lightbox__nav--next { right: -4rem; }
.lightbox__count {
  color: rgba(255,255,255,0.8);
  font-size: 0.8125rem;
  letter-spacing: 0.1em;
  text-align: center;
  padding-top: 0.85rem;
}
@media (max-width: 767.98px) {
  .lightbox__nav--prev { left: 0.5rem; }
  .lightbox__nav--next { right: 0.5rem; }
  .lightbox .btn-close { top: -2.5rem; right: 0.5rem; }
}

/* --------------------------------------------------------------------------
   8. CONTENT BLOCKS
   -------------------------------------------------------------------------- */
.img-frame {
  overflow: hidden;
  background: var(--pba-wash);
}
.img-frame img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Red bar of showtimes / detail rows */
.detail-row {
  display: flex;
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--pba-line);
}
.detail-row:last-child { border-bottom: 0; }
.detail-row dt {
  flex: 0 0 9rem;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--pba-muted);
  margin: 0;
}
.detail-row dd { margin: 0; font-weight: 500; }
@media (max-width: 575.98px) {
  .detail-row { flex-direction: column; gap: 0.25rem; }
  .detail-row dt { flex: none; }
}

/* Pull quote */
.pull-quote {
  border-left: 4px solid var(--pba-red);
  padding-left: 1.75rem;
  font-size: clamp(1.25rem, 2.4vw, 1.75rem);
  line-height: 1.4;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.pull-quote cite {
  display: block;
  margin-top: 1rem;
  font-size: 0.875rem;
  font-style: normal;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--pba-muted);
}

/* --------------------------------------------------------------------------
   9. CTA BAND + FOOTER
   -------------------------------------------------------------------------- */
.cta-band {
  background: var(--pba-red);
  color: #fff;
  padding: clamp(3rem, 6vw, 4.5rem) 0;
}
.cta-band .btn-brand-ghost {
  --bs-btn-border-color: #fff;
  --bs-btn-hover-bg: #fff;
  --bs-btn-hover-color: var(--pba-red);
}

.site-footer {
  background: var(--pba-paper);
  border-top: 1px solid var(--pba-line);
  padding: 3.5rem 0 2rem;
  font-size: 0.9375rem;
}
.site-footer h2, .site-footer .h6 {
  font-family: var(--bs-body-font-family);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--pba-muted);
  margin-bottom: 1rem;
}
.site-footer a { color: var(--pba-ink); text-decoration: none; }
.site-footer a:hover { color: var(--pba-red); text-decoration: underline; }
.footer-bottom {
  border-top: 1px solid var(--pba-line);
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  font-size: 0.8125rem;
  color: var(--pba-muted);
}
.social-link {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--pba-line);
  border-radius: 50%;
  margin-right: 0.5rem;
}
.social-link:hover { background: var(--pba-red); border-color: var(--pba-red); color: #fff !important; }

/* --------------------------------------------------------------------------
   10. UTILITIES / MOTION
   -------------------------------------------------------------------------- */
.link-underline-brand {
  color: var(--pba-ink);
  text-decoration: none;
  border-bottom: 2px solid var(--pba-red);
  padding-bottom: 1px;
}
.link-underline-brand:hover { color: var(--pba-red); }

a:focus-visible, button:focus-visible {
  outline: 3px solid var(--pba-red);
  outline-offset: 2px;
}

/* Fade-in on scroll (progressive enhancement — see js/main.js) */
.reveal { opacity: 0; transform: translateY(18px); }
.reveal.is-visible {
  opacity: 1;
  transform: none;
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1);
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}
