* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  overflow-x: hidden;
  transition: background 0.3s, color 0.3s;
}

:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

/* ── NOISE TEXTURE OVERLAY ── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.04'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 1000;
  opacity: var(--noise-opacity);
}

/* ── NAV ── */
nav {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 100;
  padding: 14px clamp(16px, 4vw, 60px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: var(--nav-bg);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: clamp(8px, 1.5vw, 14px);
  text-decoration: none;
  flex-shrink: 0;
  min-width: 0;
}

.nav-logo-icon {
  width: clamp(32px, 4vw, 40px);
  height: clamp(32px, 4vw, 40px);
  background: linear-gradient(135deg, #1A3A2A 0%, #2D5A3D 100%);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: clamp(16px, 2.5vw, 20px);
  box-shadow: 0 2px 12px rgba(var(--shadow), 0.18);
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
}

.nav-logo-icon::after {
  content: '';
  position: absolute;
  top: -8px;
  right: -8px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(196, 151, 42, 0.25);
}

.nav-logo-text-wrap {
  display: flex;
  flex-direction: column;
  line-height: 1;
  gap: 3px;
  min-width: 0;
}

/* The wordmark is the brand: same Latin + Arabic lockup in every language. */
.nav-logo-text {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(15px, 2vw, 19px);
  font-weight: 600;
  color: var(--heading);
  line-height: 1 !important;
  white-space: nowrap;
}

.nav-logo-text .gold { color: var(--gold); }

.nav-logo-arabic {
  font-family: 'Amiri', serif;
  font-size: clamp(10px, 1.2vw, 12px);
  color: var(--gold);
  opacity: 0.9;
  line-height: 1.2 !important;
  white-space: nowrap;
}

.nav-links {
  display: flex;
  gap: clamp(16px, 2.5vw, 36px);
  list-style: none;
}

.nav-links a {
  text-decoration: none;
  color: var(--text);
  font-size: clamp(11px, 1.1vw, 13px);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  opacity: 0.75;
  transition: opacity 0.2s;
  white-space: nowrap;
}

.nav-links a:hover { opacity: 1; }

.nav-cta {
  display: flex;
  align-items: center;
  gap: clamp(6px, 1vw, 10px);
  flex-shrink: 0;
}

.lang-select {
  display: flex;
  align-items: center;
  gap: 4px;
  background: var(--tint);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding-inline-start: 10px;
  font-size: 13px;
}

.lang-select select {
  appearance: none;
  border: none;
  background: transparent;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  padding: 7px 26px 7px 4px;
  padding-inline: 4px 26px;
  cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-size: 4px 4px, 4px 4px;
  background-repeat: no-repeat;
  background-position: calc(100% - 14px) 50%, calc(100% - 10px) 50%;
}
[dir="rtl"] .lang-select select { background-position: 10px 50%, 14px 50%; }
.lang-select option { color: #2C2C2C; background: #FDFAF5; }
.lang-select option[lang="ur"] { font-family: 'Noto Nastaliq Urdu', serif; }
.lang-select option[lang="ar"] { font-family: 'Noto Naskh Arabic', 'Amiri', serif; }
.lang-select option[lang="hi"] { font-family: 'Noto Sans Devanagari', sans-serif; }
.lang-select option[lang="te"] { font-family: 'Noto Sans Telugu', sans-serif; }

/* Site-styled language list where the browser supports customizable <select> (Chrome/Edge 135+,
   incl. Android). Other browsers keep their native list, which works the same. */
@supports (appearance: base-select) {
  .lang-select select,
  .lang-select ::picker(select) { appearance: base-select; }
  .lang-select select {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    background-image: none;
    padding-block: 7px;
    padding-inline: 4px 12px;
  }
  .lang-select select::picker-icon { color: var(--muted); transition: rotate 0.2s; }
  .lang-select select:open::picker-icon { rotate: 180deg; }
  /* Anchor the list to the whole pill (globe + label) and match its width, so it sits exactly below. */
  .lang-select { anchor-name: --lang-pill; min-width: 136px; }
  html[lang="ur"] .lang-select select { line-height: 1.4; }   /* keep the pill as tall as the theme button */
  .lang-select ::picker(select) {
    position-anchor: --lang-pill;
    position-area: block-end;
    width: anchor-size(width);
    margin-block-start: 8px;
    padding: 6px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--bg-alt);
    color: var(--text);
    box-shadow: 0 16px 40px rgba(var(--shadow), 0.18);
  }
  .lang-select option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 9px 10px;
    border-radius: 9px;
    background: transparent;
    color: var(--text);
    font-size: 15px;
    line-height: 1.6;
    cursor: pointer;
    transition: background 0.15s;
  }
  .lang-select option:hover,
  .lang-select option:focus-visible { background: var(--tint); outline: none; }
  .lang-select option:checked { background: var(--gold-pale); color: var(--gold-text); font-weight: 600; }
  .lang-select option::checkmark { order: 1; color: var(--gold); }
}

.theme-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--tint);
  color: var(--text);
  cursor: pointer;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  transition: background 0.2s;
}
.theme-btn:hover { background: var(--border); }
.theme-btn svg { width: 17px; height: 17px; }
.theme-btn .i-sun { display: none; }
:root[data-theme="dark"] .theme-btn .i-sun { display: block; }
:root[data-theme="dark"] .theme-btn .i-moon { display: none; }

.btn-gold {
  padding: 9px clamp(12px, 1.8vw, 22px);
  background: var(--gold);
  color: #13201A;
  border: none;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.03em;
  cursor: pointer;
  border-radius: 4px;
  transition: all 0.2s;
  text-decoration: none;
  white-space: nowrap;
}

.btn-gold:hover {
  background: var(--gold-light);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(var(--shadow), 0.2);
}

/* ── HERO ── */
.hero {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  padding-top: 80px;
  position: relative;
  overflow: hidden;
}

.hero-bg-pattern {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 70% 20%, rgba(196, 151, 42, 0.07) 0%, transparent 50%),
    radial-gradient(circle at 10% 80%, rgba(45, 90, 61, 0.09) 0%, transparent 40%);
}

.hero-mosque-silhouette {
  --art: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 600' preserveAspectRatio='xMidYMax meet'%3E%3Cg fill='%231A3A2A'%3E%3C!-- Left minaret --%3E%3Crect x='80' y='80' width='28' height='380' rx='4'/%3E%3Crect x='72' y='180' width='44' height='14' rx='3'/%3E%3Crect x='72' y='250' width='44' height='14' rx='3'/%3E%3Crect x='72' y='320' width='44' height='14' rx='3'/%3E%3Cellipse cx='94' cy='80' rx='18' ry='8'/%3E%3Crect x='88' y='50' width='12' height='32' rx='3'/%3E%3Cellipse cx='94' cy='50' rx='8' ry='4'/%3E%3Cpolygon points='94,20 100,50 88,50'/%3E%3C!-- Right minaret (tall) --%3E%3Crect x='1332' y='40' width='28' height='420' rx='4'/%3E%3Crect x='1324' y='140' width='44' height='14' rx='3'/%3E%3Crect x='1324' y='220' width='44' height='14' rx='3'/%3E%3Crect x='1324' y='300' width='44' height='14' rx='3'/%3E%3Crect x='1324' y='380' width='44' height='14' rx='3'/%3E%3Cellipse cx='1346' cy='40' rx='18' ry='8'/%3E%3Crect x='1340' y='10' width='12' height='32' rx='3'/%3E%3Cellipse cx='1346' cy='10' rx='8' ry='4'/%3E%3Cpolygon points='1346,-20 1352,10 1340,10'/%3E%3C!-- Second left minaret --%3E%3Crect x='240' y='150' width='22' height='310' rx='3'/%3E%3Crect x='233' y='220' width='36' height='11' rx='2'/%3E%3Crect x='233' y='290' width='36' height='11' rx='2'/%3E%3Cellipse cx='251' cy='150' rx='14' ry='6'/%3E%3Crect x='246' y='125' width='10' height='27' rx='2'/%3E%3Cpolygon points='251,105 256,125 246,125'/%3E%3C!-- Second right minaret --%3E%3Crect x='1178' y='120' width='22' height='340' rx='3'/%3E%3Crect x='1171' y='190' width='36' height='11' rx='2'/%3E%3Crect x='1171' y='270' width='36' height='11' rx='2'/%3E%3Crect x='1171' y='350' width='36' height='11' rx='2'/%3E%3Cellipse cx='1189' cy='120' rx='14' ry='6'/%3E%3Crect x='1184' y='95' width='10' height='27' rx='2'/%3E%3Cpolygon points='1189,75 1194,95 1184,95'/%3E%3C!-- Main dome --%3E%3Cellipse cx='720' cy='200' rx='200' ry='190'/%3E%3Crect x='520' y='200' width='400' height='260' rx='0'/%3E%3C!-- Main dome detail ring --%3E%3Cellipse cx='720' cy='200' rx='160' ry='20' fill='%23F7F3EC' opacity='0.3'/%3E%3C!-- Left side dome --%3E%3Cellipse cx='460' cy='310' rx='110' ry='105'/%3E%3Crect x='350' y='310' width='220' height='150' rx='0'/%3E%3C!-- Right side dome --%3E%3Cellipse cx='980' cy='310' rx='110' ry='105'/%3E%3Crect x='870' y='310' width='220' height='150' rx='0'/%3E%3C!-- Small dome left --%3E%3Cellipse cx='290' cy='370' rx='65' ry='62'/%3E%3Crect x='225' y='370' width='130' height='90' rx='0'/%3E%3C!-- Small dome right --%3E%3Cellipse cx='1150' cy='370' rx='65' ry='62'/%3E%3Crect x='1085' y='370' width='130' height='90' rx='0'/%3E%3C!-- Main entrance arch --%3E%3Cellipse cx='720' cy='460' rx='55' ry='60' fill='%23F7F3EC' opacity='0.5'/%3E%3Crect x='665' y='460' width='110' height='100' fill='%23F7F3EC' opacity='0.5'/%3E%3C!-- Side arches --%3E%3Cellipse cx='580' cy='420' rx='35' ry='38' fill='%23F7F3EC' opacity='0.3'/%3E%3Crect x='545' y='420' width='70' height='40' fill='%23F7F3EC' opacity='0.3'/%3E%3Cellipse cx='860' cy='420' rx='35' ry='38' fill='%23F7F3EC' opacity='0.3'/%3E%3Crect x='825' y='420' width='70' height='40' fill='%23F7F3EC' opacity='0.3'/%3E%3C!-- Ground base --%3E%3Crect x='0' y='455' width='1440' height='145' rx='0'/%3E%3C!-- Decorative battlements on base --%3E%3Crect x='150' y='435' width='18' height='22' rx='2'/%3E%3Crect x='180' y='435' width='18' height='22' rx='2'/%3E%3Crect x='210' y='435' width='18' height='22' rx='2'/%3E%3Crect x='1212' y='435' width='18' height='22' rx='2'/%3E%3Crect x='1242' y='435' width='18' height='22' rx='2'/%3E%3Crect x='1272' y='435' width='18' height='22' rx='2'/%3E%3C/g%3E%3C/svg%3E");
  position: absolute;
  inset: auto 0 0 0;
  height: 75%;
  background: var(--motif);
  opacity: var(--motif-opacity);
  -webkit-mask: var(--art) bottom center / cover no-repeat;
  mask: var(--art) bottom center / cover no-repeat;
  pointer-events: none;
  z-index: 1;
}

.geometric-pattern {
  --art: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M30 0l30 30-30 30L0 30z'/%3E%3C/svg%3E");
  position: absolute;
  inset-inline-end: 0;
  top: 0;
  width: 50%;
  height: 100%;
  background: var(--motif);
  opacity: 0.04;
  -webkit-mask: var(--art) 0 0 / 60px 60px repeat;
  mask: var(--art) 0 0 / 60px 60px repeat;
}

.hero-left {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-block: 80px;
  padding-inline: 80px 60px;
  position: relative;
  z-index: 3;
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--gold-pale);
  border: 1px solid rgba(196, 151, 42, 0.35);
  padding: 9px 18px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--gold-text);
  width: fit-content;
  margin-bottom: 32px;
  animation: fadeInUp 0.8s ease both;
}

.hero-tag::before {
  content: '';
  width: 6px;
  height: 6px;
  background: var(--gold);
  border-radius: 50%;
  flex-shrink: 0;
}

.hero-title {
  font-family: var(--font-display);
  font-size: calc(clamp(52px, 5vw, 76px) * var(--title-scale));
  font-weight: 300;
  line-height: 1.05;
  color: var(--heading);
  margin-bottom: 16px;
  animation: fadeInUp 0.8s ease 0.1s both;
}
html:not([lang="en"]) .hero-title { font-weight: 400; }

.hero-title em { font-style: italic; color: var(--gold); }

.hero-verse-block {
  margin-bottom: 28px;
  animation: fadeInUp 0.8s ease 0.2s both;
  border-inline-start: 2px solid rgba(196, 151, 42, 0.35);
  padding-inline-start: 16px;
}

.hero-arabic {
  font-family: 'Amiri', serif;
  font-size: 26px;
  color: var(--sage);
  line-height: 1.7 !important;
  display: block;
  margin-bottom: 8px;
}

.hero-verse-translation {
  font-size: 13px;
  font-style: italic;
  color: var(--muted);
  line-height: 1.6;
  display: block;
  margin-bottom: 4px;
}
html:not([lang="en"]) .hero-verse-translation { font-style: normal; font-size: 14px; }
.hero-verse-translation:empty { display: none; }

.hero-verse-ref {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold-text);
  display: block;
}

.hero-desc {
  font-size: 16px;
  line-height: 1.75;
  color: var(--muted);
  max-width: 440px;
  margin-bottom: 44px;
  animation: fadeInUp 0.8s ease 0.3s both;
}

.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  animation: fadeInUp 0.8s ease 0.4s both;
}

.btn-solid, .btn-ghost {
  padding: 14px 32px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.03em;
  cursor: pointer;
  border-radius: 4px;
  transition: all 0.25s;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-solid {
  background: var(--brand);
  color: var(--on-brand);
  border: 1px solid var(--brand);
}

.btn-solid:hover {
  background: var(--brand-hover);
  border-color: var(--brand-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(var(--shadow), 0.25);
}

.btn-ghost {
  background: transparent;
  color: var(--heading);
  border: 1px solid var(--line);
}

.btn-ghost:hover { border-color: var(--heading); background: var(--tint); }
[dir="rtl"] .arrow { transform: scaleX(-1); }

.hero-stats {
  display: flex;
  gap: 40px;
  margin-top: 56px;
  padding-top: 36px;
  border-top: 1px solid var(--border);
  animation: fadeInUp 0.8s ease 0.5s both;
}

.hero-stat-num {
  font-family: 'Cormorant Garamond', serif;
  font-size: 36px;
  font-weight: 600;
  color: var(--heading);
  display: block;
  line-height: 1 !important;
}

.hero-stat-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  display: block;
  margin-top: 6px;
  max-width: 150px;
}

/* ── HERO RIGHT: MOCK MAP ── */
.hero-right {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  animation: fadeIn 1.2s ease 0.3s both;
}

.mock-map {
  width: 380px;
  height: 480px;
  background: var(--map-bg);
  border-radius: 20px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 40px 80px rgba(var(--shadow), 0.15), 0 0 0 1px var(--line);
}

.map-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--map-grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--map-grid) 1px, transparent 1px);
  background-size: 30px 30px;
}

.map-road { position: absolute; background: var(--map-road); }
.map-road.h { height: 8px; width: 100%; }
.map-road.h1 { top: 38%; }
.map-road.h2 { top: 65%; }
.map-road.v { width: 8px; height: 100%; }
.map-road.v1 { left: 30%; }
.map-road.v2 { left: 62%; }

.map-pin {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  animation: pinDrop 0.5s ease both;
}

.map-pins > :nth-child(1) { top: 8%; left: 10%; animation-delay: 0.6s; }
.map-pins > :nth-child(2) { top: 30%; left: 50%; animation-delay: 0.8s; }
.map-pins > :nth-child(3) { top: 38%; left: 12%; animation-delay: 1.0s; }
.map-pins > :nth-child(4) { top: 6%; left: 60%; animation-delay: 1.2s; }
.map-pins > :nth-child(5) { top: 22%; left: 72%; animation-delay: 1.4s; }

@keyframes pinDrop {
  from { opacity: 0; transform: translateY(-20px) scale(0.5); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.pin-icon {
  width: 32px;
  height: 32px;
  background: var(--pin);
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(var(--shadow), 0.3);
  transition: transform 0.2s;
}

.pin-icon:hover { transform: rotate(-45deg) scale(1.2); }
.pin-icon span { transform: rotate(45deg); font-size: 14px; }

.pin-label {
  margin-top: 6px;
  background: var(--surface);
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 500;
  color: var(--heading);
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.map-active-card {
  position: absolute;
  bottom: 20px;
  inset-inline: 20px;
  background: var(--surface);
  border-radius: 12px;
  padding: 14px 16px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  animation: slideUp 0.5s ease 1.6s both;
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.card-mosque-name {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 600;
  color: var(--heading);
  margin-bottom: 2px;
}

.card-sub { font-size: 11px; color: var(--muted); }

.card-prayer-row {
  display: flex;
  justify-content: space-between;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.prayer-time { text-align: center; }

.prayer-time-name {
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  display: block;
}

.prayer-time-val {
  font-size: 12px;
  font-weight: 600;
  color: var(--heading);
  display: block;
  margin-top: 2px;
  font-family: 'DM Sans', sans-serif;
}

.prayer-time.active .prayer-time-val { color: var(--gold); }

/* ── SECTIONS ── */
section { position: relative; }

.features {
  padding: 120px 80px;
  background: var(--bg-alt);
}

.section-header {
  text-align: center;
  margin-bottom: 72px;
}

.section-tag {
  display: inline-block;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold-text);
  font-weight: 600;
  margin-bottom: 16px;
}

.section-title {
  font-family: var(--font-display);
  font-size: calc(clamp(36px, 3.5vw, 52px) * max(var(--title-scale), 0.72));
  font-weight: 300;
  color: var(--heading);
  line-height: 1.1;
}
html:not([lang="en"]) .section-title { font-weight: 400; }

.section-title em { font-style: italic; color: var(--gold); }

.section-sub {
  font-size: 15px;
  color: var(--muted);
  max-width: 520px;
  margin: 16px auto 0;
  line-height: 1.7;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
}

.feature-card {
  background: var(--bg-alt);
  padding: 48px 40px;
  transition: background 0.3s;
  position: relative;
  overflow: hidden;
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  inset-inline: 0;
  height: 2px;
  background: var(--gold);
  transform: scaleX(0);
  transition: transform 0.3s;
  transform-origin: left;
}
[dir="rtl"] .feature-card::before { transform-origin: right; }

.feature-card:hover::before { transform: scaleX(1); }
.feature-card:hover { background: var(--bg); }

.feature-icon {
  width: 52px;
  height: 52px;
  background: var(--gold-pale);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  margin-bottom: 24px;
}

.feature-title {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  color: var(--heading);
  margin-bottom: 12px;
}

.feature-desc {
  font-size: 14px;
  line-height: 1.7;
  color: var(--muted);
}

.lang-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.lang-chips span {
  padding: 3px 10px;
  border-radius: 20px;
  background: var(--gold-pale);
  color: var(--gold-text);
  font-size: 12px;
  line-height: 1.8 !important;
}

/* ── HOW IT WORKS (dark band in both themes) ── */
.how-it-works {
  padding: 120px 80px;
  background: var(--band-bg);
  color: var(--band-text);
  overflow: hidden;
}

.how-it-works::before {
  content: '';
  position: absolute;
  top: -100px;
  inset-inline-end: -100px;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: rgba(196, 151, 42, 0.06);
}

.how-it-works .section-tag { color: var(--gold-light); }
.how-it-works .section-title { color: var(--band-text); }
.how-it-works .section-sub { color: var(--band-muted); }

.steps-container {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 60px;
  margin-top: 72px;
  position: relative;
}

.steps-container::before {
  content: '';
  position: absolute;
  top: 32px;
  inset-inline: 10%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(196, 151, 42, 0.4), rgba(196, 151, 42, 0.4), transparent);
}

.step { text-align: center; position: relative; }

.step-num {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 1px solid rgba(196, 151, 42, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 28px;
  font-family: 'Cormorant Garamond', serif;
  font-size: 22px;
  color: var(--gold-light);
  background: var(--band-bg);
  position: relative;
  z-index: 1;
}

.step-title {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  color: var(--band-text);
  margin-bottom: 12px;
}

.step-desc {
  font-size: 14px;
  line-height: 1.75;
  color: var(--band-muted);
}

/* ── ROLES ── */
.user-types {
  padding: 120px 80px;
  background: var(--bg);
}

.user-tabs {
  display: flex;
  gap: 2px;
  background: var(--gold-pale);
  border-radius: 8px;
  padding: 4px;
  width: fit-content;
  margin: 0 auto 60px;
}

.tab {
  padding: 10px 26px;
  border: none;
  background: transparent;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.03em;
  color: var(--muted);
  cursor: pointer;
  border-radius: 6px;
  transition: all 0.2s;
}

.tab[aria-selected="true"] {
  background: var(--brand);
  color: var(--on-brand);
}

.tab-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}
.tab-content[hidden] { display: none; }

.tab-title {
  font-family: var(--font-display);
  font-size: calc(42px * max(var(--title-scale), 0.75));
  font-weight: 300;
  color: var(--heading);
  line-height: 1.1;
  margin-bottom: 20px;
}
html:not([lang="en"]) .tab-title { font-weight: 400; }

.tab-title em { font-style: italic; color: var(--gold); }

.tab-desc {
  font-size: 15px;
  line-height: 1.8;
  color: var(--muted);
  margin-bottom: 32px;
}

.feature-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.feature-list li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 14px;
  color: var(--text);
  line-height: 1.5;
}

.feature-list li::before {
  content: '✦';
  color: var(--gold);
  font-size: 10px;
  flex-shrink: 0;
  margin-top: 4px;
}

.tab-visual {
  background: var(--bg-alt);
  border-radius: 16px;
  padding: 32px;
  border: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}

.tab-visual::before {
  content: '';
  position: absolute;
  top: 0;
  inset-inline-end: 0;
  width: 120px;
  height: 120px;
  background: radial-gradient(circle, rgba(196, 151, 42, 0.08) 0%, transparent 70%);
}

.mock-dashboard { display: flex; flex-direction: column; gap: 12px; position: relative; }

.mock-header {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
  color: var(--heading);
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 4px;
}

.mock-stat-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.mock-stat {
  background: var(--bg);
  border-radius: 8px;
  padding: 14px 12px;
  text-align: center;
}

.mock-stat-n {
  font-family: 'Cormorant Garamond', serif;
  font-size: 24px;
  font-weight: 600;
  color: var(--heading);
  display: block;
}

.mock-stat-l {
  font-size: 10px;
  color: var(--muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  display: block;
  margin-top: 2px;
}

.mock-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: var(--bg);
  border-radius: 8px;
  font-size: 12px;
  color: var(--text);
}

.mock-row-icon {
  width: 28px;
  height: 28px;
  background: var(--gold-pale);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
}

.mock-row-info { flex: 1; min-width: 0; }

.mock-row-title {
  font-weight: 600;
  color: var(--heading);
  font-size: 12px;
}

.mock-row-sub {
  font-size: 10px;
  color: var(--muted);
  margin-top: 1px;
}

.mock-badge {
  padding: 3px 9px;
  background: var(--gold-pale);
  color: var(--gold-text);
  border-radius: 20px;
  font-size: 10px;
  font-weight: 600;
  white-space: nowrap;
}

.skills-box { padding: 12px; background: var(--bg); border-radius: 8px; }
.skills-box .mock-stat-l { margin: 0 0 8px; }
.skills { display: flex; gap: 6px; flex-wrap: wrap; }

/* ── CTA ── */
.cta-section {
  padding: 120px 80px;
  background: var(--bg-alt);
  text-align: center;
  overflow: hidden;
}

.cta-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 50%, rgba(196, 151, 42, 0.06) 0%, transparent 40%),
    radial-gradient(circle at 80% 50%, rgba(45, 90, 61, 0.06) 0%, transparent 40%);
}

.cta-inner {
  position: relative;
  z-index: 1;
  max-width: 620px;
  margin: 0 auto;
}

.cta-title {
  font-family: var(--font-display);
  font-size: calc(clamp(40px, 4vw, 62px) * max(var(--title-scale), 0.72));
  font-weight: 300;
  color: var(--heading);
  line-height: 1.1;
  margin-bottom: 20px;
}
html:not([lang="en"]) .cta-title { font-weight: 400; }

.cta-title em { font-style: italic; color: var(--gold); }

.cta-desc {
  font-size: 15px;
  color: var(--muted);
  line-height: 1.7;
  margin-bottom: 40px;
}

.cta-buttons {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}
.cta-buttons > * { padding: 16px 40px; }

/* ── FOOTER ── */
footer {
  background: var(--band-bg);
  color: var(--band-muted);
  padding: 60px 80px 40px;
}

.footer-top {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 60px;
  padding-bottom: 48px;
  border-bottom: 1px solid rgba(247, 243, 236, 0.1);
  margin-bottom: 32px;
}

.footer-brand-name {
  font-family: 'Cormorant Garamond', serif;
  font-size: 22px;
  color: var(--band-text);
  font-weight: 600;
  margin-bottom: 6px;
}

.footer-brand-arabic {
  font-family: 'Amiri', serif;
  font-size: 16px;
  color: var(--gold-light);
  opacity: 0.75;
  margin-bottom: 12px;
}

.footer-brand-desc {
  font-size: 13px;
  line-height: 1.7;
  max-width: 280px;
}

.footer-col-title {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--band-text);
  font-weight: 600;
  margin-bottom: 20px;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-links a {
  text-decoration: none;
  color: var(--band-muted);
  font-size: 13px;
  transition: color 0.2s;
  cursor: pointer;
}

.footer-links a:hover { color: var(--band-text); }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  font-size: 12px;
}

.footer-arabic {
  font-family: 'Amiri', serif;
  font-size: 18px;
  color: var(--gold-light);
  opacity: 0.6;
}

/* ── DIALOGS (native <dialog>: focus trap, Esc to close, backdrop) ── */
dialog {
  margin: auto;
  border: none;
  padding: 0;
  width: calc(100% - 32px);
  max-height: 88vh;
  background: var(--bg-alt);
  color: var(--text);
  border-radius: 16px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35);
}
dialog::backdrop { background: rgba(14, 24, 19, 0.7); backdrop-filter: blur(6px); }
dialog[open] { animation: fadeInUp 0.3s ease both; }

.dlg-close {
  position: absolute;
  top: 16px;
  inset-inline-end: 16px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--bg-alt);
  color: var(--muted);
  font-size: 15px;
  cursor: pointer;
  display: grid;
  place-items: center;
  z-index: 2;
}
.dlg-close:hover { background: var(--bg); color: var(--text); }

/* Auth dialog */
#dlg-auth { max-width: 440px; }
.auth-body { padding: 60px 36px 36px; }

.modal-mode-tabs {
  display: flex;
  margin-bottom: 18px;
  border-radius: 10px;
  background: var(--bg);
  padding: 4px;
  border: 1px solid var(--border);
}

.modal-mode-tab {
  flex: 1;
  padding: 10px;
  border: none;
  background: transparent;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  cursor: pointer;
  border-radius: 7px;
  transition: all 0.2s;
}

.modal-mode-tab[aria-selected="true"] {
  background: var(--surface);
  color: var(--heading);
  font-weight: 600;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
}

#dlg-auth[data-mode="login"] .only-register,
#dlg-auth[data-mode="register"] .only-login { display: none; }

.modal-sub { font-size: 13px; color: var(--muted); margin-bottom: 20px; }

.modal-type-select {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 22px;
}

.modal-type-btn {
  padding: 12px 8px;
  border: 1px solid var(--border);
  background: transparent;
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--text);
  cursor: pointer;
  text-align: center;
  transition: all 0.2s;
}

.modal-type-btn[aria-pressed="true"] {
  background: var(--brand);
  color: var(--on-brand);
  border-color: var(--brand);
}

.modal-type-icon { font-size: 20px; display: block; margin-bottom: 4px; }

.form-group { margin-bottom: 16px; }

.form-label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text);
  margin-bottom: 6px;
}

.form-input {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--text);
  outline: none;
  transition: border-color 0.2s;
}
textarea.form-input { resize: vertical; }
/* Emails and phone numbers read left-to-right even on RTL pages. */
[dir="rtl"] .form-input:is([type="email"], [type="tel"], [type="password"]) { direction: ltr; text-align: right; }

.form-input:focus { border-color: var(--sage); box-shadow: 0 0 0 3px rgba(122, 158, 133, 0.15); }

.form-submit { width: 100%; margin-top: 8px; padding: 14px; }

.form-note {
  display: none;
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 8px;
  background: var(--gold-pale);
  color: var(--gold-text);
  font-size: 13px;
  line-height: 1.6;
}
.form-note.show { display: block; }

/* Info dialogs (about / contact / privacy) */
.info-modal { max-width: 640px; }

.info-modal-header {
  padding: 32px 40px 22px;
  padding-inline-end: 64px;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: var(--bg-alt);
  z-index: 1;
}

.info-kicker {
  display: block;
  font-size: 12px;
  color: var(--gold-text);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.info-modal-title {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 600;
  color: var(--heading);
  line-height: 1.2;
}

.info-modal-body { padding: 26px 40px 36px; }

.info-modal-body p {
  font-size: 14px;
  line-height: 1.85;
  margin-bottom: 16px;
}

.info-modal-body h4 {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 600;
  color: var(--heading);
  margin: 24px 0 10px;
}

.info-modal-body ul { padding-inline-start: 20px; margin-bottom: 16px; }
.info-modal-body li { font-size: 14px; line-height: 1.75; margin-bottom: 6px; }
.info-modal-body a { color: var(--gold-text); font-weight: 500; }
.info-modal-body .note { color: var(--muted); font-size: 13px; }

.about-date-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--gold-pale);
  border: 1px solid rgba(196, 151, 42, 0.3);
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  color: var(--gold-text);
  margin-bottom: 24px;
}

.about-verse {
  font-family: 'Amiri', serif !important;
  font-size: 20px !important;
  color: var(--sage);
  text-align: center;
  margin-top: 24px;
}

.about-verse-tr { text-align: center; color: var(--muted); font-size: 13px !important; }
html[lang="en"] .about-verse-tr { font-style: italic; }

.contact-form { display: flex; flex-direction: column; gap: 14px; margin-top: 8px; }
.contact-form .form-group { margin-bottom: 0; }
.contact-direct { text-align: center; font-size: 12px !important; color: var(--muted); margin-top: 8px; }

.contact-success {
  text-align: center;
  padding: 24px;
  background: var(--tint);
  border-radius: 8px;
  border: 1px solid var(--line);
}
.contact-success .tick { font-size: 32px; margin-bottom: 8px; }
.contact-success p { color: var(--heading); font-weight: 500; margin: 0 !important; }

/* ── ANIMATIONS ── */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

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

/* ── RESPONSIVE ── */
@media (max-width: 1100px) {
  .hero-left { padding-inline: 48px 32px; }
  .features, .how-it-works, .user-types, .cta-section { padding-inline: 48px; }
  footer { padding-inline: 48px; }
  .nav-links { display: none; }
}

@media (max-width: 900px) {
  nav { padding: 10px 16px; gap: 8px; flex-wrap: wrap; }
  .nav-logo { flex: 1; }
  .nav-cta {
    width: 100%;
    justify-content: space-between;
    padding-top: 8px;
    border-top: 1px solid var(--border);
  }
  .nav-cta .btn-gold { margin-inline-start: auto; padding: 8px 14px; font-size: 12px; }

  .hero { grid-template-columns: 1fr; padding: 124px 16px 48px; min-height: auto; }
  .hero-left { padding: 24px 0 0; }
  .hero-tag { font-size: 11px; padding: 6px 12px; margin-bottom: 20px; }
  .hero-title { font-size: calc(clamp(38px, 10vw, 56px) * var(--title-scale)); }
  .hero-arabic { font-size: 21px; }
  .hero-desc { font-size: 15px; margin-bottom: 32px; max-width: 100%; }
  .hero-actions { flex-direction: column; gap: 10px; }
  .hero-actions > * { width: 100%; }
  .hero-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 36px; padding-top: 28px; }
  .hero-stat-num { font-size: 28px; }
  .hero-stat-label { font-size: 10px; }
  .hero-right { padding-top: 40px; }
  .mock-map { width: 100%; max-width: 380px; height: 440px; }

  .features, .how-it-works, .user-types, .cta-section { padding: 64px 16px; }
  .section-header { margin-bottom: 44px; }
  .section-sub { font-size: 14px; }
  .features-grid { grid-template-columns: 1fr; }
  .feature-card { padding: 32px 24px; }

  .steps-container { grid-template-columns: 1fr; gap: 36px; margin-top: 44px; }
  .steps-container::before { display: none; }

  .user-tabs { width: 100%; display: grid; grid-template-columns: repeat(3, 1fr); margin-bottom: 32px; }
  .tab { padding: 11px 4px; font-size: 12px; }
  .tab-content { grid-template-columns: 1fr; gap: 32px; }
  .tab-visual { padding: 20px 16px; }

  .cta-buttons { flex-direction: column; align-items: center; }
  .cta-buttons > * { width: 100%; max-width: 340px; }

  footer { padding: 48px 16px 32px; }
  .footer-top { grid-template-columns: 1fr 1fr; gap: 32px; }
  .footer-top > :first-child { grid-column: 1 / -1; }
  .footer-bottom { flex-direction: column; text-align: center; }

  .auth-body { padding: 56px 20px 28px; }
  .info-modal-header { padding: 24px 20px 18px; padding-inline-end: 60px; }
  .info-modal-body { padding: 20px 20px 28px; }
  .info-modal-title { font-size: 22px; }
}
