/* Changes on top of the original WordPress theme stylesheets.
   Keep this small: it is here so the theme CSS can stay untouched until the
   redesign replaces it. */

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* ---------------------------------------------------------------- menu */

/* A bar behind the menu, dark and translucent, so the links stay legible
   over a poster or the title screen as the page moves under them. */
.top_menu_wrap {
  background: rgba(13, 13, 13, .82);
  -webkit-backdrop-filter: saturate(150%) blur(14px);
  backdrop-filter: saturate(150%) blur(14px);
  /* The rule only appears once the page has moved, so the title screen is
     uninterrupted. */
  border-bottom: 1px solid transparent;
  transition: border-color .35s ease;
}
body.scrolled .top_menu_wrap { border-bottom-color: rgba(255, 255, 255, .13); }

.top_menu {
  opacity: 1;
  position: relative;
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 11px 20px 10px;
}
.top_menu_links { display: flex; align-items: center; gap: 26px; min-width: 0; }
.top_menu_itm {
  font-size: 1.5rem;
  line-height: 1.7rem;
  margin-right: 0;
  white-space: nowrap;
}
.top_menu_itm svg { margin-top: 0; }
/* The logo was pinned to the top of its line, so it sat 2px above the
   letters beside it. Centred in the line instead, its middle lines up with
   the middle of the capitals. */
.top_menu_itm1 { display: flex; align-items: center; }
.top_menu_itm1 svg { display: block; vertical-align: middle; }
.top_menu_itm.current { opacity: 1; }

/* One mark that slides along the rule from section to section, rather than
   an underline switching on and off under each link. It rests under the
   logo while the title screen is in view. */
.top_menu_ind {
  position: absolute;
  left: 0;
  bottom: -1px;
  height: 2px;
  width: 0;
  background: #fff;
  opacity: 0;
  pointer-events: none;
  transition: transform .4s cubic-bezier(.4, 0, .2, 1),
              width .4s cubic-bezier(.4, 0, .2, 1),
              opacity .3s ease;
}
body.scrolled .top_menu_ind { opacity: 1; }

/* ---------------------------------------------------------- title screen */

/* The theme shipped this panel commented out, with no height of its own (its
   script used to set one). A viewport height in CSS does the same job and
   leaves the script's four-section reveal logic out of it. */
/* 100vh on a phone is the window WITHOUT the browser's address bar counted,
   so the bottom of the panel — and the scroll arrow on it — sits off screen.
   100svh is the height actually visible. */
#home_s { height: 100vh; height: 100svh; min-height: 520px; }
#home_s .animateBlock_inn img { width: auto; height: auto; max-height: 42vh; max-width: 52vw; }

/* ------------------------------------------------------------- sections */

.page_body { background: #0d0d0d; }

/* One rhythm for every section, in place of the theme's per-section padding
   and top margins, which differed from block to block. Each section carries
   half the gap at each edge, so two stacked sections leave one whole gap
   between them. */
:root { --section-pad: 50px; }

#mission_s, #projects_s, #themes_s, #contact_s { margin-top: 0; scroll-margin-top: 50px; }

/* Jumping to a section should land its heading in the same place every time.
   The about section carries twice the top padding — it has to, to leave a
   full gap below the title screen — so it stops that much higher. */
#mission_s { scroll-margin-top: calc(50px - var(--section-pad)); }
#mission_s .animateBlock_inn,
#projects_s .animateBlock_inn,
#themes_s .animateBlock_inn,
#contact_s .animateBlock_inn { padding: var(--section-pad) 0; }

/* The first and last sections sit against the title screen and the footer,
   which contribute no gap of their own, so each carries a whole one. */
#mission_s .animateBlock_inn { padding-top: calc(var(--section-pad) * 2); }
#contact_s .animateBlock_inn { padding-bottom: calc(var(--section-pad) * 2); }

/* Support Aleph is styled as a section label, so it is given a section's
   worth of space above it rather than sitting half as far from the pills. */
#themes_s .support_heading { padding-top: calc(var(--section-pad) * 2); }

/* The same gap under every section's heading. Sections with a large heading
   get it from that heading; the themes section ends at its label, so its
   labels match what the large headings leave. */
#themes_s h4 { padding-bottom: 60px; }

/* --------------------------------------------------------------- reveal */

/* The theme hides every section until its script reveals them, and that
   script only handles four. These are visible by default and site.js fades
   them in as they are scrolled to; without JavaScript they simply show. */
.animateBlock { opacity: 1; }
.animateBlock.show { animation: none; }

.animateBlock.reveal { opacity: 0; transform: translateY(26px); }
.animateBlock.reveal.revealed {
  opacity: 1;
  transform: none;
  transition: opacity .8s ease, transform .8s cubic-bezier(.22, .61, .36, 1);
}
.animateBlock.reveal .word_clout_itm { opacity: 0; transform: translateY(10px); }
.animateBlock.reveal.revealed .word_clout_itm {
  opacity: 1;
  transform: none;
  transition: opacity .5s ease, transform .5s ease;
  transition-delay: calc(var(--i, 0) * 45ms);
}

/* ------------------------------------------------- editorial widths */

/* The theme put copy, headings and posters in one 900px column, so the films
   got no more room than a paragraph. Three widths now: a narrow measure for
   reading, the middling column for headings and details, and a wide one for
   the posters, which are the thing worth looking at. */
:root { --text-col: 700px; }

.animateBlock p {
  max-width: var(--text-col);
  margin-left: auto;
  margin-right: auto;
  font-size: 2.4rem;
  line-height: 3.6rem;
}
#projects_s .animateBlock_inn { max-width: 1200px; }

/* ------------------------------------------------------------- borders */

/* The theme outlined posters, stills and the video in #7d7d7d — a mid grey
   drawn for a white page, which against this one reads as a bright line
   around everything, louder than the artwork. Dimming it to a faint tint
   went too far the other way: a 1px edge that close to the background
   reads as broken rather than quiet. This is the grey the Lorem Ipsum site
   frames its own posters in — dark enough to stay out of the way, solid
   enough to hold the edge. */
#video_trailer,
.projects_list_itm .projects_list_itm_img,
.film_list_itm_img,
.movie_image img,
.team_itm_img,
.team_list_itm .team_list_itm_img { border-color: #3f3f3f; }

/* Those posters are a background image on a box the theme fills with a pale
   placeholder, left over from a light-coloured design. The image covers the
   box, but not the sliver the rounded corners and a fractional pixel leave
   along the edge, so the placeholder showed through as a bright hairline
   just inside the border — read as a second, lighter frame around every
   poster. Fill the box with the page's own black instead, and nothing
   shows through if the image is slow, missing or a hair short. */
.projects_list_itm .projects_list_itm_img,
.film_list_itm_img,
.team_itm_img,
.team_list_itm .team_list_itm_img { background-color: #0d0d0d; }

/* ---------------------------------------------------------- posters */

@media screen and (max-width: 820px) {
  /* Swiped sideways rather than stacked two-up, which orphaned the third. */
  .projects_list {
    display: flex;
    gap: 14px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: 0 15px 8px;
    text-align: left;
  }
  .projects_list::-webkit-scrollbar { display: none; }
  .projects_list_itm {
    flex: 0 0 68%;
    width: auto;
    scroll-snap-align: center;
  }
  .projects_list_itm_path { margin: 0; }
  .projects_list_itm_img1,
  .projects_list_itm_img2,
  .projects_list_itm_img3 { margin: 0; }
}

/* ------------------------------------- project and partner pages */

/* These carried the theme's white page while everything else went dark. */
.cat_2, .cat_4 { background: #0d0d0d; }
body.cat_2 .top_menu_wrap, body.cat_4 .top_menu_wrap { background: transparent; }
.cat_4 .top_menu_itm { color: #fff; }
.cat_4 .top_menu_itm .logopath { fill: #F7F7F7; }
.cat_4 .team_list_itm_name { color: #fff; }
.cat_4 .team_list_itm_type { color: #999; }

.movie_text, .movie_text p, .movie_text > span, .movie_sub_title { color: #fff; }
.movie_text .movie_tags span { color: #9a9a9a; }
.movie_image img { border-radius: 10px; }

/* The text column ran to 640px of 20px type — about 64 characters a line.
   A 1100px container brings it to the same 55 the home page reads at, and
   real side padding keeps it off the window edge on a narrower screen. */
.movie_container { max-width: 1100px; padding: 0 40px; }
.project_credits { width: 100%; max-width: none; }

/* Type hierarchy. The logline was set at the same weight as the title and
   nearly the same size, so on a dark page the two shouted at each other.
   It now sits between the title and the synopsis. */
.movie_sub_title {
  font-size: 2.2rem;
  line-height: 3.2rem;
  font-weight: 500;
  color: #d4d4d4;
  padding: 0 0 28px;
}
/* The synopsis sat at 19px on 31px — a ratio of 1.63, looser than any
   other running text here and noticeably airier than the home page's
   1.54. Brought onto the same ratio so body copy reads the same
   wherever it appears. */
.movie_text p { font-size: 1.9rem; line-height: 2.9rem; color: #e9e9e9; }
.movie_text > span { letter-spacing: -.01em; }

/* Poster and text start level, under the menu. */
.movie_image, .movie_text.none_banner, .movie_text { padding-top: 100px; }
.movie_image.movie_image_static img { margin-top: 0; }

/* The trailer used to run across the top of the page as a banner, with the
   poster and the synopsis below it. It now follows them, and sits wider
   than the text: a trailer gains from the size and has no reading measure
   to keep to, so it takes the full width the theme uses for its own rows
   and breaks out past the two columns on either side. Its wrapper spans the
   window only so the video can escape the narrower column the text keeps
   to. The duration floats right of its caption and has to be cleared, or
   the credits ride up beside it. */
.project_trailer_band { padding: 96px 0 0; }
.project_trailer {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 40px;
}
.project_trailer .video_tagtext::after { content: ''; display: block; clear: both; }

@media screen and (max-width: 767px) {
  .project_trailer_band { padding-top: 40px; }
  /* the theme gives #video_s a 3% top margin, which on top of the band's
     own padding left a tall gap; its id outranks a class, so name it */
  #video_s.project_trailer { padding: 0 20px; margin-top: 0; }
}

/* The theme gives each column half the width and nothing in between. That
   read as a gutter only because the poster stopped growing at 586px, which
   left the empty half-inch in the middle — so narrowing the container for
   line length closed it, and the text ended up hard against the poster.
   Set the gutter rather than letting it fall out of a maximum width: the
   poster takes a little over two fifths, the text keeps the rest, and the
   space between them grows with the window. Below 768 the theme wraps the
   two into one column, where it sets its own spacing. */
@media screen and (min-width: 768px) {
  .movie_description {
    gap: clamp(24px, 3.4vw, 48px);
    align-items: flex-start;
  }
  .movie_image {
    width: 42%;
    max-width: 480px;
    flex: 0 0 auto;
  }
  .movie_text {
    width: auto;
    flex: 1 1 0;
    min-width: 0;
  }
}

/* Credits read the way they do on the Lorem Ipsum site: one name to a line
   under its heading, rather than a sentence of names running on and
   wrapping mid-list. Spacing is in whole pixels so every gap lands on the
   pixel grid and none renders a pixel wider than its neighbours. The theme
   resets every element to font-size:0 and expects each block to set its
   own, so the names have to be given a size of their own as well. */
.project_credits { color: #cfcfcf; }
.project_credits .cont_call_itm_i,
.project_credits .cont_call_itm_i b,
.project_credits .cont_call_itm_i span,
.project_credits .cont_call_itm_i a { font-size: 18px; line-height: 25px; }
.project_credits .cont_call_itm_i { color: inherit; padding-bottom: 16px; }
.project_credits .cont_call_itm_i b { color: #fff; display: block; margin: 0 0 6px; }
.project_credits .cont_call_itm_i > br { display: none; }
.project_credits .credit-line { display: block; }
.project_credits .credit-line + .credit-line { margin-top: 6px; }

.team_itm_bio, .team_itm_bio p { color: #fff; }

@media screen and (max-width: 767px) {
  /* Below the 43px menu bar with room to breathe, rather than under it. */
  .movie_image { padding-top: 72px; }
  .movie_text.none_banner, .movie_text { padding-top: 32px; }
  /* The credits carry 80px of space above them in the page itself, which
     on a phone left the trailer floating in a band of black. */
  .project_credits { padding-top: 40px !important; }
}

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

/* The footer is the only place the studio's details now appear, so its email
   is a link. The theme resets every element to font-size:0 and expects each
   block to set its own, so a link nested in one has to take its parent's. */
.footer-contact-item-desc p a {
  font-size: inherit;
  line-height: inherit;
  color: inherit;
  border-bottom: 1px solid #555;
}
.footer-contact-item-desc p a:hover { color: #fff; border-bottom-color: #fff; }

@media screen and (max-width: 820px) {
  :root { --section-pad: 30px; }
  .scroll_arr_down img { width: 11%; min-width: 42px; }

  /* The links become a strip that scrolls sideways, rather than hiding
     behind a hamburger. */
  /* The links become a strip that slides sideways, the way the section
     tabs do in the NYT app, rather than hiding behind a hamburger. It runs
     to the window's edge, so a link cut off there shows there is more to
     slide to; site.js keeps the section being read in view. The bar is a
     few pixels taller than on a computer, and its whole height is the
     thing you press, not just the word. */
  .top_menu { display: flex; gap: 14px; padding: 0 0 0 14px; }
  .top_menu_links {
    flex: 1 1 auto;
    gap: 20px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-right: 14px;
  }
  .top_menu_links::-webkit-scrollbar { display: none; }
  .top_menu_itm { flex: 0 0 auto; padding: 13px 0 12px; }
  #mission_s, #projects_s, #themes_s, #contact_s { scroll-margin-top: 58px; }
  #mission_s { scroll-margin-top: calc(58px - var(--section-pad)); }
  .mobile-nav-toggle, .mobile_menu { display: none !important; }
  .animateBlock p { font-size: 1.75rem; line-height: 2.7rem; }
  #themes_s h4 { padding-bottom: 30px; }
}

/* ---------------------------------------------------------------- phones */

/* One gutter, one text size and one line spacing for every block of copy
   on a phone. The sections had grown their margins one at a time — 15px
   on two, none on two, 40px on the project page, 20px under the trailer —
   and running text was 17.5px on the home page but 19px on a project page,
   for no reason but history. Set once here, last, so it wins. */
@media screen and (max-width: 820px) {
  :root { --phone-gutter: 20px; }

  .top_menu_itm { font-size: 16px; line-height: 18px; }

  /* home sections: text sits in the gutter; the posters strip still runs
     to the window's edge so it reads as something to swipe */
  #mission_s, #themes_s, #contact_s {
    padding-left: var(--phone-gutter) !important;
    padding-right: var(--phone-gutter) !important;
  }
  #projects_s .animateBlock_inn > h4,
  #projects_s .animateBlock_inn > h2 {
    padding-left: var(--phone-gutter);
    padding-right: var(--phone-gutter);
  }
  .projects_list { padding-left: var(--phone-gutter); padding-right: var(--phone-gutter); scroll-padding: 0 var(--phone-gutter); }

  /* project pages */
  .movie_container { padding-left: var(--phone-gutter); padding-right: var(--phone-gutter); }
  .project_trailer { padding-left: var(--phone-gutter); padding-right: var(--phone-gutter); }

  /* running text, everywhere */
  .animateBlock p,
  .movie_text p {
    max-width: none;
    font-size: 18px;
    line-height: 27px;
  }

  /* credits: one group under another, across the full width, rather than
     three columns of 90px that broke every company name */
  .project_credits .cont_call_itm {
    display: block;
    width: auto;
    padding: 0;
  }
  .project_credits .cont_call_itm + .cont_call_itm { margin-top: 8px; }
}
