/* بسطة · landing site
   Bastah's own system (app repo docs/COLORS.md, TYPOGRAPHY.md): calm UI, loud art.
   Ultra is the host's stage, Night and Cream are the neutrals, Lime is the one thing to tap. */

@font-face { font-family: "Thmanyah Sans"; src: url("/assets/fonts/ThmanyahSans-Regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Thmanyah Sans"; src: url("/assets/fonts/ThmanyahSans-Medium.woff2") format("woff2"); font-weight: 500 600; font-display: swap; }
@font-face { font-family: "Thmanyah Sans"; src: url("/assets/fonts/ThmanyahSans-Bold.woff2") format("woff2"); font-weight: 700 800; font-display: swap; }
@font-face { font-family: "Thmanyah Sans"; src: url("/assets/fonts/ThmanyahSans-Black.woff2") format("woff2"); font-weight: 900; font-display: swap; }
@font-face { font-family: "Thmanyah Serif Display"; src: url("/assets/fonts/ThmanyahSerifDisplay-Bold.woff2") format("woff2"); font-weight: 700; font-display: swap; }

:root {
  --ultra: #4213f7;
  --tomato: #fe5946;
  --mustard: #ffc658;
  --lime: #c6ff3d;
  --lilac: #b57bff;
  --mint: #71e2c6;
  --pink: #ff9ec7;
  --sky: #5cc8ff;

  --night: #100b22;
  --night-card: #1c1634;
  --night-raised: #282145;
  --night-line: #352d57;
  --night-t2: #bdb7d4;
  --night-t3: #847e9e;

  --cream: #fbf6ec;
  --paper: #ffffff;
  --cream-raised: #f2ebdd;
  --cream-line: #e6dcc8;
  --ink: #17112e;
  --ink-2: #5e587a;
  --ink-3: #736d8c;

  --bubble: #fff6e5;
  --on-ultra-2: #e3dcff;
  --tint-lime: #effad2;
  --tint-ultra: #e9e3ff;

  --font: "Thmanyah Sans", "SF Arabic", "Geeza Pro", system-ui, sans-serif;
  --accent-font: "Thmanyah Serif Display", "Thmanyah Sans", serif;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --pop: cubic-bezier(0.34, 1.56, 0.64, 1);
  --bar-h: 76px;
  --sheet: 44px;
  --gutter: clamp(20px, 4vw, 48px);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--bar-h) + 16px); scrollbar-color: var(--ultra) var(--cream); }
body { margin: 0; font-family: var(--font); font-weight: 500; font-size: 17px; line-height: 1.6; color: var(--ink); background: var(--cream); text-rendering: optimizeLegibility; -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3, h4, p, ul, ol, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; }
::selection { background: var(--lime); color: var(--night); }
:focus-visible { outline: 3px solid var(--lime); outline-offset: 3px; border-radius: 10px; }
.games :focus-visible, .faq :focus-visible, .doc :focus-visible { outline-color: var(--ultra); }
:lang(en) { letter-spacing: -0.005em; }
.accent { font-family: var(--accent-font); font-weight: 700; }
.i { width: 1.2em; height: 1.2em; flex: none; }

.skip { position: absolute; inset-inline-start: 16px; top: -60px; z-index: 100; background: var(--lime); color: var(--night); padding: 10px 16px; border-radius: 999px; font-weight: 700; text-decoration: none; }
.skip:focus { top: 12px; }

.wrap { max-width: 1240px; margin-inline: auto; padding-inline: var(--gutter); }
.wrap--narrow { max-width: 820px; }
.h2 { font-weight: 900; font-size: clamp(2rem, 1.2rem + 2.6vw, 3.5rem); line-height: 1.12; text-wrap: balance; }
.lead { font-size: clamp(1.06rem, 1rem + 0.3vw, 1.25rem); line-height: 1.7; max-width: 60ch; text-wrap: pretty; }

.hero { background: var(--ultra); }

/* ---------------------------------------------------------------- buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: 52px; padding: 0 26px; border-radius: 999px; border: 0;
  font: 700 17px/1 var(--font); text-decoration: none; white-space: nowrap; cursor: pointer;
  transition: transform 160ms var(--ease), background-color 160ms var(--ease), border-color 160ms var(--ease), box-shadow 200ms var(--ease);
}
.btn:active { transform: scale(0.97); }
.btn--lg { height: 62px; padding: 0 34px; font-size: 19px; }
.btn--sm { height: 40px; padding: 0 18px; font-size: 15px; }
.btn--lime { background: var(--lime); color: var(--night); box-shadow: 0 10px 24px -14px rgb(16 11 34 / 0.7); }
.btn--lime:hover { background: #d3ff6a; transform: translateY(-2px); box-shadow: 0 16px 30px -16px rgb(16 11 34 / 0.75); }
.btn--ultra { background: var(--ultra); color: #fff; }
.btn--ultra:hover { background: #3209d6; transform: translateY(-2px); }
.btn--ghost-light { color: #fff; box-shadow: inset 0 0 0 2px rgb(255 255 255 / 0.42); }
.btn--ghost-light:hover { box-shadow: inset 0 0 0 2px #fff; background: rgb(255 255 255 / 0.08); }
.btn--ghost { background: var(--night-card); color: #fff; box-shadow: inset 0 0 0 1px var(--night-line); }
.fake { pointer-events: none; }

/* ---------------------------------------------------------------- top bar */
.bar { position: fixed; inset: 0 0 auto; z-index: 50; height: var(--bar-h); color: #fff; transition: background-color 260ms var(--ease), box-shadow 260ms var(--ease); }
.bar[data-scrolled], .page-doc .bar { background: var(--night); box-shadow: 0 1px 0 var(--night-line); }
.bar__in { height: 100%; max-width: 1320px; margin-inline: auto; padding-inline: var(--gutter); display: flex; align-items: center; gap: 28px; }
.bar__logo { flex: none; display: block; }
.logo { height: 46px; width: auto; }
.bar__nav { display: flex; gap: 26px; margin-inline-start: 12px; }
.bar__nav a { font-weight: 700; font-size: 16px; text-decoration: none; opacity: 0.88; text-underline-offset: 8px; text-decoration-thickness: 2px; }
.bar__nav a:hover, .bar__nav a[aria-current] { opacity: 1; text-decoration: underline; text-decoration-color: var(--lime); }
.bar__end { margin-inline-start: auto; display: flex; align-items: center; gap: 12px; }
.lang { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px; border-radius: 999px; font-weight: 700; font-size: 15px; text-decoration: none; box-shadow: inset 0 0 0 1.5px rgb(255 255 255 / 0.35); transition: box-shadow 160ms var(--ease); }
.lang:hover { box-shadow: inset 0 0 0 1.5px #fff; }
.lang__short { display: none; }
.bar--home .bar__cta { opacity: 0; visibility: hidden; transform: translateY(-6px); transition: opacity 220ms var(--ease), transform 220ms var(--ease), visibility 0s 220ms; }
.bar--home[data-scrolled] .bar__cta { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
.bar--home[data-scrolled][data-quiet] .bar__cta { opacity: 0; visibility: hidden; transform: translateY(-6px); transition: opacity 220ms var(--ease), transform 220ms var(--ease), visibility 0s 220ms; }
.visually-hidden { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------------------------------------------------------------- hero: a session starting */
.hero { position: relative; color: #fff; overflow: hidden; padding-top: var(--bar-h); isolation: isolate; }
/* The code as a signal: Ultra-toned wavy rings radiating from the ticket, each turning slowly its own way.
   The rings turn but never flash; only the code flickers. Sized off the room, so they follow it on every screen. */
.rings { position: absolute; left: 50%; top: 47%; width: 330cqi; height: 330cqi; transform: translate(-50%, -50%); z-index: -1; pointer-events: none; overflow: visible; }
.rings__r { transform-box: view-box; transform-origin: 0 0; }
/* Slow counter-turning rings: the wobbles slide past each other, so the field looks like it is waving. */
.motion .rings__r--cw { animation: ring-spin var(--t) linear infinite; }
.motion .rings__r--ccw { animation: ring-spin var(--t) linear infinite reverse; }
.hero:not(.in-view) .rings__r { animation-play-state: paused; }
@keyframes ring-spin { to { transform: rotate(360deg); } }
.rings__r { will-change: transform; }
.hero__sky { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.spark-h { position: absolute; left: var(--x); top: var(--y); width: var(--sz); height: var(--sz); }
.spark-h svg { width: 100%; height: 100%; }
.motion .spark-h { animation: k-twinkle 3.6s ease-in-out infinite; }
.hero:not(.in-view) :is(.spark-h, .band, .neon) { animation-play-state: paused; }
@keyframes k-twinkle { 0%, 100% { transform: scale(1) rotate(0deg); opacity: 1; } 50% { transform: scale(0.72) rotate(18deg); opacity: 0.75; } }
.hero__in { position: relative; max-width: 1320px; margin-inline: auto; padding: clamp(16px, 3vh, 40px) var(--gutter) 150px; min-height: min(100svh, 980px); display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(24px, 4vw, 64px); align-items: center; }
.hero__h { font-weight: 900; font-size: clamp(2.8rem, 1.1rem + 4.6vw, 5.6rem); line-height: 1.04; text-wrap: balance; }
.hero__h:lang(en) { letter-spacing: -0.025em; line-height: 0.98; }
.hero__lead { margin-top: 22px; font-size: clamp(1.1rem, 1rem + 0.45vw, 1.4rem); line-height: 1.65; color: var(--on-ultra-2); max-width: 30em; text-wrap: pretty; }
.hero__ctas { margin-top: 34px; display: flex; flex-wrap: wrap; gap: 12px; }
.facts { margin-top: 26px; display: flex; flex-wrap: wrap; gap: 8px 22px; font-weight: 700; font-size: 16px; color: #fff; }
.facts li { display: inline-flex; align-items: center; gap: 9px; }
.facts li::before { content: ""; width: 8px; height: 8px; border-radius: 2px; background: var(--lime); transform: rotate(45deg); }
.soon-chip { margin-top: 26px; display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 14px; border-radius: 999px; background: rgb(16 11 34 / 0.32); color: var(--on-ultra-2); font-weight: 700; font-size: 14px; }

/* The room: the code, the faces walking in, the host's line. */
.room { position: relative; width: 100%; max-width: 640px; aspect-ratio: 1 / 0.94; margin-inline-start: auto; container-type: inline-size; }
.ticket { position: absolute; left: 50%; top: 47%; z-index: 2; transform: translate(-50%, -50%) rotate(-3deg); display: grid; justify-items: center; gap: clamp(6px, 1.6cqi, 10px); padding: clamp(12px, 2.8cqi, 18px) clamp(16px, 4cqi, 26px) clamp(10px, 2.5cqi, 16px); border-radius: clamp(20px, 4.6cqi, 30px); background: var(--night); box-shadow: 0 0 0 3px var(--night), 0 30px 60px -24px rgb(16 11 34 / 0.85); }
[dir="rtl"] .ticket { transform: translate(-50%, -50%) rotate(3deg); }
.ticket__label { font-weight: 700; font-size: clamp(12px, 2.2cqi, 14px); color: var(--night-t2); }
.ticket__plate { display: block; border-radius: 16px; background: #0a0618; padding: 10px 22px 12px; box-shadow: inset 0 0 0 1px #2a2148; }
.ticket__count { font-weight: 700; font-size: 14px; color: var(--lime); background: #2c3a12; border-radius: 999px; padding: 4px 12px; font-variant-numeric: tabular-nums; }
.neon { display: inline-block; font-weight: 900; font-size: 15cqi; line-height: 1; letter-spacing: 0.12em; margin-inline-end: -0.12em; color: #f4ffd6; text-shadow: 0 0 5px var(--lime), 0 0 14px var(--lime), 0 0 28px rgb(198 255 61 / 0.6); font-variant-numeric: tabular-nums; }
.motion .neon:not(.neon--static) { animation: neon-breathe 3.6s 1.4s ease-in-out infinite alternate; }
.motion .room.is-staged .ticket .neon { opacity: 0.18; text-shadow: none; }
.motion .room.is-on .ticket .neon { animation: neon-on 1.1s steps(1, end) both, neon-breathe 3.6s 1.1s ease-in-out infinite alternate; }
@keyframes neon-on { 0%, 18%, 34% { opacity: 0.25; text-shadow: none; } 10%, 26%, 100% { opacity: 1; } }
@keyframes neon-breathe { to { text-shadow: 0 0 4px var(--lime), 0 0 10px var(--lime), 0 0 20px rgb(198 255 61 / 0.45); } }

.guests { position: absolute; inset: 0; }
.guest { position: absolute; left: var(--x); top: var(--y); width: calc(var(--s) * 1cqi); transform: translate(-50%, -50%) rotate(var(--r)); display: grid; justify-items: center; z-index: 1; }
[dir="rtl"] .guest { left: auto; right: var(--x); transform: translate(50%, -50%) rotate(var(--r)); }
.guest .tag { margin-top: -12px; position: relative; z-index: 2; padding: 2px clamp(8px, 1.8cqi, 12px) 3px; border-radius: 999px; background: var(--bubble); color: var(--night); font-weight: 700; font-size: clamp(12px, 2.2cqi, 14px); box-shadow: 0 0 0 2px var(--night); transform: rotate(calc(var(--r) * -0.6)); white-space: nowrap; }
.motion .room.is-staged .guest > * { opacity: 0; transform: translateY(26px) scale(0.4); }
.motion .room .guest > * { transition: opacity 260ms var(--ease), transform 620ms var(--pop); }
.motion .room .guest.is-in > * { opacity: 1; transform: none; }
.motion .room .guest.is-in .tag { transform: rotate(calc(var(--r) * -0.6)); transition-delay: 120ms; }
.spark { position: absolute; left: 50%; top: 52%; width: 10px; height: 10px; margin: -5px; border-radius: 50%; background: var(--c); pointer-events: none; animation: spark 700ms var(--ease) forwards; }
@keyframes spark { 0% { transform: translate(0, 0) scale(0.4); opacity: 0; } 30% { opacity: 1; transform: translate(calc(var(--dx) * 0.6), calc(var(--dy) * 0.6)) scale(1.2); } 100% { transform: translate(var(--dx), var(--dy)) scale(0); opacity: 0; } }

/* A character: a disc in its color, the head breaking out of the top (the app's pop-out). */
.pop { position: relative; display: block; width: 100%; aspect-ratio: 1 / 1.18; container-type: inline-size; }
.pop__disc { position: absolute; inset: auto 0 0; aspect-ratio: 1; border-radius: 50%; background: var(--disc); box-shadow: 0 0 0 3px var(--night); }
.pop img { --sq: 118cqw; position: absolute; top: calc(-0.12 * var(--sq)); left: 50%; width: calc(1.9 * var(--sq)); height: calc(1.12 * var(--sq)); max-width: none; transform: translateX(-50%); pointer-events: none; user-select: none; }

.toast { position: absolute; left: 50%; top: -2%; z-index: 3; transform: translateX(-50%); display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 16px 0 6px; border-radius: 999px; background: #fff; color: var(--night); font-weight: 700; font-size: 15px; white-space: nowrap; box-shadow: 0 12px 30px -14px rgb(16 11 34 / 0.6); }
[dir="rtl"] .toast { padding: 0 6px 0 16px; }
.toast__face { width: 30px; height: 30px; border-radius: 50%; background: var(--c, var(--tomato)) var(--img, none) center 22% / 190% no-repeat; box-shadow: 0 0 0 2px var(--night); }
.motion .room.is-staged .toast { opacity: 0; transform: translate(-50%, -10px); }
.motion .room .toast { transition: opacity 220ms var(--ease), transform 380ms var(--ease); }
.motion .room .toast.is-shown { opacity: 1; transform: translate(-50%, 0); }

.bubble { position: relative; background: var(--bubble); color: var(--night); border-radius: 22px; padding: 14px 20px 16px; font-size: clamp(1.05rem, 0.95rem + 0.5vw, 1.35rem); line-height: 1.4; box-shadow: 0 0 0 3px var(--night); max-width: 19em; text-wrap: balance; }
.bubble::after { content: ""; position: absolute; bottom: -12px; inset-inline-start: 28px; width: 22px; height: 22px; background: var(--bubble); border-bottom: 3px solid var(--night); border-inline-end: 3px solid var(--night); transform: skewX(-20deg) rotate(45deg); border-radius: 0 0 6px 0; }
[dir="rtl"] .bubble::after { border-radius: 0 0 0 6px; transform: skewX(20deg) rotate(-45deg); }
.bubble--hero { position: absolute; z-index: 3; left: 50%; top: 69%; translate: -50% 0; width: max-content; max-width: 86cqi; display: flex; align-items: center; gap: clamp(8px, 1.8cqi, 12px); font-size: clamp(0.85rem, 3.2cqi, 1.3rem); padding: clamp(8px, 2cqi, 14px) clamp(12px, 3cqi, 20px) clamp(10px, 2.2cqi, 16px); text-align: center; }
.bubble--hero::after { inset-inline-start: calc(50% - 11px); top: -12px; bottom: auto; border: 0; border-top: 3px solid var(--night); border-inline-start: 3px solid var(--night); border-radius: 6px 0 0 0; transform: skewX(-12deg) rotate(45deg); }
[dir="rtl"] .bubble--hero::after { border-radius: 0 6px 0 0; transform: skewX(12deg) rotate(-45deg); }
.bubble__who { flex: none; position: relative; width: clamp(30px, 6.4cqi, 42px); aspect-ratio: 1; border-radius: 50%; overflow: hidden; background: var(--lilac); box-shadow: 0 0 0 2px var(--night); }
.bubble__who img { position: absolute; left: 50%; top: -6%; width: 190%; max-width: none; transform: translateX(-50%); }
.motion .room.is-staged .bubble--hero { opacity: 0; transform: translateY(12px) scale(0.92); }
.motion .room .bubble--hero { transition: opacity 240ms var(--ease), transform 520ms var(--pop); transform-origin: 50% 0; }
.motion .room .bubble--hero.is-shown { opacity: 1; transform: none; }

/* The kashta's dune stripes close the stage, drifting slowly like the app's home scene. */
.band { position: absolute; inset: auto 0 -1px; height: 130px; z-index: 1; background: url("/assets/art/band.svg?v=5bdbed3319") repeat-x 0 0 / 480px 130px; z-index: 0; }
.motion .band { animation: drift 34s linear infinite; }
@keyframes drift { to { background-position-x: 480px; } }

/* ---------------------------------------------------------------- chips */
.chip { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 11px; border-radius: 999px; background: var(--cream-raised); color: var(--ink-2); font-weight: 700; font-size: 13px; white-space: nowrap; }
.chip--lime { background: var(--tint-lime); color: var(--ink); }

/* ---------------------------------------------------------------- sheets stacked over each other */
.how, .games, .cast, .faq, .foot--scene { position: relative; border-radius: var(--sheet) var(--sheet) 0 0; margin-top: calc(var(--sheet) * -1); }
.how { z-index: 2; } .games { z-index: 5; } .cast { z-index: 4; } .faq { z-index: 6; } .foot--scene { z-index: 7; }
/* The games sheet is the one that lies on top of the next: rounded at the foot too, with the cast slid under it. */
.games { border-radius: var(--sheet); }
.games + .cast { border-radius: 0; }

/* ---------------------------------------------------------------- how it works */
.how { background: var(--night); color: #fff; padding: calc(var(--sheet) + 72px) 0 calc(var(--sheet) + 96px); }
/* Straight after the hero, the band's last stripe is already Night, so this sheet just continues it: no lip, no overlap. */
.hero + .how { margin-top: 0; border-radius: 0; padding-top: 72px; }
.how .h2 { max-width: 16em; }
.beats { margin-top: 64px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; position: relative; }
.beats::before { content: ""; position: absolute; top: 90px; inset-inline: 16%; border-top: 2px dashed var(--night-line); }
.beat { position: relative; }
.beat__v { height: 180px; display: grid; place-items: center; }
.beat h3 { margin-top: 26px; display: flex; align-items: center; gap: 12px; font-weight: 900; font-size: clamp(1.3rem, 1.1rem + 0.6vw, 1.6rem); line-height: 1.3; }
.beat__n { display: grid; place-items: center; flex: none; width: 36px; height: 36px; border-radius: 50%; box-shadow: inset 0 0 0 2px var(--night-line); color: var(--night-t2); font-size: 16px; }
.beat p { margin-top: 10px; color: var(--night-t2); max-width: 30ch; }
.v { position: relative; display: grid; place-items: center; background: var(--night); padding: 0 14px; }
.tap { position: absolute; inset-inline-end: 10%; bottom: -6px; width: 34px; height: 34px; border-radius: 50%; box-shadow: 0 0 0 3px #fff; opacity: 0; }
.motion .how.in-view .tap { animation: tap 2.4s var(--ease) infinite; }
@keyframes tap { 0%, 55% { transform: scale(1); opacity: 0.9; } 70% { transform: scale(0.7); opacity: 1; } 100% { transform: scale(1.9); opacity: 0; } }
.v--code { grid-auto-flow: column; gap: 14px; }
.ticket__plate--sm { padding: 8px 14px 10px; }
.ticket__plate--sm .neon { font-size: 34px; }
.qr { width: 78px; height: 78px; padding: 6px; background: #fff; border-radius: 12px; fill: var(--night); color: var(--night); stroke-width: 1; }
.v--play { gap: 14px; }
.mini-faces { display: flex; }
.pop--mini { width: 56px; }
.pop--mini + .pop--mini { margin-inline-start: -10px; }

/* ---------------------------------------------------------------- the games */
.games { background: var(--cream); padding: calc(var(--sheet) + 72px) 0 calc(var(--sheet) + 88px); }
.sec-head .lead { margin-top: 14px; color: var(--ink-2); }

/* Each category is a hand of cards: the label on one side, its notes fanned on an arc on the other, the way
   you'd hold them. Before it's dealt the hand is a squared-up deck; pointing at a note lifts it out. */
.hand { display: grid; grid-template-columns: 290px minmax(0, 1fr); gap: 40px; align-items: center; margin-top: 88px; }
.hand + .hand { margin-top: 64px; padding-top: 64px; border-top: 2px dashed var(--cream-line); }
.hand__label { display: grid; justify-items: start; gap: 6px; }
.hand__no { font-size: 14px; font-weight: 800; color: var(--ink-3); font-variant-numeric: tabular-nums; }
/* The name gets a marker swipe in the category's color, line by line when it wraps. */
.hand__name { font-size: clamp(2.2rem, 1.4rem + 1.8vw, 3.2rem); line-height: 1.2; text-wrap: balance; }
.hand__name span { background: linear-gradient(transparent 64%, color-mix(in srgb, var(--c) 66%, var(--cream)) 64% 90%, transparent 90%); -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.hand__sub { color: var(--ink-2); font-size: 1.05rem; }
.hand__count { margin-top: 10px; height: 30px; padding: 0 12px; display: inline-flex; align-items: center; border-radius: 999px; box-shadow: inset 0 0 0 2px var(--night); font-weight: 800; font-size: 14px; }

/* Fewer notes fan wider, so a hand of three doesn't huddle. */
.hand__cards { --w: 226px; --gap: calc(146px + (5 - var(--n)) * 22px); --spread: var(--gap); --dir: 1; position: relative; height: 440px; }
[dir="rtl"] .hand__cards { --dir: -1; }
.hand__cards .card { --k: calc(var(--i) - (var(--n) - 1) / 2); --tilt: 0deg; position: absolute; top: 40px; left: 50%; width: var(--w); margin-left: calc(var(--w) / -2); z-index: calc(var(--i) + 1);
  transform: translate(calc(var(--k) * var(--spread) * var(--dir)), calc(var(--k) * var(--k) * 9px)) rotate(calc(var(--k) * 4.5deg * var(--dir)));
  transition: transform 420ms var(--ease), box-shadow 300ms var(--ease); }
@media (hover: hover) {
  .hand__cards:hover { --spread: calc(var(--gap) + 14px); }
  .hand__cards .card:hover { z-index: 20; transform: translate(calc(var(--k) * var(--spread) * var(--dir)), -34px) rotate(0deg) scale(1.05); box-shadow: 0 0 0 2px var(--night), 0 30px 50px -24px rgb(16 11 34 / 0.55); }
}
.motion .hand:not(.is-dealt) .hand__cards .card { transform: translate(calc(var(--i) * 2px), calc(var(--i) * -3px)) rotate(calc((var(--i) - 2) * 1.5deg)); }
.motion .hand.is-dealt:not(.is-settled) .hand__cards .card { transition: transform 700ms var(--pop) calc(var(--i) * 70ms + 150ms); }

/* Every game is a paper note taped to the stall's board: a white card with an ink outline, a strip of
   tape in its category's color, each one hung at its own slight angle. */
.card { --tilt: -1.2deg; position: relative; display: flex; flex-direction: column; rotate: var(--tilt); background: var(--paper); border-radius: 18px; padding: 10px 10px 16px; box-shadow: 0 0 0 2px var(--night), 0 16px 30px -20px rgb(16 11 34 / 0.5); transition: rotate 320ms var(--ease); }
.card:nth-child(4n + 2) { --tilt: 1deg; }
.card:nth-child(4n + 3) { --tilt: -0.6deg; }
.card:nth-child(4n + 4) { --tilt: 1.4deg; }
.card::before { content: ""; position: absolute; top: -13px; left: 50%; width: 88px; height: 26px; translate: -50% 0; rotate: calc(var(--tilt) * -3); background: color-mix(in srgb, var(--tape) 82%, transparent); clip-path: polygon(0 8%, 4% 0, 8% 10%, 12% 0, 88% 0, 92% 10%, 96% 0, 100% 8%, 100% 92%, 96% 100%, 92% 90%, 88% 100%, 12% 100%, 8% 90%, 4% 100%, 0 92%); z-index: 1; }
.card__cover { position: relative; border-radius: 12px; overflow: hidden; box-shadow: 0 0 0 1.5px var(--night); aspect-ratio: 640 / 472; background: var(--cream-raised); transition: box-shadow 160ms var(--ease); }
.card__cover img { width: 100%; height: 100%; object-fit: cover; }
.card h4, .card .card__lines, .card > p, .card__chips { padding-inline: 6px; }
.card h4 { margin-top: 14px; font-weight: 700; font-size: 1.15rem; line-height: 1.35; }
.card p { margin-top: 4px; color: var(--ink-2); font-size: 15px; line-height: 1.55; }
.card__chips { margin-top: auto; padding-top: 12px; display: flex; flex-wrap: wrap; gap: 6px; }
/* No pointer to hover with: the host's line never shows, so it takes no room. */
@media (hover: none) { .card__host { display: none !important; } }
.card--soon .card__cover img { filter: grayscale(1) contrast(0.85) brightness(1.08); opacity: 0.5; }
.card--soon h4 { color: var(--ink-2); }
/* «قريباً» is stamped on, not printed: a tomato rubber stamp across the cover's corner. */
.stamp { position: absolute; top: 14px; inset-inline-start: 12px; z-index: 1; padding: 3px 12px 4px; border-radius: 8px; color: var(--tomato); box-shadow: inset 0 0 0 2.5px var(--tomato); background: rgb(255 255 255 / 0.82); font-weight: 900; font-size: 15px; rotate: -8deg; }
@media (hover: hover) { .card:not(.card--soon):hover { rotate: 0deg; } }

/* Pointing at a game: the cover stays put, its outline presses in, and the host says his line about it. */
.card__lines { display: grid; }
.card__lines > * { grid-area: 1 / 1; }
.card .card__host { margin-top: 4px; display: flex; align-items: flex-start; gap: 8px; color: var(--ink); font-size: 16px; line-height: 1.45; opacity: 0; transform: translateY(4px); transition: opacity 180ms var(--ease), transform 260ms var(--ease); }
.card__who { flex: none; width: 24px; height: 24px; margin-top: 1px; border-radius: 50%; background: var(--lilac) url("/assets/art/cast/mic-pop.webp") center 18% / 190% no-repeat; box-shadow: 0 0 0 1.5px var(--night); }
.card__tag { transition: opacity 160ms var(--ease); }
@media (hover: hover) {
  .card:hover .card__tag { opacity: 0; }
  .card:hover .card__host { opacity: 1; transform: none; transition-delay: 60ms; }
}
.card h4 { margin-top: 14px; font-weight: 700; font-size: 1.15rem; line-height: 1.35; }
.card p { margin-top: 4px; color: var(--ink-2); font-size: 15px; line-height: 1.55; }
.card__chips { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 6px; }
.card--soon .card__cover img { filter: grayscale(1) contrast(0.85) brightness(1.08); opacity: 0.55; }
.card--soon h4 { color: var(--ink-2); }


/* ---------------------------------------------------------------- the cast */
.cast { background: var(--night); color: #fff; padding: calc(var(--sheet) + 72px) 0 196px; overflow: hidden; }
/* Under the faces, the cast closes on the cool dunes (mint, pink, sky), drifting the other way, into the FAQ. */
.band--cool { height: 110px; background-image: url("/assets/art/band-cool.svg?v=921d10680a"); background-size: 360px 110px; }
.motion .band--cool { animation: drift-back 26s linear infinite; }
.cast:not(.in-view) .band--cool { animation-play-state: paused; }
@keyframes drift-back { to { background-position-x: -360px; } }
.cast + .faq { margin-top: 0; border-radius: 0; padding-top: 72px; }
.cast .lead { margin-top: 16px; color: var(--night-t2); }
.marquees { margin-top: 56px; display: grid; gap: 18px; }
.marquee { overflow: hidden; padding-top: 30px; }
.marquee__track { display: flex; gap: 26px; width: max-content; }
.motion .marquee__track { animation: marquee 80s linear infinite; }
.motion .marquee--rev .marquee__track { animation-direction: reverse; animation-duration: 95s; }
.cast:not(.in-view) .marquee__track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-50%); } }
.marquee li { flex: none; padding-inline-end: 0; }
.pop--cast { width: clamp(92px, 9vw, 132px); transition: transform 380ms var(--pop); }
.marquee li:hover .pop--cast { transform: translateY(-8px) rotate(-4deg); }

/* ---------------------------------------------------------------- questions */
.faq { background: var(--cream); padding: calc(var(--sheet) + 72px) 0 calc(var(--sheet) + 96px); }
.qas { margin-top: 36px; border-top: 2px solid var(--cream-line); }
.qa { border-bottom: 2px solid var(--cream-line); }
.qa summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 22px 0; font-weight: 700; font-size: clamp(1.1rem, 1rem + 0.4vw, 1.3rem); line-height: 1.4; }
.qa summary::-webkit-details-marker { display: none; }
.qa summary .i { width: 28px; height: 28px; padding: 4px; border-radius: 50%; background: var(--cream-raised); color: var(--ink); transition: transform 260ms var(--ease), background-color 200ms var(--ease); }
.qa summary:hover .i { background: var(--tint-ultra); color: var(--ultra); }
.qa[open] summary .i { transform: rotate(45deg); background: var(--ultra); color: #fff; }
.qa p { padding: 0 0 24px; color: var(--ink-2); max-width: 62ch; }

/* ---------------------------------------------------------------- footer: the kashta after everyone left */
.foot { background: var(--night); color: var(--night-t2); }
.foot--scene { padding-top: calc(var(--sheet) + 80px); overflow: hidden; }
.end { position: relative; z-index: 2; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 420px); gap: 48px; align-items: center; padding-bottom: 96px; }
.end__copy { display: grid; justify-items: start; gap: 22px; }
.end__logo { height: 104px; width: auto; aspect-ratio: 822 / 504; }
.end__line { color: #fff; font-size: clamp(1.5rem, 1rem + 1.6vw, 2.4rem); line-height: 1.3; max-width: 14em; text-wrap: balance; }
/* A postcard from the kashta after everyone left: the app's scene layers in their own box. */
.postcard { position: relative; aspect-ratio: 680 / 900; border-radius: 32px; overflow: hidden; background: var(--night); box-shadow: 0 0 0 3px var(--mustard), 0 40px 80px -36px rgb(0 0 0 / 0.8); transform: rotate(-3deg); }
[dir="rtl"] .postcard { transform: rotate(3deg); }
.night__art { position: absolute; left: 0; bottom: 0; width: 100%; aspect-ratio: 680 / 1110; }
.night__art .k-sky, .night__art .k-ground, .night__art .k-moon-in, .night__art .k-layer { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; }
.motion .postcard:not(.in-view) * { animation-play-state: paused !important; }
.motion .postcard .k-ground { animation: k-rise 0.9s var(--ease) both; }
.motion .postcard .k-sky { animation: k-fade 1.1s ease-out 0.15s both; }
.motion .postcard .k-moon-in { transform-origin: 30.7% 21.6%; animation: k-settle 1.4s var(--ease) 0.2s both; }
.motion .postcard .k-moon { transform-origin: 30.7% 21.6%; animation: k-rock 14s ease-in-out infinite alternate; }
.motion .postcard .k-spark { animation: k-glint 4.8s ease-in-out infinite; }
.postcard .k-spark-a { transform-origin: 81% 20.4%; }
.postcard .k-spark-b { transform-origin: 49.8% 21.9%; animation-delay: -1.2s !important; }
.postcard .k-spark-c { transform-origin: 9.6% 20.4%; animation-delay: -2.4s !important; }
.postcard .k-spark-d { transform-origin: 91.5% 28.9%; animation-delay: -3.6s !important; }
.postcard .k-shoot { opacity: 0; }
.motion .postcard .k-shoot { animation: k-shoot 9s cubic-bezier(0.4, 0, 0.7, 1) 2.5s infinite; }
.motion .postcard .k-smoke { transform-origin: 64.4% 43.6%; animation: k-wisp 5.5s ease-in-out infinite alternate; }
.motion .postcard .k-dots-a { animation: k-blink 2.6s ease-in-out infinite alternate; }
.motion .postcard .k-dots-b { animation: k-blink 3.4s ease-in-out -1.3s infinite alternate; }
.motion .postcard .k-dots-c { animation: k-blink 4.2s ease-in-out -2.7s infinite alternate; }
.motion .postcard .k-bulb { animation: k-dying 6s linear infinite; }
@keyframes k-rise { from { opacity: 0; transform: translateY(5%); } }
@keyframes k-fade { from { opacity: 0; } }
@keyframes k-settle { from { opacity: 0; transform: translateY(-3%) rotate(-8deg); } }
@keyframes k-rock { from { transform: rotate(-2deg); } to { transform: rotate(2.5deg) translateY(-0.6%); } }
@keyframes k-blink { from { opacity: 1; } to { opacity: 0.3; } }
@keyframes k-glint { 0%, 62%, 100% { transform: scale(1) rotate(0deg); } 72% { transform: scale(1.35) rotate(45deg); } 82% { transform: scale(0.85) rotate(80deg); } 90% { transform: scale(1) rotate(90deg); } }
@keyframes k-shoot { 0% { opacity: 0; transform: translate(0, 0); } 2% { opacity: 1; } 10% { opacity: 0; transform: translate(-24%, 8.9%); } 100% { opacity: 0; transform: translate(-24%, 8.9%); } }
@keyframes k-wisp { from { transform: rotate(-2.5deg) scaleY(0.98); } to { transform: rotate(2.5deg) scaleY(1.03); } }
@keyframes k-dying { 0%, 6%, 11%, 16% { filter: brightness(1.1) saturate(2.4); } 7%, 10%, 17%, 100% { filter: none; } }

/* The wordmark as the app's loader draws it (components/loader.css): the letters hold each art color,
   then snap to the next on the beat the ب's dot lands. */
.live-logo { overflow: visible; }
.live-logo .ll-shadow { fill: var(--tomato); }
.live-logo .ll-shine { fill: #fff; }
.live-logo .ll-fill { fill: var(--lime); }
.live-logo .ll-dot { transform-box: view-box; transform-origin: 850px 637px; }
.motion .foot.in-view .live-logo .ll-fill { animation: loader-colors 6s linear infinite; }
.motion .foot.in-view .live-logo .ll-dot { animation: loader-pop 1.2s var(--ease) infinite; }
@keyframes loader-colors { 0%, 18% { fill: #c6ff3d; } 20%, 38% { fill: #ff9ec7; } 40%, 58% { fill: #5cc8ff; } 60%, 78% { fill: #ffc658; } 80%, 98% { fill: #71e2c6; } 100% { fill: #c6ff3d; } }
@keyframes loader-pop { 0%, 100% { transform: none; } 6% { transform: scale(1.12, 0.8); } 30% { transform: scale(1.32) rotate(-24deg); } 70% { transform: scale(0.96) rotate(4deg); } }
.foot__bar { position: relative; z-index: 2; max-width: 1320px; margin-inline: auto; padding: 22px var(--gutter) 28px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 28px; border-top: 1px solid var(--night-line); font-size: 15px; }
.foot--scene .foot__bar { background: var(--night); }
.foot__links { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.foot__links a { color: #fff; font-weight: 700; text-decoration: none; text-underline-offset: 6px; }
.foot__links a:hover { text-decoration: underline; text-decoration-color: var(--lime); }
.foot__meta { display: flex; gap: 18px; color: var(--night-t3); }

/* ---------------------------------------------------------------- privacy and support */
.page-doc { background: var(--cream); }
.page-doc .bar { background-color: var(--ultra); box-shadow: none; }
.doc { max-width: 820px; margin-inline: auto; padding: calc(var(--bar-h) + 72px) var(--gutter) 96px; }
.doc__head h1 { font-weight: 900; font-size: clamp(2.4rem, 1.6rem + 3vw, 4rem); line-height: 1.08; }
.doc__date { margin-top: 12px; color: var(--ink-3); font-weight: 700; font-size: 15px; }
.doc__lead { margin-top: 16px; font-size: 1.2rem; color: var(--ink-2); }
.doc__body { margin-top: 44px; }
.doc__intro { font-size: 1.15rem; line-height: 1.75; }
.doc__short { margin-top: 18px; padding: 16px 20px; border-radius: 18px; background: var(--tint-lime); font-weight: 700; }
.doc__body section { margin-top: 44px; }
.doc__body h2 { font-weight: 900; font-size: 1.6rem; line-height: 1.3; margin-bottom: 14px; }
.doc__body section > p { color: var(--ink-2); line-height: 1.8; max-width: 68ch; }
.doc__body section > p + p { margin-top: 12px; }
.doc__body strong { color: var(--ink); font-weight: 700; }
.contact-card { position: relative; background: var(--paper); border-radius: 28px; padding: 28px; box-shadow: 0 0 0 2px var(--cream-line); }
.contact-card p { margin-bottom: 20px; }
.contact-card--top { margin-top: 0 !important; padding-inline-end: 150px; }
.contact-card__art { position: absolute; inset-inline-end: 22px; top: 50%; width: 112px; transform: translateY(-50%) rotate(8deg); }
.qas--doc { margin-top: 0; }
.doc--404 { min-height: 70vh; }
.doc--404 .btn { margin-top: 28px; }

/* ---------------------------------------------------------------- smaller screens */
@media (max-width: 1080px) {
  .bar__nav { display: none; }
  .hand { grid-template-columns: 1fr; gap: 6px; }
  .hand__cards { --w: 220px; --gap: calc(140px + (5 - var(--n)) * 20px); }
}
@media (max-width: 900px) {
  :root { --bar-h: 64px; --sheet: 32px; }
  .logo { height: 38px; }
  .lang__long { display: none; }
  .lang__short { display: inline; }
  .lang { padding: 0 12px; }
  .hero__in { grid-template-columns: 1fr; gap: 6px; min-height: auto; padding-top: 22px; padding-bottom: 130px; }
  .hero__copy { display: contents; }
  .hero__h { order: 1; font-size: clamp(2.6rem, 1.4rem + 6vw, 3.6rem); }
  .hero__lead { order: 2; margin-top: 12px; }
  .room { order: 3; max-width: 470px; margin: 34px auto 8px; aspect-ratio: 1 / 1.12; }
  .room .neon { font-size: 11.5cqi; }
  .guest { width: calc(var(--s) * 0.92cqi); }
  .bubble--hero { top: 66%; }
  .hero__ctas { order: 4; margin-top: 18px; }
  .hero__ctas .btn { flex: 1 1 auto; }
  .facts { order: 5; margin-top: 18px; gap: 6px 16px; font-size: 15px; }
  .soon-chip { order: 6; justify-self: start; margin-top: 18px; }
  

  .beats { grid-template-columns: 1fr; gap: 44px; margin-top: 40px; }
  .beats::before { display: none; }
  .beat { display: grid; grid-template-columns: 1fr; }
  .beat__v { height: auto; justify-content: start; }
  .v { padding: 0; }
  .beat h3 { margin-top: 18px; }

  /* On a phone the hand lays flat in a row that scrolls sideways, the next note peeking in. */
  .hand { margin-top: 56px; }
  .hand + .hand { margin-top: 40px; padding-top: 40px; }
  .hand__name { font-size: 2rem; }
  .hand__cards { height: auto; display: flex; gap: 14px; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scroll-padding-inline: var(--gutter); margin-inline: calc(var(--gutter) * -1); padding: 26px var(--gutter) 22px; scrollbar-width: none; }
  .hand__cards::-webkit-scrollbar { display: none; }
  .hand__cards .card, .motion .hand:not(.is-dealt) .hand__cards .card, .motion .hand.is-dealt:not(.is-settled) .hand__cards .card { position: relative; top: 0; left: auto; margin: 0; flex: 0 0 min(62vw, 280px); width: auto; transform: none; scroll-snap-align: start; }
  .hand__cards .card:nth-child(odd) { --tilt: -1.2deg; }
  .hand__cards .card:nth-child(even) { --tilt: 1.1deg; }
  .card { padding: 7px 7px 12px; border-radius: 14px; }
  .card::before { width: 64px; height: 20px; top: -10px; }
  .card__cover { border-radius: 9px; }
  .card h4 { margin-top: 10px; font-size: 1rem; }
  .card p { font-size: 13px; line-height: 1.5; }
  .card h4, .card .card__lines, .card > p, .card__chips { padding-inline: 3px; }
  .chip { font-size: 13px; height: 26px; padding: 0 9px; }
  .stamp { font-size: 13px; top: 10px; inset-inline-start: 8px; }

  .end { grid-template-columns: 1fr; gap: 40px; padding-bottom: 64px; }
  .end__logo { height: 80px; }
  .postcard { width: min(100%, 360px); justify-self: center; }
  .contact-card--top { padding-inline-end: 28px; padding-top: 110px; }
  .contact-card__art { top: 22px; transform: rotate(8deg); width: 84px; }
}
@media (max-width: 420px) {
  .hero__ctas .btn { padding: 0 20px; }
  .facts { font-size: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; animation: none !important; }
}
