/* Natafanan coming-soon. Ink and paper only; turquoise lives inside the film. */
@font-face{font-family:"NF Amiri";src:url(../fonts/amiri-bold-ar.woff2) format("woff2");font-weight:700;font-style:normal;font-display:swap}
@font-face{font-family:"NF Plex Arabic";src:url(../fonts/plex-arabic-400.woff2) format("woff2");font-weight:400;font-style:normal;font-display:swap}
@font-face{font-family:"NF Plex Arabic";src:url(../fonts/plex-arabic-500.woff2) format("woff2");font-weight:500;font-style:normal;font-display:swap}
@font-face{font-family:"NF DM Sans";src:url(../fonts/dmsans-400.woff2) format("woff2");font-weight:400;font-style:normal;font-display:swap}
@font-face{font-family:"NF DM Sans";src:url(../fonts/dmsans-500.woff2) format("woff2");font-weight:500;font-style:normal;font-display:swap}

:root{
  --ink:#15130F;
  --paper:#F6F1E7;
  --ease:cubic-bezier(.2,.7,.2,1);
  --ar-display:"NF Amiri","Amiri","Traditional Arabic","Segoe UI",serif;
  --ar-text:"NF Plex Arabic","IBM Plex Sans Arabic","Segoe UI",Tahoma,system-ui,sans-serif;
  --latin:"NF DM Sans","DM Sans",system-ui,-apple-system,"Segoe UI",sans-serif;
  --gap:clamp(6px,1.5vh,14px);
}
*,*::before,*::after{box-sizing:border-box}
html{background:var(--ink);color:var(--paper);height:100%;-webkit-text-size-adjust:100%;text-size-adjust:100%}
body{margin:0;height:100%;min-height:100svh;overflow:hidden;background:var(--ink);color:var(--paper);font-family:var(--ar-text);-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility}
.sr-only{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0}

/* ---------- stage: poster + film ---------- */
.stage{position:fixed;inset:-8px;overflow:hidden;background:var(--ink);will-change:transform}
.poster-wrap,.poster,.film{position:absolute;inset:0;width:100%;height:100%;display:block}
.poster,.film{object-fit:cover;object-position:50% 41%}
.film[data-film="portrait"]{object-position:50% 36%}
.film[data-film="landscape"]{object-position:50% 41%}
@media (max-aspect-ratio:109/100){.poster{object-position:50% 36%}}
/* the film fades in from ink and, when it ends, fades out over the poster (the same frame, at full sharpness) */
.film{opacity:0;pointer-events:none;background:var(--ink);transition:opacity .5s ease}
.film.on{opacity:1}
/* with JS the poster waits underneath until the film is over (or fails): it appears at once, so the
   cross-fade never dips to ink, and fades away when the film is replayed */
.js .poster-wrap{opacity:0;transition:opacity .4s ease}
.js.poster-on .poster-wrap{opacity:1;transition:none}

/* ---------- haze, grain, scrim ---------- */
.haze{position:absolute;inset:-25%;opacity:0;mix-blend-mode:screen;pointer-events:none;
  background:
    radial-gradient(38% 30% at 25% 30%,rgba(246,241,231,.55),transparent 70%),
    radial-gradient(42% 34% at 72% 62%,rgba(246,241,231,.40),transparent 70%),
    radial-gradient(30% 26% at 55% 15%,rgba(246,241,231,.30),transparent 70%);
  animation:drift 46s ease-in-out infinite alternate;transition:opacity 2.4s ease}
.held .haze{opacity:.08}
@keyframes drift{
  0%{transform:translate3d(-3%,-2%,0) scale(1)}
  50%{transform:translate3d(2%,3%,0) scale(1.08)}
  100%{transform:translate3d(4%,-2%,0) scale(1.03)}
}
.grain{position:fixed;inset:0;pointer-events:none;opacity:0;transition:opacity 1.4s ease;
  background-size:200px 200px;
  background-image:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n' x='0' y='0' width='100%' height='100%'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' seed='7' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  1 0 0 0 0'/></filter><rect width='200' height='200' filter='url(%23n)'/></svg>")}
.held .grain{opacity:.06}
/* The scrim belongs to the text block: it darkens only what lies behind the text (the logo's reflection
   on short screens and on desktop) and never the logo. Clear a little above the block, solid ink from
   the first line down. */
.copy::before{content:"";position:absolute;z-index:-1;pointer-events:none;--fade:clamp(48px,9vh,96px);
  top:calc(-1*var(--fade));bottom:-16px;left:50%;width:calc(100vw + 32px);margin-left:calc(-50vw - 16px);
  background:linear-gradient(to bottom,rgba(21,19,15,0) 0,rgba(21,19,15,.96) var(--fade),rgba(21,19,15,.96) 100%);
  transition:opacity .6s var(--ease)}
.js .copy::before{opacity:0}
.js.show .copy::before,.js.static .copy::before{opacity:1}

/* ---------- copy ---------- */
.copy{position:fixed;left:0;right:0;bottom:0;z-index:2;display:flex;flex-direction:column;align-items:center;text-align:center;
  gap:var(--gap);padding:0 20px calc(clamp(14px,3.2vh,34px) + env(safe-area-inset-bottom));
  will-change:transform}
.copy p{margin:0}
.rv{will-change:opacity,transform}
.js .rv{opacity:0;transform:translate3d(0,12px,0);transition:opacity .3s ease,transform .3s ease}
.js.show .rv,.js.static .rv{opacity:1;transform:none;
  transition:opacity .6s var(--ease) calc(var(--i,0)*90ms),transform .6s var(--ease) calc(var(--i,0)*90ms)}

.title{margin:0;position:relative;font-family:var(--ar-display);font-weight:700;font-size:clamp(48px,12vw,96px);line-height:1.12;letter-spacing:0;padding-bottom:clamp(6px,1.4vh,14px)}
.title-word{display:inline-block}
/* the long line: starts at the word's start edge (right, in RTL) and runs off the left edge of the screen */
.longline{position:absolute;top:100%;right:0;width:100vw;height:1px;background:var(--paper);opacity:.4;transform-origin:right center;pointer-events:none}
.js .longline{transform:scaleX(0);transition:transform .3s ease}
.js.show .longline,.js.static .longline{transform:scaleX(1);transition:transform 1.1s var(--ease) .15s}

.name-ar{font-family:var(--ar-display);font-weight:700;font-size:clamp(21px,5.4vw,34px);line-height:1.3}
.en{font-family:var(--latin);font-weight:400;font-size:clamp(12px,3.3vw,15px);line-height:1.4;opacity:.7;margin-top:2px!important}
.desc-ar{font-weight:500;font-size:clamp(14px,3.8vw,18px);line-height:1.4}
.en-small{font-size:clamp(11px,3vw,13px);letter-spacing:.03em}
.services{font-weight:400;font-size:clamp(12.5px,3.4vw,15px);line-height:1.5;opacity:.78}

.social{display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:4px 10px;margin-top:2px}
.icons{display:flex;gap:2px;list-style:none;margin:0;padding:0}
.icons a{position:relative;display:grid;place-items:center;width:44px;height:44px;color:var(--paper);opacity:.78;border-radius:50%;text-decoration:none;transition:opacity .2s ease}
.icons svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round}
.icons svg .fill{fill:currentColor;stroke:none}
.icons a::after{content:"";position:absolute;left:12px;right:12px;bottom:6px;height:1px;background:var(--paper);transform:scaleX(0);transition:transform .25s var(--ease)}
.icons a:hover,.icons a:focus-visible{opacity:1}
.icons a:hover::after,.icons a:focus-visible::after{transform:scaleX(1)}
.handle{font-family:var(--latin);font-weight:500;font-size:clamp(13px,3.5vw,15px);letter-spacing:.04em;unicode-bidi:isolate}
.email a{font-family:var(--latin);font-size:clamp(12px,3.3vw,14px);color:var(--paper);opacity:.78;text-decoration:underline;text-decoration-color:transparent;text-underline-offset:4px;transition:opacity .2s ease,text-decoration-color .2s ease}
.email a:hover,.email a:focus-visible{opacity:1;text-decoration-color:var(--paper)}
.email[hidden]{display:none}

a:focus-visible,button:focus-visible{outline:2px solid var(--paper);outline-offset:3px}

/* ---------- replay ---------- */
.replay{position:fixed;z-index:3;top:max(12px,env(safe-area-inset-top));inset-inline-end:max(12px,env(safe-area-inset-right));width:44px;height:44px;padding:0;display:grid;place-items:center;
  background:rgba(21,19,15,.4);color:var(--paper);border:1px solid rgba(246,241,231,.4);border-radius:50%;cursor:pointer;opacity:0;pointer-events:none;transition:opacity .6s ease,border-color .2s ease,background-color .2s ease}
.replay[hidden]{display:none}
.replay.vis{opacity:.78;pointer-events:auto}
.replay.vis:hover,.replay.vis:focus-visible{opacity:1;border-color:var(--paper);background:rgba(21,19,15,.6)}
.replay svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}

/* ---------- state ---------- */
.tab-hidden .haze{animation-play-state:paused}
@media (prefers-reduced-motion:reduce){
  .haze{animation:none}
  .js .rv,.js .longline{transition:none!important}
}
/* landscape: the logo sits at about 24% to 58% of the height (48% of the width, centre 41% from the top), so the block becomes a compact two-column grid below it */
@media (min-aspect-ratio:11/10){
  .copy{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));column-gap:clamp(28px,6vw,96px);row-gap:clamp(4px,1vh,10px);align-items:start;justify-items:center;
    width:min(100%,940px);left:0;right:0;margin-inline:auto;padding-bottom:calc(clamp(12px,2.8vh,30px) + env(safe-area-inset-bottom))}
  .title{grid-column:1/-1;font-size:clamp(40px,8.4vh,84px);padding-bottom:clamp(4px,1vh,10px);margin-bottom:clamp(2px,.8vh,8px)}
  .copy>.g-name{grid-column:1;grid-row:2}
  .copy>.g-desc{grid-column:2;grid-row:2}
  .copy>.services{grid-column:2;grid-row:3}
  .copy>.social{grid-column:1;grid-row:3;margin-top:0}
  .copy>.email{grid-column:1/-1;grid-row:4}
  .name-ar{font-size:clamp(20px,3.6vh,30px)}
  .desc-ar{font-size:clamp(14px,2.2vh,18px)}
  .en{font-size:clamp(12px,1.8vh,15px)}.en-small{font-size:clamp(11px,1.6vh,13px)}
  .services{font-size:clamp(13px,1.9vh,15px)}
}
/* short and wide (a phone held sideways): crop the film from the top only, so the logo moves up, and tighten the text */
@media (min-aspect-ratio:11/10) and (max-height:480px){
  .poster,.film,.film[data-film="landscape"]{object-position:50% 100%}
  .copy{row-gap:2px;padding-bottom:calc(8px + env(safe-area-inset-bottom))}
  .copy::before{--fade:36px}
  .title{font-size:clamp(26px,8.4vh,40px);padding-bottom:2px;margin-bottom:2px}
}
