/* amil.sa website. Palette A "Petrol and paper" (design/brand-studio/07-final/colour/palette-a.css).
   Carmine is kept for the kasra in the wordmark only, as the brand guide says. */
@font-face { font-family: "Plex Arabic"; font-weight: 400; font-display: swap; src: url("/assets/fonts/IBMPlexSansArabic-400.ttf") format("truetype"); }
@font-face { font-family: "Plex Arabic"; font-weight: 600; font-display: swap; src: url("/assets/fonts/IBMPlexSansArabic-600.ttf") format("truetype"); }
@font-face { font-family: "Readex"; font-weight: 600; font-display: swap; src: url("/assets/fonts/ReadexPro-600.ttf") format("truetype"); }

:root {
  --ground: #F4EDE1;
  --surface: #FFFBF4;
  --text: #14191B;
  --text-2: #4E6468;
  --border: #8A7F70;
  --divider: #D8CFBF;
  --brand: #0D3A42;
  --on-brand: #F4EDE1;
  --brand-soft: #E6EDEC;
  --note-bg: #FBEFD6;
  --note-text: #6B4400;
  --focus: #14191B;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --ground: #0B2328;
    --surface: #10303A;
    --text: #F4EDE1;
    --text-2: #9FB7BA;
    --border: #6F8A8E;
    --divider: #21424A;
    --brand: #F4EDE1;
    --on-brand: #0B2328;
    --brand-soft: #143A44;
    --note-bg: #3A2C10;
    --note-text: #F0B048;
    --focus: #F4EDE1;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--ground);
  color: var(--text);
  font-family: "Plex Arabic", "Segoe UI", Tahoma, sans-serif;
  font-size: 17px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}
:lang(en) body, body:lang(en) { line-height: 1.6; }
a { color: var(--brand); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 4px; }

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

.wrap { max-width: 1040px; margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 760px; }

/* Header */
.site-head { border-bottom: 1px solid var(--divider); }
.site-head .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 76px; }
.brand { display: inline-flex; align-items: center; line-height: 0; }
.brand img { height: 64px; width: auto; display: block; }
.nav { display: flex; flex-wrap: wrap; gap: 4px 18px; align-items: center; font-size: 16px; }
.nav a { text-decoration: none; color: var(--text); padding: 10px 2px; }
.nav a[aria-current="page"] { color: var(--brand); text-decoration: underline; text-decoration-thickness: 2px; }
.nav .lang { border: 1px solid var(--border); border-radius: 999px; padding: 4px 14px; }
.nav .lang:lang(en) { font-family: "Plex Arabic", sans-serif; }

/* Headings */
h1, h2, h3 { font-family: "Readex", "Plex Arabic", sans-serif; font-weight: 600; line-height: 1.3; margin: 0; }
h1 { font-size: clamp(32px, 6vw, 52px); letter-spacing: -0.01em; }
h2 { font-size: 24px; margin-top: 44px; margin-bottom: 10px; }
h3 { font-size: 19px; margin-top: 26px; margin-bottom: 6px; }
p { margin: 0 0 14px; }
ul, ol { margin: 0 0 16px; padding-inline-start: 24px; }
li { margin-bottom: 6px; }

/* Home */
.hero { padding: 64px 0 48px; display: grid; grid-template-columns: 1.25fr 1fr; gap: 40px; align-items: center; }
.hero .lead { font-size: 20px; color: var(--text-2); margin-top: 18px; max-width: 34em; }
.hero .mark { justify-self: center; }
.hero .mark img { width: min(320px, 70vw); height: auto; display: block; }
.legal-line { display: inline-block; margin-top: 22px; font-size: 15px; color: var(--text-2); border-inline-start: 3px solid var(--brand); padding-inline-start: 12px; }

.apps { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin: 8px 0 56px; }
.card { background: var(--surface); border: 1px solid var(--divider); border-radius: 18px; padding: 26px; display: flex; gap: 18px; align-items: flex-start; }
.card img { width: 72px; height: 72px; border-radius: 16px; flex: none; border: 1px solid var(--divider); }
.card h2 { margin: 0 0 4px; font-size: 22px; }
.card p { color: var(--text-2); margin-bottom: 12px; }
.soon { display: inline-block; font-size: 14px; background: var(--brand-soft); color: var(--text); border-radius: 999px; padding: 3px 12px; }

.steps { list-style: none; padding: 0; margin: 0 0 56px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; counter-reset: s; }
.steps li { counter-increment: s; border-top: 2px solid var(--brand); padding-top: 14px; margin: 0; }
.steps li::before { content: counter(s); font-family: "Readex", sans-serif; font-size: 28px; color: var(--brand); display: block; line-height: 1.2; margin-bottom: 6px; }
.steps strong { display: block; font-size: 18px; margin-bottom: 4px; }
.steps span { color: var(--text-2); }
.section-title { margin: 0 0 18px; font-size: 24px; }

/* Documents */
.doc { padding-top: 48px; padding-bottom: 64px; }
.doc .updated { color: var(--text-2); font-size: 15px; margin-top: 10px; }
.doc .intro { font-size: 18px; }
.doc h2 { padding-top: 6px; border-top: 1px solid var(--divider); padding-top: 28px; }
.doc .example { background: var(--surface); border: 1px solid var(--divider); border-radius: 12px; padding: 12px 16px; margin: 0 0 16px; }
.doc .flow { font-weight: 600; }
.prevails { background: var(--brand-soft); border-radius: 12px; padding: 12px 16px; font-size: 15px; }
.toc { background: var(--surface); border: 1px solid var(--divider); border-radius: 14px; padding: 18px 22px; margin: 26px 0 8px; columns: 2; column-gap: 32px; font-size: 15px; }
.toc ol { margin: 0; }
.toc li { break-inside: avoid; }

/* A gap the owner still has to fill (company name, CR number). Visible on purpose. */
.todo { background: var(--note-bg); color: var(--note-text); border-radius: 6px; padding: 1px 8px; font-size: 0.92em; white-space: normal; }

/* Support */
.contact { background: var(--surface); border: 1px solid var(--divider); border-radius: 18px; padding: 26px; margin: 28px 0 8px; }
.contact .email { font-family: "Readex", sans-serif; font-size: 24px; direction: ltr; unicode-bidi: isolate; display: inline-block; }
.alert { border-inline-start: 4px solid #B42318; background: var(--surface); padding: 14px 18px; border-radius: 0 12px 12px 0; margin: 22px 0; }
[dir="rtl"] .alert { border-radius: 12px 0 0 12px; }
details { border-bottom: 1px solid var(--divider); padding: 4px 0; }
summary { cursor: pointer; font-weight: 600; padding: 12px 0; list-style-position: outside; }
details p, details ul { margin-top: 0; }

/* Footer */
.site-foot { border-top: 1px solid var(--divider); padding: 32px 0 40px; font-size: 15px; color: var(--text-2); }
.site-foot .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 18px 32px; }
.site-foot nav { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.site-foot a { color: var(--text-2); }
.site-foot .legal { color: var(--text); }

.ltr { direction: ltr; unicode-bidi: isolate; }

@media (max-width: 760px) {
  body { font-size: 16px; }
  .site-head .wrap { flex-direction: column; align-items: flex-start; gap: 0; padding-top: 6px; padding-bottom: 4px; }
  .brand img { height: 56px; }
  .hero { grid-template-columns: 1fr; padding: 32px 0 32px; gap: 8px; }
  .hero .mark { display: none; }
  .apps, .steps { grid-template-columns: 1fr; }
  .toc { columns: 1; }
  .card { padding: 20px; }
}
