:root{
  --bg:#000;
  --fg:#fff;
  --muted:rgba(255,255,255,0.55);
  --muted2:rgba(255,255,255,0.35);
  --card:rgba(255,255,255,0.03);
  --card2:rgba(255,255,255,0.06);
  --line:rgba(255,255,255,0.12);
  --shadow:0 20px 80px rgba(0,0,0,0.55);
  --radius:18px;
}

*{ box-sizing:border-box; }
html,body{ height:100%; }
body{
  margin:0;
  background:var(--bg);
  color:var(--fg);
  font-family:Roboto, system-ui, -apple-system, Segoe UI, Arial, sans-serif;
}

/* ---------- Language menu ---------- */
.lang{
  position:fixed;
  top:18px;
  right:18px;
  z-index:50;
}
.lang__btn{
  border:1px solid var(--line);
  background:rgba(0,0,0,0.25);
  color:var(--fg);
  padding:10px 12px;
  border-radius:10px;
  font-size:12px;
  letter-spacing:0.12em;
  text-transform:uppercase;
  cursor:pointer;
}
.lang__chev{ margin-left:6px; opacity:0.7; }
.lang__menu{
  position:absolute;
  right:0;
  top:46px;
  background:rgba(0,0,0,0.65);
  border:1px solid var(--line);
  border-radius:12px;
  padding:8px;
  min-width:110px;
  display:none;
  backdrop-filter:blur(10px);
}
.lang__menu.is-open{ display:block; }
.lang__item{
  width:100%;
  text-align:left;
  background:transparent;
  border:none;
  color:var(--fg);
  padding:10px 10px;
  border-radius:10px;
  cursor:pointer;
  font-size:12px;
  letter-spacing:0.08em;
  text-transform:uppercase;
}
.lang__item:hover{ background:rgba(255,255,255,0.06); }

/* ---------- Video widget ---------- */
.video-widget{
  position:fixed;
  left:18px;
  bottom:18px;
  z-index:40;
  width:220px;
  opacity:0;
  transform:translateX(-140%) translateZ(0);
  transition: transform 900ms ease, opacity 900ms ease;
}
.video-widget__btn{
  width:100%;
  border:1px solid var(--line);
  border-radius:12px;
  background:rgba(0,0,0,0.25);
  color:var(--fg);
  cursor:pointer;
  padding:10px;
  text-align:left;
  display:block;
}
.video-widget__top{
  display:flex;
  align-items:center;
  justify-content:space-between;
  margin-bottom:10px;
  font-size:12px;
  letter-spacing:0.16em;
  text-transform:uppercase;
}
.video-widget__thumb{
  width:100%;
  aspect-ratio:16/9;
  border-radius:10px;
  overflow:hidden;
  background:rgba(255,255,255,0.04);
  border:1px solid rgba(255,255,255,0.08);
}
.video-widget__thumbVideo{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
  filter:saturate(0.92) contrast(1.08) brightness(0.88);
}

/* ---------- Video modal ---------- */
.video-modal{
  position:fixed;
  inset:0;
  z-index:100;
  display:none;
}
.video-modal.is-open{ display:block; }
.video-modal__backdrop{
  position:absolute;
  inset:0;
  background:rgba(0,0,0,0.75);
  backdrop-filter:blur(8px);
}
.video-modal__panel{
  position:absolute;
  left:50%;
  top:50%;
  transform:translate(-50%,-50%);
  width:min(1485px, 92vw);
  background:rgba(0,0,0,0.45);
  border:1px solid var(--line);
  border-radius:16px;
  box-shadow:var(--shadow);
  overflow:hidden;
}
.video-modal__close{
  position:absolute;
  top:10px;
  right:12px;
  z-index:2;
  width:38px;
  height:38px;
  border-radius:10px;
  border:1px solid var(--line);
  background:rgba(0,0,0,0.35);
  color:var(--fg);
  cursor:pointer;
  font-size:22px;
  line-height:36px;
}
.video-modal__video{
  width:100%;
  height:auto;
  display:block;
}

/* ---------- Intro stage ---------- */
.stage--intro{
  position:relative;
  height: 280vh; /* scroll runway for intro stage */
}
.stage--intro .intro-pin{
  position:sticky;
  top:0;
  height:100vh;
  overflow:hidden;
}
.stage--intro .intro-pin .panel{
  position:absolute;
  inset:0;
  height:100%;
}

.panel__inner{
  position:relative;
  width:100%;
  height:100%;
}
.panel__inner--index{
  display:flex;
  align-items:center;
  justify-content:center;
}
.index__center{
  text-align:center;
  opacity:1;
  transform:translateY(0);
  transition:none;
}
.index__logo{
  width:min(520px, 64vw);
  height:auto;
  opacity:0.30;
  display:block;
  margin:0 auto 14px;
}
.index__tagline{
  font-size:13px;
  letter-spacing:0.22em;
  text-transform:uppercase;
  color:#fff;
}
.index__scroll{
  margin-top:22px;
  font-size:11px;
  letter-spacing:0.28em;
  text-transform:uppercase;
  color:#fff;
}

/* ---------- Hero panel ---------- */
.panel__inner--hero{
  display:flex;
  align-items:center;
  justify-content:center;
  overflow:hidden;
}

.panel__inner--hero h6{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  margin:0;
  padding:0;
}
.hero__bg{
  position:absolute;
  inset:-6%;
  width:112%;
  height:112%;
  object-fit:cover;
  filter:blur(18px) brightness(0.78);
  transform:scale(1.08);
  opacity:0;
  transition:none;
  pointer-events:none;
}
.hero__img{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  object-fit:contain;
  opacity:0;
  filter:blur(0px);
  transform:scale(1.5) translateZ(0);
  will-change:transform,opacity,filter;
  z-index:1;
}
.hero__headline{
  position:absolute;
  left:50%;
  bottom:13vh;
  transform:translate(-50%, 140%) translateZ(0);
  margin:0;
  font-weight:300;
  font-size:40px;
  letter-spacing:0.06em;
  color:#fff;
  opacity:0;
  text-align:center;
  width:min(980px, 84vw);
  z-index:2;
}

/* --- Hero callout (style line + slit reveal) --- */
.hero__callout{
  position:absolute;
  inset:0;                /* critical: viewport coordinate space for JS positioning */
  pointer-events:none;
  z-index:2;
  opacity:0;
}

/* Shared callout primitives (hero + ER callouts reuse these classes) */
.callout__diag,
.callout__horiz{
  position:absolute;
  height:1px;
  background: rgba(255,255,255,0.92);  /* crisp white */
  transform-origin:0 50%;
  transform:scaleX(0);
  opacity:0;
  will-change: transform, opacity;
}
/* Keep the join point fixed while drawing the horizontal line */
.callout__horiz{ transform-origin:100% 50%; }

.callout__mask{
  position:absolute;
  overflow:hidden;
  height: 160px;          /* fits multi-line text while staying within ~600px box */
  max-width: 600px;
  pointer-events:none;
}

.callout__text{
  font-size: clamp(11px, 1.05vw, 13px);
  line-height:1.35;
  letter-spacing:0.12em;
  text-transform:uppercase;
  color: #fff;
  transform:translateY(120%);
  opacity:0;
  max-width: 600px;
  padding-left: 18px;     /* keeps text off the line join */
  white-space: normal;
}

@media (max-width: 900px){
  .callout__text{ font-size: 11px; letter-spacing:0.10em; }
}
/* --- Hero subcopy (under headline) --- */
.hero__subcopy{
  position:absolute;
  left:50%;
  transform:translateX(-50%) translateY(18px);
  bottom:4.5vh;
  width:min(980px, 84vw);
  color:#fff;
  font-size:14px;
  line-height:1.45;
  letter-spacing:0.03em;
  text-align:center;
  opacity:0;
  z-index:2;
  pointer-events:none;
}

/* ---------- Sections ---------- */
.section{
  min-height:100vh;
  display:flex;
  align-items:center;
  justify-content:center;
}
.section__inner{
  width:100%;
  min-height:100vh;
  display:flex;
  align-items:center;
  justify-content:center;
}
.section__img{
  width:100%;
  height:100vh;
  object-fit:cover;
  display:block;
}
.section--black{ background:#000; }
.section__spacer{ height:100vh; }

/* ---------- Footer ---------- */
.footer{
  min-height:100vh;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:0 20px;
  background:#000;
}
.footer__inner{
  max-width:1100px;
  margin:0 auto;
  text-align:center;
}
.footer__logo{
  width:220px;
  opacity:0.25;
}
.footer__email{
  margin-top:18px;
  letter-spacing:0.12em;
  text-transform:uppercase;
  font-size:12px;
  color:#fff;
}
.footer__addr{
  margin-top:12px;
  font-size:12px;
  color:#fff;
}
.footer__copy{
  margin-top:16px;
  font-size:12px;
  color:#fff;
}



/* ---------- Intro outro blackout + interstitial ---------- */
.intro-blackout{
  position:absolute;
  inset:0;
  background:#000;
  opacity:0;
  z-index:15; /* above hero/landing panels, below interstitial */
  pointer-events:none;
}

.intro-interstitial{
  position:absolute;
  inset:0;
  z-index:20; /* below lang(50) and video(40), above blackout */
  opacity:0;
  pointer-events:none;
}

.intro-interstitial__title{
  position:absolute;
  left:6vw;
  top:7vh;
  font-weight:300;
  font-size:44px;
  letter-spacing:0.08em;
  color:#fff;
  opacity:0;
  transform:translate(-90px, 70px) translateZ(0);
  will-change:transform,opacity,filter;
}

.intro-interstitial__content{
  position:absolute;
  left:50%;
  top:50%;
  transform:translate(-50%, -50%);
  width:min(980px, 84vw);
  text-align:center;
  color:#fff;
}

.ii-block{
  margin:22px auto;
  opacity:0;
  transform:translateY(10px) translateZ(0);
  will-change:transform,opacity;
}

.ii-label{
  display:flex;
  align-items:baseline;
  justify-content:center;
  gap:14px;
}

.ii-drop{
  font-size:26px;
  letter-spacing:0.10em;
  text-transform:uppercase;
  color:#fff;
}

.ii-meta{
  font-size:13px;
  letter-spacing:0.12em;
  text-transform:uppercase;
  color:#fff;
}

.ii-desc{
  margin-top:8px;
  font-size:14px;
  line-height:1.55;
  letter-spacing:0.02em;
  color:#fff;
}

.ii-note{
  margin-top:26px;
  opacity:0;
  transform:translateY(10px) translateZ(0);
  font-size:14px;
  line-height:1.55;
  letter-spacing:0.02em;
  will-change:transform,opacity;
}

.ii-close{
  margin-top:18px;
  opacity:0;
  transform:translateY(10px) translateZ(0);
  font-size:16px;
  line-height:1.45;
  letter-spacing:0.03em;
  color:#fff;
  will-change:transform,opacity;
}

@media (max-width: 900px){
  .intro-interstitial__title{ font-size:34px; top:8vh; }
  .ii-drop{ font-size:22px; }
  .ii-desc{ font-size:13px; }
  .ii-close{ font-size:14px; }
}

/* ER=EPR: show full image (no crop) + soft-fill background to avoid bands */
#er-epr .section__inner{
  position: relative;
  overflow: hidden;
  background: #0b0b0b; /* fallback if image fails to load */
}

#er-epr .section__inner::before{
  content:"";
  position:absolute;
  inset:-6%;
  background-image: url("../media/er-epr.png");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  filter: blur(28px) brightness(0.85) saturate(0.95);
  transform: scale(1.08);
  opacity: 0.95;
  pointer-events:none;
}

#er-epr .section__img{
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100vh;
  object-fit: contain;     /* key change: no cropping */
  object-position: center;
}
/* ================================
   ER=EPR — pinned stage + band-free contain
   (append at END of site.css)
   ================================ */

/* 1) Pin / scroll runway for ER=EPR */
#er-epr{
  position: relative;
  height: 220vh;          /* runway length; adjust only if you want longer/shorter lock */
  background: #000;
}
#er-epr .section__inner{
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
}

/* 2) Band-free fullscreen contain using blurred backdrop */
#er-epr .section__inner::before{
  content:"";
  position:absolute;
  inset:-6%;
  background-image: url("../media/er-epr.png");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  filter: blur(34px) brightness(0.88) saturate(0.95);
  transform: scale(1.08);
  opacity: 0.90;
  pointer-events:none;
}
#er-epr .section__img{
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100vh;
  object-fit: contain;    /* key: no crop */
  object-position: center;
}

/* ================================
   ER=EPR — callouts (tight / crisp white)
   ================================ */

/* overlay container (JS positions children) */
#er-epr .er-callouts{
  position:absolute;
  inset:0;
  z-index: 2;
  pointer-events:none;
}

/* each callout */
#er-epr .er-callout{
  position:absolute; /* JS sets left/top */
  max-width: 320px;
  opacity: 0;        /* JS animates */
}

/* lines */
#er-epr .er-callout__diag,
#er-epr .er-callout__horiz{
  position:absolute;
  height:1px;
  background: rgba(255,255,255,0.92);  /* crisp, not hazed */
  transform-origin: 0 50%;
  transform: scaleX(0);
  will-change: transform, opacity;
}

/* slit mask */
#er-epr .er-callout__mask{
  position:absolute;
  overflow:hidden;
  height: 64px;                /* tighter than hero */
  padding-left: 18px;          /* keeps text off the line join */
  max-width: 320px;
}

/* text */
#er-epr .er-callout__text{
  font-size: 12px;             /* like compact */
  line-height: 1.35;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: #fff;  /* crisp, not grey */
  transform: translateY(120%);
  opacity: 0;
  max-width: 320px;
  white-space: normal;
  text-align: start;
}

/* Arabic-only: keep text from drifting into diagonals */
html[lang="ar"] #er-epr .er-callout__mask{
  padding-left: 0;
  padding-right: 18px;
}
html[lang="ar"] #er-epr .er-callout__text{
  text-align: right;
  letter-spacing: 0.02em; /* Arabic needs less tracking */
}

/* Safety: prevent any accidental blur/opacity inheritance */
#er-epr .er-callout,
#er-epr .er-callout__text,
#er-epr .er-callout__diag,
#er-epr .er-callout__horiz{
  filter: none;
}



/* V5 lock: stop .section flex-centering from creating top gaps in tall runways */
#er-epr{ display:block; }


/* ---------- Fisheye (V5 locked + full-fit + right text band) ---------- */
#fisheye{
  display:block;           /* override .section flex-centering */
  position: relative;
  height: 240vh;           /* runway for zoom + 3-line conveyor */
  background: #000;
  margin-top: 16px;        /* 10–20px seam after ER=EPR */
  --fy-band: min(44vw, 640px);
  --fy-shift: 50px;
  --int-gutter: clamp(24px, 2.2vw, 44px); /* cosmetic: add breathing room between image and copy band */
}

#fisheye .fisheye__sticky{
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
}

#fisheye .fisheye__stage{
  position: relative;
  width: 100%;
  height: 100%;
  background: #000;
}

#fisheye .fisheye__imgwrap{
  position: absolute;
  inset: 0;
  right: calc(var(--fy-band) + var(--fy-shift) + var(--int-gutter));   /* reserve band + offset */
  display: flex;
  align-items: center;
  justify-content: center;
}

#fisheye .fisheye__img{
  width: 100%;
  height: 100%;
  object-fit: contain;      /* full image fits one screen */
  transform: scale(0.92) translateZ(0);
  will-change: transform, opacity, filter;
  opacity: 1;
}

#fisheye .fisheye__band{
  position: absolute;
  top: 0;
  bottom: 0;
  right: var(--fy-shift);
  width: var(--fy-band);
  background: #000;
}

/* Full-height rail: THIS is the only clip (prevents the "small box" look) */
#fisheyeCopyRail{
  position: absolute;
  top: 0;
  bottom: 0;
  right: var(--fy-shift);
  width: var(--fy-band);
  height: 100vh;
  overflow: hidden;
  pointer-events: none;
  padding: clamp(18px, 2.1vw, 32px);
  display: block;
}

#fisheyeCopyRail .fisheye__headline{
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  transform: translate3d(0, calc(-50% + var(--fy, 0px)), 0);
  will-change: transform;
  opacity: 1;
  color: #fff;
  font-weight: 300;
  letter-spacing: 0.02em;
  line-height: 1.15;
  font-size: clamp(20px, 2.35vw, 38px); /* reduced by ~1/3 vs oversized version */
  max-width: 30ch;
  text-align: start;
}


/* ---------- Interior (V6 locked layout: same width as fisheye, smaller apparent height by design) ---------- */
#interior{
  display:block;           /* override .section flex-centering */
  position: relative;
  height: 220vh;           /* runway for one fluent move */
  background: #000;
  margin-top: 50px;        /* thin seam after fisheye */
  margin-bottom: 50px;     /* thin seam before Hadid 01 */
  --fy-band: min(44vw, 640px);
  --fy-shift: 50px;
  --int-gutter: clamp(24px, 2.2vw, 44px); /* cosmetic: add breathing room between image and copy band */
}

#interior .interior__sticky{
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
}

#interior .interior__stage{
  position: relative;
  width: 100%;
  height: 100%;
  background: #000;
}

/* Reuse the same image-wrap geometry as fisheye (identical pixel width) */
#interior .fisheye__imgwrap{
  position: absolute;
  inset: 0;
  right: calc(var(--fy-band) + var(--fy-shift) + var(--int-gutter));
  display: flex;
  align-items: center;
  justify-content: center;
}

#interior .interior__img{
  width: 100%;
  height: 100%;
  object-fit: contain;
  transform: translateY(18px) scale(0.985) translateZ(0);
  will-change: transform, opacity;
  opacity: 0;
}

/* Right band (same as fisheye) */
#interior .fisheye__band{
  position: absolute;
  top: 0;
  bottom: 0;
  right: var(--fy-shift);
  width: var(--fy-band);
  background: #000;
  pointer-events: none;
}

#interiorCopyRail{
  position: absolute;
  top: 0;
  bottom: 0;
  right: var(--fy-shift);
  width: var(--fy-band);
  height: 100vh;
  overflow: hidden;        /* allows gentle entrance without extra wrappers */
  pointer-events: auto !important;
  padding: clamp(26px, 2.6vw, 48px);
  display: block;
  z-index: 5;
}

#interiorCopyRail .interior__stack{
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  transform: translate3d(0, calc(-50% + 24px), 0);
  opacity: 0;
  will-change: transform, opacity;
}

#interiorCopyRail .interior__headline{
  color: #fff;
  font-weight: 300;
  letter-spacing: 0.02em;
  line-height: 1.15;
  font-size: clamp(18px, 2.05vw, 34px);
  max-width: 34ch;
  text-align: start;
}

#interiorCopyRail .interior__links{
  margin-top: 45px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  opacity: 0.88;
}



/* ---------- Hadid sequence (V7): pinned crossfade 02–06 + overlay copy ---------- */
#hadid-seq{
  display:block;           /* override .section flex-centering */
  position: relative;
  height: 600vh;           /* runway for 5 frames (02–06) */
  background: #000;
  /* no margin-top: seam is provided by #interior margin-bottom */
}

#hadid-seq .hadid__sticky{
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
}

#hadid-seq .hadid__stage{
  position: relative;
  width: 100%;
  height: 100%;
  background: #000;
}

#hadid-seq .hadid__stack{
  position: absolute;
  inset: 0;
}

#hadid-seq .hadid__img{
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;     /* CRITICAL: never crop */
  opacity: 0;
  will-change: opacity, transform;
  transform: translateY(0px) translateZ(0);
}

#hadid-seq .hadid__copy{
  position: absolute;
  /* Normal Hadid headline placement (per provided reference): upper-right region */
  right: clamp(56px, 6vw, 110px);
  top: clamp(96px, 16vh, 220px);
  transform: none;
  width: min(40vw, 720px);          /* critical: parent must have width (children are absolute) */
  max-width: min(40vw, 720px);
  color: #fff;             /* pure white for visibility */
  pointer-events: none;
}

#hadid-seq .hadid__line{
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  opacity: 0;
  font-weight: 300;
  letter-spacing: 0.02em;
  line-height: 1.15;
  font-size: clamp(20px, 2.35vw, 38px); /* usual headline size */
  max-width: 34ch;
  text-align: start;
  text-shadow: 0 2px 14px rgba(0,0,0,0.55);
  will-change: opacity, transform;
}

#hadid-seq .hadid__final{
  position: absolute;
  /* Final title placement (per provided reference): lower-left band area */
  left: clamp(70px, 7vw, 140px);
  bottom: clamp(84px, 12vh, 160px);
  max-width: min(62vw, 980px);
  color: #fff;
  opacity: 0;
  font-weight: 300;
  letter-spacing: 0.02em;
  line-height: 1.15;
  font-size: clamp(26px, 2.8vw, 46px); /* larger than normal Hadid line */
  text-align: start;
  pointer-events: none;
  text-shadow: 0 2px 16px rgba(0,0,0,0.60);
  will-change: opacity, transform;
}

#interiorCopyRail .interior__link{
  display: block;
  color: #fff;
  text-decoration: none;
  font-weight: 300;
  letter-spacing: 0.02em;
  font-size: 14px;
  line-height: 1.2;
  pointer-events: auto;   /* not active yet */
}


#interiorLinkPlatform{
  pointer-events: auto;
  cursor: pointer;
}
#interiorLinkPlatform:hover{
  text-decoration: underline;
}

#interiorLinkApp{
  pointer-events: none;
  cursor: default;
}
@media (max-width: 520px){
  #interiorCopyRail .interior__link{ font-size: 13px; }
}

/* ================================
   Phase 1A (non-invasive): mobile viewport stability + fisheye mobile band tuning
   - Keeps desktop layout untouched (rules are mobile-only)
   - Prevents iOS Safari 100vh "bottom band" artifacts
   - Adds safe default offsets so fisheye lines never overlap even if JS fails
   ================================ */

:root{ --vh: 1vh; }

/* Fallback: ensure the three fisheye lines never sit exactly on top of each other */
#fyLine1{ --fy: -28vh; }
#fyLine2{ --fy:   0vh; }
#fyLine3{ --fy:  28vh; }

@media (max-width: 820px){
  /* Use JS-updated --vh as a safer proxy for the visible viewport height */
  .panel__inner--hero h6,
  #er-epr .section__inner,
  #fisheye .fisheye__sticky,
  #interior .interior__sticky,
  #hadid-seq .hadid__sticky,
  #fisheyeCopyRail,
  #interiorCopyRail{
    height: calc(var(--vh, 1vh) * 100);
  }

  /* Reduce the right-band "shift" on small screens so the band doesn't feel like an edge artifact */
  #fisheye, #interior{
    --fy-shift: 18px;
  }
}

/* Prefer modern dynamic viewport units where available */
@supports (height: 100dvh){
  @media (max-width: 820px){
    .panel__inner--hero h6,
    #er-epr .section__inner,
    #fisheye .fisheye__sticky,
    #interior .interior__sticky,
    #hadid-seq .hadid__sticky,
    #fisheyeCopyRail,
    #interiorCopyRail{
      height: 100dvh;
    }
  }
}

@media (max-width: 520px){
  /* Slightly narrow the band and reduce padding so copy stays readable without crushing the image */
  #fisheye, #interior{
    --fy-band: min(42vw, 320px);
  }
  #fisheyeCopyRail, #interiorCopyRail{
    padding: 16px;
  }
}
