/* Homepage columns. The copy and portrait share a centred stage on wide displays.
   The sections below share a narrower reading column. Both centre on wide screens. On desktop
   the sections keep wider gutters, so they always sit well inside the hero rather than a few
   pixels off it; on tablets and phones both columns use the same gutters. */
:root { --hero: 1500px; --section: 1200px; --gutter: 56px; --section-gutter: 120px; }
@media (max-width: 1000px) { :root { --gutter: 30px; --section-gutter: 30px; } }
@media (max-width: 700px) { :root { --gutter: 22px; --section-gutter: 22px; } }
.design-presence {
  padding-left: max(var(--gutter), (100% - var(--hero)) / 2);
  padding-right: max(var(--gutter), (100% - var(--hero)) / 2);
}
/* Keep the DOM copy in an explicit foreground stacking context. The animated
   canvas no longer relies on a negative layer behind unpositioned desktop text. */
.design-presence .presence-field { z-index: 0; }
.design-presence .presence-content { position: relative; z-index: 1; }
.design-presence .film-footer { border-top: 0; }
.design-presence .presence-image { --portrait-fade: .16; }
.director-section,
.support-section,
.partners-section,
.supporters-section,
.site-footer {
  padding-left: max(var(--section-gutter), (100% - var(--section)) / 2);
  padding-right: max(var(--section-gutter), (100% - var(--section)) / 2);
}

@media (min-width: 701px) {
  /* Centre the introduction in the space above the company credits. */
  .design-presence .presence-content { margin-block: auto; padding-block: 32px; }
  .design-presence .film-footer { margin-top: 0; }
}
@media (min-width: 1001px) {
  /* Cap the desktop stage so tall windows do not add empty space above the
     film. Content can still grow naturally when text needs more room. */
  .design-presence { min-height: min(100svh, 1000px); }
  /* The old viewport-relative right edge kept receding after the copy hit
     its maximum width. Anchor the artwork to the same 1500px column plus
     its two gutters, retaining the original oversized, offset silhouette. */
  .design-presence .presence-image {
    right: calc(max(0px, (100% - var(--hero) - 2 * var(--gutter)) / 2) - min(8vw, 136px));
    width: min(91%, calc(var(--hero) + 2 * var(--gutter)));
    /* Tall desktop windows must not push the face back over the copy. */
    height: min(90%, 55vw, 950px);
    bottom: max(0px, (100% - 1200px) / 2);
  }
}

/* Phones and portrait tablets have a dedicated portrait above the copy.
   Reserve its space in the header so text never slides underneath the face. */
@media (max-width: 1000px), (max-width: 1100px) and (orientation: portrait) {
  .design-presence { --portrait-height: clamp(240px, 76vw, 480px); min-height: 0; padding-top: 24px; }
  .design-presence .film-header { min-height: var(--portrait-height); }
  .design-presence .presence-controls { top: 0; transform: none; }
  .design-presence .presence-image {
    --portrait-fade: .35;
    top: 24px; bottom: auto; left: 0; right: auto;
    width: 100%; height: var(--portrait-height); opacity: 1;
    background-position: center;
  }
  .design-presence .presence-image img { object-position: 50% 50%; }
  .design-presence .presence-image:after {
    background: linear-gradient(90deg, #0b0909, transparent 32%), linear-gradient(0deg, #0b0909, transparent 35%);
  }
  .design-presence .presence-content { width: min(100%, 640px); margin: 24px auto 40px; padding-block: 0; }
  .design-presence .presence-logline { font-size: clamp(29px, 4.2vw, 38px); max-width: 580px; }
  .design-presence .presence-logline span { text-wrap: balance; }
  .design-presence .film-footer { margin-top: auto; }
}

/* Code Is Law: a cinematic interlude using its own artwork and promotional still. */
.director-section {
  --director-intro-space: clamp(88px, 8vw, 136px);
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding-block: clamp(64px, 7vw, 104px);
  padding-top: var(--director-intro-space);
  border-top: 1px solid #59403b60;
  background: #080909;
  text-align: center;
}
.director-inner { position: relative; width: min(100%, 760px); margin-inline: auto; }
.director-section .eyebrow {
  margin: 0 0 24px;
  color: #fb4d40;
  font-size: 17px;
  line-height: 1.6;
}
/* Leave the credit heading in a quiet band; the collage enters with the film card. */
.director-atmosphere { position: absolute; z-index: -1; inset: var(--director-intro-space) 0 0; pointer-events: none; overflow: hidden; }
.director-atmosphere::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(180deg, #080909, transparent 180px, transparent 65%, #080909),
    linear-gradient(90deg, transparent, #080909 35%, #080909 65%, transparent);
}
.director-reel { position: absolute; width: clamp(340px, 31vw, 560px); opacity: .38; }
.director-reel img { width: 100%; height: 250px; object-fit: cover; filter: grayscale(1); }
.director-reel-left { top: 80px; right: calc(50% + 440px); transform: rotate(12deg); }
.director-reel-right { top: 25px; left: calc(50% + 440px); transform: rotate(-12deg); }
.director-code { height: 240px; margin-block: 16px; background: url('/assets/code-is-law-code.webp') center / cover; }
.director-reel-right .director-code { background-position: center bottom; }
.director-feature {
  overflow: hidden;
  border: 1px solid #ffffff38;
  border-radius: 10px;
  background: #030404;
  box-shadow: 0 24px 80px #0008;
}
.director-feature-art { display: block; position: relative; }
.director-feature-art img { width: 100%; height: auto; }
.director-feature-art:focus-visible { outline-offset: -6px; }
.director-trailer {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 15px;
  min-height: 184px;
  padding: 24px;
  background: linear-gradient(0deg, #03040480, #03040490 65%, #030404), url('/assets/code-is-law-still.webp') center 54% / cover;
  color: #fff;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .2em;
  text-transform: uppercase;
}
.director-trailer:focus-visible { outline-offset: -6px; }
.director-play {
  display: grid; place-items: center; width: 68px; height: 68px;
  border: 1px solid #ffffffe0; border-radius: 50%; background: #08090980;
  transition: background .2s, border-color .2s, transform .2s;
}
.director-play svg { width: 25px; height: 25px; fill: none; stroke: currentColor; stroke-width: 1.7; }
.director-trailer:hover .director-play { background: #9d211a; border-color: #ff7465; transform: scale(1.06); }
/* The director, with the credits from his own Encrypted Films biography. */
.director-profile { display: flex; align-items: center; gap: 28px; max-width: 620px; margin: 72px auto 0; text-align: left; }
.director-profile img { flex: none; width: 112px; height: 112px; border: 1px solid #ffffff38; border-radius: 50%; }
.director-profile h3 { margin: 0; color: #ece5db; font: 400 32px/1.1 Instrument, Georgia, serif; }
.director-role { margin: 8px 0 0; color: #fb4d40; font-size: 11px; font-weight: 500; letter-spacing: .23em; text-transform: uppercase; }
.director-bio { margin: 12px 0 0; color: #b9aaa3; font-size: 15px; line-height: 1.6; text-wrap: pretty; }
/* Side by side, the quote marks and sources line up; the shorter quote centres between them. */
.director-quotes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: auto 1fr auto; column-gap: 56px; max-width: 760px; margin: 40px auto 32px; }
.director-quote { display: grid; grid-row: span 3; grid-template-rows: subgrid; margin: 0; }
.director-quote blockquote { align-self: center; }
.director-quote-mark { display: block; height: 30px; color: #fb4d40; font: 64px/.9 Instrument, Georgia, serif; }
.director-quote blockquote { margin: 12px 0 10px; color: #ece5db; font-family: Instrument, Georgia, serif; font-size: clamp(24px, 2vw, 30px); font-weight: 400; line-height: 1.2; text-wrap: balance; }
.director-quote figcaption { display: flex; justify-content: center; align-items: center; min-height: 44px; color: #b9aaa3; font-size: 11px; font-weight: 500; letter-spacing: .23em; text-transform: uppercase; }
.director-quote figcaption a, .director-profile a { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; color: #b9aaa3; font-size: 11px; font-weight: 500; letter-spacing: .23em; text-transform: uppercase; }
.director-quote a:hover, .director-profile a:hover { color: #fff; }
.director-platforms { display: grid; grid-template-columns: repeat(5, 1fr); align-items: center; }
.director-platforms a {
  display: flex; justify-content: center; align-items: center; gap: 5px;
  position: relative; min-height: 54px; color: #bdbbb8;
  transition: color .2s;
}
.director-platforms a + a::before { content: ''; position: absolute; left: 0; width: 1px; height: 22px; background: #ffffff26; }
.director-platforms a:hover { color: #fff; }
.director-section a:focus-visible { outline: 2px solid #ff7465; }
.director-amazon { position: relative; padding-bottom: 9px; font-size: 24px; line-height: 1; font-weight: 700; letter-spacing: -1.4px; }
.director-amazon svg { position: absolute; width: 57px; height: 13px; left: 9px; bottom: -2px; fill: none; stroke: currentColor; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.director-apple { width: 26px; height: 30px; fill: currentColor; }
.director-apple-label { font-size: 28px; font-weight: 500; letter-spacing: -.04em; }
.director-platforms img { height: auto; filter: brightness(0) invert(1); opacity: .74; }
.director-platforms a:hover img { opacity: 1; }
.director-broadcast { margin: 14px 0 0; color: #b9aaa3; font-size: 11px; font-weight: 500; letter-spacing: .23em; text-transform: uppercase; text-wrap: balance; }
.director-platforms .director-youtube-logo { width: 108px; filter: grayscale(1) invert(1); }
.director-vimeo-logo { width: 88px; }
.director-tubi-logo { width: 66px; }
@media (max-width: 1100px) {
  .director-reel-left { right: calc(50% + 320px); }
  .director-reel-right { left: calc(50% + 320px); }
}
@media (max-width: 700px) {
  .director-section .eyebrow { margin-bottom: 14px; font-size: 11px; }
  .director-atmosphere { display: none; }
  .director-trailer { min-height: 160px; }
  .director-play { width: 58px; height: 58px; }
  .director-profile { flex-direction: column; gap: 16px; margin-top: 52px; text-align: center; }
  .director-profile img { width: 96px; height: 96px; }
  .director-quotes { display: block; margin-block: 32px 24px; }
  .director-quote + .director-quote { margin-top: 24px; }
  .director-platforms { grid-template-columns: repeat(2, 1fr); row-gap: 14px; }
  .director-platforms a:nth-child(3)::before { display: none; }
  .director-platforms a:last-child { grid-column: 1 / -1; justify-self: center; min-width: 140px; }
  .director-platforms a:last-child::before { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .director-play, .director-platforms a { transition: none; }
  .director-trailer:hover .director-play { transform: none; }
}
.film-social { display: flex; align-items: center; gap: 14px; }
.film-social a { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; color: #c1bcb6; }
.film-social a:hover { color: #fff; }
.film-social svg { width: 20px; height: 20px; fill: currentColor; }

.music-toggle {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  min-width: 44px; min-height: 44px; padding: 0;
  border: 0; color: #d9c7c2; background: transparent;
  font: 500 13px/1.4 DM, 'Helvetica Neue', Arial, sans-serif;
}
.music-toggle-hero { margin-top: 12px; }
.music-toggle:hover { color: #fff; }
.music-toggle-hero:hover [data-music-label] { text-decoration: underline; text-underline-offset: 4px; }
.music-toggle:focus-visible { outline: 2px solid #ff7465; outline-offset: 4px; }
.music-toggle svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.music-toggle .music-waves, .music-toggle[data-playing="true"] .music-silent { display: none; }
.music-toggle[data-playing="true"] .music-waves { display: block; }
.music-toggle [data-music-label] { white-space: nowrap; }
.music-toggle-floating {
  position: fixed; z-index: 30;
  right: max(16px, env(safe-area-inset-right)); bottom: max(16px, env(safe-area-inset-bottom));
  padding-inline: 16px; border: 1px solid #f1e8dc50; border-radius: 999px;
  background: #0b0909f2; box-shadow: 0 4px 24px #0005;
}
.music-toggle-floating:hover { border-color: #f1e8dc99; }
/* Keep keyboard focus clear of the floating pill: scrolling a focused element into
   view leaves room for the pill's 44px height, border and 16px offset. */
html { scroll-padding-bottom: calc(max(16px, env(safe-area-inset-bottom)) + 62px); }
.music-toggle-floating[data-docked="true"] {
  position: static; padding-inline: 0; border-color: transparent;
  background: transparent; box-shadow: none;
}
.music-toggle-floating[data-docked="true"]:hover [data-music-label] { text-decoration: underline; text-underline-offset: 4px; }
.music-toggle[hidden] { display: none; }

/* A full-width closing band, aligned with the sections above it. */
.site-footer { padding-block: 56px 24px; background: #141010; color: #f4f1eb; }
/* Let the brand absorb spare space so the link groups meet the right content edge. */
.site-footer-main { display: grid; grid-template-columns: minmax(156px, 1fr) repeat(3, max-content); gap: 32px clamp(32px, 6.5vw, 104px); align-items: start; }
.site-footer-brand { display: inline-flex; align-items: center; width: fit-content; min-height: 44px; }
.site-footer-brand img { width: 156px; height: auto; filter: brightness(0) invert(1); }
.site-footer-links { display: flex; flex-direction: column; align-items: flex-start; }
.site-footer-links h2 { margin: 0 0 14px; font-size: 11px; line-height: 1.4; font-weight: 500; letter-spacing: .12em; text-transform: uppercase; color: #a99894; }
.site-footer-links a,
.site-footer-top { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; font-size: 14px; line-height: 1.5; }
.site-footer-links a { padding-block: 8px; }
.site-footer-links a:hover,
.site-footer-top:hover { color: #ff7465; }
.site-footer a:focus-visible { outline: 2px solid #ff7465; outline-offset: 5px; }
.site-footer-links svg { flex: 0 0 auto; width: 15px; height: 15px; fill: currentColor; }
.site-footer-bottom { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 24px; margin-top: 32px; color: #a99894; font-size: 12px; line-height: 1.5; }
.site-footer-copyright { flex: 1; font-size: inherit; }
.site-footer-music { display: flex; align-items: center; min-width: 124px; min-height: 44px; }
.site-footer-music[hidden] { display: none; }
.site-footer-top { display: flex; width: fit-content; font-size: inherit; }
@media (max-width: 1000px) {
  .site-footer-main { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; }
  .site-footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 600px) {
  .site-footer { padding-block: 40px 20px; }
  .site-footer-copyright { flex-basis: 100%; }
  .site-footer-top { margin-left: auto; }
  .site-footer-main { grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: 28px 20px; }
  .site-footer-links:last-child { grid-column: 1 / -1; }
}
