/* ===== DEEP DIVE / DYNAMIC FEATURE SECTION ===== */
.deepdive {
  padding-block: clamp(4rem, 8vw, 8rem);
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background-color: #14533a;
  color: #f6f1e7;
}
.deepdive::before {
  content: "";
  position: absolute;
  inset: -8%;
  background-image:
    url("../assets/islamic-pattern.jpg"),
    radial-gradient(
      circle at 16% 20%,
      rgba(230, 207, 154, 0.2),
      transparent 44%
    ),
    radial-gradient(
      circle at 86% 78%,
      rgba(230, 207, 154, 0.16),
      transparent 48%
    );
  background-size:
    500px auto,
    auto,
    auto;
  background-repeat: repeat, no-repeat, no-repeat;
  background-position: center;
  mix-blend-mode: soft-light;
  opacity: 0.28;
  filter: saturate(0.78) contrast(1.06);
  pointer-events: none;
}
.deepdive::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to bottom, rgba(3, 18, 11, 0.1), rgba(3, 18, 11, 0.5)),
    repeating-linear-gradient(
      60deg,
      rgba(201, 169, 97, 0.06) 0 1px,
      transparent 1px 74px
    ),
    repeating-linear-gradient(
      -60deg,
      rgba(201, 169, 97, 0.06) 0 1px,
      transparent 1px 74px
    );
  opacity: 0.74;
  pointer-events: none;
}
.deepdive[data-tone="emerald"],
.deepdive[data-tone="cream"],
.deepdive[data-tone="gold"],
.deepdive[data-tone="ink"],
.deepdive[data-tone="sage"] {
  background-color: #14533a;
  color: #f6f1e7;
}

.deepdive__bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.08;
  background-image: var(--pattern-bg);
  background-size: 200px 200px;
}
.deepdive__bg--dots {
  background-image: radial-gradient(
    circle at 1px 1px,
    rgba(230, 207, 154, 0.5) 1px,
    transparent 0
  );
  background-size: 28px 28px;
  opacity: 0.2;
  mask-image: radial-gradient(
    ellipse 800px 500px at 70% 50%,
    black,
    transparent 70%
  );
  -webkit-mask-image: radial-gradient(
    ellipse 800px 500px at 70% 50%,
    black,
    transparent 70%
  );
}

.deepdive__head {
  position: relative;
  z-index: 2;
  margin-bottom: clamp(1.5rem, 4vw, 2.75rem);
}
.deepdive__head h2 {
  max-width: 12ch;
  margin-inline: auto;
}
.deepdive__lede-intro {
  max-width: 38rem;
  color: rgba(246, 241, 231, 0.8);
}

.deepdive__preview {
  position: relative;
  z-index: 2;
  display: grid;
  gap: clamp(0.9rem, 2vw, 1.35rem);
  justify-items: center;
  width: 100%;
}

.deepdive__visual {
  position: relative;
  display: grid;
  place-items: center;
}
.deepdive__visual--carousel {
  width: min(100%, 1060px);
  min-height: clamp(34rem, 58vw, 43rem);
  padding: clamp(1.6rem, 4vw, 2.5rem) clamp(0.4rem, 2vw, 1rem)
    clamp(1.6rem, 4vw, 2.4rem);
  overflow: visible;
  isolation: isolate;
}
.deepdive__halo {
  position: absolute;
  top: 51%;
  left: 50%;
  width: min(78vw, 560px);
  height: min(78vw, 560px);
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(201, 169, 97, 0.44),
    rgba(201, 169, 97, 0.12) 38%,
    transparent 68%
  );
  filter: blur(28px);
  transform: translate(-50%, -52%);
  z-index: 0;
  animation: deepdiveGlow 5.6s ease-in-out infinite;
}
.deepdive__carousel {
  position: relative;
  width: 100%;
  min-height: clamp(28rem, 54vw, 35rem);
  perspective: 2200px;
  transform-style: preserve-3d;
  overflow: hidden;
  touch-action: pan-y;
  user-select: none;
}
.deepdive__slide {
  position: absolute;
  top: 52%;
  left: 50%;
  display: grid;
  justify-items: center;
  gap: 0.85rem;
  padding: 0;
  margin: 0;
  border: none;
  background: none;
  color: inherit;
  cursor: pointer;
  transform-style: preserve-3d;
  transition:
    transform 0.82s var(--ease),
    opacity 0.48s var(--ease),
    filter 0.48s var(--ease);
  will-change: transform, opacity, filter;
}
.deepdive__slide:focus-visible {
  outline: 2px solid rgba(230, 207, 154, 0.9);
  outline-offset: 6px;
  border-radius: 30px;
}
.deepdive__slide-phone {
  position: relative;
}
.deepdive__slide-phone .phone {
  width: clamp(192px, 22vw, 232px);
  height: clamp(396px, 46vw, 478px);
}
.deepdive__slide-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0.45rem 0.88rem;
  border-radius: var(--r-full);
  background: rgba(8, 31, 23, 0.54);
  border: 1px solid rgba(230, 207, 154, 0.2);
  color: rgba(248, 242, 230, 0.84);
  font-family: var(--ff-en-ui);
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  white-space: nowrap;
  opacity: 0;
  transform: translateY(-10px);
  transition:
    opacity 0.35s var(--ease),
    transform 0.35s var(--ease),
    background 0.35s var(--ease),
    color 0.35s var(--ease);
  backdrop-filter: blur(8px);
}
.deepdive__slide.is-active .deepdive__slide-label {
  opacity: 1;
  transform: translateY(0);
  background: rgba(248, 240, 226, 0.94);
  border-color: rgba(230, 207, 154, 0.58);
  color: #174131;
}
.deepdive__slide[data-offset="0"] {
  transform: translate(-50%, -50%) translateY(8px);
  opacity: 1;
  z-index: 5;
  filter: none;
}
.deepdive__slide[data-offset="-1"] {
  transform: translate(-50%, -50%) translateX(-188px) translateY(28px)
    rotateY(32deg) rotateZ(-4deg);
  opacity: 0.9;
  z-index: 4;
  filter: saturate(0.92) brightness(0.98);
}
.deepdive__slide[data-offset="1"] {
  transform: translate(-50%, -50%) translateX(188px) translateY(28px)
    rotateY(-32deg) rotateZ(4deg);
  opacity: 0.9;
  z-index: 4;
  filter: saturate(0.92) brightness(0.98);
}
.deepdive__slide[data-offset="-2"] {
  transform: translate(-50%, -50%) translateX(-320px) translateY(64px)
    rotateY(42deg) rotateZ(-6deg);
  opacity: 0.3;
  z-index: 2;
  filter: blur(0.8px) saturate(0.72) brightness(0.9);
}
.deepdive__slide[data-offset="2"] {
  transform: translate(-50%, -50%) translateX(320px) translateY(64px)
    rotateY(-42deg) rotateZ(6deg);
  opacity: 0.3;
  z-index: 2;
  filter: blur(0.8px) saturate(0.72) brightness(0.9);
}

.deepdive__details {
  position: relative;
  z-index: 2;
  width: min(100%, 720px);
  margin-top: clamp(-2.6rem, -3vw, -1.6rem);
  padding: clamp(1.25rem, 2.4vw, 1.8rem) clamp(1rem, 3vw, 1.65rem)
    clamp(1.15rem, 2.3vw, 1.55rem);
  border-radius: 28px;
  overflow: hidden;
  text-align: center;
  color: #173d2f;
  background: linear-gradient(
    180deg,
    rgba(250, 245, 235, 0.98),
    rgba(243, 234, 213, 0.95)
  );
  border: 1px solid rgba(230, 207, 154, 0.52);
  box-shadow:
    0 24px 52px -34px rgba(2, 14, 10, 0.58),
    inset 0 1px 0 rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(12px);
  animation: deepdiveCardIn 0.45s var(--ease);
}
.deepdive__details::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 88px;
  background: radial-gradient(
    circle at 50% 0,
    rgba(201, 169, 97, 0.26),
    transparent 68%
  );
  pointer-events: none;
}
.deepdive__eyebrow {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.8rem;
  font-family: var(--ff-en-ui);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #8a6522;
}
.deepdive__eyebrow::before {
  content: "";
  width: 24px;
  height: 1px;
  background: currentColor;
  opacity: 0.45;
}
.deepdive__title {
  position: relative;
  font-family: var(--ff-ar-display);
  font-size: clamp(1.8rem, 3vw, 2.85rem);
  line-height: 1.15;
  font-weight: 800;
  color: #103626;
  margin-bottom: 0.7rem;
}
.deepdive__desc {
  position: relative;
  max-width: 40rem;
  margin: 0 auto 1.15rem;
  font-size: 1rem;
  line-height: 1.75;
  color: rgba(16, 54, 38, 0.78);
}
.deepdive__highlights {
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}
.deepdive__highlight {
  display: flex;
  align-items: center;
  gap: 0.72rem;
  padding: 0.85rem 0.95rem;
  border-radius: 18px;
  background: rgba(28, 88, 66, 0.06);
  border: 1px solid rgba(28, 88, 66, 0.11);
  color: #173d2f;
  text-align: start;
  font-size: 0.93rem;
  line-height: 1.55;
  box-shadow: 0 16px 30px -28px rgba(20, 83, 58, 0.46);
}
.deepdive__highlight-icon {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  flex: none;
  display: grid;
  place-items: center;
  background: linear-gradient(180deg, #23684f, #1c5842);
  color: #ffffff;
  box-shadow: 0 10px 18px -14px rgba(28, 88, 66, 0.8);
}
.deepdive__actions {
  position: relative;
  display: flex;
  justify-content: center;
  margin-top: 1.1rem;
}
.deepdive__cta {
  min-width: 190px;
}

@media (min-width: 961px) {
  .deepdive__head {
    gap: 0.55rem;
    margin-bottom: clamp(0.95rem, 1.8vw, 1.45rem);
  }
  .deepdive__preview {
    max-width: 100%;
  }
  .deepdive__visual--carousel {
    width: 100%;
    max-width: 100%;
    padding-inline: clamp(0.35rem, 1.2vw, 0.9rem);
  }
  .deepdive__details {
    width: min(100%, 760px);
  }
}

@keyframes deepdiveGlow {
  0%,
  100% {
    transform: translate(-50%, -52%) scale(1);
    opacity: 0.86;
  }
  50% {
    transform: translate(-50%, -52%) scale(1.08);
    opacity: 1;
  }
}
@keyframes deepdiveCardIn {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* ===== FEATURES (creative redesign) ===== */
.features {
  padding-block: clamp(4rem, 8vw, 8rem);
  position: relative;
  overflow: hidden;
}
.features__bg-mosaic {
  position: absolute;
  inset: 0;
  opacity: 0.08;
  background-image: var(--pattern-bg);
  background-size: 200px 200px;
  pointer-events: none;
}

.features__bento {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  grid-auto-rows: minmax(200px, auto);
  gap: 1rem;
}
@media (max-width: 960px) {
  .features__bento {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 560px) {
  .features__bento {
    grid-template-columns: 1fr;
  }
}

.bento {
  position: relative;
  border-radius: 22px;
  padding: 1.75rem;
  overflow: hidden;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 220px;
  transition:
    transform 0.35s var(--ease),
    box-shadow 0.35s;
  border: 1px solid var(--line);
  background: var(--bg-elev);
}
.bento:hover {
  transform: translateY(-4px);
  box-shadow: var(--sh-lg);
}

.bento__pattern {
  position: absolute;
  inset: 0;
  background-image: var(--pattern-bg);
  background-size: 140px 140px;
  opacity: 0.06;
  pointer-events: none;
  z-index: 0;
}
.bento > * {
  position: relative;
  z-index: 1;
}

.bento__icon {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  margin-bottom: 1rem;
}
.bento__title {
  font-family: var(--ff-ar-display);
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
  line-height: 1.2;
}
.bento__title-en {
  font-family: var(--ff-en-ui);
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-weight: 600;
  margin-bottom: 0.75rem;
  opacity: 0.55;
}
.bento__desc {
  font-size: 0.95rem;
  line-height: 1.6;
  opacity: 0.75;
}

/* Bento sizes */
.bento--hero {
  grid-column: span 4;
  grid-row: span 2;
  min-height: 440px;
  background: linear-gradient(150deg, #0b3d22, #072e18);
  color: #f3ece0;
  padding: 2.5rem;
}
.bento--hero .bento__title {
  font-size: 2.5rem;
  color: var(--y-400);
}
.bento--hero .bento__title-en {
  color: rgba(230, 207, 154, 0.6);
}
.bento--hero .bento__icon {
  background: linear-gradient(145deg, var(--y-500), var(--y-700));
  color: #2a1d05;
  width: 72px;
  height: 72px;
}

.bento--tall {
  grid-column: span 2;
  grid-row: span 2;
  min-height: 440px;
  background: var(--c-cream-2);
}
.bento--wide {
  grid-column: span 4;
  min-height: 220px;
}
.bento--mid {
  grid-column: span 2;
}
.bento--accent {
  background: linear-gradient(160deg, var(--y-600), #b89548);
  color: #2a1d05;
}
.bento--accent .bento__icon {
  background: rgba(255, 255, 255, 0.25);
  color: #fff;
}
.bento--ink {
  background: var(--c-ink);
  color: #f3ece0;
}
.bento--ink .bento__icon {
  background: rgba(201, 169, 97, 0.2);
  color: var(--y-400);
  border: 1px solid rgba(201, 169, 97, 0.3);
}

@media (max-width: 960px) {
  .bento--hero,
  .bento--wide {
    grid-column: span 2;
  }
  .bento--hero {
    grid-row: span 1;
    min-height: 320px;
  }
  .bento--tall {
    grid-column: span 2;
    grid-row: span 1;
    min-height: 280px;
  }
  .bento--mid {
    grid-column: span 1;
  }
}
@media (max-width: 560px) {
  .bento,
  .bento--hero,
  .bento--wide,
  .bento--tall,
  .bento--mid {
    grid-column: span 1;
    min-height: 220px;
  }
  .bento--hero {
    min-height: 280px;
  }
  .bento--hero .bento__title {
    font-size: 1.8rem;
  }
}

/* Visual element previews inside bento */
.bento__viz {
  margin-top: 1rem;
  flex: 1;
  display: grid;
  place-items: center;
  position: relative;
  min-height: 100px;
}
.bento__viz-quran {
  font-family: var(--ff-ar-quran);
  font-size: 1.6rem;
  text-align: center;
  line-height: 2;
  color: var(--y-400);
  opacity: 0.85;
}
.bento__viz-wave {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  height: 60px;
  width: 100%;
  justify-content: center;
}
.bento__viz-wave span {
  width: 5px;
  background: currentColor;
  border-radius: 3px;
  opacity: 0.8;
  animation: bentoWave 1.4s ease-in-out infinite;
}
@keyframes bentoWave {
  0%,
  100% {
    height: 18%;
  }
  50% {
    height: 90%;
  }
}
.bento__viz-prayer {
  display: grid;
  gap: 0.4rem;
  width: 100%;
}
.bento__viz-prayer div {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  padding: 0.35rem 0.7rem;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  font-family: var(--ff-en-ui);
}
.bento__viz-prayer div.is-next {
  background: var(--y-600);
  color: var(--g-900);
  font-weight: 700;
}

.bento__viz-compass {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  border: 2px solid currentColor;
  position: relative;
  opacity: 0.9;
}
.bento__viz-compass::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 3px;
  height: 38px;
  background: currentColor;
  transform-origin: bottom center;
  transform: translate(-50%, -100%) rotate(42deg);
  animation: compassSpin 8s ease-in-out infinite;
}
@keyframes compassSpin {
  0%,
  100% {
    transform: translate(-50%, -100%) rotate(42deg);
  }
  50% {
    transform: translate(-50%, -100%) rotate(-15deg);
  }
}
.bento__viz-tasbih {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  width: 100%;
}
.bento__viz-tasbih span {
  aspect-ratio: 1;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.25;
  animation: tasbihPulse 2s ease-in-out infinite;
}
.bento__viz-tasbih span:nth-child(1) {
  animation-delay: 0s;
}
.bento__viz-tasbih span:nth-child(2) {
  animation-delay: 0.1s;
}
.bento__viz-tasbih span:nth-child(3) {
  animation-delay: 0.2s;
}
.bento__viz-tasbih span:nth-child(4) {
  animation-delay: 0.3s;
}
.bento__viz-tasbih span:nth-child(5) {
  animation-delay: 0.4s;
  opacity: 0.8;
}
@keyframes tasbihPulse {
  0%,
  100% {
    opacity: 0.2;
    transform: scale(1);
  }
  50% {
    opacity: 1;
    transform: scale(1.1);
  }
}

/* ===== DOWNLOAD CTA REDESIGN (full green section) ===== */
.download-v2 {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(
      circle at 10% 18%,
      rgba(201, 169, 97, 0.22),
      transparent 40%
    ),
    radial-gradient(
      circle at 90% 78%,
      rgba(201, 169, 97, 0.14),
      transparent 46%
    ),
    linear-gradient(165deg, #08351f 0%, #0c4428 46%, #0a2f1b 100%);
  color: #f3ece0;
}
.download-v2::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--pattern-bg);
  background-size: 210px 210px;
  opacity: 0.08;
  pointer-events: none;
}
.download-v2::after {
  content: "";
  position: absolute;
  top: -25%;
  inset-inline-end: -10%;
  width: clamp(280px, 38vw, 540px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(201, 169, 97, 0.2), transparent 66%);
  filter: blur(38px);
  pointer-events: none;
}

.download-v2__inner {
  position: relative;
  z-index: 1;
  width: min(100% - 2rem, var(--container));
  margin-inline: auto;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: clamp(1.2rem, 3.2vw, 3.4rem);
  align-items: center;
}

.download-v2__panel {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 520px;
  padding-inline: clamp(0rem, 0.8vw, 0.6rem);
}

.download-v2__bookmark {
  width: 60px;
  height: 60px;
  display: grid;
  place-items: center;
  background: rgba(201, 169, 97, 0.18);
  border-radius: 16px;
  margin-bottom: 1.75rem;
  color: var(--y-400);
  position: relative;
  z-index: 1;
}
.download-v2__title {
  font-family: var(--ff-ar-display);
  font-size: clamp(2.1rem, 3.9vw, 3.35rem);
  font-weight: 800;
  line-height: 1.1;
  color: var(--y-400);
  margin-bottom: 1.1rem;
  position: relative;
  z-index: 1;
}
.download-v2__lede {
  font-size: 1.06rem;
  line-height: 1.85;
  color: rgba(243, 236, 224, 0.8);
  margin-bottom: 2.35rem;
  max-width: 42ch;
  position: relative;
  z-index: 1;
}
.download-v2__stores {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.8rem;
  position: relative;
  z-index: 1;
}
.download-v2__stores .dl-pill:last-child {
  grid-column: span 2;
}

.dl-pill {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  background: linear-gradient(145deg, #fbf7ed, #f5ecda);
  color: #1a1611;
  border: 1px solid rgba(201, 169, 97, 0.34);
  padding: 0.88rem 1.1rem;
  border-radius: 999px;
  text-align: start;
  transition:
    transform 0.25s var(--ease),
    box-shadow 0.25s;
  text-decoration: none;
}
.dl-pill:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px -10px rgba(0, 0, 0, 0.3);
}
.dl-pill__icon {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  background: rgba(15, 77, 42, 0.1);
  border-radius: 50%;
  color: var(--g-800);
  flex: none;
}
.dl-pill__txt {
  display: grid;
  line-height: 1.2;
}
.dl-pill__txt small {
  font-family: var(--ff-ar-ui);
  font-size: 0.68rem;
  color: var(--fg-muted);
  font-weight: 500;
}
.dl-pill__txt b {
  font-family: var(--ff-ar-display);
  font-size: 1rem;
  color: var(--g-900);
  font-weight: 700;
}

.download-v2__visual {
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
  min-height: 560px;
}

.download-v2__phone-stack {
  position: relative;
  isolation: isolate;
  display: grid;
  place-items: center;
}
.download-v2__hand {
  position: absolute;
  left: 52%;
  bottom: -128px;
  width: 520px;
  max-width: none;
  transform: translateX(-58%) rotate(9deg);
  opacity: 0.78;
  pointer-events: none;
  z-index: 0;
  filter: drop-shadow(0 26px 38px rgba(0, 0, 0, 0.25));
}
.download-v2__phone {
  position: relative;
  z-index: 2;
  transform: rotate(-5deg);
}
.download-v2__phone .phone {
  width: 320px;
  height: 660px;
}

@media (max-width: 980px) {
  .download-v2__inner {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .download-v2__panel {
    min-height: 0;
    order: 2;
    align-items: center;
    padding-inline: 0;
  }
  .download-v2__lede {
    max-width: 52ch;
  }
  .download-v2__stores {
    width: min(100%, 520px);
  }
  .download-v2__visual {
    order: 1;
    min-height: 500px;
  }
  .download-v2__hand {
    width: 450px;
    bottom: -115px;
  }
}
@media (max-width: 640px) {
  .download-v2__stores {
    grid-template-columns: 1fr;
    gap: 0.65rem;
    width: min(100%, 440px);
  }
  .download-v2__stores .dl-pill:last-child {
    grid-column: auto;
  }
  .download-v2__phone .phone {
    width: 274px;
    height: 564px;
  }
  .download-v2__visual {
    min-height: 430px;
  }
  .download-v2__hand {
    width: 355px;
    bottom: -92px;
    transform: translateX(-58%) rotate(8deg);
    opacity: 0.72;
  }
}

/* Tweak panel layering */
.tweaks-panel {
  z-index: 250;
}
