/* Sanad · سند — umbrella landing page. One family (Readex Pro), logical properties only,
   so the same rules serve Arabic (rtl) and French (ltr). */

@font-face { font-family: "Readex Pro"; font-weight: 400; font-display: swap; src: url("../fonts/readex-pro-arabic-400-normal.woff2") format("woff2"); unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+FB50-FDFF, U+FE70-FEFF; }
@font-face { font-family: "Readex Pro"; font-weight: 500; font-display: swap; src: url("../fonts/readex-pro-arabic-500-normal.woff2") format("woff2"); unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+FB50-FDFF, U+FE70-FEFF; }
@font-face { font-family: "Readex Pro"; font-weight: 600; font-display: swap; src: url("../fonts/readex-pro-arabic-600-normal.woff2") format("woff2"); unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+FB50-FDFF, U+FE70-FEFF; }
@font-face { font-family: "Readex Pro"; font-weight: 400; font-display: swap; src: url("../fonts/readex-pro-latin-400-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122; }
@font-face { font-family: "Readex Pro"; font-weight: 500; font-display: swap; src: url("../fonts/readex-pro-latin-500-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122; }
@font-face { font-family: "Readex Pro"; font-weight: 600; font-display: swap; src: url("../fonts/readex-pro-latin-600-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122; }

:root {
  --stone: #EEF0EA;      /* limestone ground */
  --stone-2: #E1E6DE;    /* panels */
  --line: #C6CFC3;       /* rules, empty slots */
  --ink: #0B3B33;        /* Kufic ink: text and the mark */
  --ink-2: #4A6660;      /* secondary text */
  --gold: #B88A1E;       /* dinar gold: the dot, numerals */
  --gold-text: #8A6510;  /* gold dark enough for text on stone */
  --focus: #B88A1E;

  --s1: 0.25rem; --s2: 0.5rem; --s3: 1rem; --s4: 1.5rem; --s5: 2.5rem; --s6: 4rem; --s7: 6rem;
  --measure: 34em;
  --page: 70rem;
  --ease: cubic-bezier(.2, .8, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--stone);
  color: var(--ink);
  font-family: "Readex Pro", "Segoe UI", Tahoma, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.75;
}
:lang(fr) body, html[lang="fr"] body { line-height: 1.6; }
img, svg { display: block; max-inline-size: 100%; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 2px; }
.sr-only { position: absolute; inline-size: 1px; block-size: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; inset-inline-start: var(--s3); inset-block-start: -4rem; background: var(--ink); color: var(--stone); padding: var(--s2) var(--s3); z-index: 10; }
.skip:focus { inset-block-start: var(--s3); }

h1, h2, h3 { font-weight: 600; margin: 0; text-wrap: balance; }
h1 { font-size: clamp(2.1rem, 4.6vw, 3.6rem); line-height: 1.3; letter-spacing: -0.01em; max-inline-size: 15em; }
html[lang="fr"] h1 { line-height: 1.12; letter-spacing: -0.02em; }
h2 { font-size: clamp(1.6rem, 3vw, 2.3rem); line-height: 1.35; }
h3 { font-size: 1.2rem; line-height: 1.45; }
p { margin: 0; }

/* ── header ───────────────────────────────────────────────────────────── */
.top, main > section, .halal, .foot {
  inline-size: min(100% - 2 * var(--s4), var(--page));
  margin-inline: auto;
}
.top { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); padding-block: var(--s4); }
.brand { display: flex; align-items: center; gap: var(--s2); text-decoration: none; }
.brand img { inline-size: 3.2rem; block-size: auto; }
.brand-ar { font-size: 1.55rem; font-weight: 600; line-height: 1; }
.brand-lat { font-size: 1rem; font-weight: 500; color: var(--ink-2); }
.nav { display: flex; align-items: center; gap: var(--s4); }
.nav a { text-decoration: none; color: var(--ink-2); }
.nav a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 0.3em; }
.lang {
  font: inherit; font-size: 0.95rem; color: var(--ink);
  background: transparent; border: 1.5px solid var(--ink); border-radius: 999px;
  padding: 0.3em 1em; cursor: pointer;
}
.lang:hover { background: var(--ink); color: var(--stone); }

/* ── hero ─────────────────────────────────────────────────────────────── */
.hero {
  display: grid; grid-template-columns: 1.1fr 1fr; align-items: end; gap: var(--s5);
  padding-block: var(--s6) var(--s5);
}
.hero-text { display: grid; gap: var(--s4); justify-items: start; }
.lede { font-size: 1.2rem; color: var(--ink-2); max-inline-size: var(--measure); }
.btn {
  display: inline-block; text-decoration: none; font-weight: 600;
  background: var(--ink); color: var(--stone);
  padding: 0.8em 1.6em; border-radius: 0.4rem;
}
.btn:hover { background: #062A24; }

.hero-mark svg { inline-size: 100%; block-size: auto; }
.hero-mark .base, .hero-mark .up { fill: var(--ink); }
.hero-mark .dot, .panel-mark .dot { fill: var(--gold); }
/* The one orchestrated moment: the four products rise onto the baseline, then the dot. */
.hero-mark .up { transform-box: fill-box; transform-origin: 50% 100%; animation: rise 0.7s var(--ease) both; }
.hero-mark .up-1 { animation-delay: 0.25s; }
.hero-mark .up-2 { animation-delay: 0.4s; }
.hero-mark .up-3 { animation-delay: 0.55s; }
.hero-mark .up-4 { animation-delay: 0.7s; }
.hero-mark .dot { animation: drop 0.5s var(--ease) 1.15s both; }
@keyframes rise { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@keyframes drop { from { opacity: 0; transform: translateY(-1.2px); } to { opacity: 1; transform: none; } }

.halal {
  border-block: 1px solid var(--line);
  padding-block: var(--s3);
  color: var(--ink-2);
}

/* ── services picker ──────────────────────────────────────────────────── */
.services { padding-block: var(--s6) var(--s5); }
.section-lede { color: var(--ink-2); margin-block: var(--s2) var(--s5); max-inline-size: var(--measure); }
.picker { display: grid; grid-template-columns: minmax(0, 1fr) 20rem; gap: var(--s5); align-items: start; }
.products { border: 0; margin: 0; padding: 0; min-inline-size: 0; }

.product {
  position: relative;
  display: grid;
  grid-template-columns: 1.25rem minmax(0, 1fr);
  grid-template-areas: "tick name" "tick what" "tick meta";
  column-gap: var(--s4);
  row-gap: var(--s1);
  padding-block: var(--s4);
  border-block-start: 1px solid var(--line);
  cursor: pointer;
}
.product:last-child { border-block-end: 1px solid var(--line); }
.product input { position: absolute; opacity: 0; inline-size: 1px; block-size: 1px; }
/* The tick is an upright of the mark: hollow until chosen, then filled in the product's colour. */
.tick {
  grid-area: tick; align-self: stretch;
  inline-size: 1.25rem; min-block-size: 4.5rem;
  border: 2px solid var(--accent); border-radius: 2px;
  transition: background-color 0.2s var(--ease);
}
.product input:checked ~ .tick { background: var(--accent); }
.product:has(input:focus-visible) { outline: 3px solid var(--focus); outline-offset: 4px; }
.product:hover .p-ar { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 0.35em; }
.p-name { grid-area: name; display: flex; align-items: baseline; gap: var(--s3); }
.p-ar { font-size: 1.6rem; font-weight: 600; color: var(--accent); line-height: 1.3; }
.p-lat { font-size: 1rem; font-weight: 500; color: var(--ink-2); }
.p-what { grid-area: what; max-inline-size: var(--measure); }
.p-meta { grid-area: meta; display: flex; flex-wrap: wrap; gap: var(--s3); color: var(--ink-2); font-size: 0.95rem; }
.status { color: var(--gold-text); font-weight: 500; }

.account-panel {
  position: sticky; inset-block-start: var(--s4);
  background: var(--stone-2);
  border-radius: 0.6rem;
  padding: var(--s4);
  display: grid; gap: var(--s3);
}
.panel-mark { inline-size: 9rem; }
.panel-mark .base { fill: var(--ink); }
.panel-mark .slot { fill: transparent; stroke: var(--ink-2); stroke-width: 0.1; stroke-dasharray: 0.25 0.18; transition: fill 0.25s var(--ease); }
.panel-mark .slot.on { stroke: none; }
.panel-empty, .panel-note { color: var(--ink-2); font-size: 0.95rem; }
.panel-list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s2); }
.panel-list li { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); }
.panel-list .open {
  text-decoration: none; font-weight: 500; font-size: 0.95rem;
  border: 1.5px solid var(--ink); border-radius: 0.4rem; padding: 0.25em 0.8em; white-space: nowrap;
}
.panel-list .open:hover { background: var(--ink); color: var(--stone); }
.panel-list .soon { color: var(--gold-text); font-size: 0.9rem; }

/* ── one account (a real sequence, hence numbered) ────────────────────── */
.account { padding-block: var(--s6) var(--s7); }
.steps {
  list-style: none; counter-reset: step; margin: var(--s5) 0 0; padding: 0;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s5);
}
.steps li { counter-increment: step; display: grid; gap: var(--s2); align-content: start; }
.steps li::before {
  content: counter(step);
  font-size: 3rem; font-weight: 600; line-height: 1; color: var(--gold);
}
.steps p { color: var(--ink-2); max-inline-size: 26em; }

/* ── footer ───────────────────────────────────────────────────────────── */
.foot {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s4);
  border-block-start: 1px solid var(--line);
  padding-block: var(--s5);
}
.foot-links { display: flex; flex-wrap: wrap; gap: var(--s4); list-style: none; margin: 0; padding: 0; }
.foot-links a { text-decoration: none; color: var(--ink-2); }
.foot-links a:hover { color: var(--ink); text-decoration: underline; }
.foot-note { color: var(--ink-2); font-size: 0.95rem; inline-size: 100%; }

/* ── small screens ────────────────────────────────────────────────────── */
@media (max-width: 52rem) {
  .hero { grid-template-columns: 1fr; padding-block-start: var(--s4); }
  .hero-mark { order: -1; max-inline-size: 18rem; }
  .picker { grid-template-columns: 1fr; }
  .account-panel { position: static; }
  .steps { grid-template-columns: 1fr; gap: var(--s4); }
}
@media (max-width: 30rem) {
  .top, main > section, .halal, .foot { inline-size: min(100% - 2 * var(--s3), var(--page)); }
  .nav a { display: none; }
  .brand-lat { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
