/* ==================================================================
   base.css
   Design tokens (colors, fonts, spacing), reset, typography,
   and small global helpers. Change the whole site's look from :root.
   ================================================================== */

:root {
  /* Brand — deep green (matches the app's #1B5E20) with antique gold */
  --green-950: #08280c;
  --green-900: #0c3611;
  --green-800: #134a18;
  --green-700: #1b5e20;
  --green-600: #2e7d32;
  --green-100: #dcefdc;
  --green-50: #eef6ee;

  --gold-600: #b08a1e;
  --gold-500: #c9a227;
  --gold-400: #dbb94f;
  --gold-100: #f6edd0;

  --amber-700: #b45309;
  --amber-50: #fff8e1;

  /* Neutrals — warm parchment rather than pure white */
  --ink: #1b1f1b;
  --ink-soft: #424842;
  --muted: #6c736d;
  --line: #e5e0d1;
  --surface: #ffffff;
  --bg: #fbf9f3;
  --bg-tint: #f3efe2;

  /* Type */
  --font-body: 'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-display: 'Fraunces', Georgia, serif;
  --font-arabic: 'Amiri', 'Traditional Arabic', serif;

  /* Shape & depth */
  --radius-sm: 8px;
  --radius: 16px;
  --radius-lg: 24px;
  --radius-arch: 999px 999px var(--radius) var(--radius); /* mihrab arch */
  --shadow-sm: 0 1px 2px rgba(18, 38, 20, 0.06);
  --shadow: 0 10px 30px -12px rgba(18, 38, 20, 0.22);

  /* Layout */
  --container: 1180px;
  --gutter: 20px;
  --header-h: 76px;
}

/* ---------- Reset ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 12px);
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

main {
  flex: 1;
}

img,
iframe {
  display: block;
  max-width: 100%;
}

a {
  color: var(--green-700);
  text-decoration: none;
}

a:hover {
  color: var(--green-600);
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

h1,
h2,
h3 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.18;
  color: var(--ink);
}

p {
  margin: 0;
}

hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 24px 0;
}

[lang='ar'] {
  font-family: var(--font-arabic);
  direction: rtl;
  unicode-bidi: isolate;
}

[hidden] {
  display: none !important;
}

:focus-visible {
  outline: 3px solid var(--gold-400);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ---------- Helpers ---------- */
.icon {
  width: 1.15em;
  height: 1.15em;
  flex-shrink: 0;
  vertical-align: -0.2em;
}

/* Small uppercase label above section titles */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-600);
}

.eyebrow::before {
  content: '';
  width: 10px;
  height: 10px;
  background: currentColor;
  transform: rotate(45deg);
  opacity: 0.8;
}

/* Gold divider with an eight-point star in the middle */
.ornament {
  display: flex;
  align-items: center;
  gap: 40px;
  min-height: 22px;
  max-width: 260px;
  margin: 0 auto 28px;
  color: var(--gold-500);
  background: url('../images/star.svg') center / 22px no-repeat;
}

.ornament::before,
.ornament::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, currentColor, transparent);
}

/* Long text */
.prose p + p {
  margin-top: 1em;
}

.prose {
  color: var(--ink-soft);
  font-size: 1.05rem;
  line-height: 1.8;
}

/* Keyboard users: jump past the header */
.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  background: var(--gold-500);
  color: var(--green-950);
  font-weight: 700;
}

.skip-link:focus {
  top: 12px;
}

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

/* ==================================================================
   Languages
   i18n.js puts a class like .lang-ur on <html> and loads its font.
   ================================================================== */

/* Pashto & Dari — Vazirmatn reads cleanly on screens */
.lang-ps,
.lang-prs {
  --font-body: 'Vazirmatn', 'Manrope', system-ui, sans-serif;
  --font-display: 'Vazirmatn', 'Fraunces', serif;
}

/* Urdu — Nastaliq script needs extra line height */
.lang-ur {
  --font-body: 'Noto Nastaliq Urdu', 'Manrope', system-ui, sans-serif;
  --font-display: 'Noto Nastaliq Urdu', 'Fraunces', serif;
}

.lang-ur body {
  line-height: 2.1;
}

.lang-ur h1,
.lang-ur h2,
.lang-ur h3 {
  line-height: 1.9;
  font-weight: 700;
}

/* Bengali */
.lang-bn {
  --font-body: 'Hind Siliguri', 'Manrope', system-ui, sans-serif;
  --font-display: 'Hind Siliguri', 'Fraunces', serif;
}

/* Uppercase + wide letter-spacing breaks connected/abugida scripts */
.lang-ps .eyebrow,
.lang-prs .eyebrow,
.lang-ur .eyebrow,
.lang-bn .eyebrow {
  letter-spacing: 0;
  text-transform: none;
  font-size: 0.9rem;
}

/* Arrows and "→" icons point the other way in right-to-left languages */
[dir='rtl'] .icon--flip {
  display: inline-block;
  transform: scaleX(-1);
}
