/* The public pages of nexovion.com: one stylesheet for /site/ar/ and /site/en/.
 *
 * Plain CSS, no build step. The colours and the type are the product's Majlis
 * look (frontend/src/kit/tokens.css), copied here because these pages are not
 * part of the app bundle. If a token changes there, change it here too.
 *
 * Right to left is done with logical properties only (inline-start, inline-end,
 * padding-inline, text-align: start): the same rules serve both languages and
 * nothing is mirrored by hand. Gold is decoration and is never text.
 */

@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-display: swap;
  font-weight: 200 800;
  src: url("fonts/manrope-latin-wght.woff2") format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Almarai";
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url("fonts/almarai-arabic-400.woff2") format("woff2");
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC;
}
@font-face {
  font-family: "Almarai";
  font-style: normal;
  font-display: swap;
  font-weight: 700;
  src: url("fonts/almarai-arabic-700.woff2") format("woff2");
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC;
}
@font-face {
  font-family: "Almarai";
  font-style: normal;
  font-display: swap;
  font-weight: 800;
  src: url("fonts/almarai-arabic-800.woff2") format("woff2");
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC;
}

:root {
  color-scheme: light dark;

  --ground: #ede7dc;
  --surface: #fbf8f3;
  --sunken: #f3eee5;
  --rule: #c6bcaa;
  --rule-strong: #aa9f88;
  --rule-control: #857c6b;
  --ink: #1c2623;
  --ink-soft: #46504b;
  --ink-quiet: #59625c;
  --brand: #0e5a52;
  --brand-strong: #0b4a44;
  --brand-soft: #dceae5;
  --brand-on: #ffffff;
  --bar: #0e5a52;
  --bar-on: #ffffff;
  --bar-on-soft: #cfe3de;
  --bar-rule: #2c7a70;
  --gold: #b98518;
  --focus: #9a6b0a;
  --focus-on-bar: #ffd98a;
  --attention: #7a5100;
  --attention-soft: #f6e8c9;
  --bad: #a1261b;

  --font: "Manrope", "Almarai", system-ui, "Segoe UI", Tahoma, sans-serif;
  --gutter: clamp(1rem, 0.4rem + 3vw, 2.5rem);
  --measure: 38rem;
  --page: 74rem;
  --lh: 1.65;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ground: #141816;
    --surface: #1c211e;
    --sunken: #232925;
    --rule: #56625a;
    --rule-strong: #717d73;
    --rule-control: #737d74;
    --ink: #eee9df;
    --ink-soft: #c6c1b5;
    --ink-quiet: #a3a69c;
    --brand: #64c6b6;
    --brand-strong: #7bd2c4;
    --brand-soft: #17352f;
    --brand-on: #06211d;
    --bar: #0c2f2a;
    --bar-on: #eee9df;
    --bar-on-soft: #a9c7c0;
    --bar-rule: #24554c;
    --gold: #e2b65a;
    --focus: #e2b65a;
    --focus-on-bar: #e2b65a;
    --attention: #ecc56b;
    --attention-soft: #3a2e12;
    --bad: #f4a093;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-block-start: 1rem; }
body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: var(--lh);
  font-variant-numeric: lining-nums;
  overflow-wrap: break-word;
}
:lang(ar) { --lh: 1.85; letter-spacing: 0; }
img, svg { max-width: 100%; }
p { margin: 0; }
h1, h2, h3 { margin: 0; font-weight: 800; text-wrap: balance; }
a { color: var(--brand); text-underline-offset: 0.2em; text-decoration-thickness: 0.08em; }
a:hover { color: var(--ink); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 2px; }
.on-bar :focus-visible { outline-color: var(--focus-on-bar); }

.skip {
  position: absolute; inset-block-start: 0; inset-inline-start: 0;
  padding: 0.6rem 1rem; background: var(--surface); color: var(--ink);
  transform: translateY(-120%); z-index: 100;
}
.skip:focus { transform: none; }

/* Numbers and Latin names inside Arabic text keep their own direction. */
.num, bdi { unicode-bidi: isolate; }
.num { direction: ltr; display: inline-block; font-weight: 700; }

.wrap { width: min(100% - 2 * var(--gutter), var(--page)); margin-inline: auto; }

/* ── Bar ─────────────────────────────────────────────────────────────── */
.bar { background: var(--bar); color: var(--bar-on); }
.bar a { color: var(--bar-on); }
.bar-in {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 0.5rem 1.5rem; min-height: 3.75rem; padding-block: 0.5rem;
}
@media (max-width: 24rem) {
  .bar-end { gap: 0.35rem; font-size: 0.875rem; }
  .bar-end .lang, .bar-end .signin { padding-inline: 0.6rem; }
  .wordmark { font-size: 1.1rem; gap: 0.5rem; }
}
.wordmark {
  display: inline-flex; align-items: center; gap: 0.7rem; direction: ltr;
  font-family: "Manrope", system-ui, sans-serif; font-weight: 800;
  font-size: 1.25rem; letter-spacing: 0.01em; text-decoration: none;
}
.wordmark i {
  width: 0.7rem; height: 0.7rem; background: var(--gold);
  transform: rotate(45deg); flex: none;
}
.bar nav { display: none; gap: 1.75rem; font-size: 0.9375rem; font-weight: 700; }
.bar nav a { text-decoration: none; padding-block: 0.25rem; border-block-end: 2px solid transparent; }
.bar nav a:hover { border-block-end-color: var(--gold); }
.bar-end { display: flex; align-items: center; gap: 0.5rem; font-size: 0.9375rem; font-weight: 700; }
.bar-end .lang {
  text-decoration: none; padding: 0.45rem 0.8rem; border: 1px solid var(--bar-rule); border-radius: 0.5rem;
}
.bar-end .lang:hover { background: var(--bar-rule); }
.bar-end .signin {
  text-decoration: none; padding: 0.45rem 0.9rem; border-radius: 0.5rem;
  background: var(--bar-on); color: var(--bar);
}
.bar-end .signin:hover { background: var(--bar-on-soft); color: var(--bar); }
@media (min-width: 62rem) { .bar nav { display: flex; } }

/* ── Buttons ─────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.6rem;
  min-height: 3rem; padding: 0.65rem 1.4rem; border-radius: 0.5rem;
  font: inherit; font-weight: 800; text-decoration: none; cursor: pointer;
  border: 2px solid var(--brand); background: var(--brand); color: var(--brand-on);
}
.btn:hover { background: var(--brand-strong); border-color: var(--brand-strong); color: var(--brand-on); }
.btn.quiet { background: transparent; color: var(--brand); }
.btn.quiet:hover { background: var(--brand-soft); color: var(--brand); }
@media (prefers-reduced-motion: no-preference) {
  .btn, .bar nav a, .bar-end a { transition: background-color 120ms ease, border-color 120ms ease; }
}

/* ── Hero ────────────────────────────────────────────────────────────── */
.hero { padding-block: clamp(2.5rem, 1rem + 6vw, 6rem) clamp(2.5rem, 1rem + 5vw, 5rem); }
.hero-grid { display: grid; gap: clamp(2rem, 1rem + 4vw, 4rem); align-items: center; }
.eyebrow {
  display: flex; align-items: center; gap: 0.7rem; margin-block-end: 1.25rem;
  font-size: 0.9375rem; font-weight: 700; color: var(--ink-soft);
}
.eyebrow::before { content: ""; width: 0.55rem; height: 0.55rem; background: var(--gold); transform: rotate(45deg); flex: none; }
h1 {
  font-size: clamp(2.2rem, 1.2rem + 4.4vw, 4.4rem); line-height: 1.12;
  letter-spacing: -0.02em; color: var(--ink);
}
:lang(ar) h1 { line-height: 1.4; letter-spacing: 0; }
.lede { margin-block-start: 1.5rem; max-width: var(--measure); font-size: clamp(1.125rem, 1rem + 0.5vw, 1.35rem); color: var(--ink-soft); }
.gets { list-style: none; margin: 1.75rem 0 0; padding: 0; display: grid; gap: 0.55rem; max-width: var(--measure); }
.gets li { display: flex; gap: 0.8rem; align-items: baseline; font-weight: 700; }
.gets li::before { content: ""; flex: none; width: 0.5rem; height: 0.5rem; background: var(--gold); transform: rotate(45deg); translate: 0 -0.12em; }
.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-block-start: 2.25rem; }

.hero-art {
  position: relative; overflow: hidden; isolation: isolate;
  background: var(--bar); color: var(--bar-on);
  border-radius: 0.5rem; padding: clamp(1.5rem, 1rem + 3vw, 3rem);
}
.hero-art::before {
  content: ""; position: absolute; inset: 0; z-index: -1; opacity: 0.5;
  background:
    linear-gradient(45deg, transparent 48.5%, var(--bar-rule) 48.5% 51.5%, transparent 51.5%) 0 0 / 2.75rem 2.75rem,
    linear-gradient(-45deg, transparent 48.5%, var(--bar-rule) 48.5% 51.5%, transparent 51.5%) 0 0 / 2.75rem 2.75rem;
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 70%);
  mask-image: linear-gradient(to bottom, transparent, #000 70%);
}
.verbs { list-style: none; margin: 0; padding: 0; counter-reset: v; }
.verbs li {
  display: flex; align-items: center; gap: 1rem; padding-block: 0.35rem;
  font-size: clamp(1.9rem, 1.2rem + 2.6vw, 3.1rem); font-weight: 800; line-height: 1.25;
}
:lang(ar) .verbs li { line-height: 1.5; }
.verbs li::before {
  content: ""; flex: none; width: 0.6rem; height: 0.6rem; background: var(--gold); transform: rotate(45deg);
}
.verbs li:nth-child(odd) { padding-inline-start: 0; }
.verbs li:nth-child(even) { padding-inline-start: clamp(1rem, 4vw, 3rem); }
.art-note { margin-block-start: 1.25rem; padding-block-start: 1rem; border-block-start: 1px solid var(--bar-rule); color: var(--bar-on-soft); font-size: 0.9375rem; }

@media (min-width: 62rem) { .hero-grid { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); } }

/* ── Sections ────────────────────────────────────────────────────────── */
section { padding-block: clamp(3rem, 1.5rem + 5vw, 6rem); }
.head { display: grid; gap: 0.9rem; margin-block-end: clamp(1.75rem, 1rem + 2.5vw, 3rem); max-width: 46rem; }
.kicker { font-size: 0.875rem; font-weight: 800; color: var(--brand); display: flex; align-items: center; gap: 0.6rem; }
.kicker::before { content: ""; width: 1.75rem; height: 2px; background: var(--gold); }
h2 { font-size: clamp(1.75rem, 1.2rem + 2.2vw, 2.75rem); line-height: 1.2; letter-spacing: -0.01em; }
:lang(ar) h2 { line-height: 1.5; letter-spacing: 0; }
.head p { color: var(--ink-soft); font-size: 1.125rem; max-width: var(--measure); }
.band { background: var(--surface); border-block: 1px solid var(--rule); }

/* How it works: a ruled list, the number and the verb in the margin. */
.steps { list-style: none; margin: 0; padding: 0; counter-reset: s; border-block-start: 2px solid var(--ink); }
.steps li {
  counter-increment: s; display: grid; gap: 0.35rem 1.5rem; padding-block: 1.4rem;
  border-block-end: 1px solid var(--rule);
}
.steps h3 { font-size: 1.5rem; line-height: 1.3; display: flex; align-items: baseline; gap: 0.9rem; }
.steps h3::before {
  content: counter(s); font-size: 0.9375rem; font-weight: 800; color: var(--brand);
  min-width: 1.6rem; height: 1.6rem; display: inline-grid; place-items: center; direction: ltr;
  border: 1.5px solid var(--brand); border-radius: 50%; translate: 0 -0.15em;
}
.steps p { color: var(--ink-soft); max-width: var(--measure); padding-inline-start: 2.5rem; }
@media (min-width: 50rem) {
  .steps li { grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.6fr); align-items: baseline; }
  .steps p { padding-inline-start: 0; }
}

/* Rooms: rows on a rule, not cards. */
.rooms { list-style: none; margin: 0; padding: 0; }
.room {
  display: grid; gap: 0.6rem 2rem; padding-block: 1.9rem; border-block-start: 1px solid var(--rule-strong);
}
.room:last-child { border-block-end: 1px solid var(--rule-strong); }
.room h3 { font-size: clamp(1.6rem, 1.2rem + 1.4vw, 2.2rem); line-height: 1.25; }
.room .latin { display: block; margin-block-start: 0.15rem; font-family: "Manrope", system-ui, sans-serif; font-size: 0.875rem; font-weight: 700; color: var(--ink-quiet); direction: ltr; text-align: start; }
:lang(ar) .room .latin { text-align: start; }
.room p { color: var(--ink-soft); max-width: var(--measure); }
.tag {
  display: inline-flex; align-items: center; gap: 0.5rem; width: fit-content; height: fit-content;
  padding: 0.2rem 0.75rem; border-radius: 99rem; font-size: 0.875rem; font-weight: 800;
  background: var(--brand-soft); color: var(--brand-strong); border: 1px solid transparent;
}
.tag::before { content: ""; width: 0.5rem; height: 0.5rem; border-radius: 50%; background: currentColor; }
.tag.part { background: var(--attention-soft); color: var(--attention); }
.tag.soon { background: transparent; color: var(--ink-quiet); border: 1px dashed var(--rule-strong); }
.tag.soon::before { border-radius: 0; transform: rotate(45deg); width: 0.45rem; height: 0.45rem; }
.room.coming h3, .room.coming p { color: var(--ink-quiet); }
.room.coming { padding-block: 1.25rem; }
.room.coming h3 { font-size: 1.35rem; }
@media (min-width: 50rem) {
  .room { grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.7fr) 9rem; align-items: start; }
  .room .tag { justify-self: end; }
}

/* Trust */
.trust-grid { display: grid; gap: 1.25rem; }
.fact { padding: 1.4rem 1.5rem; background: var(--sunken); border-inline-start: 4px solid var(--gold); border-radius: 0.25rem; }
.fact h3 { font-size: 1.2rem; line-height: 1.4; margin-block-end: 0.4rem; }
.fact p { color: var(--ink-soft); }
.trust-links { display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; margin-block-start: 1.75rem; font-weight: 700; }
@media (min-width: 50rem) { .trust-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* Calculator */
.calc-grid { display: grid; gap: 2rem; align-items: start; }
.calc {
  background: var(--surface); border: 1px solid var(--rule-strong); border-radius: 0.5rem;
  padding: clamp(1.25rem, 1rem + 1.5vw, 2rem);
}
.field { display: grid; gap: 0.35rem; margin-block-end: 1.15rem; }
.field label { font-weight: 800; font-size: 0.9375rem; }
.field .hint { font-size: 0.875rem; color: var(--ink-quiet); }
.field input {
  font: inherit; font-variant-numeric: tabular-nums; color: var(--ink); background: var(--sunken);
  border: 1.5px solid var(--rule-control); border-radius: 0.5rem; min-height: 3rem; padding: 0.5rem 0.9rem;
  width: 100%; direction: ltr; text-align: start;
}
:lang(ar) .field input { text-align: right; }
.field input::placeholder { color: var(--ink-quiet); opacity: 1; }
.field input[aria-invalid="true"] { border-color: var(--bad); }
.result { margin-block-start: 0.5rem; padding-block-start: 1.25rem; border-block-start: 2px solid var(--ink); }
.result .label { font-size: 0.9375rem; font-weight: 700; color: var(--ink-soft); }
.result .amount { font-size: clamp(2.1rem, 1.4rem + 3vw, 3.25rem); font-weight: 800; line-height: 1.2; font-variant-numeric: tabular-nums; }
.result .amount small { font-size: 1rem; font-weight: 700; color: var(--ink-soft); }
.result .why { margin-block-start: 0.5rem; color: var(--ink-soft); }
.result .err { color: var(--bad); font-weight: 700; }
.result .capped { color: var(--attention); font-weight: 700; }
.rule-box { padding: 1.25rem 1.4rem; border: 1px dashed var(--rule-strong); border-radius: 0.5rem; color: var(--ink-soft); }
.rule-box strong { color: var(--ink); }
.rule-box ul { margin: 0.6rem 0 0; padding-inline-start: 1.2rem; }
.caution { margin-block-start: 1rem; font-weight: 700; color: var(--attention); }
.calc button { width: 100%; }
@media (min-width: 62rem) { .calc-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(2rem, 5vw, 5rem); } }

/* The ask */
.ask { background: var(--bar); color: var(--bar-on); }
.ask .wrap { display: grid; gap: 1.75rem; align-items: center; }
.ask h2 { color: var(--bar-on); }
.ask p { color: var(--bar-on-soft); font-size: 1.125rem; max-width: var(--measure); margin-block-start: 0.9rem; }
.ask .btn { background: var(--bar-on); color: var(--bar); border-color: var(--bar-on); }
.ask .btn:hover { background: var(--bar-on-soft); border-color: var(--bar-on-soft); color: var(--bar); }
.ask .btn.quiet { background: transparent; color: var(--bar-on); border-color: var(--bar-on-soft); }
.ask .btn.quiet:hover { background: var(--bar-rule); color: var(--bar-on); }
.ask .actions { margin-block-start: 0; }
.ask a:not(.btn) { color: var(--bar-on); }
@media (min-width: 62rem) { .ask .wrap { grid-template-columns: minmax(0, 1.4fr) auto; } }

footer { padding-block: 2.5rem 3rem; font-size: 0.9375rem; color: var(--ink-soft); }
footer .wrap { display: grid; gap: 0.75rem 2rem; }
footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; font-weight: 700; }
@media (min-width: 50rem) { footer .wrap { grid-template-columns: 1fr auto; align-items: start; } }

noscript .rule-box { margin-block-start: 1rem; }

@media (forced-colors: active) {
  .btn, .tag, .fact, .calc { border: 1px solid CanvasText; }
}
@media print {
  .bar-end, .hero-art, .ask { display: none; }
  body { background: #fff; color: #000; }
}
