/* ==========================================================
   OPENING NIGHT FILMS — shared styles
   Palette
   --ink:    near-black screening-room background
   --bone:   warm projector-light white (text)
   --dim:    muted gray for captions
   ========================================================== */

:root {
  --ink: #0b0b0d;
  --bone: #f6e4bc; /* warm eggshell, almost Navajo white */
  --dim: #8a8782;
  /* Arimo — a Helvetica/Akzidenz-Grotesk-compatible grotesque, matching the
     bold neo-grotesque used in the reference film titles. One family for
     everything (title, headings, body, nav). */
  --display: "Arimo", Helvetica, Arial, sans-serif;
  --body: "Arimo", Helvetica, Arial, sans-serif;
  --mono: "Arimo", Helvetica, Arial, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background: var(--ink);
  color: var(--bone);
  font-family: var(--body);
  font-size: 1rem;
  line-height: 1.6;
  letter-spacing: -.012em; /* tighter tracking */
  -webkit-font-smoothing: antialiased;
  /* faint analog bloom so text edges read soft, like projected film
     (text-shadow inherits, so this softens all text unless overridden) */
  text-shadow: 0 0 2px rgba(246, 228, 188, .25);
}

/* Out-of-focus film look: a real blur on the type. Body/small text gets a
   lighter blur so it stays readable; the big display text is blurrier (see
   .hero__title etc.). Applied to text wrappers, not images. */
.nav__links,
.footer { filter: blur(0.7px); }
/* About paragraph and the contact email are kept sharp for readability. */

img { display: block; max-width: 100%; }

a { color: inherit; text-decoration: none; }

/* ---------- top navigation (sits over the imagery) ---------- */

.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 1.1rem 1.5rem;
  /* soft gradient so white nav text stays readable over any still */
  background: linear-gradient(to bottom, rgba(11,11,13,.65), transparent);
}

.nav__logo img { height: 44px; width: auto; }

.nav__links {
  display: flex;
  gap: 1.75rem;
  list-style: none;
  font-family: var(--mono);
  font-size: .78rem;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.nav__links a { opacity: .85; transition: opacity .2s; }
.nav__links a:hover, .nav__links a:focus-visible { opacity: 1; }

/* ---------- full-viewport hero (one random featured image) ---------- */

.hero {
  position: relative;
  height: 100vh;
  height: 100svh; /* mobile-safe viewport */
  overflow: hidden;
}

.hero__img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
}

.hero__text {
  position: absolute;
  left: 1.5rem; right: 1.5rem; bottom: 2.25rem;
  z-index: 2;
}

/* readability scrim only where the text sits */
.hero::after {
  content: "";
  position: absolute; inset: 50% 0 0 0;
  background: linear-gradient(to top, rgba(11,11,13,.75), transparent);
  z-index: 1;
}

.hero__title {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(2.2rem, 7vw, 5.5rem);
  line-height: .92;
  letter-spacing: -.05em; /* tightly set */
  text-transform: uppercase;
  max-width: 16ch;
  /* out-of-focus film title: soft bloom + a slow "pulling focus" blur */
  text-shadow: 0 0 6px rgba(246, 228, 188, .4), 0 0 16px rgba(246, 228, 188, .18);
  filter: blur(1.8px); /* fallback if animation doesn't run */
  animation: hero-focus 9s ease-in-out infinite;
}

/* slowly drift in and out of focus, slightly soft <-> a bit softer */
@keyframes hero-focus {
  0%, 100% { filter: blur(0.8px); }
  50%      { filter: blur(3px); }
}

@media (prefers-reduced-motion: reduce) {
  .hero__title { animation: none; filter: blur(1.8px); }
}

/* per-letter registration jitter (set inline by js/main.js jitterHeading) */
.jitter-word { white-space: nowrap; }
.jitter-letter { display: inline-block; }

/* clickable scroll-down arrow, lower-right of the hero */
.hero__next {
  position: absolute;
  right: 1.5rem;
  bottom: 2.25rem;
  z-index: 2;
  background: none;
  border: 0;
  padding: .5rem;
  margin: -.5rem;
  color: var(--bone);
  opacity: .8;
  cursor: pointer;
  transition: opacity .2s, transform .2s;
}

.hero__next:hover,
.hero__next:focus-visible { opacity: 1; transform: translateY(4px); }

/* Portrait screens (phones held upright): a full-viewport COVER crop would
   chop the top/bottom off a landscape hero. Instead show the whole image
   at full width and its natural height, so nothing is cut off. The title
   and arrow still overlay its lower portion. */
@media (orientation: portrait) {
  .hero {
    height: auto;
    min-height: 0;
  }
  .hero__img {
    position: relative;
    inset: auto;
    height: auto;
    display: block;
  }
}

/* ---------- section headers ---------- */

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 4.5rem 1.5rem 1.5rem;
}

.section-head h2 {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(1.5rem, 3.5vw, 2.4rem);
  text-transform: uppercase;
  letter-spacing: .01em;
}

.section-head span {
  font-family: var(--mono);
  font-size: .72rem;
  letter-spacing: .2em;
  color: var(--dim);
}

/* ---------- column-masonry (collage) gallery ----------
   The grid is a positioning context; js/main.js places each tile
   absolutely (left/top/width/height in px) as a skyline pack, so tiles of
   different sizes sit next to each other like a collage. The inner img's
   size/offset (for overscan-cropped images) is also set in js/main.js. */

.masonry { position: relative; }

.masonry__tile {
  position: absolute;
  border: 0; padding: 0;
  background: none;
  cursor: pointer;
  overflow: hidden;
}

/* Sized/positioned in px by js/main.js: for uncropped images the img fills
   the tile exactly; for overscan-cropped ones it's scaled up and offset so
   only the content rect shows (tile has overflow: hidden). */
.masonry__tile img {
  position: absolute;
  top: 0; left: 0;
  object-fit: cover;
  transition: transform .5s ease;
}

.masonry__tile:hover img,
.masonry__tile:focus-visible img { transform: scale(1.04); }

/* Hover-over image titles temporarily disabled — uncomment to restore.
.masonry__tile::after {
  timecode-style caption, appears on hover
  content: attr(data-caption);
  position: absolute;
  left: .6rem; bottom: .5rem;
  font-family: var(--mono);
  font-size: .68rem;
  letter-spacing: .15em;
  color: var(--bone);
  text-shadow: 0 1px 4px rgba(0,0,0,.8);
  opacity: 0;
  transition: opacity .25s;
}

.masonry__tile:hover::after,
.masonry__tile:focus-visible::after { opacity: 1; }
*/

/* ---------- about ---------- */

.about {
  padding: 2.5rem 1.5rem 2rem;
  max-width: 700px;
  margin: 0 auto;
  text-align: center;
}

.about h2 {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(1.6rem, 4vw, 3rem);
  letter-spacing: -.04em; /* tightly set */
  text-transform: uppercase;
  margin-bottom: 1.5rem;
  filter: blur(1.2px); /* out-of-focus film look */
}

.about p { color: var(--bone); opacity: .9; max-width: 55ch; margin: 0 auto; text-align: justify; }
.about p + p { margin-top: 1rem; }

/* ---------- films / awards ---------- */

.films {
  max-width: 720px;
  margin: 0 auto;
  padding: 4.5rem 1.5rem 1rem;
  text-align: center;
}

.films h2 {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(1.6rem, 4vw, 3rem);
  letter-spacing: -.04em;
  text-transform: uppercase;
  margin-bottom: 1.75rem;
  filter: blur(1.2px); /* out-of-focus film look, matching other headings */
}

.films__awards-heading { margin-top: 3.25rem; }

.films__list { list-style: none; }

.films__item { margin-bottom: 1.1rem; }

.films__name {
  display: block;
  font-weight: 700;
  color: var(--bone);
  line-height: 1.2;
}

.films__laurel {
  width: 1.26em;
  height: 1.26em;
  margin-right: .35em;
  vertical-align: middle;
  color: var(--bone);
  opacity: 1;
}

.films__meta {
  display: block;
  margin-top: .15rem;
  font-size: .74rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--dim);
}

.films__desc {
  color: var(--bone);
  opacity: .8;
  max-width: 52ch;
  margin: .55rem auto 0;
  font-size: .92rem;
  text-align: center;
}

/* ---------- contact / footer ---------- */

.contact {
  text-align: center;
  padding: 2.5rem 1.5rem 3rem;
}

.contact h2 {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(1.6rem, 4vw, 3rem);
  letter-spacing: -.04em; /* tightly set */
  text-transform: uppercase;
  filter: blur(1.2px); /* out-of-focus film look */
}

.contact a.email {
  display: inline-block;
  margin-top: 1rem;
  font-family: var(--mono);
  font-size: clamp(.9rem, 2vw, 1.15rem);
  letter-spacing: .08em;
  border-bottom: 1px solid var(--dim);
  padding-bottom: .15rem;
}

.contact a.email:hover { border-color: var(--bone); }

.footer {
  display: flex;
  justify-content: space-between;
  padding: 3rem 1.5rem 1.5rem;
  font-family: var(--mono);
  font-size: .7rem;
  letter-spacing: .15em;
  color: var(--dim);
  text-transform: uppercase;
}

/* any still marked clickable opens the full-screen viewer */
[data-still], [data-featured] { cursor: pointer; }

/* ---------- lightbox ---------- */

.lightbox {
  position: fixed; inset: 0;
  z-index: 100;
  background: rgba(11,11,13,.96);
  display: none;
  align-items: center;
  justify-content: center;
}

.lightbox.open { display: flex; }

.lightbox img {
  max-width: 94vw;
  max-height: 88vh;
  object-fit: contain;
}

.lightbox__caption {
  position: absolute;
  bottom: 1.25rem; left: 50%;
  transform: translateX(-50%);
  font-family: var(--mono);
  font-size: .72rem;
  letter-spacing: .2em;
  color: var(--dim);
}

.lightbox__close {
  position: absolute;
  top: 1rem; right: 1.25rem;
  background: none; border: 0;
  color: var(--bone);
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
}

/* ==========================================================
   WALL VARIANT (index-wall.html)
   ========================================================== */

.wall {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  grid-auto-rows: 24vh;
  gap: 2px;
}

.wall button {
  border: 0; padding: 0;
  background: none;
  cursor: pointer;
  overflow: hidden;
}

/* every 7th tile is double-height, every 5th double-wide,
   so the wall reads like a cutting-room collage */
.wall button:nth-child(7n)     { grid-row: span 2; }
.wall button:nth-child(5n + 2) { grid-column: span 2; }

.wall img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: opacity .3s ease, transform .5s ease;
}

/* hovering one tile quiets the rest */
.wall:hover img { opacity: .45; }
.wall button:hover img,
.wall button:focus-visible img { opacity: 1; transform: scale(1.04); }

.wall-logo {
  position: fixed;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  z-index: 40;
  pointer-events: none;
  filter: drop-shadow(0 8px 40px rgba(0,0,0,.7));
}

.wall-logo img { width: min(420px, 70vw); }

.wall-footer {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 50;
  display: flex;
  justify-content: center;
  gap: 2rem;
  padding: 1rem;
  background: linear-gradient(to top, rgba(11,11,13,.8), transparent);
  font-family: var(--mono);
  font-size: .75rem;
  letter-spacing: .2em;
  text-transform: uppercase;
}

/* ---------- responsive & a11y ---------- */

@media (max-width: 720px) {
  .nav__links { gap: 1rem; }
  .wall { grid-auto-rows: 20vh; }
}

:focus-visible { outline: 2px solid var(--bone); outline-offset: 2px; }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
  html { scroll-behavior: auto; }
}
