/* =========================================================
   Rob Watt Films — core stylesheet
   Minimal, image-first layout. Edit the tokens below to
   change colours and type across the whole site.
   ========================================================= */

:root {
  --bg: #ffffff;
  --ink: #111111;
  --muted: #8a8a8a;
  --line: #e6e6e6;
  --overlay: rgba(255, 255, 255, 0.97);
  --tile-bg: #eeeeee;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --gutter: clamp(16px, 3vw, 40px);
  --gap: clamp(8px, 1.2vw, 16px);
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.6;
  letter-spacing: 0.02em;
  text-transform: lowercase;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
a:hover { color: var(--muted); }
img { display: block; max-width: 100%; height: auto; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px var(--gutter);
  background: var(--bg);
}

.logo {
  margin: 0;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1;
}

.logo a { text-transform: uppercase; }

.nav ul {
  display: flex;
  gap: 28px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav a[aria-current="page"] { color: var(--muted); }

.menu-toggle {
  display: none;
  background: none;
  border: 0;
  padding: 4px;
  font: inherit;
  color: inherit;
  cursor: pointer;
}

/* ---------- Main ---------- */
main { padding: 8px var(--gutter) 64px; }

.page-intro {
  max-width: 620px;
  margin: 0 0 32px;
  color: var(--muted);
}

/* ---------- Landing page ---------- */
.landing { display: grid; gap: clamp(24px, 4vw, 48px); }

.landing-media img,
.landing-media video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  max-height: calc(100vh - 180px);
  object-fit: cover;
  background: #000;
}

/* ---------- Single video page ---------- */
.watch { max-width: 1200px; }

.watch-video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  max-height: calc(100vh - 220px);
  background: #000;
}

.watch h1 { font-size: 17px; margin: 20px 0 2px; }
.watch-credit { margin: 0; color: var(--muted); }
.watch-desc { max-width: 620px; margin: 16px 0 0; }

.watch-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  margin-top: 40px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  color: var(--muted);
}
.watch-nav a:hover { color: var(--ink); }

/* ---------- Film posters ---------- */
.posters {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--gap);
  margin: 0;
  padding: 0;
  list-style: none;
}

.posters img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 987 / 1500; /* every poster matches Heavyweight's shape */
  object-fit: cover;
  background: var(--tile-bg);
}

.poster-title { margin: 8px 0 0; }

.posters a { display: block; }
.posters a img { transition: opacity 0.35s ease; }
.posters a:hover img { opacity: 0.85; }

@media (max-width: 640px) {
  .posters { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- Work grid ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--gap);
  margin: 0;
  padding: 0;
  list-style: none;
}

.tile {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: var(--tile-bg);
  cursor: pointer;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  font: inherit;
  color: inherit;
  text-align: left;
}

.tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.35s ease;
}

.tile .tile-title {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  font-weight: 700;
  text-align: center;
  opacity: 0;
  transition: opacity 0.35s ease;
}

.tile:hover img, .tile:focus-visible img { opacity: 0.08; }
.tile:hover .tile-title, .tile:focus-visible .tile-title { opacity: 1; }
.tile:focus-visible { outline: 1px solid var(--ink); outline-offset: 2px; }

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 64px var(--gutter) 40px;
  background: var(--overlay);
}

.lightbox.is-open { display: flex; }

.lightbox-frame {
  width: min(1200px, 100%);
  aspect-ratio: 16 / 9;
  max-height: 72vh;
  background: #000;
}

.lightbox-frame iframe,
.lightbox-frame video { width: 100%; height: 100%; border: 0; display: block; }

.lightbox-meta {
  width: min(1200px, 100%);
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 16px;
}

.lightbox-title { margin: 0; font-size: 14px; font-weight: 700; }
.lightbox-credit { margin: 2px 0 0; color: var(--muted); }

.lightbox-controls { display: flex; gap: 16px; white-space: nowrap; }

.lightbox button {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  color: inherit;
  cursor: pointer;
}

.lightbox button:hover { color: var(--muted); }

.lightbox-close {
  position: absolute;
  top: 20px;
  right: var(--gutter);
  font-size: 28px !important;
  line-height: 1;
}

/* ---------- Text pages (about, journal) ---------- */
.prose {
  max-width: 640px;
  font-size: 15px;
  line-height: 1.75;
  text-transform: none;
}

.prose h1, .prose h2, .prose h3 {
  text-transform: lowercase;
  font-weight: 700;
  line-height: 1.25;
}

.prose h1 { font-size: 22px; margin: 0 0 24px; }
.prose h2 { font-size: 17px; margin: 40px 0 12px; }
.prose a { text-decoration: underline; text-underline-offset: 3px; }
.prose img { margin: 24px 0; }
.post-figure { margin: 32px 0; }
.post-figure img { display: block; width: auto; max-width: 100%; max-height: 80vh; margin: 0; }
.post-figure figcaption { margin-top: 8px; font-size: 13px; color: var(--muted); }
.post-gallery { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; align-items: start; margin: 32px 0; }
.post-gallery--single { grid-template-columns: 1fr; }
.post-gallery .post-figure { margin: 0; }
.post-gallery:not(.post-gallery--single) .post-figure img { width: 100%; height: auto; max-height: none; }
@media (max-width: 520px) { .post-gallery { grid-template-columns: 1fr; } }
.video-embed { aspect-ratio: 16 / 9; margin: 24px 0; background: #000; }
.video-embed iframe { display: block; width: 100%; height: 100%; border: 0; }

.about-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
  gap: clamp(24px, 5vw, 72px);
  align-items: start;
}

.about-photo { display: grid; gap: var(--gap); }
.about-photo img { display: block; width: 100%; height: auto; }

.meta-list { margin: 32px 0 0; padding: 0; list-style: none; }
.meta-list li {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  gap: 0 8px;
  padding: 8px 0;
  border-top: 1px solid var(--line);
}
.meta-list span { color: var(--muted); }
.meta-list a { overflow-wrap: anywhere; }

/* Client logos */
.clients {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  align-items: center;
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
}
.clients li { display: flex; align-items: center; justify-content: center; height: 48px; }
.prose .clients img {
  width: auto;
  height: 28px;
  max-width: 100%;
  margin: 0;
  object-fit: contain;
  filter: brightness(0);
  opacity: 0.55;
}
/* even out the visual weight of tall vs. wide logos */
.prose .clients img[src*="amblin"],
.prose .clients img[src*="hbo-max"],
.prose .clients img[src*="caa-sports"],
.prose .clients img[src*="lbi-entertainment"] { height: 40px; }
.prose .clients img[src*="subaru"],
.prose .clients img[src*="boot-barn"] { height: 20px; }

/* Journal list */
.post-list { margin: 0; padding: 0; list-style: none; max-width: 760px; }
.post-list li { border-top: 1px solid var(--line); }
.post-list a { display: grid; grid-template-columns: 120px 1fr; gap: 16px; padding: 20px 0; }
.post-list time { color: var(--muted); }
.post-list h2 { margin: 0 0 4px; font-size: 15px; font-weight: 700; }
.post-list p { margin: 0; color: var(--muted); text-transform: none; }

.post-meta { color: var(--muted); margin: -12px 0 32px; text-transform: lowercase; }
.post-dek { margin: -16px 0 32px; color: var(--muted); font-size: 16px; line-height: 1.6; }

/* FAQ blocks (helps answer engines) */
.faq dt { font-weight: 700; margin-top: 20px; }
.faq dd { margin: 4px 0 0; }

/* ---------- Footer ---------- */
.site-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  padding: 24px var(--gutter) 40px;
  color: var(--muted);
}

.site-footer ul { display: flex; align-items: center; gap: 18px; margin: 0; padding: 0; list-style: none; }
.site-footer ul a { display: block; line-height: 0; transition: color 0.2s ease; }
.site-footer ul a:hover { color: var(--ink); }
.site-footer ul svg { display: block; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .grid { grid-template-columns: repeat(2, 1fr); }
  .about-layout { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  /* keep the menu/close button above the full-screen menu panel */
  .menu-toggle { display: block; position: relative; z-index: 70; }

  .nav {
    position: fixed;
    inset: 0;
    z-index: 60;
    display: none;
    align-items: center;
    justify-content: center;
    background: var(--overlay);
  }

  .nav.is-open { display: flex; }
  .nav ul { flex-direction: column; align-items: center; gap: 24px; font-size: 20px; }

  .grid { grid-template-columns: 1fr; }

  /* no hover on touch: show titles under the image instead */
  .tile { aspect-ratio: auto; background: none; }
  .tile img { aspect-ratio: 16 / 9; }
  .tile .tile-title { position: static; opacity: 1; justify-content: flex-start; padding: 8px 0 4px; }
  .tile:hover img { opacity: 1; }

  .post-list a { grid-template-columns: 1fr; gap: 4px; }
  .lightbox-meta { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}


/* ---------- Forum ---------- */
.forum { max-width: 1100px; }

.forum-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  padding-bottom: 12px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
}
.forum-bar a:hover { color: var(--ink); }
.forum-bar-links { display: flex; gap: 20px; }
.forum-crumbs span[aria-hidden] { margin: 0 6px; }

.forum-title { font-size: 22px; margin: 0 0 24px; }
.forum-muted { color: var(--muted); }

.forum-msg { color: var(--muted); }
.forum-msg--error { color: #b3261e; }

.forum-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--bg);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.forum-avatar--lg { width: 64px; height: 64px; font-size: 22px; }

/* Member-written text keeps its own capitals (the rest of the site is lowercase) */
.forum-title,
.forum-cat-name,
.forum-cat-desc,
.forum-list-title,
.forum-list-excerpt,
.forum-post-body { text-transform: none; }

.forum-button {
  display: inline-block;
  padding: 8px 16px;
  background: var(--ink);
  color: var(--bg);
  white-space: nowrap;
}
.forum-button:hover { opacity: 0.85; }

.forum-search { display: flex; gap: 8px; max-width: 420px; margin: 0 0 32px; }
.forum-search input {
  flex: 1 1 auto;
  min-width: 0;
  padding: 8px 10px;
  font: inherit;
  color: var(--ink);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 0;
}
.forum-search input:focus { outline: none; border-color: var(--ink); }
.forum-search button {
  padding: 8px 14px;
  font: inherit;
  text-transform: lowercase;
  color: var(--ink);
  background: none;
  border: 1px solid var(--ink);
  border-radius: 0;
  cursor: pointer;
}

/* Category + topic tables */
.forum-table { width: 100%; border-collapse: collapse; }
.forum-table th {
  padding: 8px 12px 8px 0;
  font-weight: 400;
  text-align: left;
  color: var(--muted);
  border-bottom: 1px solid var(--ink);
}
.forum-table td { padding: 14px 12px 14px 0; vertical-align: top; border-bottom: 1px solid var(--line); }
.forum-table .forum-num { width: 80px; text-align: right; padding-right: 24px; }
.forum-table .forum-last,
.forum-table .forum-by { width: 160px; color: var(--muted); }
.forum-table td.forum-last a,
.forum-table td.forum-by a { color: var(--ink); }
.forum-cat-name { font-weight: 700; }
.forum-cat-name:hover { text-decoration: underline; text-underline-offset: 3px; }
.forum-cat-desc { margin: 4px 0 0; color: var(--muted); }
tr.is-pinned td { background: #fafafa; }

.forum-flag {
  display: inline-block;
  margin-right: 8px;
  padding: 0 6px;
  font-size: 12px;
  color: var(--muted);
  border: 1px solid var(--line);
}
.forum-flags { margin: -12px 0 24px; }

.forum-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px 24px;
  margin-bottom: 24px;
}
.forum-head .forum-cat-desc { margin: 0; }
.forum-empty { padding: 24px 0; }

/* Recent topics / replies under the index */
.forum-recent { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; margin-top: 56px; }
.forum-recent h2 { font-size: 15px; margin: 0 0 12px; padding-bottom: 8px; border-bottom: 1px solid var(--ink); }
.forum-list { margin: 0; padding: 0; list-style: none; }
.forum-list li { padding: 12px 0; border-bottom: 1px solid var(--line); }
.forum-list-title { display: block; font-weight: 700; }
.forum-list-title:hover { text-decoration: underline; text-underline-offset: 3px; }
.forum-list-excerpt { display: block; margin-top: 2px; }
.forum-list-meta { display: block; margin-top: 2px; color: var(--muted); }
.forum-list-meta a { color: var(--ink); }
.forum-user:hover { text-decoration: underline; text-underline-offset: 3px; }

/* Posts */
.forum-post { max-width: 760px; padding: 24px 0; border-bottom: 1px solid var(--line); }
.forum-post--op { padding-top: 0; }
.forum-post-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.forum-post-meta { color: var(--muted); }
.forum-post-meta .forum-user { color: var(--ink); font-weight: 700; }
.forum-permalink:hover { color: var(--ink); }
.forum-post-body { font-size: 15px; line-height: 1.7; overflow-wrap: anywhere; }
.forum-post-body p { margin: 0 0 12px; }
.forum-post-body p:last-child { margin-bottom: 0; }
.forum-post-body a { text-decoration: underline; text-underline-offset: 3px; }
.forum-post:target { background: #fafafa; }
.forum-replies-head { font-size: 15px; margin: 40px 0 0; padding-bottom: 8px; border-bottom: 1px solid var(--ink); }
.forum-locked { margin-top: 32px; }

.forum-pager { display: flex; justify-content: space-between; gap: 16px; max-width: 760px; margin-top: 24px; color: var(--muted); }
.forum-pager a { color: var(--ink); }

/* Accounts: tabs, forms, profile */
.forum-tabs { display: flex; flex-wrap: wrap; gap: 4px 24px; margin-bottom: 24px; border-bottom: 1px solid var(--line); }
.forum-tabs button {
  padding: 0 0 10px;
  margin-bottom: -1px;
  font: inherit;
  text-transform: lowercase;
  color: var(--muted);
  background: none;
  border: 0;
  border-bottom: 2px solid transparent;
  cursor: pointer;
}
.forum-tabs button[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--ink); }

.forum-form { display: grid; gap: 6px; max-width: 420px; }
.forum-form h2 { font-size: 15px; margin: 0 0 8px; }
.forum-form label { margin-top: 10px; }
.forum-form input[type="email"],
.forum-form input[type="password"],
.forum-form input[type="text"],
.forum-form textarea {
  width: 100%;
  padding: 10px 12px;
  font: inherit;
  text-transform: none;
  color: var(--ink);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 0;
}
.forum-form textarea { resize: vertical; line-height: 1.6; }
.forum-form input:focus,
.forum-form textarea:focus { outline: none; border-color: var(--ink); }
.forum-check { display: flex; gap: 10px; align-items: flex-start; }
.forum-check input { margin-top: 4px; }
.forum-check a,
.forum-help a { text-decoration: underline; text-underline-offset: 3px; }
.forum-captcha { margin-top: 12px; min-height: 65px; }
.forum-form-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.forum-form .forum-button { font: inherit; text-transform: lowercase; border: 1px solid var(--ink); border-radius: 0; cursor: pointer; }
.forum-button--quiet { background: none; color: var(--ink); }
.forum-button:disabled { opacity: 0.5; cursor: default; }
.forum-help { margin: 8px 0 0; color: var(--muted); font-size: 13px; }
.forum-counter { justify-self: end; font-size: 12px; }

.forum-msg:empty { display: none; }
.forum-msg--ok { color: #1e6b34; }
.forum-attention { color: #b3261e; }
.forum-flag--warn { color: #b3261e; border-color: #b3261e; }
.forum-notice { max-width: 640px; padding: 12px 16px; margin: 0 0 24px; background: #f6f6f6; text-transform: none; }

.forum-profile { display: flex; gap: 20px; align-items: flex-start; max-width: 760px; }
.forum-profile-name { margin: 0; text-transform: none; }
.forum-profile-joined { margin: 2px 0 0; }
.forum-profile-bio { margin-top: 12px; }
.forum-profile-form { margin-top: 40px; }

.forum-rules { margin-top: -8px; }
.forum-rules ol, .forum-rules ul { padding-left: 20px; }
.forum-rules li { margin-bottom: 8px; }

/* Posting: new topic, reply box, inline edit/report */
.forum-form--wide { max-width: 760px; }
.forum-form select {
  width: 100%;
  padding: 10px 12px;
  font: inherit;
  text-transform: none;
  color: var(--ink);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 0;
}
.forum-form select:focus { outline: none; border-color: var(--ink); }
.forum-post-actions { margin-top: 12px; color: var(--muted); }
.forum-linkbutton {
  padding: 0;
  font: inherit;
  text-transform: lowercase;
  color: var(--muted);
  background: none;
  border: 0;
  cursor: pointer;
}
.forum-linkbutton:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.forum-edit, .forum-report { margin-top: 12px; }
.forum-reply { max-width: 760px; margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--ink); }
.forum-gate a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }

/* Moderation */
.forum-mod-actions { margin-left: 16px; }
.forum-mod-label { color: #b3261e; }
.forum-mod-tools { margin-top: 24px; color: var(--muted); }
.forum-tabs--links a { padding: 0 0 10px; margin-bottom: -1px; color: var(--muted); border-bottom: 2px solid transparent; }
.forum-tabs--links a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--ink); }
.forum-reports { max-width: 760px; }
.forum-report-card { padding: 20px 0; border-bottom: 1px solid var(--line); }
.forum-report-card .forum-list-meta { margin: 0; }
.forum-report-reason { margin: 8px 0; font-weight: 700; text-transform: none; }
.forum-report-quote { margin: 0; padding: 8px 0 8px 14px; border-left: 2px solid var(--line); color: var(--muted); text-transform: none; }
.forum-report-quote strong { display: block; color: var(--ink); }
.forum-move { margin-top: 12px; }

/* Search */
.forum-search-results { max-width: 760px; }
.forum-search-results mark { background: #fff2a8; color: inherit; padding: 0 1px; }
.forum-search-tips ul { padding-left: 20px; }
.forum-search-tips code { font-size: 13px; padding: 1px 4px; background: #f3f3f3; text-transform: none; }

/* Plain thread pages (forum/t/) */
.forum-join { max-width: 760px; margin-top: 32px; display: grid; gap: 10px; justify-items: start; }
.forum-join .forum-muted a { text-decoration: underline; text-underline-offset: 3px; }
.forum-archive { max-width: 760px; margin-top: 32px; }
.forum-archive h2 { font-size: 15px; margin: 0 0 4px; padding-bottom: 8px; border-bottom: 1px solid var(--ink); text-transform: none; }
.forum-archive-link { margin-top: 40px; color: var(--muted); }
.forum-archive-link a { text-decoration: underline; text-underline-offset: 3px; }

@media (max-width: 720px) {
  .forum-recent { grid-template-columns: 1fr; gap: 32px; }

  /* tables become stacked rows on phones */
  .forum-table thead { display: none; }
  .forum-table, .forum-table tbody, .forum-table tr, .forum-table td { display: block; width: auto; }
  .forum-table tr { padding: 14px 0; border-bottom: 1px solid var(--line); }
  .forum-table td { padding: 0; border: 0; text-align: left; }
  .forum-table .forum-num,
  .forum-table .forum-last,
  .forum-table .forum-by { display: inline; width: auto; padding: 0; text-align: left; color: var(--muted); }
  .forum-table td[data-label]::before { content: attr(data-label) ": "; }
  .forum-table td[data-label]:not(:last-child)::after { content: " \00b7 "; }
  .forum-table td.forum-cell-main { margin-bottom: 6px; }
  .forum-table td br { display: none; }
}

