/* هوية معتمدة: إبداع وزاد (موقع محمد بحر) — «المعقّب الذكي الذي لا ينام» · أخضر #006c35 · كحلي #0b1b3d · ذهبي مطفي #c39b4b · Cairo · بطاقة محادثة ليلية — DEC-437 · 2026-09-03 */
:root {
  --green: #006c35;
  --navy: #0b1b3d;
  --gold: #c39b4b;
  --ice: #f8fafc;
  --white: #ffffff;
  --ink: #172033;
  --muted: #5f6f86;
  --line: #d9e1ea;
  --soft-gold: #f6eddc;
  --shadow: 0 18px 40px rgba(11, 27, 61, 0.08);
  --radius: 8px;
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Cairo", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--white);
  line-height: 1.75;
  text-rendering: optimizeLegibility;
}

body.ltr {
  font-family: "Cairo", Arial, sans-serif;
}

a {
  color: inherit;
  text-decoration: none;
}

img,
svg {
  display: block;
  max-width: 100%;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

:focus-visible {
  outline: 3px solid rgba(195, 155, 75, 0.75);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  inset-inline-start: 1rem;
  top: 0.75rem;
  z-index: 50;
  transform: translateY(-140%);
  background: var(--navy);
  color: var(--white);
  padding: 0.65rem 1rem;
  border-radius: var(--radius);
}

.skip-link:focus {
  transform: translateY(0);
}

.top-alert {
  background: var(--navy);
  color: var(--white);
  border-bottom: 1px solid rgba(255, 255, 255, 0.16);
}

.top-alert .wrap {
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding-block: 0.55rem;
  font-size: 0.95rem;
  font-weight: 600;
}

.container {
  width: min(1120px, calc(100% - 32px));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--line);
}

.nav {
  min-height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}

.brand-mark {
  width: 46px;
  height: 46px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  filter: drop-shadow(0 8px 16px rgba(0, 108, 53, 0.18));
}

.brand strong {
  display: block;
  font-weight: 800;
  line-height: 1.1;
}

.brand span {
  display: block;
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.4;
}

.nav-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  color: #34445b;
  font-size: 0.95rem;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.icon-btn,
.agent-toggle {
  min-width: 44px;
  min-height: 44px;
  border: 1px solid var(--line);
  background: var(--white);
  color: var(--navy);
  border-radius: var(--radius);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.65rem 0.85rem;
  font-weight: 800;
}

.agent-toggle {
  background: var(--green);
  color: var(--white);
  border-color: var(--green);
}

.hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 12% 0, rgba(0, 108, 53, 0.10), transparent 30%),
    linear-gradient(180deg, var(--ice), var(--white));
  border-bottom: 1px solid var(--line);
}

.hero::before,
.section-pattern::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.34;
  background-image:
    linear-gradient(45deg, rgba(0, 108, 53, 0.08) 25%, transparent 25%),
    linear-gradient(-45deg, rgba(11, 27, 61, 0.06) 25%, transparent 25%);
  background-size: 42px 42px;
  mask-image: linear-gradient(to bottom, black, transparent 70%);
}

.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(300px, 0.9fr);
  align-items: center;
  gap: clamp(2rem, 5vw, 5rem);
  padding-block: clamp(4rem, 10vw, 7.5rem);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--green);
  font-weight: 800;
  margin: 0 0 1.1rem;
}

.eyebrow::before {
  content: "";
  width: 34px;
  height: 2px;
  background: var(--gold);
}

h1,
.page-title {
  margin: 0;
  color: var(--navy);
  font-size: clamp(2.2rem, 5.2vw, 3.4rem);
  line-height: 1.18;
  letter-spacing: 0;
  font-weight: 800;
  max-width: 920px;
}

h2 {
  margin: 0;
  color: var(--navy);
  font-size: clamp(1.8rem, 4.8vw, 3rem);
  line-height: 1.2;
  letter-spacing: 0;
  font-weight: 800;
}

h3 {
  margin: 0;
  color: var(--navy);
  font-size: 1.18rem;
  line-height: 1.35;
  letter-spacing: 0;
}

p {
  margin: 0;
}

.lead {
  color: #47566b;
  font-size: clamp(1.02rem, 2vw, 1.18rem);
  max-width: 720px;
  margin-top: 1.4rem;
}

.hero-actions,
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-top: 1.8rem;
}

.btn {
  min-height: 48px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  padding: 0.72rem 1.1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-weight: 800;
  line-height: 1.3;
}

.btn.gold {
  background: var(--gold);
  color: #111827;
  box-shadow: 0 12px 28px rgba(195, 155, 75, 0.22);
}

.btn.navy {
  background: var(--navy);
  color: var(--white);
}

.btn.green {
  background: var(--green);
  color: var(--white);
}

.btn.ghost {
  border-color: var(--line);
  background: var(--white);
  color: var(--navy);
}

.visual-board {
  position: relative;
  display: grid;
  gap: 1rem;
}

.chat-card {
  background: var(--navy);
  color: var(--white);
  border-radius: 14px;
  padding: 1.1rem 1.1rem 1rem;
  box-shadow: 0 30px 60px rgba(11, 27, 61, 0.28);
  display: grid;
  gap: 0.7rem;
  position: relative;
  overflow: hidden;
}

.chat-card::after {
  content: "";
  position: absolute;
  inset-inline-end: -60px;
  top: -60px;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(195, 155, 75, 0.35), transparent 70%);
  pointer-events: none;
}

.chat-top {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.9rem;
  color: #d7deeb;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.chat-top strong { color: var(--white); }
.chat-top .time { margin-inline-start: auto; color: var(--gold); font-weight: 800; }
.chat-top .dot { width: 10px; height: 10px; border-radius: 50%; background: #2ecc71; box-shadow: 0 0 0 4px rgba(46, 204, 113, 0.2); }

.chat-msg {
  max-width: 88%;
  padding: 0.7rem 0.9rem;
  border-radius: 14px;
  line-height: 1.7;
  font-size: 0.98rem;
}

.chat-msg.user {
  justify-self: start;
  background: rgba(255, 255, 255, 0.1);
  border-start-start-radius: 4px;
}

.chat-msg.bot {
  justify-self: end;
  background: var(--green);
  color: var(--white);
  border-start-end-radius: 4px;
}

.chat-status {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin-top: 0.2rem;
  padding: 0.65rem 0.8rem;
  border-radius: 10px;
  background: rgba(195, 155, 75, 0.14);
  border: 1px solid rgba(195, 155, 75, 0.45);
  color: #f3e6c9;
  font-weight: 700;
  font-size: 0.92rem;
}

.chat-status .check {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--gold);
  position: relative;
}

.chat-status .check::after {
  content: "";
  position: absolute;
  inset-inline-start: 6px;
  top: 3px;
  width: 4px;
  height: 9px;
  border: solid var(--navy);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.visual-note {
  display: grid;
  gap: 0.2rem;
  padding: 0.9rem 1rem;
  border-inline-start: 3px solid var(--gold);
  background: var(--white);
  border-radius: 0 var(--radius) var(--radius) 0;
  box-shadow: var(--shadow);
  font-size: 0.92rem;
  color: var(--muted);
}

.visual-note strong { color: var(--navy); }

.how-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border-block: 1px solid var(--line);
}

.how {
  padding: 1.6rem 1.4rem;
  border-inline-start: 1px solid var(--line);
  position: relative;
}

.how:first-child { border-inline-start: 0; }

.how .num {
  display: block;
  color: var(--gold);
  font-weight: 800;
  font-size: 2.4rem;
  line-height: 1;
  margin-bottom: 0.7rem;
  font-variant-numeric: tabular-nums;
}

.how p { color: var(--muted); margin-top: 0.4rem; }

.card { position: relative; }

.card-num {
  position: absolute;
  inset-inline-end: 1.1rem;
  top: 1rem;
  color: rgba(195, 155, 75, 0.9);
  font-weight: 800;
  font-size: 0.9rem;
  letter-spacing: 0.04em;
}

.card::before {
  content: "";
  position: absolute;
  inset-inline: 0;
  top: 0;
  height: 3px;
  background: var(--gold);
  opacity: 0;
  transition: opacity 240ms ease;
  border-radius: var(--radius) var(--radius) 0 0;
}

.card:hover::before { opacity: 1; }

.section {
  position: relative;
  padding-block: clamp(3.6rem, 8vw, 6.4rem);
}

.section.alt {
  background: var(--ice);
}

.section.dark {
  background: var(--navy);
  color: var(--white);
}

.section.dark h2,
.section.dark h3 {
  color: var(--white);
}

.section.dark .section-intro,
.section.dark .muted {
  color: #d7deeb;
}

.section-head {
  display: grid;
  grid-template-columns: minmax(0, 0.72fr) minmax(240px, 0.28fr);
  gap: 2rem;
  align-items: end;
  margin-bottom: 2rem;
}

.section-intro {
  color: var(--muted);
  font-size: 1.03rem;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-block: 1px solid var(--line);
}

.stat {
  padding: 1.4rem;
  border-inline-start: 1px solid var(--line);
}

.stat:first-child {
  border-inline-start: 0;
}

.stat .value {
  display: block;
  color: var(--green);
  font-size: 1.55rem;
  font-weight: 800;
  line-height: 1.25;
}

.gap-badge {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0.25rem 0.65rem;
  border: 1px dashed rgba(195, 155, 75, 0.9);
  border-radius: 999px;
  background: rgba(246, 237, 220, 0.82);
  color: #6f5014;
  font-size: 0.88rem;
  font-weight: 800;
  white-space: nowrap;
}

.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.service-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 1rem;
}

.card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  padding: 1.25rem;
  box-shadow: 0 10px 28px rgba(11, 27, 61, 0.05);
  min-width: 0;
}

.dark .card {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.16);
}

.card p,
.card li,
.muted {
  color: var(--muted);
}

.dark .card p,
.dark .card li {
  color: #d8dfeb;
}

.card h3 + p {
  margin-top: 0.65rem;
}

.line-icon {
  width: 48px;
  height: 48px;
  margin-bottom: 1rem;
  color: var(--green);
}

.dark .line-icon {
  color: var(--gold);
}

.plan-price {
  margin-block: 1rem;
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--gold);
}

.office-story {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(300px, 1.1fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}

.photo-frame,
.map-frame {
  min-height: 330px;
  border: 1px dashed rgba(195, 155, 75, 0.86);
  border-radius: var(--radius);
  background:
    linear-gradient(90deg, rgba(0, 108, 53, 0.08), transparent),
    repeating-linear-gradient(135deg, rgba(195, 155, 75, 0.09), rgba(195, 155, 75, 0.09) 10px, rgba(255, 255, 255, 0.74) 10px, rgba(255, 255, 255, 0.74) 24px);
  display: grid;
  place-items: center;
  text-align: center;
  color: #6f5014;
  font-weight: 800;
  padding: 1rem;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.85rem;
}

.form-grid.two {
  grid-template-columns: repeat(2, 1fr);
}

.field {
  display: grid;
  gap: 0.35rem;
}

.field.full {
  grid-column: 1 / -1;
}

label {
  color: var(--navy);
  font-weight: 800;
  font-size: 0.92rem;
}

input,
select,
textarea {
  width: 100%;
  min-height: 48px;
  border: 1px solid #bfccd9;
  border-radius: var(--radius);
  background: var(--white);
  color: var(--ink);
  padding: 0.72rem 0.85rem;
}

textarea {
  resize: vertical;
  min-height: 112px;
}

.steps {
  display: grid;
  gap: 0.8rem;
  counter-reset: step;
  padding: 0;
  margin: 0;
  list-style: none;
}

.steps li {
  position: relative;
  padding: 1rem 3.4rem 1rem 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
}

.ltr .steps li {
  padding: 1rem 1rem 1rem 3.4rem;
}

.steps li::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  inset-inline-start: 1rem;
  top: 1rem;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--green);
  color: var(--white);
  display: grid;
  place-items: center;
  font-weight: 800;
  line-height: 1;
}

.plain-list {
  padding: 0;
  margin: 0;
  list-style: none;
  display: grid;
  gap: 0.7rem;
}

.plain-list li {
  display: flex;
  gap: 0.65rem;
  align-items: flex-start;
}

.plain-list li::before {
  content: "";
  flex: 0 0 auto;
  width: 8px;
  height: 8px;
  margin-top: 0.75rem;
  border-radius: 50%;
  background: var(--gold);
}

.comparison {
  width: 100%;
  border-collapse: collapse;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--radius);
}

.comparison th,
.comparison td {
  padding: 0.9rem;
  text-align: start;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}

.comparison th {
  color: var(--white);
  background: rgba(255, 255, 255, 0.08);
}

.comparison td {
  color: #d8dfeb;
}

.page-hero {
  background: var(--ice);
  border-bottom: 1px solid var(--line);
  padding-block: clamp(3.5rem, 8vw, 5.4rem);
}

.page-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.68fr) minmax(280px, 0.32fr);
  gap: 2rem;
  align-items: start;
}

.footer {
  background: #07142f;
  color: var(--white);
  padding-block: 2.4rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr 0.8fr;
  gap: 1.5rem;
}

.footer a,
.footer p {
  color: #d7deeb;
}

.footer h2,
.footer h3 {
  color: var(--white);
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

.brand strong,
.agent-toggle,
.icon-btn {
  white-space: nowrap;
}

.agent-fab {
  position: fixed;
  inset-inline-start: 18px;
  bottom: 18px;
  z-index: 60;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 0;
  background: var(--green);
  color: var(--white);
  display: grid;
  place-items: center;
  box-shadow: 0 16px 34px rgba(0, 108, 53, 0.28);
  animation: pulse 2.8s ease-in-out infinite;
}

.agent-panel {
  position: fixed;
  inset-inline-start: 18px;
  bottom: 94px;
  z-index: 61;
  width: min(390px, calc(100vw - 36px));
  max-height: min(680px, calc(100vh - 118px));
  display: none;
  grid-template-rows: auto minmax(0, 1fr) auto;
  background: var(--white);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 22px 60px rgba(11, 27, 61, 0.22);
  overflow: hidden;
}

.agent-panel.open {
  display: grid;
}

.agent-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem;
  background: var(--navy);
  color: var(--white);
}

.agent-head strong {
  display: block;
  line-height: 1.25;
}

.agent-head span {
  color: #d8dfeb;
  font-size: 0.82rem;
}

.agent-close {
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: transparent;
  color: var(--white);
  border-radius: var(--radius);
}

.agent-log {
  padding: 1rem;
  overflow: auto;
  display: grid;
  gap: 0.75rem;
}

.bubble {
  max-width: 92%;
  padding: 0.75rem 0.9rem;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--ice);
}

.bubble.user {
  justify-self: end;
  background: rgba(0, 108, 53, 0.08);
  border-color: rgba(0, 108, 53, 0.18);
}

.quick-questions {
  display: flex;
  gap: 0.45rem;
  overflow-x: auto;
  padding: 0 1rem 0.8rem;
}

.quick-questions button {
  flex: 0 0 auto;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--white);
  color: var(--navy);
  padding: 0.45rem 0.8rem;
  font-weight: 700;
  white-space: nowrap;
}

.agent-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.55rem;
  padding: 1rem;
  border-top: 1px solid var(--line);
}

.agent-form input {
  min-width: 0;
}

.reveal {
  opacity: 1;
  transform: none;
}

.js .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 520ms ease, transform 520ms ease;
}

.js .reveal.visible {
  opacity: 1;
  transform: none;
}

@keyframes pulse {
  0%,
  100% {
    box-shadow: 0 16px 34px rgba(0, 108, 53, 0.26), 0 0 0 0 rgba(0, 108, 53, 0.18);
  }
  50% {
    box-shadow: 0 16px 34px rgba(0, 108, 53, 0.26), 0 0 0 14px rgba(0, 108, 53, 0);
  }
}

@media (max-width: 920px) {
  .nav-links {
    display: none;
  }

  .hero-grid,
  .office-story,
  .page-grid,
  .section-head {
    grid-template-columns: 1fr;
  }

  .hero-grid {
    padding-block: 3.3rem;
  }

  .how-grid {
    grid-template-columns: 1fr;
  }

  .how {
    border-inline-start: 0;
    border-bottom: 1px solid var(--line);
  }

  .how:last-child { border-bottom: 0; }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .stat:nth-child(3) {
    border-inline-start: 0;
  }

  .cards {
    grid-template-columns: 1fr;
  }

  .service-strip {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding-bottom: 0.8rem;
  }

  .service-strip .card {
    flex: 0 0 min(84vw, 340px);
    scroll-snap-align: start;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .container {
    width: min(100% - 24px, 1120px);
  }

  .top-alert .wrap {
    justify-content: flex-start;
    font-size: 0.88rem;
  }

  .nav {
    min-height: 66px;
  }

  .brand-mark {
    width: 42px;
    height: 42px;
  }

  .brand > span > span {
    display: none;
  }

  .nav-actions .agent-toggle {
    padding-inline: 0.7rem;
    font-size: 0.9rem;
  }

  .nav-actions .phone-text {
    display: none;
  }

  .nav-actions .icon-btn::before {
    content: "\260E";
    font-size: 1.2rem;
  }

  .nav {
    gap: 0.5rem;
  }

  h1,
  .page-title {
    font-size: clamp(1.85rem, 8.6vw, 2.5rem);
    line-height: 1.22;
  }

  .hero-actions .btn,
  .actions .btn {
    width: 100%;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }

  .stat {
    border-inline-start: 0;
    border-bottom: 1px solid var(--line);
  }

  .stat:last-child {
    border-bottom: 0;
  }

  .form-grid,
  .form-grid.two {
    grid-template-columns: 1fr;
  }

  .comparison {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }

  .agent-panel {
    inset-inline-start: 10px;
    bottom: 84px;
    width: calc(100vw - 20px);
  }

  .agent-fab {
    inset-inline-start: 14px;
    bottom: 14px;
  }
}

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

  .reveal {
    opacity: 1;
    transform: none;
  }
}
