.js,
.js body {
  height: 100%;
  overflow: hidden;
}

.fifa22-page {
  background: #000;
  color: var(--off-white);
}

.viewport {
  position: fixed;
  inset: var(--frame-size);
  overflow: hidden;
}

.track {
  display: flex;
  width: max-content;
  height: 100%;
  transition: transform 1.5s cubic-bezier(.65, 0, .35, 1);
  will-change: transform;
}

.track.is-instant { transition: none; }

.section {
  position: relative;
  flex: none;
  width: calc(100vw - var(--frame-size) * 2);
  height: 100%;
  overflow: hidden;
  background: #000;
}

.section-inner {
  width: 100%;
  height: 100%;
  padding: 70px var(--gutter) 100px;
}

.divider-line {
  position: absolute;
  top: 0;
  right: 40px;
  left: 40px;
  height: 1px;
  background: rgba(240, 239, 232, .1);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 1.4s var(--ease-smooth);
}

.section.in-view .divider-line { transform: scaleX(1); }

.project-layout {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.project-copy {
  flex: none;
  align-self: center;
  width: 80%;
  margin-bottom: 16px;
}

.section-headline {
  font: 700 clamp(22px, 2.2vw, 35px) / .95 var(--display);
  letter-spacing: -.02em;
  text-transform: uppercase;
}

.section-kicker {
  margin-top: 10px;
  font: 500 clamp(14px, 1.3vw, 20px) / 1.1 var(--display);
}

.section-copy {
  max-width: 58em;
  margin-top: 12px;
  font: 400 clamp(10px, .75vw, 12px) / 1.55 var(--mono);
  color: rgba(240, 239, 232, .72);
}

.word-wrap { display: inline-block; overflow: clip; vertical-align: bottom; }
.word-space { display: inline-block; width: .26em; }
.h-char {
  display: inline-block;
  transform: translateY(115%);
  transition: transform 1.3s var(--ease-smooth);
  transition-delay: min(calc(var(--char-index, 0) * 22ms), 600ms);
}
.section.in-view .h-char { transform: translateY(0); }

.section--overview { background: #000; }
.hero-media { position: absolute; inset: 0; }
.hero-media img { display: block; width: 100%; height: 100%; object-fit: cover; }
.hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0,0,0,.62) 0%, rgba(0,0,0,.28) 45%, transparent 72%);
}
.hero-copy {
  position: absolute;
  z-index: 2;
  left: var(--gutter);
  bottom: 120px;
  width: min(720px, 60vw);
  max-width: calc(100vw - var(--gutter) * 2);
}
.hero-copy-panel { padding: 22px 24px; background: rgba(0,0,0,.72); }
.section--overview .section-headline { font-size: clamp(34px, 4.5vw, 72px); }
.section--overview .section-kicker { margin-top: 12px; color: var(--off-white); }
.hero-description { max-width: 620px; margin-top: 18px; }
.hero-description p {
  margin: 0;
  font-family: var(--mono);
  font-size: clamp(11px, .8vw, 13px);
  font-weight: 400;
  line-height: 1.6;
  color: rgba(240,239,232,.8);
}
.hero-description p + p { margin-top: 10px; }
.hero-description strong { font-weight: 600; color: var(--off-white); }

.video-stage {
  align-self: center;
  width: min(80vw, calc((100vh - 220px) * 16 / 9));
  max-width: 80%;
  aspect-ratio: 16 / 9;
  background: #080808;
}
.video-stage video { display: block; width: 100%; height: 100%; object-fit: contain; background: #080808; }

.image-stage {
  align-self: center;
  width: 80%;
  height: min(62vh, calc(80vw * 9 / 16));
  margin: 0;
  overflow: hidden;
  background: #111;
}
.image-stage img { display: block; width: 100%; height: 100%; object-fit: cover; }

#credits { background: #000; color: var(--off-white); }
#credits .divider-line { background: rgba(240,239,232,.15); }
.credits-list {
  align-self: center;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0 24px;
  width: 80%;
}
.credits-list div { padding: 17px 0; border-top: 1px solid rgba(240,239,232,.18); }
.credits-list dt { font-size: 8px; text-transform: uppercase; letter-spacing: .14em; color: rgba(240,239,232,.55); }
.credits-list dd { margin: 7px 0 0; font: 500 15px var(--display); color: var(--off-white); }

.project-nav {
  position: fixed;
  z-index: 250;
  top: 50%;
  right: calc(var(--frame-size) + 13px);
  transform: translateY(-50%);
}
.project-timeline { display: flex; flex-direction: column; align-items: center; gap: 7px; }
.pt-item {
  display: block;
  width: 9px;
  height: 9px;
  padding: 0;
  border: 1px solid rgba(240,239,232,.5);
  border-radius: 50%;
  font-size: 0;
  background: rgba(0,0,0,.25);
  transition: transform .3s ease, background .3s ease, border-color .3s ease;
}
.pt-item:hover { transform: scale(1.4); border-color: var(--off-white); }
.pt-item.is-active { background: var(--accent); border-color: var(--accent); transform: scale(1.35); }
.pt-segment { width: 1px; height: 14px; overflow: hidden; background: rgba(240,239,232,.12); }
.pt-segment::after {
  content: "";
  display: block;
  width: 100%;
  height: 100%;
  background: var(--accent);
  transform: scaleY(0);
  transform-origin: top;
  transition: transform .7s var(--ease-expo);
}
.pt-segment.is-filled::after { transform: scaleY(1); }
.pt-segment.is-draining::after { transform: scaleY(0); transform-origin: bottom; }

/* Bottom site navigation intentionally inherits from global.css. */

.work { display: flex; flex-direction: column; }
.work-main {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  padding: calc(var(--frame-size) + 24px) clamp(18px, 2.5vw, 40px) calc(var(--frame-size) + 64px);
}
.work-header { margin-bottom: clamp(8px, 1vw, 18px); }
.work-title { font: 700 clamp(20px, 2.4vw, 40px) / 1.05 var(--display); text-transform: uppercase; }
.work-grid {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-template-rows: repeat(3, minmax(0, 1fr));
  gap: clamp(5px, .55vw, 9px);
}

@media (max-width: 900px) {
  .js,
  .js body { height: auto; overflow: auto; }
  .viewport { position: relative; inset: auto; overflow: visible; }
  .track { display: block; width: 100%; height: auto; transform: none !important; }
  .section { width: 100%; height: auto; min-height: 100svh; }
  .section-inner { height: auto; min-height: 100svh; padding: 80px 22px 112px; }
  .project-copy,
  .video-stage,
  .image-stage,
  .credits-list { width: 100%; max-width: 100%; }
  .video-stage { aspect-ratio: 16 / 9; }
  .image-stage { height: auto; aspect-ratio: 16 / 9; }
  .project-nav { display: none; }
  .section--overview { min-height: 100svh; }
  .hero-copy { left: 22px; right: 22px; bottom: 88px; width: auto; max-width: none; }
  .hero-copy-panel { padding: 18px; }
  .section--overview .section-headline { font-size: clamp(30px, 10vw, 54px); }
  .hero-description { max-width: none; margin-top: 14px; }
  .hero-description p { font-size: 11px; line-height: 1.5; }
  .credits-list { grid-template-columns: 1fr; }
  .work,
  .work-main { height: auto; min-height: 0; overflow: visible; }
  .work-main { padding: 72px 22px 112px; }
  .work-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto;
    gap: 12px;
    width: 100%;
    height: auto;
    overflow: visible;
  }
}
