/* Sedira landing: shared base. Small on purpose; directions add their own look on top. */

/* Qur'an font. The KFGQPC EULA forbids modifying the font, so the ORIGINAL TTF is the default.
   lead/Sami accept the licence question. font-display:block so the ayah never flashes in a
   fallback font (marks would render wrong). */
@font-face {
  font-family: "UthmanicHafs";
  src: url("../fonts/UthmanicHafs1Ver18.ttf") format("truetype");
  font-display: block;
}

:root {
  --ink: #2b2620;
  --paper: #fbf8f2;
  --accent: #a8823a;
  --focus: #1f6feb;
  --font-ar: system-ui, "Geeza Pro", "Noto Naskh Arabic", "Segoe UI", sans-serif;
  --font-en: system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: light;
}

/* reset */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  min-height: 100svh;
  line-height: 1.5;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-en);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip; /* decorative art may bleed; never a horizontal scroll */
}
html[lang="ar"] body { font-family: var(--font-ar); }
img, picture, svg, video, canvas { display: block; max-width: 100%; }
svg { overflow: visible; }
input, button, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
p, h1, h2, h3, h4 { overflow-wrap: break-word; }
h1, h2, h3, h4 { text-wrap: balance; font-weight: inherit; }
p { text-wrap: pretty; }
a { color: inherit; }

/* Lenis (inlined from vendor/lenis.css to save a request) */
html.lenis, html.lenis body { height: auto; }
.lenis:not(.lenis-autoToggle).lenis-stopped { overflow: clip; }
.lenis [data-lenis-prevent] { overscroll-behavior: contain; }
.lenis.lenis-smooth iframe { pointer-events: none; }

/* Qur'anic text: always this font, always RTL, generous line height for the marks */
.quran {
  font-family: "UthmanicHafs", serif;
  direction: rtl;
  unicode-bidi: isolate;
  line-height: 2.1;
  font-size: 1.6em;
  font-weight: normal;
  font-style: normal;
  letter-spacing: 0;           /* never letter-space Arabic */
  word-spacing: 0.08em;
  font-feature-settings: normal;
}
.quran .ayah-line { display: block; }
.ayah { margin: 0; }
.ayah-meaning { font-style: italic; margin-top: 0.4em; }
.ayah-ref { display: block; font-size: 0.85em; opacity: 0.8; margin-top: 0.4em; }

/* accessibility */
.visually-hidden:not(:focus):not(:active) {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip-path: inset(50%);
  white-space: nowrap; border: 0;
}
.skip-link {
  position: fixed;
  inset-inline-start: 1rem; top: 1rem;
  z-index: 1000;
  padding: 0.5em 0.9em;
  background: var(--paper); color: var(--ink);
  border-radius: 0.4em;
  transform: translateY(-200%);
}
.skip-link:focus-visible { transform: none; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 2px; }
:focus:not(:focus-visible) { outline: none; }

/* language toggle: plain text link, no box */
.lang-toggle { text-decoration: none; border-bottom: 1px solid currentColor; padding-block: 0.15em; }
.lang-toggle:hover { opacity: 0.75; }

/* mock notify form states */
form[data-mock] .notify-done { display: none; }
form[data-mock].is-done .notify-done { display: block; }
form[data-mock].is-done .notify-fields { display: none; }

/* mirror decorative art in RTL. Put it on a WRAPPER: GSAP transforms on the same element win. */
[dir="rtl"] .flip-rtl { transform: scaleX(-1); }

/* reduced motion: everything visible and still */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
html.reduced *, html.reduced *::before, html.reduced *::after {
  animation-duration: 0.01ms !important;
  animation-iteration-count: 1 !important;
  transition-duration: 0.01ms !important;
  scroll-behavior: auto !important;
}
