/* ───── Brand tokens ───── */
:root {
  color-scheme: dark;
  --bg-base: #0A1A33;
}

html, body {
  background: #0A1A33;
  color: #F5F5F0;
}

body {
  /* One unified backdrop for the whole page — sections stay transparent so
     this single ambient layer carries the navy-and-gold mood throughout. */
  background-image:
    radial-gradient(60% 50% at 50% 0%, rgba(20,48,95,0.55) 0%, transparent 70%),
    radial-gradient(50% 40% at 50% 100%, rgba(212,175,55,0.05) 0%, transparent 70%),
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1 0 0 0 0 0.85 0 0 0 0 0.4 0 0 0 0.04 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  background-size: auto, auto, 180px 180px;
  background-attachment: fixed;
  font-family: 'Readex Pro', 'Inter', system-ui, sans-serif;
}

html[lang="en"] body { font-family: 'Inter', system-ui, sans-serif; }

/* Navy fabric texture — kept transparent so the body backdrop shows through */
.bg-navy-noise { background-color: transparent; }

/* Hero glow */
.hero-glow {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background: radial-gradient(60% 50% at 50% 40%, rgba(212,175,55,0.10) 0%, transparent 70%);
}

/* ───── Gold gradient text ─────
   Arabic letters with descenders (ج/ح/ع/م/ي…) get clipped on background-clip:text
   if line-height is tight. We give them room with display:inline-block + relaxed
   line-height + a tiny bottom pad. */
.text-gold-gradient,
.text-gold-gradient-strong {
  display: inline-block;
  line-height: 1.4;
  padding-bottom: 0.12em;
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}
.text-gold-gradient {
  background-image: linear-gradient(135deg, #BB860B 0%, #D4AF37 45%, #F6D365 100%);
}
.text-gold-gradient-strong {
  background-image: linear-gradient(135deg, #8C6F12 0%, #D4AF37 30%, #F6D365 60%, #FFE9A0 100%);
}

/* ───── Buttons ───── */
.btn-gold,
.btn-gold-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 9999px;
  padding: 0.65rem 1.25rem;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  transition: all 0.3s ease;
  white-space: nowrap;
}
@media (min-width: 640px) {
  .btn-gold,
  .btn-gold-outline {
    padding: 0.75rem 1.75rem;
    font-size: 0.875rem;
  }
}
.btn-gold {
  background: linear-gradient(135deg, #BB860B 0%, #D4AF37 50%, #F6D365 100%);
  color: #0A1A33;
  box-shadow: 0 0 30px rgba(212,175,55,0.3);
}
.btn-gold:hover {
  box-shadow: 0 0 60px rgba(212,175,55,0.5);
  transform: translateY(-2px);
}
.btn-gold-outline {
  border: 1px solid rgba(212,175,55,0.6);
  color: #F4D580;
}
.btn-gold-outline:hover {
  border-color: #F4D580;
  color: #F6D365;
  background: rgba(212,175,55,0.05);
}

/* ───── Sparkles ───── */
.sparkle-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}
.sparkle {
  position: absolute;
  border-radius: 9999px;
  background: rgba(212,175,55,0.95);
  animation-name: sparkle;
  animation-iteration-count: infinite;
  animation-timing-function: ease-in-out;
}
.sparkle.bright {
  background: rgba(255,233,160,0.95);
}
@keyframes sparkle {
  0%, 100% { opacity: 0; transform: scale(0.4); }
  50%      { opacity: 1; transform: scale(1); }
}

/* ───── Gold wave ───── */
.gold-wave {
  position: absolute;
  inset-inline: 0;
  pointer-events: none;
  height: 6rem;
  animation: wave-shimmer 8s ease-in-out infinite;
}
@media (min-width: 640px) {
  .gold-wave { height: 10rem; }
}
.gold-wave-top    { top: 30%; opacity: 0.45; }
.gold-wave-bottom { bottom: 0; opacity: 0.40; }
.gold-wave-stats  { top: 12%; height: 5rem; opacity: 0.30; }
@media (min-width: 640px) {
  .gold-wave-stats { height: 8rem; }
}

/* On the smallest screens the SVG stretching distorts the wave; hide it. */
@media (max-width: 480px) {
  .gold-wave { display: none; }
}

@keyframes wave-shimmer {
  0%   { transform: translateX(-3%); opacity: 0.30; }
  50%  { opacity: 0.85; }
  100% { transform: translateX(3%); opacity: 0.30; }
}

/* ───── Service cards ───── */
.service-card {
  position: relative;
  border-radius: 1rem;
  border: 1px solid rgba(212,175,55,0.18);
  background: rgba(10,26,51,0.6);
  padding: 1.25rem;
  transition: all 0.3s ease;
}
@media (min-width: 640px) {
  .service-card { padding: 1.75rem; }
}
.service-card:hover {
  transform: translateY(-4px);
  border-color: rgba(212,175,55,0.45);
  box-shadow: 0 0 30px rgba(212,175,55,0.18);
}
.service-icon {
  font-size: 1.5rem;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 0.75rem;
  background: rgba(212,175,55,0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
}
.service-title {
  color: #F4D580;
  font-weight: 600;
  font-size: 1.125rem;
  margin-bottom: 0.5rem;
}
.service-body {
  color: rgba(245,245,240,0.75);
  font-size: 0.875rem;
  line-height: 1.7;
}

/* ───── Initiative cards ───── */
.initiative-card {
  display: block;
  position: relative;
  border-radius: 1rem;
  border: 1px solid rgba(212,175,55,0.18);
  background: rgba(14,33,66,0.5);
  padding: 1.25rem;
  transition: all 0.3s ease;
}
@media (min-width: 640px) {
  .initiative-card { padding: 1.5rem; }
}
.initiative-card:hover {
  border-color: rgba(212,175,55,0.45);
  transform: translateY(-3px);
  box-shadow: 0 0 30px rgba(212,175,55,0.15);
}
.initiative-icon {
  font-size: 1.5rem;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 0.85rem;
  background: rgba(212,175,55,0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.85rem;
}
.initiative-title {
  color: #F4D580;
  font-weight: 600;
  font-size: 1rem;
  margin-bottom: 0.4rem;
}
.initiative-body {
  color: rgba(245,245,240,0.7);
  font-size: 0.8125rem;
  line-height: 1.6;
}

/* ───── Family cards ───── */
.family-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.85rem;
  border-radius: 1rem;
  border: 1px solid rgba(212,175,55,0.18);
  background: linear-gradient(135deg, rgba(10,26,51,0.7), rgba(14,33,66,0.7));
  padding: 1.25rem;
  transition: all 0.3s ease;
}
@media (min-width: 640px) {
  .family-card { padding: 1.5rem; gap: 1rem; }
}
.family-card:hover {
  border-color: rgba(212,175,55,0.45);
  transform: translateY(-3px);
  box-shadow: 0 0 30px rgba(212,175,55,0.15);
}
.family-card-mark {
  flex-shrink: 0;
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.85rem;
  text-align: center;
  line-height: 1.1;
}
@media (min-width: 640px) {
  .family-card-mark {
    width: 4.5rem;
    height: 4.5rem;
    border-radius: 1rem;
    font-size: 1rem;
  }
}
.family-mark-jazwa {
  background: linear-gradient(135deg, #F26522, #B22222);
  color: white;
}
.family-mark-thex {
  background: linear-gradient(135deg, #960018, #6f0012);
  color: #FFE9A0;
  font-size: 1.85rem;
  line-height: 1;
}
@media (min-width: 640px) {
  .family-mark-thex { font-size: 2.4rem; }
}
.family-card-name {
  font-family: 'Amiri', 'Readex Pro', serif;
  font-weight: 700;
  font-size: 1.4rem;
  color: #F5F5F0;
  margin-bottom: 0.35rem;
  line-height: 1.5;
}
.family-card-desc {
  font-size: 0.875rem;
  color: rgba(245,245,240,0.7);
  line-height: 1.6;
  margin-bottom: 0.5rem;
}
.family-card-link {
  font-size: 0.75rem;
  color: #F4D580;
  font-weight: 600;
}
.family-card:hover .family-card-link { color: #FFE9A0; }

/* ───── Stats ───── */
.stat-num {
  font-family: 'Cormorant Garamond', 'Readex Pro', serif;
  font-size: 2.25rem;
  font-weight: 700;
  background: linear-gradient(135deg, #8C6F12 0%, #D4AF37 30%, #F6D365 60%, #FFE9A0 100%);
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  line-height: 1;
}
@media (min-width: 640px) {
  .stat-num { font-size: 3rem; }
}
@media (min-width: 768px) {
  .stat-num { font-size: 3.75rem; }
}
html[lang="ar"] .stat-num { font-family: 'Readex Pro', serif; }
.stat-label {
  margin-top: 0.5rem;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(245,245,240,0.6);
}

/* ───── Reduced motion ───── */
@media (prefers-reduced-motion: reduce) {
  .sparkle, .gold-wave, .animate-pulse {
    animation: none !important;
  }
}
