/* Amlak Elite - the "Brass to Navy" film on the About page. A pinned scene: the visitor's scroll drives the drone,
   the sunset and four chapters. Without motion (reduced-motion), a still with every chapter readable on navy. */
.film { background: var(--ivory); }
.film__pin { padding: 16px 16px 0; }
.film__stage { position: relative; overflow: hidden; background: var(--midnight); color: var(--ivory); min-height: min(860px, calc(100vh - 96px)); display: flex; flex-direction: column; justify-content: space-between; }
.film__media { position: absolute; inset: 0; }
.film__poster, .film__canvas { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.film__poster { object-position: 62% 50%; }
[dir="rtl"] .film__poster { object-position: 38% 50%; }
.film__canvas { opacity: 0; transition: opacity .4s; }
.film.is-live .film__canvas { opacity: 1; }
.film.is-live .film__poster { opacity: 0; }
.film__shade { position: absolute; inset: 0; background: rgba(11, 21, 48, .42); }
[dir="ltr"] .film__shade { background: linear-gradient(90deg, rgba(7, 13, 32, .7) 0%, rgba(7, 13, 32, .35) 45%, rgba(7, 13, 32, .1) 75%); }
[dir="rtl"] .film__shade { background: linear-gradient(-90deg, rgba(7, 13, 32, .7) 0%, rgba(7, 13, 32, .35) 45%, rgba(7, 13, 32, .1) 75%); }
.film__grain, .film__slate, .film__rail, .film__cue, .film__line { display: none; }
.film__copy { position: relative; z-index: 2; padding-block: clamp(64px, 9vw, 120px) 48px; }
.film__ch + .film__ch { margin-top: 64px; }
.film .display, .film__sign { color: var(--ivory); }
.film .display .accent { color: var(--brass-light); }
.film__sign { margin: 0 0 30px; }
.film__ch .h1 { color: var(--ivory); max-width: 13em; margin-top: 4px; }
.film__words { font-weight: 300; font-size: clamp(1.5rem, 2.3vw, 2.15rem); line-height: 1.36; max-width: 17em; margin-top: 8px; color: var(--ivory); }
:lang(ar) .film__words { font-weight: 400; line-height: 1.7; }
.film__svc { list-style: none; margin: 30px 0 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 16rem)); gap: 6px 32px; }
.film__svc a { display: flex; align-items: center; gap: 14px; padding: 12px 0; color: var(--ivory); text-decoration: none; font-size: 15.5px; border-bottom: 1px solid rgba(246, 242, 234, .2); }
.film__svc a:hover span { color: var(--brass-light); }
.film__svc .ic { width: 26px; height: 26px; flex: none; color: var(--brass); transition: filter .5s; }
.film__mark { display: block; height: clamp(110px, 16vh, 176px); width: auto; margin-bottom: 26px; }
.film__cta { display: flex; gap: 14px; flex-wrap: wrap; }
.film__cap { position: relative; z-index: 2; margin: 0 clamp(16px, 3vw, 40px) 14px; font-size: 11px; letter-spacing: .06em; color: var(--slate); text-align: end; }

/* without motion */
html:not(.motion) .film__stage { justify-content: flex-start; }
html:not(.motion) .film__media { bottom: auto; height: min(860px, calc(100vh - 96px)); }
html:not(.motion) .film__copy { display: contents; }
html:not(.motion) .film__ch { position: relative; z-index: 2; width: min(1240px, calc(100% - 48px)); margin-inline: auto; }
html:not(.motion) .film__ch[data-ch="0"] { order: 1; padding-top: clamp(64px, 9vw, 120px); min-height: calc(min(860px, calc(100vh - 96px)) - 60px); }
html:not(.motion) .film__cap { order: 2; }
html:not(.motion) .film__ch[data-ch="1"] { order: 3; margin-top: 56px; }
html:not(.motion) .film__ch[data-ch="2"] { order: 4; }
html:not(.motion) .film__ch[data-ch="3"] { order: 5; margin-bottom: 80px; }

/* with motion: a tall section, the stage pinned under the header, one chapter at a time */
.motion .film { height: 480vh; }
.motion .film__pin { position: sticky; top: 80px; height: calc(100vh - 80px); padding: 16px; }
.motion .film__stage { height: 100%; min-height: 0; display: block; }
.motion .film__copy { position: absolute; inset: 0 0 auto 0; display: grid; padding-block: clamp(52px, 7.5vw, 108px) 0; }
.motion .film__ch { grid-area: 1 / 1; margin: 0; opacity: 0; transform: translateY(22px); visibility: hidden; transition: opacity .6s ease, transform .6s ease, visibility 0s linear .6s; }
.motion .film__ch.on { opacity: 1; transform: none; visibility: visible; transition-delay: 0s; }
.motion .film__words .w { color: rgba(246, 242, 234, .26); transition: color .35s ease; }
.motion .film__words .w.lit { color: var(--ivory); }
.motion .film__svc li { opacity: .36; transition: opacity .6s ease; }
.motion .film__svc li.lit { opacity: 1; }
.motion .film__svc li.lit .ic { filter: drop-shadow(0 0 7px rgba(231, 211, 172, .75)); }
.motion .film__mark path { stroke-dasharray: 1 1; stroke-dashoffset: 1; }
.motion .film__slate { display: flex; align-items: center; gap: 9px; position: absolute; z-index: 3; margin: 0; top: clamp(16px, 2.4vw, 28px); inset-inline-end: clamp(16px, 3vw, 40px); padding: 9px 14px; background: rgba(11, 21, 48, .6);
    font-size: 10.5px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--ivory); }
:lang(ar) .film__slate { letter-spacing: 0; font-size: 12px; }
.film__slate b { font-weight: 600; color: var(--brass); font-variant-numeric: tabular-nums; letter-spacing: .06em; }
.film__slate b::before, .film__phase::before { content: "·"; color: var(--slate); margin-inline-end: 9px; }
.motion .film__cap { position: absolute; z-index: 3; margin: 0; top: calc(clamp(16px, 2.4vw, 28px) + 42px); inset-inline-end: clamp(16px, 3vw, 40px); padding: 5px 10px; background: rgba(11, 21, 48, .6); color: var(--stone); }
.motion .film__rail { display: flex; flex-direction: column; align-items: flex-end; gap: 14px; position: absolute; z-index: 3; inset-inline-end: clamp(16px, 3vw, 40px); top: 50%; transform: translateY(-50%); }
.film__rail a { display: flex; align-items: center; gap: 12px; color: var(--ivory); text-decoration: none; font-size: 10.5px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; }
:lang(ar) .film__rail a { letter-spacing: 0; font-size: 12.5px; }
.film__rail a[data-to]::after { content: ""; width: 22px; height: 2px; background: rgba(246, 242, 234, .5); transition: width .35s ease, background .35s ease; }
.film__rail a span { background: rgba(11, 21, 48, .6); padding: 6px 9px; opacity: 0; transform: translateX(6px); transition: opacity .3s ease, transform .3s ease; }
[dir="rtl"] .film__rail a span { transform: translateX(-6px); }
.film__rail a.on::after { width: 44px; background: var(--brass); }
.film__rail a.on span, .film__rail a:hover span, .film__rail a:focus-visible span { opacity: 1; transform: none; }
.film__rail a:focus-visible { outline: 2px solid var(--brass-light); outline-offset: 3px; }
.film__skip { margin-top: 12px; padding: 7px 10px; background: rgba(11, 21, 48, .6); color: var(--brass-light) !important; }
.film__skip:hover { color: var(--ivory) !important; }
.motion .film__cue { display: flex; align-items: center; gap: 14px; position: absolute; z-index: 3; margin: 0; inset-inline-start: clamp(20px, 4vw, 64px); bottom: clamp(24px, 4vw, 48px);
    font-size: 10.5px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--ivory); transition: opacity .5s ease; }
:lang(ar) .film__cue { letter-spacing: 0; font-size: 13px; }
.film__cue i { display: block; width: 44px; height: 1px; background: var(--brass); transform-origin: left; animation: cue 2.4s ease-in-out infinite; }
[dir="rtl"] .film__cue i { transform-origin: right; }
@keyframes cue { 0%, 100% { transform: scaleX(.25); } 50% { transform: scaleX(1); } }
.film.is-moving .film__cue { opacity: 0; }
.motion .film__line { display: block; position: absolute; z-index: 3; inset-inline: 0; bottom: 0; height: 2px; background: rgba(246, 242, 234, .12); }
.film__line i { display: block; height: 100%; background: var(--brass); transform: scaleX(0); transform-origin: left; }
[dir="rtl"] .film__line i { transform-origin: right; }
.motion .film__grain { display: block; position: absolute; inset: -50%; pointer-events: none; opacity: .07; mix-blend-mode: overlay;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    animation: grain .9s steps(3) infinite; }
@keyframes grain { 0% { transform: translate(0, 0); } 33% { transform: translate(-2%, 1.5%); } 66% { transform: translate(1.5%, -2%); } 100% { transform: translate(0, 0); } }

/* who we are */
.who { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: 48px; align-items: start; }
.who__text p { font-size: 1.125rem; line-height: 1.75; color: var(--ink); max-width: 40em; }
.who__text p + p { margin-top: 20px; }

/* phones: the film sits above the words, so text never covers the tower */
@media (max-width: 820px) {
    .film__pin { padding: 10px 10px 0; }
    .film__stage { min-height: 0; }
    html:not(.motion) .film__media { height: 62vw; }
    html:not(.motion) .film__ch[data-ch="0"] { min-height: 0; padding-top: 34px; }
    html:not(.motion) .film__ch[data-ch="1"] { margin-top: 40px; }
    .film__media { position: relative; inset: auto; height: 62vw; max-height: 420px; }
    .film__poster, .film__canvas { object-position: 68% 50%; }
    [dir="rtl"] .film__poster, [dir="rtl"] .film__canvas { object-position: 30% 50%; }
    .film__shade { display: none; }
    .film__copy { padding-block: 34px 30px; }
    .film__ch + .film__ch { margin-top: 44px; }
    .film__words { font-size: 1.45rem; }
    .film__svc { grid-template-columns: 1fr; }
    .film__cap { text-align: start; margin-top: -8px; }
    .motion .film { height: 420vh; }
    .motion .film__pin { padding: 0; top: 68px; height: calc(100vh - 68px); height: calc(100svh - 68px); }
    .motion .film__stage { display: flex; flex-direction: column; }
    .motion .film__media { position: relative; height: 56vw; max-height: 46vh; flex: none; }
    .motion .film__copy { position: relative; inset: auto; flex: 1; min-height: 0; padding: 24px 20px 0; overflow: hidden; }
    .motion .film__ch .display { font-size: 2.15rem; }
    .motion .film__words { font-size: 1.32rem; margin-top: 4px; }
    .motion .film__ch .h1 { font-size: 1.6rem; }
    .motion .film__svc { grid-template-columns: 1fr 1fr; gap: 0 16px; margin-top: 14px; }
    .motion .film__svc a { font-size: 13.5px; padding: 9px 0; gap: 10px; }
    .motion .film__svc .ic { width: 22px; height: 22px; }
    .motion .film__mark { height: 84px; margin-bottom: 14px; }
    .motion .film__sign { margin-bottom: 18px; }
    .motion .film__rail, .motion .film__cue { display: none; }
    .motion .film__slate { top: 10px; inset-inline-end: 10px; padding: 7px 10px; font-size: 9.5px; gap: 7px; }
    .motion .film__cap { top: calc(min(56vw, 46vh) - 30px); inset-inline-end: auto; inset-inline-start: 10px; font-size: 10px; padding: 4px 8px; }
    .who { grid-template-columns: 1fr; gap: 20px; }
    .who__text p { font-size: 1.05rem; }
}
