/* =========================================================================
   FEATURES (the trio) and REVIEWS, as approved (F6Features / F7Reviews).
   The sky engine paints both bands (dusk, then Isha); nothing here sets a
   section background.
   ========================================================================= */

/* ---- FEATURES: three phones, each line on a cream sticker label ----
   Desktop: three columns on a 120px margin (320px columns, 120px gaps at
   1440, phones 300 wide), labels overlapping each phone's top edge.
   Up to 860px: one column, 220px phones on a phone. */
.trio {
  --tp-w: min(300px, 20.8vw);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  column-gap: clamp(24px, 8.33vw, 120px);
  align-items: end;
  max-width: 1440px;
  margin: 0 auto;
  padding: clamp(140px, 21.1svh, 190px) clamp(24px, 8.33vw, 120px) clamp(72px, 11svh, 104px);
}
.trio__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 0;
}
/* The heading is the label: it overlaps the phone's top edge by 1em and
   stays above it. Its box (and the sticker) sizes from this font-size. */
.trio__line {
  position: relative;
  z-index: 2;
  margin: 0 0 -1em;
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(20px, 2.36vw, 34px);
  line-height: 1.12;
  letter-spacing: 0;
  color: #4E2C16;
}
.trio__label {
  --tilt: -3deg;
  position: relative;
  display: inline-block;
  transform: rotate(var(--tilt));
}
.trio__item:nth-child(2) .trio__label { --tilt: 2deg; }
.trio__item:nth-child(3) .trio__label { --tilt: -2deg; }
.trio__text {
  display: block;
  padding: 0.53em 0.82em 0.59em 1.235em;
  border: 4px solid #3B2213;
  border-radius: 0.765em;
  background: #FFF9EF;
  box-shadow: 0 0 0 7px #FFFDF8, 0 24px 36px -16px rgba(30, 10, 4, 0.6);
  color: #4E2C16;
  text-align: left;
  white-space: nowrap;
}
.trio__sticker {
  position: absolute;
  left: -1.18em;
  top: -1.35em;
  width: 2.12em;
  height: 2.12em;
  max-width: none;
  object-fit: contain;
  transform: rotate(-8deg);
  pointer-events: none;
}
/* the lines break one way in three columns, another in one */
.trio__br-narrow { display: none; }
.trio__phone {
  position: relative;
  width: var(--tp-w);
  border: 7px solid #281D15;
  border-radius: calc(var(--tp-w) * 0.13);
  background: #281D15;
  overflow: hidden;
  box-shadow: 0 30px 60px -28px rgba(30, 10, 3, 0.6);
}
.trio__phone img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: calc(var(--tp-w) * 0.1);
}

@media (max-width: 860px) {
  .trio {
    --tp-w: 300px;
    grid-template-columns: minmax(0, 1fr);
    row-gap: 64px;
    padding: 124px 24px 104px;
  }
  .trio__line { font-size: 26px; margin-bottom: -0.91em; }
  .trio__item:nth-child(1) .trio__label,
  .trio__item:nth-child(3) .trio__label { --tilt: -2deg; }
  .trio__text {
    padding: 0.636em 0.909em 0.727em 1.364em;
    border-width: 3px;
    border-radius: 0.82em;
    box-shadow: 0 0 0 5px #FFFDF8, 0 24px 36px -16px rgba(30, 10, 4, 0.6);
  }
  .trio__sticker { left: -1.23em; top: -1.36em; width: 2.09em; height: 2.09em; }
  .trio__br-narrow { display: inline; }
  .trio__br-wide { display: none; }
  .trio__phone { border-width: 6px; }
}
@media (max-width: 700px) {
  .trio {
    --tp-w: clamp(200px, 56.4vw, 260px);
    row-gap: 56px;
    padding: 112px 24px 96px;
  }
  .trio__line { font-size: min(22px, 5.64vw); }
}

/* ---- REVIEWS: one big cream card at a time ----
   Desktop: the headline, then the card (760 wide) between two round
   buttons 48px off its edges. Up to 860px the buttons sit side by side
   under the card. reviews.js adds .rv--live; without it (no JS) every card
   stays reachable in a native swipe row. */
.rv {
  max-width: 1440px;
  margin: 0 auto;
  padding: clamp(112px, 16.7svh, 150px) 24px clamp(128px, 22svh, 190px);
  color: #FFF5E5;
}
.rv__title {
  margin: 0 0 56px;
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(36px, 4.17vw, 60px);
  line-height: 1.04;
  letter-spacing: 0;
  color: #FFF5E5;
  text-align: center;
}
.rv__line { display: block; }
.rv__line--accent { color: #F2BB67; }
.rv__br { display: none; }

.rv__deck {
  display: grid;
  grid-template-columns: 56px minmax(0, 760px) 56px;
  grid-template-areas: "prev stage next";
  column-gap: 48px;
  align-items: center;
  justify-content: center;
}
.rv__stage { grid-area: stage; position: relative; min-width: 0; }
.rv__btn--prev { grid-area: prev; }
.rv__btn--next { grid-area: next; }
.rv__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  padding: 0;
  border: 2px solid rgba(255, 245, 229, 0.34);
  border-radius: 50%;
  background: rgba(255, 245, 229, 0.06);
  color: #FFF5E5;
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}
.rv__btn[hidden] { display: none; }
.rv__btn svg { display: block; width: 24px; height: 24px; }
.rv__btn:hover { background: rgba(255, 245, 229, 0.14); border-color: rgba(255, 245, 229, 0.6); }
.rv__btn:focus-visible { outline: 3px solid #F2BB67; outline-offset: 3px; border-radius: 50%; }

/* two paler cards fanned behind the live one, a deck of notes */
.rv__ghost {
  display: none;
  position: absolute;
  inset: 0;
  border-radius: 32px;
  pointer-events: none;
}
.rv--live .rv__ghost { display: block; }
.rv__ghost--back { background: rgba(255, 249, 239, 0.1); transform: translateY(14px) rotate(-3deg); }
.rv__ghost--mid { background: rgba(255, 249, 239, 0.18); transform: translateY(8px) rotate(2.2deg); }

/* no JS: a native swipe row of every card */
.rv__track {
  position: relative;
  display: flex;
  gap: 24px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
}
.rv__track:focus-visible { outline: 3px solid #F2BB67; outline-offset: 6px; border-radius: 32px; }
.rv__slide { flex: 0 0 100%; display: flex; scroll-snap-align: center; }
/* live: every card in one cell, so the deck is as tall as the longest
   review and never jumps; only the active card shows. The cream surface is
   the track itself and never moves or fades: only the words change on it.
   The outgoing review is gone (0.2s) before the next one fades and slides
   in, so no frame shows two quotes at once or a see-through card. */
.rv--live .rv__track {
  display: grid;
  overflow: hidden;
  scroll-snap-type: none;
  border-radius: 32px;
  background: #FFF9EF;
  box-shadow: 0 40px 80px -40px rgba(0, 0, 0, 0.75);
}
.rv--live .rv__card { background: none; box-shadow: none; }
.rv--live .rv__slide {
  grid-area: 1 / 1;
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.3s ease-in, visibility 0s linear 0.3s;
}
.rv--live .rv__slide.is-active {
  z-index: 1;
  visibility: visible;
  opacity: 1;
  transition: opacity 0.3s ease 0.2s, transform 0.5s cubic-bezier(0.22, 0.61, 0.36, 1) 0.2s, visibility 0s linear 0s;
}

.rv__card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 28px;
  width: 100%;
  min-height: 300px;
  margin: 0;
  padding: 44px 64px;
  border-radius: 32px;
  background: #FFF9EF;
  box-shadow: 0 40px 80px -40px rgba(0, 0, 0, 0.75);
  color: #4E2C16;
  text-align: center;
}
.rv__card blockquote { margin: 0; }
.rv__quote {
  margin: 0;
  font-family: var(--display);
  font-weight: 400;
  font-size: 34px;
  line-height: 1.12;
  letter-spacing: 0;
  color: #4E2C16;
  text-wrap: balance;
}
.rv__quote::before { content: "\201C"; color: #AD5B0C; }
.rv__quote::after { content: "\201D"; color: #AD5B0C; }
.rv__by {
  display: flex;
  align-items: center;
  gap: 12px;
}
.rv__stars { display: flex; gap: 3px; color: #AD5B0C; }
.rv__stars svg { display: block; flex-shrink: 0; width: 20px; height: 20px; fill: currentColor; }
.rv__name {
  font-family: var(--display);
  font-weight: 400;
  font-size: 22px;
  line-height: 1.15;
  color: #4E2C16;
}

@media (max-width: 1100px) {
  .rv__deck { column-gap: 28px; }
  .rv__card { padding: 40px 48px; }
  .rv__quote { font-size: clamp(28px, 3.1vw, 34px); }
}
@media (max-width: 860px) {
  .rv__deck {
    grid-template-columns: 1fr 1fr;
    grid-template-areas: "stage stage" "prev next";
    column-gap: 16px;
    row-gap: 32px;
    max-width: 600px;
    margin: 0 auto;
  }
  .rv__btn--prev { justify-self: end; }
  .rv__btn--next { justify-self: start; }
  .rv__btn { width: 48px; height: 48px; }
  .rv__btn svg { width: 20px; height: 20px; }
  .rv__title { margin-bottom: 40px; }
  .rv__ghost { border-radius: 24px; }
  .rv__ghost--back { transform: translateY(12px) rotate(-2.6deg); }
  .rv__ghost--mid { transform: translateY(7px) rotate(2deg); }
  .rv__card {
    gap: 16px;
    min-height: 228px;
    padding: 24px 22px;
    border-radius: 24px;
    box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.75);
  }
  .rv__quote { font-size: clamp(22px, 3.6vw, 28px); }
  .rv__by { gap: 10px; }
  .rv__stars svg { width: 16px; height: 16px; }
  .rv__name { font-size: 17px; }
  .rv__track:focus-visible { border-radius: 24px; }
  .rv--live .rv__track { border-radius: 24px; box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.75); }
}
@media (max-width: 700px) {
  .rv { padding: 96px 24px 120px; }
  .rv__title { margin-bottom: 32px; font-size: min(36px, 9.2vw); letter-spacing: -0.02em; }
  .rv__br { display: inline; }
}
@media (prefers-reduced-motion: reduce) {
  .rv--live .rv__slide,
  .rv--live .rv__slide.is-active { transition: none; }
}

/* Reduced motion paints each band flat (refresh.css), so Sabr's sand would
   meet this band's rust in a hard line. A short fade from the sand takes
   its place. */
html.reduced .band--maghrib {
  background-image: linear-gradient(to bottom, #E5CAA7, rgba(103, 59, 39, 0) 180px);
}
