/* مَناط landing.
   Night (walnut + gold) for the hero and the application, day (parchment + bronze) for the product
   and the film: the same two worlds the ad moves between.
   Type: Readex Pro for everything, at heavy weights for headlines so they stay clear at display sizes. */

:root {
  --night: #0d0b09;
  --night-2: #161310;
  --night-3: #1e1a15;
  --night-line: #322c22;
  --cream: #ece5d6;
  --cream-muted: #a79e8c;
  --gold: #cda968;
  --gold-hi: #e3c68d;
  --gold-deep: #9a7b3f;

  --page: #f4efe2;
  --bg: #fbf8f1;
  --surface: #ffffff;
  --inset: #f3eee0;
  --ink: #2b2b26;
  --muted: #6f6a5e;
  --accent-solid: #7c6230;
  --border: #ede6d7;
  --ok: #3f7256;
  --ok-bg: #e3eee4;
  --bad: #b0432d;
  --bad-bg: #f7e3dc;
  --wa: #dcf8c6;
  --note: #f7e08a;
  --sheet: #1f7244;
  --stamp: #8a2f1f;

  --sans: 'Readex Pro', 'Segoe UI', Tahoma, system-ui, sans-serif;

  --wrap: 1180px;
  --gutter: clamp(16px, 4vw, 48px);
}

*, *::before, *::after { box-sizing: border-box; }
/* Backstop only: nothing should overflow, but the page must never slide sideways on a phone. */
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; overflow-x: hidden; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--night);
  color: var(--cream);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
a { color: inherit; }
:focus-visible { outline: 3px solid var(--gold-hi); outline-offset: 3px; }
.product :focus-visible, .watch :focus-visible, .paper :focus-visible { outline-color: var(--accent-solid); }
p { margin: 0; }

.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }

/* ---------- Header ---------- */
.top {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 12px var(--gutter);
  background: color-mix(in srgb, var(--night) 84%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--night-line);
}
.wordmark {
  font-weight: 700; font-size: 30px; line-height: 1.2;
  color: var(--cream); text-decoration: none;
}
.top-cta {
  font-size: 15px; font-weight: 600; text-decoration: none; white-space: nowrap;
  color: var(--gold-hi);
  border: 1px solid var(--night-line); border-radius: 999px;
  padding: 8px 16px;
}
.top-cta:hover { border-color: var(--gold); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 56px; padding: 0 28px; border-radius: 14px; border: 0;
  font: 600 18px/1 var(--sans); text-decoration: none; cursor: pointer;
}
.btn-gold { background: var(--gold); color: var(--night); }
.btn-gold:hover { background: var(--gold-hi); }
.btn-ghost { background: transparent; color: var(--cream); border: 1px solid var(--night-line); }
.btn-ghost:hover { border-color: var(--gold); color: var(--gold-hi); }
.btn-ink { background: var(--ink); color: var(--cream); }
.btn-ink:hover { background: #000; }

/* ---------- Hero ---------- */
.hero {
  max-width: calc(var(--wrap) + 2 * var(--gutter));
  margin-inline: auto;
  padding: clamp(40px, 7vh, 88px) var(--gutter) clamp(56px, 9vh, 104px);
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
  min-height: calc(100svh - 58px);
}
@media (max-width: 960px) { .hero { grid-template-columns: 1fr; min-height: 0; } }

.hero-kicker { font-size: 15px; font-weight: 500; color: var(--gold); margin-bottom: 18px; }
.hero-title {
  margin: 0;
  font-weight: 700;
  /* Sized to its own column so each of the three lines always fits on one line. */
  font-size: clamp(36px, 14cqi, 96px);
  line-height: 1.3;
  text-wrap: balance;
  color: var(--cream);
  display: flex; flex-direction: column;
}
.hero-text { container-type: inline-size; min-width: 0; }
.hero-title .line { white-space: nowrap; }
.hero-title .line-gold { color: var(--gold); }
.hero-sub { max-width: 46ch; margin-top: 24px; font-size: clamp(17px, 1.6vw, 20px); font-weight: 300; color: var(--cream); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.hero-note { margin-top: 20px; font-size: 14px; color: var(--cream-muted); max-width: 52ch; }

/* One page-load sequence: the headline lines rise. Gated on .js so text never stays hidden. */
@media (prefers-reduced-motion: no-preference) {
  .js .hero-title .line { opacity: 0; transform: translateY(0.3em); animation: rise .7s cubic-bezier(.2,.7,.2,1) forwards; }
  .js .hero-title .line:nth-child(2) { animation-delay: .1s; }
  .js .hero-title .line:nth-child(3) { animation-delay: .2s; }
  @keyframes rise { to { opacity: 1; transform: none; } }
}

/* ---------- The scene: scattered day → one matter file ---------- */
.scene { margin: 0; display: flex; flex-direction: column; gap: 14px; }
.scene-toggle {
  align-self: flex-start;
  display: inline-flex; padding: 4px; gap: 4px;
  background: var(--night-3); border: 1px solid var(--night-line); border-radius: 999px;
}
.seg {
  font: 600 15px/1 var(--sans); color: var(--cream-muted);
  background: transparent; border: 0; border-radius: 999px;
  padding: 10px 18px; cursor: pointer;
}
.seg[aria-pressed="true"] { background: var(--gold); color: var(--night); }

.stage {
  position: relative;
  aspect-ratio: 1 / 0.96;
  max-height: 580px;
  width: 100%;
  border-radius: 28px;
  background:
    radial-gradient(120% 80% at 50% 0%, #241f18 0%, var(--night-2) 60%),
    var(--night-2);
  border: 1px solid var(--night-line);
  overflow: hidden;
  isolation: isolate;
}

.frag {
  position: absolute; left: var(--x); top: var(--y);
  transform: rotate(var(--r));
  transition: transform .75s cubic-bezier(.65,0,.25,1), opacity .45s ease;
  transition-delay: calc(var(--i) * 45ms);
  font-size: clamp(12px, 1.25vw, 15px); line-height: 1.5; font-weight: 500;
  z-index: 2;
  box-shadow: 0 14px 30px -12px rgba(0,0,0,.6);
  max-width: 44%;
}
.assembled .frag {
  transform: translate(var(--dx, 0), var(--dy, 0)) rotate(0deg) scale(.3);
  opacity: 0;
  pointer-events: none;
}

.frag-wa { background: var(--surface); color: var(--ink); border-radius: 16px; padding: 10px 12px 12px; }
.frag-tag { display: block; font-size: .8em; color: var(--muted); margin-bottom: 6px; }
.bubble { display: block; background: var(--wa); border-radius: 12px 12px 12px 3px; padding: 8px 12px; }

.frag-sheet {
  display: grid; grid-template-columns: auto 2.6em;
  background: #fff; color: var(--ink); border: 1px solid #c9d6cc; border-radius: 6px; overflow: hidden;
  font-size: clamp(11px, 1.1vw, 13px);
}
.cell { padding: 5px 9px; border-inline-start: 1px solid #dfe7e1; border-top: 1px solid #dfe7e1; white-space: nowrap; }
.cell-h { background: #eef4f0; color: var(--sheet); font-weight: 600; text-align: center; border-top: 0; }
.cell-q { color: var(--bad); font-weight: 700; text-align: center; background: #fdf0ec; }

.frag-note { background: var(--note); color: #4a3d10; padding: 16px 14px; width: 11em; font-weight: 600; border-radius: 2px; }
.frag-calls {
  display: flex; align-items: center; gap: 8px;
  background: var(--night-3); color: var(--cream); border: 1px solid var(--night-line);
  border-radius: 14px; padding: 10px 14px;
}
.frag-calls svg { width: 18px; height: 18px; color: #e06a52; flex: none; }
@media (prefers-reduced-motion: no-preference) {
  .stage:not(.assembled) .frag-calls svg { animation: ring 1.4s ease-in-out infinite; }
  @keyframes ring { 0%, 60%, 100% { transform: rotate(0); } 10%, 30%, 50% { transform: rotate(-14deg); } 20%, 40% { transform: rotate(14deg); } }
}
.frag-photo { background: #fff; padding: 8px 8px 6px; border-radius: 4px; }
.photo-img {
  display: block; width: clamp(84px, 10vw, 120px); aspect-ratio: 4 / 3; border-radius: 2px;
  background:
    repeating-linear-gradient(0deg, transparent 0 9px, rgba(60,50,30,.22) 9px 10px),
    linear-gradient(160deg, #e9dfc7, #cdbf9f);
}
.photo-name { display: block; font-size: 11px; color: var(--muted); margin-top: 4px; text-align: left; }
.frag-thought {
  background: transparent; color: var(--cream-muted); box-shadow: none;
  border: 1.5px dashed var(--night-line); border-radius: 999px; padding: 8px 16px; font-style: normal;
}
.frag-invoice {
  background: var(--bg); color: var(--ink); padding: 10px 14px; border-radius: 6px;
  border-top: 4px solid var(--bad);
}

/* The matter file */
.mfile {
  position: absolute; inset: 0 7%; margin-block: auto; height: fit-content;
  background: var(--bg); color: var(--ink);
  border-radius: 20px;
  box-shadow: 0 30px 70px -20px rgba(0,0,0,.7);
  padding: clamp(16px, 2vw, 24px);
  opacity: 0; transform: translateY(10px) scale(.97);
  transition: opacity .45s ease .35s, transform .55s cubic-bezier(.2,.7,.2,1) .35s;
  z-index: 1;
}
.assembled .mfile { opacity: 1; transform: none; }
.mfile-kicker { font-size: 13px; color: var(--accent-solid); font-weight: 600; }
.mfile-title { font-size: clamp(16px, 1.6vw, 20px); font-weight: 700; line-height: 1.5; margin-top: 2px; }
.mfile-court { font-size: 13px; color: var(--muted); margin-top: 2px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.pill { background: var(--ok-bg); color: var(--ok); border-radius: 999px; padding: 1px 10px; font-size: 12px; font-weight: 600; }
.mfile-rows { list-style: none; margin: 12px 0 0; padding: 0; }
.row {
  display: grid; grid-template-columns: 7.5em 1fr; gap: 10px; align-items: baseline;
  padding: 9px 0; border-top: 1px solid var(--border);
  font-size: clamp(13px, 1.2vw, 15px);
  opacity: 0; transform: translateX(-8px);
  transition: opacity .35s ease, transform .4s ease;
}
.assembled .row { opacity: 1; transform: none; }
.assembled .row:nth-child(1) { transition-delay: .55s; }
.assembled .row:nth-child(2) { transition-delay: .62s; }
.assembled .row:nth-child(3) { transition-delay: .69s; }
.assembled .row:nth-child(4) { transition-delay: .76s; }
.assembled .row:nth-child(5) { transition-delay: .83s; }
.assembled .row:nth-child(6) { transition-delay: .9s; }
.row .k { color: var(--muted); }
.row .v { font-weight: 500; display: flex; flex-direction: column; gap: 6px; }
.v-ok { color: var(--ok); }
.bar { display: block; height: 6px; border-radius: 6px; background: var(--inset); overflow: hidden; max-width: 180px; }
.bar i { display: block; height: 100%; width: 0; background: var(--gold-deep); border-radius: inherit; transition: width .8s ease 1s; }
.assembled .bar i { width: 60%; }

.scene-cap { font-size: 15px; color: var(--cream-muted); min-height: 1.8em; }
.cap-manat { display: none; color: var(--gold-hi); }
.scene.is-manat .cap-today { display: none; }
.scene.is-manat .cap-manat { display: inline; }

@media (prefers-reduced-motion: reduce) {
  .frag, .mfile, .row, .bar i { transition: none !important; }
}
@media (max-width: 560px) {
  /* On phones the file sets the scene's height, so it is never clipped however its text wraps. */
  .stage { aspect-ratio: auto; max-height: none; min-height: 460px; display: flex; align-items: center; }
  .mfile { position: relative; inset: auto; height: auto; margin: 36px 5%; width: 90%; padding: 22px 20px 10px; }
  .row { grid-template-columns: 6.6em 1fr; padding: 10px 0; }
  .frag { max-width: 52%; }
  /* Right-hand fragments hug the right edge so their fixed widths never run past it. */
  .stage .frag-note, .stage .frag-invoice { left: auto; right: 4%; }
}

/* ---------- Product (day) ---------- */
.product { background: var(--page); color: var(--ink); padding: clamp(64px, 10vh, 120px) 0; }
.section-title { margin: 0; font-weight: 700; font-size: clamp(30px, 4.4vw, 52px); line-height: 1.35; }
.section-lead { margin-top: 12px; max-width: 56ch; font-size: clamp(17px, 1.8vw, 20px); color: var(--muted); }

.saudi { list-style: none; margin: 40px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.saudi li {
  background: var(--surface); border: 1px solid var(--border); border-radius: 999px;
  padding: 8px 16px; font-size: 15px; font-weight: 500; color: var(--accent-solid);
}

/* ---------- A firm's day, twice: the today / with-Manāṭ scenes ----------
   One number, p (0 = today, 1 = with Manāṭ), drives each scene, and nothing is wiped or layered:
   every messy .bit sweeps toward the tidy .m piece it becomes (data-to), straightening and shrinking,
   while that tidy piece grows out of the spot the mess was and settles with a small overshoot. Each
   piece has its own window inside p, so the change ripples. The desk texture fades as a warm light
   spreads. app.js writes the per-piece transforms; scroll sets p, and the scrub bar or a sideways drag
   sets it by hand. Everything inside a stage is sized in em from the stage's own width. */
.duos-head { max-width: 720px; }
.seg-group { display: inline-flex; padding: 4px; gap: 4px; border-radius: 999px; }
.seg-day { background: var(--inset); border: 1px solid var(--border); }
.seg-day .seg { color: var(--muted); }
.seg-day .seg[aria-pressed="true"] { background: var(--ink); color: var(--cream); }

.duos { display: grid; gap: clamp(80px, 11vw, 140px); margin-top: clamp(56px, 8vw, 96px); }
.duo { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: clamp(32px, 5vw, 72px); align-items: center; }
.duo:nth-child(even) { grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); }
.duo:nth-child(even) .duo-text { order: 2; }
.duo-title { margin: 0; font-weight: 700; font-size: clamp(26px, 3vw, 38px); line-height: 1.4; }
.duo-line { margin: 14px 0 24px; font-size: clamp(17px, 1.7vw, 20px); color: var(--muted); min-height: 3.6em; max-width: 30ch; }
.duo-line { display: grid; }
.duo-line > span { grid-area: 1 / 1; transition: opacity .3s ease; }
.t-manat { color: var(--ink); opacity: 0; }
.duo.is-manat .t-today { opacity: 0; }
.duo.is-manat .t-manat { opacity: 1; }
.duo-hint { display: flex; align-items: center; gap: 10px; margin: 0; font-size: 15px; color: var(--accent-solid); font-weight: 500; }
.duo-hint::before { content: '⇆'; font-size: 18px; line-height: 1; }
html:not(.js) .face-today { display: none; }

.duo-stage {
  position: relative; container-type: inline-size;
  aspect-ratio: 5 / 4; border-radius: 26px; overflow: hidden; isolation: isolate;
  border: 1px solid #e3d9c4;
  background: radial-gradient(90% 70% at 50% 0%, #fffdf8 0%, var(--bg) 70%);
  touch-action: pan-y; /* vertical swipes scroll the page; sideways drags scrub the scene */
  user-select: none; -webkit-user-select: none;
  cursor: grab;
}
/* The cluttered desk, fading out as the scene tidies. */
.duo-stage::before {
  content: ''; position: absolute; inset: 0; z-index: 0;
  background:
    repeating-linear-gradient(135deg, rgba(60, 48, 28, .04) 0 2px, transparent 2px 10px),
    #e7dfcc;
  opacity: calc(1 - var(--p, 0));
}
/* A warm light that spreads from the middle as it tidies. */
.duo-stage::after {
  content: ''; position: absolute; left: 50%; top: 45%; z-index: 0;
  width: 160%; aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 249, 232, .95) 0%, rgba(255, 249, 232, .5) 38%, rgba(255, 249, 232, 0) 68%);
  transform: translate(-50%, -50%) scale(calc(.05 + var(--p, 0) * .95));
  opacity: calc(var(--p, 0) * 1.4);
  pointer-events: none;
}

.face { position: absolute; inset: 0; z-index: 1; padding: 7% 6%; font-size: clamp(11.5px, 2.75cqi, 15px); line-height: 1.55; color: var(--ink); }
.face-today { z-index: 2; }
.face-manat { z-index: 1; display: flex; flex-direction: column; justify-content: center; gap: 1em; }
.face { pointer-events: none; }
.bit, .m { will-change: transform, opacity; }

/* The scrub bar under each scene: tap an end or drag the knob to compare by hand. */
.duo-visual { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.scrub { display: flex; align-items: center; gap: 12px; align-self: center; width: min(360px, 100%); }
.end {
  flex: none; font: 600 14px/1 var(--sans); padding: 9px 14px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--border); background: #fff; color: var(--muted);
  transition: background .2s ease, color .2s ease, border-color .2s ease;
}
.duo:not(.is-manat) .end-today, .duo.is-manat .end-manat { background: var(--ink); border-color: var(--ink); color: var(--cream); }
.track { position: relative; flex: 1; height: 28px; cursor: pointer; touch-action: none; }
.track::before { content: ''; position: absolute; left: 0; right: 0; top: 50%; height: 4px; margin-top: -2px; border-radius: 4px; background: #e3d9c4; }
.track .fill { position: absolute; right: 0; top: 50%; height: 4px; margin-top: -2px; border-radius: 4px; background: var(--gold-deep); width: calc(var(--p, 0) * 100%); }
.knob {
  position: absolute; top: 50%; right: calc(var(--p, 0) * 100%);
  width: 22px; height: 22px; border-radius: 50%; transform: translate(50%, -50%);
  background: var(--ink); box-shadow: 0 0 0 4px rgba(251, 248, 241, .9), 0 6px 14px -4px rgba(0, 0, 0, .45);
  cursor: grab;
}
.knob:focus-visible { outline: 3px solid var(--gold-deep); outline-offset: 4px; }

.bit {
  position: absolute; left: var(--x); top: var(--y); max-width: 48%;
  transform: rotate(var(--r));
  box-shadow: 0 12px 26px -12px rgba(43, 38, 30, .45);
}
/* Without script the tidy version simply shows; app.js takes over both faces. */
.js .m { opacity: 0; }
.js .bit { opacity: 1; }

/* Shared pieces */
.mcard { background: #fff; border: 1px solid var(--border); border-radius: 1em; padding: 1em 1.1em; box-shadow: 0 18px 40px -26px rgba(43, 38, 30, .55); }
.note { background: var(--note); color: #4a3d10; padding: 1em .9em; width: 11em; font-weight: 600; border-radius: 2px; }
.toast {
  align-self: flex-start; display: flex; align-items: center; gap: .6em;
  background: var(--ink); color: var(--cream); border-radius: 999px; padding: .55em 1.1em; font-weight: 500;
}
.bell, .eye { width: .85em; height: .85em; border-radius: 50%; background: var(--gold); flex: none; }
.eye { background: #6fbf8e; }
.k { color: var(--muted); }
.face .bar { display: block; height: .45em; max-width: none; border-radius: 1em; background: var(--inset); overflow: hidden; }
.face .bar i { display: block; height: 100%; background: var(--gold-deep); border-radius: inherit; transition: none; }
@keyframes blink { 50% { opacity: 0; } }

/* 1. Hearings and deadlines */
.wallcal { background: #fff; width: 15em; padding: 0 .8em .8em; border-radius: 4px; }
.wc-head { display: block; margin: 0 -.8em .7em; padding: .35em .8em; background: #b0432d; color: #fff; font-weight: 600; font-size: .85em; border-radius: 4px 4px 0 0; }
.wc-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: .3em; }
.wc-grid i { aspect-ratio: 1; background: #f1ebde; border-radius: 2px; position: relative; }
.wc-grid i.circ::after { content: ''; position: absolute; inset: -30%; border: 2px solid #b0432d; border-radius: 50%; transform: rotate(-10deg); }
.wc-grid i.q::after { border-style: dashed; }
.wc-scrawl { display: block; margin-top: .4em; font-weight: 700; color: #b0432d; transform: rotate(-4deg); font-size: 1.1em; }
.alarm { background: #1e1a15; color: var(--cream); border-radius: 1em; padding: .8em 1em; width: 13em; }
.alarm b { display: block; color: var(--gold); font-size: .85em; }
.redstamp { border: 3px solid #b0432d; color: #b0432d; background: rgba(255, 255, 255, .5); font-weight: 700; font-size: 1.5em; padding: .15em .7em; border-radius: 6px; box-shadow: none; }
.week-head { display: flex; justify-content: space-between; gap: 1em; font-weight: 700; margin: 0 0 .7em; }
.week-h { color: var(--muted); font-weight: 500; font-size: .85em; }
.week-days { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: .4em; }
.week-days li { background: var(--inset); border-radius: .6em; padding: .5em .2em; text-align: center; line-height: 1.35; font-size: .9em; }
.week-days li b { display: block; font-size: 1.35em; }
.week-days li small { display: block; color: var(--muted); font-size: .78em; }
.week-days li.hearing { background: var(--ink); color: var(--cream); }
.week-days li.hearing small { color: var(--gold-hi); }
.week-days .tag { display: block; margin-top: .3em; font-size: .72em; font-weight: 600; color: var(--gold-hi); }
.dl-row, .collect { display: grid; grid-template-columns: auto 1fr auto; gap: .8em; align-items: center; }

/* 2. Documents */
.gallery { background: #1e1a15; border-radius: 1.4em; padding: .6em; width: 12em; display: grid; grid-template-columns: repeat(3, 1fr); gap: .25em; }
.gallery i { aspect-ratio: 1; border-radius: .2em; background: linear-gradient(135deg, #c9b99a, #8f7f63); }
.gallery .g2 { background: linear-gradient(135deg, #7a8fa0, #3e4f5c); }
.gallery .g3 { background: linear-gradient(135deg, #e7dfd0, #bfb29a); }
.gallery .g4 { background: linear-gradient(135deg, #d8a48f, #9b5a43); }
.g-q { grid-column: 1 / -1; color: var(--cream); font-size: .85em; text-align: center; padding-top: .3em; }
.mail { background: #fff; padding: .8em 1em; border-radius: .4em; width: 15em; border-inline-start: 4px solid #3b6fb0; }
.mail b { display: block; font-size: .9em; }
.mail span { color: var(--muted); font-size: .8em; }
.bit.wa { background: #fff; border-radius: 1em; padding: .6em .7em .8em; width: 14em; }
.file { background: #fff; padding: .7em 1em; border-radius: .4em; font-size: .9em; border-top: 4px solid #2b5797; }
.search {
  display: flex; align-items: center; gap: .6em; font-weight: 600;
  background: #fff; border: 1.5px solid var(--gold-deep); border-radius: 999px; padding: .6em 1.1em;
  box-shadow: 0 0 0 4px rgba(154, 123, 63, .12);
}
.s-ico { width: .9em; height: .9em; border: 2px solid var(--muted); border-radius: 50%; flex: none; }
.caret { width: 2px; height: 1.1em; background: var(--ink); animation: blink 1s steps(1) infinite; }
.results { list-style: none; margin: 0; padding: .2em 1.1em; }
.results li { display: flex; gap: .8em; align-items: center; padding: .6em 0; border-top: 1px solid var(--border); }
.results li:first-child { border-top: 0; }
.results small { display: block; color: var(--muted); font-size: .8em; }
.doc { flex: none; min-width: 3.4em; text-align: center; font-size: .72em; font-weight: 700; padding: .35em .5em; border-radius: .3em; background: var(--bad-bg); color: var(--bad); }
.doc.img { background: #e3ecf5; color: #2f5f8f; }
.doc.doc-w { background: var(--inset); color: var(--accent-solid); }
.results mark { background: #f6e3a8; color: inherit; border-radius: 2px; padding: 0 .1em; }
.chips-row { display: flex; flex-wrap: wrap; gap: .4em; }
.chips-row span { background: #fff; border: 1px solid var(--border); border-radius: 999px; padding: .3em .8em; font-size: .85em; color: var(--accent-solid); }

/* 3. Team and tasks */
.chat { background: #efe7d6; border-radius: 1em; padding: .7em; width: 14em; display: flex; flex-direction: column; gap: .35em; }
.chat-head { font-weight: 700; font-size: .85em; color: var(--muted); }
.cb { align-self: flex-start; background: #fff; border-radius: .9em .9em .9em .2em; padding: .35em .8em; font-size: .92em; }
.cb.me { align-self: flex-end; background: var(--wa); border-radius: .9em .9em .2em .9em; }
.board { background: #fff; border: 1px solid #d9d2c3; padding: .8em 1em; width: 10em; display: flex; flex-direction: column; gap: .25em; color: #2f5f8f; }
.board b { color: var(--ink); }
.board s { color: #b0432d; }
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: .6em; }
.tiles span { background: #fff; border: 1px solid var(--border); border-radius: .8em; padding: .6em; text-align: center; color: var(--muted); font-size: .85em; }
.tiles b { display: block; font-size: 1.8em; color: var(--ink); line-height: 1.25; }
.tiles .late b { color: var(--bad); }
.tiles .done b { color: var(--ok); }
.team { list-style: none; margin: 0; }
.team li { display: grid; grid-template-columns: 2em 4em 1fr auto; gap: .7em; align-items: center; padding: .5em 0; border-top: 1px solid var(--border); }
.team li:first-child { border-top: 0; }
.av { width: 2em; height: 2em; border-radius: 50%; background: var(--inset); display: grid; place-items: center; font-weight: 700; color: var(--accent-solid); }
.team b em { font-style: normal; color: var(--bad); font-size: .8em; margin-inline-start: .3em; }
.team .away { opacity: .8; }
.away-tag { grid-column: 3 / -1; font-size: .85em; color: var(--muted); }

/* 4. The client */
.call { background: linear-gradient(#2a251e, #0d0b09); color: var(--cream); border-radius: 1.6em; padding: 1.3em 1em 1em; width: 11em; text-align: center; display: flex; flex-direction: column; gap: .2em; }
.call-who { font-weight: 700; font-size: 1.1em; }
.call-s { color: var(--cream-muted); font-size: .85em; }
.call-btns { display: flex; justify-content: space-around; margin-top: 1.1em; }
.call-btns i { width: 2.5em; height: 2.5em; border-radius: 50%; background: #e06a52; }
.call-btns i.yes { background: #3f9d6a; }
@media (prefers-reduced-motion: no-preference) {
  .duo:not(.is-manat) .call-btns i.yes { animation: pulse 1.2s ease-in-out infinite; }
  @keyframes pulse { 50% { transform: scale(1.12); } }
}
.missed { background: #fff; border-radius: .8em; padding: .8em 1em; width: 13em; display: flex; flex-direction: column; gap: .15em; }
.missed b { color: var(--bad); }
.missed span { font-size: .9em; }
.portal { background: #fff; border: 1px solid var(--border); border-radius: 1.4em; padding: 1em 1.2em; box-shadow: 0 18px 40px -26px rgba(43, 38, 30, .55); }
.portal-head { display: flex; justify-content: space-between; align-items: baseline; margin: 0 0 .8em; }
.portal-head span { color: var(--muted); font-size: .85em; }
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { position: relative; padding-inline-start: 1.7em; padding-bottom: .8em; }
.timeline li:last-child { padding-bottom: 0; }
.timeline li b { display: block; font-weight: 600; }
.timeline li small { color: var(--muted); }
.timeline li::before { content: ''; position: absolute; inset-inline-start: 0; top: .4em; width: .85em; height: .85em; border-radius: 50%; border: 2px solid #c9bfa8; background: #fff; box-sizing: border-box; }
.timeline li.ok::before { background: var(--ok); border-color: var(--ok); }
.timeline li:not(:last-child)::after { content: ''; position: absolute; inset-inline-start: .36em; top: 1.35em; bottom: .05em; width: 2px; background: var(--border); }

/* 5. Fees and invoices */
.xls { background: #fff; border: 1px solid #c9d6cc; display: grid; grid-template-columns: repeat(3, auto); font-size: .9em; border-radius: 4px; overflow: hidden; }
.xls span { padding: .35em .7em; border-top: 1px solid #dfe7e1; border-inline-start: 1px solid #dfe7e1; white-space: nowrap; }
.xls .xh { background: #eef4f0; color: var(--sheet); font-weight: 600; border-top: 0; }
.xls .q { color: var(--bad); font-weight: 700; background: #fdf0ec; }
.receipt { background: #fffdf6; padding: 1em; width: 9.5em; font-weight: 600; color: #2f5f8f; border-bottom: 2px dashed #cfc3a8; font-size: 1.05em; }
.invoice { position: relative; }
.inv-head { display: flex; justify-content: space-between; align-items: center; margin: 0 0 .5em; }
.paid { background: var(--ok-bg); color: var(--ok); border-radius: 999px; padding: .1em .8em; font-size: .85em; font-weight: 600; }
.inv-line, .inv-total { display: flex; justify-content: space-between; gap: 1em; margin: 0; margin-inline-end: 6em; }
.inv-line { color: var(--muted); padding: .35em 0; border-top: 1px solid var(--border); }
.inv-total { padding-top: .45em; border-top: 2px solid var(--ink); font-size: 1.05em; }
.qr {
  position: absolute; inset-inline-end: 1.1em; bottom: 1em; width: 4.8em; height: 4.8em;
  background: repeating-conic-gradient(var(--ink) 0 25%, #fff 0 50%) 0 0 / .8em .8em;
  border: .4em solid #fff; outline: 1px solid var(--border); border-radius: 2px;
}

/* 6. AI */
.blank { background: #fff; width: 16em; height: 11em; padding: 1.1em 1.2em; border-radius: 3px; }
.blank b { display: block; font-size: 1.1em; margin-bottom: .5em; }
.cursor { display: inline-block; width: 2px; height: 1.2em; background: var(--ink); animation: blink 1s steps(1) infinite; }
.clock { position: absolute; bottom: .8em; inset-inline-end: 1em; color: var(--muted); font-size: .85em; }
.books { display: flex; flex-direction: column; gap: 3px; width: 12em; box-shadow: none; }
.books span { background: #6b3f2a; color: #f1e2c4; padding: .5em .8em; font-size: .85em; border-radius: 2px; box-shadow: 0 6px 12px -8px rgba(0, 0, 0, .5); }
.books span:nth-child(2) { background: #2f4a3a; margin-inline-start: .8em; }
.books span:nth-child(3) { background: #3a3550; margin-inline-start: .3em; }
.memo { line-height: 1.8; }
.memo-tag { display: inline-block; margin: 0; background: #f6ebd3; color: #915d0e; border-radius: 999px; padding: .1em .8em; font-size: .8em; font-weight: 600; }
.memo-title { font-weight: 700; font-size: 1.1em; margin: .4em 0 .3em; }
.memo-p { margin: 0; }
.memo-p.dim { color: var(--muted); }
.cite { background: var(--ok-bg); color: var(--ok); border-radius: .4em; padding: .05em .5em; font-weight: 600; }
.cite i { font-style: normal; font-size: .8em; margin-inline-start: .3em; }
.approve { display: flex; gap: .6em; }
.btn-s { padding: .5em 1.3em; border-radius: .7em; border: 1.5px solid var(--ink); font-weight: 600; background: #fff; }
.btn-s.solid { background: var(--ink); color: var(--cream); }

.saudi-lead { margin-top: clamp(80px, 11vw, 140px); font-weight: 600; font-size: 18px; }
.saudi-lead + .saudi { margin-top: 16px; }

@media (max-width: 860px) {
  .duo, .duo:nth-child(even) { grid-template-columns: 1fr; gap: 24px; }
  .duo:nth-child(even) .duo-text { order: 0; }
  .duo-line { min-height: 0; max-width: none; margin-bottom: 20px; }
}
@media (max-width: 560px) {
  .duo-stage { aspect-ratio: 1 / 1.08; border-radius: 22px; }
  .face { padding: 7% 5.5%; }
  .bit { max-width: 56%; }
  .duo-stage .books { left: auto; right: 4%; }
}

/* ---------- Watch: the vertical film in a phone ---------- */
.watch { background: var(--bg); color: var(--ink); padding: clamp(64px, 10vh, 112px) 0; border-top: 1px solid var(--border); }
.watch-grid {
  display: grid; grid-template-columns: minmax(0, 1fr) auto;
  gap: clamp(32px, 6vw, 96px); align-items: center;
}
.watch-text .btn { margin-top: 28px; }
@media (max-width: 800px) {
  .watch-grid { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .watch-text .section-lead { margin-inline: auto; }
}
.player {
  position: relative;
  width: fit-content;
  padding: 10px;
  border-radius: 46px;
  background: linear-gradient(145deg, #2a251e, var(--night));
  box-shadow: 0 40px 90px -30px rgba(43, 38, 30, .65), inset 0 0 0 1px #3a3328;
}
.player video {
  /* The film is 1080×1920; the frame takes its size from it, so nothing is cropped or letterboxed. */
  display: block; height: min(76vh, 700px); width: auto; aspect-ratio: 9 / 16;
  object-fit: contain; background: var(--night);
  border-radius: 36px;
}
@media (max-width: 800px) { .player video { height: auto; width: min(80vw, 320px); } }
.play {
  position: absolute; inset: 10px; border-radius: 36px;
  display: grid; place-items: end center; padding-bottom: 22%;
  background: linear-gradient(to top, rgba(13,11,9,.5), transparent 55%);
  border: 0; cursor: pointer; color: var(--night);
}
.play svg {
  width: 84px; height: 84px; padding: 24px; border-radius: 50%;
  background: var(--gold); transition: transform .2s ease;
}
.play:hover svg { transform: scale(1.06); }
.player.playing .play { display: none; }

/* ---------- Register: the application on letterhead ---------- */
.register {
  background: var(--night);
  padding: clamp(64px, 10vh, 120px) 0 clamp(72px, 11vh, 128px);
  border-top: 1px solid var(--night-line);
}
.register .section-title { color: var(--cream); }
.register .section-lead { color: var(--cream-muted); }
.register-head { margin: 0 auto 40px; text-align: center; }
.register-head .section-lead { margin-inline: auto; text-wrap: balance; }

.paper {
  position: relative;
  background: var(--bg);
  color: var(--ink);
  border-radius: 6px;
  padding: clamp(24px, 4.5vw, 56px);
  box-shadow: 0 50px 100px -40px rgba(0,0,0,.9), 0 0 0 1px #e6dcc6;
  max-width: 920px;
  margin-inline: auto;
  overflow: hidden;
  overflow: clip;
}
.letterhead {
  display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap;
  padding-bottom: 14px;
  border-bottom: 3px double var(--gold-deep);
}
.lh-mark { font-weight: 700; font-size: 34px; line-height: 1.2; color: var(--ink); }
.lh-meta { margin: 0; display: grid; gap: 2px; font-size: 14px; }
.lh-meta div { display: flex; gap: 8px; }
.lh-meta dt { color: var(--muted); }
.lh-meta dd { margin: 0; font-weight: 600; }
/* The date breaks between its Hijri and Gregorian halves, never inside one. */
.lh-meta .dpart { white-space: nowrap; }
@media (max-width: 560px) {
  .letterhead { flex-direction: column; align-items: stretch; gap: 10px; }
  .lh-meta div { flex-wrap: wrap; column-gap: 8px; }
}
.doc-title {
  margin: 26px 0 28px;
  font-weight: 700;
  font-size: clamp(24px, 3vw, 34px); line-height: 1.5;
  text-align: center;
  text-wrap: balance;
}

.form { display: grid; grid-template-columns: 1fr 1fr; gap: 22px 24px; }
@media (max-width: 720px) { .form { grid-template-columns: 1fr; } }
.field { display: flex; flex-direction: column; gap: 8px; margin: 0; padding: 0; border: 0; min-width: 0; }
.field-wide { grid-column: 1 / -1; }
.field label, .field legend { font-weight: 600; font-size: 16px; color: var(--ink); padding: 0; }
.optional { font-weight: 400; color: var(--muted); font-size: 14px; margin-inline-start: 6px; }

.field input[type="text"], .field input[type="email"], .field input[type="tel"],
.field select, .field textarea {
  width: 100%;
  font: 400 17px/1.5 var(--sans); color: var(--ink);
  background: transparent;
  border: 0; border-bottom: 1.5px solid #cfc3a8; border-radius: 0;
  padding: 10px 2px; min-height: 48px;
}
.field textarea {
  resize: vertical; min-height: 120px;
  background: repeating-linear-gradient(to bottom, transparent 0 33px, #e3d9c2 33px 34px);
  line-height: 34px; padding-top: 0; border-bottom: 0;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-bottom-color: var(--gold-deep); box-shadow: 0 2px 0 0 var(--gold-deep);
}
.field select {
  appearance: none; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236f6a5e' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: left 4px center; padding-inline-start: 30px;
}
.field input[dir="ltr"] { text-align: left; }
.field input::placeholder { color: #b5ab96; }

.hint { display: none; font-size: 14px; color: var(--bad); }
.field.invalid input { border-bottom-color: var(--bad); }
.field.invalid .hint { display: block; }

.chips .chip-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 4px; }
.chip { position: relative; cursor: pointer; }
.chip input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.chip span {
  display: inline-block; padding: 9px 16px; border-radius: 999px;
  border: 1.5px solid #d9cdb2; background: transparent;
  font-size: 15px; font-weight: 500; color: var(--ink);
  transition: background .15s ease, border-color .15s ease, color .15s ease;
}
.chip input:checked + span { background: var(--ink); border-color: var(--ink); color: var(--cream); }
.chip input:focus-visible + span { outline: 3px solid var(--accent-solid); outline-offset: 2px; }

/* Hidden without an offset: a negative left offset widens the page in RTL. */
.hp { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.form-actions { flex-direction: row; align-items: center; gap: 20px; flex-wrap: wrap; margin-top: 10px; }
.btn-submit { min-width: 220px; }
.btn-submit[disabled] { opacity: .6; cursor: progress; }
.form-privacy { font-size: 14px; color: var(--muted); }
.form-status { grid-column: 1 / -1; min-height: 1.5em; font-size: 15px; }
.form-status.error { color: var(--bad); background: var(--bad-bg); border-radius: 10px; padding: 12px 16px; }
.form-status.ok { color: var(--ok); background: var(--ok-bg); border-radius: 10px; padding: 14px 18px; font-size: 16px; font-weight: 500; }

/* Submitted: the paper is stamped and the fields are locked as a record of what was sent. */
.paper.is-sent .form-actions { display: none; }
.paper.is-sent .chip span { opacity: .75; }
.stamp {
  position: absolute; left: clamp(16px, 5vw, 64px); bottom: clamp(80px, 12vw, 120px);
  width: clamp(140px, 18vw, 190px); aspect-ratio: 1;
  color: var(--stamp);
  opacity: 0; transform: rotate(-14deg);
  pointer-events: none; mix-blend-mode: multiply;
  font-family: var(--sans);
}
.stamp svg { width: 100%; height: 100%; display: block; }
.paper.is-sent .stamp { opacity: .88; animation: stamp .3s cubic-bezier(.3,1.5,.5,1) both; }
@keyframes stamp { from { opacity: 0; transform: rotate(-14deg) scale(1.6); } to { opacity: .88; transform: rotate(-14deg) scale(1); } }
@media (prefers-reduced-motion: reduce) { .paper.is-sent .stamp { animation: none; } }
@media (max-width: 720px) { .stamp { width: 108px; left: 12px; top: 12px; bottom: auto; } }

/* ---------- Footer ---------- */
.foot { background: var(--night-2); color: var(--cream-muted); padding: 56px 0 40px; border-top: 1px solid var(--night-line); }
.foot-grid { display: grid; gap: 4px; }
.wordmark-foot { font-size: 40px; color: var(--cream); }
.foot-latin { font-size: 13px; letter-spacing: .22em; color: var(--gold); text-align: right; }
.foot-line { margin-top: 18px; font-size: 15px; }
.foot-copy { font-size: 13px; }

@media (max-width: 480px) {
  body { font-size: 16px; }
  .wordmark { font-size: 26px; }
  .top-cta { padding: 7px 12px; font-size: 14px; }
  .hero-actions .btn { width: 100%; }
  .form-actions { flex-direction: column; align-items: stretch; }
  .btn-submit { min-width: 0; width: 100%; }
}

/* ---------- Phones: room to breathe ----------
   Wider side margins, more space between sections and between the pieces inside them, and a touch
   more line height. One block so the phone rhythm can be tuned in one place. */
@media (max-width: 560px) {
  :root { --gutter: 24px; }
  body { line-height: 1.95; }
  .top { padding-block: 14px; }

  .hero { padding-top: 44px; padding-bottom: 72px; gap: 56px; }
  .hero-kicker { margin-bottom: 26px; line-height: 1.8; }
  .hero-sub { margin-top: 30px; }
  .hero-actions { margin-top: 40px; gap: 14px; }
  .hero-note { margin-top: 28px; line-height: 1.9; }
  .scene { gap: 20px; }
  .scene-cap { margin-top: 4px; }

  .product, .watch { padding: 80px 0; }
  .section-lead { margin-top: 18px; line-height: 1.95; }
  .saudi { margin-top: 48px; gap: 12px; }
  .saudi li { padding: 10px 18px; }

  .watch-grid { gap: 52px; }
  .watch-text .btn { margin-top: 32px; }

  .register { padding: 80px 0 96px; }
  .register-head { margin-bottom: 44px; }
  .paper { padding: 30px 22px 34px; }
  .doc-title { margin: 30px 0 34px; }
  .form { row-gap: 32px; }
  .chips .chip-row { gap: 12px; margin-top: 10px; }
  .form-actions { margin-top: 14px; gap: 16px; }

  .foot { padding: 64px 0 48px; }
  .foot-line { margin-top: 24px; }
}
