/* Garinto base: reset, type roles, layout primitives. Logical properties only, so RTL needs no overrides. */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-block-start: calc(var(--header-h) + var(--sp-4)); }
body {
  margin: 0;
  background: var(--chaux);
  color: var(--encre);
  font-family: var(--font-text);
  font-size: var(--fs-body);
  line-height: var(--lh-text);
  font-kerning: normal;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}
/* any element carrying a language re-resolves its own font stack */
:where([lang]) { font-family: var(--font-text); }
:where(h1, h2, h3, h4, p, ul, ol, figure, blockquote, dl, dd) { margin: 0; }
:where(ul, ol)[role="list"], :where(ul, ol)[class] { list-style: none; padding: 0; }
img, svg, video, canvas, picture { display: block; max-inline-size: 100%; }
img { block-size: auto; }
input, button, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.22em; }
a:hover { text-decoration-thickness: 2px; }
::selection { background: var(--menthe); color: var(--encre); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }
[hidden] { display: none !important; }

.visually-hidden {
  position: absolute !important; inline-size: 1px; block-size: 1px; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap; margin: -1px; padding: 0; border: 0;
}
.skip-link {
  position: absolute; inset-inline-start: var(--sp-4); inset-block-start: -100px; z-index: 100;
  background: var(--encre); color: var(--chaux); padding: var(--sp-3) var(--sp-4); border-radius: var(--r-ui);
  text-decoration: none; font-weight: 500;
}
.skip-link:focus { inset-block-start: var(--sp-4); }

/* ---------- Type roles ---------- */
.h-display, .h-1, .h-2, .h-3 {
  font-family: var(--font-display);
  font-optical-sizing: auto;
  font-weight: var(--wght-head);
  text-wrap: balance;
  overflow-wrap: break-word;
}
.h-display { font-size: var(--fs-display); line-height: var(--lh-display); letter-spacing: var(--track-display); font-weight: var(--wght-display); }
.h-1 { font-size: var(--fs-1); line-height: var(--lh-head); letter-spacing: var(--track-display); }
.h-2 { font-size: var(--fs-2); line-height: 1.02; letter-spacing: var(--track-head); }
.h-3 { font-size: var(--fs-3); line-height: 1.12; letter-spacing: var(--track-sub); font-weight: 560; }
/* :lang() on the element itself, so a Latin sample inside an Arabic page keeps Latin settings */
.h-2:lang(ar) { line-height: 1.4; }
.h-3:lang(ar) { line-height: 1.5; font-weight: 600; }

.body-l { font-size: var(--fs-body-l); line-height: var(--lh-text); max-inline-size: 36em; text-wrap: pretty; }
.body { font-size: var(--fs-body); line-height: var(--lh-text); max-inline-size: 38em; text-wrap: pretty; }
.small { font-size: var(--fs-small); line-height: 1.5; }
.muted { color: var(--fg-soft); }

/* ---------- Layout ---------- */
.wrap {
  inline-size: 100%;
  max-inline-size: calc(var(--wrap) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.section {
  padding-block: var(--section-y);
  background: var(--bg);
  color: var(--fg);
}
/* Two brand surfaces with clear jobs: zellige (bands, footer, statements) and sol (below ground). */
.section--zellige, .section--sol {
  --fg: var(--chaux);
  --rule: var(--line-on-dark);
  --line-strong: color-mix(in oklab, var(--chaux) 40%, transparent);
  --accent: var(--chaux);
  color: var(--chaux);
}
.section--zellige { --bg: var(--zellige); --fg-soft: var(--chaux-soft); background: var(--zellige); }
.section--sol { --bg: var(--sol); --fg-soft: var(--chaux-soft-sol); background: var(--sol); }
:is(.section--zellige, .section--sol) ::selection { background: var(--chaux); color: var(--zellige); }
.stack > * + * { margin-block-start: var(--stack, var(--sp-5)); }

/* Reveal hook: Task 4 animates [data-reveal] (≤ 0.6 s, power2.out, 24 px rise).
   Nothing is hidden here, so content is complete without JS and under reduced motion. */
