/* Bluejack Ranch - home */

/* Quotes */

.bjr-quotes {
  --bjr-dot: clamp(10px, .7vw, 14px);
  --bjr-dot-step: clamp(22px, 1.85vw, 38px);
  position: relative;
  isolation: isolate;
  display: grid;
  place-items: center;
  min-height: clamp(460px, 44.4vw, 900px);
  padding: clamp(3.5rem, 9.3vw, 12rem) var(--bjr-gutter);
  overflow: hidden;
  color: var(--bjr-white);
  background: var(--bjr-brown);
}
.bjr-quotes__bgs,
.bjr-quotes__bg,
.bjr-quotes__bgs::after { position: absolute; inset: 0; }
.bjr-quotes__bgs { z-index: -1; }
.bjr-quotes__bgs::after { content: ""; background: rgba(var(--bjr-brown-rgb), .6); }
.bjr-quotes__bg {
  background-position: center;
  background-size: cover;
  opacity: 0;
  transition: opacity 1s ease;
}
.bjr-quotes__bg.is-active { opacity: 1; }

.bjr-quotes__frame {
  position: relative;
  display: grid;
  place-items: center;
  width: min(73.3vw, 1500px);
  min-height: clamp(280px, 25.8vw, 520px);
  padding: clamp(2.5rem, 5vw, 6rem) clamp(1.25rem, 6vw, 8rem);
  text-align: center;
}
.bjr-quotes__frame::before,
.bjr-quotes__frame::after {
  content: "";
  position: absolute;
  border: 1px solid var(--bjr-gold);
  pointer-events: none;
}
.bjr-quotes__frame::before { inset: -4px 4px; }
.bjr-quotes__frame::after { inset: 4px -4px; }

/* gap in the bottom lines for the dots (--bjr-dot-count comes from the js) */
.bjr-quotes.has-dots .bjr-quotes__frame::before,
.bjr-quotes.has-dots .bjr-quotes__frame::after {
  --bjr-notch: calc(var(--bjr-dot-count, 2) * var(--bjr-dot-step) / 2 + clamp(1rem, 8.35vw, 11rem));
  clip-path: polygon(0 0, 100% 0, 100% 100%,
    calc(50% + var(--bjr-notch)) 100%, calc(50% + var(--bjr-notch)) calc(100% - 6px),
    calc(50% - var(--bjr-notch)) calc(100% - 6px), calc(50% - var(--bjr-notch)) 100%,
    0 100%);
}

.bjr-quotes__slides { display: grid; width: 100%; }
.bjr-quote {
  grid-area: 1 / 1;
  align-self: center;
  margin: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity .6s ease, visibility .6s ease;
}
.bjr-quote.is-active { opacity: 1; visibility: visible; }
.bjr-quote blockquote {
  max-width: 21em;
  margin: 0 auto;
  font-family: var(--bjr-font-heading);
  font-size: clamp(1.5rem, 2.3vw, 2.9rem);
  line-height: 1.35;
}
.bjr-quote blockquote::before { content: "\201C"; }
.bjr-quote blockquote::after { content: "\201D"; }
.bjr-quote figcaption {
  margin-top: clamp(1.5rem, 3.4vw, 4.25rem);
  font-weight: 500;
  font-size: clamp(.75rem, .95vw, 1.15rem);
  letter-spacing: .12em;
  text-transform: uppercase;
}

/* Plain version (Tiger's note on History): no frame, brighter photo, bigger quote */
.bjr-quotes--plain {
  min-height: 0;
  padding-block: clamp(4rem, 11vw, 14rem) clamp(3.5rem, 9vw, 11.5rem);
}
.bjr-quotes--plain .bjr-quotes__bgs::after { background: rgba(var(--bjr-brown-rgb), .1); }
.bjr-quotes--plain .bjr-quotes__frame { min-height: 0; padding-block: 0; }
.bjr-quotes--plain .bjr-quotes__frame::before,
.bjr-quotes--plain .bjr-quotes__frame::after { content: none; }
.bjr-quotes--plain .bjr-quote blockquote {
  max-width: 14.6em;
  font-size: clamp(1.75rem, 3.55vw, 4.4rem);
  line-height: 1.22;
  text-shadow: 0 1px 18px rgba(var(--bjr-brown-rgb), .35);
}
.bjr-quotes--plain .bjr-quote figcaption {
  margin-top: clamp(1.25rem, 2.6vw, 3.25rem);
  font-size: clamp(.7rem, 1vw, 1.2rem);
  color: var(--bjr-gold);
}
.bjr-quotes--plain .bjr-btn { margin-top: clamp(2rem, 4vw, 5rem); }

.bjr-quotes__dots {
  position: absolute;
  left: 50%;
  bottom: 0;
  display: flex;
  gap: calc(var(--bjr-dot-step) - var(--bjr-dot));
  transform: translate(-50%, 50%);
}
.bjr-quotes__dot {
  position: relative;
  flex: none;
  width: var(--bjr-dot);
  height: var(--bjr-dot);
  padding: 0;
  border: 1.5px solid var(--bjr-gold);
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  transition: background-color .25s ease, border-color .25s ease;
}
/* tap area */
.bjr-quotes__dot::after { content: ""; position: absolute; inset: -8px; }
.bjr-quotes__dot:hover,
.bjr-quotes__dot:focus-visible { background: var(--bjr-gold); }
.bjr-quotes__dot.is-active { border-color: var(--bjr-orange); background: var(--bjr-orange); }

@media (max-width: 991.98px) {
  .bjr-quotes { padding: 4rem var(--bjr-gutter); }
  .bjr-quotes__frame { width: calc(100% - 8px); padding: 3rem 1.25rem 3.5rem; }
}

/* Highlights */

.bjr-highlights {
  position: relative;
  display: grid;
  /* one column per item, however many there are */
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  min-height: clamp(520px, 44vw, 900px);
  overflow: hidden;
  background: var(--bjr-brown);
}
.bjr-highlight {
  display: flex;
  color: var(--bjr-white);
  text-decoration: none;
}
/* each photo covers the whole section */
.bjr-highlight__bg {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to top, rgba(var(--bjr-brown-rgb), .8), rgba(var(--bjr-brown-rgb), .5) 55%),
    var(--bjr-highlight-image, none);
  background-position: center;
  background-size: cover;
  opacity: 0;
  transition: opacity .7s ease;
}
.bjr-highlight.is-active .bjr-highlight__bg { opacity: 1; }
.bjr-highlight__content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  width: 100%;
  padding: 2.5vw 2.5vw 2.2vw;
  border-left: 1px solid var(--bjr-gold);
  transition: background-color .5s ease;
}
.bjr-highlight:first-child .bjr-highlight__content { border-left: 0; }
@media (min-width: 992px) {
  .bjr-highlight.is-active .bjr-highlight__content { background-color: rgba(var(--bjr-brown-rgb), .5); }
}
.bjr-highlight__title {
  margin: 0;
  font-family: var(--bjr-font-heading);
  font-weight: 400;
  font-size: clamp(1.75rem, 3vw, 3.75rem);
  line-height: 1.15;
}
.bjr-highlight__body {
  display: grid;
  grid-template-rows: 0fr;
  opacity: 0;
  transition: grid-template-rows .5s ease, opacity .4s ease;
}
.bjr-highlight.is-active .bjr-highlight__body { grid-template-rows: 1fr; opacity: 1; }
/* the extra 6px keeps the button frame from being clipped */
.bjr-highlight__body-inner {
  min-height: 0;
  overflow: hidden;
  margin: 0 -6px -6px;
  padding: 0 6px 6px;
}
.bjr-highlight__text {
  margin: clamp(.75rem, 1.4vw, 1.75rem) 0 clamp(1.25rem, 2vw, 2.5rem);
  font-size: clamp(.95rem, 1.1vw, 1.4rem);
  line-height: 1.6;
}

/* no hover on touch, everything stays open */
@media (max-width: 991.98px) {
  .bjr-highlights { grid-auto-flow: row; grid-template-columns: 1fr 1fr; min-height: 0; }
  .bjr-highlight:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .bjr-highlight { position: relative; min-height: 340px; }
  .bjr-highlight__bg { opacity: 1; }
  .bjr-highlight__content { padding: 1.75rem var(--bjr-gutter); border-left: 0; }
  .bjr-highlight__body { grid-template-rows: 1fr; opacity: 1; }
}
@media (max-width: 599.98px) {
  .bjr-highlights { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .bjr-quotes__bg,
  .bjr-quote,
  .bjr-highlight__bg,
  .bjr-highlight__content,
  .bjr-highlight__body { transition: none; }
}
