:root {
  --home-primary: #425c81;
  --home-primary-deep: #314563;
  --home-primary-soft: rgba(66, 92, 129, 0.12);
  --home-accent: #aee5d0;
  --home-accent-strong: #8ad6ba;
  --home-surface: #f2f2f2;
  --home-surface-muted: #e4e4e4;
  --home-card: rgba(255, 255, 255, 0.8);
  --home-card-border: rgba(66, 92, 129, 0.14);
  --home-text: #1f2430;
  --home-text-soft: rgba(31, 36, 48, 0.76);
  --home-shadow: 0 18px 50px rgba(66, 92, 129, 0.12);
}

.homepage-body {
  background:
    radial-gradient(circle at bottom left, rgba(174, 229, 208, 0.34), transparent 28%),
    radial-gradient(circle at bottom right, rgba(66, 92, 129, 0.12), transparent 24%),
    linear-gradient(180deg, var(--home-surface-muted) 0%, var(--home-surface) 62%, #f7f8fb 100%);
  color: var(--home-text);
}

.home-page-shell {
  width: 100%;
}

.home-page {
  direction: rtl;
  overflow: clip;
}

.home-page,
.home-page p,
.home-page a,
.home-page li,
.home-page h1,
.home-page h2,
.home-page h3,
.home-page h4,
.home-page blockquote {
  font-family: "Noto Kufi Arabic", sans-serif;
}

.home-section {
  position: relative;
  padding: 2rem 0 4rem;
}

.home-section-inner {
  width: min(1180px, calc(100vw - 2rem));
  margin: 0 auto;
}

.section-kicker {
  margin: 0 0 0.85rem;
  color: var(--home-primary);
  font-size: 0.82rem;
  letter-spacing: 0.08em;
}

.section-heading {
  max-width: 720px;
  margin-bottom: 2.5rem;
}

.section-heading h2,
.hero-copy h1,
.qr-copy h2,
.cta-copy h2 {
  line-height: 1.2;
}

.section-heading h2 {
  margin: 0 0 1rem;
  font-size: clamp(2rem, 4vw, 3.25rem);
}

.section-heading p,
.hero-lead,
.qr-copy > p,
.cta-copy p {
  line-height: 1.95;
  color: var(--home-text-soft);
}

.hero-layout,
.qr-focus-layout,
.cta-layout {
  display: grid;
  gap: 2rem;
}

.hero-layout {
  align-items: center;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
  min-height: calc(100vh - 100px);
  padding: 1rem 0 4.5rem;
}

.hero-copy h1 {
  margin: 0 0 1rem;
  font-size: clamp(2.1rem, 4.1vw, 4rem);
}

.hero-lead {
  max-width: 640px;
  margin-bottom: 1.5rem;
  font-size: 1.04rem;
}

.home-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  min-height: 52px;
  padding: 0.85rem 1.4rem;
  border-radius: 999px;
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 700;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background-color 0.25s ease;
}

.home-button:hover,
.home-button:focus {
  transform: translateY(-2px);
}

.home-button-primary {
  color: #fff;
  background: linear-gradient(135deg, var(--home-primary) 0%, var(--home-primary-deep) 100%);
  box-shadow: 0 20px 45px rgba(66, 92, 129, 0.2);
}

.home-button-secondary {
  color: var(--home-primary-deep);
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--home-card-border);
}

.hero-stat-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.hero-stat-list li {
  padding: 0.7rem 0.95rem;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid var(--home-card-border);
  border-radius: 999px;
  font-size: 0.86rem;
  color: var(--home-primary-deep);
}

.hero-device-stack {
  position: relative;
  min-height: 680px;
}

.hero-device-card,
.hero-floating-note,
.story-visual-screen,
.feature-card,
.statistic-card,
.review-card,
.contact-card {
  border: 1px solid var(--home-card-border);
  background: var(--home-card);
  box-shadow: var(--home-shadow);
  backdrop-filter: blur(18px);
}

.hero-device-card {
  position: absolute;
  overflow: hidden;
  border-radius: 28px;
}

.hero-device-card img,
.qr-visual-card img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Preferred hero artwork: tall portrait around 0.54-0.60, roughly 1200x2000px.
   Keep important text away from the top/bottom 10-12% to avoid responsive crop issues. */
.hero-device-card-main {
  top: 0;
  right: 1.25rem;
  width: min(340px, 72%);
  aspect-ratio: 0.56;
}

.hero-floating-note {
  position: absolute;
  top: auto;
  left: 0;
  bottom: 1.75rem;
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.9rem 1rem;
  border-radius: 18px;
  max-width: 270px;
}

.hero-floating-note i {
  color: var(--home-primary);
  font-size: 1.2rem;
}

.hero-floating-note span {
  display: block;
  color: rgba(66, 92, 129, 0.82);
  font-size: 0.78rem;
}

.story-layout {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(300px, 0.88fr);
  gap: 0.35rem;
  align-items: start;
}

.story-visual-column {
  position: relative;
  min-height: 560px;
  overflow: clip;
  z-index: 1;
}

.story-visual-peek {
  position: relative;
  width: min(560px, 112%);
  margin-inline-start: -8rem;
  margin-inline-end: auto;
  transform: rotate(-8deg) translateY(1rem);
  filter: drop-shadow(0 24px 48px rgba(31, 36, 48, 0.16));
}

.story-visual-peek img {
  display: block;
  width: 100%;
  height: auto;
}

.story-steps-column {
  display: grid;
  gap: 1.1rem;
  max-width: 780px;
  position: relative;
  z-index: 2;
  margin-inline-end: -7.5rem;
  padding-top: 1rem;
}

.story-step {
  padding: 1.35rem 1.2rem;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid var(--home-card-border);
  box-shadow: 0 16px 34px rgba(66, 92, 129, 0.08);
  transition: transform 0.25s ease, background-color 0.25s ease, border-color 0.25s ease;
}

.story-step-eyebrow {
  margin: 0 0 0.65rem;
  color: var(--home-primary);
  font-size: 0.8rem;
}

.story-step-badge {
  display: inline-flex;
  width: fit-content;
  margin-bottom: 0.8rem;
  padding: 0.55rem 0.75rem;
  border-radius: 999px;
  background: rgba(174, 229, 208, 0.52);
  color: var(--home-primary-deep);
  font-size: 0.78rem;
}

.story-step h3 {
  margin: 0 0 0.7rem;
  font-size: 1.25rem;
}

.story-step p {
  margin: 0;
  color: var(--home-text-soft);
  line-height: 1.9;
}

.qr-focus-layout,
.cta-layout {
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.9fr);
  align-items: center;
}

.qr-bullets {
  display: grid;
  gap: 1rem;
}

.qr-bullets div,
.contact-card-static {
  padding: 1rem 1.1rem;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.66);
  border: 1px solid rgba(174, 229, 208, 0.68);
}

.qr-bullets strong {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 1rem;
}

.qr-bullets p {
  margin: 0;
  color: var(--home-text-soft);
}

.qr-visual {
  position: relative;
  min-height: 520px;
  isolation: isolate;
}

.qr-visual-card {
  position: absolute;
  overflow: visible;
  border: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  pointer-events: none;
}

.qr-visual-card-main {
  top: 0.5rem;
  right: 1rem;
  width: min(320px, 74%);
  aspect-ratio: 0.6;
  z-index: 1;
}

.qr-visual-card-secondary {
  left: 0;
  bottom: 2rem;
  width: min(220px, 46%);
  aspect-ratio: 0.49;
  z-index: 2;
}

.qr-visual-card img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: saturate(0.92);
}

.qr-copy {
  position: relative;
  z-index: 3;
}

.qr-bullets {
  position: relative;
  z-index: 3;
}

.feature-grid,
.statistics-grid,
.review-grid,
.cta-contact-grid {
  display: grid;
  gap: 1rem;
}

.feature-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.statistics-section {
  padding-bottom: 2rem;
}

.statistics-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.statistic-card {
  padding: 1.35rem 1.2rem;
  border-radius: 26px;
  text-align: center;
}

.statistic-icon {
  margin-bottom: 0.75rem;
}

.statistic-value {
  display: block;
  color: var(--home-primary-deep);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  line-height: 1.1;
}

.statistic-label {
  margin: 0.65rem 0 0;
  color: var(--home-text-soft);
  font-size: 1rem;
  font-weight: 700;
}

.feature-card {
  padding: 1.35rem 1.2rem;
  border-radius: 26px;
}

.feature-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  margin-bottom: 1rem;
  border-radius: 18px;
  background: rgba(174, 229, 208, 0.46);
  color: var(--home-primary);
  font-size: 1.35rem;
}

.feature-card h3 {
  margin: 0 0 0.7rem;
  font-size: 1.08rem;
}

.feature-card p,
.review-quote {
  margin: 0;
  line-height: 1.9;
  color: var(--home-text-soft);
}

.review-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.review-card {
  margin: 0;
  padding: 1.5rem 1.3rem;
  border-radius: 28px;
}

.review-author {
  margin-top: 1rem;
  color: var(--home-primary);
  font-size: 0.9rem;
}

.cta-contact-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.contact-card {
  display: grid;
  gap: 0.35rem;
  min-height: 154px;
  padding: 1.1rem 1rem;
  border-radius: 24px;
  color: inherit;
  text-decoration: none;
}

.contact-card i {
  color: var(--home-primary);
  font-size: 1.25rem;
}

.contact-label {
  color: rgba(66, 92, 129, 0.78);
  font-size: 0.82rem;
}

.contact-card strong {
  font-size: 1rem;
}

.contact-card small {
  color: rgba(66, 92, 129, 0.72);
}

.home-js [data-reveal] {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

.home-js [data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .home-button,
  .story-step,
  .home-js [data-reveal] {
    transition: none !important;
    transform: none !important;
  }
}

@media (max-width: 991.98px) {
  .hero-layout,
  .qr-focus-layout,
  .cta-layout,
  .feature-grid,
  .review-grid,
  .cta-contact-grid {
    grid-template-columns: 1fr;
  }

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

  .hero-layout {
    min-height: auto;
    padding-top: 0;
  }

  .hero-device-stack,
  .qr-visual {
    min-height: 600px;
  }

  .hero-device-card-main,
  .qr-visual-card-main {
    right: 0.25rem;
    width: min(300px, 70vw);
  }

  .hero-floating-note {
    bottom: 0.35rem;
    left: 50%;
    width: min(270px, calc(100% - 3rem));
    max-width: none;
    transform: translateX(-50%);
  }

  .story-layout {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }

  .story-visual-column {
    order: 2;
    min-height: 240px;
    margin-top: -10rem;
  }

  .story-visual-peek {
    width: min(430px, 108%);
    margin-inline-start: -5.5rem;
    margin-inline-end: auto;
    transform: rotate(-5deg) translateY(0.25rem);
  }

  .story-steps-column {
    order: 1;
    margin-inline-end: 0;
    padding-top: 0;
    margin-bottom: 1.5rem;
  }
}

@media (max-width: 767.98px) {
  .home-section {
    padding: 1.5rem 0 3rem;
  }

  .home-section-inner {
    width: min(100vw - 1.1rem, 100%);
  }

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

  .hero-copy h1,
  .section-heading h2,
  .qr-copy h2,
  .cta-copy h2 {
    font-size: clamp(1.75rem, 8vw, 2.55rem);
  }

  .hero-device-stack,
  .qr-visual {
    min-height: 500px;
  }

  .hero-device-card-main,
  .qr-visual-card-main {
    width: min(220px, 62vw);
  }

  .hero-device-card-main {
    left: 50%;
    right: auto;
    transform: translateX(-50%);
  }

  .hero-floating-note {
    left: 50%;
    right: auto;
    bottom: 0.45rem;
    max-width: 220px;
    width: calc(100% - 4rem);
    transform: translateX(-50%);
    border-top-left-radius: 18px;
    border-top-right-radius: 18px;
    border-bottom-left-radius: 26px;
    border-bottom-right-radius: 26px;
  }

  .hero-floating-note::before {
    content: "";
    position: absolute;
    top: -12px;
    left: 50%;
    width: 64%;
    height: 22px;
    transform: translateX(-50%);
    border-radius: 999px 999px 0 0;
    background: rgba(255, 255, 255, 0.84);
    border: 1px solid var(--home-card-border);
    border-bottom: 0;
    z-index: -1;
  }

  .story-visual-column {
    min-height: 180px;
    margin-top: -6rem;
  }

  .story-visual-peek {
    width: min(280px, 80vw);
    margin-inline: auto;
    transform: rotate(-4deg) translateY(0.5rem);
  }

  .qr-visual {
    min-height: 430px;
  }

  .qr-visual-card-main {
    right: 50%;
    left: auto;
    top: 0.25rem;
    width: min(240px, 64vw);
    transform: translateX(58%);
  }

  .qr-visual-card-secondary {
    left: 50%;
    bottom: 0;
    width: min(180px, 46vw);
    transform: translateX(-72%);
  }

  .cta-contact-grid {
    grid-template-columns: 1fr;
  }
}
