/* Desktop chapter composition */
.journeytitle {
  justify-content: flex-start;
  padding-top: 2.5svh;
  gap: 2svh;
}
.journeyimage {
  width: min(18vw, 26svh);
  height: auto;
  max-height: 35svh;
  aspect-ratio: 3 / 4;
  object-fit: contain;
}
.ji1, .ji2 { top: 23%; }
.ji3, .ji4 { bottom: 4%; }
.ji1, .ji3 { left: 1.5%; }
.ji2, .ji4 { right: 1.5%; }
.journey h2,
html[lang=ar] .journey h2 { width: 62%; }
.glyph { will-change: auto; }
.mobileText { font-style: normal; }

/* Phone composition uses native scrolling and a smaller number of moving layers. */
@media (max-width: 700px) {
  html { scroll-behavior: auto; }
  .hero {
    height: calc(100svh - 108px);
    min-height: 600px;
    padding-inline: 20px;
  }
  .hero .sideart { display: none; }
  .hero:not(.widefilm) .heroart {
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
  }
  .hero.widefilm #heroart {
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(.35);
  }
  .hero.widefilm #loop {
    left: 0;
    top: 16%;
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    object-fit: contain;
  }
  .hero .heromain { padding-bottom: 22px; }
  .hero .lock { width: min(90%, 360px); }
  .hero .herocopy h2,
  html[lang=ar] .hero .herocopy h2 {
    font-size: 24px;
    line-height: 1.45;
  }
  .herotop { font-size: 12px; letter-spacing: .03em; }
  .herocaption { font-size: 11px; }
  .sequencer button { font-size: 12px; padding-inline: 8px; }

  .journey { height: 420svh; }
  .journeysticky { height: 100svh; min-height: 640px; }
  .journeytitle {
    display: grid;
    grid-template-columns: 100%;
    grid-template-rows: auto 18svh minmax(0, 1fr) 18svh auto auto;
    justify-items: center;
    align-items: center;
    align-content: stretch;
    height: 100%;
    padding: 3svh 20px;
    gap: 1svh;
  }
  .journeytitle > .eyebrow {
    grid-row: 1;
    font-size: clamp(30px, 9vw, 44px);
    line-height: 1.15;
  }
  .journey h2,
  html[lang=ar] .journey h2 {
    grid-row: 3;
    width: 100%;
    height: auto;
    min-height: 0;
    margin: 0;
    gap: 12px;
    justify-content: center;
    font-size: clamp(29px, 8.3vw, 42px);
    line-height: 1.2;
  }
  html[lang=ar] .journey h2 {
    font-size: clamp(21px, 6.5vw, 30px);
    line-height: 1.55;
  }
  html[lang=ar] .journeytitle > .eyebrow {
    font-size: clamp(26px, 7.8vw, 38px);
    line-height: 1.4;
  }
  .journey h2 > span { perspective: none; }
  .mobileText {
    display: block;
    white-space: nowrap;
    visibility: hidden;
    clip-path: inset(calc((1 - var(--line-reveal, 0)) * 100%) 0 0 0);
    transform: translateY(calc((1 - var(--line-reveal, 0)) * 24px));
  }
  .journeytitle > p,
  html[lang=ar] .journeytitle > p {
    grid-row: 5;
    margin: 0;
    font-size: clamp(23px, 6.6vw, 32px);
    line-height: 1.35;
  }
  .journeytitle > .cinematicContact {
    grid-row: 6;
    font-size: 17px;
    line-height: 1.4;
    padding: 9px 25px;
  }
  .journeyimage {
    width: min(27vw, 116px);
    height: auto;
    max-height: 19svh;
    aspect-ratio: 3 / 4;
    object-fit: contain;
  }
  .ji1, .ji2 { top: 12svh; }
  .ji3, .ji4 { bottom: 16svh; }
  .ji1, .ji3 { left: 14%; }
  .ji2, .ji4 { right: 14%; }

  .work { padding-top: 55px; }
  .project, .project:nth-child(even) {
    position: relative;
    top: auto;
    margin-bottom: 28px;
    background: #171321;
  }
  .project .poster {
    width: 100%;
    height: auto;
    min-height: 0;
    aspect-ratio: 16 / 9;
  }
  .project[data-format="SCOPE"] .poster { aspect-ratio: 2.35; }
  .project[data-format="9:16"] .poster {
    aspect-ratio: 9 / 16;
    max-height: 75svh;
  }
  .poster img, .poster video { object-fit: contain; }
  .poster::after { display: none; }
  .projectline {
    position: static;
    inset: auto;
    display: block;
    padding: 17px 20px 22px;
    background: none;
    text-align: start;
  }
  .project h3, html[lang=ar] .project h3 {
    font-size: clamp(25px, 7vw, 34px);
    line-height: 1.4;
    text-shadow: none;
  }
  .project small { margin-top: 5px; font-size: 16px; }
  .project .playdot {
    width: 44px;
    height: 44px;
    bottom: 12px;
    inset-inline-end: 14px;
  }
  #screen iframe {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    max-height: 72svh;
  }
  #screen iframe.portrait {
    width: min(100%, 40svh);
    height: 70svh;
    aspect-ratio: 9 / 16;
  }
  .reveal {
    transform: translateY(18px);
    transition-duration: .45s;
  }
  .still.reveal { transform: translateY(25px); }
  .still.revealed { transform: none; }
}

@media (max-height: 700px) and (max-width: 700px) {
  .journeysticky { min-height: 0; }
  .journeytitle {
    grid-template-rows: auto 16svh minmax(0, 1fr) 16svh auto auto;
    padding-block: 2svh;
    gap: .8svh;
  }
  .journey h2 { font-size: min(8.3vw, 5svh); gap: 8px; }
  html[lang=ar] .journey h2 { font-size: min(6.5vw, 4.2svh); }
  .journeytitle > .eyebrow { font-size: min(9vw, 5.5svh); }
  html[lang=ar] .journeytitle > .eyebrow { font-size: min(7.8vw, 5svh); }
  .journeyimage { max-height: 16svh; width: min(26vw, 95px); }
  .ji1, .ji2 { top: 12svh; }
  .ji3, .ji4 { bottom: 17svh; }
  .journeytitle > p, html[lang=ar] .journeytitle > p {
    font-size: min(6.6vw, 4.8svh);
  }
}
@media (prefers-reduced-motion: reduce) {
  .journey { height: auto; }
  .journeysticky, .journeytitle { height: auto; min-height: 680px; }
  .mobileText { visibility: visible !important; clip-path: none; transform: none; }
}
.studiofilm { --studio: 1; }
@media (max-width: 700px) and (min-height: 701px) {
  html[lang=ar] .journey h2 { font-size: clamp(24px, 7.2vw, 32px); }
  html[lang=ar] .journeytitle > .eyebrow { font-size: clamp(28px, 8.7vw, 40px); }
}
@media (max-width: 1000px) and (max-height: 520px) {
  html { scroll-behavior: auto; }
  .journey { height: 420svh; }
  .journeysticky { min-height: 0; }
  .mobileText {
    display: block;
    font-style: normal;
    white-space: nowrap;
    clip-path: inset(calc((1 - var(--line-reveal, 0)) * 100%) 0 0 0);
    transform: translateY(calc((1 - var(--line-reveal, 0)) * 18px));
  }
  .hero { min-height: 330px; height: calc(100svh - 60px); }
  .hero.widefilm #loop { height: 100%; top: 0; object-fit: contain; }
  .hero.widefilm #heroart { filter: brightness(.3); }
  .project, .project:nth-child(even) { position: relative; margin-bottom: 25px; }
  .project .poster { height: auto; min-height: 0; aspect-ratio: 16 / 9; }
  .project[data-format="SCOPE"] .poster { aspect-ratio: 2.35; }
  .project[data-format="9:16"] .poster { aspect-ratio: 9 / 16; max-height: 85svh; }
  .poster img, .poster video { object-fit: contain; }
  .projectline { position: static; padding: 18px 25px; background: #171321; text-align: start; }
  .project h3, html[lang=ar] .project h3 { font-size: 30px; line-height: 1.4; }
}
@media (prefers-reduced-motion: reduce) {
  .mobileText { visibility: visible !important; clip-path: none; transform: none; }
}
@media (max-width:1000px) and (max-height:520px){.project .poster{max-height:82svh;background:#0d0c14}.hero.widefilm #loop{object-fit:contain}}
@media (max-width:1000px) and (max-height:520px){.project .poster{width:100%}}
