:root {
  /* Deep navy / warm white / muted blue-grey, per Docs/brief-takaful-emarat.md */
  --brand: #16284a;
  --brand-dark: #0b1830;
  --accent: #b8902f;
  --accent-ink: #3a2400;
  --teal: #b8902f;
  --ink: #16202c;
  --muted: #5b6472;
  --bg: #faf8f4;
  --card: #ffffff;
  --border: #dfe3e8;
  --danger: #c23b2a;
  --radius: 16px;
  --shadow: 0 12px 32px rgba(11, 24, 48, 0.12);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: inherit; }

.container {
  width: 100%;
  max-width: 520px;
  margin: 0 auto;
  padding: 0 18px;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--card);
  border-bottom: 1px solid var(--border);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 12px;
  padding-bottom: 12px;
}

.logo {
  font-weight: 800;
  font-size: 18px;
  letter-spacing: -0.02em;
  color: var(--brand-dark);
  display: flex;
  align-items: center;
  gap: 6px;
}

.logo .dot { color: var(--teal); }

.badge-pill {
  font-size: 11px;
  font-weight: 700;
  color: var(--accent-ink);
  background: rgba(184, 144, 47, 0.16);
  border-radius: 999px;
  padding: 4px 10px;
}

/* ---------- Hero ---------- */
.hero {
  background: linear-gradient(160deg, var(--brand) 0%, var(--brand-dark) 100%);
  color: #fff;
  padding: 30px 0 38px;
  position: relative;
  overflow: hidden;
}

.hero::after {
  content: "";
  position: absolute;
  right: -60px;
  top: -60px;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
}

.hero .inner { position: relative; }

.hero .eyebrow {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  opacity: 0.85;
}

.hero h1 {
  font-size: 27px;
  line-height: 1.22;
  margin: 10px 0 8px;
}

.hero p {
  font-size: 15px;
  opacity: 0.92;
  margin: 0 0 18px;
  max-width: 42ch;
}

.trust-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 16px;
}

.trust-chip {
  font-size: 11.5px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 999px;
  padding: 6px 11px;
}

.trust-chip svg { width: 12px; height: 12px; flex: none; }

/* ---------- Quote card ---------- */
.quote-card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
  margin-top: -22px;
  position: relative;
  z-index: 5;
}

.quote-card.quote-card--bottom { margin-top: 24px; }

.hero .btn-primary {
  width: auto;
  padding: 14px 26px;
  margin-top: 6px;
}

.quote-steps-indicator {
  display: flex;
  gap: 6px;
  margin-bottom: 14px;
}

.quote-steps-indicator .seg {
  flex: 1;
  height: 4px;
  border-radius: 999px;
  background: var(--border);
}

.quote-steps-indicator .seg.done { background: var(--teal); }

.quote-step { display: none; }
.quote-step.active { display: block; }

.quote-card h2 {
  font-size: 17px;
  margin: 0 0 4px;
}

.quote-card .sub {
  font-size: 13px;
  color: var(--muted);
  margin: 0 0 16px;
}

.field { margin-bottom: 14px; }

.field label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 6px;
}

.field input[type="text"],
.field input[type="tel"],
.field input[type="email"],
.field select {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  font-size: 15px;
  background: #fbfcfe;
  font-family: inherit;
  appearance: none;
}

.field input:focus, .field select:focus {
  outline: none;
  border-color: var(--brand);
  background: #fff;
}

.consent-label {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 12.5px;
  font-weight: 400;
  color: var(--muted);
  cursor: pointer;
}

.consent-label input[type="checkbox"] {
  flex: none;
  width: 16px;
  height: 16px;
  margin-top: 2px;
  accent-color: var(--brand);
}

.toggle-group, .chip-group {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.toggle-group { flex-wrap: nowrap; }

.toggle-option, .chip-option {
  flex: 1;
  text-align: center;
  padding: 12px 8px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  user-select: none;
  min-width: 64px;
}

.chip-option { flex: none; padding: 9px 14px; }

.toggle-option.active, .chip-option.active {
  border-color: var(--brand);
  color: var(--brand-dark);
  background: rgba(22, 40, 74, 0.07);
}

.stepper-nav {
  display: flex;
  gap: 10px;
  margin-top: 6px;
}

.btn {
  border: none;
  border-radius: 10px;
  padding: 14px;
  font-weight: 800;
  font-size: 15px;
  cursor: pointer;
  width: 100%;
}

.btn-primary { background: var(--teal); color: #052e28; }
.btn-ghost {
  background: transparent;
  border: 1.5px solid var(--border);
  color: var(--muted);
  flex: none;
  width: auto;
  padding: 14px 18px;
}

.btn:active { transform: translateY(1px); }

.disclaimer {
  font-size: 11px;
  color: var(--muted);
  margin-top: 10px;
  line-height: 1.5;
}

.form-msg {
  display: none;
  font-size: 13px;
  font-weight: 600;
  border-radius: 10px;
  padding: 10px 12px;
  margin-top: 10px;
}

.form-msg.success { display: block; background: rgba(15, 157, 140, 0.12); color: #0a6354; }
.form-msg.error { display: block; background: rgba(194, 59, 42, 0.1); color: var(--danger); }

.quote-success { text-align: center; padding: 18px 4px 6px; }

.quote-success .icon {
  width: 48px;
  height: 48px;
  border-radius: 999px;
  background: rgba(15, 157, 140, 0.12);
  color: #0a6354;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 800;
  margin: 0 auto 14px;
}

.quote-success h2 { margin-bottom: 8px; }
.quote-success p { color: var(--muted); font-size: 14px; line-height: 1.55; margin: 0; }

/* Price reveal */
.price-reveal {
  text-align: center;
  padding: 10px 0 4px;
}

.price-reveal .label {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.price-reveal .amount {
  font-size: 40px;
  font-weight: 800;
  color: var(--brand-dark);
  margin: 6px 0 2px;
}

.price-reveal .amount span { font-size: 16px; font-weight: 700; color: var(--muted); }

.price-reveal .range { font-size: 12.5px; color: var(--muted); margin-bottom: 16px; }

/* ---------- Sections ---------- */
.section { padding: 30px 0; }
.section h3 { font-size: 19px; margin: 0 0 14px; }
.section h4 { font-size: 15px; margin: 18px 0 8px; }

.steps { display: flex; flex-direction: column; gap: 14px; }
.step { display: flex; gap: 12px; align-items: flex-start; }

.step .num {
  flex: none;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.step p { margin: 2px 0 0; font-size: 14px; color: var(--muted); }

.body-copy { font-size: 14.5px; color: var(--muted); line-height: 1.65; }
.body-copy p { margin: 0 0 12px; }
.body-copy strong { color: var(--ink); }

.logo-strip { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }

.logo-chip {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 12px;
}

.compare-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  font-size: 13px;
}

.compare-table th, .compare-table td {
  padding: 10px 10px;
  border-bottom: 1px solid var(--border);
  text-align: left;
}

.compare-table th { background: #eef3f4; font-size: 12px; }

.faq-item { border-bottom: 1px solid var(--border); padding: 13px 0; }
.faq-item summary { font-weight: 700; font-size: 14.5px; cursor: pointer; }
.faq-item p { font-size: 13.5px; color: var(--muted); margin: 8px 0 0; line-height: 1.6; }

.sticky-cta {
  position: sticky;
  bottom: 0;
  z-index: 20;
  background: #fff;
  border-top: 1px solid var(--border);
  padding: 10px 18px calc(10px + env(safe-area-inset-bottom));
}

.whatsapp-fab {
  position: fixed;
  right: 16px;
  bottom: calc(76px + env(safe-area-inset-bottom));
  z-index: 30;
  width: 54px;
  height: 54px;
  border-radius: 999px;
  background: #25d366;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
}

.whatsapp-fab svg { width: 28px; height: 28px; }

[dir="rtl"] .whatsapp-fab { right: auto; left: 16px; }

.sticky-cta button {
  width: 100%;
  background: var(--brand);
  color: #fff;
  font-weight: 800;
  font-size: 15px;
  border: none;
  border-radius: 10px;
  padding: 13px;
}

footer.site-footer {
  padding: 20px 18px;
  text-align: center;
  font-size: 11px;
  color: var(--muted);
  line-height: 1.6;
}

/* ---------- Broker theme variant ---------- */
body.theme-broker { --brand: #2c3e5e; --brand-dark: #1b2740; }
body.theme-broker .btn-primary { color: #3a2400; }

.btn-primary { color: #3a2400; }

@media (min-width: 560px) {
  .hero h1 { font-size: 32px; }
}

/* ---------- Header: language switcher ---------- */
.site-header .container {
  flex-wrap: wrap;
  row-gap: 8px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.lang-switch select {
  font-size: 12px;
  font-weight: 600;
  color: var(--brand-dark);
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  padding: 5px 8px;
  font-family: inherit;
}

/* ---------- Draft translation banner ---------- */
.draft-banner {
  display: none;
  background: rgba(184, 144, 47, 0.14);
  color: var(--accent-ink);
  font-size: 12px;
  font-weight: 600;
  text-align: center;
  padding: 8px 14px;
}

/* ---------- Trust / Coverage / How it works / Final CTA ---------- */
.trust-list {
  list-style: none;
  margin: 14px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.trust-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14px;
  color: var(--ink);
}

.trust-list li::before {
  content: "\2713";
  flex: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(184, 144, 47, 0.16);
  color: var(--accent-ink);
  font-size: 12px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}

.final-cta {
  background: var(--brand);
  color: #fff;
  border-radius: var(--radius);
  padding: 26px 22px;
  text-align: center;
}

.final-cta h3 { color: #fff; }
.final-cta p { color: rgba(255, 255, 255, 0.85); font-size: 14px; margin: 8px 0 18px; }
.final-cta .btn-primary { width: auto; padding: 14px 26px; display: inline-block; }

/* ---------- RTL ---------- */
html[dir="rtl"] .compare-table th,
html[dir="rtl"] .compare-table td { text-align: right; }

html[dir="rtl"] .hero::after { right: auto; left: -60px; }

html[dir="rtl"] .trust-list li::before { order: 2; }

:lang(ar) { font-family: "Segoe UI", Tahoma, Arial, sans-serif; }
:lang(hi) { font-family: "Nirmala UI", "Segoe UI", sans-serif; }
:lang(ur) { font-family: "Segoe UI", Tahoma, Arial, sans-serif; }

/* ---------- Dashboard (index.html) ---------- */
.dashboard-wrap {
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 18px;
}

.dashboard-group { padding: 34px 0 10px; }
.dashboard-group:first-of-type { padding-top: 38px; }

.dashboard-group-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.dashboard-group-head h2 { font-size: 20px; margin: 0; }

.structure-note {
  font-size: 13px;
  color: var(--muted);
  margin: 0;
  max-width: 60ch;
}

.page-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 14px;
}

.page-card {
  background: var(--card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}

.page-card:hover {
  border-color: var(--brand);
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

.page-card .tag-row { display: flex; gap: 6px; flex-wrap: wrap; }

.page-card .tag {
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 3px 8px;
  border-radius: 999px;
}

.page-card .tag.tag-direct { background: rgba(22, 40, 74, 0.08); color: var(--brand); }
.page-card .tag.tag-broker { background: rgba(43, 62, 94, 0.1); color: #2c3e5e; }
.page-card .tag.tag-structure { background: rgba(184, 144, 47, 0.14); color: var(--accent-ink); }

.page-card h4 { margin: 0; font-size: 16px; color: var(--ink); }
.page-card p { margin: 0; font-size: 13px; color: var(--muted); line-height: 1.5; flex: 1; }

.page-card .open-link {
  font-size: 13px;
  font-weight: 700;
  color: var(--brand-dark);
}

.page-card .open-link::after { content: " \2192"; }

.dashboard-status {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

@media (min-width: 640px) {
  .dashboard-group-head { flex-wrap: nowrap; }
}

/* ---------- Quickform variant: nav, split hero, plan/testimonial cards ---------- */
.nav-links {
  display: none;
  gap: 20px;
  align-items: center;
}

.nav-links a {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
}

.nav-links a:hover { color: var(--brand); }

@media (min-width: 760px) {
  .nav-links { display: flex; }
}

.hero-split .inner {
  display: flex;
  flex-direction: column;
  gap: 26px;
}

@media (min-width: 880px) {
  .hero-split .inner { flex-direction: row; align-items: flex-start; gap: 44px; }
  .hero-split .hero-copy { flex: 1 1 52%; }
  .hero-split .quick-form-wrap { flex: 1 1 40%; max-width: 420px; }
}

.quote-card.quote-card--split { margin-top: 0; color: var(--ink); }

.hero-cta-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.hero-cta-row .btn-ghost { background: rgba(255, 255, 255, 0.12); border-color: rgba(255, 255, 255, 0.4); color: #fff; }

.plan-grid, .testimonial-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 16px;
}

.plan-card {
  background: var(--card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.plan-card h4 { margin: 0; font-size: 17px; }
.plan-card .plan-desc { margin: 0; font-size: 13.5px; color: var(--muted); }

.plan-card ul {
  list-style: none;
  margin: 2px 0 8px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.plan-card ul li {
  font-size: 13px;
  color: var(--ink);
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.plan-card ul li::before { content: "\2713"; color: var(--accent-ink); font-weight: 800; }
.plan-card .btn-primary { width: auto; align-self: flex-start; padding: 10px 18px; font-size: 13.5px; }

.testimonial-disclaimer { font-size: 12px; color: var(--muted); margin: -6px 0 16px; }

.testimonial-card {
  background: var(--card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.testimonial-card .stars { color: var(--accent); font-size: 13px; letter-spacing: 2px; }
.testimonial-card .quote { margin: 0; font-size: 13.5px; color: var(--ink); font-style: italic; line-height: 1.55; }
.testimonial-card .attribution { font-size: 12px; color: var(--muted); font-weight: 600; }
