*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #fffdf8;
  --green: #1D9E75;
  --green-dark: #0F6E56;
  --green-light: #e8f7f2;
  --text: #2C2C2A;
  --text-muted: #555450;
  --text-faint: #888780;
  --border: rgba(0,0,0,0.10);
  --radius: 20px;
}

body {
  font-family: system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

/* ── Layout helpers ── */
.section-inner {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ── Nav ── */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,253,248,0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: 900px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-size: 24px;
  font-weight: 800;
  color: var(--green);
  letter-spacing: -0.5px;
}

.nav-family {
  font-size: 14px;
  font-weight: 700;
  color: var(--green);
  text-decoration: none;
}

.nav-family:hover { text-decoration: underline; }

.nav-cta {
  background: var(--green);
  color: #fff;
  text-decoration: none;
  padding: 10px 22px;
  border-radius: 50px;
  font-size: 15px;
  font-weight: 700;
  box-shadow: 0 4px 0 var(--green-dark);
  transition: transform 0.1s, box-shadow 0.1s;
}

.nav-cta:active {
  transform: translateY(3px);
  box-shadow: 0 1px 0 var(--green-dark);
}

/* ── Hero ── */
.hero {
  padding: 60px 0 48px;
}

.hero-inner {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 40px;
}

.hero-text {
  flex: 1;
}

.hero-badge {
  display: inline-block;
  background: var(--green-light);
  color: var(--green-dark);
  font-size: 13px;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 50px;
  margin-bottom: 20px;
  letter-spacing: 0.3px;
}

.hero-title {
  font-size: clamp(32px, 6vw, 52px);
  font-weight: 900;
  line-height: 1.15;
  letter-spacing: -1px;
  color: var(--text);
  margin-bottom: 18px;
}

.hero-trial-note {
  font-size: 13px;
  color: var(--text-faint);
  margin-top: 12px;
}

.hero-sub {
  font-size: clamp(16px, 2.5vw, 19px);
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 32px;
  max-width: 440px;
}

.hero-badr {
  flex-shrink: 0;
  width: clamp(140px, 26vw, 220px);
}

.badr-hero-img {
  width: 100%;
  height: auto;
  display: block;
  animation: badrFloat 3s ease-in-out infinite;
}

@keyframes badrFloat {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-10px); }
}

/* ── Buttons ── */
.btn-primary {
  display: inline-block;
  background: var(--green);
  color: #fff;
  text-decoration: none;
  padding: 18px 36px;
  border-radius: var(--radius);
  font-size: 18px;
  font-weight: 800;
  box-shadow: 0 6px 0 var(--green-dark);
  transition: transform 0.1s, box-shadow 0.1s;
  cursor: pointer;
}

.btn-primary:active {
  transform: translateY(4px);
  box-shadow: 0 2px 0 var(--green-dark);
}

.btn-large {
  font-size: 20px;
  padding: 20px 44px;
}

/* ── Features ── */
.features {
  padding: 72px 0;
  background: #fff;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.section-title {
  font-size: clamp(22px, 4vw, 32px);
  font-weight: 800;
  text-align: center;
  margin-bottom: 48px;
  letter-spacing: -0.5px;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.feature-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.feature-card--soon {
  opacity: 0.85;
}

.feature-shot {
  background: #e8e4dc;
  padding: 16px 20px 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.feature-shot img {
  display: block;
  width: 75%;
  max-width: 180px;
  height: auto;
  border-radius: 18px 18px 0 0;
  box-shadow: 0 8px 32px rgba(0,0,0,0.18);
}

.feature-body {
  padding: 20px 18px 24px;
}

.feature-portal-link {
  display: inline-block;
  margin-top: 10px;
  font-size: 13px;
  font-weight: 700;
  color: var(--green);
  text-decoration: none;
}

.feature-portal-link:hover { text-decoration: underline; }

.feature-soon-badge {
  display: inline-block;
  background: #fff3e0;
  color: #b45309;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 50px;
  margin-bottom: 8px;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}

.feature-card h3 {
  font-size: 16px;
  font-weight: 800;
  margin-bottom: 6px;
  color: var(--text);
}

.feature-card p {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ── Feature card diagrams ── */
.fd-diagram {
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  padding: 18px 16px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  min-height: 96px;
  justify-content: center;
}

.fd-diagram--muted {
  opacity: 0.5;
}

.fd-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--text-faint);
}

/* Bar chart */
.fd-bars {
  display: flex;
  align-items: flex-end;
  gap: 5px;
  height: 52px;
}

.fd-bar {
  width: 16px;
  background: var(--green-light);
  border-radius: 4px 4px 0 0;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 3px;
  transition: background 0.2s;
}

.fd-bar--today {
  background: var(--green);
}

.fd-bar span {
  font-size: 8px;
  font-weight: 700;
  color: var(--green-dark);
  line-height: 1;
}

.fd-bar--today span {
  color: #fff;
}

/* Hex tiles */
.fd-hexrow {
  display: flex;
  gap: 6px;
  align-items: center;
}

.fd-hex {
  width: 44px;
  height: 44px;
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.fd-hex--green { background: #1D9E75; }
.fd-hex--amber { background: #f59e0b; }
.fd-hex--grey  { background: #e2ddd5; }

.fd-hex span {
  font-family: 'Amiri', serif;
  font-size: 8px;
  color: #fff;
  text-align: center;
  line-height: 1.2;
  padding: 0 3px;
}

.fd-hex--grey span {
  color: #888;
}

/* Word detection */
.fd-words {
  display: flex;
  gap: 6px;
  align-items: center;
  direction: rtl;
  flex-wrap: wrap;
  justify-content: center;
}

.fd-word {
  font-family: 'Amiri', serif;
  font-size: 17px;
  padding: 2px 6px;
  border-radius: 6px;
  line-height: 1.6;
}

.fd-word--ok   { background: #d1fae5; color: #065f46; }
.fd-word--err  { background: #fee2e2; color: #991b1b; }
.fd-word--miss { background: #fef3c7; color: #92400e; border: 1.5px dashed #f59e0b; }

.fd-word-legend {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
}

.fd-wl {
  font-size: 9px;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 50px;
}

.fd-wl--ok   { background: #d1fae5; color: #065f46; }
.fd-wl--err  { background: #fee2e2; color: #991b1b; }
.fd-wl--miss { background: #fef3c7; color: #92400e; }

/* Streak badges */
.fd-streaks {
  display: flex;
  gap: 4px;
  align-items: center;
}

.fd-streak-item {
  width: 32px;
  height: 32px;
}

.fd-streak-item img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.fd-streak--dim img  { opacity: 0.25; filter: saturate(0); }
.fd-streak--bright img { filter: drop-shadow(0 2px 4px rgba(239,68,68,0.4)); }

/* Family profiles */
.fd-profiles {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}

.fd-profile {
  display: flex;
  align-items: center;
  gap: 8px;
}

.fd-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--green-light);
  color: var(--green);
  font-size: 9px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.fd-profile-info {
  flex: 1;
  min-width: 0;
}

.fd-profile-name {
  font-size: 11px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 3px;
}

.fd-pbar {
  height: 5px;
  background: var(--green-light);
  border-radius: 50px;
  overflow: hidden;
}

.fd-pfill {
  height: 100%;
  background: var(--green);
  border-radius: 50px;
}

/* Islamic values ayah */
.fd-ayah {
  font-family: 'Amiri', serif;
  font-size: 15px;
  color: var(--green-dark);
  text-align: center;
  direction: rtl;
  line-height: 1.8;
}

@media (max-width: 700px) {
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }
}

@media (max-width: 420px) {
  .features-grid {
    grid-template-columns: 1fr;
  }
}

/* ── How it works ── */
.how {
  padding: 72px 0;
}

.steps {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.step {
  display: flex;
  align-items: flex-start;
  gap: 20px;
}

.step-number {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--green);
  color: #fff;
  font-size: 18px;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 3px 0 var(--green-dark);
}

.step-text h3 {
  font-size: 18px;
  font-weight: 800;
  margin-bottom: 6px;
  padding-top: 10px;
}

.step-text p {
  font-size: 15px;
  color: var(--text-muted);
  line-height: 1.6;
  max-width: 520px;
}

.step-connector {
  width: 2px;
  height: 36px;
  background: var(--border);
  margin-left: 21px;
}

/* ── Quote ── */
.quote-section {
  padding: 60px 0;
  background: var(--green-light);
  border-top: 1px solid rgba(29,158,117,0.2);
  border-bottom: 1px solid rgba(29,158,117,0.2);
}

.quote {
  text-align: center;
  max-width: 600px;
  margin: 0 auto;
}

.quote-arabic {
  font-family: 'Amiri', serif;
  font-size: clamp(22px, 4vw, 32px);
  line-height: 1.8;
  color: var(--green-dark);
  direction: rtl;
  margin-bottom: 10px;
}

.quote-english {
  font-family: 'Amiri', Georgia, serif;
  font-size: clamp(16px, 2.5vw, 22px);
  line-height: 1.5;
  color: var(--green-dark);
  opacity: 0.75;
  margin-bottom: 16px;
}

.quote cite {
  font-size: 14px;
  font-style: normal;
  color: var(--text-faint);
  font-weight: 600;
}

/* ── CTA section ── */
.cta-section {
  padding: 72px 0;
  background: #fff;
  border-top: 1px solid var(--border);
}

.cta-inner {
  display: flex;
  align-items: center;
  gap: 40px;
}

.cta-badr {
  flex-shrink: 0;
  width: clamp(100px, 18vw, 160px);
  height: auto;
  animation: badrFloat 3s ease-in-out infinite;
  animation-delay: 0.5s;
}

.cta-text h2 {
  font-size: clamp(22px, 4vw, 32px);
  font-weight: 800;
  margin-bottom: 8px;
  letter-spacing: -0.5px;
}

.cta-text p {
  font-size: 16px;
  color: var(--text-muted);
  margin-bottom: 24px;
}

/* ── Footer ── */
.footer {
  padding: 28px 0;
  border-top: 1px solid var(--border);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-logo {
  font-size: 18px;
  font-weight: 800;
  color: var(--green);
}

.footer-copy {
  font-size: 13px;
  color: var(--text-faint);
}

.footer-link {
  font-size: 14px;
  font-weight: 700;
  color: var(--green);
  text-decoration: none;
}

.footer-link:hover {
  text-decoration: underline;
}

/* ── Responsive ── */
@media (max-width: 600px) {
  .hero-inner {
    flex-direction: column-reverse;
    text-align: center;
    gap: 24px;
  }

  .hero-sub {
    max-width: 100%;
  }

  .hero-badr {
    width: clamp(100px, 40vw, 160px);
  }

  .cta-inner {
    flex-direction: column;
    text-align: center;
  }

  .cta-text .btn-primary {
    display: block;
    text-align: center;
  }

  .footer-inner {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
}
