/* ==========================================================================
   ABDELLI PAY — Home page (index.php) design layer
   Scoped under .home so nothing here can leak into account, service or admin
   pages. Loaded only on index.php (see includes/header.php).

   Tokens:  --h-*   (colour, type, space, radius, shadow)
   Type scale: 12 / 14 / 16 / 18 / 24 / 32 / 44 px (display is fluid)
   Space scale: 4 / 8 / 12 / 16 / 24 / 32 / 48 / 64 / 96 px
   ========================================================================== */

.home {
  /* colour */
  --h-navy-950: #021422;
  --h-navy-900: #031c30;
  --h-navy-800: #042940;
  --h-cyan: #00e1e8;
  --h-cyan-soft: rgba(0, 225, 232, 0.14);
  --h-cyan-line: rgba(0, 225, 232, 0.28);
  --h-ink: #0b2543;
  --h-muted: #4a6275;             /* ~6:1 on #f4f8fb (AA) */
  --h-on-dark: #f2f8fc;
  --h-on-dark-muted: #b4c9d8;     /* ~10:1 on navy-950 */
  --h-line: #e2ecf2;

  /* type (never below 12px) */
  --h-fs-12: 0.75rem;
  --h-fs-14: 0.875rem;
  --h-fs-16: 1rem;
  --h-fs-18: 1.125rem;
  --h-fs-24: 1.5rem;
  --h-fs-32: 2rem;
  --h-fs-display: clamp(2rem, 1.35rem + 2.7vw, 2.75rem);

  /* space */
  --h-s-1: 4px;
  --h-s-2: 8px;
  --h-s-3: 12px;
  --h-s-4: 16px;
  --h-s-5: 24px;
  --h-s-6: 32px;
  --h-s-7: 48px;
  --h-s-8: 64px;
  --h-s-9: 96px;

  /* shape */
  --h-radius-sm: 8px;
  --h-radius: 12px;
  --h-radius-lg: 20px;
  --h-radius-pill: 999px;

  /* elevation (two levels only) */
  --h-shadow-1: 0 6px 18px rgba(2, 20, 34, 0.12);
  --h-shadow-2: 0 24px 56px rgba(0, 0, 0, 0.42);
}

.home .h-wrap {
  width: min(1200px, calc(100% - 32px));
  margin-inline: auto;
}

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */
.home .h-hero {
  position: relative;
  color: var(--h-on-dark);
  background:
    radial-gradient(60rem 28rem at 85% -10%, rgba(0, 225, 232, 0.16), transparent 60%),
    radial-gradient(40rem 24rem at 0% 100%, rgba(2, 132, 199, 0.18), transparent 65%),
    var(--h-navy-950);
  border-bottom: 1px solid var(--h-cyan-soft);
  padding-block: var(--h-s-6) var(--h-s-7);
}

.home .h-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--h-s-6);
  align-items: center;
}

.home .h-hero-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--h-s-4);
}

.home .h-pill {
  display: inline-flex;
  align-items: center;
  gap: var(--h-s-2);
  margin: 0;
  padding: 6px var(--h-s-3);
  border: 1px solid var(--h-cyan-line);
  border-radius: var(--h-radius-pill);
  background: var(--h-cyan-soft);
  color: var(--h-on-dark);
  font-size: var(--h-fs-12);
  font-weight: 700;
  line-height: 1.4;
}

.home .h-pill-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--h-cyan);
  flex-shrink: 0;
}

.home .h-hero-title {
  margin: 0;
  color: #ffffff;
  font-size: var(--h-fs-display);
  font-weight: 800;
  line-height: 1.18;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

html[lang="ar"] .home .h-hero-title {
  line-height: 1.4;
  letter-spacing: 0;
}

.home .h-hero-title .h-accent {
  display: block;
  color: var(--h-cyan);
}

.home .h-hero-lead {
  margin: 0;
  max-width: 34rem;
  color: var(--h-on-dark-muted);
  font-size: var(--h-fs-16);
  line-height: 1.7;
}

.home .h-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--h-s-3);
  width: 100%;
  margin-top: var(--h-s-1);
}

.home .h-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--h-s-2);
  min-height: 48px;
  padding: var(--h-s-2) var(--h-s-5);
  border: 1px solid transparent;
  border-radius: var(--h-radius);
  font-size: var(--h-fs-16);
  font-weight: 700;
  line-height: 1.2;
  transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.home .h-btn-primary {
  flex: 1 1 14rem;
  background: var(--h-cyan);
  color: var(--h-navy-950);
  box-shadow: 0 8px 22px rgba(0, 225, 232, 0.28);
}

.home .h-btn-primary:hover {
  background: #4ff1f6;
  transform: translateY(-1px);
}

.home .h-btn-secondary {
  flex: 1 1 10rem;
  border-color: var(--h-cyan-line);
  background: rgba(255, 255, 255, 0.06);
  color: var(--h-on-dark);
}

.home .h-btn-secondary:hover {
  background: var(--h-cyan-soft);
  border-color: var(--h-cyan);
}

.home .h-btn:focus-visible,
.home .h-hero a:focus-visible {
  outline: 3px solid var(--h-cyan);
  outline-offset: 3px;
}

.home .h-btn-arrow {
  font-size: var(--h-fs-18);
  line-height: 1;
}

.home .h-chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--h-s-2);
  margin: var(--h-s-1) 0 0;
  padding: 0;
  list-style: none;
}

.home .h-chips li {
  display: inline-flex;
  align-items: center;
  gap: var(--h-s-2);
  padding: 8px var(--h-s-3);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--h-radius-pill);
  background: rgba(255, 255, 255, 0.04);
  color: var(--h-on-dark);
  font-size: var(--h-fs-14);
  line-height: 1.4;
}

.home .h-chips svg {
  width: 16px;
  height: 16px;
  color: var(--h-cyan);
}

/* Visual ------------------------------------------------------------------ */
.home .h-hero-visual {
  display: flex;
  flex-direction: column;
  gap: var(--h-s-3);
  min-width: 0;
}

.home .h-hero-media {
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--h-cyan-line);
  border-radius: var(--h-radius-lg);
  background: var(--h-navy-900);
  box-shadow: var(--h-shadow-2);
  aspect-ratio: 3 / 2;
}

.home .h-hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.home .h-marks {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--h-s-2) var(--h-s-3);
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--h-on-dark-muted);
  font-size: var(--h-fs-12);
}

.home .h-marks-label {
  font-weight: 700;
}

.home .h-mark {
  padding: 4px 10px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--h-radius-sm);
  background: rgba(255, 255, 255, 0.05);
  color: #ffffff;
  font-size: var(--h-fs-12);
  font-weight: 800;
  letter-spacing: 0.06em;
  line-height: 1.4;
}

.home .h-mark-group {
  display: inline-flex;
  align-items: center;
  gap: var(--h-s-2);
  white-space: nowrap;
}

.home .h-mark-sub {
  color: var(--h-on-dark-muted);
  font-weight: 600;
  letter-spacing: 0.02em;
}

/* Tablet and up: copy beside image --------------------------------------- */
@media (min-width: 960px) {
  .home .h-hero {
    padding-block: var(--h-s-8) var(--h-s-9);
  }

  .home .h-hero-grid {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    gap: var(--h-s-8);
  }

  .home .h-hero-actions {
    width: auto;
  }

  .home .h-btn-primary,
  .home .h-btn-secondary {
    flex: 0 0 auto;
  }
}

@media (max-width: 480px) {
  .home .h-btn-primary,
  .home .h-btn-secondary {
    flex: 1 1 100%;
  }
}

/* --------------------------------------------------------------------------
   Sections (shared heading) and services grid
   -------------------------------------------------------------------------- */
.home .h-section {
  padding-block: var(--h-s-7);
}

.home .h-sec-head {
  max-width: 40rem;
  margin: 0 auto var(--h-s-6);
  text-align: center;
}

.home .h-eyebrow {
  margin: 0 0 var(--h-s-2);
  color: #006b7f;                 /* ~5.7:1 on the page background */
  font-size: var(--h-fs-12);
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

html[lang="ar"] .home .h-eyebrow {
  letter-spacing: 0;
}

.home .h-sec-title {
  margin: 0 0 var(--h-s-2);
  color: var(--h-ink);
  font-size: var(--h-fs-24);
  font-weight: 800;
  line-height: 1.3;
  text-wrap: balance;
}

.home .h-sec-lead {
  margin: 0;
  color: var(--h-muted);
  font-size: var(--h-fs-16);
  line-height: 1.7;
}

.home .h-tiles {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--h-s-3);
  margin: 0;
  padding: 0;
  list-style: none;
}

.home .h-tile {
  display: flex;
  align-items: center;
  gap: var(--h-s-4);
  height: 100%;
  min-height: 72px;
  padding: var(--h-s-4);
  border: 1px solid var(--h-line);
  border-radius: var(--h-radius);
  background: #ffffff;
  color: var(--h-ink);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.home .h-tile:hover {
  border-color: #7fd6df;
  box-shadow: var(--h-shadow-1);
  transform: translateY(-2px);
}

.home .h-tile:focus-visible {
  outline: 3px solid var(--h-cyan);
  outline-offset: 2px;
}

.home .h-tile-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  border-radius: var(--h-radius);
  color: #ffffff;
}

.home .h-tile-icon svg {
  width: 24px;
  height: 24px;
}

.home .h-tile-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
}

.home .h-tile-title {
  margin: 0;
  color: var(--h-ink);
  font-size: var(--h-fs-16);
  font-weight: 800;
  line-height: 1.35;
}

.home .h-tile-meta {
  color: var(--h-muted);
  font-size: var(--h-fs-14);
  line-height: 1.5;
}

.home .h-tile-tag {
  align-self: flex-start;
  margin-top: var(--h-s-1);
  padding: 2px 8px;
  border-radius: var(--h-radius-pill);
  background: #fff4d6;
  color: #7a4e00;
  font-size: var(--h-fs-12);
  font-weight: 700;
  line-height: 1.5;
}

.home .h-tile-go {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  color: #006b7f;
}

html[dir="rtl"] .home .h-tile-go {
  transform: scaleX(-1);
}

@media (min-width: 640px) {
  .home .h-tiles {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 960px) {
  .home .h-section {
    padding-block: var(--h-s-8);
  }

  .home .h-sec-title {
    font-size: var(--h-fs-32);
  }

  .home .h-tiles {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--h-s-4);
  }
}

/* --------------------------------------------------------------------------
   How it works (3 steps) and trust facts
   -------------------------------------------------------------------------- */
.home .h-section-alt {
  background: #ffffff;
  border-block: 1px solid var(--h-line);
}

.home .h-steps,
.home .h-facts {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--h-s-4);
  margin: 0;
  padding: 0;
  list-style: none;
}

.home .h-step,
.home .h-fact {
  display: flex;
  flex-direction: column;
  gap: var(--h-s-2);
  padding: var(--h-s-5);
  border: 1px solid var(--h-line);
  border-radius: var(--h-radius-lg);
  background: #ffffff;
}

.home .h-section-alt .h-fact {
  background: var(--surface, #f4f8fb);
}

.home .h-step-num,
.home .h-fact-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin-bottom: var(--h-s-2);
  border-radius: 50%;
  background: var(--h-navy-950);
  color: var(--h-cyan);
  font-size: var(--h-fs-18);
  font-weight: 800;
  line-height: 1;
}

.home .h-fact-icon svg {
  width: 22px;
  height: 22px;
}

.home .h-step-title,
.home .h-fact-title {
  margin: 0;
  color: var(--h-ink);
  font-size: var(--h-fs-18);
  font-weight: 800;
  line-height: 1.35;
}

.home .h-step-text,
.home .h-fact-text {
  margin: 0;
  color: var(--h-muted);
  font-size: var(--h-fs-16);
  line-height: 1.7;
}

/* --------------------------------------------------------------------------
   FAQ
   -------------------------------------------------------------------------- */
.home .h-faq-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--h-s-6);
}

.home .h-faq-intro .h-sec-title,
.home .h-faq-intro .h-sec-lead {
  text-align: start;
}

.home .h-faq-intro .h-btn {
  margin-top: var(--h-s-5);
}

.home .h-btn-dark {
  border-color: var(--h-navy-950);
  background: var(--h-navy-950);
  color: #ffffff;
}

.home .h-btn-dark:hover {
  background: var(--h-navy-800);
  transform: translateY(-1px);
}

.home .h-btn-dark:focus-visible,
.home .h-faq-list summary:focus-visible {
  outline: 3px solid var(--h-cyan);
  outline-offset: 2px;
}

.home .h-faq-list {
  display: flex;
  flex-direction: column;
  gap: var(--h-s-3);
}

.home .h-faq-list details {
  border: 1px solid var(--h-line);
  border-radius: var(--h-radius);
  background: #ffffff;
}

.home .h-faq-list details[open] {
  border-color: #7fd6df;
}

.home .h-faq-list summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--h-s-4);
  min-height: 56px;
  padding: var(--h-s-3) var(--h-s-4);
  color: var(--h-ink);
  font-size: var(--h-fs-16);
  font-weight: 700;
  line-height: 1.5;
  cursor: pointer;
  list-style: none;
}

.home .h-faq-list summary::-webkit-details-marker {
  display: none;
}

.home .h-faq-list summary::after {
  content: "";
  width: 10px;
  height: 10px;
  flex-shrink: 0;
  border-right: 2px solid #006b7f;
  border-bottom: 2px solid #006b7f;
  transform: rotate(45deg);
  transition: transform 0.2s ease;
}

.home .h-faq-list details[open] summary::after {
  transform: rotate(-135deg);
}

.home .h-faq-list details p {
  margin: 0;
  padding: 0 var(--h-s-4) var(--h-s-4);
  color: var(--h-muted);
  font-size: var(--h-fs-16);
  line-height: 1.7;
}

/* --------------------------------------------------------------------------
   Final call to action (also the #support anchor)
   -------------------------------------------------------------------------- */
.home .h-cta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--h-s-5);
  padding: var(--h-s-6) var(--h-s-5);
  border: 1px solid var(--h-cyan-line);
  border-radius: var(--h-radius-lg);
  background:
    radial-gradient(40rem 20rem at 100% 0%, rgba(0, 225, 232, 0.16), transparent 60%),
    var(--h-navy-950);
  color: var(--h-on-dark);
}

.home .h-cta-title {
  margin: 0 0 var(--h-s-2);
  color: #ffffff;
  font-size: var(--h-fs-24);
  font-weight: 800;
  line-height: 1.3;
  text-wrap: balance;
}

.home .h-cta-text {
  margin: 0;
  max-width: 36rem;
  color: var(--h-on-dark-muted);
  font-size: var(--h-fs-16);
  line-height: 1.7;
}

.home .h-cta-text a {
  color: var(--h-cyan);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.home .h-cta .h-hero-actions {
  margin-top: 0;
}

.home .h-cta a:focus-visible {
  outline: 3px solid var(--h-cyan);
  outline-offset: 3px;
}

@media (min-width: 768px) {
  .home .h-steps {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .home .h-facts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .home .h-cta {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: var(--h-s-7);
  }

  .home .h-cta .h-hero-actions {
    width: auto;
    flex-shrink: 0;
  }

  .home .h-cta .h-btn-primary,
  .home .h-cta .h-btn-secondary {
    flex: 0 0 auto;
  }
}

@media (min-width: 960px) {
  .home .h-facts {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .home .h-faq-grid {
    grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
    gap: var(--h-s-8);
    align-items: start;
  }

  .home .h-faq-intro {
    position: sticky;
    top: 104px;
  }

  .home .h-cta-title {
    font-size: var(--h-fs-32);
  }
}

@media (prefers-reduced-motion: reduce) {
  .home .h-faq-list summary::after {
    transition: none;
  }

  .home .h-btn-dark {
    transition: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .home .h-tile {
    transition: none;
  }

  .home .h-tile:hover {
    transform: none;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .home .h-pill-dot {
    animation: h-pulse 2.4s ease-in-out infinite;
  }
}

@media (prefers-reduced-motion: reduce) {
  .home .h-btn {
    transition: none;
  }
}

@keyframes h-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(0, 225, 232, 0.5); }
  50% { box-shadow: 0 0 0 6px rgba(0, 225, 232, 0); }
}
