/* ===== Landing Wrapper ===== */
.landing {
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  display: flex;
  flex-direction: column;
  align-items: center;
  font-family: 'Noto Kufi Arabic', sans-serif;
  overflow-x: hidden;
  transition: background 0.35s ease, color 0.35s ease;
}

/* ===== Hero ===== */
.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 70px 24px 48px;
  max-width: 480px;
  width: 100%;
  text-align: center;
}

.hero__logo {
  margin-bottom: 28px;
  animation: fadeInUp 0.6s ease both;
  filter: drop-shadow(0 0 18px rgba(0, 107, 99, 0.45));
}

.hero__headline {
  font-size: 2rem;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: 0;
  color: var(--text);
  margin: 0 0 40px;
  animation: fadeInUp 0.6s 0.1s ease both;
  direction: rtl;
}

.hero__headline--accent {
  color: var(--muted);
}

/* ===== Phone Mockup ===== */
.phone-mockup {
  animation: fadeInUp 0.7s 0.2s ease both, phoneFloat 6s 1.2s ease-in-out infinite;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  perspective: 1100px;
}

/* Phone composite — screenshot under, SVG stroke on top */
.phone-composite {
  position: relative;
  width: min(72vw, 260px);
  aspect-ratio: 951 / 2056;
  flex-shrink: 0;
  filter: drop-shadow(0 0 18px rgba(0, 80, 59, 0.3))
          drop-shadow(0 28px 60px rgba(0, 0, 0, 0.55));
  transform: rotateX(var(--phone-rx, 0deg)) rotateY(var(--phone-ry, 0deg));
  transform-style: preserve-3d;
  transition: transform 0.3s ease;
  will-change: transform;
}

/* Screenshot: fills the container, clipped to match the stroke's inner radius */
.phone-composite__screen {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  /* inner radius ≈ (rx 105 − half stroke-width 10) / SVG width 951 ≈ 10% */
  border-radius: 10%;
}

/* SVG stroke: floats on top, fully transparent interior */
.phone-composite__stroke {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  pointer-events: none;
  z-index: 2;
}

@media (min-width: 768px) {
  .phone-composite {
    width: min(34vw, 300px);
  }
}

/* ===== Features ===== */
.features {
  width: 100%;
  padding: 0 16px 48px;
  display: flex;
  justify-content: center;
  animation: fadeInUp 0.7s 0.3s ease both;
}

.features__container {
  width: 100%;
  max-width: 920px;
  background: var(--panel-bg);
  border: 1px solid var(--border-green);
  border-radius: 26px;
  box-shadow: 0 0 40px var(--glow), inset 0 0 30px rgba(0,0,0,0.18);
  padding: 20px;
  transition: background 0.35s ease, border-color 0.35s ease;
}

.features__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.feature-card {
  position: relative;
  background: var(--feature-card-bg);
  border: 1px solid var(--feature-card-border);
  border-radius: 16px;
  padding: 18px 16px;
  min-height: 150px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: var(--feature-card-shadow);
  direction: rtl;
  text-align: right;
  overflow: hidden;
  transform: perspective(700px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transform-style: preserve-3d;
  transition: transform 0.2s ease, border-color 0.25s ease, box-shadow 0.25s ease, background 0.35s ease;
  will-change: transform;
}

.feature-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background: radial-gradient(circle at var(--mx, 50%) var(--my, 50%), var(--glow) 0%, transparent 60%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.feature-card > * {
  position: relative;
  z-index: 1;
}

.feature-card:hover {
  border-color: var(--border-green);
  box-shadow: 0 10px 32px var(--glow-strong);
  transform: perspective(700px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateY(-4px);
}

.feature-card:hover::before {
  opacity: 1;
}

.feature-card--rtl {
  direction: rtl;
  text-align: right;
}

.feature-card__emoji {
  font-size: 1.6rem;
  line-height: 1;
  display: block;
  margin-bottom: 6px;
  user-select: none;
}

.feature-card__title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
  margin: 0;
  line-height: 1.3;
}

.feature-card__desc {
  font-size: 0.72rem;
  color: var(--muted);
  margin: 0;
  line-height: 1.55;
}


/* ===== Download ===== */
.download {
  padding: 48px 24px 20px;
  display: flex;
  justify-content: center;
  animation: fadeInUp 0.7s 0.4s ease both;
}

.download__inner {
  display: flex;
  align-items: center;
  gap: 20px;
}

.download__app-icon {
  flex-shrink: 0;
}

/* App Store Button */
.appstore-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  padding: 10px 22px;
  min-width: 180px;
  height: 54px;
  color: var(--text);
  text-decoration: none;
  white-space: nowrap;
  box-shadow: var(--glass-shadow), inset 0 1px 0 var(--glass-highlight);
  transition: background 0.22s ease, border-color 0.22s ease,
              box-shadow 0.22s ease, transform 0.15s ease;
}

.appstore-btn:hover {
  background: var(--glass-bg-hover);
  border-color: var(--glass-border);
  box-shadow: var(--glass-shadow-hover), inset 0 1px 0 var(--glass-highlight);
  transform: translateY(-1px);
}

.appstore-btn:active {
  transform: translateY(1px) scale(0.99);
  background: var(--glass-bg-active);
  box-shadow: var(--glass-shadow), inset 0 1px 0 rgba(255,255,255,0.06);
}

.appstore-btn__apple {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  fill: var(--text);
}

.appstore-btn__text {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.appstore-btn__small {
  font-size: 0.6rem;
  color: var(--muted);
  letter-spacing: 0.02em;
}

.appstore-btn__large {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.01em;
}

/* ===== Site Footer ===== */
.site-footer {
  width: 100%;
  padding: 28px 24px 44px;
  display: flex;
  justify-content: center;
  border-top: 1px solid var(--border);
  animation: fadeInUp 0.7s 0.55s ease both;
}

.footer__terms-btn {
  display: inline-flex;
  align-items: center;
  padding: 10px 28px;
  font-size: 0.82rem;
  font-family: 'Noto Kufi Arabic', sans-serif;
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 999px;
  direction: rtl;
  box-shadow: var(--glass-shadow), inset 0 1px 0 var(--glass-highlight);
  transition: color 0.22s ease, border-color 0.22s ease, background 0.22s ease,
              box-shadow 0.22s ease, transform 0.15s ease;
}

.footer__terms-btn:hover {
  color: var(--accent-light);
  border-color: var(--border-green);
  background: var(--glass-bg-hover);
  box-shadow: var(--glass-shadow-hover), inset 0 1px 0 var(--glass-highlight),
              0 0 16px var(--glow);
  transform: translateY(-1px);
}

.footer__terms-btn:active {
  transform: translateY(1px) scale(0.99);
  background: var(--glass-bg-active);
  box-shadow: var(--glass-shadow), inset 0 1px 0 rgba(255,255,255,0.06);
}

/* ===== Connect ===== */
.connect {
  padding: 32px 24px 60px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  animation: fadeInUp 0.7s 0.5s ease both;
}

.connect__title {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--muted);
  margin: 0;
  letter-spacing: 0.03em;
}

.connect__links {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
}

.connect__btn {
  display: flex;
  align-items: center;
  gap: 8px;
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 999px;
  padding: 9px 18px;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.75rem;
  min-width: 210px;
  justify-content: center;
  box-shadow: var(--glass-shadow), inset 0 1px 0 var(--glass-highlight);
  transition: background 0.22s ease, color 0.22s ease, border-color 0.22s ease,
              box-shadow 0.22s ease, transform 0.15s ease;
}

.connect__btn--left {
  justify-content: flex-start;
}

.connect__btn:hover {
  background: var(--glass-bg-hover);
  color: var(--text);
  box-shadow: var(--glass-shadow-hover), inset 0 1px 0 var(--glass-highlight);
  transform: translateY(-1px);
}

.connect__btn:active {
  transform: translateY(1px) scale(0.99);
  background: var(--glass-bg-active);
  box-shadow: var(--glass-shadow), inset 0 1px 0 rgba(255,255,255,0.06);
}

/* ===== Animations ===== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

@media (prefers-reduced-motion: reduce) {
  .phone-mockup {
    animation: fadeInUp 0.7s 0.2s ease both;
  }
  .phone-composite,
  .feature-card {
    transition: border-color 0.25s ease, box-shadow 0.25s ease, background 0.35s ease;
  }
  .appstore-btn,
  .connect__btn,
  .footer__terms-btn {
    transition: background 0.22s ease, color 0.22s ease,
                border-color 0.22s ease, box-shadow 0.22s ease;
  }
  .appstore-btn:hover,
  .connect__btn:hover,
  .footer__terms-btn:hover,
  .appstore-btn:active,
  .connect__btn:active,
  .footer__terms-btn:active {
    transform: none;
  }
}

/* ===== Responsive ===== */
@media (max-width: 600px) {
  .hero__headline {
    font-size: 1.7rem;
  }

  .features__container {
    padding: 14px;
  }

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

  .feature-card {
    min-height: auto;
  }

  .download__inner {
    flex-direction: row;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 16px;
  }
}

@media (min-width: 601px) and (max-width: 1023px) {
  .hero__headline {
    font-size: 2.2rem;
  }

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

@media (min-width: 1024px) {
  .hero__headline {
    font-size: 2.4rem;
  }
}
