:root {
  --bg: #ece4d4;
  --panel: #f5efe2;
  --panel-rgb: 245, 239, 226;
  --text-rgb: 28, 22, 14;
  --accent-rgb: 217, 96, 58;
  --line: rgba(var(--text-rgb), .13);
  --line-strong: rgba(var(--text-rgb), .3);
  --text: rgb(var(--text-rgb));
  --muted: #6d6252;
  --accent: rgb(var(--accent-rgb)); /* terracotta, used for emphasis and the live readouts */
  --face-l: #d9cfba; --face-r: #cbbfa6; --face-t: #f8f3e8;
  --ok: #1b7a3e; --err: #b3261e;
  --radius: 4px;
  --maxw: 1160px;
  --font-latin: "IBM Plex Sans", system-ui, sans-serif;
  --font-display: "IBM Plex Sans", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, Consolas, monospace;
}
html[lang="ar"] {
  --font-latin: "Cairo", system-ui, sans-serif;
  --font-display: "Cairo", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: var(--font-latin); font-size: 17px; line-height: 1.65;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
  counter-reset: sec;
}
img, video { max-width: 100%; display: block; }
a { color: var(--text); }

.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: 20px; position: relative; }
section { padding-block: 84px; border-top: 1px solid var(--line); counter-increment: sec; }
section.hero { border-top: 0; counter-increment: none; }
section:not(.hero) .wrap::before {
  content: "0" counter(sec); display: block; margin-bottom: 22px;
  font-family: var(--font-mono); font-size: .78rem; letter-spacing: .14em; color: var(--muted);
}

h1, h2, h3 { font-family: var(--font-display); font-weight: 600; line-height: 1.08; margin: 0 0 .5em; letter-spacing: -.025em; }
h1 { font-size: clamp(2.3rem, 5.6vw, 4.1rem); }
h2 { font-size: clamp(2rem, 5vw, 3.3rem); }
h3 { font-family: var(--font-latin); font-weight: 600; font-size: 1.1rem; line-height: 1.3; letter-spacing: 0; }
html[lang="ar"] h1, html[lang="ar"] h2 { line-height: 1.3; font-weight: 600; }
html[lang="ar"] h1 { font-size: clamp(2.2rem, 5.4vw, 3.8rem); }
html[lang="ar"] h2 { font-size: clamp(2rem, 4.5vw, 3rem); }
p { margin: 0 0 1em; }
.lead { font-size: 1.1rem; color: var(--muted); max-width: 58ch; }
.lead strong { color: var(--text); font-weight: 600; }
.em { color: var(--accent); }
.eyebrow { font-family: var(--font-mono); color: var(--muted); font-size: .76rem; letter-spacing: .16em; text-transform: uppercase; margin-bottom: 1.4rem; }
html[lang="ar"] .eyebrow, html[lang="ar"] .fine, html[lang="ar"] label, html[lang="ar"] footer, html[lang="ar"] .badge, html[lang="ar"] .nav a.lang {
  font-family: var(--font-latin); letter-spacing: 0; text-transform: none;
}

/* header */
.site-header { position: sticky; top: 0; z-index: 10; background: var(--bg); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--text); line-height: 1; }
.brand .latin { font-family: "IBM Plex Sans", sans-serif; font-weight: 600; font-size: 1.3rem; letter-spacing: .1em; text-transform: uppercase; }
.brand .arabic { font-family: "Cairo", sans-serif; font-weight: 600; font-size: 1.5rem; line-height: 1; color: var(--text); padding-bottom: 3px; }
.nav { display: flex; align-items: center; gap: 22px; }
.nav a.lang { color: var(--muted); text-decoration: none; font-size: .85rem; font-family: var(--font-mono); }
.nav a.lang:hover { color: var(--text); }

.btn {
  display: inline-block; cursor: pointer; text-decoration: none; font: inherit; font-weight: 600;
  padding: 14px 28px; border-radius: var(--radius); border: 1px solid var(--text);
  background: var(--text); color: var(--bg); transition: background .2s, color .2s, border-color .2s;
}
.btn:hover { background: var(--accent); border-color: var(--accent); }
.btn.small { padding: 8px 16px; font-size: .88rem; }

/* hero */
.hero { padding-block: 64px 80px; }
.hero-grid { display: grid; gap: 28px; align-items: center; }
.hero .copy .btn { margin-top: 8px; }
.stage { position: relative; width: 100%; max-width: 780px; margin-inline: auto; }
.stage { cursor: grab; touch-action: pan-y; user-select: none; -webkit-user-select: none; aspect-ratio: 1600 / 918; }
.stage.dragging { cursor: grabbing; }
.stage canvas { width: 100%; height: 100%; display: block; pointer-events: none; }
.stage .hint, .stage .readout, .stage .load { position: absolute; margin: 0; font-family: var(--font-mono); font-size: .72rem; color: var(--muted); pointer-events: none; }
html[lang="ar"] .stage .hint, html[lang="ar"] .stage .readout, html[lang="ar"] .stage .load { font-family: var(--font-latin); font-size: .82rem; }
.stage .hint { inset-inline-start: 0; bottom: 0; transition: opacity .5s; }
.stage.touched .hint { opacity: 0; }
.stage .readout { inset-inline-end: 0; bottom: 0; color: var(--accent); }
.stage .load { inset-inline-start: 0; top: 0; }
.stage .poster { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; pointer-events: none; transition: opacity .7s; }
.stage .tip {
  position: absolute; z-index: 2; pointer-events: none; min-width: 164px;
  display: grid; grid-template-columns: 1fr auto; gap: 3px 18px; padding: 12px 14px;
  background: rgba(var(--panel-rgb), .72); border: 1px solid var(--line-strong); border-radius: var(--radius);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  font-family: var(--font-mono); font-size: .75rem; opacity: 0; transition: opacity .2s;
}
html[lang="ar"] .stage .tip { font-family: var(--font-latin); font-size: .85rem; }
.stage .tip.on { opacity: 1; }
.stage .tip b { grid-column: 1 / -1; font-weight: 500; color: var(--accent); margin-bottom: 4px; letter-spacing: .04em; }
.stage .tip span { color: var(--muted); }
.stage .tip i { font-style: normal; text-align: end; }
.stage .tip em { grid-column: 1 / -1; font-style: normal; color: var(--muted); font-size: .68rem; margin-top: 4px; }
.stage .pin { position: absolute; z-index: 3; width: 9px; height: 9px; margin: -4.5px 0 0 -4.5px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 3px rgba(var(--accent-rgb), .28); pointer-events: none; opacity: 0; transition: opacity .2s; }
.stage .stem { position: absolute; z-index: 2; width: 1px; margin-left: -.5px; background: var(--accent); pointer-events: none; opacity: 0; transition: opacity .2s; }
.stage .pin.on, .stage .stem.on { opacity: 1; }
.stage .zoomctl { position: absolute; z-index: 4; inset-inline-end: 0; top: 0; display: flex; flex-direction: column; gap: 4px; }
.stage .zoomctl button { width: 32px; height: 32px; padding: 0; cursor: pointer; font: 600 16px/1 var(--font-mono); color: var(--text); background: rgba(var(--panel-rgb), .72); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); border: 1px solid var(--line-strong); border-radius: var(--radius); transition: border-color .2s, color .2s; }
.stage .zoomctl button:hover { border-color: var(--accent); color: var(--accent); }
@media (pointer: coarse) { .stage .zoomctl button { width: 40px; height: 40px; font-size: 18px; } }
.stage .hint { max-width: 66%; }
.stage .zoomctl .fullbtn { display: flex; align-items: center; justify-content: center; }
.stage .rotate { display: none; position: absolute; z-index: 4; inset-inline: 0; bottom: max(14px, env(safe-area-inset-bottom)); margin: 0 auto; width: max-content; max-width: 86%; text-align: center; padding: 6px 12px; font-family: var(--font-mono); font-size: .75rem; color: var(--muted); background: rgba(var(--panel-rgb), .72); border: 1px solid var(--line); border-radius: var(--radius); pointer-events: none; }
html[lang="ar"] .stage .rotate { font-family: var(--font-latin); font-size: .85rem; }
/* full screen: the stage fills the viewport (also what an iPhone gets, where native full screen is unavailable) */
.stage.full { position: fixed; inset: 0; z-index: 1000; width: 100vw; height: 100vh; height: 100dvh; max-width: none; margin: 0; aspect-ratio: auto; background: var(--bg); }
.stage.full .zoomctl { top: max(12px, env(safe-area-inset-top)); inset-inline-end: max(12px, env(safe-area-inset-right)); }
.stage.full .hint { inset-inline-start: max(14px, env(safe-area-inset-left)); bottom: max(12px, env(safe-area-inset-bottom)); }
html.stage-full { overflow: hidden; }
html.stage-full .site-header { display: none; }
@media (orientation: portrait) and (pointer: coarse) { .stage.full .rotate { display: block; } .stage.full .hint { display: none; } }
.stage-wrap { width: 100%; max-width: 780px; margin-inline: auto; }
.tag { display: flex; align-items: center; gap: 9px; margin: 0 0 10px; font-family: var(--font-mono); font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
html[lang="ar"] .tag { font-family: var(--font-latin); font-size: .85rem; letter-spacing: 0; text-transform: none; }
.tag::before { content: ""; flex: none; width: 8px; height: 8px; }
.tag-live::before { border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 0 rgba(var(--accent-rgb), .5); animation: livepulse 2.4s ease-out infinite; }
.tag-vr { margin-top: 56px; }
.tag-vr::before { border: 1.5px solid var(--text); border-radius: 2px; }
.video-frame { margin-top: 0; }
@keyframes livepulse { 70%, 100% { box-shadow: 0 0 0 8px rgba(var(--accent-rgb), 0); } }
@media (prefers-reduced-motion: reduce) { .tag-live::before { animation: none; } }
.stage:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }

.video-frame { position: relative; margin-top: 56px; aspect-ratio: 16 / 9; background: #000; border: 1px solid var(--line-strong); border-radius: var(--radius); }
.video-frame video { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }
.fine { color: var(--muted); font-size: .78rem; margin-top: 12px; font-family: var(--font-mono); }

/* content */
.grid { display: grid; grid-template-columns: 1fr; margin-top: 40px; border: 1px solid var(--line); border-radius: var(--radius); }
.card { padding: 30px 28px; border-top: 1px solid var(--line); }
.card:first-child { border-top: 0; }
.card .num { font-family: var(--font-mono); color: var(--muted); font-size: .76rem; letter-spacing: .14em; margin-bottom: 36px; }
.card h3 { margin-bottom: .6em; }
.card p { color: var(--muted); margin: 0; }
.badge { display: inline-block; font-family: var(--font-mono); font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); border: 1px solid rgba(var(--accent-rgb), .45); border-radius: 999px; padding: 4px 14px; margin-bottom: 18px; }

/* form */
form.book { display: grid; gap: 16px; max-width: 560px; margin-top: 30px; }
label { display: grid; gap: 7px; font-size: .78rem; color: var(--muted); font-family: var(--font-mono); letter-spacing: .06em; }
html[lang="ar"] label { font-size: .92rem; }
input { background: transparent; border: 0; border-bottom: 1px solid var(--line-strong); color: var(--text); padding: 10px 2px; border-radius: 0; font: 1.05rem var(--font-latin); transition: border-color .2s; }
input:focus { outline: none; border-color: var(--accent); }
.btn:focus-visible, a:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.hp { position: absolute; inset-inline-start: -9999px; }
.status { min-height: 1.4em; font-size: .95rem; margin: 0; }
.status.ok { color: var(--ok); }
.status.err { color: var(--err); }
.consent { font-size: .82rem; color: var(--muted); margin: 0; }
.consent a { color: var(--muted); }

footer { border-top: 1px solid var(--line); padding-block: 36px; color: var(--muted); font-size: .8rem; font-family: var(--font-mono); }
footer .wrap { display: flex; flex-wrap: wrap; gap: 12px 28px; justify-content: space-between; }
footer a { color: var(--muted); text-decoration: none; }
footer a:hover { color: var(--text); }

.legal { padding-block: 64px; max-width: 760px; }
.legal h1 { font-size: 2.4rem; }
.legal h2 { font-family: var(--font-latin); font-weight: 600; font-size: 1.1rem; margin-top: 1.8em; }
.legal p { color: var(--muted); }


/* digital layer */
.hero { position: relative; isolation: isolate; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(rgba(var(--text-rgb), .55) 1px, transparent 1.4px) 0 0 / 22px 22px;
  opacity: .5;
  -webkit-mask-image: radial-gradient(260px circle at var(--mx, 72%) var(--my, 35%), #000, transparent 100%);
          mask-image: radial-gradient(260px circle at var(--mx, 72%) var(--my, 35%), #000, transparent 100%);
}
.eyebrow::before { content: "\25CF"; color: var(--accent); margin-inline-end: 10px; font-size: .6rem; vertical-align: .1em; animation: blink 2.4s steps(2, jump-none) infinite; }
@keyframes blink { 50% { opacity: .25; } }

/* reveal (only with JS) */
.js .reveal { opacity: 0; transform: translateY(16px); transition: opacity .7s ease, transform .7s ease; }
.js .reveal.in { opacity: 1; transform: none; }

@media (min-width: 900px) {
  .hero-grid { grid-template-columns: .78fr 1.22fr; gap: 20px; }
  .grid.three { grid-template-columns: repeat(3, 1fr); }
  .grid.two { grid-template-columns: repeat(2, 1fr); }
  .grid .card { border-top: 0; border-inline-start: 1px solid var(--line); }
  .grid .card:first-child { border-inline-start: 0; }
  section { padding-block: 112px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
}
