/* Ben Fox Media — one stylesheet for every page.
   Layout: fixed black sidebar (logo + lowercase nav) with a white rule;
   the active page is marked by a white triangle on that rule, as in the 2019 mockup. */
:root {
  --bf-mint: #A8E8C5;
  --bf-aqua: #13F1D5;
  --bf-cyan: #01D4FB;
  --bf-sand: #E6D7C1;
  --bf-lilac: #E5C8FF;
  --bf-pink: #F53A6C;
  --bg: #000;
  --fg: #fff;
  --muted: #a9a4ad;      /* grey nudged toward the lilac */
  --line: #2a272d;
  --section: var(--bf-pink); /* each page overrides this with its own logo colour */
  --display: "Jost", "Futura", "Century Gothic", system-ui, sans-serif;
  --body: "Archivo Narrow", "Helvetica Neue", Arial, sans-serif;
  --sidebar: 256px;
  color-scheme: dark;
}
/* one brand colour per page: home pink, about mint, commercial aqua, unscripted lilac, resume sand, film cyan */
body.page-about   { --section: var(--bf-mint); }
body.page-film    { --section: var(--bf-cyan); }

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--bg); }
body {
  margin: 0; background: var(--bg); color: var(--fg);
  font: 400 1.125rem/1.6 var(--body);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--section); text-underline-offset: 3px; }
a:hover { color: var(--fg); }
:focus-visible { outline: 2px solid var(--bf-aqua); outline-offset: 3px; }

.skip { position: absolute; left: -999px; top: 8px; background: var(--fg); color: var(--bg); padding: .5rem 1rem; z-index: 10; }
.skip:focus { left: 8px; }

/* ---------- Sidebar ---------- */
.sidebar {
  position: fixed; inset: 0 auto 0 0; width: var(--sidebar);
  padding: 2rem 0 2rem max(1.75rem, env(safe-area-inset-left, 0px));
  display: flex; flex-direction: column; gap: 2.5rem;
}
.sidebar::after { /* the white rule */
  content: ""; position: absolute; right: 0; top: 1.5rem; bottom: 1.5rem; width: 4px; background: var(--fg);
}
.logo { width: 150px; }
.nav { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .35rem; }
.nav a {
  position: relative; display: block; padding-block: .15rem;
  font: 700 2.1rem/1.15 var(--display); letter-spacing: -.02em;
  color: var(--fg); text-decoration: none; transition: color .15s;
}
.nav a:hover { color: var(--section); }
.nav a[aria-current="page"]::after { /* triangle sitting on the rule */
  content: ""; position: absolute; top: 50%; transform: translateY(-50%);
  right: -22px;
  border: 18px solid transparent; border-left: 22px solid var(--fg); border-right: 0;
}
.sidebar .social { margin-top: auto; display: flex; flex-wrap: wrap; gap: .25rem 1rem; font-size: .95rem; padding-right: 1.5rem; }
.sidebar .social a { color: var(--muted); text-decoration: none; }
.sidebar .social a:hover { color: var(--fg); }

/* ---------- Main column ---------- */
main {
  margin-left: var(--sidebar);
  padding-block: 4.5rem 3rem;
  padding-left: max(3.5rem, env(safe-area-inset-left, 0px));
  padding-right: max(3.5rem, env(safe-area-inset-right, 0px));
  display: grid; gap: 4rem; max-width: calc(var(--sidebar) + 1400px);
}
footer {
  margin-left: var(--sidebar); border-top: 1px solid var(--line); color: var(--muted); font-size: .9rem;
  padding-block: 1.5rem 2rem;
  padding-left: max(3.5rem, env(safe-area-inset-left, 0px));
  padding-right: max(3.5rem, env(safe-area-inset-right, 0px));
}

h1, h2, h3 { font-family: var(--display); font-weight: 700; line-height: 1.05; margin: 0; text-wrap: balance; letter-spacing: -.02em; }
h1 { font-size: clamp(2.6rem, 6vw, 4.75rem); }
h1 .mark { color: var(--section); }
h2 { font-size: clamp(1.7rem, 3vw, 2.4rem); }
h3 { font-size: 1.35rem; }
.lede { font-size: 1.35rem; max-width: 38ch; color: var(--fg); margin: 1rem 0 0; }
.eyebrow { font: 600 .8rem/1 var(--display); text-transform: uppercase; letter-spacing: .14em; color: var(--section); margin: 0 0 .9rem; }
.prose { max-width: 62ch; }
.prose p { margin: 0 0 1em; }
.muted { color: var(--muted); }
.todo { color: var(--muted); font-style: italic; } /* placeholder copy Ben replaces */

/* ---------- Reel frame (white outline, as in the mockup) ---------- */
.frame { border: 3px solid var(--fg); padding: clamp(8px, 1.2vw, 16px); max-width: 100%; }
.reel { position: relative; aspect-ratio: 16 / 9; width: 100%; max-width: 100%; background: #000 center/cover no-repeat; }
.reel iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.reel-caption { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem 2rem; margin-top: 1rem; color: var(--muted); font-size: .95rem; }

/* ---------- Section links on home ---------- */
.doors { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1.25rem; }
.door {
  display: grid; gap: .5rem; padding: 1.5rem 1.5rem 1.75rem; text-decoration: none; color: var(--fg);
  border-top: 6px solid var(--c); background: #0d0c0e; transition: transform .2s, background .2s;
}
.door:hover { color: var(--fg); background: #17151a; transform: translateY(-3px); }
.door h3 { color: var(--c); font-size: 2rem; }
.door p { margin: 0; color: var(--muted); }

/* ---------- Work grids ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1.5rem; }
.card { display: grid; gap: .6rem; align-content: start; color: var(--fg); text-decoration: none; min-width: 0; }
.card:hover h3 { color: var(--section); }
.card p { margin: 0; color: var(--muted); font-size: 1rem; }
.meta { font: 600 .75rem/1 var(--display); letter-spacing: .12em; text-transform: uppercase; color: var(--section); }
.ph { /* stand-in for an image Ben will supply */
  aspect-ratio: var(--ratio, 16 / 9); max-width: 100%; display: grid; place-items: center;
  background: repeating-linear-gradient(135deg, #111 0 12px, #0b0b0b 12px 24px);
  border: 1px dashed #3a363e; color: #6f6a74; font: 600 .8rem/1 var(--display); letter-spacing: .12em; text-transform: uppercase;
}
.photos { columns: 3 240px; column-gap: 1rem; }
.photos .ph { margin: 0 0 1rem; break-inside: avoid; }

.list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.list li { border-bottom: 1px solid var(--line); }
.list a { display: grid; grid-template-columns: 7rem 1fr auto; gap: 1.5rem; align-items: baseline; padding: 1.25rem 0; color: var(--fg); text-decoration: none; }
.list a:hover h3 { color: var(--section); }
.list time { color: var(--muted); font-variant-numeric: tabular-nums; font-size: .95rem; }
.list .out { color: var(--muted); font-size: .9rem; }
.list p { margin: .3rem 0 0; color: var(--muted); font-size: 1rem; }

.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); gap: 3rem; align-items: start; }
.facts { display: grid; gap: 1.25rem; margin: 0; }
.facts dt { font: 600 .75rem/1 var(--display); letter-spacing: .12em; text-transform: uppercase; color: var(--section); }
.facts dd { margin: .35rem 0 0; }
.button { display: inline-block; padding: .75rem 1.4rem; border: 2px solid var(--fg); color: var(--fg); text-decoration: none; font: 600 1rem/1 var(--display); letter-spacing: .04em; }
.button:hover { background: var(--fg); color: var(--bg); }

/* ---------- Phones and small tablets ---------- */
@media (max-width: 860px) {
  :root { --sidebar: 0px; }
  .sidebar {
    position: static; width: auto; flex-direction: row; align-items: center; gap: 1.25rem;
    padding-block: 1rem 0;
    padding-left: max(16px, env(safe-area-inset-left, 0px));
    padding-right: max(16px, env(safe-area-inset-right, 0px));
    border-bottom: 3px solid var(--fg); flex-wrap: wrap;
  }
  .sidebar::after, .sidebar .social { display: none; }
  .sidebar { flex-direction: column; justify-content: center; gap: 1rem; }
  .logo { width: 64px; display: block; }
  .nav { display: grid; grid-template-columns: repeat(3, 1fr); gap: .1rem 0; width: 100%; text-align: center; }
  .nav a { font-size: clamp(1.1rem, 5.2vw, 1.45rem); padding-bottom: 1rem; }
  .nav a[aria-current="page"]::after {
    top: auto; bottom: 0; right: auto; left: 50%; transform: translateX(-50%);
    border: 9px solid transparent; border-bottom: 11px solid var(--fg); border-top: 0;
  }
  main, footer { padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
  main { padding-block: 2.5rem 2rem; gap: 3rem; }
  .split { grid-template-columns: 1fr; }
  .list a { grid-template-columns: 1fr; gap: .25rem; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* ---------- Brand dot motif (five-dot X, colours rotating) ---------- */
.dots { height: 40px; max-width: 100%; background: url("assets/dots.svg") left center / 80px 40px repeat-x; }
footer .dots { height: 24px; background-size: 48px 24px; margin-bottom: 1rem; width: 336px; }
.dots--short { width: 160px; margin-top: 1rem; }
.portrait { max-width: 440px; }
.dots--portrait { width: 100%; margin-top: 1rem; background-repeat: space no-repeat; background-position: center; }
.intro { display: grid; gap: 0; }
.intro::before { content: ""; display: block; width: 160px; max-width: 100%; height: 40px; margin-bottom: 1.5rem;
  background: url("assets/dots.svg") left center / 80px 40px repeat-x; }
.portrait { margin: 0; }
.portrait img { width: 100%; max-width: 440px; aspect-ratio: 1; object-fit: cover; border: 3px solid var(--fg); padding: 10px; background: var(--bg); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Brands page ---------- */
body.page-brands, body.page-commercial { --section: var(--bf-aqua); }
.brand-wall { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.brand-wall li { flex: 0 1 calc((100% - 5 * 12px) / 6); min-width: 0; }
.brand-wall .cell { position: relative; height: 100%; display: grid; place-items: center; align-content: center; gap: .9rem; min-height: 160px; padding: 2rem 1rem 1.4rem; border: 1px solid var(--line); transition: background .2s, border-color .2s; }
.brand-wall .cell::before { content: ""; position: absolute; top: 12px; left: 12px; width: 9px; height: 9px; border-radius: 50%; background: var(--dot); }
.brand-wall li:nth-child(6n+1) { --dot: var(--bf-pink); }  .brand-wall li:nth-child(6n+2) { --dot: var(--bf-lilac); }
.brand-wall li:nth-child(6n+3) { --dot: var(--bf-cyan); }  .brand-wall li:nth-child(6n+4) { --dot: var(--bf-mint); }
.brand-wall li:nth-child(6n+5) { --dot: var(--bf-sand); }  .brand-wall li:nth-child(6n+6) { --dot: var(--bf-aqua); }
.brand-wall .cell:hover { background: #0d0c0e; border-color: var(--dot); }
.brand-logo { height: 46px; width: auto; max-width: 75%; object-fit: contain; filter: brightness(0) invert(1); opacity: .92; transition: opacity .2s, transform .2s; }
.brand-wall .cell:hover .brand-logo { opacity: 1; transform: scale(1.04); }
.brand-name { font: 700 1.6rem/1.05 var(--display); letter-spacing: -.02em; text-align: center; text-wrap: balance; }
.brand-wall .cell:hover .brand-name { color: var(--dot); }
.brand-wall .meta { color: var(--muted); text-align: center; }
@media (max-width: 1200px) { .brand-wall li { flex-basis: calc((100% - 3 * 12px) / 4); } }
@media (max-width: 860px) { .brand-wall { gap: 8px; } .brand-wall li { flex-basis: calc((100% - 8px) / 2); } .brand-wall .cell { min-height: 130px; } .brand-logo { height: 38px; } .brand-name { font-size: 1.3rem; } }
.brand { display: grid; gap: 1.5rem; scroll-margin-top: 2rem; }
.brand-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: .5rem 1.25rem; border-top: 3px solid var(--fg); padding-top: 1rem; }
.brand-head p { margin: 0; }

body.page-unscripted { --section: var(--bf-lilac); }
.small { font-size: .95rem; margin-top: 1.5rem; }

/* ---------- About: services + contact ---------- */
.services { display: grid; gap: 2rem; }
.service-grid { margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1.25rem; }
.service-grid > div { padding: 1.4rem 1.4rem 1.6rem; border-top: 3px solid var(--section); background: #0d0c0e; min-width: 0; }
.service-grid dt { font: 700 1.35rem/1.1 var(--display); letter-spacing: -.01em; }
.service-grid dd { margin: .6rem 0 0; color: var(--muted); font-size: 1rem; }
.service-grid > div:nth-child(2) { border-color: var(--bf-cyan); }
.service-grid > div:nth-child(3) { border-color: var(--bf-lilac); }
.service-grid > div:nth-child(4) { border-color: var(--bf-sand); }
.contact-band { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.25rem 2rem; padding-block: 2rem; border-block: 1px solid var(--line); }
.contact-band p { margin: 0; display: flex; flex-wrap: wrap; gap: .75rem; }
.button--ghost { border-color: var(--line); color: var(--muted); }
.button--ghost:hover { border-color: var(--fg); }
.ph.thumb { position: relative; overflow: hidden; background: repeating-linear-gradient(135deg, #111 0 12px, #0b0b0b 12px 24px); }
.ph.thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ph.thumb .play-badge { position: relative; }
.reel-facade { display: grid; place-items: center; cursor: pointer; text-decoration: none; }
.reel-facade:hover .play-badge { border-left-color: var(--section); }
.reel-facade .play-badge { border-top-width: 30px; border-bottom-width: 30px; border-left-width: 50px; }
.play-badge { width: 0; height: 0; border-top: 18px solid transparent; border-bottom: 18px solid transparent; border-left: 30px solid var(--fg); filter: drop-shadow(0 2px 6px rgba(0,0,0,.6)); transition: border-left-color .2s; }
.card:hover .play-badge { border-left-color: var(--section); }
.grid--2 { grid-template-columns: repeat(auto-fill, minmax(min(100%, 380px), 1fr)); }
.card-links { margin: -.1rem 0 0; font-size: .95rem; color: var(--muted); grid-column: auto; }
.card-wrap { display: grid; gap: .5rem; align-content: start; min-width: 0; }

/* ---------- Home: section tiles ---------- */
.tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem; }
.tile { display: grid; gap: .8rem; color: var(--fg); text-decoration: none; min-width: 0; }
.tile .ph { border-bottom: 6px solid var(--c); transition: filter .2s, transform .2s; }
.tile h3 { font-size: 2rem; transition: color .2s; }
.tile:hover h3 { color: var(--c); }
.tile:hover .ph { transform: translateY(-3px); filter: brightness(1.1); }
@media (max-width: 860px) { .tiles { grid-template-columns: 1fr; } }

/* ---------- Unscripted: featured series ---------- */
.feature { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: 2rem; align-items: center; }
.feature-media { display: block; text-decoration: none; }
.feature-media .ph { border: 0; }
.feature-media .play-badge { border-top-width: 30px; border-bottom-width: 30px; border-left-width: 50px; }
.feature-media:hover .play-badge { border-left-color: var(--section); }
.feature-text { display: grid; gap: .6rem; }
.feature-text h2 { font-size: clamp(2rem, 4vw, 3.2rem); }
.feature-text p { margin: 0; color: var(--muted); }
@media (max-width: 1100px) { .feature { grid-template-columns: 1fr; } }

/* ---------- Resume ---------- */
body.page-resume { --section: var(--bf-sand); }
.resume-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 1.5rem 2rem; }
.resume-contact { margin: 0; display: flex; flex-wrap: wrap; gap: .75rem; }
.resume { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 3.5rem; align-items: start; }
.resume-h { font-size: 1rem; text-transform: uppercase; letter-spacing: .14em; color: var(--section); border-bottom: 3px solid var(--fg); padding-bottom: .6rem; margin-bottom: 1.25rem; }
.jobs { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.75rem; }
.job { display: grid; grid-template-columns: 11rem minmax(0, 1fr); gap: 1.5rem; }
.job-when { display: grid; gap: .2rem; font-size: .95rem; font-variant-numeric: tabular-nums; align-content: start; padding-top: .2rem; }
.job h3 { font-size: 1.35rem; }
.job-org { margin: .25rem 0 0; color: var(--section); font-weight: 600; }
.job ul { margin: .6rem 0 0; padding-left: 1.1rem; color: var(--muted); font-size: 1rem; display: grid; gap: .35rem; }
.resume-side { display: grid; gap: 2.25rem; }
.resume-side h3 { font-size: 1.15rem; margin-top: .4rem; }
.resume-side p { margin: .25rem 0 .9rem; color: var(--muted); font-size: 1rem; }
.plain { list-style: none; margin: 0; padding: 0; display: grid; gap: .6rem; color: var(--muted); font-size: 1rem; }
.tags { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem; }
.tags li { border: 1px solid var(--line); padding: .3rem .7rem; font-size: .9rem; color: var(--fg); }
@media (max-width: 1000px) { .resume { grid-template-columns: 1fr; } }
@media (max-width: 600px) { .job { grid-template-columns: 1fr; gap: .4rem; } .job-when { grid-auto-flow: column; justify-content: start; gap: 1rem; } }

/* ---------- Commercial: social (vertical) ---------- */
.grid--social { grid-template-columns: repeat(auto-fill, minmax(min(100%, 170px), 1fr)); }
.grid--social .ph { aspect-ratio: 9 / 16; }

/* ---------- Click-to-play video (video.js) ---------- */
.player { position: relative; aspect-ratio: 16 / 9; max-width: 100%; background: #000; }
.player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
a.is-playing { cursor: default; }

/* ---------- Home headline ---------- */
.home-title { font-size: clamp(1.8rem, 5vw, 2.4rem); margin: 0 0 1.25rem; }
@media (min-width: 861px) {
  /* headline and reel together fit one screen; headline top lines up with the logo top */
  body.page-home main { padding-top: 2rem; gap: 2.5rem; }
  body.page-home .home-title { font-size: clamp(1.4rem, 2.3vw, 2.4rem); line-height: 1; margin-top: -.12em; }
  body.page-home { --reel-w: max(420px, calc((100vh - 200px) * 16 / 9 + 38px)); }
  body.page-home .frame, body.page-home .reel-caption { max-width: var(--reel-w); }
}
@media (min-width: 1250px) { body.page-home .home-title { white-space: nowrap; } }
.home-title .mark2 { color: var(--bf-aqua); }

/* ---------- Floating contact button ---------- */
.contact-fab {
  position: fixed; z-index: 10;
  right: max(1.25rem, env(safe-area-inset-right, 0px));
  bottom: max(1.25rem, env(safe-area-inset-bottom, 0px));
  padding: .85rem 1.4rem; background: var(--section); color: #000; text-decoration: none;
  font: 700 .95rem/1 var(--display); letter-spacing: .14em; text-transform: uppercase;
  box-shadow: 0 4px 18px rgba(0, 0, 0, .55); transition: background .15s, transform .15s;
}
.contact-fab:hover { background: var(--fg); transform: translateY(-2px); }
.contact-fab:focus-visible { outline: 2px solid var(--fg); outline-offset: 3px; }
@media (max-width: 860px) { footer { padding-bottom: 5rem; } }
.grid--social .player { aspect-ratio: 9 / 16; }
.lede--wide { max-width: none; }

/* Commercial cards: thumbnail plays, title links out */
.card-title { display: grid; gap: .6rem; color: var(--fg); text-decoration: none; min-width: 0; }
.card-title:hover h3 { color: var(--section); }
.card--thumb:hover .play-badge { border-left-color: var(--section); }
/* Fullscreen button on players */
.fs-btn { position: absolute; top: 8px; right: 8px; z-index: 2; width: 34px; height: 34px; display: grid; place-items: center; padding: 0; color: #fff; background: rgba(0,0,0,.6); border: 1px solid rgba(255,255,255,.6); cursor: pointer; }
.fs-btn:hover { background: #000; border-color: #fff; }
.player:fullscreen, .reel:fullscreen { aspect-ratio: auto; width: 100%; height: 100%; }
.player:-webkit-full-screen, .reel:-webkit-full-screen { aspect-ratio: auto; width: 100%; height: 100%; }
.lede .mark { color: var(--section); }
