/* Styles for home/reviews (app/sections/).
   Every rule is scoped to #section-reviews, so none of it reaches other
   parts of the page.

   The heading row as in the other sections, with the average rating and
   the link to every review on the right. The reviews are cards in
   columns, each as tall as its words, so the block reads like a wall of
   notes rather than a grid of equal boxes. The first card is gold. */

#section-reviews {
  --rv-navy: #001e53;
  --rv-ink: #060c22;
  --rv-gold: #f1ae22;
  --rv-gold-hi: #ffc94d;
  --rv-cream: #f3eee2;
  --rv-sans: 'Work Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --rv-ease: cubic-bezier(0.16, 1, 0.3, 1);

  position: relative;
  padding: clamp(56px, 8vw, 112px) clamp(20px, 6vw, 96px);
  /* from the navy the gallery ends on */
  background: linear-gradient(180deg, #001440 0%, var(--rv-navy) 100%);
  color: #fff;
  overflow: hidden;
}

#section-reviews *,
#section-reviews *::before,
#section-reviews *::after {
  box-sizing: border-box;
}

#section-reviews ::selection {
  background: var(--rv-gold);
  color: var(--rv-navy);
}

#section-reviews .reviews-wrapper {
  max-width: 1320px;
  margin: 0 auto;
}

/* ---------- Heading row ---------- */
#section-reviews .reviews-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px 48px;
  flex-wrap: wrap;
  margin-bottom: clamp(28px, 4vw, 48px);
}

#section-reviews .reviews-title {
  margin: 0;
  font-size: clamp(2.25rem, 5vw, 4.25rem);
  font-weight: 400;
  line-height: 1.05;
  color: #fff;
  text-wrap: balance;
}

#section-reviews .reviews-title span {
  color: #feca16;
}

#section-reviews .reviews-summary {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px 28px;
}

#section-reviews .reviews-average {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 10px;
  margin: 0;
  font-family: var(--rv-sans);
  font-size: 1rem;
  color: rgba(243, 238, 226, 0.85);
}

#section-reviews .reviews-average strong {
  font-family: 'Fugaz One', Arial, sans-serif;
  font-size: 1.5rem;
  font-weight: 400;
  line-height: 1;
  color: #fff;
  font-variant-numeric: tabular-nums;
}

#section-reviews .reviews-stars {
  display: inline-flex;
  gap: 2px;
}

#section-reviews .view-all-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
  font-family: var(--rv-sans);
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
  text-decoration: underline;
  text-decoration-color: var(--rv-gold);
  text-decoration-thickness: 2px;
  text-underline-offset: 6px;
  transition: color 0.2s ease, text-underline-offset 0.2s ease;
}

#section-reviews .view-all-btn svg {
  transition: transform 0.35s var(--rv-ease);
}

#section-reviews .view-all-btn:hover {
  color: var(--rv-gold-hi);
  text-underline-offset: 8px;
}

#section-reviews .view-all-btn:hover svg {
  transform: translateX(4px);
}

#section-reviews a:focus-visible {
  outline: 2px solid var(--rv-gold-hi);
  outline-offset: 4px;
}

/* ---------- Stars ---------- */
#section-reviews .star {
  display: block;
  fill: rgba(243, 238, 226, 0.22);
}

#section-reviews .star.filled {
  fill: var(--rv-gold);
}

/* ---------- The wall of reviews ---------- */
#section-reviews .reviews-grid {
  columns: 3 300px;
  column-gap: clamp(14px, 1.6vw, 22px);
}

#section-reviews .review-card {
  break-inside: avoid;
  margin: 0 0 clamp(14px, 1.6vw, 22px);
  padding: clamp(22px, 2.4vw, 30px);
  border: 1px solid rgba(243, 238, 226, 0.12);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.045);
}

#section-reviews .review-rating {
  display: flex;
  gap: 3px;
  margin: 0 0 16px;
}

#section-reviews .review-text {
  margin: 0;
}

#section-reviews .review-text p {
  margin: 0;
  font-family: var(--rv-sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: rgba(243, 238, 226, 0.92);
  text-wrap: pretty;
}

#section-reviews .review-text p::before {
  content: '\201C';
}

#section-reviews .review-text p::after {
  content: '\201D';
}

#section-reviews .review-author {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 22px;
}

#section-reviews .author-avatar {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--rv-gold);
  color: var(--rv-navy);
  font-size: 1.125rem;
  line-height: 1;
}

#section-reviews .author-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

#section-reviews .author-info {
  display: grid;
  min-width: 0;
  font-family: var(--rv-sans);
}

#section-reviews .author-name {
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
}

#section-reviews .author-title {
  font-size: 0.875rem;
  color: rgba(243, 238, 226, 0.7);
}

/* The first review, in gold: larger words, navy on gold */
#section-reviews .review-card:first-child {
  border-color: transparent;
  background: var(--rv-gold);
}

#section-reviews .review-card:first-child .review-text p {
  font-size: clamp(1.1875rem, 1.6vw, 1.375rem);
  line-height: 1.5;
  font-weight: 500;
  color: var(--rv-navy);
}

#section-reviews .review-card:first-child .star.filled {
  fill: var(--rv-navy);
}

#section-reviews .review-card:first-child .star {
  fill: rgba(0, 30, 83, 0.25);
}

#section-reviews .review-card:first-child .author-avatar {
  background: var(--rv-navy);
  color: var(--rv-gold);
}

#section-reviews .review-card:first-child .author-name {
  color: var(--rv-navy);
}

#section-reviews .review-card:first-child .author-title {
  color: rgba(0, 30, 83, 0.75);
}

/* ---------- Coming into view: each card as it scrolls in, where the
   browser can tie an animation to scrolling; elsewhere they simply show ---------- */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    #section-reviews .review-card {
      animation: rv-rise linear both;
      animation-timeline: view();
      animation-range: entry 0% entry 55%;
    }
  }
}

@keyframes rv-rise {
  from {
    opacity: 0;
    transform: translateY(28px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* ---------- Phones: one column; the home page keeps it to three ---------- */
@media (max-width: 680px) {
  #section-reviews .reviews-grid {
    columns: 1;
  }

  #section-reviews:not(.reviews-page) .review-card:nth-child(n + 4) {
    display: none;
  }
}

/* ---------- On its own page (/reviews) the section starts below the fixed header ---------- */
#section-reviews.reviews-page {
  padding-top: 200px;
}

@media (max-width: 1023px) {
  #section-reviews.reviews-page {
    padding-top: 220px;
  }
}

@media (max-width: 480px) {
  #section-reviews.reviews-page {
    padding-top: 160px;
  }
}

#section-reviews .reviews-none {
  margin: 0;
  font-family: var(--rv-sans);
  color: rgba(243, 238, 226, 0.8);
}
