@layer components {
  /* The film page. Narrow measure, the film itself given room, everything
     else deferential to it. */
  .project {
    max-width: 68rem;
    margin-inline: auto;
    padding: clamp(2rem, 6vw, 4.5rem) var(--gutter) var(--rhythm);
  }

  .project__head { margin-bottom: clamp(1.25rem, 3vw, 2rem); }

  .project__h {
    font-family: var(--font-display);
    font-weight: var(--display-wght);
    font-variation-settings: 'wdth' var(--display-wdth);
    font-size: clamp(1.75rem, 1rem + 3vw, 3.5rem);
    line-height: 1.02;
    letter-spacing: var(--display-tracking);
  }
  .project__client {
    color: var(--ink-quiet);
    font-size: .9375rem;
    margin-top: .5rem;
  }

  .project__media { background: var(--surface-2); }

  /* An iframe has no intrinsic ratio, so it needs one given to it or it
     collapses to a default 150px tall. */
  .project__embed {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    border: 0;
  }

  .project__frame { position: relative; overflow: clip; }

  .project__poster {
    position: relative;
    width: 100%;
    height: auto;
    /* A vertical still would otherwise be taller than the screen and push
       everything below it out of sight. */
    max-height: 78svh;
    object-fit: contain;
    margin-inline: auto;
  }

  /* A portrait still leaves wide gaps at the sides. Rather than flat grey,
     it stands on a blurred enlargement of itself — the same answer the world
     hero gives to the same problem. */
  .project__frame--portrait { display: grid; }
  .project__frame--portrait > * { grid-area: 1 / 1; }

  .project__backdrop {
    width: 100%; height: 100%;
    object-fit: cover;
    scale: 1.16;
    filter: blur(40px) saturate(.35) brightness(.26);
  }
  .project__frame--portrait .project__poster {
    filter: drop-shadow(0 18px 45px rgb(0 0 0 / .55));
  }

  .project__body { margin-top: clamp(1.5rem, 4vw, 2.5rem); }

  .project__back {
    margin-top: clamp(2rem, 5vw, 3.5rem);
    padding-top: 1.25rem;
    border-top: 1px solid var(--rule);
    font-size: .9375rem;
  }
  .project__back a { border-bottom: 1px solid var(--rule); }
  .project__back a:hover { color: var(--accent); border-bottom-color: var(--accent); }
}
