/* CypherConnect documentary on the homepage: a film band before Contact and one full-screen player.
   Matches the site's type: Geist, Geist Mono and the Inspiration script. */

/* ---------- film band ---------- */
.tp-film {
  position: relative;
  width: 100%;
  box-sizing: border-box;
  padding: 0 64px;
  margin: 72px 0 96px;
  font-family: "Geist Mono", monospace;
  -webkit-font-smoothing: antialiased;
}
.tp-film *, .tp-film *::before, .tp-film *::after { box-sizing: border-box; }

.tp-film__head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 24px;
  padding-bottom: 14px;
  margin-bottom: 24px;
  border-bottom: 1px solid rgba(36, 36, 36, .14);
  color: rgb(36, 36, 36);
}
.tp-film__label, .tp-film__hint {
  margin: 0;
  font-size: 14px;
  line-height: 18px;
  letter-spacing: .03em;
  text-transform: uppercase;
}
.tp-film__label { display: flex; align-items: center; gap: 12px; font-weight: 500; }
.tp-film__sq { width: 14px; height: 14px; background: rgb(36, 36, 36); flex: none; }
.tp-film__hint { color: rgb(140, 140, 140); font-size: 12px; }

.tp-film__screen {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 7;
  min-height: 420px;
  overflow: hidden;
  background: #0b0b0b;
  color: #fff;
  cursor: pointer;
  border: 0;
  padding: 0;
  text-align: left;
  font: inherit;
}
.tp-film__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: .55;
  filter: grayscale(.25) contrast(1.08);
  transform: scale(1.04);
  transition: opacity .6s ease, transform 1.2s cubic-bezier(.22, 1, .36, 1);
}
.tp-film__screen:hover .tp-film__bg { opacity: .72; transform: scale(1); }
/* scanlines + vignette, a nod to the hero TV */
.tp-film__screen::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    repeating-linear-gradient(to bottom, rgba(0, 0, 0, .22) 0 1px, transparent 1px 3px),
    linear-gradient(90deg, rgba(0, 0, 0, .85) 0%, rgba(0, 0, 0, .35) 55%, rgba(0, 0, 0, .1) 100%),
    linear-gradient(0deg, rgba(0, 0, 0, .7) 0%, transparent 45%);
  pointer-events: none;
}
.tp-film__copy {
  position: absolute;
  z-index: 2;
  left: 48px;
  right: 48px;
  bottom: 44px;
  display: grid;
  gap: 18px;
}
.tp-film__live {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  justify-self: start;
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: 6px 10px 5px;
  border: 1px solid rgba(255, 255, 255, .4);
}
.tp-film__live i { width: 7px; height: 7px; border-radius: 50%; background: #ff3b3b; animation: tp-film-rec 1.4s steps(1) infinite; }
@keyframes tp-film-rec { 50% { opacity: .2; } }
.tp-film__title {
  margin: 0;
  font-family: "Geist", system-ui, sans-serif;
  font-weight: 400;
  font-size: clamp(48px, 7.4vw, 120px);
  line-height: .92;
  letter-spacing: -.035em;
  text-transform: uppercase;
}
.tp-film__title .tp-film__script {
  display: block;
  font-family: "Inspiration", cursive;
  text-transform: none;
  letter-spacing: 0;
  font-size: .62em;
  line-height: .9;
  color: #ff3b3b;
  margin-top: .04em;
}
.tp-film__row { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 24px; }
.tp-film__play {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 10px 18px 10px 10px;
  background: #fff;
  color: #111;
  font-size: 14px;
  letter-spacing: .03em;
  text-transform: uppercase;
  transition: background .25s, color .25s;
}
.tp-film__play b {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #111;
  color: #fff;
  font-size: 12px;
  padding-left: 2px;
}
.tp-film__screen:hover .tp-film__play { background: #ff3b3b; color: #fff; }
.tp-film__screen:hover .tp-film__play b { background: #fff; color: #ff3b3b; }
.tp-film__meta { font-size: 12px; letter-spacing: .05em; text-transform: uppercase; color: rgba(255, 255, 255, .7); }
.tp-film__screen:focus-visible { outline: 2px dashed #ff3b3b; outline-offset: 4px; }

.tp-film__chapters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}
.tp-film__chip {
  border: 1px solid rgba(36, 36, 36, .2);
  background: rgba(255, 255, 255, .7);
  color: rgb(36, 36, 36);
  font: 11px/1 "Geist Mono", monospace;
  letter-spacing: .04em;
  text-transform: uppercase;
  padding: 8px 10px 7px;
  cursor: pointer;
  transition: background .2s, color .2s;
}
.tp-film__chip span { color: rgb(140, 140, 140); margin-right: 6px; }
.tp-film__chip:hover { background: rgb(36, 36, 36); color: #fff; }
.tp-film__chip:hover span { color: rgba(255, 255, 255, .6); }
.tp-film__chip:focus-visible { outline: 1px dashed rgb(36, 36, 36); outline-offset: 2px; }

/* reveal */
.tp-film__screen, .tp-film__chapters { opacity: 0; transform: translateY(40px); transition: opacity .8s ease, transform .9s cubic-bezier(.22, 1, .36, 1); }
.tp-film.is-in .tp-film__screen, .tp-film.is-in .tp-film__chapters { opacity: 1; transform: none; }
.tp-film.is-in .tp-film__chapters { transition-delay: .15s; }

@media (max-width: 1199px) {
  .tp-film { padding: 0 32px; }
  .tp-film__copy { left: 32px; right: 32px; bottom: 32px; }
}
@media (max-width: 809px) {
  .tp-film { padding: 0 20px; margin: 56px 0 72px; }
  .tp-film__head { flex-direction: column; gap: 4px; }
  .tp-film__screen { aspect-ratio: 4 / 5; min-height: 0; }
  .tp-film__screen::before {
    background:
      repeating-linear-gradient(to bottom, rgba(0, 0, 0, .22) 0 1px, transparent 1px 3px),
      linear-gradient(0deg, rgba(0, 0, 0, .9) 0%, rgba(0, 0, 0, .4) 55%, rgba(0, 0, 0, .15) 100%);
  }
  .tp-film__copy { left: 20px; right: 20px; bottom: 24px; gap: 14px; }
  .tp-film__title { font-size: 8.6vw; }
  .tp-film__title .tp-film__script { font-size: 1.1em; }
  .tp-film__play { font-size: 12px; }
  .tp-film__chapters { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-right: -20px; padding-right: 20px; }
  .tp-film__chapters::-webkit-scrollbar { display: none; }
  .tp-film__chip { flex: none; }
}

/* ---------- full-screen player ---------- */
.tp-player {
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(5, 5, 5, .94);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  opacity: 0;
  visibility: hidden;
  transition: opacity .35s ease, visibility 0s linear .35s;
  font-family: "Geist Mono", monospace;
}
.tp-player.is-open { opacity: 1; visibility: visible; transition: opacity .35s ease; }
.tp-player__inner { width: min(1280px, 100%); display: grid; gap: 14px; transform: scale(.97); transition: transform .5s cubic-bezier(.22, 1, .36, 1); }
.tp-player.is-open .tp-player__inner { transform: none; }
.tp-player__bar { display: flex; justify-content: space-between; align-items: center; gap: 16px; color: #fff; font-size: 12px; letter-spacing: .05em; text-transform: uppercase; }
.tp-player__bar span { color: rgba(255, 255, 255, .55); }
.tp-player__close {
  border: 1px solid rgba(255, 255, 255, .35);
  background: transparent;
  color: #fff;
  font: 12px/1 "Geist Mono", monospace;
  letter-spacing: .05em;
  text-transform: uppercase;
  padding: 9px 12px 8px;
  cursor: pointer;
}
.tp-player__close:hover { background: #fff; color: #000; }
.tp-player video { display: block; width: 100%; aspect-ratio: 16 / 9; max-height: calc(100vh - 190px); background: #000; }
.tp-player__chapters { display: flex; flex-wrap: wrap; gap: 6px; }
.tp-player__chip {
  border: 1px solid rgba(255, 255, 255, .2);
  background: transparent;
  color: rgba(255, 255, 255, .85);
  font: 11px/1 "Geist Mono", monospace;
  letter-spacing: .04em;
  text-transform: uppercase;
  padding: 8px 10px 7px;
  cursor: pointer;
}
.tp-player__chip span { color: rgba(255, 255, 255, .45); margin-right: 6px; }
.tp-player__chip:hover, .tp-player__chip.is-on { background: #fff; color: #000; }
.tp-player__chip:hover span, .tp-player__chip.is-on span { color: rgba(0, 0, 0, .5); }
@media (max-width: 809px) {
  .tp-player { padding: 12px; }
  .tp-player__chapters { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .tp-player__chapters::-webkit-scrollbar { display: none; }
  .tp-player__chip { flex: none; }
}

@media (prefers-reduced-motion: reduce) {
  .tp-film__screen, .tp-film__chapters { opacity: 1; transform: none; transition: none; }
  .tp-film__live i { animation: none; }
  .tp-film__bg { transition: none; }
}
