/* Superfun Films
   Layout: white page; the red hand-lettered logo carries the masthead, nav sits
   beside it. Below, a quiet three-up wall of films, left-aligned. A solid red
   footer band closes every page. One light theme, taken from the logo. */

:root {
  --paper: #FFFFFF;
  --ink: #241A19;
  --muted: #6E5F5D;
  --line: #EDE3E1;
  --red: #CE2E21;
  --red-deep: #A8231A;
  --on-red: #FFFFFF;
  --scrim: rgba(28, 10, 8, 0.94);

  --display: "Lilita One", "Arial Black", "Helvetica Neue", sans-serif;
  --body: "Figtree", "Segoe UI", "Helvetica Neue", Arial, sans-serif;

  --gutter: clamp(16px, 4vw, 48px);
  --max: 1280px;
  color-scheme: light;
}

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 17px/1.6 var(--body);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

a { color: inherit; }

:focus-visible {
  outline: 3px solid var(--red);
  outline-offset: 3px;
  border-radius: 2px;
}

.wrap {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-left: max(var(--gutter), env(safe-area-inset-left, 0px));
  padding-right: max(var(--gutter), env(safe-area-inset-right, 0px));
}

/* ---------- Masthead ---------- */

.masthead__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px 32px;
  padding-block: clamp(20px, 3vw, 32px) 0;
}

.logo { display: block; line-height: 0; }
.logo img {
  height: clamp(88px, 11vw, 140px);
  width: auto;
}

.nav {
  display: flex;
  gap: clamp(20px, 3vw, 36px);
  font-family: var(--display);
  font-size: clamp(19px, 1.8vw, 22px);
  letter-spacing: 0.01em;
  padding-bottom: 6px;
}

.nav a {
  text-decoration: none;
  color: var(--ink);
  padding-block: 2px;
  border-bottom: 4px solid transparent;
}
.nav a:hover { color: var(--red); }
.nav a[aria-current="page"] { color: var(--red); border-bottom-color: var(--red); }

/* ---------- Page intro ---------- */

main { flex: 1; }

.intro {
  padding-block: clamp(36px, 5vw, 64px) clamp(28px, 4vw, 44px);
}

.intro h1,
.page-title {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.08;
  letter-spacing: 0.005em;
  margin: 0 0 14px;
  max-width: 20ch;
  text-wrap: balance;
}

/* Home tagline: kept on one line wherever the screen is wide enough. */
.intro h1.tagline { max-width: none; margin: 0; }
@media (min-width: 720px) {
  .intro h1.tagline {
    white-space: nowrap;
    font-size: min(48px, 3.4vw);
  }
}

.lede {
  margin: 0;
  max-width: 58ch;
  color: var(--muted);
  font-size: 18px;
}

/* ---------- Film wall ---------- */

.films {
  list-style: none;
  margin: 0;
  padding: 0 0 clamp(56px, 8vw, 96px);
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: clamp(32px, 4vw, 48px) clamp(16px, 2.4vw, 28px);
}
/* Desktop rhythm: film 1 full width, films 2–5 two to a row, the rest three to a row. */
.films > li { grid-column: span 2; }
.films > li:nth-child(n+2):nth-child(-n+5) { grid-column: span 3; }
.films > li:nth-child(n+2):nth-child(-n+5) .film__brand { font-size: 24px; }

.film {
  display: flex;
  flex-direction: column;
  gap: 2px;
  text-decoration: none;
  color: inherit;
  border-radius: 4px;
}

.film__frame {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  max-width: 100%;
  overflow: hidden;
  background: var(--line);
  border-radius: 4px;
  margin-bottom: 12px;
}

.film__frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 400ms ease;
}

.film__play {
  position: absolute;
  left: 14px;
  bottom: 14px;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--red);
  opacity: 0;
  transform: scale(0.85);
  transition: opacity 200ms ease, transform 200ms ease;
}
.film__play::after {
  content: "";
  position: absolute;
  left: 21px;
  top: 16px;
  border-style: solid;
  border-width: 10px 0 10px 16px;
  border-color: transparent transparent transparent var(--on-red);
}

.film:hover .film__frame img,
.film:focus-visible .film__frame img { transform: scale(1.035); }
.film:hover .film__play,
.film:focus-visible .film__play { opacity: 1; transform: scale(1); }
.film:hover .film__brand { color: var(--red); }

@media (hover: none) {
  .film__play { opacity: 1; transform: scale(0.8); }
}

.film__brand {
  font-family: var(--display);
  font-size: 21px;
  line-height: 1.2;
  letter-spacing: 0.01em;
  transition: color 150ms ease;
}

.film__title {
  color: var(--muted);
  font-size: 16px;
  line-height: 1.4;
}

.films > li:first-child { grid-column: 1 / -1; }
.films > li:first-child .film__brand { font-size: clamp(24px, 2.4vw, 30px); }
.films > li:first-child .film__title { font-size: 18px; }
.films > li:first-child .film__play { width: 72px; height: 72px; left: 20px; bottom: 20px; }
.films > li:first-child .film__play::after { left: 29px; top: 22px; border-width: 14px 0 14px 22px; }

@media (max-width: 960px) {
  /* Tablet: film 1 full width, the other ten two to a row. */
  .films { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .films > li,
  .films > li:nth-child(n+2):nth-child(-n+5) { grid-column: auto; }
  .films > li:nth-child(n+2):nth-child(-n+5) .film__brand { font-size: 21px; }
  .films > li:first-child .film__brand { font-size: 24px; }
  .films > li:first-child .film__title { font-size: 16px; }
  .films > li:first-child .film__play { width: 52px; height: 52px; left: 14px; bottom: 14px; }
  .films > li:first-child .film__play::after { left: 21px; top: 16px; border-width: 10px 0 10px 16px; }
}

@media (max-width: 600px) {
  .films { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- Player (lightbox) ---------- */

.player {
  width: min(1200px, 100vw);
  max-width: 100vw;
  max-height: 100vh;
  margin: auto;
  padding: 0;
  border: 0;
  background: transparent;
  color: #FFFFFF;
  overflow: visible;
}
.player::backdrop { background: var(--scrim); }

.player__inner {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 60px max(16px, env(safe-area-inset-right, 0px)) 24px max(16px, env(safe-area-inset-left, 0px));
}

.player__screen {
  position: relative;
  aspect-ratio: 16 / 9;
  width: 100%;
  max-width: calc((100vh - 170px) * 16 / 9);
  margin-inline: auto;
  background: #000;
}
.player__screen iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.player__caption {
  width: 100%;
  max-width: calc((100vh - 170px) * 16 / 9);
  margin-inline: auto;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 14px;
}
.player__brand {
  font-family: var(--display);
  font-size: 22px;
  letter-spacing: 0.01em;
}
.player__title,
.player__credit { color: #E9D9D6; }
.player__credit { font-size: 15px; }

.player__close {
  position: absolute;
  top: 10px;
  right: max(16px, env(safe-area-inset-right, 0px));
  padding: 9px 16px;
  font: 600 15px/1 var(--body);
  color: var(--on-red);
  background: var(--red);
  border: 0;
  border-radius: 999px;
  cursor: pointer;
}
.player__close:hover { background: var(--red-deep); }
.player__close:focus-visible { outline-color: #FFFFFF; }

/* ---------- About ---------- */

.page {
  padding-block: clamp(36px, 5vw, 64px) clamp(56px, 8vw, 96px);
}

.people {
  margin-top: clamp(36px, 5vw, 56px);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(40px, 5vw, 64px);
}

.person {
  display: grid;
  grid-template-columns: minmax(0, 200px) minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.person__photo {
  aspect-ratio: 4 / 5;
  max-width: 100%;
  border-radius: 4px;
  overflow: hidden;
  background: var(--red);
  color: var(--on-red);
  display: grid;
  place-items: center;
  font-family: var(--display);
  font-size: 56px;
}
.person__photo img { width: 100%; height: 100%; object-fit: cover; }

.person > div { min-width: 0; }

.person h2 {
  font-family: var(--display);
  font-weight: 400;
  font-size: 28px;
  line-height: 1.15;
  letter-spacing: 0.01em;
  margin: 0 0 2px;
}
.person__role { margin: 0 0 14px; color: var(--red); font-weight: 600; }
.person__bio { margin: 0; max-width: 60ch; }

.todo {
  color: var(--muted);
  font-style: italic;
}

@media (max-width: 900px) {
  .people { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 480px) {
  .person { grid-template-columns: minmax(0, 1fr); }
  .person__photo { max-width: 240px; }
}

/* ---------- Contact ---------- */

.contact {
  margin: clamp(36px, 5vw, 56px) 0 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 32px clamp(32px, 5vw, 64px);
  max-width: 960px;
}
.contact > div { min-width: 0; padding-top: 16px; border-top: 3px solid var(--red); }
.contact dt {
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 8px;
}
.contact dd {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(22px, 2.6vw, 30px);
  line-height: 1.3;
  letter-spacing: 0.01em;
  overflow-wrap: anywhere;
}
.contact dd a { text-decoration-thickness: 2px; text-underline-offset: 5px; }
.contact dd a:hover { color: var(--red); }
.contact address { font-style: normal; }
.contact .todo { font-family: var(--body); font-size: 18px; letter-spacing: 0; }

@media (max-width: 640px) {
  .contact { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- Footer ---------- */

.footer {
  background: var(--red);
  color: var(--on-red);
}
.footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  padding-block: 22px;
  font-size: 15px;
}
.footer nav { display: flex; gap: 20px; }
.footer a { text-decoration: none; color: var(--on-red); }
.footer a:hover { text-decoration: underline; }
.footer :focus-visible { outline-color: var(--on-red); }

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