/* Etusivun referenssi: Santa Claus Reindeer. Kuva on linkki tarinaan. */
.rh-ref {
  background: var(--color-neutral-100);
  border-radius: var(--radius-xl);
  padding: clamp(24px, 4vw, 48px);
  min-width: 0;
}

.rh-ref__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: 0.975rem;
  font-weight: 700;
  line-height: 1.4;
  text-transform: uppercase;
  letter-spacing: var(--letter-wide);
  color: var(--color-primary);
}

.rh-ref__eyebrow::before {
  content: "";
  width: 24px;
  height: 2px;
  background: currentColor;
}

.rh-ref__title {
  margin: 10px 0 0;
  max-width: 960px;
  font: var(--text-h2);
  letter-spacing: var(--letter-tight);
  color: var(--color-terva);
}

.rh-ref__lead {
  margin: 10px 0 0;
  max-width: none;
  font: var(--text-body);
  color: var(--color-neutral-700);
}

.rh-ref__card {
  display: grid;
  grid-template-columns: minmax(0, 40%) minmax(0, 1fr);
  overflow: hidden;
  background: var(--color-neutral-0);
}

/* Koverrus oikeassa alakulmassa: sivuston rh-notch. Ei varjoa. */
.rh-ref__notch {
  position: relative;
  margin-top: 28px;
}

.rh-ref__photo {
  position: relative;
  display: block;
  overflow: hidden;
  background: var(--color-terva);
}

/* Spacer keeps the cell at least 4:3, so the 4:3 collage is shown whole. */
.rh-ref__photo::before {
  content: "";
  display: block;
  padding-top: 75%;
}

.rh-ref__photo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s var(--ease-out);
}

.rh-ref__photo:hover img {
  transform: scale(1.04);
}

.rh-ref__photo:focus-visible {
  outline: 3px solid var(--color-primary);
  outline-offset: -3px;
}


.rh-ref__body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  padding: 28px 36px 24px;
}

.rh-ref__quote {
  margin: 0;
  font-size: clamp(1.5rem, 2.2vw, 1.875rem);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: var(--letter-tight);
  color: var(--color-terva);
}

.rh-ref__quote span {
  color: var(--color-primary);
}

.rh-ref__by {
  margin: 8px 0 0;
  font-size: 0.875rem;
  color: var(--color-neutral-600);
}

.rh-ref__by strong {
  color: var(--color-terva);
}

.rh-ref__note {
  margin: 8px 0 0;
  font-size: 0.9375rem;
  color: var(--color-neutral-600);
}

.rh-ref__stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--color-neutral-200);
}

.rh-ref__stats li {
  padding: 14px 14px 0;
  border-left: 1px solid var(--color-neutral-200);
}

.rh-ref__stats li:first-child {
  padding-left: 0;
  border-left: 0;
}

.rh-ref__stats strong {
  display: block;
  font-size: 1.625rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: var(--letter-tight);
  color: var(--color-primary);
}

.rh-ref__stats span {
  display: block;
  margin-top: 4px;
  font-size: 0.8125rem;
  line-height: 1.35;
  color: var(--color-neutral-600);
}

.rh-ref__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 24px;
  align-items: center;
  margin-top: 0;
  padding-top: 20px;
}

.rh-ref__btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 20px;
  font-weight: 700;
  color: #fff;
  text-decoration: none;
  background: var(--color-primary);
  border-radius: var(--radius-full);
  transition: background var(--duration-base);
}

.rh-ref__btn:hover {
  background: var(--color-primary-hover);
}

.rh-ref__btn--green {
  color: var(--color-terva);
  background: var(--color-vihrea);
}

.rh-ref__btn--green:hover {
  background: oklch(from var(--color-vihrea) calc(l - 0.05) c h);
}

.rh-ref__btn:focus-visible {
  outline: 3px solid var(--color-terva);
  outline-offset: 3px;
}

@media (min-width: 1241px) and (max-width: 1400px) {
  .rh-ref__card {
    grid-template-columns: minmax(0, 44%) minmax(0, 1fr);
  }
}

@media (max-width: 1240px) {
  .rh-ref__card {
    grid-template-columns: 1fr;
  }

  .rh-ref__photo::before {
    display: none;
  }

  .rh-ref__photo {
    width: 100%;
    min-height: 0;
    aspect-ratio: 4 / 3;
    max-height: 420px;
    background: var(--color-neutral-0);
  }

  .rh-ref__photo img {
    object-fit: contain;
  }

  .rh-ref__body {
    padding: 28px 20px 24px;
  }

  .rh-ref__quote {
    font-size: 1.625rem;
  }

  .rh-ref__stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .rh-ref__stats li,
  .rh-ref__stats li:first-child {
    padding: 16px 12px;
    border-left: 0;
    border-bottom: 1px solid var(--color-neutral-200);
  }

  .rh-ref__stats li:nth-child(odd) {
    padding-left: 0;
    border-right: 1px solid var(--color-neutral-200);
  }

  .rh-ref__stats strong {
    font-size: 1.75rem;
  }
}

@media (max-width: 480px) {
  .rh-ref__body {
    padding-bottom: 80px;
  }

  .rh-ref {
    padding: 20px 16px;
  }

  .rh-ref__btn {
    width: 100%;
    justify-content: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  .rh-ref__photo img,
  .rh-ref__btn {
    transition: none;
  }

  .rh-ref__photo:hover img {
    transform: none;
  }
}
