/* BlackTree Media — homepage. Sits in front of the live player (player.html),
   served by the same app so the whole site lives on one DigitalOcean server. */
:root {
  --bg: #000;
  --panel: #0b0b0f;
  --fg: #fff;
  --muted: #9aa0a6;
  --line: rgba(255, 255, 255, .08);
  --accent: #e50914;
  --radius: 14px;
  --maxw: 1200px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; }  /* offset sticky header on anchor jumps */
body {
  margin: 0; background: var(--bg); color: var(--fg);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding: 12px clamp(16px, 4vw, 40px);
  background: rgba(0, 0, 0, .82); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; }
.brand__logo { height: 46px; width: auto; display: block; }

.header-right { display: flex; align-items: center; gap: 10px; }
.yt-btn {
  display: inline-flex; align-items: center; gap: 7px; white-space: nowrap;
  padding: 8px 15px; border-radius: 999px; background: var(--accent); color: #fff;
  font-weight: 700; font-size: 14px; transition: transform .15s ease, filter .15s ease;
}
.yt-btn:hover { transform: translateY(-1px); filter: brightness(1.08); }
.yt-btn .yt-ico { font-size: 11px; }

.nav { display: flex; align-items: center; gap: 4px; }
.nav a {
  padding: 8px 14px; border-radius: 999px; font-size: 15px; font-weight: 600; color: var(--muted);
  transition: color .15s ease, background .15s ease;
}
.nav a:hover, .nav a.is-active { color: #fff; background: rgba(255, 255, 255, .08); }

.nav-toggle { display: none; background: none; border: 0; color: #fff; font-size: 26px; cursor: pointer; padding: 4px 8px; }

/* ---------- Site-wide poster backdrop (classic Black cinema, 1930s–today) ---------- */
.bg-collage {
  position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  grid-auto-rows: 150px; gap: 4px; opacity: .24; filter: grayscale(.2) contrast(1.05);
}
.bg-collage img { width: 100%; height: 100%; object-fit: cover; }
.bg-overlay {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background: linear-gradient(to bottom, rgba(0, 0, 0, .64), rgba(0, 0, 0, .80) 55%, rgba(0, 0, 0, .9));
}
/* real content sits above the backdrop */
.hero, .section, .site-footer { position: relative; z-index: 1; }

/* ---------- Hero ---------- */
.hero { overflow: hidden; padding: clamp(24px, 5vw, 56px) 16px clamp(16px, 3vw, 28px); }
.hero__inner { position: relative; z-index: 2; max-width: var(--maxw); margin: 0 auto; }
.hero__title {
  text-align: center; margin: 0 0 clamp(16px, 3vw, 26px);
  font-size: clamp(28px, 6vw, 56px); font-weight: 800; letter-spacing: .01em; line-height: 1.05;
}
.hero__title--below { margin: clamp(20px, 3.5vw, 34px) 0 0; }   /* tagline sits under the player */
.hero__title .flash { color: var(--accent); animation: btflash 1.4s steps(1, end) infinite; }
@keyframes btflash { 0%, 55% { opacity: 1; } 56%, 100% { opacity: .25; } }

.player-frame {
  width: 100%; border: 0; display: block; border-radius: var(--radius);
  background: #000; min-height: 460px; box-shadow: 0 20px 70px rgba(0, 0, 0, .6);
}

/* ---------- Section shell ---------- */
.section { max-width: var(--maxw); margin: 0 auto; padding: clamp(36px, 6vw, 64px) clamp(16px, 4vw, 24px); }
.section__head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.section__title { margin: 0; font-size: clamp(20px, 3.4vw, 30px); font-weight: 800; }
.section__title .accent { color: var(--accent); }
.section__sub { color: var(--muted); font-size: 14px; }

/* ---------- Movies: genre shelves (horizontal rows) ---------- */
.shelves { display: flex; flex-direction: column; gap: clamp(24px, 3.4vw, 38px); }
.shelf__title { margin: 0 0 12px; font-size: clamp(16px, 2.4vw, 21px); font-weight: 800; }
.shelf__row {
  display: flex; gap: clamp(10px, 1.4vw, 15px); overflow-x: auto; padding: 2px 2px 10px;
  scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch; scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, .22) transparent;
}
.shelf__row::-webkit-scrollbar { height: 8px; }
.shelf__row::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .16); border-radius: 4px; }
.shelf__row::-webkit-scrollbar-track { background: transparent; }

.card {
  flex: 0 0 clamp(120px, 20vw, 158px); aspect-ratio: 2 / 3; scroll-snap-align: start;
  position: relative; border-radius: 10px; overflow: hidden; background: var(--panel);
  border: 1px solid var(--line); transition: transform .18s ease, box-shadow .18s ease;
  color: inherit; text-decoration: none; display: block;
}
.card:hover { transform: translateY(-5px); box-shadow: 0 16px 36px rgba(0, 0, 0, .6); }
.card img { width: 100%; height: 100%; object-fit: cover; background: #15151b; }
.card__label {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 24px 9px 8px;
  font-size: 12px; font-weight: 600; line-height: 1.25;
  background: linear-gradient(to top, rgba(0, 0, 0, .94), rgba(0, 0, 0, 0));
}
.grid__status { color: var(--muted); font-size: 14px; padding: 20px 0; }

/* ---------- Actors Spotlight ---------- */
.actor-spot { padding: clamp(20px, 3.5vw, 30px) 0; border-top: 1px solid var(--line); }
.actor-spot:first-child { border-top: 0; padding-top: 4px; }
.actor-spot__head { display: flex; gap: clamp(16px, 3vw, 26px); align-items: flex-start; }
.actor-spot__photo {
  flex: 0 0 auto; width: clamp(96px, 16vw, 150px); aspect-ratio: 1;
  object-fit: cover; object-position: top center; border-radius: 14px;
  border: 1px solid var(--line); background: #15151b;
}
.actor-spot__name { margin: 2px 0 10px; font-size: clamp(22px, 3.2vw, 30px); font-weight: 800; }
.actor-spot__bio { margin: 0; color: #d4d7db; font-size: 15px; line-height: 1.6; max-width: 72ch; }
.actor-spot__label {
  margin: clamp(20px, 3vw, 28px) 0 12px; font-size: 13px; font-weight: 700;
  letter-spacing: .1em; text-transform: uppercase; color: var(--muted);
}
.actor-spot__label span { color: var(--accent); margin-left: 6px; }
.card .card__label .yr { color: rgba(255, 255, 255, .6); font-weight: 400; }

/* interview cards (16:9 YouTube) */
.iv-row .iv-card { flex: 0 0 clamp(230px, 34vw, 300px); }
.iv-card {
  display: block; border-radius: 10px; overflow: hidden; background: var(--panel);
  border: 1px solid var(--line); scroll-snap-align: start; color: inherit;
  transition: transform .18s ease, box-shadow .18s ease;
}
.iv-card:hover { transform: translateY(-4px); box-shadow: 0 14px 32px rgba(0, 0, 0, .55); }
.iv-card__thumb { position: relative; display: block; }
.iv-card__thumb img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: #15151b; display: block; }
.iv-card__thumb::after {
  content: "▶"; position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: 46px; height: 46px; display: grid; place-items: center; font-size: 15px; color: #fff;
  background: rgba(229, 9, 20, .92); border-radius: 50%; box-shadow: 0 4px 16px rgba(0, 0, 0, .5);
}
.iv-card__title { display: block; padding: 10px 12px 13px; font-size: 13px; font-weight: 600; line-height: 1.32; }

/* ---------- Actors: front grid of photo + name tiles ---------- */
.actor-grid {
  display: grid; gap: clamp(12px, 2vw, 18px);
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
}
.actor-tile {
  position: relative; padding: 0; cursor: pointer; aspect-ratio: 3 / 4;
  border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: #15151b;
  transition: transform .18s ease, box-shadow .18s ease;
}
.actor-tile:hover { transform: translateY(-5px); box-shadow: 0 18px 40px rgba(0, 0, 0, .6); }
.actor-tile img { width: 100%; height: 100%; object-fit: cover; object-position: top center; display: block; }
.actor-tile__name {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 30px 14px 14px; text-align: left;
  font-size: clamp(15px, 2.2vw, 18px); font-weight: 800; color: #fff;
  background: linear-gradient(to top, rgba(0, 0, 0, .94), rgba(0, 0, 0, 0));
}

/* ---------- Actor detail modal ---------- */
.actor-modal {
  position: fixed; inset: 0; z-index: 100; display: flex; justify-content: center;
  padding: clamp(10px, 4vw, 44px); overflow-y: auto;
}
.actor-modal[hidden] { display: none; }
.actor-modal__backdrop { position: fixed; inset: 0; background: rgba(0, 0, 0, .82); backdrop-filter: blur(4px); }
.actor-modal__panel {
  position: relative; z-index: 1; width: min(900px, 100%); margin: auto;
  background: #0b0b0f; border: 1px solid var(--line); border-radius: 16px;
  padding: clamp(18px, 3vw, 32px); box-shadow: 0 30px 90px rgba(0, 0, 0, .7);
}
.actor-modal__close {
  position: absolute; top: 12px; right: 12px; width: 40px; height: 40px; border-radius: 50%;
  border: 1px solid var(--line); background: rgba(0, 0, 0, .55); color: #fff; font-size: 16px; cursor: pointer; z-index: 2;
}
.actor-modal__close:hover { background: rgba(255, 255, 255, .12); }
/* inside the modal, the first head block needs no extra top padding */
.actor-modal__panel .actor-spot__head { margin-top: 4px; }

@media (max-width: 560px) {
  .actor-spot__head { flex-direction: column; align-items: center; text-align: center; }
  .actor-spot__bio { text-align: left; }
}

/* ---------- Contact ---------- */
.contact { text-align: center; padding: clamp(28px, 5vw, 48px) 20px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); }
.contact p { color: var(--muted); font-size: 16px; margin: 0 0 18px; }
.btn {
  display: inline-block; padding: 14px 26px; border-radius: 999px; font-weight: 700; font-size: 16px;
  background: var(--accent); color: #fff; transition: transform .15s ease, filter .15s ease;
}
.btn:hover { transform: translateY(-2px); filter: brightness(1.08); }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--line); margin-top: 40px; padding: 28px 16px;
  text-align: center; color: var(--muted); font-size: 13px;
}
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: #fff; }

/* ---------- Mobile ---------- */
@media (max-width: 760px) {
  .nav {
    position: absolute; top: 100%; right: 12px; left: 12px; flex-direction: column; align-items: stretch;
    gap: 2px; padding: 8px; background: #0c0c11; border: 1px solid var(--line); border-radius: 12px;
    display: none;
  }
  .nav.is-open { display: flex; }
  .nav a { padding: 12px 14px; }
  .nav-toggle { display: block; }
}
