/* DZPayConnect — sales landing. Mobile-first, RTL/LTR-safe (logical props).
   Skill rules (ui-skill.md): named 150ms transitions, scale(.96) press,
   shadows for depth / borders for structure, concentric radii, gold focus. */

:root {
  --green-950: #0e241e;
  --green-900: #122536;
  --green-800: #16402f;
  --green-700: #1d5c4e;
  --gold: #f5b94f;
  --gold-deep: #8a5a2e;
  --cream: #faf6ef;
  --card: #ffffff;
  --ink: #152b26;
  --muted: #3f565e;
  --wa: #1faa55;
  --wa-dark: #178544;
  --radius-lg: 22px;
  --radius-md: 14px;
  --ease: cubic-bezier(0.2, 0, 0, 1);
}

* { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  overflow-x: clip;
}

body {
  margin: 0;
  font-family: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  background: var(--cream);
  color: var(--ink);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

html[lang="ar"] body {
  font-family: "Cairo", "Manrope", system-ui, sans-serif;
  line-height: 1.9;
}

html[lang="ar"] [class],
html[lang="ar"] h1,
html[lang="ar"] h2,
html[lang="ar"] h3 {
  letter-spacing: 0 !important;
}

h1, h2, h3 {
  line-height: 1.35;
  text-wrap: balance;
  margin: 0 0 0.6em;
  overflow-wrap: break-word;
}
html[lang="ar"] h1,
html[lang="ar"] h2,
html[lang="ar"] h3 { line-height: 1.6; }

h1 { font-size: clamp(1.9rem, 5.6vw, 3.2rem); font-weight: 800; }
h2 { font-size: clamp(1.4rem, 4vw, 2.1rem); font-weight: 800; }

p { margin: 0 0 1em; text-wrap: pretty; }

.container {
  width: min(1080px, 100% - 2.5rem);
  margin-inline: auto;
}

/* ---------- header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgb(14 36 30 / 0.96);
  backdrop-filter: blur(8px);
  color: #fffaf1;
  border-bottom: 1px solid rgb(255 255 255 / 0.12);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  padding-block: 0.7rem;
  flex-wrap: wrap;
  min-width: 0;
}

.header-inner > * { min-width: 0; }

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: inherit;
  text-decoration: none;
  min-height: 44px;
}

.brand img {
  height: 48px;
  width: auto;
  object-fit: contain;
  border-radius: 10px;
  outline: 1px solid rgb(255 255 255 / 0.25);
  outline-offset: -1px;
  flex-shrink: 0;
}

/* Wordmark lives inside the logo artwork — no duplicate text */
.brand .brand-name { display: none; }

.brand-name { font-weight: 800; font-size: 1.05rem; }

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

/* Tap-to-call number: quiet pill on desktop, full-width call bar on phones */
.phone-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: 44px;
  padding: 0.45rem 1rem;
  border-radius: 999px;
  border: 1px solid rgb(245 185 79 / 0.45);
  color: var(--gold);
  font-weight: 800;
  font-size: 0.92rem;
  font-variant-numeric: tabular-nums;
  text-decoration: none;
  white-space: nowrap;
  transition-property: color, background-color, border-color;
  transition-duration: 150ms;
  transition-timing-function: var(--ease);
}
.phone-cta:hover { background: rgb(245 185 79 / 0.12); }
.phone-cta:active { scale: 0.96; }

.lang-switch {
  display: flex;
  background: rgb(255 255 255 / 0.08);
  border: 1px solid rgb(255 255 255 / 0.16);
  border-radius: 999px;
  padding: 3px;
}

.lang-switch button {
  border: 0;
  background: transparent;
  color: rgb(255 255 255 / 0.75);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  min-width: 44px;
  min-height: 36px;
  padding-inline: 0.6rem;
  border-radius: 999px;
  cursor: pointer;
  transition-property: background-color, color;
  transition-duration: 150ms;
  transition-timing-function: var(--ease);
}

.lang-switch button[aria-pressed="true"] {
  background: var(--gold);
  color: var(--green-950);
}

.header-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1rem;
  padding-block: 0 0.7rem;
  font-size: 0.88rem;
}

.header-nav a {
  color: rgb(255 255 255 / 0.82);
  text-decoration: none;
  font-weight: 600;
  min-height: 32px;
  display: inline-flex;
  align-items: center;
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font: inherit;
  font-weight: 800;
  text-decoration: none;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  min-height: 52px;
  padding: 0.7rem 1.5rem;
  transition-property: color, background-color, border-color, box-shadow, transform, scale;
  transition-duration: 150ms;
  transition-timing-function: var(--ease);
}
.btn:active { scale: 0.96; }

.btn-sm { min-height: 44px; padding: 0.45rem 1rem; font-size: 0.88rem; }
.btn-lg { font-size: 1.05rem; }

.btn-whatsapp { background: var(--wa); color: #fff; box-shadow: 0 10px 24px -12px rgb(31 170 85 / 0.8); }
.btn-whatsapp:hover { background: var(--wa-dark); }
.btn-ghost { border-color: rgb(255 255 255 / 0.35); color: #fffaf1; }
.btn-ghost:hover { border-color: var(--gold); color: var(--gold); }
.btn-outline { border-color: var(--green-700); color: var(--green-700); background: transparent; }
.btn-outline:hover { background: var(--green-700); color: #fff; }

.cta-row {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 1.4rem;
}
.cta-row .btn { width: 100%; }

/* ---------- hero ---------- */
.hero {
  background: var(--green-950);
  color: #fffaf1;
  padding-block: 2.75rem 3rem;
}

.eyebrow {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--gold);
  background: rgb(245 185 79 / 0.12);
  border: 1px solid rgb(245 185 79 / 0.35);
  border-radius: 999px;
  padding: 0.35rem 1rem;
  margin-bottom: 1.1rem;
  line-height: 1.7;
}

.hero .lead { font-size: 1.12rem; color: rgb(255 250 241 / 0.88); max-width: 44rem; }
.slogan { font-weight: 800; font-size: 1.15rem; color: var(--gold); }

.trust-chips {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  padding: 0;
  margin: 1.5rem 0 0;
}
.trust-chips li {
  font-size: 0.9rem;
  font-weight: 700;
  border: 1px solid rgb(255 255 255 / 0.2);
  background: rgb(255 255 255 / 0.06);
  border-radius: 999px;
  padding: 0.4rem 0.95rem;
}

/* ---------- pain ---------- */
.pain { padding-block: 2.5rem; }
.pain h2 { max-width: 40rem; }
.pain-list {
  list-style: none;
  padding: 0;
  margin: 1.25rem 0;
  display: grid;
  gap: 0.8rem;
}
.pain-list li {
  background: var(--card);
  border: 1px solid #e7ddcc; /* structure */
  border-inline-start: 5px solid #d8553f;
  border-radius: var(--radius-md);
  padding: 0.9rem 1.1rem;
  font-weight: 600;
  box-shadow: 0 1px 2px rgb(20 40 30 / 0.06), 0 10px 24px -18px rgb(20 40 30 / 0.35);
}
.pain-solution {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--green-700);
}

/* ---------- services ---------- */
.services { padding-block: 2.5rem; background: #f3ecdd; }
.cards {
  display: grid;
  gap: 1rem;
  margin-top: 1.5rem;
}
.card {
  background: var(--card);
  border: 1px solid #e2d7c2; /* structure */
  border-radius: var(--radius-lg);
  padding: 1.4rem;
  box-shadow: 0 1px 2px rgb(20 40 30 / 0.06), 0 18px 36px -24px rgb(20 40 30 / 0.4);
}
.card-num {
  display: inline-grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 12px; /* concentric: 22px outer − ~10px visual pad */
  background: var(--green-700);
  color: #fff;
  font-weight: 800;
  margin-bottom: 0.8rem;
}
.card h3 { font-size: 1.15rem; }
.card ul { margin: 0.5rem 0 0; padding-inline-start: 1.2rem; color: var(--muted); }
.card li { margin-bottom: 0.25rem; }
.card > p { color: var(--muted); }

/* ---------- steps ---------- */
.how { padding-block: 2.5rem; }
.steps {
  list-style: none;
  counter-reset: step;
  padding: 0;
  margin: 1.5rem 0;
  display: grid;
  gap: 0;
}
.steps li {
  counter-increment: step;
  position: relative;
  padding-inline-start: 3.4rem;
  padding-bottom: 1.4rem;
}
.steps li::before {
  content: counter(step);
  position: absolute;
  inset-inline-start: 0;
  top: 0;
  width: 2.3rem;
  height: 2.3rem;
  border-radius: 50%;
  background: var(--gold);
  color: var(--green-950);
  font-weight: 800;
  display: grid;
  place-items: center;
}
.steps li:not(:last-child)::after {
  content: "";
  position: absolute;
  inset-inline-start: 1.12rem;
  top: 2.5rem;
  bottom: 0.1rem;
  width: 2px;
  background: #d9cdae;
}
.steps h3 { font-size: 1.08rem; margin-bottom: 0.2rem; }
.steps p { color: var(--muted); margin: 0; }
.risk {
  background: #e9f3ec;
  border: 1px solid #bcd8c4;
  border-radius: var(--radius-md);
  padding: 1rem 1.2rem;
  font-weight: 800;
  color: var(--green-800);
}

/* ---------- final ---------- */
.final {
  background: var(--green-900);
  color: #fffaf1;
  padding-block: 3rem;
  text-align: center;
}
.final p { color: rgb(255 250 241 / 0.85); max-width: 38rem; margin-inline: auto; }
.final .cta-row { max-width: 30rem; margin-inline: auto; }

/* ---------- footer ---------- */
.site-footer { background: var(--green-950); color: rgb(255 250 241 / 0.7); }
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.5rem;
  align-items: center;
  justify-content: space-between;
  padding-block: 1.2rem;
  font-size: 0.9rem;
}

/* ---------- focus / motion ---------- */
:where(a, button):focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: 6px;
}

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

/* ---------- small phones: compact header, everything still visible ---------- */
@media (max-width: 430px) {
  .container { width: min(1080px, 100% - 2rem); }
  .brand-name { display: none; } /* logo image remains; alt text keeps the name */
  .brand img { width: auto; height: 28px; }
  .brand { min-height: 40px; }
  .header-inner { gap: 0.5rem; flex-wrap: nowrap; padding-block: 0.5rem; }
  .header-actions { gap: 0.35rem; flex-wrap: nowrap; }
  .lang-switch button { min-width: 36px; padding-inline: 0.3rem; font-size: 0.72rem; }
  #header-cta { padding-inline: 0.5rem; }
  #header-cta [data-i18n] {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }
  /* Phone stays fixed in the header as a compact tap-to-call icon button */
  .phone-cta { flex: none; padding-inline: 0.5rem; }
  .phone-cta span[dir="ltr"] {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }
  .header-nav { padding-block: 0 0.5rem; }
  h1 { font-size: clamp(1.65rem, 8vw, 1.9rem); }
}

/* ---------- larger screens ---------- */
@media (min-width: 640px) {  .cta-row { flex-direction: row; flex-wrap: wrap; }
  .cta-row .btn { width: auto; }
  .cards { grid-template-columns: repeat(2, 1fr); }
  .final .cta-row { justify-content: center; }
}

@media (min-width: 960px) {
  .cards { grid-template-columns: repeat(3, 1fr); }
  .card:last-child { grid-column: span 1; }
  .hero { padding-block: 4rem; }
}
