/* Ivariqo static site: one stylesheet for the Arabic (RTL) and English pages.
   Built from the app's own system (UI_SYSTEM.md, owner 2026-11-08): the evergreen
   palette (a2_palettes.dart), its fonts (app_typography.dart), its radii and spacing
   (app_tokens.dart), and the engineering band (band.dart). No colour of its own. */

@font-face { font-family: "Alexandria"; src: url("fonts/Alexandria-SemiBold.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Alexandria"; src: url("fonts/Alexandria-Bold.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "IBM Plex Sans Arabic"; src: url("fonts/IBMPlexSansArabic-Regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "IBM Plex Sans Arabic"; src: url("fonts/IBMPlexSansArabic-SemiBold.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "IBM Plex Sans"; src: url("fonts/IBMPlexSans-Regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "IBM Plex Sans"; src: url("fonts/IBMPlexSans-SemiBold.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url("fonts/IBMPlexMono-SemiBold.woff2") format("woff2"); font-weight: 600; font-display: swap; }
/* The nut and the name as the app writes them, always left to right. */
@font-face { font-family: "Mr Dafoe"; src: url("MrDafoe-Regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }

/* Evergreen light (a2_palettes.dart evergreenLight). */
:root {
  --bg: #f3f4ef;
  --surface: #ffffff;
  --surface2: #f7f8f4;
  --text: #15201d;
  --muted: #4e5a56;
  --border: #e1e4dc;
  --border-strong: #d3d8ce;
  --primary: #0b4d45;
  --on-primary: #ffffff;
  --link: #0b4d45;
  --band: #0b4d45;
  --on-band: #ffffff;
  --band-muted: #a9cfc7;
  --band-line: rgba(255, 255, 255, 0.06);
  --band-tile: rgba(255, 255, 255, 0.08);
  --band-tile-line: rgba(255, 255, 255, 0.14);
  --accent: #e8a33d;
  --on-accent: #15201d;
  --chip-ok-bg: #dcefe8;
  --chip-ok-fg: #0b4d45;
  --warn-bg: #fde7d6;
  --warn-fg: #9a3412;
  --plate-bg: #0b3b35;
  --plate-fg: #d6ede8;

  /* app_tokens.dart */
  --radius-card: 18px;
  --radius-tile: 16px;
  --radius-inset: 14px;
  --radius-control: 12px;
  --radius-chip: 8px;
  --control-height: 42px;
  --gutter: 16px;

  --font-body: "IBM Plex Sans", "IBM Plex Sans Arabic", system-ui, sans-serif;
  --font-display: "Alexandria", var(--font-body);
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;
  --line-height: 1.5;
}
html[dir="rtl"] {
  --font-body: "IBM Plex Sans Arabic", "IBM Plex Sans", system-ui, sans-serif;
  /* The app's Arabic line-height offset. */
  --line-height: 1.65;
}
/* Evergreen dark (a2_palettes.dart evergreenDark). */
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1614;
    --surface: #17211e;
    --surface2: #1e2a27;
    --text: #e8efec;
    --muted: #a6b5af;
    --border: #2a3834;
    --border-strong: #3a4a45;
    --primary: #5fc4af;
    --on-primary: #062420;
    --link: #7fd3c1;
    --band: #0d3a34;
    --on-band: #f1f7f5;
    --band-muted: #9fcfc4;
    --band-line: rgba(241, 247, 245, 0.06);
    --band-tile: rgba(241, 247, 245, 0.08);
    --band-tile-line: rgba(241, 247, 245, 0.14);
    --accent: #f0b254;
    --on-accent: #1a1304;
    --chip-ok-bg: #18403a;
    --chip-ok-fg: #8fe0ce;
    --warn-bg: #3d2416;
    --warn-fg: #f6b88c;
    --plate-bg: #24504a;
    --plate-fg: #dff3ee;
  }
}
@media (min-width: 600px) { :root { --gutter: 24px; } }
@media (min-width: 1025px) { :root { --gutter: 32px; } }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 15px/var(--line-height) var(--font-body);
}
a { color: var(--link); }
h1, h2, h3 { font-family: var(--font-display); color: var(--text); }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 var(--gutter); }

/* The app's top bar: a surface with one line under it. */
header.top { background: var(--surface); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 10; }
header.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 64px; flex-wrap: wrap; }
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  direction: ltr;
  font-family: "Mr Dafoe", sans-serif;
  font-weight: 400;
  font-size: 1.75rem;
  color: var(--text);
  text-decoration: none;
}
.brand::before {
  content: "";
  width: 2rem;
  height: 2rem;
  flex: none;
  background: url("ivariqo-mark.svg") center / contain no-repeat;
}
nav.links { display: flex; flex-wrap: wrap; gap: 4px; font-size: 14px; font-weight: 600; }
nav.links a { text-decoration: none; color: var(--muted); padding: 8px 12px; border-radius: var(--radius-control); }
nav.links a:hover, nav.links a:focus-visible { color: var(--text); background: var(--surface2); }
/* Phones: the bar is not pinned, and the links are one row that scrolls. */
@media (max-width: 599px) {
  header.top { position: static; }
  header.top .wrap { padding-bottom: 8px; }
  nav.links { flex-wrap: nowrap; overflow-x: auto; width: 100%; scrollbar-width: none; }
  nav.links a { white-space: nowrap; }
}

/* The evergreen band with the engineering grid (band.dart: 28 px, lines 6%). */
.band {
  background-color: var(--band);
  background-image:
    linear-gradient(var(--band-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--band-line) 1px, transparent 1px);
  background-size: 28px 28px;
  color: var(--on-band);
}
.band h1, .band h2, .band h3 { color: var(--on-band); }
.band a { color: var(--on-band); }
.hero { padding: 48px var(--gutter) 40px; }
/* displayXl: 36, bold, a little tight. */
.hero h1 { font-size: clamp(28px, 4.2vw, 36px); font-weight: 700; letter-spacing: -0.5px; line-height: 1.3; margin: 0 0 12px; max-width: 760px; }
.hero p { color: var(--band-muted); font-size: 16px; max-width: 640px; margin: 0 0 24px; }
.band.small .hero { padding: 36px var(--gutter) 28px; }

/* BandStat: a translucent tile on the band. */
.stats { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.stat {
  min-width: 140px;
  padding: 12px 16px;
  border-radius: var(--radius-inset);
  background: var(--band-tile);
  border: 1px solid var(--band-tile-line);
  display: flex;
  flex-direction: column-reverse;
}
.stat b { font-family: var(--font-display); font-size: 24px; font-weight: 700; line-height: 1.3; }
.stat span { color: var(--band-muted); font-size: 13px; }

/* AppButton: 42 high, radius 12, label weight. */
.buttons { display: flex; flex-wrap: wrap; gap: 10px; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--control-height);
  padding: 0 20px;
  border-radius: var(--radius-control);
  background: var(--primary);
  color: var(--on-primary);
  border: 1px solid transparent;
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
}
.btn:hover { filter: brightness(1.08); }
.btn:focus-visible, nav.links a:focus-visible, a.card.step:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.btn.ghost { background: var(--surface); color: var(--text); border-color: var(--border-strong); }
/* On the band: the accent leads, the second button is outlined in the band's own colour. */
.band .btn { background: var(--accent); color: var(--on-accent); }
.band .btn.ghost { background: transparent; color: var(--on-band); border-color: var(--band-tile-line); }
@media (max-width: 599px) { .btn { min-height: 48px; } }

/* Sections: start-page rhythm (gaps of 22). */
section { padding: 36px 0 8px; }
/* display: the page title size. */
section h2 { font-size: 26px; font-weight: 700; line-height: 1.3; margin: 0 0 8px; }
.intro { color: var(--muted); margin: 0 0 20px; max-width: 680px; }
.grid { display: grid; gap: 22px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); margin-top: 16px; }
.grid.two { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }

/* AppCard / AppSectionCard: surface, one line, radius 18. */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 22px;
}
/* titleS */
.card h3 { margin: 0 0 6px; font-size: 16px; font-weight: 600; line-height: 1.4; }
.card p { margin: 0; color: var(--muted); font-size: 14px; }
a.card.step { text-decoration: none; color: inherit; display: block; transition: border-color 0.18s ease; }
a.card.step:hover { border-color: var(--primary); }
.step .more { display: inline-block; margin-top: 14px; color: var(--link); font-weight: 600; font-size: 14px; }

/* Plans. */
.plan h3 { font-size: 20px; margin-bottom: 4px; }
.plan .price { font-family: var(--font-display); font-size: 22px; font-weight: 700; margin: 4px 0 14px; }
.plan ul { margin: 0; padding-inline-start: 20px; color: var(--muted); font-size: 14px; }
.plan ul li { margin-bottom: 6px; }
.plan.featured { border: 2px solid var(--primary); padding: 21px; }

/* StatusChip: radius 8, the ok colours. */
.chip {
  display: inline-block;
  padding: 2px 8px;
  border-radius: var(--radius-chip);
  background: var(--chip-ok-bg);
  color: var(--chip-ok-fg);
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  vertical-align: middle;
}

.note { color: var(--muted); font-size: 13px; margin-top: 12px; }
.todo {
  display: inline-block;
  background: var(--warn-bg);
  color: var(--warn-fg);
  border-radius: var(--radius-chip);
  padding: 0 6px;
  font-size: 0.9em;
}

/* Reading pages: guides and legal text. */
.legal, .guide { max-width: 820px; }
.legal h1, .guide h1 { font-size: 28px; font-weight: 700; margin: 40px 0 12px; }
.guide h2, .legal h2 { margin-top: 32px; font-size: 20px; font-weight: 600; }
.crumb { margin: 0 0 8px; font-size: 13px; }
.numbered li { margin-bottom: 8px; }
.table-scroll { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius-tile); background: var(--surface); }
table { border-collapse: collapse; width: 100%; font-size: 14px; }
th, td { padding: 10px 14px; text-align: start; border-bottom: 1px solid var(--border); }
tbody tr:last-child td { border-bottom: 0; }
th { color: var(--muted); font-weight: 600; white-space: nowrap; background: var(--surface2); }
/* Codes, as the app shows them: mono, always left to right. */
td.ex, code { direction: ltr; unicode-bidi: plaintext; font-family: var(--font-mono); font-weight: 600; font-size: 12px; letter-spacing: 0.06em; color: var(--muted); }

footer {
  border-top: 1px solid var(--border);
  background: var(--surface);
  margin-top: 48px;
  padding: 24px 0;
  color: var(--muted);
  font-size: 13px;
}
footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; }
footer a { color: var(--muted); }
