/* ==========================================================================
   صدى كليبز – Sada Clipz · design tokens and base styles.
   Every colour, type size, space, radius, shadow and timing used by the theme is defined here, once.
   ========================================================================== */

@font-face {
  font-family: "Aref Ruqaa";
  src: url("../fonts/aref-ruqaa-arabic-400.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Amiri Quran";
  src: url("../fonts/amiri-quran-arabic-400.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}

:root {
  /* Official palette */
  --color-primary: #0E2A47;
  --color-accent: #C9A227;
  --color-bg: #F6F8FB;
  --color-text: #182530;

  /* Derived from the palette */
  --color-surface: #FFFFFF;
  --color-primary-deep: #0A1F35;              /* darker end of navy gradients */
  --color-primary-soft: #18406A;              /* lighter end of navy gradients */
  --color-accent-hover: #D6B23E;              /* gold button hover */
  --color-accent-soft: #E3C76A;               /* gold on navy: highlights and small text */
  --color-accent-ink: #86670F;                /* gold text on light backgrounds (AA) */
  --color-text-muted: #4A5A6A;
  --color-on-dark: #FFFFFF;
  --color-on-dark-muted: rgba(255, 255, 255, .8);
  --color-border: rgba(14, 42, 71, .09);
  --color-border-strong: rgba(14, 42, 71, .16);
  --color-border-dark: rgba(255, 255, 255, .14);
  --color-accent-line: rgba(201, 162, 39, .45);
  --color-accent-tint: rgba(201, 162, 39, .1);
  --color-primary-tint: rgba(14, 42, 71, .045);
  --color-band: #ECF1F7;                      /* cool tint at the top of alternate sections */
  --color-cream: #FFFDF6;                     /* warm card surface (gold-accented blocks) */
  --color-cream-deep: #FFF7E0;
  --gradient-navy: linear-gradient(140deg, var(--color-primary-soft) 0%, var(--color-primary) 46%, var(--color-primary-deep) 100%);
  --gradient-cream: linear-gradient(150deg, var(--color-cream) 0%, var(--color-cream-deep) 100%);
  --gradient-title: linear-gradient(180deg, #FFFFFF 0%, #FFFFFF 50%, #F3E6BC 100%); /* white into a hint of gold */
  --gradient-gold-rule: linear-gradient(90deg, transparent, var(--color-accent) 50%, transparent);
  --texture-line: rgba(227, 199, 106, .06);    /* faint diagonal lines on navy areas */

  /* Typography */
  --font-heading: "Cairo", "IBM Plex Sans Arabic", "Segoe UI", Tahoma, sans-serif;
  --font-body: "Readex Pro", "Cairo", "Segoe UI", Tahoma, sans-serif;
  --font-quran: "Amiri Quran", "Amiri", "Traditional Arabic", serif;
  --font-logo: "Aref Ruqaa", "Amiri", serif;
  --fs-xs: .8125rem;
  --fs-sm: .9rem;
  --fs-base: 1rem;
  --fs-md: 1.0625rem;
  --fs-lg: clamp(1.1rem, 1.04rem + .3vw, 1.25rem);
  --fs-xl: clamp(1.2rem, 1.08rem + .55vw, 1.45rem);
  --fs-h2: clamp(1.55rem, 1.2rem + 1.45vw, 2.35rem);
  --fs-h1: clamp(1.95rem, 1.3rem + 2.7vw, 3.35rem);
  --fs-hero: clamp(2.15rem, 1.2rem + 3.9vw, 4.3rem);
  --lh-body: 1.85;
  --lh-heading: 1.45;
  --lh-tight: 1.2;

  /* Space */
  --space-1: .25rem;
  --space-2: .5rem;
  --space-3: .75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 3rem;
  --space-8: 4rem;
  --section-y: clamp(3.5rem, 2.3rem + 4.6vw, 6.5rem);
  --gutter: clamp(16px, 4vw, 32px);
  --container: 1200px;
  --container-narrow: 840px;
  --gap: clamp(16px, .9rem + .9vw, 28px);

  /* Shape and depth */
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 22px;
  --radius-xl: 32px;
  --radius-pill: 999px;
  --shadow-sm: 0 1px 2px rgba(14, 42, 71, .05), 0 6px 18px -8px rgba(14, 42, 71, .12);
  --shadow-md: 0 18px 40px -18px rgba(14, 42, 71, .28);
  --shadow-lift: 0 2px 6px rgba(14, 42, 71, .08), 0 16px 30px -10px rgba(14, 42, 71, .18), 0 30px 54px -18px rgba(201, 162, 39, .32);
  --shadow-gold: 0 12px 26px -12px rgba(201, 162, 39, .75);

  /* Motion */
  --ease-out: cubic-bezier(.22, 1, .36, 1);
  --dur-fast: 180ms;
  --dur: 320ms;
  --dur-slow: 600ms;

  /* Header and layers */
  --header-h: 78px;
  --z-header: 100;
  --focus-ring: var(--color-primary);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
body {
  margin: 0;
  min-height: 100vh;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: var(--fs-base);
  font-weight: 400;
  line-height: var(--lh-body);
  overflow-x: clip; /* decorative layers never cause sideways scrolling; clip keeps position: sticky working */
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
  margin: 0 0 var(--space-4);
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: var(--lh-heading);
  color: var(--color-primary);
  text-wrap: balance;
}
h1 { font-size: var(--fs-h1); font-weight: 800; }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-xl); }
p { margin: 0 0 var(--space-4); text-wrap: pretty; }
p:last-child { margin-bottom: 0; }
strong, b { font-weight: 600; }
small { font-size: var(--fs-sm); }

a { color: var(--color-primary); text-decoration: none; text-underline-offset: .3em; }
a:hover { text-decoration: underline; }

img, svg, video, iframe { max-width: 100%; }
img { display: block; height: auto; }
svg.icon { width: 24px; height: 24px; flex-shrink: 0; }

button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a, button, input, textarea, select, summary { touch-action: manipulation; }
/* No blue flash on touch; keyboard focus rings (:focus-visible below) are untouched. */
a, button, [role="tab"], [role="button"], .card, .chip, summary, input, select, textarea { -webkit-tap-highlight-color: transparent; }
input, textarea, select {
  min-width: 0;
  padding: .7rem 1rem;
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-sm);
  background: var(--color-surface);
  color: var(--color-text);
}

:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 3px;
  border-radius: 6px;
}
.on-dark,
.site-header,
.site-footer,
.hero,
.page-hero,
.cta-band,
.numbers-section,
.callout-dark,
.partner-card { --focus-ring: var(--color-accent-soft); }

::selection { background: var(--color-accent-soft); color: var(--color-primary); }

/* Utilities */
.container { width: min(100% - 2 * var(--gutter), var(--container)); margin-inline: auto; }
.container.narrow { width: min(100% - 2 * var(--gutter), var(--container-narrow)); }
.screen-reader-text,
.skip-link:not(:focus) {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
.skip-link:focus {
  position: fixed;
  inset-block-start: 12px;
  inset-inline-start: 12px;
  z-index: 2000;
  padding: .75rem 1.25rem;
  border-radius: var(--radius-sm);
  background: var(--color-surface);
  color: var(--color-primary);
  font-weight: 600;
  box-shadow: var(--shadow-md);
}
.center-actions { display: flex; justify-content: center; margin-block: var(--space-6) 0; }
.quran { font-family: var(--font-quran); font-weight: 400; }

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

/* Phones (up to 767px): smaller type and lighter headings. Tablet and desktop keep the sizes above. */
@media (max-width: 767px) {
  :root {
    --fs-xs: .72rem;
    --fs-sm: .8rem;
    --fs-base: .85rem;
    --fs-md: .875rem;
    --fs-lg: .9rem;
    --fs-xl: .95rem;
    --fs-h2: 1.15rem;
    --fs-h1: 1.4rem;
    --fs-hero: 1.6rem;
  }
  h1, h2, h3, h4 { font-weight: 600; }
}
