/* 8thstreetproductions.tv — static site styles.
   Carried over from the Elementor site: red #CE3E3E, black display type in
   Sofia Sans Extra Condensed ExtraBold, body in Sofia Sans Semi Condensed
   Medium. Both faces are the site's own files, converted TTF -> woff2. */

@font-face {
  font-family: "Sofia XCond";
  src: url("/fonts/sofia-xcond-800.woff2") format("woff2");
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Sofia XCond";
  src: url("/fonts/sofia-xcond-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Sofia SemiCond";
  src: url("/fonts/sofia-semicond-500.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Sofia SemiCond";
  src: url("/fonts/sofia-semicond-800.woff2") format("woff2");
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}

:root {
  --red: #ce3e3e;
  --ink: #1d1d1d;
  --paper: #ffffff;
  --muted: #555;
  --display: "Sofia XCond", "Arial Narrow", Helvetica, Arial, sans-serif;
  --body: "Sofia SemiCond", "Arial Narrow", Helvetica, Arial, sans-serif;
  --gutter: 16px;
  --maxw: 1320px;
  /* Live site insets content 55px at a 1440 viewport. */
  --inset: clamp(16px, 3.8vw, 55px);
}

*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-weight: 500;
  font-size: 17px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

img, video { display: block; max-width: 100%; }
a { color: inherit; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  margin: -1px; padding: 0; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap;
}

.skip {
  position: absolute; left: -9999px; top: 0; z-index: 60;
  background: var(--ink); color: #fff; padding: 10px 16px; text-decoration: none;
}
.skip:focus { left: 0; }

:where(a, button):focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }
.topbar--on-red :where(a, button):focus-visible,
.band :where(a, button):focus-visible { outline-color: #000; }

/* ------------------------------------------------------------ top bar */

.topbar {
  position: absolute;
  inset: 0 0 auto 0;
  z-index: 40;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 46px var(--inset) 0;
  pointer-events: none;
}
.topbar > * { pointer-events: auto; }

.logo img { width: clamp(52px, 5vw, 70px); height: auto; }

/* The home hero IS the logo animation, so the corner logo is dropped there. */
.topbar--home .logo { visibility: hidden; }

.burger {
  appearance: none;
  border: 0;
  background: transparent;
  padding: 6px;
  cursor: pointer;
  line-height: 0;
}
.burger__bars { display: block; width: 44px; }
.burger__bars i {
  display: block;
  height: 7px;
  background: var(--ink);
  margin: 6px 0;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.burger[aria-expanded="true"] .burger__bars i:nth-child(1) { transform: translateY(13px) rotate(45deg); }
.burger[aria-expanded="true"] .burger__bars i:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] .burger__bars i:nth-child(3) { transform: translateY(-13px) rotate(-45deg); }

/* ---------------------------------------------------------------- menu */

.menu {
  position: fixed;
  inset: 0;
  z-index: 35;
  background: var(--red);
  display: grid;
  justify-items: end;
  align-items: center;
  padding: 0 var(--inset);
  visibility: hidden;
  transform: translateY(-100%);
  transition: transform 0.45s ease-out, visibility 0s linear 0.45s;
}
.menu.is-open {
  visibility: visible;
  transform: translateY(0);
  transition: transform 0.45s ease-out, visibility 0s linear 0s;
}

.menu ul { list-style: none; margin: 0; padding: 0; text-align: right; }
.menu li + li { margin-top: 10px; }
.menu a {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(2.5rem, 9vw, 5rem);
  line-height: 1.05;
  letter-spacing: 0.01em;
  text-decoration: none;
  color: var(--ink);
  position: relative;
  isolation: isolate;
}
.menu a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 0.06em;
  transform: translateY(-50%);
  background: #fff;
  opacity: 0;
  z-index: -1;
  pointer-events: none;
}
.menu a:hover, .menu a:focus-visible {
  text-decoration: none;
  color: var(--ink);
}
.menu a:hover::after, .menu a:focus-visible::after {
  opacity: 1;
}

/* Without JS the overlay can never open, so show the nav inline instead. */
.no-js .menu {
  position: static;
  visibility: visible;
  opacity: 1;
  transform: none;
  display: grid;
  place-items: center;
  background: var(--red);
  padding: 12px;
}
.no-js .menu ul { display: flex; gap: 20px; justify-content: center; flex-wrap: wrap; }
.no-js .menu a {
  font-size: 1.5rem;
  text-decoration: none;
}
.no-js .menu a:hover, .no-js .menu a:focus-visible {
  text-decoration: none;
  color: var(--ink);
}
.no-js .menu a:hover::after, .no-js .menu a:focus-visible::after {
  opacity: 1;
}
.no-js .burger { display: none; }

/* ---------------------------------------------------------------- hero */

.hero { background: #fff; position: relative; z-index: 0; overflow: hidden; }
.hero mux-player {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  --controls: none;
  --media-object-fit: cover;
  --play-button: none;
  --center-controls: none;
}
.hero__video { width: 100%; height: auto; }

/* --------------------------------------------------------------- bands */

.band {
  background: var(--red);
  margin-top: 20px;            /* white strip above the band, as on the live site */
  padding: clamp(64px, 8.7vw, 125px) 0 clamp(40px, 14.2vw, 204px);
}
.band__inner { padding: 0 var(--inset); }

.band__inner--split {
  display: grid;
  grid-template-columns: 1fr minmax(220px, 320px);
  gap: 40px;
  align-items: end;
}

.display {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(4rem, 13.3vw, 12rem);
  line-height: 1;
  letter-spacing: 0.005em;
  margin: 0;
  text-transform: uppercase;
  color: var(--ink);
}

.display--rule-left {
  border-left: 5px solid var(--ink);
  padding-left: clamp(14px, 2vw, 32px);
  /* Indented so the title clears the corner logo, as on the live site
     (rule lands at x=280 on a 1440 viewport). */
  margin-left: clamp(0px, 15.6vw, 225px);
}

.band--center { text-align: center; padding-bottom: clamp(24px, 4vw, 56px); }
.band--center .display { font-size: clamp(3.25rem, 11vw, 9.5rem); }

.rule { border: 0; height: 7px; background: var(--ink); margin: 18px 0 0; }
.rule--wide { margin: 10px auto 0; max-width: 72%; }

.band__note { padding-bottom: 10px; }
.band__note p { margin: 0 0 8px; }
.band__note-head { font-weight: 800; }

.cities {
  display: flex;
  justify-content: space-between;
  list-style: none;
  margin: clamp(22px, 4vw, 44px) 0 0;
  padding: 0;
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(1.25rem, 2.4vw, 1.9rem);
  text-transform: uppercase;
  gap: 16px;
  flex-wrap: wrap;
}

/* ---------------------------------------------------------------- grid */

.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;                      /* tiles butt against each other */
  list-style: none;
  margin: 0;
  padding: 0 var(--inset);     /* but the block is inset from the page edge */
}

.tile { position: relative; min-width: 0; }

.tile__link { display: block; text-decoration: none; position: relative; }

.tile__media { display: block; aspect-ratio: 16 / 9; overflow: hidden; background: #111; }
.tile__media img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.4s ease, opacity 0.25s ease;
}

.tile__meta {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 18px 20px;
  color: #fff;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.82) 0%, rgba(0, 0, 0, 0.35) 45%, rgba(0, 0, 0, 0) 75%);
  opacity: 0;
  transition: opacity 0.22s ease;
}

.tile__link:hover .tile__meta,
.tile__link:focus-visible .tile__meta { opacity: 1; }
.tile__link:hover .tile__media img { transform: scale(1.04); }

.tile__title {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(1.4rem, 2.2vw, 2rem);
  line-height: 1;
  text-transform: uppercase;
}

.credits { margin: 8px 0 0; font-size: 0.8125rem; line-height: 1.5; }
.credits .cr b { font-weight: 800; }

/* Touch devices get no hover, so the caption always shows. */
@media (hover: none) {
  .tile__meta { opacity: 1; }
}

/* Work page: flat colour overlay cycling red / black / white. */
.grid--flush .tile:nth-child(3n+1) .tile__meta { background: rgba(206, 62, 62, 0.8); color: #fff; }
.grid--flush .tile:nth-child(3n+2) .tile__meta { background: rgba(0, 0, 0, 0.8); color: #fff; }
.grid--flush .tile:nth-child(3n+3) .tile__meta { background: rgba(255, 255, 255, 0.8); color: var(--ink); }

/* On touch screens the caption is always on, so a flat colour would cover
   the whole image; keep the dark gradient there. */
@media (hover: none) {
  .grid--flush .tile:nth-child(n) .tile__meta {
    background: linear-gradient(to top, rgba(0, 0, 0, 0.82) 0%, rgba(0, 0, 0, 0.35) 45%, rgba(0, 0, 0, 0) 75%);
    color: #fff;
  }
}

/* --------------------------------------------------------------- about */

.about { padding: 0 0 clamp(40px, 6vw, 80px); }

.about__wrap {
  max-width: none;
  margin: 0 auto;
  padding: clamp(60px, 7vw, 86px) var(--inset) 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(24px, 4vw, 56px);
  align-items: start;
}

.carousel { position: relative; }
.carousel__track { list-style: none; margin: 0; padding: 0; }
/* Source frames are 900x1070; the live site shows them at their natural
   ratio rather than cropping to a square. */
.carousel__track img { width: 100%; height: auto; aspect-ratio: 900 / 1070; object-fit: cover; border-radius: 2px; }

.carousel__dots {
  display: flex;
  gap: 9px;
  justify-content: center;
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
}
.dot {
  width: 9px; height: 9px; border-radius: 50%;
  border: 0; padding: 0; cursor: pointer;
  background: #c9c9c9;
  transition: background-color 0.15s ease;
}
.dot.is-on { background: var(--ink); }

.about__text .display { font-size: clamp(3.5rem, 9vw, 7.5rem); }
.lead { font-weight: 800; margin: 20px 0 16px; font-size: 1.0625rem; }
.about__text p { margin: 0 0 16px; max-width: 46ch; }
.pillars { font-weight: 800; display: flex; gap: clamp(14px, 4vw, 54px); flex-wrap: wrap; }

/* ------------------------------------------------------------- contact */

.contact-body {
  max-width: none;
  margin: 0 auto;
  padding: clamp(28px, 4vw, 52px) var(--inset) clamp(40px, 6vw, 80px);
}

.cards { list-style: none; margin: 0; padding: 0; display: grid; gap: 34px 28px; }
.cards--staff { grid-template-columns: repeat(3, 1fr); max-width: 1100px; margin-left: auto; margin-right: auto; }
.cards--reps { grid-template-columns: repeat(4, 1fr); max-width: 1100px; margin-left: auto; margin-right: auto; margin-top: clamp(34px, 5vw, 62px); }
.card { text-align: center; }

.card__name {
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.5rem;
  text-transform: uppercase;
  margin: 0 0 2px;
  line-height: 1.05;
}
.card__role { margin: 0 0 4px; }
.card__line { margin: 0 0 2px; display: flex; gap: 7px; align-items: baseline; justify-content: center; }
.card__line--plain { padding-left: 0; }
.card__line a { text-decoration: none; }
.card__line a:hover { text-decoration: underline; }
.ic { color: var(--muted); font-size: 0.9em; }

/* -------------------------------------------------------------- footer */

.site-foot { background: var(--red); padding: 18px 16px; }

.social {
  display: flex;
  justify-content: center;
  gap: 14px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.social a {
  display: grid;
  place-items: center;
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--ink);
  color: #fff;
  transition: opacity 0.15s ease;
}
.social a:hover { opacity: 0.75; }
.social svg { width: 16px; height: 16px; fill: currentColor; }

/* ------------------------------------------------------------ lightbox */

dialog.lb {
  padding: 0;
  border: 0;
  background: transparent;
  max-width: none;
  width: min(80vw, 1100px, calc(70vh * 16 / 9));
  overflow: visible;
}
@media (max-width: 680px) {
  dialog.lb { width: 92vw; }
}
dialog.lb::backdrop { background: rgba(0, 0, 0, 0.92); }
.lb__frame { position: relative; aspect-ratio: 16 / 9; background: #000; }
.lb__frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.lb__close {
  position: absolute;
  top: 12px; right: 12px;
  z-index: 2;
  width: 48px; height: 48px;
  display: grid; place-items: center;
  appearance: none; border: 0; border-radius: 50%;
  background: #fff;
  color: #000; font-size: 32px; font-weight: 800; line-height: 1;
  cursor: pointer; padding: 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.45);
  transition: background-color 0.15s ease, color 0.15s ease;
}
.lb__close:hover, .lb__close:focus-visible {
  background: var(--red);
  color: #fff;
}
.lb__close:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
@media (max-width: 680px) {
  .lb__close { top: 12px; right: 12px; width: 44px; height: 44px; }
}

/* ---------------------------------------------------------- responsive */

@media (max-width: 1024px) {
  .display--rule-left { margin-left: 0; }
  .grid { grid-template-columns: repeat(2, 1fr); }
  .cards--reps { grid-template-columns: repeat(2, 1fr); }
  .band__inner--split { grid-template-columns: 1fr; gap: 22px; align-items: start; }
}

@media (max-width: 680px) {
  .grid { grid-template-columns: 1fr; }
  .cards--staff, .cards--reps { grid-template-columns: 1fr; }
  .about__wrap { grid-template-columns: 1fr; }
  .cities { justify-content: flex-start; gap: 10px 22px; }
  .rule--wide { max-width: 100%; }
  .burger__bars { width: 36px; }
  .burger__bars i { height: 5px; margin: 5px 0; }
}

@media (prefers-reduced-motion: reduce) {
  .tile__media img, .tile__meta, .menu, .burger__bars i, .social a, .dot { transition: none; }
  .tile__link:hover .tile__media img { transform: none; }
  /* The hero stays — site.js pauses it on the first frame rather than hiding it. */
}
