/* Testimonials page (our-testimonials.html). One <article class="tm"> per couple. */
.tm-page {
  padding: 72px max(4vw, 20px) 96px;
  background-color: #f6f3ee;
  color: #474747;
}

.tm-defs {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.tm-intro {
  max-width: 640px;
  margin: 0 auto 64px;
  text-align: center;
}

.tm-eyebrow {
  margin: 0 0 12px;
  color: #66605a;
  font-family: Raleway, sans-serif;
  font-size: 12px;
  letter-spacing: 0.22em;
  text-align: center;
  text-transform: uppercase;
}

.tm-page-title {
  margin: 0 0 16px;
  color: #3a3835;
  font-family: Cinzel, serif;
  font-size: clamp(32px, 3.6vw, 50px);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: 0.02em;
  text-align: center;
  text-transform: uppercase;
}

.tm-lead {
  margin: 0;
  font-family: Raleway, sans-serif;
  font-size: 16px;
  line-height: 1.7;
  text-align: center;
}

.tm-list {
  display: flex;
  flex-direction: column;
  gap: 96px;
  max-width: 1240px;
  margin: 0 auto;
}

/* A couple */
.tm-header {
  margin-bottom: 28px;
  text-align: center;
}

.tm-names {
  margin: 0;
  color: #3a3835;
  font-family: Cinzel, serif;
  font-size: clamp(36px, 3.6vw, 52px);
  font-weight: 400;
  line-height: 1.1;
  text-align: center;
  text-transform: none;
}

.tm-amp {
  color: #b0765c;
  font-family: "Fake serif", serif;
  font-size: 1.15em;
  padding: 0 0.08em;
}

/* A short line about the wedding, under the names */
.tm-subhead {
  margin: 10px 0 0;
  color: #3a3835;
  font-family: Cinzel, serif;
  font-size: clamp(17px, 1.5vw, 21px);
  font-weight: 700;
  line-height: 1.3;
  text-align: center;
}

.tm-meta {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin: 8px 0 0;
  color: #6b6b6b;
  font-family: Raleway, sans-serif;
  font-size: 13px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.tm-body {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: 56px;
  align-items: start;
}

/* Alternate sides for every other couple */
.tm:nth-child(even) .tm-gallery {
  order: 2;
}

/* Story: lead copy about the couple, with key facts alongside */
.tm-story {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  gap: 56px;
  align-items: start;
  max-width: 1080px;
  margin: 0 auto 48px;
}

.tm-story-text p {
  margin: 0 0 16px;
  color: #474747;
  font-family: Raleway, sans-serif;
  font-size: 15px;
  line-height: 1.8;
  text-align: left;
}

.tm-story-text .tm-story-lead {
  color: #3a3835;
  font-family: Raleway, sans-serif;
  font-size: 20px;
  line-height: 1.45;
}

.tm-facts {
  margin: 0;
  padding: 6px 0 0 28px;
  border-left: 1px solid #e59775;
}

.tm-fact {
  margin: 0 0 20px;
}

.tm-fact:last-child {
  margin-bottom: 0;
}

.tm-fact dt {
  margin: 0 0 4px;
  color: #66605a;
  font-family: Raleway, sans-serif;
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.tm-fact dd {
  margin: 0;
  color: #3a3835;
  font-family: Cinzel, serif;
  font-size: 26px;
  line-height: 1.2;
}

/* Photo slider */
.tm-gallery {
  min-width: 0;
}

.tm-viewport {
  position: relative;
  background-color: #e9e1d8;
}

.tm-track {
  display: flex;
  margin: 0;
  padding: 0;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
  list-style: none;
  aspect-ratio: 4 / 5;
}

.tm-track::-webkit-scrollbar {
  display: none;
}

.tm-track:focus-visible {
  outline: 2px solid #b0765c;
  outline-offset: 3px;
}

.tm-slide {
  flex: 0 0 100%;
  margin: 0;
  scroll-snap-align: start;
}

.tm-open {
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: none;
  cursor: zoom-in;
}

.tm-open img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Couples whose photos are mostly landscape get a landscape frame */
.tm-gallery-landscape .tm-track {
  aspect-ratio: 3 / 2;
}

/* Photos that don't match the frame's shape are shown whole, on a blurred backdrop.
   tm-slide-wide (landscape in a portrait frame) and tm-slide-fit (any other mismatch) behave the same. */
.tm-slide-fit .tm-open,
.tm-slide-wide .tm-open {
  position: relative;
  overflow: hidden;
}

.tm-slide-fit .tm-open::before,
.tm-slide-wide .tm-open::before {
  content: "";
  position: absolute;
  inset: -40px;
  background: var(--tm-backdrop) center / cover no-repeat;
  filter: blur(28px) saturate(0.9) brightness(0.85);
}

.tm-slide-fit .tm-open img,
.tm-slide-wide .tm-open img {
  position: relative;
  object-fit: contain;
}

.tm-arrow {
  position: absolute;
  top: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin-top: -22px;
  padding: 0 0 4px;
  border: 0;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.88);
  color: #3a3835;
  font-size: 30px;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(28, 24, 21, 0.18);
  transition: background-color 0.2s ease, opacity 0.2s ease;
}

.tm-arrow:hover,
.tm-arrow:focus-visible {
  background-color: #fff;
}

.tm-arrow:disabled {
  opacity: 0;
  pointer-events: none;
}

.tm-prev {
  left: 14px;
}

.tm-next {
  right: 14px;
}

.tm-count {
  position: absolute;
  right: 14px;
  bottom: 14px;
  margin: 0;
  padding: 5px 12px;
  border-radius: 999px;
  background-color: rgba(28, 24, 21, 0.6);
  color: #fff;
  font-family: Raleway, sans-serif;
  font-size: 12px;
  letter-spacing: 0.08em;
}

.tm-thumbs {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
  gap: 8px;
  margin-top: 10px;
}

.tm-thumb {
  padding: 0;
  border: 0;
  background: none;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  cursor: pointer;
  opacity: 0.55;
  outline: 2px solid transparent;
  outline-offset: 2px;
  transition: opacity 0.2s ease, outline-color 0.2s ease;
}

.tm-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.tm-thumb:hover,
.tm-thumb:focus-visible {
  opacity: 0.85;
}

.tm-thumb[aria-current="true"] {
  opacity: 1;
  outline-color: #b0765c;
}

/* Review card */
.tm-side {
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.tm-review {
  margin: 0;
  padding: 44px 34px 30px;
  background-color: #fff;
  box-shadow: 0 18px 40px rgba(58, 56, 53, 0.08);
}

.tm-google {
  width: 22px;
  height: 22px;
  flex: none;
}

.tm-review-source {
  color: #474747;
  font-family: Raleway, sans-serif;
  font-size: 13px;
  letter-spacing: 0.04em;
}

.tm-stars {
  display: inline-flex;
  gap: 3px;
}

.tm-stars svg {
  width: 20px;
  height: 20px;
  fill: #fbbc04;
}

.tm-quote {
  position: relative;
  margin: 0;
  padding: 0;
  border: 0;
  text-align: left;
  color: #3a3835;
  font-family: Raleway, sans-serif;
  font-size: 18px;
  line-height: 1.5;
}

.tm-quote::before {
  content: "\201C";
  position: absolute;
  top: -26px;
  left: -14px;
  color: #e6d6cb;
  font-size: 90px;
  line-height: 1;
  pointer-events: none;
}

.tm-quote p {
  position: relative;
  margin: 0 0 14px;
  font-family: inherit;
  font-size: inherit;
  line-height: 1.5;
  text-align: left;
}

.tm-quote p:first-child {
  font-size: 1.12em;
}

.tm-cite {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
  margin-top: 18px;
  text-align: left;
  color: #6b6b6b;
  font-family: Raleway, sans-serif;
  font-size: 13px;
  letter-spacing: 0.06em;
}

.tm-cite-name::before {
  content: "\2014\00a0";
}

/* Brush-stroke floral palette */
.tm-palette-title {
  margin: 0 0 14px;
  color: #3a3835;
  font-family: "Fake serif", serif;
  font-size: 40px;
  font-weight: 400;
  line-height: 1;
  text-transform: none;
}

.tm-swatches {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 26px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.tm-swatch {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  margin: 0;
}

.tm-stroke {
  grid-column: 1 / -1;
  width: 100%;
  height: auto;
  overflow: visible;
}

.tm-swatch:nth-child(3n + 2) .tm-stroke {
  transform: rotate(-1.5deg);
}

.tm-swatch:nth-child(3n) .tm-stroke {
  transform: rotate(1deg) scaleX(0.94);
  transform-origin: left center;
}

.tm-swatch-name {
  margin-top: -4px;
  color: #3a3835;
  font-family: Raleway, sans-serif;
  font-size: 13px;
  letter-spacing: 0.06em;
}

/* Lightbox */
.tm-lightbox {
  width: 100vw;
  max-width: 100vw;
  height: 100vh;
  max-height: 100vh;
  margin: 0;
  padding: 0;
  border: 0;
  background: rgba(20, 17, 15, 0.94);
}

.tm-lightbox::backdrop {
  background: rgba(20, 17, 15, 0.94);
}

.tm-lightbox[open] {
  display: flex;
  align-items: center;
  justify-content: center;
}

.tm-lightbox-image {
  max-width: calc(100vw - 140px);
  max-height: calc(100vh - 80px);
  object-fit: contain;
}

.tm-lightbox-close {
  position: absolute;
  top: 16px;
  right: 20px;
  padding: 4px 10px;
  border: 0;
  background: none;
  color: #fff;
  font-size: 40px;
  line-height: 1;
  cursor: pointer;
}

.tm-lightbox-prev {
  left: 20px;
}

.tm-lightbox-next {
  right: 20px;
}

@media screen and (max-width: 991px) {
  .tm-story {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .tm-facts {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px 24px;
    padding: 22px 0 0;
    border-top: 1px solid #e59775;
    border-left: 0;
  }

  .tm-fact {
    margin: 0;
  }

  .tm-body {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .tm:nth-child(even) .tm-gallery {
    order: 0;
  }
}

@media screen and (max-width: 479px) {
  .tm-page {
    padding: 48px 16px 64px;
  }

  .tm-intro {
    margin-bottom: 44px;
  }

  .tm-list {
    gap: 72px;
  }

  .tm-meta {
    font-size: 11px;
    gap: 8px;
  }

  .tm-arrow {
    width: 38px;
    height: 38px;
    margin-top: -19px;
    font-size: 26px;
  }

  .tm-thumbs {
    gap: 5px;
  }

  .tm-review {
    padding: 26px 22px 24px;
  }

  .tm-quote {
    font-size: 17px;
  }

  .tm-story-text .tm-story-lead {
    font-size: 18px;
  }

  .tm-fact dd {
    font-size: 22px;
  }

  .tm-swatches {
    gap: 4px 14px;
  }

  .tm-lightbox-image {
    max-width: 100vw;
  }

  .tm-lightbox-prev {
    left: 8px;
  }

  .tm-lightbox-next {
    right: 8px;
  }
}
