/* Madrasati — perspectives prototype (desktop, Arabic). Product colours from mobile/src/core/theme. The app screens are in apps.css. */
:root {
  --emerald: #0E8C71;
  --emerald-deep: #0A5C58;
  --ink: #0E1C1A;
  --sun: #FFB547;
  --night: #0A1210;
  --chrome: rgba(10, 18, 16, 0.72);
  --line: rgba(255, 255, 255, 0.16);
  --on: #F4F1EA;
  --on-2: rgba(244, 241, 234, 0.74);
  --f-ar: 'IBM Plex Sans Arabic', 'Segoe UI', Tahoma, sans-serif;
  --f-mono: 'IBM Plex Mono', ui-monospace, monospace;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: var(--night); color: var(--on); }
body { font-family: var(--f-ar); -webkit-font-smoothing: antialiased; }
button, a { font: inherit; color: inherit; cursor: pointer; }
a { text-decoration: none; }
:focus-visible { outline: 2px solid var(--sun); outline-offset: 3px; }
/* Scroll without a visible scrollbar. */
* { scrollbar-width: none; }
*::-webkit-scrollbar { display: none; }

.box { position: absolute; transform-origin: 0 0; }
.box > img.still, .zoomer > img.still, .frame > img.still { position: absolute; inset: 0; width: 100%; height: 100%; display: block; user-select: none; -webkit-user-drag: none; }
.zoomer { position: absolute; inset: 0; }

/* top bar (the gate and the lineup only) */
.topbar { position: fixed; inset: 0 0 auto 0; z-index: 70; height: 76px; padding: 0 40px; display: flex; align-items: center; gap: 14px;
  background: linear-gradient(to bottom, rgba(6, 12, 11, 0.55), rgba(6, 12, 11, 0)); transition: opacity .6s; }
.topbar.hide { opacity: 0; pointer-events: none; }
.wordmark { background: none; border: 0; padding: 0; display: flex; align-items: center; gap: 10px; font: 700 24px var(--f-ar); }
.wordmark svg { width: 26px; height: 26px; }
.topbar .sp { flex: 1; }
.solid { background: var(--on); color: var(--ink); border: 0; border-radius: 99px; padding: 10px 20px 10px 18px; font-weight: 600; font-size: 15px; display: inline-flex; align-items: center; gap: 8px; }
.solid svg { width: 19px; height: 19px; color: #1FA855; }
.ghost { background: rgba(10, 18, 16, .35); border: 1px solid var(--line); border-radius: 99px; padding: 10px 18px; font-size: 15px; display: inline-flex; align-items: center; gap: 8px; }
.ghost:hover { background: rgba(255, 255, 255, 0.1); }
.ghost svg { width: 18px; height: 18px; }
.brand { background: var(--emerald); color: #fff; border: 0; border-radius: 99px; padding: 14px 28px; font-weight: 600; font-size: 17px; display: inline-flex; align-items: center; gap: 8px; }
.brand:hover { background: #10a083; }
.brand svg { width: 18px; height: 18px; }

/* ---------- the gate ---------- */
/* Only the two leaves: they sit on the open-gate picture and swing in, so nothing around the gate changes. */
.gate { position: fixed; inset: 0; z-index: 60; overflow: hidden; pointer-events: auto; }
.gate .leaf { position: absolute; background-size: 100% 100%; will-change: transform;
  transition: transform 2.2s cubic-bezier(.45, .05, .25, 1), opacity .3s ease 2.2s; }
.gate .leaf.l { transform-origin: 0% 50%; }
.gate .leaf.r { transform-origin: 100% 50%; }
/* the end pose is the open doors of the still picture; only then do the cut-outs hand over to it */
.gate.open .leaf.l { transform: rotateY(var(--ga, 97.7deg)); opacity: 0; }
.gate.open .leaf.r { transform: rotateY(calc(-1 * var(--ga, 97.7deg))); opacity: 0; }
.gate .hint { position: absolute; left: 50%; bottom: 52px; transform: translateX(-50%); font-size: 15px; color: var(--on); background: var(--chrome);
  border: 1px solid var(--line); border-radius: 99px; padding: 9px 18px; transition: opacity .4s; }
.gate.open .hint { opacity: 0; }

/* ---------- the courtyard and the lineup ---------- */
.yard { position: fixed; inset: 0; overflow: hidden; }
/* The walk in: one push into the gateway, easing to a stop exactly on the courtyard picture's framing. */
.yard .entry { position: fixed; inset: 0; transition: opacity .8s ease; }
.yard .entry .zoomer { transform-origin: 0 0; transition: transform 2.7s cubic-bezier(.45, 0, .2, 1); }
.yard.inside .entry { opacity: 0; pointer-events: none; }
.yard .zl { position: absolute; opacity: 0; pointer-events: none; object-fit: cover;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 7%, #000 93%, transparent), linear-gradient(to bottom, transparent, #000 7%, #000 93%, transparent);
  -webkit-mask-composite: source-in; mask-image: linear-gradient(to right, transparent, #000 7%, #000 93%, transparent), linear-gradient(to bottom, transparent, #000 7%, #000 93%, transparent); mask-composite: intersect; }
.yard.walk .zl-mid { opacity: 1; transition: opacity .9s ease .2s; }
.yard.walk .zl-stage { opacity: 1; transition: opacity 1s ease 1.35s; }
.yard .stagebg { position: fixed; inset: 0; opacity: 0; transition: opacity .8s ease, filter 1.2s ease; }
.yard.inside .stagebg { opacity: 1; }
.yard.in .stagebg { filter: brightness(.55) saturate(.88); }
.lineup { position: fixed; inset: 0; z-index: 3; touch-action: pan-y; }
.yard .pool { position: fixed; z-index: 2; left: 50%; bottom: 60px; width: 34vw; height: 26vh; transform: translateX(-50%); pointer-events: none; opacity: 0; transition: opacity 1.2s .6s;
  background: radial-gradient(ellipse at 50% 70%, rgba(255, 236, 196, .34), rgba(255, 236, 196, .08) 45%, rgba(255, 236, 196, 0) 70%); }
.yard .beam { position: fixed; z-index: 2; left: 50%; top: 0; width: 22vw; height: calc(100vh - 80px); transform: translateX(-50%); pointer-events: none; opacity: 0; transition: opacity 1.2s .6s;
  background: linear-gradient(to bottom, rgba(255, 240, 210, 0), rgba(255, 240, 210, .10) 55%, rgba(255, 240, 210, .16)); clip-path: polygon(38% 0, 62% 0, 100% 100%, 0 100%); }
.yard.in .pool, .yard.in .beam { opacity: 1; }
.yard .shade { position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .7s; z-index: 40;
  background: linear-gradient(to left, rgba(6, 12, 11, .9) 0%, rgba(6, 12, 11, .78) 34%, rgba(6, 12, 11, .2) 58%, rgba(6, 12, 11, 0) 70%); }
.yard.picked .shade { opacity: 1; }
.yard.picked .pool, .yard.picked .beam { opacity: 0; transition-delay: 0s; }
/* People move by script (the circle); only entering, picking and leaving use transitions. */
.person { position: absolute; top: 0; left: 0; display: flex; align-items: flex-end; transform-origin: 50% 100%; cursor: pointer; border: 0; padding: 0; background: none; will-change: transform, filter; }
.yard.picked .person, .person.enter { transition: transform .8s cubic-bezier(.3, .7, .2, 1), filter .8s, opacity .8s; }
.person img { display: block; flex: none; width: auto; pointer-events: none; animation: idle 4.6s ease-in-out infinite; transform-origin: 50% 100%; }
.person::after { content: ''; position: absolute; left: 8%; right: 8%; bottom: -1.2%; height: 4.5%; border-radius: 50%;
  background: radial-gradient(ellipse, rgba(0, 0, 0, .55), rgba(0, 0, 0, 0) 70%); z-index: -1; }
.person.enter { opacity: 0 !important; }
.person.enter img { transform: translateY(2%); }
.person:not(.enter) { transition: opacity .8s; }
@keyframes idle { 0%, 100% { transform: translateY(0) scaleY(1); } 50% { transform: translateY(-0.35%) scaleY(1.004); } }
.nameplate { position: absolute; left: 50%; bottom: 3.6vh; transform: translateX(-50%); text-align: center; z-index: 50; width: min(640px, 80vw);
  opacity: 0; transition: opacity .6s; pointer-events: none; }
.yard.in .nameplate { opacity: 1; pointer-events: auto; }
.yard.picked .nameplate { opacity: 0; pointer-events: none; }
.nameplate .role { display: inline-block; font-size: 16px; font-weight: 700; color: #1b1203; background: var(--sun); padding: 4px 14px; border-radius: 99px; margin-bottom: 8px;
  box-shadow: 0 4px 18px rgba(0, 0, 0, .35); }
.nameplate .nr { display: flex; align-items: center; justify-content: center; gap: 18px; }
.nameplate h2 { margin: 0; font-size: 38px; line-height: 1.15; text-shadow: 0 2px 18px rgba(0, 0, 0, .6); }
.nameplate .brand { padding: 11px 22px; font-size: 16px; }
.pickhead { position: absolute; top: 92px; left: 0; right: 0; text-align: center; z-index: 50; opacity: 0; transition: opacity .8s .5s; pointer-events: none; }
.yard.in .pickhead { opacity: 1; }
.yard.picked .pickhead { opacity: 0; transition-delay: 0s; }
.pickhead h1 { margin: 0; font-size: 34px; font-weight: 700; text-shadow: 0 2px 20px rgba(0, 0, 0, .6); }
.arrow { position: absolute; top: 50%; z-index: 50; width: 52px; height: 52px; border-radius: 50%; border: 1px solid var(--line); background: var(--chrome);
  display: grid; place-items: center; padding: 0; opacity: 0; transition: opacity .6s .8s; }
.arrow svg { width: 22px; height: 22px; }
.arrow.prev { right: 40px; } .arrow.next { left: 40px; }
.yard.in .arrow { opacity: 1; }
.yard.picked .arrow { opacity: 0; pointer-events: none; transition-delay: 0s; }

/* the chosen person's day, beside them */
.daypanel { position: absolute; z-index: 50; top: 96px; right: 6vw; width: min(540px, 44vw); max-height: calc(100vh - 120px); overflow-y: auto; padding-inline-end: 4px; opacity: 0; transform: translateY(12px);
  transition: opacity .6s .35s, transform .6s .35s; pointer-events: none; }
.yard.picked .daypanel { opacity: 1; transform: none; pointer-events: auto; }
.daypanel .role { display: inline-block; font-size: 15px; font-weight: 700; color: #1b1203; background: var(--sun); padding: 3px 12px; border-radius: 99px; }
.daypanel h2 { margin: 8px 0 18px; font-size: 48px; line-height: 1.1; }
.chapters { list-style: none; margin: 0 0 22px; padding: 0; border-top: 1px solid var(--line); }
.chapters li { border-bottom: 1px solid var(--line); }
/* each moment of the day is a button: it starts the day right there */
.chapters .chap { width: 100%; display: grid; grid-template-columns: 52px 1fr auto 22px; gap: 14px; align-items: center; padding: 10px 8px; margin: 0 -8px; background: none; border: 0; border-radius: 12px; text-align: start; color: inherit; transition: background .2s; }
.chapters .chap:not(:disabled):hover { background: rgba(255, 255, 255, .08); }
.chapters .chap:disabled { cursor: default; }
.chapters .chap .go { color: var(--on-2); display: grid; place-items: center; } .chapters .chap .go svg { width: 18px; height: 18px; }
.chapters .chap:hover .go { color: var(--sun); }
.chapters .t { font: 500 13px var(--f-mono); color: var(--on-2); }
.chapters b { font-size: 16px; }
.chapters span.d { display: block; font-size: 13.5px; color: var(--on-2); margin-top: 2px; }
.withs { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.with { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; color: var(--on); white-space: nowrap; }
.with img { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; object-position: 50% 50%; background: #2a3a36; border: 2px solid rgba(255, 255, 255, .28); }
.soon { font-size: 14px; color: var(--sun); margin: 0 0 12px; }
.chapters .by { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--on-2); margin-inline-end: 8px; }
.chapters .by img { width: 26px; height: 26px; border-radius: 50%; object-fit: cover; object-position: 50% 50%; background: #2a3a36; }
.daypanel .row { display: flex; gap: 12px; align-items: center; }

/* ---------- the day player ---------- */
.player { position: fixed; inset: 0; overflow: hidden; }
.player .frame { position: absolute; transition: opacity 1s ease; }
/* The scene's stand-in for the clip: a slow, steady push in one direction. */
.zoomer.drift { animation: drift linear both; }
@keyframes drift { from { transform: scale(1); } to { transform: scale(1.06); } }
.frame.pov .keyed { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; user-select: none; }
.screen-host { position: absolute; inset: 0; }
.device-ui { position: absolute; left: 0; top: 0; transform-origin: 0 0; overflow: hidden; }

.hud { position: absolute; inset: 0; z-index: 10; pointer-events: none; }
.hud > * { pointer-events: auto; }
.hud::before { content: ''; position: absolute; inset: auto 0 0 0; height: 160px; pointer-events: none; background: linear-gradient(to top, rgba(6, 12, 11, .62), rgba(6, 12, 11, 0)); }
.daychip { position: absolute; top: 22px; right: 28px; display: inline-flex; align-items: center; gap: 10px; font-size: 15px; font-weight: 600; padding-block: 6px; padding-inline: 6px 18px;
  border-radius: 99px; background: var(--chrome); border: 1px solid var(--line); backdrop-filter: blur(10px); }
.daychip .dfaces { display: flex; }
.daychip .dfaces img + img { margin-inline-start: -10px; }
.daychip img { width: 34px; height: 34px; border: 2px solid rgba(10, 18, 16, .8); border-radius: 50%; object-fit: cover; object-position: 50% 50%; background: #2a3a36; }
.daychip .t { font: 500 14px var(--f-mono); color: var(--on-2); }
.who { display: inline-flex; align-items: center; gap: 12px; font-size: 18px; font-weight: 700; }
.who img { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; object-position: 50% 50%; background: #2a3a36; border: 2px solid rgba(255, 255, 255, .5); box-shadow: 0 4px 18px rgba(0, 0, 0, .4); }
.cap { position: absolute; right: 56px; bottom: 112px; max-width: 560px; animation: rise .7s ease both; }
.cap .who { margin-bottom: 12px; text-shadow: 0 2px 12px rgba(0, 0, 0, .6); }
.cap p { margin: 0; font-size: 28px; line-height: 1.45; font-weight: 600; text-shadow: 0 2px 18px rgba(0, 0, 0, .55); }
.cap::before { content: ''; position: absolute; inset: -60px -60px -40px -80px; z-index: -1; background: radial-gradient(ellipse at 70% 60%, rgba(6, 12, 11, .55), rgba(6, 12, 11, 0) 70%); }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } }
.skip { position: absolute; left: 32px; bottom: 96px; display: inline-flex; align-items: center; gap: 6px; font-size: 14px; padding: 8px 14px; border-radius: 99px;
  background: var(--chrome); border: 1px solid var(--line); }
.skip svg { width: 16px; height: 16px; }

/* the coach: a card beside the device, and a ring on the real element */
.coach { position: absolute; top: 120px; right: 56px; width: min(330px, 26vw); padding: 18px 20px; border-radius: 22px; background: rgba(10, 18, 16, .82); border: 1px solid var(--line);
  backdrop-filter: blur(14px); box-shadow: 0 18px 50px rgba(0, 0, 0, .35); opacity: 0; transition: opacity .35s, left .45s cubic-bezier(.3, .7, .2, 1), top .45s cubic-bezier(.3, .7, .2, 1); }
.coach.placed { opacity: 1; right: auto; }
.coach .who { font-size: 16px; margin-bottom: 12px; }
.coach .who img { width: 44px; height: 44px; }
.coach .stepn { font: 500 12px var(--f-mono); color: var(--sun); margin-bottom: 4px; }
.coach p { margin: 0; font-size: 18px; line-height: 1.6; }
.coach p b { color: #fff; background: rgba(14, 140, 113, .55); padding: 0 6px; border-radius: 6px; }
.coach .dots { display: flex; gap: 5px; margin-top: 14px; }
.coach .dots i { flex: 1; height: 4px; border-radius: 2px; background: rgba(255, 255, 255, .18); }
.coach .dots i.d { background: rgba(255, 255, 255, .6); }
.coach .dots i.on { background: var(--sun); }
.coach.free h3 { margin: 0 0 6px; font-size: 20px; line-height: 1.45; }
.coach.free p { font-size: 15px; color: var(--on-2); }
.coach .acts { display: flex; gap: 10px; margin-top: 16px; flex-wrap: wrap; }
.coach .acts .brand { padding: 11px 20px; font-size: 15px; }
.coach .acts .ghost { padding: 10px 14px; font-size: 14px; }
.coach .up { margin-top: 14px; display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--on-2); }
.coach .up img { width: 26px; height: 26px; border-radius: 50%; object-fit: cover; object-position: 50% 50%; background: #2a3a36; }
.coach .up b { color: var(--on); }
.coach.nudge { animation: nudge .45s; }
.coach .brand.nudge { animation: glow 1s ease 2; }
@keyframes glow { 50% { box-shadow: 0 0 0 8px rgba(255, 181, 71, .45); } }
@keyframes nudge { 20%, 60% { transform: translateX(-7px); } 40%, 80% { transform: translateX(7px); } }
.coachring { position: absolute; z-index: 9; pointer-events: none; border-radius: 16px; border: 3px solid var(--sun); opacity: 0; transition: opacity .25s;
  box-shadow: 0 0 0 5px rgba(255, 181, 71, .25), 0 0 0 200vmax rgba(6, 12, 11, .0); }
.coachring.on { opacity: 1; animation: pulse 1.6s ease-in-out infinite; }
.coachring.nudge { animation: pulse .3s 3; }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 4px rgba(255, 181, 71, .3); } 50% { box-shadow: 0 0 0 12px rgba(255, 181, 71, .0); } }
.ripple { position: fixed; z-index: 30; width: 34px; height: 34px; margin: -17px 0 0 -17px; border-radius: 50%; background: rgba(255, 255, 255, .55); pointer-events: none; animation: ripple .6s ease-out forwards; }
@keyframes ripple { from { transform: scale(.4); opacity: .9; } to { transform: scale(1.8); opacity: 0; } }

/* the timeline: white, quiet; it shrinks to a hairline while the app is live and comes back on hover */
.rail { position: absolute; left: 56px; right: 56px; bottom: 28px; display: flex; gap: 12px; align-items: flex-end; transition: opacity .4s, transform .4s; }
.rail .seg { flex: 1; min-width: 0; background: none; border: 0; padding: 0; text-align: start; }
.rail .seg .lab { display: flex; gap: 8px; align-items: baseline; font-size: 13px; color: var(--on-2); margin-bottom: 8px; white-space: nowrap; overflow: hidden; }
.rail .seg .lab .t { font: 500 12px var(--f-mono); }
.rail .seg.on .lab { color: var(--on); font-weight: 600; }
.rail .bar { display: flex; gap: 3px; }
.rail .bar i { flex: 1; height: 4px; border-radius: 2px; background: rgba(255, 255, 255, .22); }
.rail .bar i.done { background: rgba(255, 255, 255, .65); }
.rail .bar i.on { background: #fff; }
.hud.guide .rail, .hud.free .rail { opacity: .0; transform: translateY(14px); }
.hud.guide::before, .hud.free::before { opacity: 0; }
.hud.guide .rail:hover, .hud.free .rail:hover { opacity: 1; transform: none; }
.hud .rail::before { content: ''; position: absolute; inset: -40px -56px -28px; z-index: -1; }
.hud.guide::after, .hud.free::after { content: ''; position: absolute; left: 56px; right: 56px; bottom: 14px; height: 2px; border-radius: 1px; background: rgba(255, 255, 255, .35); pointer-events: none; }

/* the end */
.endcard { position: absolute; inset: 0; z-index: 6; display: grid; place-items: center; text-align: center; background: rgba(6, 12, 11, .62); }
.endcard h2 { font-size: 46px; margin: 0 0 10px; }
.endcard p { font-size: 19px; color: var(--on-2); margin: 0 0 26px; }
.endcard .faces { display: flex; justify-content: center; gap: 14px; margin-bottom: 26px; }
.endcard .faces button { display: flex; background: none; border: 0; padding: 0; }
.endcard .faces img { width: 70px; height: 70px; border-radius: 50%; object-fit: cover; object-position: 50% 50%; background: #2a3a36; border: 2px solid var(--line); margin-inline-start: -10px; }
.endcard .faces button:hover img { border-color: var(--sun); }
.endcard .row { display: flex; gap: 12px; justify-content: center; }

@media (max-height: 640px) {
  .pickhead { top: 74px; } .pickhead h1 { font-size: 28px; }
  .nameplate h2 { font-size: 30px; } .nameplate .role { font-size: 14px; }
  .cap { bottom: 96px; } .cap p { font-size: 23px; }
  .daypanel { top: 80px; } .daypanel h2 { font-size: 38px; }
  .coach p { font-size: 16px; }
  .rail { bottom: 20px; }
}

body.clean .hud, body.clean .coachring, body.clean .ripple { display: none !important; }

/* ---------- the timeline site: the day as one row of moments ---------- */
.board { position: fixed; inset: 0; z-index: 50; display: flex; flex-direction: column; justify-content: flex-end; padding: 0 0 4.5vh; opacity: 0; pointer-events: none;
  transition: opacity .8s .3s; background: linear-gradient(to top, rgba(6, 12, 11, .82) 0%, rgba(6, 12, 11, .5) 45%, rgba(6, 12, 11, .1) 75%); }
.yard.in .board { opacity: 1; pointer-events: auto; }
.bhead { text-align: center; margin: 0 auto 3vh; max-width: 720px; padding: 0 24px; }
.bhead h1 { margin: 0; font-size: 40px; text-shadow: 0 2px 20px rgba(0, 0, 0, .5); }
.bhead p { margin: 8px 0 18px; font-size: 18px; color: var(--on-2); }
.brow { display: flex; gap: 14px; overflow-x: auto; padding: 4px 56px 10px; scroll-snap-type: x proximity; }
.mcard { flex: none; width: 236px; scroll-snap-align: start; display: flex; flex-direction: column; gap: 4px; text-align: start; padding: 0 0 12px; border-radius: 18px; overflow: hidden;
  background: rgba(10, 18, 16, .72); border: 1px solid var(--line); backdrop-filter: blur(10px); transition: transform .2s, border-color .2s; }
.mcard:hover { transform: translateY(-4px); border-color: rgba(255, 181, 71, .6); }
.mcard .mimg { display: block; aspect-ratio: 16 / 9; background-size: cover; background-position: center; margin-bottom: 6px; }
.mcard .mt { font: 500 13px var(--f-mono); color: var(--sun); padding: 0 14px; text-align: right; }
.mcard b { font-size: 16px; padding: 0 14px; } .mcard small { font-size: 13px; color: var(--on-2); padding: 0 14px; line-height: 1.5; min-height: 39px; }
.mcard .mf { display: flex; gap: 0; padding: 4px 14px 0; } .mcard .mf img { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; border: 2px solid rgba(10, 18, 16, .9); background: #2a3a36; }
.mcard .mf img + img { margin-inline-start: -8px; }
@media (max-height: 640px) { .bhead h1 { font-size: 30px; } .bhead p { font-size: 15px; margin: 4px 0 12px; } .mcard { width: 210px; } .mcard small { display: none; } }
