/* Orbisaris / Darbak public site. One stylesheet for every page, English
   (ltr) and Arabic (rtl). Logical properties (inline-start/end) keep the
   two directions in step without separate rules. */

@font-face {
  font-family: "Manrope";
  src: url("/assets/fonts/manrope.woff2") format("woff2");
  font-weight: 200 800;
  font-display: swap;
  unicode-range: U+0020-007E, U+00A0-00FF, U+2010-2027, U+2032-2033,
    U+2039-203A, U+20AC, U+2122, U+2190-2193;
}

/* Arabic reading text: Naskh is the calmer, more legible face for paragraphs. */
@font-face {
  font-family: "Noto Naskh Arabic";
  src: url("/assets/fonts/noto-naskh-arabic.woff2") format("woff2");
  font-weight: 400 700;
  /* Naskh draws small for its size; this matches it to Manrope's reading size. */
  size-adjust: 120%;
  font-display: swap;
  unicode-range: U+0600-06FF, U+0750-077F, U+200C-200F, U+2010-2011,
    U+204F, U+2E41, U+FB50-FDFF, U+FE70-FEFF;
}

/* Arabic display text: headings, buttons, menus, the road. */
@font-face {
  font-family: "Noto Kufi Arabic";
  src: url("/assets/fonts/noto-kufi-arabic.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
  unicode-range: U+0600-06FF, U+0750-077F, U+200C-200F, U+2010-2011,
    U+204F, U+2E41, U+FB50-FDFF, U+FE70-FEFF;
}

:root {
  /* Orbisaris, the company: deep teal and mint. */
  --deep: #0c2b2a;
  --night: #071a19;
  --deep-soft: #1d4442;
  --accent: #3ccfb8;       /* fills: buttons, marks, rules */
  --accent-soft: #a7ebdd;  /* accent text on --deep */
  --on-accent: #0c2b2a;
  --link: #0b6e64;         /* links on light: 5.9:1 on --page */
  --page: #f5f7f6;
  --surface: #ffffff;
  --line: #d9e2e0;
  --ink: #0e1b1a;
  --muted: #4a5b59;
  --on-deep: #ffffff;
  --on-deep-muted: #b3c7c4;

  --step--1: 0.875rem;
  --step-0: 1rem;
  --step-1: 1.25rem;
  --step-2: 1.5625rem;
  --step-3: 1.953rem;
  --step-4: clamp(2.2rem, 1.6rem + 2.6vw, 3.4rem);

  --gutter: clamp(16px, 4vw, 40px);
  --measure: 68ch;
  --radius: 14px;

  color-scheme: light;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-family: "Manrope", "Noto Kufi Arabic", system-ui, -apple-system,
    "Segoe UI", sans-serif;
  font-size: var(--step-0);
  line-height: 1.6;
  text-rendering: optimizeLegibility;
}

/* Arabic: Naskh for reading, Kufi for display. Set on the Arabic root (or an
   Arabic block on an English page) so everything inside inherits it. */
body:lang(ar),
body:not(:lang(ar)) [lang="ar"] {
  font-family: "Manrope", "Noto Naskh Arabic", system-ui, -apple-system,
    "Segoe UI", sans-serif;
}

:lang(ar):is(h1, h2, h3, .button, .site-nav, .faq summary, .road, .steps strong,
  .panel-title, .wordmark) {
  font-family: "Manrope", "Noto Kufi Arabic", system-ui, -apple-system,
    "Segoe UI", sans-serif;
}

/* Arabic needs more room between lines than Latin. */
:lang(ar) body,
body:lang(ar) { line-height: 1.85; }

img { max-width: 100%; height: auto; display: block; }

a { color: var(--link); text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }

:focus-visible {
  outline: 3px solid var(--focus, var(--link));
  outline-offset: 3px;
  border-radius: 4px;
}

.skip {
  position: absolute;
  inset-inline-start: 12px;
  top: -60px;
  background: var(--accent);
  color: var(--on-accent);
  padding: 8px 14px;
  border-radius: 8px;
  font-weight: 700;
  z-index: 10;
}
.skip:focus { top: 12px; }

/* Dark surfaces take the bright accent for focus; light ones keep --link. */
.site-header,
.hero,
.product-card,
.panel.dark,
.launch,
.site-footer { --focus: var(--accent); }

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

/* ---------------------------------------------------------------- header */

.site-header {
  background: var(--deep);
  color: var(--on-deep);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px 24px;
  flex-wrap: wrap;
  padding-block: 18px;
}

.wordmark {
  color: var(--on-deep);
  text-decoration: none;
  font-weight: 800;
  font-size: var(--step-1);
  letter-spacing: -0.01em;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  direction: ltr; /* the name is Latin; keep the logo the same in Arabic */
}

/* The Orbisaris icon. Its square matches the header, so only the orbit shows. */
.wordmark::before {
  content: "";
  width: 40px;
  height: 40px;
  margin: -6px;
  margin-inline-end: -10px;
  background: url("/assets/orbisaris-mark.svg") center / contain no-repeat;
}

.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 6px;
}

.site-nav a {
  color: var(--on-deep-muted);
  text-decoration: none;
  padding: 8px 10px;
  border-radius: 8px;
  display: inline-block;
}

.site-nav a:hover { color: var(--on-deep); }

.site-nav a[aria-current="page"] {
  color: var(--on-deep);
  box-shadow: inset 0 -2px 0 var(--accent);
  border-radius: 0;
}

.site-nav .lang a {
  color: var(--on-deep);
  border: 1px solid color-mix(in srgb, var(--on-deep-muted) 60%, var(--deep));
}

/* English pages show only one Arabic word (this link). Draw it in the
   system font so those pages don't download the 96 KB Arabic font. */
html:lang(en) .site-nav .lang a { font-family: system-ui, -apple-system, "Segoe UI", sans-serif; }

/* ----------------------------------------------------------------- hero */

.hero {
  background: var(--deep);
  color: var(--on-deep);
  overflow: hidden;
}

.hero .wrap {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr);
  gap: 32px 56px;
  padding-block: clamp(40px, 7vw, 88px) clamp(48px, 8vw, 104px);
  align-items: center;
}

.hero h1 {
  font-size: var(--step-4);
  line-height: 1.12;
  letter-spacing: -0.025em;
  font-weight: 750;
  margin: 0 0 20px;
  max-width: 18ch;
  text-wrap: balance;
}

.hero h1:lang(ar) {
  letter-spacing: 0;
  line-height: 1.45;
  font-weight: 700;
}

.hero .lede {
  color: var(--on-deep-muted);
  font-size: var(--step-1);
  line-height: 1.55;
  max-width: 42ch;
  margin: 0 0 32px;
}

.hero .lede:lang(ar) { line-height: 1.8; }

.button {
  display: inline-block;
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 750;
  text-decoration: none;
  padding: 14px 22px;
  border-radius: 12px;
  min-height: 48px;
}

.button:hover { background: var(--accent-soft); text-decoration: none; }

.button.quiet {
  background: transparent;
  color: var(--on-deep);
  box-shadow: inset 0 0 0 1px
    color-mix(in srgb, var(--on-deep-muted) 60%, var(--deep));
}

.button.quiet:hover { background: var(--deep-soft); }

.actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* The road: Jordan's north-south line of cities, Irbid to Aqaba. A list,
   so screen readers read the cities in order. */

.road {
  /* One centre line for the asphalt, the dashes and every stop, so they
     always line up (in both directions). Whole pixels: no rounding drift. */
  --axis: 20px;
  --gap: 46px; /* from the road's start edge to the city names */
  position: relative;
  list-style: none;
  margin: 0;
  padding: 6px 0;
  padding-inline-start: var(--gap);
}

.road::before,
.road::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  transform-origin: top;
}

/* asphalt */
.road::before {
  inset-inline-start: calc(var(--axis) - 11px);
  width: 22px;
  background: var(--deep-soft);
  border-radius: 11px;
}

/* centre line */
.road::after {
  inset-inline-start: calc(var(--axis) - 1px);
  width: 2px;
  background: repeating-linear-gradient(
    to bottom,
    var(--accent) 0 12px,
    transparent 12px 22px
  );
  animation: draw 1.4s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

.road li {
  position: relative;
  padding-block: 7px;
  color: var(--on-deep-muted);
  font-size: var(--step-0);
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
}

.road li::before {
  content: "";
  position: absolute;
  inset-inline-start: calc(var(--axis) - var(--gap) - 5px);
  top: 50%;
  width: 10px;
  height: 10px;
  margin-top: -5px;
  border-radius: 50%;
  background: var(--deep);
  box-shadow: 0 0 0 2px var(--on-deep-muted);
  z-index: 1; /* stops sit on top of the centre line */
}

.road .home {
  color: var(--on-deep);
  font-weight: 750;
  font-size: var(--step-1);
}

.road .home::before {
  width: 16px;
  height: 16px;
  margin-top: -8px;
  inset-inline-start: calc(var(--axis) - var(--gap) - 8px);
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--deep), 0 0 0 6px var(--accent);
}

.road small {
  font-size: var(--step--1);
  color: var(--accent-soft);
  font-weight: 600;
}

@keyframes draw {
  from { transform: scaleY(0); }
  to { transform: scaleY(1); }
}

@media (prefers-reduced-motion: reduce) {
  .road::after { animation: none; }
}

/* ------------------------------------------------------------- sections */

main { display: block; }

.section { padding-block: clamp(48px, 7vw, 88px); }

.section + .section { border-top: 1px solid var(--line); }

.section h2 {
  font-size: var(--step-3);
  line-height: 1.2;
  letter-spacing: -0.015em;
  margin: 0 0 12px;
  max-width: 24ch;
  text-wrap: balance;
}

.section h2:lang(ar) { letter-spacing: 0; line-height: 1.5; }

.section .intro {
  color: var(--muted);
  font-size: var(--step-1);
  max-width: 54ch;
  margin: 0 0 40px;
}

.section h3 {
  font-size: var(--step-1);
  line-height: 1.3;
  margin: 0 0 8px;
}

.section p,
.section li { max-width: var(--measure); }

.muted { color: var(--muted); }

/* Short sets of three: columns topped with the accent rule, not boxed cards. */
.uses {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 32px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.uses li {
  border-top: 3px solid var(--accent);
  padding-top: 18px;
}

.uses p { color: var(--muted); margin: 0; }

/* Real sequences only: how to book, how to drive, how to send. */
.steps {
  counter-reset: step;
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 18px;
}

.steps li {
  counter-increment: step;
  position: relative;
  padding-inline-start: 52px;
  min-height: 36px;
}

.steps li::before {
  content: counter(step);
  position: absolute;
  inset-inline-start: 0;
  top: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--deep);
  color: var(--on-deep);
  font-weight: 750;
  display: grid;
  place-items: center;
  font-size: var(--step--1);
}

.steps strong { display: block; }
.steps span { color: var(--muted); }

.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 48px 64px;
}

.audience h3 { margin-bottom: 18px; }

/* Facts: label and value pairs (contact, company details). */
.facts {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 10px 28px;
  margin: 0;
}

.facts dt { color: var(--muted); }
.facts dd { margin: 0; font-weight: 600; }

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(20px, 3vw, 32px);
}

.panel.dark {
  background: var(--deep);
  border-color: var(--deep);
  color: var(--on-deep);
}

.panel.dark p { color: var(--on-deep-muted); }
.panel.dark a { color: var(--accent-soft); }

.store-note {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.store-note img {
  width: 64px;
  height: 64px;
  border-radius: 15px;
}

/* ------------------------------------------------- long text (terms etc) */

.doc {
  padding-block: clamp(40px, 6vw, 72px);
}

.doc .wrap { max-width: 820px; }

.doc h1 {
  font-size: var(--step-3);
  line-height: 1.2;
  margin: 0 0 6px;
}

.doc h1:lang(ar) { line-height: 1.5; }

.doc .updated { color: var(--muted); margin: 0 0 32px; }

.doc h2 {
  font-size: var(--step-1);
  margin: 40px 0 10px;
}

.doc p,
.doc li { color: var(--muted); max-width: var(--measure); }
.doc strong { color: var(--ink); }
.doc ul { padding-inline-start: 22px; }
.doc li { margin-bottom: 6px; }

/* Questions: native disclosure, no script. */
.faq { display: grid; gap: 10px; margin: 0 0 8px; }

.faq details {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0 18px;
}

.faq summary {
  cursor: pointer;
  font-weight: 700;
  padding: 16px 0;
  padding-inline-end: 32px;
  list-style: none;
  position: relative;
}

.faq summary::-webkit-details-marker { display: none; }

.faq summary::after {
  content: "";
  position: absolute;
  inset-inline-end: 4px;
  top: 50%;
  width: 9px;
  height: 9px;
  margin-top: -7px;
  /* physical sides: the arrow points down in both directions */
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  transition: transform 160ms ease-out;
}

.faq details[open] summary::after { transform: rotate(-135deg); margin-top: -2px; }

@media (prefers-reduced-motion: reduce) {
  .faq summary::after { transition: none; }
}

.faq details[open] summary { color: var(--link); }
.faq details p { margin: 0 0 16px; color: var(--muted); }

/* Placeholder text to replace before launch. Dashed so it can't be missed. */
.ph {
  background: #fff4e5;
  outline: 1px dashed var(--link);
  outline-offset: 1px;
  border-radius: 3px;
  padding: 0 4px;
}

/* --------------------------------------------------------------- footer */

.site-footer {
  background: var(--night);
  color: var(--on-deep-muted);
  padding-block: 40px;
  font-size: var(--step--1);
}

.site-footer .wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px 40px;
  align-items: start;
}

.site-footer p { margin: 0 0 4px; }
.site-footer strong { color: var(--on-deep); }
.site-footer a { color: var(--on-deep-muted); }
.site-footer a:hover { color: var(--on-deep); }

.site-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0 20px;
}

.site-footer li a { display: inline-block; padding-block: 12px; }

.site-footer .legal { margin-top: 12px; }

/* --------------------------------------------------------------- narrow */

@media (max-width: 860px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .uses { grid-template-columns: 1fr; gap: 28px; }
  .split { grid-template-columns: 1fr; }
  .site-footer .wrap { grid-template-columns: 1fr; }
}

@media (max-width: 860px) {
  /* The road stays a road on phones: vertical, every stop in order. */
  .road li { padding-block: 5px; }
  /* The company orbit is decoration; on phones it would push Darbak below
     the first screen. */
  .hero .orbit { display: none; }
}

@media (max-width: 480px) {
  .facts { grid-template-columns: 1fr; gap: 2px; }
  .facts dd { margin-bottom: 12px; }
}

/* ------------------------------------------------------------ variants */

.hero .store-note p { color: var(--on-deep-muted); margin: 0; }

.uses.stack { grid-template-columns: 1fr; gap: 24px; }

.page-title {
  font-size: var(--step-4);
  line-height: 1.12;
  letter-spacing: -0.025em;
  margin: 0 0 20px;
  text-wrap: balance;
}

.page-title:lang(ar) { letter-spacing: 0; line-height: 1.45; }

.panel-title {
  font-size: var(--step-1);
  margin: 0 0 16px;
}

.section .panel h2.panel-title { font-size: var(--step-1); max-width: none; }

/* Darbak, the app: wherever the site presents Darbak, it wears Darbak's own
   colours (navy and orange, as in the app). Everything else is Orbisaris. */
.darbak {
  --deep: #0b1530;
  --night: #050b1e;
  --deep-soft: #1b2547;
  --accent: #ff8a00;
  --accent-soft: #ffb347;
  --on-accent: #0b1530;
  --link: #9a4e00;
  --on-deep-muted: #b4bcd1;
}

/* Orbisaris home: the icon's orbit, drawn large. Decorative. */
.orbit { width: 100%; max-width: 400px; justify-self: center; }
.orbit .ring { fill: none; stroke: var(--on-deep-muted); stroke-width: 34; }
.orbit .core { fill: var(--accent); }
.orbit .moon { fill: var(--on-deep); }

/* The Darbak block on the company home page: Darbak's navy card set on the
   company's light page, so the two brands never meet band against band. */
.product-card {
  background: var(--deep);
  color: var(--on-deep);
  border-radius: 24px;
  padding: clamp(28px, 5vw, 56px);
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 32px 56px;
  align-items: center;
}
.product-card h2 { color: var(--on-deep); }
.product-card p { color: var(--on-deep-muted); }
.product-card .app-name {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
}
.product-card .app-name img { width: 56px; height: 56px; border-radius: 13px; }
.product-card .app-name span { color: var(--accent-soft); font-weight: 600; }

/* Darbak page: what to do before launch. */
.launch {
  background: var(--deep);
  color: var(--on-deep);
}
.launch h2 { color: var(--on-deep); }
.launch p { color: var(--on-deep-muted); }

/* 404: English and Arabic side by side, each in its own direction. */
.notfound .wrap { grid-template-columns: 1fr 1fr; }

@media (max-width: 860px) {
  .product-card { grid-template-columns: 1fr; }
  .notfound .wrap { grid-template-columns: 1fr; }
}

/* A card beside text keeps its own height instead of stretching. */
.split > .panel { align-self: start; }

/* ------------------------------------------------- second review fixes */

/* The skip link appears over the dark header: give it a light ring. */
.skip:focus-visible { outline-color: var(--on-deep); }

/* Menu links: at least 44px tall to tap. */
.site-nav a { min-height: 44px; display: inline-flex; align-items: center; }

/* Darbak page: hero and launch sit as navy cards on the light page. */
.page-card { padding-top: clamp(20px, 3vw, 40px); }
.hero-card h1 {
  font-size: var(--step-4);
  line-height: 1.12;
  letter-spacing: -0.025em;
  font-weight: 750;
  margin: 0 0 20px;
  max-width: 18ch;
  text-wrap: balance;
}
.hero-card h1:lang(ar) { letter-spacing: 0; line-height: 1.45; font-weight: 700; }
.hero-card .lede {
  color: var(--on-deep-muted);
  font-size: var(--step-1);
  line-height: 1.55;
  max-width: 42ch;
  margin: 0 0 28px;
}
.hero-card .lede:lang(ar) { line-height: 1.8; }
.hero-card .store-note p { color: var(--on-deep-muted); margin: 0; }
.product-card.launch { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; }
.email-note { margin: 10px 0 0; font-size: var(--step--1); }

/* Home: the closing "Talk to us". */
.talk .intro { margin-bottom: 24px; }
.talk p:last-child { margin: 0; }

/* Support: question groups. */
.faq-group { font-size: var(--step-1); margin: 32px 0 12px; }
.faq-group:first-of-type { margin-top: 8px; }

/* Terms: contents list. */
.toc {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 22px;
  margin: 0 0 32px;
}
.toc ol {
  margin: 0;
  padding-inline-start: 22px;
  columns: 2 16rem;
  column-gap: 32px;
}
.toc li { margin: 0 0 6px; break-inside: avoid; }

@media (max-width: 860px) {
  .product-card.launch { grid-template-columns: 1fr; }
}

/* Privacy policy (built from the backend's copy): its sub-headings. */
.doc h3 { font-size: var(--step-0); margin: 24px 0 6px; }
.doc .updated + p { margin-top: 0; }
