/* Default landing — حافظ القرآن الكريم */
:root {
  --ink: #132e32;
  --deep: #062e33;
  --teal: #0c797e;
  --teal-2: #0a5f6d;
  --mist: #cfe8e5;
  --pearl: #eff6f5;
  --gold: #c2a36a;
  --white: #ffffff;
  --muted: #4f6b6f;
  --radius: 18px;
  --shadow: 0 18px 40px rgba(6, 46, 51, 0.14);
  --font-display: "Aref Ruqaa", "Amiri", serif;
  --font-body: "IBM Plex Sans Arabic", "Changa", "Cairo", Tahoma, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body.hafez-landing {
  margin: 0;
  padding: 0;
  direction: rtl;
  text-align: right;
  color: var(--ink);
  background: var(--pearl);
  font-family: var(--font-body);
  line-height: 1.7;
  overflow-x: hidden;
}

body.hafez-landing a {
  color: inherit;
  text-decoration: none;
}

body.hafez-landing img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Scope inputs — never global green boxes */
.hafez-landing .hp-field,
.hafez-landing .hp-field:focus {
  width: 100%;
  height: 52px;
  padding: 0 16px;
  border: 1px solid rgba(12, 121, 126, 0.22);
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.05rem;
  font-weight: 600;
  direction: ltr;
  text-align: left;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.hafez-landing .hp-field:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(12, 121, 126, 0.15);
}

.hafez-landing .hp-check input {
  width: 20px;
  height: 20px;
  accent-color: var(--teal);
  background: #fff;
}

/* Top nav — light teal bar above links */
.hp-nav {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: linear-gradient(180deg, #0ea5a8 0%, #0c797e 100%);
  border-bottom: 3px solid #c2a36a;
  box-shadow: 0 8px 24px rgba(12, 121, 126, 0.22);
}

.hp-nav__inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.hp-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #fff;
}

.hp-brand img {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  object-fit: cover;
  background: #fff;
  padding: 2px;
}

.hp-brand__name {
  font-family: var(--font-display);
  font-size: 1.45rem;
  line-height: 1;
}

.hp-nav__links {
  display: flex;
  align-items: center;
  gap: 8px 14px;
  list-style: none;
  margin: 0;
  padding: 0;
  flex-wrap: wrap;
}

.hp-nav__links a,
.hp-nav__links .hp-nav-link {
  color: #ffffff;
  font-weight: 700;
  font-size: 0.95rem;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  padding: 8px 14px;
  position: relative;
  cursor: pointer;
  transition: background 0.18s ease, transform 0.18s ease;
}

.hp-nav__links a:hover,
.hp-nav__links .hp-nav-link:hover {
  background: rgba(255, 255, 255, 0.28);
  transform: translateY(-1px);
}

.hp-nav__links a::after,
.hp-nav__links .hp-nav-link::after {
  display: none;
}

.hp-nav__toggle {
  display: none;
  width: 42px;
  height: 42px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  font-size: 1.1rem;
  cursor: pointer;
}

.hp-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  transition: transform 0.18s ease, background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}

.hp-btn:hover {
  transform: translateY(-2px);
}

.hp-btn--solid {
  background: var(--teal);
  color: #fff;
}

.hp-btn--solid:hover {
  background: #0a6a6e;
  color: #fff;
}

.hp-btn--ghost {
  background: transparent;
  color: #fff;
  border-color: rgba(194, 163, 106, 0.65);
}

.hp-btn--ghost:hover {
  background: rgba(194, 163, 106, 0.14);
  color: #fff;
}

.hp-btn--block {
  width: 100%;
  border-radius: 12px;
}

/* Sections */
.hp-section {
  padding: 88px 20px;
}

.hp-wrap {
  max-width: 1120px;
  margin: 0 auto;
}

.hp-section__head {
  margin-bottom: 36px;
}

.hp-section__head h2 {
  margin: 0 0 10px;
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 2.7rem);
  color: var(--deep);
  line-height: 1.2;
}

.hp-section__head p {
  margin: 0;
  color: var(--muted);
  max-width: 42ch;
  font-size: 1.05rem;
}

.hp-rule {
  width: 72px;
  height: 2px;
  margin: 14px 0 0;
  background: linear-gradient(90deg, var(--gold), transparent);
  position: relative;
  overflow: hidden;
}

.hp-rule::after {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 28px;
  background: #fff6;
  animation: hp-shimmer 7s ease-in-out infinite;
}

/* Login */
.hp-login {
  background:
    radial-gradient(80% 60% at 100% 0%, rgba(12, 121, 126, 0.08), transparent 50%),
    var(--pearl);
}

.hp-login__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}

.hp-login-panel {
  background: #fff;
  border: 1px solid rgba(12, 121, 126, 0.12);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px 24px 26px;
}

.hp-login-panel__eyebrow {
  display: inline-block;
  margin-bottom: 8px;
  color: var(--teal);
  font-weight: 700;
  font-size: 0.85rem;
}

.hp-login-panel h3 {
  margin: 0 0 18px;
  font-size: 1.35rem;
  color: var(--deep);
}

.hp-login-panel .hp-field-wrap {
  margin-bottom: 14px;
}

.hp-check {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 8px 0 18px;
  color: var(--muted);
  font-weight: 700;
}

/* About */
.hp-about {
  background: var(--deep);
  color: #fff;
}

.hp-about .hp-section__head h2 {
  color: #fff;
}

.hp-about .hp-section__head p {
  color: rgba(207, 232, 229, 0.86);
}

.hp-about__visual {
  margin-top: 28px;
  border-radius: 24px;
  overflow: hidden;
  border: 1px solid rgba(194, 163, 106, 0.35);
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.28);
}

.hp-about__visual img {
  width: 100%;
  max-height: 420px;
  object-fit: cover;
  filter: saturate(0.85) contrast(1.05);
}

.hp-about__points {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 22px;
}

.hp-about__points article {
  padding: 16px 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.hp-about__points h4 {
  margin: 0 0 6px;
  font-size: 1rem;
}

.hp-about__points p {
  margin: 0;
  color: rgba(207, 232, 229, 0.85);
  font-size: 0.92rem;
}

/* Features — not card-heavy; one purpose */
.hp-features {
  background: #fff;
}

.hp-feature-list {
  display: grid;
  gap: 0;
  border-top: 1px solid rgba(12, 121, 126, 0.12);
}

.hp-feature-row {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 16px;
  align-items: start;
  padding: 22px 4px;
  border-bottom: 1px solid rgba(12, 121, 126, 0.12);
}

.hp-feature-row i {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(12, 121, 126, 0.1);
  color: var(--teal);
  font-size: 1.15rem;
}

.hp-feature-row h3 {
  margin: 0 0 6px;
  font-size: 1.15rem;
  color: var(--deep);
}

.hp-feature-row p {
  margin: 0;
  color: var(--muted);
}

/* Contact / footer band */
.hp-contact {
  background:
    linear-gradient(180deg, #083a40 0%, var(--deep) 100%);
  color: #fff;
}

.hp-contact .hp-section__head h2 {
  color: #fff;
}

.hp-contact .hp-section__head p {
  color: rgba(207, 232, 229, 0.85);
}

.hp-contact__grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 18px;
}

.hp-contact__block {
  padding: 8px 4px;
}

.hp-contact__block h3 {
  margin: 0 0 10px;
  font-size: 1.05rem;
  color: var(--gold);
}

.hp-contact__block p,
.hp-contact__block a {
  margin: 0 0 6px;
  color: rgba(255, 255, 255, 0.88);
  font-weight: 600;
}

.hp-contact__block a:hover {
  color: var(--gold);
}

.hp-stats {
  display: flex;
  gap: 28px;
  flex-wrap: wrap;
}

.hp-stats strong {
  display: block;
  font-size: 1.8rem;
  color: #fff;
  line-height: 1.1;
}

.hp-stats span {
  color: rgba(207, 232, 229, 0.8);
  font-size: 0.9rem;
}

.hp-footer {
  padding: 18px 20px 28px;
  text-align: center;
  color: rgba(255, 255, 255, 0.65);
  font-size: 0.9rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.hp-footer a {
  color: var(--gold);
}

/* Motion */
@keyframes hp-shimmer {
  0%,
  70% {
    transform: translateX(0);
    opacity: 0;
  }
  80% {
    opacity: 1;
  }
  100% {
    transform: translateX(72px);
    opacity: 0;
  }
}

.hp-reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.hp-reveal.is-in {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .hp-rule::after {
    animation: none !important;
  }

  .hp-reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

@media (max-width: 900px) {
  .hp-login__grid,
  .hp-about__points,
  .hp-contact__grid {
    grid-template-columns: 1fr;
  }

  .hp-nav__toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .hp-nav__links {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    padding: 8px 0 4px;
  }

  .hp-nav__links a,
  .hp-nav__links .hp-nav-link {
    text-align: center;
  }

  .hp-nav.is-open .hp-nav__links {
    display: flex;
  }

  .hp-nav__inner {
    flex-wrap: wrap;
  }
}
