/* Page styles: index */

.qhd-section {
  padding:2.5rem 0;
}
.qhd-tight {
  padding:2.25rem 0;
}
.qhd-mono {
  font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;
}
.qhd-head {
  text-align:center;
  margin-bottom:2.25rem;
}
.qhd-title {
  font-family:var(--font-display);
  font-size:clamp(2.4rem,4.6vw,3.1rem);
  font-weight:700;
  line-height:1.3;
  margin:0 0 .4rem;
  color:var(--slate-900);
}
.qhd-sub {
  margin:0 auto;
  max-width:36rem;
  color:var(--muted);
  font-size:1.02rem;
}
.qhd-cats {
  display:flex;
  flex-wrap:wrap;
  justify-content:center;
  gap:.75rem;
}
.qhd-cat {
  display:inline-flex;
  align-items:center;
  gap:.6rem;
  padding:.75rem 1.25rem;
  background:var(--card);
  border:1px solid var(--line);
  border-radius:.5rem;
  box-shadow:var(--shadow-sm);
  font-weight:500;
  font-size:.95rem;
  transition:background-color .2s,border-color .2s,color .2s;
}
.qhd-cat svg {
  width:1.3rem;
  height:1.3rem;
  color:var(--amber-700);
  transition:color .2s;
}
.qhd-cat:hover {
  background:var(--slate-800);
  border-color:var(--slate-800);
  color:#fff;
}
.qhd-cat:hover svg {
  color:var(--amber-400);
}
.qhd-slider {
  position:relative;
  max-width:66rem;
  margin-inline:auto;
  overflow:hidden;
  padding:1.2rem 0 1.6rem;
}
.qhd-slider-stage {
  position:relative;
  height:min(28rem,76vw);
  touch-action:pan-y;
  user-select:none;
}
.qhd-slide {
  position:absolute;
  top:0;
  left:50%;
  height:100%;
  aspect-ratio:1/1;
  border-radius:1rem;
  overflow:hidden;
  background:var(--slate-800);
  box-shadow:0 30px 50px -24px rgba(0,0,0,.85);
  opacity:0;
  pointer-events:none;
  transform:translateX(-50%) scale(.6);
  transition:transform .75s cubic-bezier(.22,.8,.3,1),opacity .75s,filter .75s;
}
.qhd-slide img {
  display:block;
  width:100%;
  height:100%;
  object-fit:cover;
  -webkit-user-drag:none;
}
.qhd-slide[data-pos="0"] {
  opacity:1;
  z-index:3;
  pointer-events:auto;
  transform:translateX(-50%);
  outline:2px solid rgba(251,191,36,.6);
  outline-offset:4px;
}
.qhd-slide[data-pos="1"] {
  opacity:.5;
  z-index:2;
  pointer-events:auto;
  transform:translateX(calc(-50% - 72%)) scale(.78);
  filter:saturate(.75);
}
.qhd-slide[data-pos="-1"] {
  opacity:.5;
  z-index:2;
  pointer-events:auto;
  transform:translateX(calc(-50% + 72%)) scale(.78);
  filter:saturate(.75);
}
.qhd-slider-btn {
  position:absolute;
  top:50%;
  translate:0 -50%;
  z-index:5;
  width:3rem;
  height:3rem;
  display:grid;
  place-items:center;
  padding:0;
  border-radius:50%;
  border:1px solid rgba(251,191,36,.55);
  background:rgba(15,23,42,.72);
  color:#fff;
  cursor:pointer;
  backdrop-filter:blur(6px);
  transition:background-color .2s,color .2s;
}
.qhd-slider-btn:hover {
  background:var(--amber-500);
  border-color:var(--amber-500);
  color:var(--slate-900);
}
.qhd-slider-btn svg {
  width:1.3rem;
  height:1.3rem;
}
.qhd-slider-prev {
  right:.5rem;
}
.qhd-slider-next {
  left:.5rem;
}
.qhd-slider-foot {
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:.7rem;
}
.qhd-slider-dots {
  display:flex;
  gap:.5rem;
}
/* The dot is 10px of paint inside a 44px target: the hit area is the padding, the dot is the ::before. */
.qhd-slider-dots button {
  position:relative;
  display:grid;
  place-items:center;
  min-width:1.4rem;
  height:2.75rem;
  padding:0 .3rem;
  border:0;
  background:none;
  cursor:pointer;
}
.qhd-slider-dots button::before {
  content:"";
  display:block;
  width:.6rem;
  height:.6rem;
  border-radius:999px;
  background:rgba(255,255,255,.35);
  transition:width .3s,background-color .3s;
}
.qhd-slider-dots button[aria-current="true"]::before {
  width:1.8rem;
  background:var(--amber-400);
}
.qhd-slider-dots button:focus-visible {
  outline:2px solid var(--amber-400);
  outline-offset:-6px;
  border-radius:.4rem;
}
.qhd-slider-foot .qhd-mono {
  direction:ltr;
  unicode-bidi:isolate;
  font-size:.75rem;
  color:rgba(255,255,255,.55);
}
.qhd-line-head {
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:1rem;
  flex-wrap:wrap;
  margin-bottom:1.5rem;
}
.qhd-line-head .qhd-title {
  margin:0;
}
.qhd-line-head .qhd-sub {
  margin:.25rem 0 0;
  max-width:none;
}
.qhd-line-ctrl {
  display:flex;
  align-items:center;
  gap:.6rem;
}
.qhd-line-all {
  display:inline-flex;
  align-items:center;
  min-height:2.6rem;
  margin-inline-end:.4rem;
  font-weight:700;
  font-size:.9rem;
  color:var(--primary-dark);
  border-bottom:2px solid var(--amber-500);
}
.qhd-line-all:hover {
  color:var(--primary);
}
.qhd-arrow {
  width:2.9rem;
  height:2.9rem;
  display:grid;
  place-items:center;
  padding:0;
  border-radius:50%;
  border:1px solid var(--line-2);
  background:var(--card);
  color:var(--slate-800);
  cursor:pointer;
  transition:background-color .2s,color .2s,border-color .2s,opacity .2s;
}
.qhd-arrow:hover:not(:disabled) {
  background:var(--slate-800);
  border-color:var(--slate-800);
  color:var(--amber-400);
}
.qhd-arrow:disabled {
  opacity:.35;
  cursor:default;
}
.qhd-arrow svg {
  width:1.2rem;
  height:1.2rem;
}
.qhd-line {
  display:flex;
  gap:1rem;
  overflow-x:auto;
  scroll-snap-type:x mandatory;
  scrollbar-width:none;
  scroll-behavior:smooth;
}
.qhd-line::-webkit-scrollbar {
  display:none;
}
.qhd-line-item {
  flex:0 0 clamp(11rem,22vw,15.5rem);
  aspect-ratio:1/1;
  scroll-snap-align:start;
  border-radius:.75rem;
  overflow:hidden;
  background:var(--slate-800);
  box-shadow:var(--shadow-md);
  transition:box-shadow .25s;
}
.qhd-line-item img {
  display:block;
  width:100%;
  height:100%;
  object-fit:cover;
  transition:transform .5s;
}
.qhd-line-item:hover {
  box-shadow:var(--shadow-lg);
}
.qhd-line-item:hover img {
  transform:scale(1.06);
}

@media(max-width:620px) {
  .qhd-slider-btn {
    width:2.5rem;
    height:2.5rem;
  }
  .qhd-line-item {
    flex-basis:62vw;
  }
}

.qhd-readhead {
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:1rem;
  flex-wrap:wrap;
  margin-bottom:1.5rem;
}
.qhd-readhead .qhd-title {
  margin:0;
}
.qhd-readhead .qhd-sub {
  margin:.25rem 0 0;
  max-width:none;
}
.qhd-readframe {
  --rf-h:clamp(17rem,32vw,27rem);
  position:relative;
  overflow:hidden;
  height:var(--rf-h);
  border-radius:.5rem;
  border:1px solid var(--line);
  background:#e9e1cf;
  box-shadow:var(--shadow-lg);
}
.qhd-readframe img {
  display:block;
  width:100%;
  height:auto;
  will-change:transform;
  animation:qhd-readbox-scroll 50s ease-in-out infinite alternate;
}
/* The page scroll only runs once the frame is on screen, so the visitor sees it from the top
   instead of arriving mid-way (modules/scroll-preview.js adds .qhd-wait immediately and
   removes it when the frame comes into view). */
.qhd-readframe.qhd-wait img {
  animation-play-state:paused;
}
@keyframes qhd-readbox-scroll {
  0%,6% { transform:translateY(0) }
  94%,100% { transform:translateY(calc(var(--rf-h) - 100%)) }
}
.qhd-readframe:hover img {
  animation-play-state:paused;
}

@media(max-width:700px) {
  .qhd-readframe img {
    animation-duration:26s;
  }
}

@media(prefers-reduced-motion:reduce) {
  .qhd-readframe img {
    animation:none!important;
  }
}

.qhd-line-block+.qhd-line-block {
  margin-top:2.75rem;
}
.qhd-line-head .qhd-title {
  font-size:clamp(2rem,3.4vw,2.6rem);
}
.qhd-line-item {
  position:relative;
}
.qhd-line-cap {
  position:absolute;
  inset:auto 0 0 0;
  display:flex;
  align-items:center;
  gap:.35rem;
  padding:1.6rem .85rem .6rem;
  background:linear-gradient(to top,rgba(15,23,42,.88),transparent);
  color:#fff;
  font-size:.75rem;
}
.qhd-line-cap svg {
  width:.85rem;
  height:.85rem;
  color:var(--amber-400);
}
.qhd-herol {
  position:relative;
  overflow:hidden;
  color:#fff;
  text-align:center;
  padding:5rem 0 4.5rem;
  background:radial-gradient(34rem 20rem at 50% 0%,rgba(4,120,87,.42),transparent 65%),radial-gradient(30rem 16rem at 50% 100%,rgba(245,158,11,.18),transparent 65%),var(--slate-900);
  border-bottom:1px solid rgba(251,191,36,.35);
}
.qhd-orn {
  position:absolute;
  top:50%;
  height:min(34rem,94%);
  width:auto;
  opacity:.5;
  pointer-events:none;
  translate:0 -50%;
}
.qhd-orn-l {
  left:0;
}
.qhd-orn-r {
  right:0;
  transform:scaleX(-1);
}
.qhd-herol-inner {
  position:relative;
  z-index:1;
  max-width:42rem;
  margin-inline:auto;
}
.qhd-herol-lead {
  color:rgba(255,255,255,.78);
  font-size:1.1rem;
  line-height:1.9;
  margin:.9rem auto 1.8rem;
  max-width:30rem;
}

@media(max-width:700px) {
  .qhd-orn {
    opacity:.22;
    height:62%;
  }
  .qhd-herol {
    padding:3.5rem 0 3.25rem;
  }
}

.qhd-tight {
  padding:3.25rem 0;
}
.qhd-logo-mark {
  margin:0 auto;
  width:min(31rem,78vw);
}
.qhd-logo-mark img {
  display:block;
  width:100%;
  height:auto;
  filter:invert(1) sepia(.32) brightness(1.04);
}
.qhd-mushaf-card {
  position:relative;
  overflow:hidden;
  display:flex;
  align-items:center;
  min-height:26rem;
  border-radius:1rem;
  color:#fff;
  background:var(--slate-900) url('../../img/hero-mushaf.jpg') left center/cover no-repeat;
  box-shadow:var(--shadow-lg);
}
.qhd-mushaf-card::before {
  content:'';
  position:absolute;
  inset:0;
  background:linear-gradient(to left,var(--slate-900) 0%,rgba(15,23,42,.94) 38%,rgba(15,23,42,.5) 66%,rgba(15,23,42,.05) 100%);
}
.qhd-mushaf-card::after {
  content:'';
  position:absolute;
  inset-inline:0;
  top:0;
  height:3px;
  background:linear-gradient(to left,var(--amber-600),var(--amber-400),var(--amber-600));
}
.qhd-mushaf-body {
  position:relative;
  z-index:1;
  max-width:34rem;
  padding:3rem 1.75rem;
}

@media(min-width:900px) {
  .qhd-mushaf-body {
    padding:3.25rem 3.5rem;
  }
}

.qhd-mushaf-body img {
  height:5.5rem;
  width:auto;
  margin-bottom:1rem;
  filter:invert(100%) brightness(1.1);
}
.qhd-mushaf-body p {
  color:rgba(255,255,255,.82);
  line-height:1.95;
  margin:0 0 1.75rem;
  font-size:1.05rem;
}

@media(max-width:700px) {
  .qhd-mushaf-card::before {
    background:rgba(15,23,42,.88);
  }
}

.qhd-order {
  display:inline-flex;
  flex-wrap:wrap;
  gap:.25rem;
  padding:.3rem;
  border-radius:999px;
  background:var(--band);
  border:1px solid var(--line);
}
.qhd-order button {
  padding:.5rem 1.2rem;
  border:0;
  border-radius:999px;
  background:transparent;
  font:inherit;
  font-size:.92rem;
  font-weight:500;
  color:var(--slate-700);
  cursor:pointer;
  transition:background-color .2s,color .2s;
}
.qhd-order button:hover:not([aria-selected="true"]) {
  background:rgba(255,255,255,.75);
}
.qhd-order button[aria-selected="true"] {
  background:var(--slate-900);
  color:#fff;
  font-weight:700;
}
.qhd-line {
  transition:opacity .18s;
}
.qhd-line.is-swapping {
  opacity:0;
}
.qhd-qcard {
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:.8rem;
  aspect-ratio:1/1;
  padding:1rem;
  text-align:center;
  background:var(--card);
  border:1px solid var(--line);
  border-radius:1.1rem;
  box-shadow:var(--shadow-sm);
  transition:border-color .2s,box-shadow .2s,transform .2s;
}
.qhd-qcard:hover {
  border-color:var(--amber-500);
  box-shadow:var(--shadow-md);
  transform:translateY(-3px);
}
.qhd-qicon {
  display:grid;
  place-items:center;
  width:clamp(2.9rem,7vw,3.8rem);
  height:clamp(2.9rem,7vw,3.8rem);
  border-radius:1rem;
  background:rgba(251,191,36,.2);
  color:var(--amber-700);
}
.qhd-qicon svg {
  width:55%;
  height:55%;
}
.qhd-qcard strong {
  display:block;
  font-size:clamp(1rem,2vw,1.2rem);
  font-weight:700;
  line-height:1.3;
  color:var(--slate-900);
}
.qhd-qcard span.t {
  overflow-wrap:anywhere;
  display:block;
  margin-top:.2rem;
  font-size:clamp(.76rem,1.4vw,.88rem);
  line-height:1.55;
  color:var(--slate-600);
}

@media(max-width:420px) {
  .qhd-qcard {
    gap:.5rem;
    padding:.7rem;
  }
  .qhd-qicon {
    width:2.7rem;
    height:2.7rem;
  }
}

.qhd-sbtn {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:.5rem;
  min-height:2.9rem;
  padding:0 1.3rem;
  border-radius:999px;
  border:0;
  color:#fff;
  font:inherit;
  font-weight:700;
  font-size:.92rem;
  cursor:pointer;
  transition:transform .2s,filter .2s,background-color .2s;
}
.qhd-sbtn:hover {
  transform:translateY(-2px);
  filter:brightness(1.08);
}
.qhd-sbtn svg {
  width:1.15rem;
  height:1.15rem;
}
.qhd-sbtn-main {
  background:var(--slate-900);
}
.qhd-sbtn-icon {
  width:2.9rem;
  padding:0;
}
.qhd-sbtn-icon svg {
  width:1.3rem;
  height:1.3rem;
}
.qhd-sbtn-icon[href*="wa.me"] {
  background:#25d366;
}
.qhd-sbtn-icon[href*="t.me"] {
  background:#229ed9;
}
.qhd-sbtn-icon[href*="facebook"] {
  background:#1877f2;
}
#qInsta {
  background:linear-gradient(45deg,#f09433 0%,#dc2743 50%,#bc1888 100%);
}
#qCopy {
  background:var(--slate-700);
}
.qhd-slides {
  position:relative;
  overflow:hidden;
}
.qhd-slides-card {
  position:relative;
  overflow:hidden;
  padding:2.5rem 1.25rem 1.75rem;
  border-radius:1rem;
  color:#fff;
  background:radial-gradient(40rem 22rem at 50% 0%,rgba(4,120,87,.38),transparent 65%),radial-gradient(30rem 18rem at 100% 100%,rgba(245,158,11,.16),transparent 65%),var(--slate-900);
  box-shadow:var(--shadow-lg);
}
.qhd-slides-card::after {
  content:'';
  position:absolute;
  inset-inline:0;
  top:0;
  height:3px;
  background:linear-gradient(to left,var(--amber-600),var(--amber-400),var(--amber-600));
}
.qhd-slides-card .qhd-title {
  color:#fff;
}
.qhd-slides-card .qhd-sub {
  color:rgba(255,255,255,.72);
}
.qhd-slides-card .qhd-head {
  margin-bottom:1.25rem;
}

@media(min-width:900px) {
  .qhd-slides-card {
    padding:3rem 2rem 2rem;
  }
}

.qhd-line {
  scroll-snap-type:none;
  padding:.4rem 0 1.2rem;
  -webkit-mask-image:linear-gradient(to right,transparent 0,rgba(0,0,0,.1) .35rem,rgba(0,0,0,.3) .8rem,rgba(0,0,0,.6) 1.4rem,rgba(0,0,0,.88) 2rem,#000 2.6rem,#000 calc(100% - 2.6rem),rgba(0,0,0,.88) calc(100% - 2rem),rgba(0,0,0,.6) calc(100% - 1.4rem),rgba(0,0,0,.3) calc(100% - .8rem),rgba(0,0,0,.1) calc(100% - .35rem),transparent 100%);
  mask-image:linear-gradient(to right,transparent 0,rgba(0,0,0,.1) .35rem,rgba(0,0,0,.3) .8rem,rgba(0,0,0,.6) 1.4rem,rgba(0,0,0,.88) 2rem,#000 2.6rem,#000 calc(100% - 2.6rem),rgba(0,0,0,.88) calc(100% - 2rem),rgba(0,0,0,.6) calc(100% - 1.4rem),rgba(0,0,0,.3) calc(100% - .8rem),rgba(0,0,0,.1) calc(100% - .35rem),transparent 100%);
}
.qhd-line-item {
  scroll-snap-align:none;
}
.qhd-share {
  padding:2rem 0 2.25rem;
  background:#ddd5c3;
  border-top:1px solid rgba(30,41,59,.14);
}
.qhd-share-inner {
  position:relative;
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:1rem;
  text-align:center;
}
.qhd-share h2 {
  font-family:var(--font-display);
  font-size:clamp(1.8rem,3vw,2.2rem);
  font-weight:700;
  line-height:1.2;
  margin:0;
  color:var(--slate-900);
}
.qhd-share p {
  margin:.25rem auto 0;
  color:var(--slate-700);
  font-size:.95rem;
  line-height:1.7;
}
.qhd-share-btns {
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  justify-content:center;
  gap:.6rem;
}
.qhd-share-note {
  position:absolute;
  inset-inline:0;
  top:calc(100% + .3rem);
  margin:0;
  font-size:.82rem;
  line-height:1.4;
  color:var(--primary-dark);
}
.qhd-quick {
  display:grid;
  gap:1rem;
  grid-template-columns:repeat(2,minmax(0,1fr));
}
.qhd-quick>* {
  min-width:0;
}

@media(min-width:1000px) {
  .qhd-quick {
    grid-template-columns:repeat(4,minmax(0,1fr));
    gap:1.25rem;
  }
  .qhd-qcard {
    aspect-ratio:1/.82;
  }
}

@media(max-width:700px) {
  .qhd-section {
    padding:2rem 0;
  }
  #poster-line .qhd-line-head {
    padding-inline:1rem;
    gap:.75rem;
  }
  #poster-line .qhd-order {
    display:flex;
    width:100%;
  }
  #poster-line .qhd-order button {
    flex:1;
    padding:.55rem .4rem;
    font-size:.85rem;
    white-space:nowrap;
  }
  #poster-line .qhd-line-ctrl {
    width:100%;
    justify-content:space-between;
  }
  #poster-line .qhd-line-ctrl .qhd-line-all {
    margin-inline-end:auto;
  }
  #poster-line .qhd-line {
    padding-inline:1rem;
  }
  .qhd-mushaf-card {
    border-radius:0;
    box-shadow:none;
  }
  .quran-hd-sandbox-wrapper .nav-btn {
    width:2.75rem;
    height:2.75rem;
  }
}

/* Phones.
   The tab row scrolls rather than clipping its last tab, and the strip's arrow buttons go away: a touch screen
   swipes the strip, so the arrows are two more things in the way of the posters. */
@media (max-width:45rem) {
  .qhd-order {
    max-width:100%;
    overflow-x:auto;
    scrollbar-width:none;
    -webkit-overflow-scrolling:touch;
  }
  .qhd-order::-webkit-scrollbar {
    display:none;
  }
  .qhd-order button {
    white-space:nowrap;
  }
  .qhd-arrow {
    display:none;
  }
  .qhd-line-head {
    gap:.5rem;
  }
  .qhd-herol-lead {
    text-wrap:balance;
  }
  .qhd-actions .qhd-btn {
    flex:1 1 9rem;
    justify-content:center;
  }
}
