/* AL-WASET First Company — home page stage ("Bronze and Time").
   Loaded after site.css on the three home pages only. Positions use logical
   properties (inset-inline-start, margin-inline-start) so the Arabic edition
   mirrors itself. */

/* ----------------------------------------------------------------- base */
html.cine { background: #000; -ms-overflow-style: none; scrollbar-width: none; scroll-behavior: auto; }
html.cine::-webkit-scrollbar { display: none; width: 0; }
.pg-cine {
  --cine-pad: 60px;
  --col: calc(25vw - 60px);
  --title-face: 'Italiana', 'Times New Roman', serif;
  --body-face: 'Outfit', system-ui, sans-serif;
  --font-display: var(--title-face);
  --font-sans: var(--body-face);
  --font-cond: var(--body-face);
  --font-serif: var(--title-face);
  min-height: 100vh; margin: 0; overflow-x: hidden;
  background: #000; color: #fff;
  font-family: var(--body-face);
}
html[lang="ar"] .pg-cine { --title-face: 'Amiri', 'Noto Naskh Arabic', serif; --body-face: 'IBM Plex Sans Arabic', Tahoma, sans-serif; }
html[lang="zh-Hans"] .pg-cine { --title-face: 'Noto Serif SC', 'Songti SC', 'STSong', serif; --body-face: 'Outfit', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif; }
.pg-cine ::selection { background: #fff6ed; color: #000; }

#webgl { position: fixed; inset: 0; z-index: 1; display: block; width: 100%; height: 100%; outline: none; opacity: 0; transition: opacity 1.6s ease .2s; }
.cine-ready #webgl { opacity: 1; }
/* without WebGL the journey runs over a still, darkened photograph */
.cine-fallback { position: fixed; inset: 0; z-index: 0; display: none; background: #000 url("../../images/hero-banner-1600.jpg") 62% 30% / cover no-repeat; opacity: .32; }
.no-webgl .cine-fallback { display: block; }

/* ---------------------------------------------------------------- cursor */
.cursor-inner, .cursor-outer { display: none; }
.has-cursor .pg-cine, .has-cursor .pg-cine * { cursor: none !important; }
.has-cursor .cursor-inner, .has-cursor .cursor-outer { display: block; }
.cursor-inner {
  position: fixed; top: 0; left: 0; z-index: 9999; width: 6px; height: 6px; will-change: transform;
  border: 2px solid #fff; border-radius: 50%; transform: translate(-50%, -50%); pointer-events: none;
}
.cursor-outer {
  position: fixed; top: 0; left: 0; z-index: 9998; width: 40px; height: 40px; will-change: transform;
  border: 1.5px solid rgba(255, 255, 255, .7); border-radius: 50%;
  transform: translate(-50%, -50%); pointer-events: none;
  transition: width .3s, height .3s, background .3s, border-color .3s;
}
.cursor-outer.is-hover { width: 64px; height: 64px; background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .9); }
.cursor-away .cursor-inner, .cursor-away .cursor-outer { opacity: 0; }

/* ---------------------------------------------------------------- header */
.cine-header {
  position: fixed; top: 0; inset-inline: 0; z-index: 40;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  height: 70px; padding: 0 var(--cine-pad);
}
.cine-header { transition: background-color .4s ease; }
.cine-past .cine-header { background: #000; box-shadow: 0 1px 0 rgba(255, 255, 255, .1); }
.cine-brand { color: #fff; font-size: 14px; font-weight: 600; letter-spacing: 5px; text-transform: uppercase; text-decoration: none; white-space: nowrap; }
html[lang="ar"] .cine-brand { letter-spacing: 0; font-size: 17px; }
.cine-nav { display: flex; align-items: center; gap: 24px; }
.cine-nav a { color: #fff; font-size: 10px; font-weight: 500; letter-spacing: 2px; text-transform: uppercase; text-decoration: none; transition: opacity .3s; }
html[lang="ar"] .cine-nav a, html[lang="zh-Hans"] .cine-nav a { font-size: 13px; letter-spacing: 1px; }
.cine-nav a:hover, .cine-nav a:focus-visible { opacity: .65; }
.nav-dot { width: 3px; height: 3px; flex: none; border-radius: 50%; background: rgba(255, 255, 255, .2); }
.cine-actions { display: flex; align-items: center; gap: 18px; }
.cine-langs { display: flex; gap: 12px; }
.cine-langs a { color: rgba(255, 255, 255, .55); font-size: 10px; font-weight: 500; letter-spacing: 1.5px; text-decoration: none; transition: color .3s; }
.cine-langs a:hover, .cine-langs a[aria-current] { color: #fff; }
.contact-btn, .pill {
  display: inline-flex; align-items: center; gap: 8px; padding: 10px 24px; border-radius: 20px;
  background: #fff; color: #000; font-size: 10px; font-weight: 600; letter-spacing: 1px; text-transform: uppercase;
  text-decoration: none; white-space: nowrap; transition: transform .3s, background .3s, color .3s;
}
html[lang="ar"] :is(.contact-btn, .pill), html[lang="zh-Hans"] :is(.contact-btn, .pill) { font-size: 13px; letter-spacing: .5px; }
.contact-btn:hover, .pill:hover { transform: scale(1.05); background: #f0f0f0; color: #000; }
.btn-circle { display: inline-block; width: 6px; height: 6px; border: 1px solid #000; border-radius: 50%; }
.pill--ghost { background: transparent; color: #fff; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .55); }
.pill--ghost:hover { background: #fff; color: #000; }
.pill--ghost .btn-circle { border-color: currentColor; }
.cine-menu { display: none; align-items: center; justify-content: center; width: 40px; height: 40px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: #fff; }
.cine-menu .icon { width: 22px; height: 22px; }
.pg-cine :focus-visible { outline: 2px solid #fff6ed; outline-offset: 4px; border-radius: 4px; }

/* -------------------------------------------------------- overlay + slides */
.cine-ui {
  position: fixed; inset: 0; z-index: 10; pointer-events: none;
  padding: 0 var(--cine-pad) 40px; box-sizing: border-box;
  transition: opacity .6s ease, visibility .6s;
}
.cine-past .cine-ui, .cine-past .grid-lines, .cine-past .grid-horizontal-line, .cine-past #slide-2-img { opacity: 0; visibility: hidden; }

.slide { position: absolute; bottom: 12%; pointer-events: none; }
.slide.active { pointer-events: auto; }

#slide-1 { inset-inline-start: 0; width: 100%; }
#slide-1 .slide-title { margin-inline-start: 60px; }
#slide-1 .desc-row { position: relative; display: flex; width: 100%; }
#slide-1 .col-1 { margin-inline-start: 60px; width: var(--col); max-width: var(--col); }
#slide-1 .col-2 { position: absolute; inset-inline-start: calc(25vw + 40px); width: var(--col); max-width: var(--col); }
#slide-1 .slide-actions { margin-inline-start: 60px; }

#slide-2 { inset-inline-start: 0; width: 100%; }
#slide-2 .slide-title { margin-inline-start: calc(25vw + 40px); }
#slide-2 .slide-desc, #slide-2 .slide-actions { margin-inline-start: calc(25vw + 40px); width: var(--col); max-width: var(--col); }
#slide-2 .slide-actions { width: auto; max-width: none; }

#slide-2-img {
  position: fixed; top: 90px; inset-inline-start: 60px; z-index: 2;
  width: var(--col); aspect-ratio: 1 / 1; overflow: hidden; margin: 0; pointer-events: none;
  clip-path: inset(0 0 100% 0); opacity: 0;
  transition: clip-path 1.8s cubic-bezier(.16, 1, .3, 1), opacity .8s ease;
}
#slide-2-img img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 62%; transform: scale(1.15); transition: transform 1.8s cubic-bezier(.16, 1, .3, 1); }
#slide-2-img.active { clip-path: inset(0); opacity: 1; }
#slide-2-img.active img { transform: scale(1); }

#slide-3 { inset-inline-start: calc(50vw + 20px); width: var(--col); max-width: var(--col); }
#slide-3 .slide-title { white-space: nowrap; font-size: min(116px, 6.5vw); }

#slide-4 { inset-inline-start: 60px; max-width: 600px; }

.slide-title {
  margin: 0 0 20px; color: #fff6ed;
  font-family: var(--title-face); font-size: min(116px, 8vw); font-weight: 400; line-height: 1; letter-spacing: 2px;
}
html[lang="ar"] .slide-title { font-size: min(96px, 6.6vw); font-weight: 400; line-height: 1.3; letter-spacing: 0; }
/* English words inside the Arabic and Chinese editions keep the Latin faces */
.pg-cine [lang="en"] { --font-sans: 'Outfit', system-ui, sans-serif; --font-cond: 'Outfit', system-ui, sans-serif; --font-display: 'Italiana', serif; font-family: 'Outfit', system-ui, sans-serif; }
html[lang="zh-Hans"] .slide-title { font-size: min(92px, 6.2vw); line-height: 1.15; letter-spacing: .06em; font-weight: 400; }
.slide-desc {
  margin: 0; color: #d1d5db; font-size: 16px; font-weight: 300; line-height: 1.7; letter-spacing: .5px;
  opacity: 0; transform: translateY(30px);
  transition: opacity .8s cubic-bezier(.25, 1, .5, 1), transform .8s cubic-bezier(.25, 1, .5, 1);
  transition-delay: .4s;
}
html[lang="ar"] .slide-desc { font-size: 17px; line-height: 1.85; letter-spacing: 0; }
html[lang="zh-Hans"] .slide-desc { line-height: 1.85; letter-spacing: .02em; }
.slide-desc i { color: #fff6ed; }
/* the copy can cross the bright bronze mid-orbit: a soft dark halo keeps it readable */
.slide-title, .slide-desc { text-shadow: 0 0 2px rgba(0, 0, 0, .55), 0 2px 18px rgba(0, 0, 0, .85); }
.slide-actions {
  display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px;
  opacity: 0; transform: translateY(30px);
  transition: opacity .8s cubic-bezier(.25, 1, .5, 1), transform .8s cubic-bezier(.25, 1, .5, 1);
  transition-delay: .6s;
}
.slide.active .slide-desc, .slide.active .slide-actions { opacity: 1; transform: none; }

.slide-title .char {
  display: inline-block; opacity: 0; transform: translateY(50px); filter: blur(12px);
  transition: opacity .8s cubic-bezier(.25, 1, .5, 1), transform .8s cubic-bezier(.25, 1, .5, 1), filter .8s cubic-bezier(.25, 1, .5, 1);
}
.slide.active .slide-title .char { opacity: 1; transform: none; filter: blur(0); }
.slide-title .word { display: inline-block; white-space: nowrap; }
/* before the script runs (or without it) the first chapter is simply there */
html:not(.js) #slide-1 .slide-desc, html:not(.js) #slide-1 .slide-actions { opacity: 1; transform: none; }

/* ------------------------------------------------------------- grid + dots */
.grid-horizontal-line { position: fixed; top: 70px; inset-inline: 0; z-index: 5; height: 1px; background: rgba(255, 255, 255, .12); pointer-events: none; transition: opacity .6s, visibility .6s; }
.grid-lines {
  position: fixed; top: 0; inset-inline: 40px; z-index: 5; height: 100vh;
  display: flex; justify-content: space-between; pointer-events: none; transition: opacity .6s, visibility .6s;
}
.grid-line { position: relative; width: 1px; height: 100%; background: rgba(255, 255, 255, .12); }
.grid-line:nth-child(3) { margin-top: 70px; height: calc(100vh - 70px); }
.grid-dot {
  position: absolute; left: 50%; width: 6px; height: 6px; border-radius: 50%;
  background: rgba(255, 255, 255, .35); box-shadow: 0 0 4px rgba(255, 255, 255, .15); transform: translate(-50%, -50%);
}
.grid-dot { top: 0; will-change: transform; }
.grid-dot.top { transform: translate(-50%, 20vh); }
.grid-dot.bottom { transform: translate(-50%, 80vh); }
.story-dashes { position: absolute; top: 50%; left: 50%; display: flex; flex-direction: column; gap: 12px; transform: translate(-50%, -50%); }
.story-dash { width: 2px; height: 40px; overflow: hidden; border-radius: 2px; background: rgba(255, 255, 255, .15); }
.story-dash-fill { width: 100%; height: 100%; border-radius: 2px; background: #fff; transform: scaleY(0); transform-origin: top; will-change: transform; }

/* ------------------------------------------------------------ the journey */
.journey { position: relative; height: 900vh; pointer-events: none; }

/* -------------------------------------------- after the journey: the page */
.after { position: relative; z-index: 20; background: #000; color: #e9e6e1; }
.after .dossier { background: #000; border-bottom-color: rgba(255, 255, 255, .1); }
.after .dossier--alt { background: #070707; }
.after .dossier__grid { grid-template-columns: minmax(0, 23rem) minmax(0, 1fr); }
.after .dossier__title { color: #fff6ed; font-family: var(--title-face); font-weight: 400; font-size: clamp(2.2rem, 1.4rem + 1.6vw, 2.9rem); line-height: 1.02; letter-spacing: .01em; }
html[lang="ar"] .after .dossier__title { line-height: 1.35; }
.after .dossier__lede, .after .faq__a { color: #c7cbd1; }
.after .faq__q { color: #fff6ed; font-family: var(--body-face); font-weight: 400; }
.after .faq, .after .dossier .faq { border-top-color: rgba(255, 255, 255, .6); }
.after .faq__item { border-bottom-color: rgba(255, 255, 255, .12) !important; }
.after .faq__toggle { border-color: rgba(255, 255, 255, .35); color: #fff; }
.after .faq__item[open] .faq__toggle { background: #fff; border-color: #fff; color: #000; }
.after .dossier__link, .after .faq__a a { color: #fff6ed; }
.after .fx { background: #0b0b0b; border-color: rgba(255, 255, 255, .12); }
.after .fx__head { background: #0b0b0b; border-bottom-color: rgba(255, 255, 255, .12); }
.after .fx__title { color: #fff6ed; font-family: var(--title-face); font-weight: 400; }
.after .fx__tile { background: #000; border-color: rgba(255, 255, 255, .12); }
.after .fx__tile[aria-pressed="true"] { border-color: #fff6ed; background: rgba(255, 246, 237, .06); }
.after .btn--dark { --btn-bg: #fff; --btn-fg: #000; --btn-bd: #fff; border-radius: 20px; }

/* footer: the name returns at full width */
.pg-cine .ftr { position: relative; z-index: 20; background: #000; border-top: 1px solid rgba(255, 255, 255, .1); }
.pg-cine .ftr .brand__mark { box-shadow: none; }
.ftr__name {
  margin: clamp(2.5rem, 6vw, 4.5rem) 0 0; color: #fff6ed;
  font-family: var(--title-face); font-size: clamp(4rem, 15.5vw, 15rem); font-weight: 400; line-height: .9; letter-spacing: .02em; white-space: nowrap;
}
html[lang="ar"] .ftr__name { font-size: clamp(3.4rem, 13vw, 12rem); font-weight: 400; line-height: 1.2; letter-spacing: 0; }

/* the to-top button and drawer keep the dark tokens from site.css */
.pg-cine .to-top { background: #fff; color: #000; border: 0; }

/* ------------------------------------------------------------- tablet */
@media (max-width: 1100px) {
  .cine-langs { display: none; }
}

/* -------------------------------------------------------------- phone */
@media (max-width: 900px) {
  .after .dossier__grid { grid-template-columns: minmax(0, 1fr); }
  .pg-cine { --cine-pad: 20px; }
  .cine-header { height: 64px; }
  .cine-nav { display: none; }
  .cine-menu { display: inline-flex; }
  .contact-btn { padding: 9px 18px; }
  .grid-horizontal-line { top: 64px; }
  .grid-lines { inset-inline: 14px; }
  .grid-line:nth-child(3) { margin-top: 64px; height: calc(100vh - 64px); }
  .grid-line:nth-child(2), .grid-line:nth-child(4) { visibility: hidden; }

  .cine-ui { padding: 0 20px 28px; }
  .slide, #slide-1, #slide-2, #slide-3, #slide-4 { inset-inline: 20px; width: auto; max-width: none; bottom: max(28px, env(safe-area-inset-bottom)); }
  #slide-1 .slide-title, #slide-2 .slide-title, #slide-1 .col-1, #slide-1 .slide-actions,
  #slide-2 .slide-desc, #slide-2 .slide-actions { margin-inline-start: 0; width: auto; max-width: 34rem; }
  #slide-1 .desc-row { display: block; }
  #slide-1 .col-2 { position: static; width: auto; max-width: 34rem; margin-top: 10px; }
  #slide-3 .slide-title { white-space: normal; }
  .slide-title { font-size: clamp(46px, 13vw, 72px); margin-bottom: 14px; }
  html[lang="ar"] .slide-title { font-size: clamp(40px, 11vw, 60px); }
  html[lang="zh-Hans"] .slide-title { font-size: clamp(38px, 10.5vw, 56px); }
  #slide-3 .slide-title { font-size: clamp(46px, 13vw, 72px); }
  html[lang="ar"] #slide-3 .slide-title { font-size: clamp(40px, 11vw, 60px); }
  html[lang="zh-Hans"] #slide-3 .slide-title { font-size: clamp(38px, 10.5vw, 56px); }
  .slide-desc { font-size: 15px; line-height: 1.6; }
  .slide-actions { margin-top: 18px; }
  .pill { padding: 11px 20px; font-size: 11px; }
  #slide-2-img { top: 84px; inset-inline-start: 20px; width: min(46vw, 220px); }
}
@media (max-width: 420px) {
  #slide-1 .col-2 { display: none; }
}

/* ------------------------------------------------------- reduced motion */
@media (prefers-reduced-motion: reduce) {
  .slide-title .char { filter: none; transform: none; }
  .slide-desc, .slide-actions { transform: none; }
  #slide-2-img, #slide-2-img img { transition-duration: .01ms; }
  #webgl { transition: none; }
}

/* ---------------------------------------------------- static fallback
   Added by the inline script in each home page when the 3D stage has not
   started (a blocked file, an old browser): the four chapters become an
   ordinary page instead of nine screens of empty black. */
.cine-static .journey, .cine-static .grid-lines, .cine-static .grid-horizontal-line,
.cine-static #webgl, .cine-static #slide-2-img, .cine-static .cursor-inner, .cine-static .cursor-outer { display: none !important; }
.cine-static .cine-fallback { display: block; }
.cine-static .cine-header { background: #000; box-shadow: 0 1px 0 rgba(255, 255, 255, .1); }
.cine-static .cine-ui { position: relative; inset: auto; z-index: 10; padding: 120px var(--cine-pad) 24px; pointer-events: auto; opacity: 1; visibility: visible; }
.cine-static .slide { position: relative !important; inset: auto !important; bottom: auto !important; width: auto !important; max-width: 46rem !important; margin: 0 0 clamp(64px, 10vw, 120px); pointer-events: auto; }
.cine-static .slide :is(.slide-title, .slide-desc, .slide-actions, .col-1, .col-2) { margin-inline-start: 0 !important; width: auto !important; max-width: 40rem !important; }
.cine-static #slide-1 .desc-row { display: block; }
.cine-static #slide-1 .col-2 { position: static; margin-top: 12px; }
.cine-static #slide-3 .slide-title { white-space: normal; }
.cine-static .slide-desc, .cine-static .slide-actions { opacity: 1; transform: none; }
