/* base.css — reset, typography and layout primitives. Logical properties only (serves RTL + LTR). */
*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
}
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--fs-md);
  line-height: var(--lh-body);
  color: var(--ink);
  background: var(--mist);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img,
svg {
  display: block;
  max-width: 100%;
}
h1,
h2,
h3,
h4 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 600;
  line-height: var(--lh-tight);
  letter-spacing: -0.01em;
  text-wrap: balance;
}
:lang(ar) h1,
:lang(ar) h2,
:lang(ar) h3 {
  letter-spacing: 0;
  line-height: 1.3;
}
p {
  margin: 0;
  text-wrap: pretty;
}
ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}
a {
  color: inherit;
  text-decoration: none;
}
button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}
button {
  cursor: pointer;
}
:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}
::selection {
  background: var(--accent-wash);
  color: var(--ink);
}
.sr-only {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
.skip {
  position: absolute;
  inset-inline-start: var(--sp-4);
  top: -100px;
  z-index: 100;
  padding: var(--sp-2) var(--sp-4);
  background: var(--ink);
  color: var(--white);
  border-radius: var(--r-sm);
}
.skip:focus {
  top: var(--sp-4);
}

/* Layout */
.wrap {
  width: 100%;
  max-width: calc(var(--max) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.s {
  position: relative;
  padding-block: var(--sp-section);
}
.s[data-theme="dark"] {
  background: var(--ink);
  color: var(--white);
}
.s[data-theme="white"] {
  background: var(--white);
}
.s__head {
  max-width: 46rem;
  margin-block-end: clamp(2.5rem, 2rem + 2vw, 4rem);
}
.s__kicker {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  margin-block-end: var(--sp-4);
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--accent-deep);
}
.s__kicker::before {
  content: "";
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 3.5px solid currentColor;
}
.s[data-theme="dark"] .s__kicker {
  color: var(--accent);
}
.s__title {
  font-size: var(--fs-3xl);
}
.s__lead {
  margin-block-start: var(--sp-5);
  font-size: var(--fs-lg);
  color: var(--slate);
  max-width: var(--max-text);
}
.s[data-theme="dark"] .s__lead {
  color: var(--slate-light);
}

/* Reveal (wired by main.js; content is visible without JS) */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity var(--t-slow) var(--ease-out), transform var(--t-slow) var(--ease-out);
}
.js [data-reveal].is-in {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .js [data-reveal] {
    opacity: 1;
    transform: none;
  }
}
