/* Hayes Brothers Films. Newsreader headers, Inter subheads and text. */

:root {
  --ink: #0f0e0d;
  --line: #2f2c29;
  --text: #f2eee6;
  --soft: #bdb7ab;
  --serif: "Newsreader", Georgia, serif;
  --sans: "Inter", "Helvetica Neue", Arial, system-ui, sans-serif;
  --gutter: clamp(20px, 5vw, 64px);
}

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { background: var(--ink); -webkit-text-size-adjust: 100%; }
html.menu-open { overflow: hidden; }
body {
  background: var(--ink);
  color: var(--text);
  font-family: var(--sans);
  font-weight: 400;
  font-size: 1.0625rem;
  line-height: 1.65;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
ul { list-style: none; }
a { color: inherit; text-underline-offset: 3px; text-decoration-thickness: 1px; }
:focus-visible { outline: 2px solid var(--text); outline-offset: 3px; }

h1, h3 { font-family: var(--serif); font-weight: 500; line-height: 1.2; letter-spacing: -.005em; font-variant-numeric: lining-nums; }
h1 { font-size: clamp(2.25rem, 4.5vw, 3.25rem); }
h3 { font-size: 1.3125rem; }
/* Subheads: small, uppercase and tracked, like HAYES / FILMS in the logo */
h2, .bar-nav a, .foot-nav a, .press-meta, .contact dt {
  font-family: var(--sans);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .1em;
}
h2 { font-size: .9375rem; line-height: 1.4; margin-bottom: 28px; color: var(--soft); }

.wrap { width: 100%; padding-inline: var(--gutter); }
.section { padding-block: clamp(36px, 5vw, 64px); }
.page-head { padding-top: clamp(36px, 5vw, 64px); }
.page-head p { margin-top: 12px; }
.after { margin-top: 24px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: fixed; top: 8px; left: 8px; z-index: 60; background: var(--text); color: var(--ink); padding: 8px 14px; transform: translateY(-200%); }
.skip:focus { transform: none; }

/* Header: sits at the top of the page and scrolls away with it */
.bar {
  position: relative;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px var(--gutter);
  background: var(--ink);
}
.bar-logo img { width: 112px; }
.bar-nav ul { display: flex; gap: clamp(20px, 3vw, 38px); }
.bar-nav a { font-size: .8125rem; text-decoration: none; padding-block: 6px; }
.bar-nav a:hover, .bar-nav a[aria-current] { text-decoration: underline; }
.bar-toggle { display: none; width: 44px; height: 44px; background: none; border: 0; color: var(--text); position: relative; cursor: pointer; margin-right: -9px; }
.bar-toggle i { position: absolute; left: 9px; right: 9px; height: 2px; background: currentColor; transition: transform .25s; }
.bar-toggle i:first-of-type { top: 17px; }
.bar-toggle i:last-of-type { top: 26px; }
.bar-toggle[aria-expanded="true"] i:first-of-type { transform: translateY(4.5px) rotate(45deg); }
.bar-toggle[aria-expanded="true"] i:last-of-type { transform: translateY(-4.5px) rotate(-45deg); }

/* Home */
.hero { position: relative; height: calc(100vh - 78px); height: calc(100svh - 78px); min-height: 480px; overflow: hidden; background: #000; }
.hero img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 0; }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, var(--ink), rgba(15,14,13,0) 42%), linear-gradient(180deg, var(--ink), rgba(15,14,13,0) 16%); }
.hero-in { position: absolute; z-index: 1; left: 0; right: 0; bottom: 0; padding: 0 var(--gutter) clamp(24px, 4vw, 44px); }
.hero picture { display: contents; }

.upcoming { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.upcoming li { border-top: 1px solid var(--line); padding-top: 14px; }
.upcoming h3 { font-size: 1.375rem; }
.upcoming p { color: var(--soft); font-size: 1rem; margin-top: 4px; }

.films { display: grid; grid-template-columns: repeat(7, 1fr); gap: 36px 24px; }
.film a { display: block; text-decoration: none; }
.film a:hover h3 { text-decoration: underline; }
.film img { width: 100%; background: #1a1817; }
.film h3 { margin-top: 12px; }
.film p { color: var(--soft); font-size: .9375rem; }

.credits { border-top: 1px solid var(--line); }
.credits li { display: flex; justify-content: space-between; gap: 6px 24px; flex-wrap: wrap; padding-block: 12px; border-bottom: 1px solid var(--line); }
.credits span { color: var(--soft); font-size: 1rem; }

.insta { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.insta a { display: block; }
.insta img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; transition: opacity .2s; }
.insta a:hover img { opacity: .8; }

/* Writer resources */
.resources { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 5vw, 56px); }
.resource-logo { height: 72px; width: auto; object-fit: contain; object-position: left; margin-bottom: 20px; }
.resource-logo:not(.is-round) { height: 34px; margin-block: 19px 39px; }
.resource-logo.is-round { border-radius: 50%; }
.shot { display: block; margin-bottom: 18px; border: 1px solid var(--line); }
.shot img { width: 100%; }
.resource p + p { margin-top: 10px; }

/* About */
.about { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 6fr); gap: clamp(28px, 5vw, 56px); align-items: start; }
.about img { width: 100%; }
.about p + p { margin-top: 1em; }
.about blockquote { margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--line); color: var(--soft); }
.about cite { display: block; font-style: normal; margin-top: 10px; color: var(--text); }

/* Press */
.press { border-top: 1px solid var(--line); }
.press li { border-bottom: 1px solid var(--line); }
.press a { display: block; padding-block: 22px; text-decoration: none; }
.press-meta { display: block; color: var(--soft); font-size: .8125rem; }
.press-title { display: block; font-family: var(--serif); font-variant-numeric: lining-nums; font-size: 1.5rem; font-weight: 500; line-height: 1.3; margin-top: 4px; }
.press a:hover .press-title { text-decoration: underline; }
.press-deck { display: block; color: var(--soft); font-size: 1rem; margin-top: 4px; }

/* Contact */
.contact { max-width: 640px; }
.contact dt { color: var(--soft); font-size: .8125rem; margin-top: 22px; }
.contact dt:first-child { margin-top: 0; }
.contact dd { font-size: 1.25rem; overflow-wrap: anywhere; }

/* Footer */
.foot { border-top: 1px solid var(--line); margin-top: clamp(36px, 5vw, 64px); padding-block: 36px; color: var(--soft); font-size: 1rem; }
.foot-in { display: flex; align-items: center; justify-content: space-between; gap: 20px 36px; flex-wrap: wrap; }
.foot-in img { width: 120px; }
.foot-nav { display: flex; flex-wrap: wrap; gap: 6px 22px; }
.foot-nav a { font-size: .8125rem; text-decoration: none; }
.foot-nav a:hover { text-decoration: underline; }

@media (max-width: 1280px) {
  .films { grid-template-columns: repeat(4, 1fr); }
}

@media (max-width: 900px) {
  .films { grid-template-columns: repeat(3, 1fr); }
  .insta { grid-template-columns: repeat(3, 1fr); }
  .about, .resources { grid-template-columns: 1fr; }
}

@media (max-width: 820px) {
  .hero { height: auto; min-height: 0; }
  .hero img { height: auto; aspect-ratio: 632 / 676; }
  .bar-toggle { display: block; z-index: 2; }
  .bar-nav {
    position: fixed;
    inset: 0;
    height: 100dvh;
    background: var(--ink);
    display: flex;
    align-items: center;
    padding: 80px var(--gutter);
    opacity: 0;
    visibility: hidden;
    transition: opacity .2s, visibility .2s;
  }
  .menu-open .bar-nav { opacity: 1; visibility: visible; }
  .menu-open .bar { position: fixed; inset: 0 0 auto; }
  .menu-open .bar-logo { position: relative; z-index: 2; }
  .bar-nav ul { flex-direction: column; gap: 8px; }
  .bar-nav a { font-family: var(--serif); font-size: 2rem; text-transform: none; letter-spacing: 0; display: inline-block; }
}

@media (max-width: 600px) {
  body { font-size: 1rem; }
  .press-title { font-size: 1.25rem; }
  .films { grid-template-columns: repeat(2, 1fr); gap: 28px 16px; }
  .upcoming { grid-template-columns: 1fr; gap: 16px; }
  .foot-in { flex-direction: column; align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  .insta img { transition: none; }
}
