@font-face {
  font-family: "Work Sans";
  src: url("media/work-sans-regular.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Work Sans";
  src: url("media/work-sans-bold.ttf") format("truetype");
  font-weight: 800;
  font-display: swap;
}

:root {
  --body-font: "Helvetica Neue", Helvetica, sans-serif;
  --ink: #211f1f;
  --paper: #fdf9f0;
  --olive: #313E17;
  --accent: #ffe17c;
  --edge: clamp(24px, 7vw, 112px);
  color: var(--ink);
  background: var(--paper);
  font-family: var(--body-font);
  -webkit-font-smoothing: antialiased;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body, figure, blockquote, h1, h2, p, dl, dd { margin: 0; }
img, video { display: block; width: 100%; }
h1, h2, blockquote, .reach-total strong { font-family: "Work Sans", var(--body-font); font-weight: 800; }

.scene {
  position: relative;
  --frame-height: clamp(550px, 100svh, 1050px);
  --overlap: 22svh;
  height: calc(var(--frame-height) + var(--overlap));
  margin-bottom: calc(-1 * var(--overlap));
  background: var(--ink);
}
.scene-frame {
  position: sticky;
  top: 0;
  height: var(--frame-height);
  overflow: hidden;
  clip-path: inset(0);
}
.scene-media { height: 100%; object-fit: cover; }
.hero { --frame-height: max(460px, 100svh); }
.hero .scene-media { object-position: 53% 52%; }
.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgb(18 17 18 / .62), transparent 48%),
    linear-gradient(0deg, rgb(18 17 18 / .79), rgb(18 17 18 / .12) 52%, transparent 82%);
}
.hero-copy {
  position: absolute;
  left: 50%;
  top: clamp(44px, 9svh, 104px);
  transform: translateX(-50%);
  width: max-content;
  text-align: right;
  color: var(--accent);
}
.hero h1 {
  font-size: calc(clamp(48px, 14.7vw, 242px) * var(--hero-title-scale, 1));
  line-height: .78;
  letter-spacing: -.055em;
}
.hero h1 span { letter-spacing: 0; }
.hero p {
  margin-top: clamp(1.2px, .21vw, 3px);
  font-family: Helvetica, var(--body-font);
  font-size: calc((clamp(16px, 2vw, 28px) - 4pt) * var(--hero-subtitle-scale, 1));
  font-weight: 700;
}
.scroll-link {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  position: absolute;
  right: var(--edge);
  bottom: clamp(24px, 6vh, 65px);
  color: var(--accent);
  border: 1px solid currentColor;
  border-radius: 50%;
}
.scroll-link span { width: 12px; height: 12px; border: solid currentColor; border-width: 0 1px 1px 0; transform: translateY(-3px) rotate(45deg); }
.scroll-link:hover { color: var(--ink); background: var(--accent); border-color: var(--accent); }

.panel { position: relative; z-index: 1; background: var(--paper); }
.panel-dark { background: var(--olive); color: var(--paper); }
.split {
  width: min(100%, 1440px);
  margin: auto;
  --split-padding: clamp(66px, 11vw, 166px);
  padding: var(--split-padding) var(--edge);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(188px, 28%);
  --column-gap: clamp(44px, 10vw, 155px);
  gap: var(--column-gap);
  container-type: inline-size;
  align-items: center;
}
#opening > .split { padding-bottom: calc(var(--split-padding) - 20px); }
#opening + .panel-dark > .split { padding-top: calc(var(--split-padding) - 20px); }
.reverse { grid-template-columns: minmax(188px, 28%) minmax(0, 1fr); }
.copy { width: min(100%, 620px); justify-self: end; grid-area: 1 / 1; }
.reverse .copy { grid-area: 1 / 2; justify-self: start; }
.phone {
  grid-area: 1 / 2;
  position: relative;
  justify-self: center;
  width: min(100%, 254px);
  aspect-ratio: 415 / 852;
  overflow: hidden;
  border: 7px solid #101010;
  border-radius: clamp(30px, 4vw, 46px);
  background: #fffefa;
  box-shadow: 0 0 0 2px #777570, 0 13px 28px rgb(33 31 31 / .1);
}
.reverse .phone { grid-area: 1 / 1; }
@media (min-width: 721px) {
  .split > :is(.copy, .phone) {
    /* One quarter of the gap, including the centered phone's track inset. */
    --inset: calc((var(--column-gap) + max(0px, (28cqi - 254px) / 2)) / 4);
  }
  .split > .copy, .split.reverse > .phone { translate: var(--inset); }
  .split > .phone, .split.reverse > .copy { translate: calc(-1 * var(--inset)); }
}
.phone::before {
  content: "";
  position: absolute;
  z-index: 1;
  top: 9px;
  left: 50%;
  width: 31%;
  height: 4%;
  transform: translateX(-50%);
  border-radius: 25px;
  background: #101010;
}
.phone img, .phone video { height: 100%; object-fit: cover; }
.phone.bread-phone { background: #000; }
.story, #opening blockquote { font-size: clamp(16.15px, 1.8275vw, 26.35px); line-height: 1.43; letter-spacing: -.02em; }
.story, #opening blockquote { text-align: justify; }
.story { font-size: calc(clamp(16.15px, 1.8275vw, 26.35px) - 2pt); }
.story + .story { margin-top: .75em; }
.quote blockquote { font-size: clamp(26px, 3.55vw, 56px); line-height: 1.11; letter-spacing: -.045em; }
.opening-copy, .story-right { text-align: right; }
#opening blockquote { font-family: inherit; font-weight: 400; }
.quote figcaption { font-size: 14px; line-height: 1.45; margin-top: 24px; }
.opening-copy figcaption, .closing figcaption { margin-top: 10px; font-style: italic; }
.landscape .scene-media { object-position: 50% 54%; }
.film-stripe { --frame-height: clamp(467.5px, 85svh, 892.5px); }
h2 { font-size: clamp(30px, 5vw, 76px); line-height: .98; letter-spacing: -.055em; text-transform: uppercase; }
.reach { background: var(--olive); color: var(--paper); text-align: center; }
.reach-inner { max-width: 1440px; padding: clamp(59.5px, 8.5vw, 124.1px) var(--edge); margin: auto; }
.reach-subtitle { font-size: clamp(17px, 2vw, 25px); margin-top: 16px; }
.portraits {
  list-style: none;
  margin: clamp(30px, 6vw, 76px) auto 0;
  padding: calc(clamp(32px, 5vw, 61px) + 1px) 0 0;
  position: relative;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: clamp(12px, 2.8vw, 36px);
}
.portraits::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 1px;
  background: #fff;
}
.portraits li { min-width: 0; text-align: left; }
.talent-portrait {
  width: min(94%, 210px);
  aspect-ratio: 1;
  margin: 0 auto 18px;
  border-radius: 50%;
  background: url("media/tunisia-talent.png") var(--portrait-x) 14.815% / 687.248% auto no-repeat;
}
.portraits h3 {
  margin: 0 0 5px;
  font: 800 clamp(15px, 1.45vw, 21px)/1.1 "Work Sans", var(--body-font);
  letter-spacing: -.025em;
  text-transform: uppercase;
}
.talent-fit-name { container-type: inline-size; }
.portraits .talent-fit-name h3 {
  font-size: min(clamp(15px, 1.45vw, 21px), 9.07cqi);
  white-space: nowrap;
}
.portraits p {
  font-size: clamp(14px, 1.07vw, 17px);
  line-height: 1.4;
  text-align: justify;
  hyphens: auto;
}
.portraits .talent-reach { margin-top: 3px; font-weight: 700; text-align: left; }

@media (max-width: 1050px) {
  .portraits { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.reach-total { margin-top: clamp(56px, 9vw, 114px); }
.reach-total p { font-weight: 700; font-size: clamp(13px, 1.5vw, 20px); text-transform: uppercase; letter-spacing: .05em; }
.reach-total strong { display: block; font-size: clamp(44.4px, 9vw, 116.4px); letter-spacing: -.085em; line-height: .96; margin: 10px 0; }
.production { container-type: inline-size; }
.production h2 { font-size: min(54px, 6.85cqi); margin-bottom: 24px; position: relative; top: -12px; white-space: nowrap; }
.production dl > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) max-content;
  gap: 12px;
  align-items: center;
  border-bottom: 1px solid rgb(33 31 31 / .14);
  padding: 11px 0;
  line-height: 1.35;
}
.production .production-with-description {
  grid-template-columns: minmax(0, 9fr) minmax(0, 11fr) 2.5rem;
}
.production dt { font-size: calc(1.3em - 1pt); font-weight: 400; }
.production-value { font-size: 1.3em; }
.production-description {
  font-size: calc(.9em - 1pt);
  padding-inline-end: 8px;
  text-align: left;
}
.production-value {
  font-family: "Work Sans", var(--body-font);
  font-weight: 400;
  text-align: right;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.production dl > .production-runtime { padding-block: 4.4px; }
.production-duration { display: grid; justify-items: end; line-height: 1; }
.production-duration small { font-size: .52em; font-family: var(--body-font); font-weight: 400; margin-top: 1.2px; }

@container (max-width: 360px) {
  .production .production-with-description { grid-template-columns: minmax(0, 1fr) max-content; row-gap: 4px; }
  .production-with-description dt { grid-column: 1 / -1; }
}

.closing { padding: clamp(44.4px, 7.8vw, 114px) var(--edge); background: var(--olive); color: var(--paper); }
.closing .quote {
  max-width: 16.5em;
  margin: auto;
  font-size: clamp(16.15px, 1.8275vw, 26.35px);
}
.closing .quote figcaption { text-align: right; }
.closing .quote blockquote {
  font-size: inherit;
  line-height: 1.24;
  letter-spacing: -.032em;
  text-align: justify;
  hyphens: auto;
}

@media (max-width: 720px) {
  .scene { --frame-height: max(360px, 70svh); --overlap: 15svh; }
  .hero {
    --frame-height: max(440px, 100svh);
    --hero-title-scale: 1.5;
    --hero-subtitle-scale: 1.2;
  }
  .film-stripe { --frame-height: max(306px, 59.5svh); }
  .split, .split.reverse {
    grid-template-columns: 1fr;
    gap: 42px;
    --split-padding: 62px;
    --copy-offset: 10.5px;
    --subheader-offset: var(--copy-offset);
    padding-top: calc((var(--split-padding) - var(--subheader-offset)) / 2);
    padding-inline: 12px;
  }
  #opening + .panel-dark > .split {
    padding-top: calc((var(--split-padding) - 20px - var(--subheader-offset)) / 2);
  }
  .split:has(> .production) { --subheader-offset: calc(var(--copy-offset) - 12px); }
  .split .copy { grid-area: 1 / 1; justify-self: center; }
  .split .phone { grid-area: 2 / 1; width: min(52vw, 190px); }
  .split > .copy { translate: 0 var(--copy-offset); }
  .split > .phone { translate: 0 -10.5px; }
  .portraits { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 32px; }
  .talent-portrait { width: min(65.8%, 147px); }
  .portraits p { text-align: left; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .scene { --overlap: 0px; }
}

@media (prefers-reduced-motion: no-preference) {
  .hero-copy {
    transform: translate(-50%, var(--title-offset, 0px));
    opacity: var(--title-opacity, 1);
    filter: blur(var(--title-blur, 0px));
  }

  .hero-copy p { opacity: var(--subtitle-opacity, 1); }

  .scene-media {
    transform: translateY(var(--video-drift, 0%)) scale(1.08);
  }

  .split > .copy {
    transition: opacity 600ms ease-out, transform 700ms cubic-bezier(.2, .65, .3, 1);
  }

  .portraits::before {
    transform-origin: left center;
    transition: transform 750ms cubic-bezier(.2, .65, .3, 1);
  }

  .portraits.awaiting-reveal::before { transform: scaleX(0); }

  .portraits > li, .reach-total {
    transition: opacity 520ms ease-out, transform 700ms cubic-bezier(.2, .65, .3, 1);
    transition-delay: var(--reveal-delay, 0ms);
  }

  .portraits > li.awaiting-reveal, .reach-total.awaiting-reveal {
    opacity: 0;
    transform: translateY(14px);
  }

  .opening-copy {
    transition-duration: 850ms, 900ms;
  }

  .split > .copy.awaiting-reveal {
    opacity: 0;
    transform: translateY(14px);
  }
}

@media (min-width: 1051px) and (prefers-reduced-motion: no-preference) {
  .portraits > li:nth-child(2) { --reveal-delay: 70ms; }
  .portraits > li:nth-child(3) { --reveal-delay: 140ms; }
  .portraits > li:nth-child(4) { --reveal-delay: 210ms; }
  .portraits > li:nth-child(5) { --reveal-delay: 280ms; }
}

.opening-copy h2, .story-copy h2 {
  margin-bottom: 8px;
  font-size: clamp(21px, 2.45vw, 36px);
  line-height: 1.08;
}

.story-copy {
  width: min(82%, 500px);
  container-type: inline-size;
}

.story-copy h2 {
  font-size: calc(min(clamp(21px, 2.45vw, 36px), 6cqi) + 1pt);
  white-space: nowrap;
}

.story-copy.story-right {
  --heading-size: calc(min(clamp(21px, 2.45vw, 36px), 5.59cqi) - 1pt);
}

.story-copy.story-right h2 {
  font-size: var(--heading-size);
}

.story-copy.story-right .story {
  width: min(100%, calc(var(--heading-size) * 15.363));
  margin-inline-start: auto;
  font-size: calc(clamp(16.15px, 1.8275vw, 26.35px) - 4pt);
}

.story-stack {
  display: inline-grid;
  max-width: 100%;
  grid-template-columns: minmax(0, max-content);
}

.story-stack > .story { contain: inline-size; }

@media (max-width: 720px) {
  .split .copy > h2,
  .split .opening-copy,
  #opening .quote blockquote,
  .split .story-copy,
  .split .story { text-align: left; }

  .split .copy,
  .story-copy.story-right .story { width: 100%; }

  .split .copy h2 { white-space: normal; }
  .story-copy h2 br { display: none; }
  .story-stack { display: block; }

  #opening .quote blockquote,
  #opening .quote figcaption { display: inline; }

  #opening .quote figcaption {
    font-size: clamp(11px, 3.1vw, 13px);
    white-space: nowrap;
  }

  #opening .quote figcaption::before { content: "\00a0"; }

  .closing .quote figcaption {
    display: flex;
    justify-content: flex-end;
    font-size: min(14px, 4vw);
    white-space: nowrap;
  }
}

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