/*
 * Home page: the original Islamic Portal design (hero carousel, Quick Start, Guided Learning Paths, Featured
 * Courses, Live Guidance, the Quran & Hadith band, Revert Guide, store), with every Portal 2.0 section merged in
 * as cards of the same kind, compact and dense. The experience layer is here too: the hero scene follows the
 * time of day, cards tilt and glow under the cursor, sections reveal as they scroll in. Motion uses transform
 * and opacity only and is switched off for visitors who prefer reduced motion.
 * Tokens come from layout.css; logical properties throughout for Arabic and Urdu.
 */

.hp {
  /* The design's pastel grounds and their deeper inks. */
  --pg-green: #eefaf0;
  --pg-blue: #eef4ff;
  --pg-purple: #f5f0ff;
  --pg-orange: #fff8e6;
  --pg-red: #fff3f0;
  /* Pastel-card text, deep enough for 4.5:1 on its own pastel. */
  --pk-green: #1e7a44;
  --pk-blue: #1a63c4;
  --pk-purple: #6f42c1;
  --pk-orange: #9a5f00;
  --pk-red: #b8321d;
  --pl-green: #d6f0dc;
  --pl-blue: #d9e5fb;
  --pl-purple: #e6dcfa;
  --pl-orange: #f8e7bf;
  --pl-red: #fbd9d0;
  padding-bottom: .25rem;
}
[data-theme="dark"] .hp,
body.dark .hp {
  --pg-green: rgba(46, 184, 114, .1);
  --pg-blue: rgba(108, 182, 255, .1);
  --pg-purple: rgba(169, 139, 255, .11);
  --pg-orange: rgba(230, 184, 92, .1);
  --pg-red: rgba(255, 138, 115, .1);
  --pk-green: #5fd49a;
  --pk-blue: #8cc6ff;
  --pk-purple: #bfa8ff;
  --pk-orange: #ecc879;
  --pk-red: #ffa38f;
  --pl-green: rgba(46, 184, 114, .22);
  --pl-blue: rgba(108, 182, 255, .2);
  --pl-purple: rgba(169, 139, 255, .22);
  --pl-orange: rgba(230, 184, 92, .2);
  --pl-red: rgba(255, 138, 115, .2);
}

/* ---------- Blocks and cards ---------- */
.hp-block {
  margin-top: 1rem;
}
/* No content-visibility on the sections: with the page down to eight sections it saved little, and it left the
 * lower sections unpainted (blank bands) in full-page captures, previews and print. */
/* Arabic and Urdu headlines grow when their web fonts arrive; the hero keeps that final height from the start,
 * so nothing below it moves (measured at 1440px). */
@media (min-width: 992px) {
  html[lang="ar"] .hp-slide {
    min-height: 410px;
  }
  html[lang="ur"] .hp-slide {
    min-height: 470px;
  }
  /* The journey chips take two rows once Naskh / Nastaliq has loaded; the room is kept from the start. */
  html:is([lang="ar"], [lang="ur"]) .hp-chooser__chips {
    min-height: 70px;
    align-content: flex-start;
  }
}
.hp-flow {
  display: flex;
  flex-direction: column;
}
/* Flex and grid children may shrink below their content. */
.hp-flow > *,
.hp-day > *,
.hp-salah > *,
.hp-revert > * {
  min-width: 0;
}
.hp-card {
  position: relative;
  padding: 1rem 1.1rem 1.1rem;
  border: 1px solid var(--ip-line);
  border-radius: var(--ip-radius-lg);
  background: var(--ip-surface);
  box-shadow: var(--ip-shadow-sm);
}
.hp-card__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: .25rem .75rem;
  margin-bottom: .85rem;
}
.hp-card__title {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  margin: 0;
  font-size: 1.06rem;
  font-weight: 700;
  letter-spacing: -.01em;
  line-height: 1.3;
  color: var(--ip-ink);
}
.hp-card__sub {
  font-size: .85rem;
  font-weight: 500;
  color: var(--ip-muted);
}
.hp-card__action {
  margin-inline-start: auto;
  align-self: center;
  min-height: 32px;
  padding: .3rem .9rem;
  font-size: .8rem;
}
.hp-link {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  font-size: .85rem;
  font-weight: 600;
  color: var(--ip-primary);
  text-decoration: none;
}
.hp-link i {
  transition: transform .25s var(--ip-ease);
}
.hp-link:hover {
  color: var(--ip-primary-hover);
}
.hp-link:hover i:not(.ip-flip) {
  transform: translateX(3px);
}
[dir="rtl"] .hp-link:hover i.ip-flip {
  transform: scaleX(-1) translateX(3px);
}

/* ---------- Hero carousel ---------- */
.hp-hero {
  padding-top: 1rem;
  --sky-tint: transparent;
  --sky-blend: normal;
  --sky-op: 0;
  --stars-op: 0;
  --orb: radial-gradient(circle, rgba(255, 244, 214, .95) 0%, rgba(255, 214, 140, .45) 35%, transparent 70%);
  --img-filter: none;
}
.hp-hero[data-sky="fajr"] {
  --sky-tint: linear-gradient(180deg, rgba(120, 140, 230, .45) 0%, rgba(255, 170, 170, .35) 60%, rgba(255, 214, 170, .2) 100%);
  --sky-blend: soft-light;
  --sky-op: 1;
  --stars-op: .5;
  --img-filter: saturate(.95) brightness(.98);
}
.hp-hero[data-sky="asr"] {
  --sky-tint: linear-gradient(200deg, rgba(255, 196, 110, .55) 0%, rgba(255, 220, 160, .15) 70%);
  --sky-blend: soft-light;
  --sky-op: 1;
}
.hp-hero[data-sky="maghrib"] {
  --sky-tint: linear-gradient(185deg, rgba(120, 70, 160, .55) 0%, rgba(255, 120, 70, .45) 55%, rgba(255, 190, 120, .25) 100%);
  --sky-blend: multiply;
  --sky-op: .85;
  --stars-op: .25;
  --orb: radial-gradient(circle, rgba(255, 200, 150, .9) 0%, rgba(255, 120, 80, .35) 40%, transparent 70%);
}
.hp-hero[data-sky="isha"] {
  --sky-tint: linear-gradient(180deg, rgba(14, 22, 66, .82) 0%, rgba(26, 38, 92, .62) 55%, rgba(40, 52, 110, .45) 100%);
  --sky-blend: multiply;
  --sky-op: 1;
  --stars-op: 1;
  --orb: radial-gradient(circle, rgba(230, 236, 255, .7) 0%, rgba(160, 180, 255, .25) 40%, transparent 70%);
  --img-filter: saturate(.85);
}
.hp-hero__stage {
  position: relative;
  border: 1px solid var(--ip-line);
  border-radius: var(--ip-radius-lg);
  background: var(--ip-surface);
  box-shadow: var(--ip-shadow-sm), 0 30px 60px -40px rgba(13, 59, 41, .35);
  overflow: hidden;
  isolation: isolate;
}
.hp-hero__slides {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
}
.hp-slide {
  grid-area: 1 / 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  min-height: 340px;
  opacity: 0;
  visibility: hidden;
  transition: opacity .7s var(--ip-ease), visibility 0s linear .7s;
}
.hp-slide.is-active {
  opacity: 1;
  visibility: visible;
  transition: opacity .7s var(--ip-ease), visibility 0s;
  z-index: 1;
}
.hp-slide[hidden] {
  display: none;
}
.hp-slide__copy {
  position: relative;
  z-index: 2;
  padding-block: 1.6rem 1.6rem; padding-inline: 1.6rem 0;
  padding-inline: 1.6rem 0;
}
.hp-slide__badge {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  margin-bottom: .65rem;
  padding: .25rem .7rem;
  border-radius: var(--ip-radius-pill);
  background: var(--pg-green);
  color: var(--pk-green);
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .02em;
}
.hp-slide__title {
  margin: 0;
  font-size: clamp(1.9rem, 1.3rem + 1.6vw, 2.75rem);
  font-weight: 700;
  line-height: 1.16;
  letter-spacing: -.025em;
  color: var(--ip-ink);
  text-wrap: balance;
}
.hp-slide__accent {
  color: var(--ip-primary);
}
html[lang="ur"] .hp-slide__title {
  font-size: clamp(1.6rem, 1.2rem + 1.3vw, 2.3rem);
  line-height: 1.8;
}
html[lang="ar"] .hp-slide__title {
  line-height: 1.45;
}
.hp-slide__sub {
  max-width: 34rem;
  margin: .8rem 0 0;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--ip-muted);
}
.hp-slide__actions {
  display: flex;
  flex-wrap: wrap;
  gap: .65rem;
  margin-top: 1.25rem;
}
.hp-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: .5rem;
  margin: 1rem 0 0;
  padding: 0;
  list-style: none;
}
.hp-kpis--three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.hp-kpi {
  display: flex;
  align-items: center;
  gap: .5rem;
  height: 100%;
  padding: .5rem .6rem;
  border: 1px solid var(--ip-line);
  border-radius: 10px;
  background: var(--ip-surface);
  box-shadow: 0 .125rem .25rem rgba(0, 0, 0, .05);
  color: var(--ip-ink);
  text-decoration: none;
  transition: transform .25s var(--ip-ease), box-shadow .25s var(--ip-ease);
}
a.hp-kpi:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 14px rgba(0, 0, 0, .07);
  color: var(--ip-ink);
}
.hp-kpi > i {
  font-size: 1.15rem;
}
.hp-kpi strong {
  display: block;
  font-size: .82rem;
  font-weight: 700;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
}
.hp-kpi span span {
  display: block;
  font-size: .72rem;
  line-height: 1.25;
  color: var(--ip-muted);
}
/* The active slide's text rises in, one line after another, as in the design. */
.hp-slide.is-active .hp-slide__badge,
.hp-slide.is-active .hp-slide__title,
.hp-slide.is-active .hp-slide__sub,
.hp-slide.is-active .hp-slide__actions,
.hp-slide.is-active .hp-kpis {
  animation: hp-rise .7s var(--ip-ease) both;
}
.hp-slide.is-active .hp-slide__title { animation-delay: .08s; }
.hp-slide.is-active .hp-slide__sub { animation-delay: .18s; }
.hp-slide.is-active .hp-slide__actions { animation-delay: .28s; }
.hp-slide.is-active .hp-kpis { animation-delay: .38s; }
@keyframes hp-rise {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: none; }
}

/* The scene: the mosque artwork, re-lit for the time of day, with light rays, an orb and a passing sheen. */
.hp-scene {
  position: relative;
  align-self: stretch;
  min-height: 340px;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 16%);
  mask-image: linear-gradient(90deg, transparent 0, #000 16%);
}
[dir="rtl"] .hp-scene {
  -webkit-mask-image: linear-gradient(-90deg, transparent 0, #000 16%);
  mask-image: linear-gradient(-90deg, transparent 0, #000 16%);
}
.hp-scene > * {
  position: absolute;
  pointer-events: none;
}
/* The mosque artwork is served from a 2x copy (Lanczos-resampled and lightly sharpened from the 461px
 * original, and lighter as WebP), so the browser scales a crisp image down rather than stretching a small
 * one. Higher-resolution originals from the designer would still be better. */
.hp-scene__img {
  inset: -14px;
  background: var(--hp-img, url("../images/hero@2x.webp")) center right / cover no-repeat;
  filter: var(--img-filter);
  transform: translate3d(var(--px, 0px), var(--py, 0px), 0) scale(1.03);
  transition: transform .9s cubic-bezier(.2, .8, .2, 1);
  will-change: transform;
}
.hp-scene__img--2 {
  --hp-img: url("../images/hero@2x.webp");
}
.hp-scene__img--flip {
  background-position: center left;
}
[data-theme="dark"] .hp-scene__img,
body.dark .hp-scene__img {
  --hp-img: url("../images/hero-dark@2x.webp");
}
[data-theme="dark"] .hp-scene__img--2,
body.dark .hp-scene__img--2 {
  --hp-img: url("../images/hero2-dark@2x.webp");
}
/* Vector layers over the photograph keep the scene's edges sharp at any size: gold corner brackets drawn
 * in-house, a fine white lattice in the sky, a soft ground shadow and a hairline inner frame. */
.hp-scene::before,
.hp-scene::after {
  content: "";
  position: absolute;
  z-index: 1;
  pointer-events: none;
}
.hp-scene::before {
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='56' viewBox='0 0 120 120'%3E%3Cg fill='none' stroke='%23ffffff' stroke-width='1.6' stroke-opacity='.55'%3E%3Cpolygon points='60,33 65,48 80,41 72,56 87,60 72,65 80,80 65,72 60,87 56,72 41,80 48,65 33,60 48,56 41,41 56,48'/%3E%3Cline x1='60' y1='33' x2='60' y2='0'/%3E%3Cline x1='87' y1='60' x2='120' y2='60'/%3E%3Cline x1='60' y1='87' x2='60' y2='120'/%3E%3Cline x1='33' y1='60' x2='0' y2='60'/%3E%3C/g%3E%3C/svg%3E") repeat top right / 56px 56px;
  -webkit-mask-image: radial-gradient(110% 60% at 100% 0%, #000 0%, rgba(0, 0, 0, .5) 30%, transparent 60%);
  mask-image: radial-gradient(110% 60% at 100% 0%, #000 0%, rgba(0, 0, 0, .5) 30%, transparent 60%);
  opacity: .7;
}
[dir="rtl"] .hp-scene::before {
  background-position: top left;
  -webkit-mask-image: radial-gradient(110% 60% at 0% 0%, #000 0%, rgba(0, 0, 0, .5) 30%, transparent 60%);
  mask-image: radial-gradient(110% 60% at 0% 0%, #000 0%, rgba(0, 0, 0, .5) 30%, transparent 60%);
}
.hp-scene::after {
  inset: 0;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='46' height='46'%3E%3Cg fill='none' stroke='%23e6b85c' stroke-width='1.5'%3E%3Cpath d='M2 1h43v43'/%3E%3Cpath d='M10 7h29v29' stroke-opacity='.6'/%3E%3C/g%3E%3Cpath d='M45 1l-4 4 4 4 4-4z' fill='%23e6b85c' transform='translate(-4 0)'/%3E%3C/svg%3E") no-repeat top 12px right 12px / 46px 46px,
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='46' height='46'%3E%3Cg fill='none' stroke='%23e6b85c' stroke-width='1.5'%3E%3Cpath d='M2 45h43V2'/%3E%3Cpath d='M10 39h29V10' stroke-opacity='.6'/%3E%3C/g%3E%3C/svg%3E") no-repeat bottom 12px right 12px / 46px 46px,
    linear-gradient(0deg, rgba(13, 59, 41, .22) 0%, transparent 30%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .35);
}
[dir="rtl"] .hp-scene::after {
  transform: scaleX(-1);
}
[data-theme="dark"] .hp-scene::after,
body.dark .hp-scene::after {
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='46' height='46'%3E%3Cg fill='none' stroke='%23e6b85c' stroke-width='1.5'%3E%3Cpath d='M2 1h43v43'/%3E%3Cpath d='M10 7h29v29' stroke-opacity='.6'/%3E%3C/g%3E%3Cpath d='M45 1l-4 4 4 4 4-4z' fill='%23e6b85c' transform='translate(-4 0)'/%3E%3C/svg%3E") no-repeat top 12px right 12px / 46px 46px,
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='46' height='46'%3E%3Cg fill='none' stroke='%23e6b85c' stroke-width='1.5'%3E%3Cpath d='M2 45h43V2'/%3E%3Cpath d='M10 39h29V10' stroke-opacity='.6'/%3E%3C/g%3E%3C/svg%3E") no-repeat bottom 12px right 12px / 46px 46px,
    linear-gradient(0deg, rgba(3, 12, 9, .45) 0%, transparent 35%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .06);
}
@media (max-width: 991.98px) {
  .hp-scene::after {
    background-position: top 10px right 10px, bottom 40px right 10px, 0 0;
  }
}
@media (prefers-reduced-motion: no-preference) {
  .hp-slide.is-active .hp-scene::after {
    animation: hp-frame-in .9s var(--ip-ease) both .2s;
  }
}
@keyframes hp-frame-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

.hp-slide.is-active .hp-scene__img {
  animation: hp-drift 22s ease-in-out infinite alternate;
}
@keyframes hp-drift {
  from { scale: 1; }
  to { scale: 1.06; }
}
.hp-scene__sky {
  inset: 0;
  background: var(--sky-tint);
  mix-blend-mode: var(--sky-blend);
  opacity: var(--sky-op);
  transition: opacity 1.2s;
}
.hp-scene__rays {
  inset: -60% -40% auto auto;
  width: 120%;
  aspect-ratio: 1;
  background: repeating-conic-gradient(from 200deg at 70% 30%, rgba(255, 248, 225, .22) 0deg 4deg, transparent 4deg 13deg);
  -webkit-mask-image: radial-gradient(circle at 70% 30%, #000 0, transparent 55%);
  mask-image: radial-gradient(circle at 70% 30%, #000 0, transparent 55%);
  mix-blend-mode: screen;
  opacity: calc(.75 - var(--stars-op) * .6);
  animation: hp-rays 40s linear infinite;
  transform-origin: 70% 30%;
}
@keyframes hp-rays {
  to { transform: rotate(360deg); }
}
.hp-scene__stars {
  inset: 0 0 45% 0;
  background-image:
    radial-gradient(1.2px 1.2px at 12% 18%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 28% 8%, #fff 50%, transparent 51%),
    radial-gradient(1.4px 1.4px at 46% 22%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 62% 12%, #fff 50%, transparent 51%),
    radial-gradient(1.3px 1.3px at 80% 26%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 90% 6%, #fff 50%, transparent 51%),
    radial-gradient(1.2px 1.2px at 35% 34%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 70% 40%, #fff 50%, transparent 51%);
  opacity: var(--stars-op);
  animation: hp-twinkle 4s ease-in-out infinite alternate;
}
@keyframes hp-twinkle {
  from { opacity: calc(var(--stars-op) * .55); }
  to { opacity: var(--stars-op); }
}
.hp-scene__orb {
  top: -40px;
  inset-inline-end: 8%;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: var(--orb);
  mix-blend-mode: screen;
  opacity: .8;
  animation: hp-orb 14s ease-in-out infinite alternate;
}
@keyframes hp-orb {
  from { transform: translate3d(0, 0, 0); }
  to { transform: translate3d(-36px, 18px, 0); }
}
.hp-scene__sheen {
  inset: 0;
  background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, .35) 48%, transparent 60%);
  transform: translateX(-100%);
  animation: hp-sheen 9s var(--ip-ease) infinite 1.5s;
}
@keyframes hp-sheen {
  0%, 70% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

/* The Give Aid slide: no photograph, but Give Aid's own gold meter rising over a deep-teal night, with the two
 * funds (Zakat in gold, Sadaqah in teal) floating beside it. Drawn in CSS and SVG, so it is sharp at any size. */
.hp-slide__badge--aid {
  background: rgba(233, 162, 59, .16);
  color: #8a5a00;
}
[data-theme="dark"] .hp-slide__badge--aid,
body.dark .hp-slide__badge--aid {
  color: #f3c46c;
}
.hp-slide__accent--gold {
  color: #c9821c;
}
[data-theme="dark"] .hp-slide__accent--gold,
body.dark .hp-slide__accent--gold {
  color: #f6c46a;
}
.hp-scene--aid {
  --stars-op: .8;
  --orb: radial-gradient(circle, rgba(246, 196, 106, .55), transparent 65%);
  background:
    radial-gradient(60% 70% at 70% 30%, rgba(60, 189, 172, .35), transparent 70%),
    linear-gradient(150deg, #052522 0%, #0a413c 55%, #0f6159 100%);
}
.hp-aidart {
  inset: 0;
  display: grid;
  place-items: center;
  z-index: 0;
}
.hp-aidart__arc {
  width: auto;
  height: min(78%, 290px);
  overflow: visible;
  filter: drop-shadow(0 18px 40px rgba(0, 0, 0, .35));
}
.hp-aidart__arc path {
  fill: none;
  stroke-linecap: round;
}
.hp-aidart__ticks {
  stroke: rgba(255, 255, 255, .22);
  stroke-width: 30;
  stroke-dasharray: .4 4.6;
  stroke-linecap: butt !important;
}
.hp-aidart__track {
  stroke: rgba(255, 255, 255, .12);
  stroke-width: 18;
}
.hp-aidart__fill {
  stroke-width: 18;
  stroke-dasharray: 72 100;
  filter: drop-shadow(0 4px 10px rgba(233, 162, 59, .55));
}
@media (prefers-reduced-motion: no-preference) {
  .hp-slide.is-active .hp-aidart__fill {
    animation: hp-aid-fill 1.6s var(--ip-ease) both .3s;
  }
}
@keyframes hp-aid-fill {
  from { stroke-dasharray: 0 100; }
  to { stroke-dasharray: 72 100; }
}
.hp-aidart__heart {
  position: absolute;
  display: grid;
  place-items: center;
  width: 74px;
  height: 74px;
  border-radius: 50%;
  background: linear-gradient(160deg, #f6c46a, #e09423);
  color: #3a2400;
  font-size: 1.9rem;
  box-shadow: 0 14px 34px -8px rgba(233, 162, 59, .7), inset 0 2px 0 rgba(255, 255, 255, .45);
}
.hp-aidart__chip {
  position: absolute;
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .4rem .8rem;
  border-radius: 999px;
  font-weight: 800;
  font-size: .85rem;
  box-shadow: 0 10px 26px -10px rgba(0, 0, 0, .55);
}
.hp-aidart__chip--zakat {
  inset-block-start: 12%;
  inset-inline-start: 14%;
  background: linear-gradient(180deg, #fbe1ad, #f3c46c);
  color: #4b2e00;
}
.hp-aidart__chip--sadaqah {
  inset-block-start: 12%;
  inset-inline-end: 12%;
  background: linear-gradient(180deg, #c9f0ea, #8fdcd0);
  color: #073b35;
}
@media (prefers-reduced-motion: no-preference) {
  .hp-slide.is-active .hp-aidart__chip {
    animation: hp-orb 7s ease-in-out infinite alternate;
  }
  .hp-slide.is-active .hp-aidart__chip--sadaqah {
    animation-delay: -3.5s;
  }
}

/* The next prayer, counting down live, floats over the scene. */
.hp-nextchip {
  position: absolute;
  z-index: 3;
  bottom: 1rem;
  inset-inline-end: 1rem;
  display: flex;
  align-items: center;
  gap: .6rem;
  padding-block: .5rem .5rem; padding-inline: .5rem .85rem;
  padding-inline: .5rem .9rem;
  border: 1px solid rgba(255, 255, 255, .7);
  border-radius: 14px;
  background: rgba(255, 255, 255, .82);
  -webkit-backdrop-filter: blur(12px) saturate(1.4);
  backdrop-filter: blur(12px) saturate(1.4);
  box-shadow: 0 12px 30px -12px rgba(13, 59, 41, .45);
  color: var(--ip-ink);
  text-decoration: none;
  animation: hp-rise .8s var(--ip-ease) .6s both;
  transition: transform .25s var(--ip-ease);
}
.hp-nextchip:hover {
  transform: translateY(-2px);
  color: var(--ip-ink);
}
[data-theme="dark"] .hp-nextchip,
body.dark .hp-nextchip {
  border-color: rgba(255, 255, 255, .08);
  background: rgba(11, 20, 26, .78);
}
.hp-nextchip__icon {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, #1f7a63, #2eb872);
  color: #fff;
  font-size: 1.05rem;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25);
}
.hp-nextchip__text {
  display: grid;
  line-height: 1.25;
}
.hp-nextchip__label {
  font-size: .78rem;
  color: var(--ip-ink-2);
}
.hp-nextchip__label time {
  font-variant-numeric: tabular-nums;
}
.hp-nextchip__count {
  font-size: .9rem;
  font-weight: 700;
  color: var(--ip-primary);
  font-variant-numeric: tabular-nums;
}
.hp-nextchip__count:empty {
  display: none;
}

.hp-hero__controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  margin-top: .6rem;
}
.hp-round {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 1px solid var(--ip-line);
  border-radius: 50%;
  background: var(--ip-surface);
  color: var(--ip-ink-2);
  font-size: .8rem;
  box-shadow: 0 .125rem .25rem rgba(0, 0, 0, .075);
  transition: color .2s, border-color .2s, transform .2s var(--ip-ease);
}
.hp-round:hover {
  color: var(--ip-primary);
  border-color: var(--ip-primary);
}
.hp-round:active {
  transform: scale(.92);
}
.hp-round--sm {
  width: 28px;
  height: 28px;
}
.hp-dots {
  display: flex;
  align-items: center;
  gap: 0;
  margin-inline: .2rem;
}
/* Each dot is a full 24px target (WCAG 2.2); the pill inside is what you see. */
.hp-dot {
  position: relative;
  width: 24px;
  height: 24px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  transition: width .35s var(--ip-ease);
}
.hp-dot::before {
  content: "";
  position: absolute;
  inset: 8px;
  border-radius: 8px;
  background: color-mix(in srgb, var(--ip-primary) 35%, transparent);
  transition: background-color .3s;
}
.hp-dot.is-active {
  width: 38px;
}
.hp-dot.is-active::before {
  inset: 8px 6px;
  background: color-mix(in srgb, var(--ip-primary) 30%, transparent);
}
.hp-dot span {
  position: absolute;
  inset: 8px 6px;
  border-radius: 8px;
  overflow: hidden;
  background: var(--ip-primary);
  transform: scaleX(0);
  transform-origin: left center;
}
[dir="rtl"] .hp-dot span {
  transform-origin: right center;
}
.hp-dot.is-active span {
  transform: scaleX(1);
}
.hp-hero.is-playing .hp-dot.is-active span {
  animation: hp-fill var(--hp-interval, 7s) linear both;
}
@keyframes hp-fill {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}

/* ---------- Search and journey chooser ---------- */
.hp-block--first {
  margin-top: .75rem;
}
.hp-finder {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: .85rem 1.5rem;
  align-items: center;
  padding: .85rem 1rem;
}
.hp-search {
  position: relative;
  display: flex;
  align-items: center;
  gap: .4rem;
  padding: .3rem;
  padding-inline-start: 2.7rem;
  border: 1px solid var(--ip-line-strong);
  border-radius: 12px;
  background: var(--ip-bg);
  transition: border-color .2s, box-shadow .25s var(--ip-ease), background-color .2s;
}
.hp-search:focus-within {
  border-color: var(--ip-primary);
  background: var(--ip-surface);
  box-shadow: 0 0 0 4px rgba(31, 122, 99, .12);
}
.hp-search__icon {
  position: absolute;
  inset-inline-start: 1rem;
  font-size: 1.05rem;
  color: var(--ip-primary);
}
.hp-search__input {
  flex: 1;
  min-width: 0;
  height: 40px;
  border: 0;
  background: transparent;
  color: var(--ip-ink);
  font-size: .95rem;
}
.hp-search__input:focus {
  outline: none;
}
.hp-search__input::placeholder {
  color: var(--ip-muted);
  transition: opacity .3s;
}
.hp-search__input.is-swapping::placeholder {
  opacity: 0;
}
.hp-search__kbd {
  padding: .1rem .4rem;
  border: 1px solid var(--ip-line-strong);
  border-radius: 6px;
  background: var(--ip-surface);
  color: var(--ip-muted);
  font-family: var(--ip-font-sans);
  font-size: .68rem;
  box-shadow: none;
}
.hp-search__button {
  min-height: 40px;
}
.hp-chooser__title {
  display: flex;
  align-items: center;
  gap: .45rem;
  margin: 0 0 .45rem;
  font-size: .82rem;
  font-weight: 700;
  color: var(--ip-ink);
}
.hp-chooser__title i {
  color: var(--ip-primary);
}
.hp-chooser__chips {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
}
.hp-chip {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  min-height: 32px;
  padding: .25rem .7rem;
  border: 1px solid var(--ip-line-strong);
  border-radius: var(--ip-radius-pill);
  background: var(--ip-surface);
  color: var(--ip-ink-2);
  font-size: .78rem;
  font-weight: 600;
  transition: background-color .2s, border-color .2s, color .2s, transform .2s var(--ip-ease);
}
.hp-chip i {
  /* A fixed box, so the chips do not widen (and wrap, moving the page) when the icon font arrives. */
  display: inline-block;
  flex: 0 0 1.15em;
  width: 1.15em;
  text-align: center;
  font-size: .8rem;
  color: var(--ip-primary);
  transition: color .2s;
}
.hp-chip:hover {
  border-color: var(--ip-primary);
  color: var(--ip-primary);
}
.hp-chip:active {
  transform: scale(.96);
}
.hp-chip[aria-checked="true"] {
  border-color: var(--ip-primary);
  background: var(--ip-primary);
  color: #fff;
  box-shadow: 0 6px 14px -8px rgba(31, 122, 99, .8);
}
.hp-chip[aria-checked="true"] i {
  color: #fff;
}
[data-theme="dark"] .hp-chip[aria-checked="true"],
body.dark .hp-chip[aria-checked="true"] {
  color: #03140b;
}
[data-theme="dark"] .hp-chip[aria-checked="true"] i,
body.dark .hp-chip[aria-checked="true"] i {
  color: #03140b;
}

/* ---------- Continue where you left off ---------- */
.hp-continue__list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: .65rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.hp-resume {
  display: flex;
  align-items: center;
  gap: .75rem;
  height: 100%;
  padding: .7rem .85rem;
  border: 1px solid var(--ip-line);
  border-radius: 12px;
  background: linear-gradient(135deg, var(--pg-green), var(--ip-surface));
  color: var(--ip-ink);
  text-decoration: none;
  transition: transform .25s var(--ip-ease), box-shadow .25s var(--ip-ease), border-color .25s;
}
.hp-resume:hover {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--ip-primary) 30%, var(--ip-line));
  box-shadow: var(--ip-shadow-md);
  color: var(--ip-ink);
}
.hp-resume--blue { background: linear-gradient(135deg, var(--pg-blue), var(--ip-surface)); }
.hp-resume--purple { background: linear-gradient(135deg, var(--pg-purple), var(--ip-surface)); }
.hp-resume--orange { background: linear-gradient(135deg, var(--pg-orange), var(--ip-surface)); }
.hp-resume__icon {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: var(--ip-surface);
  box-shadow: var(--ip-shadow-sm);
  font-size: 1.25rem;
}
.hp-ring {
  --p: 0;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: conic-gradient(var(--ip-primary) calc(var(--p) * 1%), var(--ip-line) 0);
}
.hp-ring span {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--ip-surface);
  font-size: .7rem;
  font-weight: 700;
  color: var(--ip-ink);
}
.hp-resume__text {
  display: grid;
  flex: 1;
  min-width: 0;
  line-height: 1.3;
}
.hp-resume__kind {
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--ip-primary);
}
.hp-resume__title {
  overflow: hidden;
  font-size: .9rem;
  font-weight: 600;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.hp-resume__meta {
  font-size: .76rem;
  color: var(--ip-muted);
}
.hp-resume__go {
  display: inline-flex;
  align-items: center;
  font-size: .78rem;
  font-weight: 700;
  color: var(--ip-primary);
}

/* ---------- Your day: prayer times, dua of the day, tools ---------- */
.hp-day {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: .9rem;
}
.hp-prayer {
  position: relative;
  padding: .9rem 1rem 1rem;
  border: 1px solid var(--ip-line);
  border-radius: 14px;
  background:
    radial-gradient(120% 90% at 100% 0%, rgba(230, 184, 92, .16), transparent 55%),
    linear-gradient(160deg, var(--pg-blue) 0%, var(--pg-green) 100%);
  overflow: hidden;
}
.hp-prayer__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: .75rem;
}
.hp-prayer__title {
  margin: 0;
  font-size: .98rem;
  font-weight: 700;
  color: var(--ip-ink);
}
.hp-prayer__place,
.hp-prayer__date {
  display: flex;
  align-items: center;
  gap: .3rem;
  margin: .15rem 0 0;
  font-size: .78rem;
  color: var(--ip-muted);
}
.hp-prayer__locate {
  flex-shrink: 0;
  min-height: 32px;
  padding: .25rem .7rem;
  font-size: .76rem;
}
.hp-prayer__locate[aria-busy="true"] i {
  animation: hp-spin 1s linear infinite;
}
@keyframes hp-spin {
  to { transform: rotate(360deg); }
}
.hp-arc {
  position: relative;
  height: 74px;
  margin: .5rem .25rem .1rem;
}
.hp-arc svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}
.hp-arc__horizon {
  stroke: var(--ip-line-strong);
  stroke-width: 1;
}
.hp-arc__body {
  position: absolute;
  top: 0;
  left: 0;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  margin: -14px 0 0 -14px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #fff6d8, #f4b740 70%);
  box-shadow: 0 0 0 6px rgba(244, 183, 64, .18), 0 0 22px rgba(244, 183, 64, .65);
  color: #a86400;
  font-size: .8rem;
  transform: translate3d(var(--sx, 0px), var(--sy, 92px), 0);
  transition: transform 1.4s cubic-bezier(.2, .8, .2, 1);
}
.hp-arc__body.is-moon {
  background: radial-gradient(circle at 35% 35%, #ffffff, #c9d3f5 70%);
  box-shadow: 0 0 0 6px rgba(160, 180, 255, .18), 0 0 22px rgba(160, 180, 255, .55);
  color: #4a5aa8;
}
.hp-prayer__next {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: .25rem .5rem;
  margin-top: .35rem;
}
.hp-prayer__next-label {
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--ip-primary);
}
.hp-prayer__next strong {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--ip-ink);
}
.hp-prayer__next time {
  font-size: 1rem;
  font-weight: 600;
  color: var(--ip-ink-2);
  font-variant-numeric: tabular-nums;
}
.hp-prayer__count {
  margin-inline-start: auto;
  padding: .15rem .6rem;
  border-radius: var(--ip-radius-pill);
  background: var(--ip-primary);
  color: #fff;
  font-size: .78rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
[data-theme="dark"] .hp-prayer__count,
body.dark .hp-prayer__count {
  color: #03140b;
}
.hp-prayer__count:empty {
  display: none;
}
.hp-prayer__more {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  margin-block-start: .75rem;
  font-weight: 600;
  color: var(--ip-primary, #0f6b4f);
  text-decoration: none;
}
.hp-prayer__more:hover,
.hp-prayer__more:focus-visible {
  text-decoration: underline;
}
.hp-prayer__more .bi {
  transition: transform .2s ease;
}
.hp-prayer__more:hover .bi {
  transform: translateX(3px);
}
[dir="rtl"] .hp-prayer__more .bi {
  transform: scaleX(-1);
}
[dir="rtl"] .hp-prayer__more:hover .bi {
  transform: scaleX(-1) translateX(3px);
}
@media (prefers-reduced-motion: reduce) {
  .hp-prayer__more .bi { transition: none; }
}
.hp-prayer__list {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: .35rem;
  margin: .7rem 0 0;
  padding: 0;
  list-style: none;
}
.hp-prayer__item {
  display: grid;
  gap: .05rem;
  padding: .45rem .3rem;
  border: 1px solid var(--ip-line);
  border-radius: 10px;
  background: color-mix(in srgb, var(--ip-surface) 80%, transparent);
  text-align: center;
  transition: transform .25s var(--ip-ease), background-color .3s, color .3s;
}
.hp-prayer__name {
  font-size: .72rem;
  font-weight: 600;
  color: var(--ip-muted);
}
.hp-prayer__time {
  font-size: .82rem;
  font-weight: 700;
  color: var(--ip-ink);
  font-variant-numeric: tabular-nums;
}
.hp-prayer__item.is-sunrise {
  opacity: .75;
}
.hp-prayer__item.is-next {
  border-color: transparent;
  background: linear-gradient(160deg, #23876d, #1f7a63);
  box-shadow: 0 8px 18px -10px rgba(31, 122, 99, .9);
  transform: translateY(-2px);
}
.hp-prayer__item.is-next .hp-prayer__name,
.hp-prayer__item.is-next .hp-prayer__time {
  color: #fff;
}
.hp-prayer__item.is-past .hp-prayer__time {
  color: var(--ip-muted);
}
.hp-prayer__note {
  margin: .5rem 0 0;
  font-size: .76rem;
  color: var(--ip-muted);
}
.hp-prayer__note:empty {
  display: none;
}
.hp-day__side {
  display: grid;
  gap: .75rem;
  align-content: start;
}
.hp-dua {
  position: relative;
  margin: 0;
  padding: .85rem 1rem;
  border: 1px solid color-mix(in srgb, #e6b85c 35%, var(--ip-line));
  border-radius: 14px;
  background:
    url("../images/right-pattern.png") right top / auto 100% no-repeat,
    linear-gradient(135deg, var(--pg-orange), var(--ip-surface));
}
[dir="rtl"] .hp-dua {
  background-position: left top, 0 0;
}
[data-theme="dark"] .hp-dua,
body.dark .hp-dua {
  background-image: url("../images/right-pattern-dark.png"), linear-gradient(135deg, var(--pg-orange), var(--ip-surface));
}
.hp-dua__label {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--pk-orange);
}
.hp-dua__title {
  margin: .2rem 0 .1rem;
  font-size: .95rem;
  font-weight: 700;
  color: var(--ip-ink);
}
.hp-dua__arabic {
  margin: .35rem 0;
  font-family: var(--ip-font-quran);
  font-size: 1.35rem;
  line-height: 2;
  color: var(--ip-ink);
  text-align: right;
}
.hp-dua__translation {
  display: -webkit-box;
  overflow: hidden;
  margin: 0 0 .4rem;
  font-size: .85rem;
  font-style: italic;
  line-height: 1.55;
  color: var(--ip-ink-2);
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}
.hp-dua__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .35rem .75rem;
}
.hp-dua__source {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  font-size: .76rem;
  font-weight: 600;
  color: var(--ip-ink-2);
}
.hp-tools {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.hp-tool {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-rows: auto auto;
  column-gap: .6rem;
  align-items: center;
  height: 100%;
  padding: .6rem .7rem;
  border: 1px solid var(--ip-line);
  border-radius: 12px;
  background: var(--pg-green);
  color: var(--ip-ink);
  text-decoration: none;
  transition: transform .25s var(--ip-ease), box-shadow .25s var(--ip-ease);
}
.hp-tool--blue { background: var(--pg-blue); }
.hp-tool--purple { background: var(--pg-purple); }
.hp-tool--orange { background: var(--pg-orange); }
.hp-tool--red { background: var(--pg-red); }
.hp-tool:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 18px rgba(0, 0, 0, .07);
  color: var(--ip-ink);
}
.hp-tool > i {
  grid-row: span 2;
  font-size: 1.4rem;
}
.hp-tool__title {
  font-size: .84rem;
  font-weight: 600;
  line-height: 1.25;
}
.hp-tool__text {
  font-size: .74rem;
  line-height: 1.3;
  color: var(--ip-muted);
}

/* ---------- Featured courses ---------- */
.hp-courses {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: .9rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.hp-course {
  position: relative;
  display: block;
  height: 168px;
  padding: 1rem;
  border: 1px solid var(--ip-line);
  border-radius: 16px;
  background: linear-gradient(135deg, var(--pg-green), color-mix(in srgb, var(--pg-green) 40%, var(--ip-surface)));
  color: inherit;
  text-decoration: none;
  overflow: hidden;
  isolation: isolate;
  transform: perspective(800px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateY(var(--lift, 0px));
  transition: transform .35s var(--ip-ease), box-shadow .35s var(--ip-ease);
}
.hp-course--blue { background: linear-gradient(135deg, var(--pg-blue), color-mix(in srgb, var(--pg-blue) 40%, var(--ip-surface))); }
.hp-course--purple { background: linear-gradient(135deg, var(--pg-purple), color-mix(in srgb, var(--pg-purple) 40%, var(--ip-surface))); }
.hp-course--orange { background: linear-gradient(135deg, var(--pg-orange), color-mix(in srgb, var(--pg-orange) 40%, var(--ip-surface))); }
.hp-course--red { background: linear-gradient(135deg, var(--pg-red), color-mix(in srgb, var(--pg-red) 40%, var(--ip-surface))); }
.hp-course::after {
  content: "";
  position: absolute;
  z-index: -1;
  inset-inline-end: -10px;
  top: 0;
  width: 46%;
  height: 112%;
  background: var(--art) right center / contain no-repeat;
  opacity: .92;
  transition: transform .5s var(--ip-ease);
}
.hp-course:hover {
  --lift: -6px;
  box-shadow: 0 12px 25px rgba(0, 0, 0, .08);
  color: inherit;
}
.hp-course:hover::after {
  transform: scale(1.05) translateY(-2px);
}
.hp-course__badge {
  position: absolute;
  top: .75rem;
  inset-inline-start: .75rem;
  z-index: 2;
  padding: .2rem .55rem;
  border-radius: 20px;
  background: #22c55e;
  color: #fff;
  font-size: .68rem;
  font-weight: 600;
}
.hp-course__badge--intermediate { background: #f59e0b; color: #2b1d02; }
.hp-course__badge--advanced { background: #ef4444; }
.hp-course__badge--beginner { background: #16a34a; }
.hp-course__body {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 78%;
  height: 100%;
  padding-top: 1.6rem;
}
.hp-course__top {
  display: grid;
  gap: .3rem;
  justify-items: start;
}
.hp-course__title {
  display: -webkit-box;
  overflow: hidden;
  font-size: .92rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--ip-ink);
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.hp-course__by {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  font-size: .76rem;
  color: var(--ip-ink-2);
}
.hp-course__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .25rem .6rem;
  padding: .4rem .55rem;
  border-radius: 10px;
  background: color-mix(in srgb, var(--ip-surface) 82%, transparent);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  box-shadow: 0 2px 6px rgba(0, 0, 0, .05);
  font-size: .74rem;
  color: var(--ip-ink-2);
}
.hp-course__meta > span {
  display: inline-flex;
  align-items: center;
  gap: .25rem;
}
.hp-star {
  color: #f59e0b;
}
.hp-course__free {
  padding: .05rem .45rem;
  border-radius: 20px;
  background: var(--pg-green);
  color: var(--pk-green);
  font-weight: 700;
}

/* ---------- Salah & wudu ---------- */
.hp-salah {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1rem;
}
.hp-salah__sub {
  margin: .3rem 0 .75rem;
  font-size: .9rem;
  color: var(--ip-ink-2);
}
.hp-steps {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
/* The design's recitation pills: one lights up in turn, walking through a prayer. */
.hp-step {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding-block: .3rem .3rem; padding-inline: .35rem .8rem;
  padding-inline: .35rem .8rem;
  border: 1px solid rgba(0, 0, 0, .12);
  border-radius: 50rem;
  background: var(--ip-surface);
  color: var(--ip-ink);
  font-size: .78rem;
  font-weight: 600;
  transition: background-color .35s, color .35s, box-shadow .35s, border-color .35s, transform .35s var(--ip-spring);
}
[data-theme="dark"] .hp-step,
body.dark .hp-step {
  border-color: var(--ip-line-strong);
}
.hp-step__num {
  display: grid;
  place-items: center;
  width: 1.4rem;
  height: 1.4rem;
  border-radius: 50%;
  background: rgba(0, 0, 0, .06);
  font-size: .7rem;
  font-weight: 700;
  transition: background-color .35s;
}
[data-theme="dark"] .hp-step__num,
body.dark .hp-step__num {
  background: rgba(255, 255, 255, .08);
}
.hp-step.is-active {
  border-color: transparent;
  background: linear-gradient(135deg, #1f8a4c, #2eb872);
  color: #fff;
  box-shadow: 0 4px 12px rgba(46, 184, 114, .35);
  transform: translateY(-2px);
}
.hp-step.is-active .hp-step__num {
  background: rgba(255, 255, 255, .25);
}
.hp-salah__cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .65rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.hp-feature {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: .25rem;
  height: 100%;
  padding: .85rem .9rem;
  border: 1px solid var(--ip-line);
  border-radius: 14px;
  background: var(--pg-green);
  color: var(--ip-ink);
  text-decoration: none;
  overflow: hidden;
  isolation: isolate;
  transform: perspective(700px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateY(var(--lift, 0px));
  transition: transform .35s var(--ip-ease), box-shadow .35s var(--ip-ease);
}
.hp-feature--blue { background: var(--pg-blue); }
.hp-feature--purple { background: var(--pg-purple); }
.hp-feature--orange { background: var(--pg-orange); }
.hp-feature--red { background: var(--pg-red); }
.hp-feature:hover {
  --lift: -5px;
  box-shadow: 0 10px 22px rgba(0, 0, 0, .08);
  color: var(--ip-ink);
}
.hp-feature > i {
  font-size: 1.6rem;
  margin-bottom: .2rem;
}
.hp-feature__title {
  font-size: .9rem;
  font-weight: 700;
}
.hp-feature__text {
  font-size: .78rem;
  line-height: 1.4;
  color: var(--ip-ink-2);
}
.hp-feature__arrow {
  margin-top: auto;
  padding-top: .25rem;
  font-size: .8rem;
  color: var(--ip-primary);
  transition: transform .3s var(--ip-ease);
}
.hp-feature:hover .hp-feature__arrow {
  transform: translateX(5px);
}
[dir="rtl"] .hp-feature:hover .hp-feature__arrow {
  transform: translateX(-5px);
}

/* ---------- Revert guide ---------- */
.hp-revert {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1rem;
  align-items: center;
  overflow: hidden;
  background:
    url("../images/right-pattern.png") right top / 400px auto no-repeat,
    var(--ip-surface);
}
[dir="rtl"] .hp-revert {
  background-position: left top, 0 0;
}
[data-theme="dark"] .hp-revert,
body.dark .hp-revert {
  background-image: url("../images/right-pattern-dark.png");
}
.hp-revert__art {
  display: none;
  align-self: stretch;
  min-height: 150px;
  margin-block: -1rem -1.1rem; margin-inline: -1.1rem 0;
  margin-inline: -1.1rem 0;
  background: url("../images/left-revert.png") center / cover no-repeat;
}
[data-theme="dark"] .hp-revert__art,
body.dark .hp-revert__art {
  background-image: url("../images/left-revert-dark.png");
}
.hp-revert__badge {
  display: inline-block;
  margin-bottom: .2rem;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--pk-red);
}
.hp-revert__sub {
  margin: .3rem 0 .7rem;
  font-size: .86rem;
  color: var(--ip-ink-2);
}
.hp-revert__items {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.hp-revert__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .3rem;
  height: 100%;
  padding: .7rem .5rem;
  border-radius: 12px;
  color: var(--ip-ink);
  text-align: center;
  text-decoration: none;
  transition: background-color .25s, transform .3s var(--ip-ease);
}
.hp-revert__item:hover {
  background: var(--ip-surface-2);
  transform: translateY(-3px);
  color: var(--ip-ink);
}
.hp-revert__item > i {
  font-size: 2rem;
  transition: transform .35s var(--ip-spring);
}
.hp-revert__item:hover > i {
  transform: scale(1.12);
}
.hp-revert__item-title {
  font-size: .82rem;
  font-weight: 600;
  line-height: 1.3;
}
.hp-revert__item-text {
  font-size: .72rem;
  line-height: 1.35;
  color: var(--ip-muted);
}

/* ---------- Store (only while the store is on) ---------- */
.hp-store {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr));
  gap: .8rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.hp-product {
  display: block;
  height: 100%;
  border: 1px solid var(--ip-line);
  border-radius: 14px;
  background: var(--ip-surface);
  color: var(--ip-ink);
  text-decoration: none;
  overflow: hidden;
  transition: transform .3s var(--ip-ease), box-shadow .3s;
}
.hp-product:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, .1);
  color: var(--ip-ink);
}
.hp-product__media {
  display: grid;
  place-items: center;
  height: 110px;
  background: var(--pg-green);
  font-size: 2.6rem;
}
.hp-product__media--blue { background: var(--pg-blue); }
.hp-product__media--purple { background: var(--pg-purple); }
.hp-product__media--orange { background: var(--pg-orange); }
.hp-product__media--red { background: var(--pg-red); }
.hp-product__body {
  display: grid;
  gap: .15rem;
  padding: .7rem .85rem .85rem;
}
.hp-product__cat {
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--ip-muted);
}
.hp-product__title {
  font-size: .88rem;
  font-weight: 600;
}
.hp-product__price {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--ip-primary);
}

/* ---------- Scroll reveal: an enhancement only ----------
   Every section is fully visible by default: without the script, before it runs, in a full-page screenshot or in a
   print. The script marks a section .is-revealing only at the moment it scrolls into view, which plays a short rise;
   a section that never scrolls in simply stays as it is. */
.hp-block.is-revealing {
  animation: hp-reveal .7s var(--ip-ease) both;
}
@keyframes hp-reveal {
  from { opacity: .35; transform: translateY(18px); }
  to { opacity: 1; transform: none; }
}
.hp-block.is-revealing :is(.hp-courses, .hp-salah__cards, .hp-revert__items, .hp-tools) > li {
  animation: hp-rise .6s var(--ip-ease) both;
}
.hp-block.is-revealing :is(.hp-courses, .hp-salah__cards, .hp-revert__items, .hp-tools) > li:nth-child(2) { animation-delay: .06s; }
.hp-block.is-revealing :is(.hp-courses, .hp-salah__cards, .hp-revert__items, .hp-tools) > li:nth-child(3) { animation-delay: .12s; }
.hp-block.is-revealing :is(.hp-courses, .hp-salah__cards, .hp-revert__items, .hp-tools) > li:nth-child(4) { animation-delay: .18s; }
.hp-block.is-revealing :is(.hp-courses, .hp-salah__cards, .hp-revert__items, .hp-tools) > li:nth-child(5) { animation-delay: .24s; }
.hp-block.is-revealing :is(.hp-courses, .hp-salah__cards, .hp-revert__items, .hp-tools) > li:nth-child(6) { animation-delay: .3s; }
@media (prefers-reduced-motion: reduce), print {
  .hp-block.is-revealing,
  .hp-block.is-revealing :is(.hp-courses, .hp-salah__cards, .hp-revert__items, .hp-tools) > li {
    animation: none;
  }
}
/* A section the journey chooser has just brought forward glows for a moment. */
.hp-block.is-promoted > .container-xxl > .hp-card {
  animation: hp-promote 1.6s var(--ip-ease);
}
@keyframes hp-promote {
  0% { box-shadow: 0 0 0 0 rgba(46, 184, 114, .5), var(--ip-shadow-sm); }
  40% { box-shadow: 0 0 0 6px rgba(46, 184, 114, .18), var(--ip-shadow-md); }
  100% { box-shadow: 0 0 0 0 rgba(46, 184, 114, 0), var(--ip-shadow-sm); }
}

/* ---------- Breakpoints ---------- */
@media (min-width: 576px) {
  .hp-courses {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (min-width: 768px) {
  .hp-day {
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  }
  .hp-revert__items {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
@media (min-width: 992px) {
  .hp-courses {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .hp-finder {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  }
  .hp-salah {
    grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr);
    align-items: center;
  }
  .hp-revert {
    grid-template-columns: 220px minmax(0, .9fr) minmax(0, 1.4fr);
  }
  .hp-revert__art {
    display: block;
  }
}
@media (max-width: 991.98px) {
  .hp-slide {
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
  }
  .hp-scene {
    order: -1;
    min-height: 210px;
    -webkit-mask-image: linear-gradient(180deg, #000 70%, transparent 100%);
    mask-image: linear-gradient(180deg, #000 70%, transparent 100%);
  }
  .hp-slide__copy {
    padding: .25rem 1.1rem 1.25rem;
  }
  .hp-nextchip {
    top: 150px;
    bottom: auto;
  }
  .hp-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .hp-kpis--three {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media (max-width: 767.98px) {
  .hp-prayer__list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .hp-salah__cards {
    grid-template-columns: minmax(0, 1fr);
  }
  .hp-feature {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    column-gap: .75rem;
    align-items: center;
  }
  .hp-feature > i {
    grid-row: span 2;
    margin: 0;
  }
  .hp-feature__arrow {
    grid-column: 3;
    grid-row: 1 / span 2;
    padding: 0;
  }
  .hp-search__kbd {
    display: none;
  }
}
@media (max-width: 575.98px) {
  .hp-block {
    margin-top: .75rem;
  }
  .hp-card {
    padding: .85rem .85rem 1rem;
  }
  /* On phones the courses become a swipeable rail, so the page stays short. */
  .hp-courses {
    display: flex;
    gap: .7rem;
    margin-inline: -.85rem;
    padding: .25rem .85rem .6rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: .85rem;
    scrollbar-width: none;
  }
  .hp-courses::-webkit-scrollbar {
    display: none;
  }
  .hp-courses > li {
    flex: 0 0 82%;
    scroll-snap-align: start;
  }
  .hp-kpis--three {
    grid-template-columns: minmax(0, 1fr);
  }
  .hp-kpis--three .hp-kpi {
    padding-block: .4rem;
  }
  .hp-slide__title {
    font-size: 1.75rem;
  }
  .hp-slide__sub {
    font-size: .92rem;
  }
  .hp-slide__actions .ip-btn {
    flex: 1 1 auto;
  }
  .hp-search__button span {
    display: none;
  }
  .hp-search__button {
    min-width: 44px;
    padding-inline: .7rem;
  }
  .hp-tools {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }
  .hp-chooser__chips {
    flex-wrap: nowrap;
    margin-inline: -.85rem;
    padding-inline: .85rem;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .hp-chooser__chips::-webkit-scrollbar {
    display: none;
  }
  .hp-chip {
    flex-shrink: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hp-scene__img,
  .hp-scene__rays,
  .hp-scene__orb,
  .hp-scene__sheen,
  .hp-scene__stars {
    animation: none !important;
  }
  .hp-scene__sheen {
    display: none;
  }
}

/* ---------- Find your way: the six menus of the header, each with its front door and its most-used pages ----------
   One row of six on wide screens (in the menu's order, so the page and the header read the same), three by two on
   tablets, two by three on phones. Each tile: a numbered front door, then its pages as a short list. */
.hp-ways__all {
  gap: .4rem;
}
.hp-ways__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .6rem;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: way;
}
.hp-way {
  --way-bg: var(--pg-green);
  --way-ink: var(--pk-green);
  --way-line: var(--pl-green);
  --way-icon: var(--ip-icon-green);
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  /* Every tile is tinted from its own ink at the same strength, so all six read as equally important
     (pastel tokens made blue and purple look washed out next to the warm ones). */
  border: 1px solid color-mix(in srgb, var(--way-ink) 26%, var(--ip-surface));
  border-radius: 16px;
  background:
    radial-gradient(120% 80% at 100% 0%, color-mix(in srgb, var(--way-ink) 17%, transparent) 0%, transparent 60%),
    linear-gradient(180deg, color-mix(in srgb, var(--way-ink) 9%, var(--ip-surface)), var(--ip-surface) 150%);
  overflow: hidden;
  isolation: isolate;
  transform: perspective(800px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateY(var(--lift, 0px));
  transition: transform .35s var(--ip-ease), box-shadow .35s var(--ip-ease), opacity .3s var(--ip-ease), border-color .3s;
}
.hp-way::before {
  /* A thin band of the tile's colour along the top: the six read as one row, like the menu. */
  content: "";
  position: absolute;
  inset-block-start: 0;
  inset-inline: 0;
  block-size: 3px;
  background: var(--way-icon);
}
.hp-way--teal { --way-bg: #eafafd; --way-ink: #0e7490; --way-line: #c4eef6; --way-icon: linear-gradient(135deg, #06b6d4, #0e7490); }
.hp-way--blue { --way-bg: var(--pg-blue); --way-ink: var(--pk-blue); --way-line: var(--pl-blue); --way-icon: var(--ip-icon-blue); }
.hp-way--purple { --way-bg: var(--pg-purple); --way-ink: var(--pk-purple); --way-line: var(--pl-purple); --way-icon: var(--ip-icon-purple); }
.hp-way--orange { --way-bg: var(--pg-orange); --way-ink: var(--pk-orange); --way-line: var(--pl-orange); --way-icon: var(--ip-icon-orange); }
.hp-way--red { --way-bg: var(--pg-red); --way-ink: var(--pk-red); --way-line: var(--pl-red); --way-icon: var(--ip-icon-red); }
.hp-way:hover,
.hp-way:focus-within {
  --lift: -4px;
  box-shadow: 0 14px 28px -14px rgba(15, 40, 30, .32);
}
/* The journey chosen above rings its tiles. The others keep their full colour: a faded tile looks disabled, and every
   part of the site is equally open to everyone. */
.hp-way.is-match {
  border-color: var(--way-ink);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--way-ink) 30%, transparent), 0 14px 28px -16px rgba(15, 40, 30, .35);
}
.hp-way__main {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-areas: "icon title" "text text";
  align-items: center;
  gap: .35rem .6rem;
  padding: .8rem .8rem .45rem;
  color: var(--ip-ink);
  text-decoration: none;
}
.hp-way__main:hover,
.hp-way__main:focus-visible {
  color: var(--ip-ink);
}
.hp-way__main:focus-visible {
  outline: 2px solid var(--way-ink);
  outline-offset: -2px;
  border-radius: 14px;
}
.hp-way__icon {
  grid-area: icon;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: var(--way-icon);
  color: #fff;
  font-size: 1.05rem;
  box-shadow: 0 6px 14px -6px var(--way-ink);
  transition: transform .35s var(--ip-spring);
}
.hp-way:hover .hp-way__icon {
  transform: scale(1.08) rotate(-5deg);
}
.hp-way__num {
  position: absolute;
  inset-block-start: .65rem;
  inset-inline-end: .75rem;
  font-family: "Fraunces", Georgia, serif;
  font-size: .78rem;
  font-weight: 600;
  font-style: italic;
  letter-spacing: .02em;
  color: var(--way-ink);
  opacity: .55;
}
.hp-way__title {
  grid-area: title;
  font-size: 1rem;
  font-weight: 780;
  letter-spacing: -.01em;
  line-height: 1.2;
}
.hp-way__title::after {
  content: " \2192";
  display: inline-block;
  margin-inline-start: .15rem;
  color: var(--way-ink);
  opacity: 0;
  transform: translateX(-4px);
  transition: opacity .25s, transform .25s var(--ip-ease);
}
[dir="rtl"] .hp-way__title::after {
  content: " \2190";
  transform: translateX(4px);
}
.hp-way__main:hover .hp-way__title::after,
.hp-way__main:focus-visible .hp-way__title::after {
  opacity: 1;
  transform: none;
}
.hp-way__text {
  grid-area: text;
  font-size: .78rem;
  line-height: 1.42;
  color: var(--ip-ink-2);
}
.hp-way__mark {
  position: absolute;
  inset-block-end: -.6rem;
  inset-inline-end: -.5rem;
  z-index: -1;
  font-size: 4.6rem;
  color: var(--way-ink);
  opacity: .07;
  transform: rotate(-12deg);
}
/* The pages read as a short menu: one per line, each with its arrow at the end. */
.hp-way__links {
  display: flex;
  flex-direction: column;
  margin: auto 0 0;
  padding: .1rem .55rem .7rem;
  list-style: none;
}
.hp-way__links li + li {
  border-top: 1px dashed color-mix(in srgb, var(--way-line) 85%, transparent);
}
.hp-way__links a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .25rem;
  min-height: 36px;
  padding-block: .2rem;
  padding-inline: .4rem .25rem;
  border-radius: 9px;
  color: var(--way-ink);
  font-size: .8rem;
  font-weight: 650;
  line-height: 1.2;
  text-decoration: none;
  transition: background-color .2s, color .2s;
}
.hp-way__links a i {
  opacity: .6;
  transition: transform .2s var(--ip-ease), opacity .2s;
}
.hp-way__links a:hover,
.hp-way__links a:focus-visible {
  background: var(--way-ink);
  color: #fff;
}
.hp-way__links a:hover i,
.hp-way__links a:focus-visible i {
  opacity: 1;
  transform: translateX(3px);
}
[dir="rtl"] .hp-way__links a:hover i,
[dir="rtl"] .hp-way__links a:focus-visible i {
  transform: translateX(-3px);
}
.hp-way__links a:focus-visible {
  outline: 2px solid var(--way-ink);
  outline-offset: 1px;
}
[data-theme="dark"] .hp-way__links a:hover,
[data-theme="dark"] .hp-way__links a:focus-visible,
body.dark .hp-way__links a:hover,
body.dark .hp-way__links a:focus-visible {
  color: #0b1a14;
}
[data-theme="dark"] .hp-way,
body.dark .hp-way {
  border-color: color-mix(in srgb, var(--way-ink) 24%, transparent);
  background:
    radial-gradient(120% 80% at 100% 0%, color-mix(in srgb, var(--way-ink) 18%, transparent) 0%, transparent 60%),
    color-mix(in srgb, var(--way-ink) 9%, var(--ip-surface));
}
[data-theme="dark"] .hp-way--teal,
body.dark .hp-way--teal {
  --way-ink: #5fd4e8;
}
@media (min-width: 768px) {
  .hp-ways__grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .hp-way__main {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "icon" "title" "text";
    align-items: start;
    padding: .95rem .95rem .55rem;
  }
  .hp-way__icon {
    width: 42px;
    height: 42px;
    margin-bottom: .25rem;
  }
}
@media (min-width: 1200px) {
  .hp-ways__grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: .55rem;
  }
  .hp-way__text {
    min-height: 3.3em;
  }
}
@media (pointer: coarse) {
  .hp-way__links a {
    min-height: 44px;
  }
}
@media (max-width: 575.98px) {
  .hp-ways__grid {
    gap: .45rem;
  }
  .hp-way__main {
    padding: .7rem .65rem .35rem;
  }
  .hp-way__icon {
    width: 32px;
    height: 32px;
    border-radius: 9px;
    font-size: .9rem;
  }
  .hp-way__num {
    display: none;
  }
  .hp-way__title {
    font-size: .92rem;
  }
  .hp-way__text {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: .72rem;
  }
  .hp-way__links {
    padding: .1rem .4rem .5rem;
  }
  .hp-way__links a {
    font-size: .76rem;
  }
  .hp-ways__all {
    width: 100%;
    justify-content: center;
    order: 3;
  }
}
@media (prefers-reduced-motion: reduce) {
  .hp-way,
  .hp-way__icon,
  .hp-way__title::after,
  .hp-way__links a i {
    transition: none;
    transform: none;
  }
}
