:root {
  --ink: #1a1410;
  --ink-soft: #5c4a3e;
  --clay: #8e3b2f;
  --clay-deep: #6e2c24;
  --gold: #c6a15b;
  --gold-soft: #e4c88a;
  --sand: #f6f1e7;
  --paper: #fbf7f1;
  --dune: #e7d7c0;
  --river: #14343a;
  --river-mid: #1b6c78;
  --palm: #2f6a45;
  --line: rgba(26, 20, 16, 0.12);
  --shadow: 0 24px 60px rgba(26, 20, 16, 0.12);
  --header: 78px;
  --serif: "El Messiri", "Noto Naskh Arabic", "Times New Roman", serif;
  --sans: "IBM Plex Sans Arabic", "Tahoma", "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(1200px 500px at 100% -10%, rgba(198, 161, 91, 0.18), transparent 60%),
    linear-gradient(180deg, #fbf7f1 0%, #f3ebdd 100%);
  font-family: var(--sans);
  font-weight: 400;
  line-height: 1.75;
  overflow-x: clip;
}
img, svg { max-width: 100%; display: block; }
button, input { font: inherit; }
a { color: inherit; }

.skip {
  position: absolute;
  inset-inline-start: 16px;
  top: -40px;
  background: var(--river);
  color: white;
  padding: 8px 12px;
  z-index: 20;
}
.skip:focus { top: 12px; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  padding-top: env(safe-area-inset-top);
  background: rgba(251, 247, 241, 0.92);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
}
.site-header.is-stuck { border-bottom-color: var(--line); }
.header-inner {
  max-width: 1180px;
  margin: 0 auto;
  min-height: var(--header);
  padding: 12px 24px;
  display: flex;
  align-items: center;
  gap: 16px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  text-decoration: none;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text strong {
  font-family: var(--serif);
  font-size: 1.45rem;
  font-weight: 700;
}
.brand-text small { color: var(--ink-soft); font-size: 0.78rem; }
.nav { display: flex; gap: 22px; margin-inline-start: auto; }
.header-actions { margin-inline-start: 8px; }
.nav a {
  text-decoration: none;
  color: var(--ink-soft);
  font-weight: 500;
}
.nav a:hover { color: var(--clay); }
.header-actions { display: flex; align-items: center; gap: 10px; }
.menu-toggle, .mobile-nav { display: none; }

.btn {
  border: 0;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  border-radius: 999px;
  font-weight: 600;
}
.btn-gold { background: var(--gold); color: #24180d; }
.btn-gold:hover { background: #d4b36d; }
.btn-river { background: var(--river); color: #f6f1e7; }
.btn-river:hover { background: #1c4650; }
.btn-line {
  background: transparent;
  color: var(--ink);
  box-shadow: inset 0 0 0 1.5px rgba(26, 20, 16, 0.28);
}
.btn-line:hover { background: rgba(26, 20, 16, 0.04); }

.hero {
  max-width: 1180px;
  margin: 0 auto;
  padding: 36px 24px 20px;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 36px;
  align-items: center;
}
.eyebrow {
  margin: 0 0 10px;
  color: var(--clay);
  font-weight: 600;
  letter-spacing: 0;
}
.eyebrow span {
  display: inline-block;
  padding-bottom: 2px;
  border-bottom: 1px solid var(--gold);
}
.hero h1, .section-head h2, .account h2 {
  font-family: var(--serif);
  font-weight: 700;
  line-height: 1.35;
  margin: 0 0 14px;
}
.hero h1 { font-size: clamp(2.2rem, 4vw, 3.6rem); }
.lead, .section-head p, .account p { color: var(--ink-soft); margin: 0; max-width: 62ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 26px 0 0; }

.hero-scene {
  margin: 0;
  background: #fffdf9;
  border-radius: 28px;
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid rgba(142, 59, 47, 0.12);
}
.scene-frame { overflow: hidden; }
.scene-frame svg { width: 100%; height: auto; }
.hero-scene figcaption {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 14px 18px 18px;
  color: var(--ink-soft);
  background:
    linear-gradient(90deg, transparent, transparent),
    repeating-linear-gradient(-45deg, rgba(198, 161, 91, 0.13) 0 8px, transparent 8px 16px);
}
.hero-scene figcaption span {
  color: var(--clay-deep);
  font-weight: 700;
}

.services, .account { max-width: 1180px; margin: 0 auto; padding: 54px 24px; }
.section-head { margin-bottom: 28px; }
.section-head h2, .account h2 { font-size: clamp(1.8rem, 3vw, 2.6rem); }
.section-head.light { color: #f6f1e7; }
.section-head.light p { color: rgba(246, 241, 231, 0.78); }
.section-head.light .eyebrow { color: var(--gold-soft); }

.service-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.service {
  background: rgba(255, 253, 249, 0.86);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 20px 20px 18px;
  min-height: 230px;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}
.service::before {
  content: "";
  position: absolute;
  inset-inline: 0;
  top: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--clay), var(--gold), var(--river-mid));
}
.service-lead {
  grid-column: span 2;
  background:
    linear-gradient(160deg, rgba(20, 52, 58, 0.96), rgba(20, 52, 58, 0.88)),
    repeating-linear-gradient(135deg, rgba(228, 200, 138, 0.08) 0 12px, transparent 12px 24px);
  color: #f6f1e7;
  min-height: 280px;
}
.service-lead p { color: rgba(246, 241, 231, 0.8); }
.service-top { display: flex; justify-content: flex-end; align-items: center; margin-bottom: 18px; }
.badge {
  border: 1px solid currentColor;
  border-radius: 999px;
  padding: 2px 10px;
  font-size: 0.78rem;
  color: var(--clay);
}
.service-lead .badge { color: var(--gold-soft); }
.service h3 {
  margin: 0 0 8px;
  font-family: var(--serif);
  font-size: 1.55rem;
}
.service p { margin: 0 0 16px; }
.service button {
  margin-top: auto;
  align-self: flex-start;
  background: transparent;
  border: 0;
  min-height: 44px;
  padding: 8px 0;
  color: var(--river);
  font-weight: 700;
  cursor: pointer;
  border-bottom: 1px solid var(--gold);
}
.service-lead button { color: var(--gold-soft); }

.cities {
  margin-top: 10px;
  padding: 54px 0 42px;
  background:
    radial-gradient(500px 180px at 10% 0%, rgba(228, 200, 138, 0.18), transparent 70%),
    var(--river);
  color: #f6f1e7;
}
.cities .section-head, .city-list { max-width: 1180px; margin-inline: auto; padding-inline: 24px; }
.city-list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  margin: 0;
}
.city-list li {
  border: 1px solid rgba(246, 241, 231, 0.16);
  border-radius: 18px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.03);
}
.city-list strong { display: block; font-family: var(--serif); font-size: 1.25rem; }
.city-list span { color: rgba(246, 241, 231, 0.72); font-size: 0.92rem; }

.account-panel {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 28px;
  align-items: center;
  background: #fffdf9;
  border-radius: 28px;
  padding: 32px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.account .btn { margin-top: 22px; }
.seals {
  list-style: none;
  margin: 0;
  padding: 18px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  background:
    radial-gradient(circle at 50% 45%, rgba(198, 161, 91, 0.2), transparent 42%),
    #f3ebdd;
  border-radius: 22px;
}
.seals li {
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  text-align: center;
  border-radius: 50%;
  background: var(--river);
  color: #f6f1e7;
  font-weight: 600;
  font-size: 0.78rem;
  line-height: 1.25;
  padding: 4px;
}
.seals li:first-child { background: var(--clay); }
.seals li.seal-wide {
  grid-column: span 2;
  aspect-ratio: auto;
  min-height: 44px;
  border-radius: 999px;
}

.site-footer {
  margin-top: 36px;
  background: var(--river);
  color: rgba(246, 241, 231, 0.78);
}
.footer-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 22px 24px calc(22px + env(safe-area-inset-bottom));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.site-footer strong {
  display: block;
  font-family: var(--serif);
  color: #f6f1e7;
  font-size: 1.45rem;
}
.site-footer p { margin: 2px 0 0; }
.footer-code {
  display: block;
  flex: 0 0 auto;
  background: #fff;
  padding: 6px;
  border-radius: 12px;
  line-height: 0;
}
.footer-code img { width: 84px; height: 84px; }

.install-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  max-width: 1180px;
  margin: 12px auto 0;
  padding: 10px 14px;
  background: var(--river);
  color: #f6f1e7;
  border-radius: 18px;
}
.install-bar[hidden] { display: none; }
.install-bar p { margin: 0; }
.install-actions { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.install-dismiss {
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #f6f1e7;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}

.sheet {
  width: min(520px, calc(100% - 28px));
  max-height: min(640px, calc(100dvh - 24px - env(safe-area-inset-top) - env(safe-area-inset-bottom)));
  margin: auto;
  overflow: auto;
  border: 0;
  border-radius: 24px;
  padding: 0;
  background: var(--paper);
  color: var(--ink);
  box-shadow: var(--shadow);
}
.sheet::backdrop { background: rgba(20, 16, 12, 0.46); }
.sheet form { padding: 24px; display: flex; flex-direction: column; gap: 12px; }
.sheet h3 { font-family: var(--serif); font-size: 1.8rem; margin: 0; }
.sheet-lead, .sheet-note, #sheet-body { margin: 0; color: var(--ink-soft); }
.sheet-note {
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(198, 161, 91, 0.16);
  color: var(--ink);
}
.sheet label { display: flex; flex-direction: column; gap: 6px; font-weight: 600; font-size: 0.92rem; }
.sheet input {
  border: 1px solid var(--line);
  background: white;
  border-radius: 12px;
  min-height: 48px;
  padding: 0 12px;
}
.sheet input:focus { outline: 2px solid var(--gold); border-color: transparent; }
.sheet-actions { display: flex; gap: 10px; margin-top: 6px; }
.form-message {
  margin: 0;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(20, 52, 58, 0.08);
}

@media (max-width: 1180px) {
  .hero {
    grid-template-columns: 1fr 0.92fr;
    gap: 22px;
    padding: 28px 20px 12px;
  }
  .hero h1 { font-size: clamp(1.9rem, 3.2vw, 2.8rem); }
  .service-grid { grid-template-columns: 1fr 1fr; }
  .service-lead { grid-column: span 2; }
  .city-list { grid-template-columns: repeat(4, 1fr); }
  .services, .account { padding: 40px 20px; }
  .account-panel { padding: 24px; gap: 20px; }
}

@media (max-width: 1023px) {
  .nav { display: none; }
  .header-actions { margin-inline-start: auto; }
  .menu-toggle {
    display: inline-flex;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid var(--line);
    background: white;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 6px;
    cursor: pointer;
  }
  .menu-toggle span {
    display: block;
    width: 18px;
    height: 2px;
    background: var(--ink);
  }
  .mobile-nav {
    display: flex;
    flex-direction: column;
    padding: 0 20px 12px;
    gap: 4px;
  }
  .mobile-nav a {
    text-decoration: none;
    font-weight: 600;
    min-height: 44px;
    display: flex;
    align-items: center;
  }
  .mobile-nav[hidden] { display: none; }
  .hero { grid-template-columns: 1fr; padding-top: 18px; }
  .scene-frame { height: 300px; }
  .scene-frame svg { height: 100%; }
  .city-list { grid-template-columns: repeat(3, 1fr); }
  .install-bar { margin-inline: 20px; }
}

@media (max-width: 760px) {
  .city-list { grid-template-columns: 1fr 1fr; }
  .scene-frame { height: 240px; }
  .hero-actions .btn { flex: 1 1 140px; }
}

@media (max-width: 640px) {
  .header-inner { min-height: 64px; padding: 8px 14px; gap: 8px; }
  .brand-text strong { font-size: 1.25rem; }
  .header-login { min-height: 40px; padding: 0 12px; }
  .hero { padding: 12px 14px 8px; }
  .hero h1 { font-size: 1.85rem; }
  .hero-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .hero-actions .btn { width: 100%; }
  .services, .account { padding: 32px 14px; }
  .service-grid, .account-panel { grid-template-columns: 1fr; }
  .service, .service-lead { min-height: 0; grid-column: auto; }
  .cities { padding: 36px 0 28px; }
  .cities .section-head, .city-list { padding-inline: 14px; }
  .account-panel { border-radius: 20px; padding: 18px; }
  .seals { padding: 12px; gap: 8px; }
  .seals li { font-size: 0.82rem; }
  .footer-inner { padding-inline: 14px; }
  .footer-code img { width: 72px; height: 72px; }
  .install-bar {
    margin-inline: 14px;
    flex-wrap: wrap;
    border-radius: 16px;
  }
  .install-actions { width: 100%; }
  .install-actions .btn { flex: 1; }
  .sheet { width: calc(100% - 16px); border-radius: 18px; }
  .sheet form { padding: 18px 16px calc(16px + env(safe-area-inset-bottom)); }
  .sheet-actions { flex-direction: column; }
  .sheet-actions .btn { width: 100%; }
}

@media (max-width: 380px) {
  .brand-text small { display: none; }
  .header-login { font-size: 0.88rem; }
  .scene-frame { height: 190px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
