/* ==========================================================================
   RAQEEM MISR — Design System
   Concept: "Quiet luxury with one restrained Eastern touch."
   An Egyptian contractor/finishing owner should feel seriousness and
   belonging — the calm of a private institution, not a consumer SaaS.
   Ivory paper alternates with deep ink bands; a single muted bronze accent
   and dark emerald carry the whole palette. No grid, no tilt, no stamp.
   Headings: Markazi Text (elegant serif). Body: IBM Plex Sans Arabic.
   ========================================================================== */

:root {
  /* Color tokens */
  --paper:      #F4EFE4; /* warm ivory — light section / page background */
  --paper-2:    #EFE8D9; /* slightly deeper ivory, subtle alt */
  --paper-card: #FBF7EE; /* card surface on light */
  --ink:        #1C221F; /* primary text — warm near-black */
  --ink-section:#161C19; /* dark ink section background */
  --ink-soft:   #4C544E; /* secondary text */
  --line:       #DED3BC; /* hairline borders / dividers on light */
  --bronze:     #B08948; /* THE accent — muted bronze/gold */
  --bronze-700: #8F6C34; /* bronze hover / deeper */
  --bronze-soft: rgba(176, 137, 72, 0.14);
  --emerald:    #1F3B30; /* dark emerald — institutional calm, money */
  --emerald-600:#2A4E3F; /* emerald hover */
  --shadow-soft: 0 14px 40px rgba(20, 26, 22, 0.08);

  --font-display: "Markazi Text", "Amiri", "Times New Roman", serif;
  --font-body: "IBM Plex Sans Arabic", "Tahoma", sans-serif;

  --container: 1140px;
  --radius: 7px;
}

/* ---------- Reset & base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.75;
  direction: rtl;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }
a { color: var(--emerald); text-decoration: none; transition: color 0.15s ease; }
a:hover { color: var(--bronze-700); }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--ink);
  margin: 0 0 0.4em;
  line-height: 1.2;
  font-weight: 600;
  letter-spacing: 0;
}

h1 { font-size: clamp(2.4rem, 5vw, 4rem); font-weight: 600; }
h2 { font-size: clamp(1.9rem, 3.4vw, 2.9rem); font-weight: 600; }
h3 { font-size: 1.55rem; font-weight: 600; }

p { margin: 0 0 1.1em; color: var(--ink-soft); }

.container { max-width: var(--container); margin: 0 auto; padding: 0 24px; }

/* visible keyboard focus everywhere */
a:focus-visible, button:focus-visible, [tabindex]:focus-visible {
  outline: 2px solid var(--bronze);
  outline-offset: 3px;
  border-radius: 3px;
}

/* ---------- Utility text ---------- */
.eyebrow {
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--bronze-700);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  text-transform: none;
}
.eyebrow::before {
  content: "";
  width: 26px;
  height: 1.5px;
  background: var(--bronze);
  display: inline-block;
}

.lede { font-size: 1.18rem; line-height: 1.8; color: var(--ink-soft); max-width: 60ch; }

.tabular { font-variant-numeric: tabular-nums; font-feature-settings: "tnum"; }

/* ---------- Header / nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(244, 239, 228, 0.9);
  backdrop-filter: saturate(120%) blur(8px);
  border-bottom: 1px solid var(--line);
}
.nav-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 0;
  gap: 20px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.5rem;
  color: var(--ink);
  flex-shrink: 0;
  line-height: 1;
}
.brand-logo { width: 38px; height: 38px; flex-shrink: 0; }
.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 6px;
  background: var(--emerald);
  color: var(--paper);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.3rem;
  flex-shrink: 0;
}
.brand small {
  display: block;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.64rem;
  color: var(--ink-soft);
  letter-spacing: 0.08em;
  margin-top: 2px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
  margin: 0;
  padding: 0;
  font-weight: 500;
  font-size: 0.96rem;
}
.nav-links a { color: var(--ink); }
.nav-links a:hover { color: var(--bronze-700); }
.nav-links a[aria-current="page"] { color: var(--bronze-700); }
.nav-links .soon-tag {
  font-size: 0.62rem;
  font-weight: 600;
  color: var(--bronze-700);
  background: var(--bronze-soft);
  padding: 2px 7px;
  border-radius: 3px;
  margin-inline-start: 6px;
  vertical-align: middle;
  letter-spacing: 0.04em;
}

.nav-cta { flex-shrink: 0; }

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px 11px;
  cursor: pointer;
  color: var(--ink);
}

@media (max-width: 860px) {
  .nav-links { display: none; }
  .nav-toggle { display: inline-flex; }
  .nav-row.is-open .nav-links {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
    position: absolute;
    inset-inline: 0;
    top: 72px;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    padding: 20px 24px 24px;
  }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.98rem;
  padding: 14px 26px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}
.btn-primary {
  background: var(--emerald);
  color: var(--paper);
}
.btn-primary:hover { background: var(--emerald-600); color: #fff; }
.btn-ghost {
  background: transparent;
  border-color: var(--ink);
  color: var(--ink);
}
.btn-ghost:hover { background: var(--ink); color: var(--paper); }
.btn-sm { padding: 10px 18px; font-size: 0.9rem; }

/* ---------- Hero / ledger card (signature element — now straight & calm) ---------- */
.hero {
  padding: clamp(56px, 9vw, 104px) 0 clamp(48px, 7vw, 88px);
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 56px;
  align-items: center;
}
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
}

.ledger-card {
  background: var(--paper-card);
  border: 1px solid var(--bronze);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  padding: 30px 30px 24px;
  position: relative;
}
.ledger-card h3 {
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ink-soft);
  letter-spacing: 0.02em;
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}
.ledger-line {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
}
.ledger-line:last-of-type { border-bottom: none; }
.ledger-line .label { color: var(--ink-soft); font-size: 0.94rem; }
.ledger-line .value {
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--ink);
}
.ledger-line .value.up { color: var(--emerald); }
.ledger-line .value.down { color: var(--bronze-700); }

/* ---------- Sections (alternating rhythm: light ivory <-> dark ink) ---------- */
.section { padding: clamp(64px, 10vw, 120px) 0; }
.section-alt {
  background: var(--ink-section);
  color: rgba(244, 239, 228, 0.82);
}
.section-alt h2, .section-alt h3, .section-alt h4 { color: #F7F2E7; }
.section-alt p { color: rgba(244, 239, 228, 0.72); }
.section-alt .lede { color: rgba(244, 239, 228, 0.78); }
.section-head { max-width: 660px; margin-bottom: 52px; }

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}
@media (max-width: 860px) {
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
}

.card {
  background: var(--paper-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}
.card:hover { border-color: var(--bronze); box-shadow: var(--shadow-soft); }
.card .card-index {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--bronze);
  font-size: 1.7rem;
  line-height: 1;
  margin-bottom: 10px;
}

/* cards on dark sections */
.section-alt .card {
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(176, 137, 72, 0.28);
}
.section-alt .card:hover { border-color: var(--bronze); box-shadow: none; }
.section-alt .card-index { color: var(--bronze); }

.industry-card {
  display: block;
  background: var(--paper-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px;
  position: relative;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}
.industry-card:hover { border-color: var(--bronze); box-shadow: var(--shadow-soft); }
.industry-card h3 { margin-top: 4px; }
.industry-card .tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--emerald);
  background: rgba(31, 59, 48, 0.08);
  padding: 4px 11px;
  border-radius: 3px;
  margin-bottom: 14px;
}
.industry-card .tag.soon {
  color: var(--bronze-700);
  background: var(--bronze-soft);
}
.industry-card .go {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  color: var(--bronze-700);
  margin-top: 14px;
}
.industry-card:hover .go { color: var(--bronze); }

/* on dark sections */
.section-alt .industry-card {
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(176, 137, 72, 0.28);
}
.section-alt .industry-card .tag {
  color: #B7CBC0;
  background: rgba(255, 255, 255, 0.06);
}
.section-alt .industry-card .tag.soon { color: var(--bronze); background: var(--bronze-soft); }
.section-alt .industry-card .go { color: var(--bronze); }

/* quote / USP block — bronze rule, inherits section colors */
.usp-block {
  display: flex;
  gap: 28px;
  align-items: flex-start;
  border-inline-start: 3px solid var(--bronze);
  padding-inline-start: 32px;
  max-width: 900px;
}
.usp-block h2 { margin-bottom: 0.5em; }
.usp-mark {
  font-family: var(--font-display);
  font-size: 3.6rem;
  color: var(--bronze);
  line-height: 0.8;
  flex-shrink: 0;
}
@media (max-width: 700px) {
  .usp-block { flex-direction: column; gap: 14px; padding-inline-start: 22px; }
  .usp-mark { font-size: 2.6rem; }
}

/* comparison strip */
.compare {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: 44px;
}
@media (max-width: 860px) {
  .compare { grid-template-columns: repeat(2, 1fr); }
}
.compare-cell {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  text-align: center;
  background: var(--paper-card);
}
.compare-cell.win {
  border-color: var(--emerald);
  background: rgba(31, 59, 48, 0.05);
}
.compare-cell .name { font-weight: 700; margin-bottom: 8px; color: var(--ink); }
.compare-cell .status { font-size: 0.88rem; color: var(--ink-soft); }
.compare-cell.win .status { color: var(--emerald); font-weight: 600; }

/* FAQ */
details.faq {
  border-bottom: 1px solid var(--line);
  padding: 20px 2px;
}
details.faq summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 1.12rem;
  font-family: var(--font-display);
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--ink);
}
details.faq summary::-webkit-details-marker { display: none; }
details.faq summary::after {
  content: "+";
  font-family: var(--font-body);
  font-size: 1.4rem;
  color: var(--bronze);
  flex-shrink: 0;
  margin-inline-start: 12px;
}
details.faq[open] summary::after { content: "–"; }
details.faq .faq-body { padding-top: 12px; }

/* CTA band — emerald, single bronze button */
.cta-band {
  background: var(--emerald);
  color: #fff;
  border-radius: var(--radius);
  padding: clamp(36px, 6vw, 64px);
  text-align: center;
}
.cta-band h2 { color: #fff; }
.cta-band p { color: rgba(255, 255, 255, 0.8); max-width: 54ch; margin-inline: auto; }
.cta-band .btn-primary { background: var(--bronze); color: var(--ink); }
.cta-band .btn-primary:hover { background: var(--bronze-700); color: #fff; }

/* Soon banner */
.soon-banner {
  border: 1px solid var(--bronze);
  background: var(--bronze-soft);
  border-radius: var(--radius);
  padding: clamp(28px, 5vw, 44px);
  text-align: center;
}
.soon-banner .eyebrow { justify-content: center; }

/* Timeline (about page) */
.timeline { border-inline-start: 1px solid var(--line); padding-inline-start: 30px; display: flex; flex-direction: column; gap: 32px; }
.timeline-item { position: relative; }
.timeline-item::before {
  content: "";
  position: absolute;
  inset-inline-start: -35px;
  top: 8px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--bronze);
  border: 2px solid var(--paper);
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--ink-section);
  color: rgba(244, 239, 228, 0.7);
  padding: 60px 0 34px;
}
.site-footer .brand { color: #F7F2E7; }
.site-footer .brand small { color: rgba(244, 239, 228, 0.6); }
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 36px;
  margin-bottom: 36px;
}
@media (max-width: 700px) {
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
}
.footer-grid h4 { font-size: 0.9rem; margin-bottom: 16px; color: #F7F2E7; letter-spacing: 0.03em; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.footer-grid a { color: rgba(244, 239, 228, 0.7); font-size: 0.94rem; }
.footer-grid a:hover { color: var(--bronze); }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 0.82rem;
  color: rgba(244, 239, 228, 0.5);
  border-top: 1px solid rgba(244, 239, 228, 0.12);
  padding-top: 22px;
}
.fine-print { font-size: 0.86rem; color: rgba(244, 239, 228, 0.6); }

/* skip link */
.skip-link {
  position: absolute;
  right: -9999px;
  top: auto;
  background: var(--ink);
  color: #fff;
  padding: 10px 16px;
  border-radius: 6px;
  z-index: 100;
}
.skip-link:focus { right: 16px; top: 16px; }
