/* Tokens, type and the shared parts. The plain layout (no JavaScript, nothing staged) is the default; hud.css stages it and lite.css swaps the 3D world for stills. */
:root {
  --night: #07061C;      /* (the night, the whites and the side margin are the home page's own: going from one page to the other nothing changes colour or moves) */
  --navy: #1C0770;
  --royal: #2F2FE4;
  --lime: #F1FF5F;
  --ink: #fff;
  --soft: rgba(255, 255, 255, .88);
  --dim: rgba(255, 255, 255, .76);
  --line: rgba(255, 255, 255, .14);
  --display: "IBM Plex Sans Arabic", system-ui, sans-serif;      /* (one family for headings and text, in both languages: IBM Plex Sans; its two weights are 400 and 600) */
  --text: "IBM Plex Sans Arabic", system-ui, sans-serif;
  --latin: "IBM Plex Sans Arabic", system-ui, sans-serif;      /* (numbers set apart among Arabic words: the family's own Latin letters and digits) */
  --pad: clamp(18px, 3.1vw, 46px);
  color-scheme: dark;
}
:root[lang="en"] {
  --display: "IBM Plex Sans", system-ui, sans-serif;
  --text: "IBM Plex Sans", system-ui, sans-serif;
  --latin: "IBM Plex Sans", system-ui, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { background: var(--night); -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; min-height: 100dvh;
  background: var(--night); color: var(--ink);
  font: 400 18px/1.7 var(--text);
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  text-wrap: pretty;      /* (no block of words ends with one word alone on its last line; headings are balanced instead) */
}
:root[lang="en"] body { font-size: 16.5px; line-height: 1.6; }
h1, h2, p, ul, ol, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; }
img { max-width: 100%; height: auto; display: block; }
button, input, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--lime); outline-offset: 3px; border-radius: 6px; }
.skip { position: fixed; inset-inline-start: 12px; top: -80px; z-index: 50; background: var(--lime); color: var(--navy); padding: 10px 16px; border-radius: 10px; font-weight: 600; text-decoration: none; }
.skip:focus { top: 12px; }
.live { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
bdi { unicode-bidi: isolate; }
bdi, a[href^="mailto:"], a[href^="tel:"], span[lang][dir] { white-space: nowrap; }      /* (an address, a number and a button's quoted name are read in one piece: none is broken over two lines) */
b, strong { font-weight: 600; }      /* (the family's heavier weight, in both languages) */

/* type */
h1, h2 { font-family: var(--display); font-weight: 600; line-height: 1.12; letter-spacing: 0; text-wrap: balance; }
:root[lang="en"] :is(h1, h2) { line-height: 1.04; letter-spacing: -.022em; }
h1 { font-size: clamp(44px, 7.2vw, 104px); }
h2 { font-size: clamp(40px, 6vw, 84px); }
h1 em, h2 em { font-style: normal; color: var(--lime); display: block; }
.lead { font-size: clamp(17px, 1.45vw, 21px); color: var(--soft); max-width: 31em; text-wrap: pretty; }
.i { width: 1.15em; height: 1.15em; flex: none; }
:root[dir="rtl"] .i-dir { transform: scaleX(-1); }

/* parts */
.logo { position: relative; display: inline-flex; align-items: center; gap: 10px; direction: ltr; color: var(--ink); text-decoration: none; }      /* (the mark left of the word on every page, in Arabic too, as on the home page) */
.logo::after { content: ""; position: absolute; inset: -10px 0; }      /* a finger's height, whatever the mark's */
.logo .mark { width: 34px; height: auto; color: var(--lime); }
.logo span { font: 700 17px/1 "Corva Mark", system-ui, sans-serif; font-stretch: 100%; letter-spacing: .2em; }      /* (CORVA's own five letters are a face of their own, so that no other word is drawn from it) */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 50px; padding: 10px 22px; border-radius: 14px; border: 1px solid var(--line);
  background: rgba(10, 8, 40, .5); color: var(--ink); text-decoration: none; cursor: pointer;
  font-weight: 600; font-size: 17px; line-height: 1.2; white-space: nowrap;
  transition: background-color .18s ease-out, border-color .18s ease-out, transform .18s ease-out;
}
:root[lang="en"] .btn { font-size: 15.5px; }
.btn:hover { border-color: rgba(241, 255, 95, .7); }
.btn:active { transform: scale(.97); }
.btn.primary { background: var(--lime); border-color: var(--lime); color: var(--navy); }
.btn.primary:hover { background: #F7FF9A; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }
.badge { display: inline-flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 600; color: var(--soft); }
.badge::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.badge.on { color: var(--lime); }
.tool { display: inline-grid; place-items: center; min-width: 44px; min-height: 44px; padding: 0 12px; border-radius: 12px; border: 1px solid transparent; background: none; color: var(--ink); text-decoration: none; cursor: pointer; font-weight: 600; font-size: 15px; }
.tool:hover { border-color: var(--line); }
.tool .i { width: 22px; height: 22px; }
.sound .on, .sound[aria-pressed="true"] .off { display: none; }      /* the switch draws what it is doing: waves when it sounds, a cross when it does not */
.sound[aria-pressed="true"] .on { display: inline; stroke: var(--lime); }
.sound .off { opacity: .7; }
.sound[aria-pressed="false"] .on, .sound[aria-pressed="true"] .off { display: none; }
.tool.menu { display: none; }      /* the plain page names its stops in the header; the world folds them into a menu on small screens */

/* the plain layout: a readable stacked page */
canvas#world, .veil, .next { display: none; }
.top { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px var(--pad); }
.route ol { display: flex; flex-wrap: wrap; gap: 4px 18px; }
.route a { text-decoration: none; color: var(--soft); font-size: 15px; font-weight: 600; }
.route a:hover { color: var(--ink); }
.tools { display: flex; align-items: center; gap: 4px; }
main { display: block; }
.stop { padding: clamp(56px, 9vw, 120px) var(--pad); display: grid; gap: 28px; }
.copy { display: grid; gap: 18px; justify-items: start; max-width: 720px; }
/* Each stop opens on a still of its place in the world. On a wide screen the words stand over the picture's dark
   side (the subject is on the other); on a tall one the picture comes first and the words follow it. */
:root:not(.world) .stop { position: relative; isolation: isolate; --scene: clamp(500px, 60vw, 90vh); padding-top: 0; }
:root:not(.world) .scene { position: absolute; z-index: -1; inset: 0 0 auto; height: var(--scene); overflow: hidden; }
:root:not(.world) .scene img { width: 100%; height: 100%; object-fit: cover; object-position: 0 50%; }
:root:not(.world) .scene::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to top, var(--night) 0%, rgba(7, 6, 28, 0) 30%), linear-gradient(to left, rgba(7, 6, 28, .9) 0%, rgba(7, 6, 28, .78) 36%, rgba(7, 6, 28, 0) 70%);
}
:root:not(.world) .copy { min-height: var(--scene); align-content: center; padding-block: 48px; text-shadow: 0 1px 20px rgba(7, 6, 28, .7); }
:root:not(.world) .copy .btn { text-shadow: none; }
:root:not(.world) :is(.lead, .facts, .more, .steps span, .note, .reach) { color: var(--soft); }      /* over a picture the softer greys fall short */
/* in English the subject stands on the right and the words on the left, but for the two stops where the river bends */
:root[dir="ltr"]:not(.world) :is(#arrival, #real-estate, #contact) .scene img { object-position: 100% 50%; }
:root[dir="ltr"]:not(.world) :is(#arrival, #real-estate, #contact) .scene::after {
  background: linear-gradient(to top, var(--night) 0%, rgba(7, 6, 28, 0) 30%), linear-gradient(to right, rgba(7, 6, 28, .9) 0%, rgba(7, 6, 28, .78) 36%, rgba(7, 6, 28, 0) 70%);
}
:root[dir="ltr"]:not(.world) :is(#build, #idea) .copy { justify-self: end; }
/* a narrow screen: the stops' names go under the mark as one row that scrolls sideways */
@media (max-width: 760px) {
  :root:not(.world) .top { flex-wrap: wrap; row-gap: 2px; padding-bottom: 8px; }
  :root:not(.world) .route { order: 3; flex-basis: 100%; overflow-x: auto; scrollbar-width: none; margin-inline: calc(-1 * var(--pad)); padding-inline: var(--pad); }
  :root:not(.world) .route::-webkit-scrollbar { display: none; }
  :root:not(.world) .route ol { flex-wrap: nowrap; gap: 20px; white-space: nowrap; }
  :root:not(.world) .route a { display: inline-flex; align-items: center; min-height: 44px; }
}
@media (max-aspect-ratio: 82/100) {
  :root:not(.world) .stop { --scene: min(62vh, 140vw); gap: 22px; }
  :root:not(.world) .scene { position: relative; inset: auto; margin-inline: calc(-1 * var(--pad)); }
  :root:not(.world) .scene img, :root[dir="ltr"]:not(.world) :is(#arrival, #real-estate, #contact) .scene img { object-position: 50% 12%; }
  :root:not(.world) .scene::after, :root[dir="ltr"]:not(.world) :is(#arrival, #real-estate, #contact) .scene::after { background: linear-gradient(to top, var(--night) 0%, rgba(7, 6, 28, .5) 16%, rgba(7, 6, 28, 0) 38%); }
  :root:not(.world) .copy { min-height: 0; padding-block: 0; margin-top: -76px; justify-self: stretch; }
}
.facts { display: grid; gap: 8px; color: var(--soft); }
.facts li, .reach li { display: flex; align-items: center; gap: 10px; }
.facts .i, .reach .i { color: var(--lime); }
.screens { display: grid; gap: 14px; max-width: 980px; }
.screens-label { font-weight: 600; color: var(--soft); }
.tabs { display: flex; flex-wrap: wrap; gap: 8px; }
.tab, .kind { min-height: 44px; padding: 8px 16px; border-radius: 12px; border: 1px solid var(--line); background: none; cursor: pointer; font-weight: 600; font-size: 15.5px; color: var(--soft); }
.tab[aria-selected="true"], .kind[aria-checked="true"] { background: var(--lime); border-color: var(--lime); color: var(--navy); }
.panel img { border-radius: 12px; border: 1px solid var(--line); }
.panel figcaption { margin-top: 10px; color: var(--soft); }
.no-js .panel[hidden] { display: block; }
.no-js .tabs { display: none; }
.more { color: var(--soft); max-width: 34em; }
.more b { color: var(--ink); }
.kinds { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.kinds p { flex-basis: 100%; font-weight: 600; color: var(--soft); }
.steps { display: grid; gap: 10px; counter-reset: s; }
.steps li { counter-increment: s; display: grid; grid-template-columns: 34px 1fr; column-gap: 12px; }
.steps li::before { content: counter(s); grid-row: span 2; width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line); display: grid; place-items: center; font: 600 15px/1 var(--latin); color: var(--lime); }
.steps span { color: var(--soft); font-size: 16px; }
.note { color: var(--dim); font-size: 15px; }
.forms { display: grid; gap: 10px; }
.form-line { display: grid; gap: 2px; }
.form-line b { color: var(--ink); }
.form-line span { color: var(--soft); }
:root:not(.world) .pick { display: none; }      /* down the plain page all three are read; there is nothing to choose */
.reach { display: grid; gap: 8px; }
.reach a { text-decoration: none; font-weight: 600; }
.reach a:hover { color: var(--lime); }

/* the short form */
.write { display: grid; gap: 14px; max-width: 460px; }
.write-title { font-weight: 600; font-size: 20px; }
.write label { display: grid; gap: 6px; align-content: start; font-size: 15px; font-weight: 600; color: var(--soft); }      /* (its rows stand at its top: where two labels share a row and one grows by its line, the other's field stays level) */
.write .req { font-size: 13px; font-weight: 400; color: var(--dim); }
.write input, .write textarea {
  width: 100%; min-height: 50px; padding: 11px 14px; border-radius: 12px; border: 1px solid rgba(255, 255, 255, .2);
  background: rgba(7, 6, 28, .6); color: var(--ink); font-weight: 400; font-size: 17px; line-height: 1.5;
  transition: border-color .18s ease-out, background-color .18s ease-out;
}
:root[dir="rtl"] .write input[type="tel"] { text-align: right; }      /* (in Arabic the number stands at the right, where the other fields' words stand; its digits keep the order they were typed in, since the field stays left to right inside) */
.write textarea { resize: vertical; min-height: 104px; display: block; }
.write input:hover, .write textarea:hover { border-color: rgba(255, 255, 255, .34); }
.write input:focus-visible, .write textarea:focus-visible { outline: 2px solid var(--lime); outline-offset: 1px; border-radius: 12px; background: rgba(7, 6, 28, .85); }
.write [aria-invalid="true"] { border-color: #FF8A8A; }
.write [aria-invalid="true"]:hover { border-color: #FFB1B1; }      /* (under the pointer it stays marked, only lighter, as the others lighten) */
.write-msg { color: #FFB1B1; font-size: 15px; font-weight: 600; }
.write .field-msg { color: #FFB1B1; font-size: 14px; font-weight: 600; }      /* (what is wrong with one field, right under it) */
.write .field-msg:empty { display: none; }
.write-msg:empty, .write-msg[data-state="told"] { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }      /* (takes no room until it has something to say, but is there for a screen reader, so that its first words are heard; and a field's line said again for a screen reader alone is not seen twice: it stands under its field) */
.write-msg[data-state="sent"] { color: var(--lime); }      /* not a complaint: WhatsApp was opened with the message */
.write-note { color: var(--soft); font-size: 15px; }
.no-js .write { display: none; }
:root:not(.world) [data-open="write-sheet"] { display: none; }      /* on the plain page the form lies open in the section */
.foot { display: flex; flex-wrap: wrap; gap: 8px 22px; color: var(--dim); font-size: 15px; }
.foot a { color: var(--soft); }
.foot a:hover { color: var(--ink); }

/* sheets: the questions, the menu, the form's own. Cards in the middle of a wide screen, drawers from the bottom of a phone. */
.sheet {
  border: 1px solid var(--line); border-radius: 24px; background: #0B082E; color: var(--ink); padding: 0;
  width: min(620px, calc(100vw - 32px)); max-height: min(84vh, 740px); max-height: min(84dvh, 740px); overflow: hidden;
  box-shadow: 0 30px 90px rgba(2, 1, 12, .6);
  opacity: 0; transform: translateY(10px);
  transition: opacity .18s ease-in, transform .18s ease-in, overlay .18s allow-discrete, display .18s allow-discrete;
}
.sheet:not([open]) { pointer-events: none; }
dialog:not([open]) { display: none; }      /* (every browser that knows <dialog> does this itself; one that does not (iOS 15.0-15.3) would show the closed sheets' insides as part of the page) */
.sheet[open] {
  display: flex; flex-direction: column; opacity: 1; transform: none;
  transition: opacity .3s ease-out, transform .38s cubic-bezier(.2, .7, .2, 1), overlay .3s allow-discrete, display .3s allow-discrete;
}
@starting-style { .sheet[open] { opacity: 0; transform: translateY(16px); } }
.sheet::backdrop { background: rgba(3, 2, 14, 0); transition: background-color .18s ease-in, overlay .18s allow-discrete, display .18s allow-discrete; }
.sheet[open]::backdrop { background: rgba(3, 2, 14, .62); transition: background-color .3s ease-out, overlay .3s allow-discrete, display .3s allow-discrete; }
@starting-style { .sheet[open]::backdrop { background: rgba(3, 2, 14, 0); } }
.sheet-head { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 14px 4px; padding-inline-start: 24px; }
.sheet .sheet-head h2 { font-size: 30px; line-height: 1.25; }
#write-sheet { width: min(500px, calc(100vw - 32px)); }
#menu { width: min(420px, calc(100vw - 32px)); }
.sheet-body { padding: 8px 24px 24px; overflow: auto; overscroll-behavior: contain; }
/* (the questions look the same where they lie open on a page: .qa) */
:is(.sheet, .qa) details { border-top: 1px solid var(--line); }
:is(.sheet, .qa) details:first-child { border-top: 0; }
:is(.sheet, .qa) summary {
  display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 15px 0; cursor: pointer;
  font-weight: 600; font-size: 18.5px; line-height: 1.45; list-style: none; transition: color .18s ease-out;
}
:root[lang="en"] :is(.sheet, .qa) summary { font-size: 17px; }
:is(.sheet, .qa) summary::-webkit-details-marker { display: none; }
:is(.sheet, .qa) summary::after {
  content: ""; flex: none; width: 9px; height: 9px; margin: 0 6px; border: solid var(--lime); border-width: 0 2px 2px 0;
  transform: translateY(-3px) rotate(45deg); transition: transform .22s ease-out;
}
:is(.sheet, .qa) details[open] summary::after { transform: translateY(2px) rotate(-135deg); }
:is(.sheet, .qa) summary:hover { color: var(--lime); }
:is(.sheet, .qa) summary:focus-visible { outline-offset: -2px; }
:is(.sheet, .qa) details p { padding-bottom: 18px; color: var(--soft); max-width: 36em; text-wrap: pretty; }
:is(.sheet, .qa) details p a { color: var(--ink); }
.sheet .write { max-width: none; }
.sheet .write-title { display: none; }      /* the sheet's own heading says it */
.sheet .write .btn { width: 100%; min-height: 52px; }
/* the menu: the five stops down a small river line, then the questions, the other language and WhatsApp */
.menu-stops { position: relative; display: grid; }
.menu-stops::before { content: ""; position: absolute; inset-block: 28px; inset-inline-start: 9.5px; width: 1px; background: linear-gradient(to bottom, rgba(241, 255, 95, .7), rgba(241, 255, 95, .12)); }
.menu-stops a { position: relative; display: flex; align-items: center; gap: 16px; min-height: 56px; padding-inline: 6px 10px; border-radius: 12px; text-decoration: none; font-weight: 600; font-size: 20px; color: var(--soft); transition: color .18s ease-out; }
:root[lang="en"] .menu-stops a { font-size: 18px; }
.menu-stops a:hover { color: var(--ink); }
.menu-stops a i { flex: none; width: 8px; height: 8px; border-radius: 50%; background: #8E8BB8; box-shadow: 0 0 0 5px #0B082E; transition: background-color .2s ease-out, transform .2s ease-out; }
.menu-stops a[aria-current] { color: var(--ink); }
.menu-stops a[aria-current] i { background: var(--lime); transform: scale(1.4); box-shadow: 0 0 0 4px #0B082E, 0 0 12px 3px rgba(241, 255, 95, .6); }
.menu-sound { display: flex; align-items: center; gap: 14px; width: 100%; min-height: 56px; margin-top: 12px; padding-inline: 4px 6px; border: 0; border-top: 1px solid var(--line); border-radius: 0; background: none; color: var(--soft); font: inherit; font-weight: 600; font-size: 18px; text-align: start; cursor: pointer; }
:root[lang="en"] .menu-sound { font-size: 17px; }
.menu-sound .i { flex: none; width: 22px; height: 22px; }
.menu-sound i { flex: none; position: relative; margin-inline-start: auto; width: 46px; height: 28px; border-radius: 14px; background: rgba(255, 255, 255, .16); transition: background-color .18s ease-out; }
.menu-sound i::after { content: ""; position: absolute; top: 4px; inset-inline-start: 4px; width: 20px; height: 20px; border-radius: 50%; background: var(--ink); transition: inset-inline-start .18s ease-out, background-color .18s ease-out; }
.menu-sound[aria-pressed="true"] { color: var(--ink); }
.menu-sound[aria-pressed="true"] i { background: var(--lime); }
.menu-sound[aria-pressed="true"] i::after { inset-inline-start: 22px; background: var(--navy); }
.menu-more { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; }
.menu-more .primary { grid-column: 1 / -1; }
@media (max-width: 600px) {
  .sheet { margin: auto 0 0; width: 100%; max-width: none; max-height: 88vh; max-height: 88dvh; border-radius: 24px 24px 0 0; border-width: 1px 0 0; }
  .sheet[open] { transform: none; }
  @starting-style { .sheet[open] { opacity: 1; transform: translateY(60px); } }
  .sheet-head { padding-inline-start: var(--pad); }
  .sheet .sheet-head h2 { font-size: 26px; }
  #write-sheet, #menu { width: 100%; }
  .sheet-body { padding: 6px var(--pad) max(22px, env(safe-area-inset-bottom)); }
}
@media (prefers-reduced-motion: reduce) { .sheet, .sheet[open] { transform: none; } }
/* without JavaScript nothing can open a sheet: the questions lie open at the end of the page */
.no-js dialog#faq { display: block; position: static; opacity: 1; transform: none; width: auto; max-width: 760px; max-height: none; margin: 0; padding: 56px var(--pad); border: 0; border-top: 1px solid var(--line); border-radius: 0; background: none; box-shadow: none; }
.no-js dialog#faq .sheet-head, .no-js dialog#faq .sheet-body { padding-inline: 0; }
.no-js [data-open], .no-js [data-close], .no-js [data-act], .no-js .kinds, .no-js .sound { display: none; }
[hidden] { display: none !important; }

/* a screenshot shown large, in a sheet of its own */
.viewer { width: min(1264px, calc(100vw - 32px)); max-height: min(92vh, 900px); max-height: min(92dvh, 900px); }
.viewer .sheet-head h2 { font-size: 24px; }
.viewer .sheet-body { padding: 4px 16px 16px; }
.viewer .sheet-body:focus-visible { outline-offset: -3px; border-radius: 12px; }      /* (it is reached by Tab, and its arrows move a screen larger than it) */
.viewer img { width: auto; max-width: 100%; max-height: calc(min(92vh, 900px) - 96px); max-height: calc(min(92dvh, 900px) - 96px); margin-inline: auto; border-radius: 10px; }
@media (max-width: 600px) {
  .viewer { width: 100%; max-height: 88vh; max-height: 88dvh; }      /* (edge to edge, as every sheet on a phone: its own width above comes after theirs) */
  .viewer .sheet-body { padding: 4px 12px max(14px, env(safe-area-inset-bottom)); }
  .viewer img { width: 860px; max-width: none; max-height: none; }
}
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
/* the control that opens it stands beside the tabs of the staged page; the plain page shows the screenshots themselves */
.enlarge { display: none; }
