/* «أبعد» v2. Night photographs, white type, one cyan for the plan and one red for the noise. Alexandria only. */
@font-face {
  font-family: "Alexandria";
  src: url("assets/alexandria.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
:root {
  --sc-canvas: #07080C;
  --sc-surface: #0E1118;
  --sc-ink: #F4F6F8;
  --sc-ink-soft: #A9B2BE;
  --sc-accent: #29B6FF;
  --sc-accent-ink: #07080C;
  --sc-font-display: "Alexandria", system-ui, sans-serif;
  --sc-font-text: "Alexandria", system-ui, sans-serif;
  --red: #FF4B5A;
  --glass: rgba(10, 12, 18, .58);
  --edge-x: clamp(20px, 5vw, 84px);
  --copy-bottom: clamp(84px, 13vh, 132px);
}
/* Arabic joins break under tracking, so the engine's optical tracking is switched off everywhere. */
body, body * { letter-spacing: 0 !important; }
body { font-weight: 300; }
a { text-decoration: none; }

/* ------------------------------------------------------------------ boot -- */
.boot {
  position: fixed; inset: 0; z-index: 100; background: var(--sc-canvas);
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: 0 var(--edge-x);
  transition: opacity 700ms var(--sc-ease-out), visibility 0s 700ms;
}
.boot.is-done { opacity: 0; visibility: hidden; }
.boot__line { margin: 0; font-size: clamp(.95rem, 1.1vw, 1.1rem); color: var(--sc-ink-soft); }
.boot__mark { width: 64px; height: 64px; border-radius: 50%; box-shadow: 0 0 0 1px rgba(255,255,255,.16), 0 0 48px rgba(41,182,255,.18); }
.boot__word { height: 28px; width: auto; justify-self: end; }
.boot__pct { position: absolute; left: 0; right: 0; bottom: 9vh; margin: 0; text-align: center; font-size: .8rem; color: var(--sc-ink-soft); font-variant-numeric: tabular-nums; }
@media (max-width: 640px) {
  .boot { grid-template-columns: 1fr; justify-items: center; align-content: center; gap: 22px; }
  .boot__line { order: 2; }
  .boot__word { display: none; }
}

/* ------------------------------------------------------------------- bar -- */
.bar {
  position: fixed; inset: 0 0 auto 0; z-index: var(--sc-z-chrome);
  display: flex; align-items: center; justify-content: space-between;
  padding: clamp(16px, 2.4vh, 26px) var(--edge-x);
}
.bar__logo img { height: clamp(24px, 2.4vw, 32px); width: auto; }
.bar__cta {
  font-size: .9rem; font-weight: 500; padding: 10px 18px; border-radius: 999px;
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.16);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  transition: background var(--sc-d-base) var(--sc-ease-out);
}
.bar__cta:hover { background: rgba(255,255,255,.16); }

/* ----------------------------------------------------------------- story -- */
.story__stage { background: var(--sc-canvas); }
.story__plates { position: absolute; inset: 0; overflow: hidden; }
.plate {
  position: absolute; top: 0; left: 0; max-width: none; transform-origin: 0 0; will-change: transform;
  opacity: 0; user-select: none;
}
.plate.is-on { opacity: 1; }
.story__dots { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.story__scrim {
  position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(to bottom, rgba(7,8,12,.62) 0, rgba(7,8,12,0) 20%),
    radial-gradient(55% 50% at 100% 100%, rgba(7,8,12,.5) 0, rgba(7,8,12,0) 100%),
    linear-gradient(to top, rgba(7,8,12,.9) 0, rgba(7,8,12,.66) 20%, rgba(7,8,12,.26) 38%, rgba(7,8,12,0) 52%);
}

.story__copy { position: absolute; inset: 0; z-index: var(--sc-z-copy); pointer-events: none; }
.beat { position: absolute; right: var(--edge-x); bottom: var(--copy-bottom); width: min(36rem, calc(100vw - 2 * var(--edge-x))); }
/* scene 2 holds its phone on the right, so its words take the empty side */
@media (min-width: 761px) { .beat--far { right: auto; left: var(--edge-x); } }
.beat__h {
  margin: 0; font-weight: 600; font-size: clamp(1.9rem, 3.5vw, 3.5rem); line-height: 1.42; text-wrap: balance;
  text-shadow: 0 2px 24px rgba(0,0,0,.45);
}
.beat__p { margin: .7em 0 0; font-size: clamp(1rem, 1.25vw, 1.25rem); line-height: 1.9; color: #D5DBE3; text-shadow: 0 1px 14px rgba(0,0,0,.6); }

.story__steps { position: absolute; left: var(--edge-x); bottom: 44px; display: flex; gap: 6px; margin: 0; padding: 0; list-style: none; direction: ltr; }
.story__steps li { width: 34px; height: 2px; background: rgba(255,255,255,.22); position: relative; overflow: hidden; }
.story__steps li::after { content: ""; position: absolute; inset: 0; background: var(--sc-ink); transform-origin: 0 50%; transform: scaleX(var(--f, 0)); }
.story__note { position: absolute; left: var(--edge-x); bottom: 18px; margin: 0; font-size: .75rem; color: rgba(244,246,248,.6); }

/* the scroll hint: a word and a light running down a thread, bottom centre of the first screen */
/* the outer layer follows the scroll exactly; the inner one only fades in once, after the curtain lifts */
.hint { position: absolute; left: 50%; bottom: 22px; transform: translateX(-50%); pointer-events: none; opacity: var(--h, 1); }
.hint__in { display: grid; justify-items: center; gap: 10px; opacity: 0; }
.boot.is-done ~ main .hint__in { animation: hint-in 900ms var(--sc-ease-out) 600ms both; }
@keyframes hint-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.hint span { font-size: .82rem; font-weight: 500; color: rgba(244,246,248,.9); text-shadow: 0 1px 12px rgba(0,0,0,.6); }
.hint i { position: relative; width: 1px; height: 46px; background: rgba(255,255,255,.22); overflow: hidden; }
.hint i::after {
  content: ""; position: absolute; left: -2px; top: -10px; width: 5px; height: 10px; border-radius: 3px;
  background: var(--sc-accent); box-shadow: 0 0 10px var(--sc-accent);
  animation: hint-run 1.8s var(--sc-ease-in-out) infinite;
}
@keyframes hint-run { 0% { transform: translateY(0); opacity: 0; } 20% { opacity: 1; } 80% { opacity: 1; } 100% { transform: translateY(56px); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .hint i::after { animation: none; top: 18px; opacity: 1; } }
/* the step bars and the note wait until the hint has gone, so the bottom strip never holds both */
.story__steps, .story__note { opacity: var(--rest, 0); }

/* 2 · the noise ------------------------------------------------------------ */
.noise { position: absolute; inset: 0; margin: 0; padding: 0; list-style: none; pointer-events: none; }
.noise li {
  --a: 0;
  position: absolute; left: var(--x); top: var(--y); width: clamp(240px, 19vw, 300px);
  display: grid; gap: 2px; padding: 11px 14px 12px 14px; border-radius: 14px;
  background: rgba(24, 8, 12, .62); border: 1px solid rgba(255, 75, 90, .38);
  backdrop-filter: blur(12px) saturate(1.2); -webkit-backdrop-filter: blur(12px) saturate(1.2);
  box-shadow: 0 10px 30px -10px rgba(0,0,0,.6), 0 0 24px -6px rgba(255,75,90,.35);
  opacity: var(--a); transform: translate3d(0, calc((1 - var(--a)) * 14px), 0) scale(calc(.94 + .06 * var(--a)));
}
.noise b { font-size: .72rem; font-weight: 500; color: #FF9AA3; display: flex; align-items: center; gap: 7px; }
.noise b::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--red); box-shadow: 0 0 10px var(--red); }
.noise span { font-size: .92rem; font-weight: 500; line-height: 1.6; }
.noise li:nth-child(1) { --x: 40%; --y: 17%; }
.noise li:nth-child(2) { --x: 77%; --y: 12%; }
.noise li:nth-child(3) { --x: 44%; --y: 33%; }
.noise li:nth-child(4) { --x: 78%; --y: 27%; }
.noise li:nth-child(5) { --x: 37%; --y: 49%; }

/* 3 · the plan card -------------------------------------------------------- */
.ticket { --a: 0; position: absolute; left: 75%; top: 12%; width: clamp(260px, 21vw, 320px); pointer-events: none; }
.ticket__card {
  padding: 18px 18px 8px; border-radius: 20px;
  background: rgba(9, 13, 20, .66); border: 1px solid rgba(41,182,255,.34);
  backdrop-filter: blur(16px) saturate(1.3); -webkit-backdrop-filter: blur(16px) saturate(1.3);
  box-shadow: 0 24px 60px -20px rgba(0,0,0,.7), 0 0 60px -18px rgba(41,182,255,.45);
  opacity: min(1, calc(var(--a) * 3));
  transform: translate3d(calc(var(--ox, 0px) * (1 - var(--a))), calc(var(--oy, 0px) * (1 - var(--a))), 0) scale(calc(.2 + .8 * var(--a)));
  will-change: transform, opacity;
}
.ticket__head { display: flex; align-items: center; gap: 10px; }
.ticket__head img { width: 34px; height: 34px; border-radius: 50%; }
.ticket__head p { margin: 0; display: grid; line-height: 1.35; }
.ticket__head b { font-weight: 600; font-size: .95rem; }
.ticket__head span { font-size: .74rem; color: var(--sc-ink-soft); }
.ticket__head em { margin-inline-start: auto; font-style: normal; font-weight: 600; font-size: .8rem; padding: 4px 12px; border-radius: 999px; background: var(--sc-accent); color: var(--sc-accent-ink); }
.ticket__sym { margin: 14px 0 6px; font-weight: 600; font-size: 1.45rem; text-align: right; }
.ticket__rows { margin: 0; }
.ticket__rows div { display: flex; justify-content: space-between; align-items: baseline; padding: 9px 0; border-top: 1px solid rgba(255,255,255,.09); opacity: var(--r, 0); transform: translateX(calc((1 - var(--r, 0)) * -10px)); }
.ticket__rows dt { font-size: .86rem; color: var(--sc-ink-soft); }
.ticket__rows dd { margin: 0; font-weight: 600; font-size: .98rem; font-variant-numeric: tabular-nums; }
.ticket__rows .is-stop dd { color: #FF7B87; }
.ticket__rows .is-tp dd { color: var(--sc-accent); }

/* 4 · the line across the dawn --------------------------------------------- */
.sky { --a: 0; position: absolute; left: 43%; right: 5%; top: 11%; height: 30%; pointer-events: none; }
.sky svg { width: 100%; height: 100%; overflow: visible; filter: drop-shadow(0 0 6px rgba(41,182,255,.75)) drop-shadow(0 0 22px rgba(41,182,255,.35)); }
.sky__line { fill: none; stroke: #E9F7FF; stroke-width: 2.4; stroke-linejoin: round; stroke-linecap: round; }
.sky__lvl { stroke: rgba(255,255,255,.5); stroke-width: 1; stroke-dasharray: 4 6; opacity: min(1, calc(var(--a) * 4)); }
.sky__cap { position: absolute; left: 0; bottom: calc(100% + 10px); margin: 0; font-size: .78rem; color: rgba(255,255,255,.82); text-shadow: 0 1px 10px rgba(0,0,0,.4); opacity: min(1, calc(var(--a) * 4)); }
.sky__tip { position: absolute; left: var(--tx, 0px); top: var(--ty, 0px); width: 10px; height: 10px; margin: -5px 0 0 -5px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 4px rgba(41,182,255,.35), 0 0 22px rgba(41,182,255,.9); opacity: min(1, calc(var(--a) * 20)); }
.sky__mark {
  --m: 0;
  position: absolute; left: var(--x); top: var(--y); margin: 0; transform: translate(-50%, calc(-100% - 16px + (1 - var(--m)) * 8px));
  white-space: nowrap; font-size: .82rem; font-weight: 500; padding: 6px 12px; border-radius: 999px;
  background: rgba(7, 8, 12, .55); border: 1px solid rgba(41,182,255,.5); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  opacity: var(--m);
}
.sky__mark::after { content: ""; position: absolute; left: 50%; top: calc(100% + 6px); width: 8px; height: 8px; margin-left: -4px; border-radius: 50%; background: var(--sc-accent); box-shadow: 0 0 12px var(--sc-accent); }

/* ----------------------------------------------------------------- desks -- */
.desks { padding-block: clamp(4rem, 8vw, 8rem) clamp(3rem, 6vw, 6rem); }
.desks__lead { max-width: 40rem; margin-bottom: clamp(2rem, 4vw, 3.5rem); }
.desks__h { margin: 0; font-weight: 600; font-size: clamp(2rem, 3.6vw, 3.4rem); line-height: 1.35; }
.desks__p { margin: .6em 0 0; color: var(--sc-ink-soft); font-size: clamp(1rem, 1.2vw, 1.2rem); line-height: 1.9; }
.desks__grid { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--sc-hairline-strong); border-bottom: 1px solid var(--sc-hairline-strong); }
.desk { padding: clamp(1.75rem, 3vw, 3rem) 0; display: flex; flex-direction: column; gap: 1.2rem; }
.desk:first-child { padding-inline-end: clamp(1.5rem, 4vw, 4rem); border-inline-end: 1px solid var(--sc-hairline-strong); }
.desk:last-child { padding-inline-start: clamp(1.5rem, 4vw, 4rem); }
.desk h3 { margin: 0; font-weight: 600; font-size: clamp(1.4rem, 2vw, 1.9rem); }
.desk > p { margin: 0; color: var(--sc-ink-soft); line-height: 1.95; max-width: 34rem; }
.desk__steps { margin: .4rem 0 .6rem; padding: 0; list-style: none; counter-reset: s; display: grid; gap: 12px; }
.desk__steps li { counter-increment: s; display: flex; align-items: center; gap: 12px; font-size: .95rem; }
.desk__steps li::before { content: counter(s, arabic-indic); flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-size: .8rem; font-weight: 600; border: 1px solid rgba(41,182,255,.55); color: var(--sc-accent); }
.desk .btn { align-self: flex-start; margin-top: auto; }
.desk__btns { display: flex; flex-wrap: wrap; gap: 10px; margin-top: auto; }
.desk__btns .btn { margin-top: 0; }

.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 12px 24px; border-radius: 999px; font-weight: 600; font-size: .98rem; transition: background var(--sc-d-base) var(--sc-ease-out), border-color var(--sc-d-base) var(--sc-ease-out); }
.btn--main { background: var(--sc-accent); color: var(--sc-accent-ink); }
.btn--main:hover { background: #5CC8FF; }
.btn--line { border: 1px solid rgba(255,255,255,.28); color: var(--sc-ink); }
.btn--line:hover { border-color: rgba(255,255,255,.6); }

/* ------------------------------------------------------------------- faq -- */
.faq { padding-block: clamp(2rem, 4vw, 4rem) clamp(4rem, 8vw, 8rem); }
.faq__wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.7fr); gap: clamp(2rem, 5vw, 6rem); align-items: start; }
.faq__h { margin: 0; font-weight: 600; font-size: clamp(1.8rem, 3vw, 2.8rem); line-height: 1.4; }
.faq__list details { border-bottom: 1px solid var(--sc-hairline-strong); }
.faq__list details:first-child { border-top: 1px solid var(--sc-hairline-strong); }
.faq__list summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 1.25rem 0; font-weight: 500; font-size: clamp(1rem, 1.3vw, 1.15rem); }
.faq__list summary::-webkit-details-marker { display: none; }
.faq__list summary::after { content: "+"; flex: none; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--sc-hairline-strong); font-weight: 300; transition: transform var(--sc-d-base) var(--sc-ease-out); }
.faq__list details[open] summary::after { transform: rotate(45deg); }
.faq__list p { margin: 0 0 1.4rem; color: var(--sc-ink-soft); line-height: 1.95; max-width: 40rem; }

/* ----------------------------------------------------------------- close -- */
/* the story's last light, left as it is at the top; the words sit on the sea where it has gone dark */
.close__stage { display: grid; grid-template-rows: 1fr auto auto; }
.close__bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 40%; }
.close__shade { position: absolute; inset: 0; background: linear-gradient(to bottom, rgba(7,8,12,.35) 0, rgba(7,8,12,0) 22%, rgba(7,8,12,0) 40%, rgba(7,8,12,.78) 62%, #07080C 90%); }
.close__inner { position: relative; grid-row: 2; text-align: center; padding: 0 var(--edge-x) clamp(1.5rem, 4vh, 3rem); }
.close__h { margin: 0 auto; max-width: 16ch; font-weight: 600; font-size: clamp(2.4rem, 6vw, 5.4rem); line-height: 1.3; text-shadow: 0 2px 30px rgba(0,0,0,.35); }
.close__btns { display: flex; justify-content: center; flex-wrap: wrap; gap: 12px; margin-top: clamp(1.5rem, 3vw, 2.5rem); }
.close__btns .btn--line { background: rgba(7,8,12,.35); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.foot { grid-row: 3; position: relative; padding: 0 var(--edge-x) clamp(18px, 3vh, 30px); display: grid; gap: 10px; justify-items: center; text-align: center; }
.foot__links { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 22px; font-size: .88rem; }
.foot__links a { color: var(--sc-ink); opacity: .85; }
.foot__links a:hover { opacity: 1; text-decoration: underline; }
.foot__risk { margin: 0; max-width: 52rem; font-size: .74rem; line-height: 1.8; color: rgba(244,246,248,.62); }
.foot__c { margin: 0; font-size: .74rem; color: rgba(244,246,248,.5); }

/* ---------------------------------------------------------------- phones -- */
@media (max-width: 760px) {
  :root { --copy-bottom: 92px; }
  .hint { bottom: 14px; }
  .hint__in { gap: 8px; }
  .hint i { height: 28px; }
  .beat__h { font-size: clamp(1.6rem, 7.4vw, 2.1rem); }
  .story__steps { bottom: 26px; left: auto; right: var(--edge-x); }
  .story__note { bottom: 20px; left: var(--edge-x); }
  .noise li:nth-child(n+4) { display: none; }
  .noise li { width: min(74vw, 290px); }
  .noise li:nth-child(1) { --x: 5%;  --y: 9%; }
  .noise li:nth-child(2) { --x: 21%; --y: 17%; }
  .noise li:nth-child(3) { --x: 7%;  --y: 25%; }
  .ticket { left: 50%; top: 10%; width: min(78vw, 300px); margin-left: calc(min(78vw, 300px) / -2); }
  .sky { left: 30%; right: 4%; top: 13%; height: 24%; }
  .desks__grid { grid-template-columns: 1fr; }
  .desk:first-child { padding-inline-end: 0; border-inline-end: 0; border-bottom: 1px solid var(--sc-hairline-strong); }
  .desk:last-child { padding-inline-start: 0; }
  .faq__wrap { grid-template-columns: 1fr; gap: 1.25rem; }
  .close__bg { object-position: 30% 40%; }
}
