/*
 * The reviews and screenshots pages.
 *
 * These two were written with inline styles and class names — .section-title, .section-sub —
 * that do not exist anywhere in this stylesheet, so they inherited nothing: no Manrope, no
 * heading scale, no spacing. That is why the boxes read as untyped. They use the site's own
 * classes now, and what is left here is only what is genuinely particular to these pages.
 *
 * THE CARD IS A QUOTATION, NOT A BOX. A testimonial is somebody's words, so the words get the
 * room: 16.5px at 1.62, one comfortable measure, with the stars and the person kept small and
 * out of the way beneath. The quote mark is set in the corner at low opacity — it reads as
 * paper rather than as a UI element, which is the difference between "a real shop said this"
 * and "here is a widget".
 */

/* ---- the reveal, staggered ------------------------------------------------------------
 * .reveal already exists site-wide and every card carrying it arrives at the same instant,
 * which looks mechanical. --d is set per card in the markup so they arrive in sequence, a
 * fifteenth of a second apart — enough to read as one motion rather than a flash.
 */
.rvw-grid .reveal { transition-delay: var(--d, 0s); }

/* ---- reviews -------------------------------------------------------------------------- */
/*
 * Four across, and each card only as tall as what is in it.
 *
 * align-items:start is the half that matters. Grid stretches every card in a row to the
 * height of the tallest by default, and the card then had to put its author block somewhere
 * — at the bottom, leaving a hole under a short review. Sized to their own content there is
 * no hole to place anything in.
 */
/*
 * FOUR COLUMNS THAT FLOW, not four cells that line up.
 *
 * Grid was the wrong tool here. Reviews are three lines long or twelve, and grid puts each
 * row's cards on one baseline — so a row is as tall as its longest card and the short ones
 * either stretch (a hole under the words) or sit with ragged space beneath them. Neither
 * looks like anything.
 *
 * CSS columns pour the cards down one column and on to the next, so each takes only the
 * height it needs and the wall packs tight. break-inside stops a card being split across a
 * column break, which is the one thing this layout gets wrong if you let it.
 *
 * Wider than the site's 1180 reading column on purpose: four cards in 1132px are 268px each
 * and a testimonial at that width wraps every four words. At 1400 they are 335px and read
 * like sentences.
 */
.rvw-grid {
  columns: 4;
  column-gap: 20px;
  max-width: 1400px;
  margin: 0 auto;
}
@media (max-width: 1420px) { .rvw-grid { columns: 3; } }
@media (max-width: 1040px) { .rvw-grid { columns: 2; } }
@media (max-width: 660px)  { .rvw-grid { columns: 1; } }

/*
 * The tricolour, in the paper rather than on it.
 *
 * Asked for on every card. It is a wash and not a flag: saffron bleeding in from the top
 * corner and green from the bottom, both at four percent, with the white of the card doing
 * the middle band. At that strength it colours the paper and leaves the words alone — a
 * testimonial has to stay easy to read, and anything strong enough to notice as a flag is
 * strong enough to fight the text.
 *
 * A stripe down the left edge carries the same three, at full strength but only three
 * pixels wide, so the card is recognisably Indian at a glance without the background
 * having to shout.
 */
.rvw {
  position: relative;
  /* block, not flex: a flex container is not reliably kept whole across a column break,
     and margin:0 0 20px is what was missing — a <figure> carries 40px of browser margin
     on each side by default, which was eating eighty pixels of every card's width */
  display: block;
  break-inside: avoid;
  -webkit-column-break-inside: avoid;
  page-break-inside: avoid;
  margin: 0 0 20px;
  padding: 24px 22px 20px 25px;
  background:
    radial-gradient(120% 90% at 100% 0%,   rgba(255,153,51,.10) 0%, rgba(255,153,51,0) 58%),
    radial-gradient(120% 90% at 0% 100%,   rgba(19,136,8,.09)   0%, rgba(19,136,8,0)   58%),
    var(--surface, #fff);
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
  transition: transform .22s cubic-bezier(.2,.7,.3,1), box-shadow .22s, border-color .22s;
}
.rvw::after {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: linear-gradient(#ff9933 0 33.33%, #ffffff 33.33% 66.66%, #138808 66.66% 100%);
}
.rvw:hover {
  transform: translateY(-3px);
  border-color: #c7d2fe;
  box-shadow: 0 14px 34px -18px rgba(23, 37, 84, .38);
}

/* the quotation mark, behind the words */
.rvw::before {
  content: "\201C";
  position: absolute;
  top: 2px;
  right: 16px;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 72px;
  line-height: 1;
  color: #172554;
  opacity: .07;
  pointer-events: none;
}

.rvw-stars {
  margin-bottom: 11px;
  font-size: 14px;
  letter-spacing: 2px;
  color: #d97706;
  line-height: 1;
}
.rvw-stars .off { color: #d8dee9; }

.rvw-body {
  margin: 0 0 12px;
  font-size: 16.5px;
  line-height: 1.62;
  color: var(--text);
  font-weight: 500;
  letter-spacing: -.1px;
}

/* No margin-top:auto. The person who said it belongs under what they said, not at the far
   end of a box sized by somebody else's longer review. */
.rvw-who {
  display: flex;
  align-items: center;
  gap: 11px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}
.rvw-who img,
.rvw-who .ini {
  width: 42px; height: 42px;
  border-radius: 50%;
  object-fit: cover;
  flex: 0 0 42px;
  border: 1px solid var(--border);
}
.rvw-who .ini {
  display: flex; align-items: center; justify-content: center;
  background: #eef2ff;
  color: #172554;
  font-weight: 800;
  font-size: 16px;
}
.rvw-name { display: block; font-size: 14.5px; font-weight: 700; color: var(--text); line-height: 1.3; }
.rvw-shop { display: block; font-size: 12.5px; color: var(--text-muted); line-height: 1.4; margin-top: 1px; }

/* ---- screenshots ---------------------------------------------------------------------- */
.shot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 24px;
}
.shot-grid .reveal { transition-delay: var(--d, 0s); }

.shot {
  margin: 0;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface, #fff);
  overflow: hidden;
  transition: transform .22s cubic-bezier(.2,.7,.3,1), box-shadow .22s, border-color .22s;
}
.shot:hover {
  transform: translateY(-3px);
  border-color: #c7d2fe;
  box-shadow: 0 16px 38px -20px rgba(23, 37, 84, .4);
}
.shot a { display: block; line-height: 0; background: #f1f5f9; }
.shot img {
  display: block; width: 100%; height: auto;
  border-bottom: 1px solid var(--border);
  transition: transform .5s cubic-bezier(.2,.7,.3,1);
}
.shot:hover img { transform: scale(1.02); }
.shot figcaption { padding: 16px 18px; }
.shot-title { display: block; font-size: 15px; font-weight: 700; color: var(--text); }
.shot-cap   { display: block; margin-top: 5px; font-size: 13.5px; line-height: 1.55; color: var(--text-muted); }

/* ---- the empty state, which is a real state here -------------------------------------- */
.rvw-none {
  max-width: 600px;
  margin: 0 auto;
  padding: 30px 28px;
  text-align: center;
  border: 1px dashed var(--border);
  border-radius: 6px;
  background: var(--surface, #fff);
}
.rvw-none p { margin: 0; color: var(--text); font-size: 15.5px; line-height: 1.6; }
.rvw-none p + p { margin-top: 12px; font-size: 13.5px; color: var(--text-muted); }

/* Four to a row makes each card about 270px, so the measure comes down with it. */
@media (min-width: 941px) { .rvw-body { font-size: 15.5px; line-height: 1.58; } }
@media (max-width: 560px) {
  .rvw { padding: 22px 20px 18px 23px; }
  .rvw-body { font-size: 15.5px; }
}

/* Somebody who has asked their machine to stop moving things gets no lift, no slide and no
   zoom — the cards simply are where they are. */
@media (prefers-reduced-motion: reduce) {
  .rvw, .shot, .shot img, .rvw-grid .reveal, .shot-grid .reveal { transition: none !important; }
  .rvw:hover, .shot:hover { transform: none; }
  .shot:hover img { transform: none; }
}
