/*
 * Verse of the day band - [sbg_votd] (novamira-sandbox/sbg-votd.php).
 * Direction "Written In": cream band, script title, Cormorant verse that sets
 * itself word by word, hand-drawn swash under the reference, rolling waves
 * into the white section below (same three-layer waves as the home hero).
 */

.sbg-votd {
  --votd-cream: #F1EDE3;
  --votd-olive: #4B5A2E;
  --votd-sage: #6B7550;
  --votd-deep: #303520;
  --votd-ink: #211E19;
  --votd-muted: #7A7462;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  margin-top: 0 !important;
  margin-bottom: 0 !important;
  padding: 20px 24px 170px;
  background: var(--votd-cream);
  color: var(--votd-ink);
  text-align: center;
}

/* Rolling waves into the white section below. */
.sbg-votd::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -3px;
  height: 120px;
  z-index: -1;
  pointer-events: none;
  background-image:
    url("/wp-content/uploads/sbg-flair/wave-3.svg"),
    url("/wp-content/uploads/sbg-flair/wave-2.svg"),
    url("/wp-content/uploads/sbg-flair/wave-1.svg");
  background-repeat: repeat-x;
  background-size: 600px 120px;
  background-position: 0 100%, 0 100%, 0 100%;
  animation: sbg-votd-waves 45s linear infinite;
}

@keyframes sbg-votd-waves {
  to { background-position: -1800px 100%, 1200px 100%, -600px 100%; }
}

.sbg-votd__inner {
  position: relative;
  max-width: 900px;
  margin: 0 auto;
}

.sbg-votd__sprig {
  display: block;
  width: 96px;
  height: 44px;
  margin: 0 auto 2px;
  background: var(--votd-sage);
  -webkit-mask: url("/wp-content/uploads/sbg-flair/sprig.svg") center / contain no-repeat;
          mask: url("/wp-content/uploads/sbg-flair/sprig.svg") center / contain no-repeat;
  opacity: .85;
}

.sbg-votd .sbg-votd__title {
  margin: 0;
  font-family: "Dancing Script", "Snell Roundhand", cursive;
  font-weight: 600;
  font-size: 56px;
  line-height: .95;
  letter-spacing: 0;
  text-transform: none;
  color: var(--votd-olive);
}

.sbg-votd .sbg-votd__date {
  margin: 8px 0 0;
  font-family: "Bricolage Grotesque", sans-serif;
  font-weight: 600;
  font-size: 12px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--votd-sage);
}

.sbg-votd .sbg-votd__quote {
  margin: 30px 0 0;
  padding: 0;
  border: 0;
  background: none;
  box-shadow: none;
  font-style: normal;
}

.sbg-votd .sbg-votd__quote::before,
.sbg-votd .sbg-votd__quote::after { content: none; }

.sbg-votd .sbg-votd__text {
  margin: 0 auto;
  max-width: 30ch;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-style: italic;
  font-weight: 500;
  font-size: clamp(28px, 3.5vw, 46px);
  line-height: 1.22;
  letter-spacing: 0;
  color: var(--votd-ink);
  text-wrap: balance;
}

.sbg-votd__text .w {
  display: inline-block;
  transition: opacity .7s ease, transform .7s ease, filter .7s ease;
}

.sbg-votd.is-pending .sbg-votd__text .w {
  opacity: 0;
  transform: translateY(10px);
  filter: blur(4px);
}

.sbg-votd.is-pending .sbg-votd__text .w.on {
  opacity: 1;
  transform: none;
  filter: none;
}

.sbg-votd .sbg-votd__ref {
  margin: 26px 0 0;
  padding: 0;
  font-family: "Bricolage Grotesque", sans-serif;
  font-weight: 700;
  font-size: 15px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--votd-olive);
}

.sbg-votd .sbg-votd__ref::before { content: none; }

.sbg-votd__cite {
  position: relative;
  display: inline-block;
  padding-bottom: 12px;
  font-style: normal;
}

/* The swash draws itself left to right once the verse is written. */
.sbg-votd__cite::after {
  content: "";
  position: absolute;
  left: -8%;
  bottom: -2px;
  width: 116%;
  height: 14px;
  background: var(--votd-sage);
  -webkit-mask: url("/wp-content/uploads/sbg-flair/swash.svg") center / 100% 100% no-repeat;
          mask: url("/wp-content/uploads/sbg-flair/swash.svg") center / 100% 100% no-repeat;
  clip-path: inset(0 0 0 0);
  transition: clip-path 1.1s cubic-bezier(.6, 0, .3, 1);
}

.sbg-votd.is-pending .sbg-votd__cite::after { clip-path: inset(0 100% 0 0); }
.sbg-votd.is-pending.is-done .sbg-votd__cite::after { clip-path: inset(0 0 0 0); }

/* The theme greys blockquote citations; keep the reference olive. */
.sbg-votd .sbg-votd__quote .sbg-votd__cite {
  color: var(--votd-olive);
  font-size: inherit;
  font-weight: inherit;
  letter-spacing: inherit;
}

/* BibleLink wraps the reference for its hover preview; keep the band's look. */
.sbg-votd .sbg-votd__cite .bible-link {
  color: inherit !important;
  font: inherit !important;
  letter-spacing: inherit !important;
  text-decoration: none !important;
  border: 0 !important;
  background: none !important;
}

.sbg-votd__version {
  color: var(--votd-sage);
  transition: opacity .6s ease;
}

.sbg-votd.is-pending .sbg-votd__version { opacity: 0; }
.sbg-votd.is-pending.is-done .sbg-votd__version { opacity: 1; }

.sbg-votd .sbg-votd__cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 26px;
  padding: 12px 24px;
  border-radius: 999px;
  background: var(--votd-olive);
  color: #FFFFFF;
  font-family: "Bricolage Grotesque", sans-serif;
  font-weight: 600;
  font-size: 15px;
  line-height: 1.2;
  text-decoration: none;
  transition: background-color .25s ease, transform .25s ease;
}

.sbg-votd .sbg-votd__cta span[aria-hidden] {
  display: inline-block;
  transition: transform .3s ease;
}

.sbg-votd .sbg-votd__cta:hover,
.sbg-votd .sbg-votd__cta:focus-visible {
  background: var(--votd-deep);
  color: #FFFFFF;
  transform: translateY(-2px);
}

.sbg-votd .sbg-votd__cta:hover span[aria-hidden] { transform: translateX(3px); }

.sbg-votd .sbg-votd__cta:focus-visible {
  outline: 2px solid var(--votd-olive);
  outline-offset: 3px;
}

.sbg-votd .sbg-votd__credit {
  margin: 14px 0 0;
  font-size: 12px;
  line-height: 1.5;
  color: var(--votd-muted);
}

.sbg-votd .sbg-votd__credit a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* Kadence zeroes side padding on .alignfull; restore the band's gutter. */
.entry-content .sbg-votd.alignfull {
  padding-left: 24px;
  padding-right: 24px;
}

@media (max-width: 767px) {
  .entry-content .sbg-votd.alignfull {
    padding-left: 20px;
    padding-right: 20px;
  }
}

/* Pull the band up to the stream panels so the cream reads as one pause. */
.page-id-669 .kb-row-layout-idbt-streams-v2:has(+ .sbg-votd) > .kt-row-column-wrap {
  padding-bottom: 48px;
}

@media (max-width: 767px) {
  .sbg-votd {
    padding: 12px 20px 118px;
  }
  .sbg-votd::after {
    height: 80px;
    background-size: 420px 80px;
    animation-name: sbg-votd-waves-sm;
  }
  .sbg-votd .sbg-votd__title { font-size: 43px; }
  .sbg-votd .sbg-votd__quote { margin-top: 22px; }
  .sbg-votd .sbg-votd__text { font-size: 28px; line-height: 1.25; }
  .sbg-votd .sbg-votd__ref { font-size: 13px; }
  .page-id-669 .kb-row-layout-idbt-streams-v2:has(+ .sbg-votd) > .kt-row-column-wrap {
    padding-bottom: 32px;
  }
  @keyframes sbg-votd-waves-sm {
    to { background-position: -1260px 100%, 840px 100%, -420px 100%; }
  }
}

@media (prefers-reduced-motion: reduce) {
  .sbg-votd::after { animation: none; }
  .sbg-votd.is-pending .sbg-votd__text .w { opacity: 1; transform: none; filter: none; }
  .sbg-votd.is-pending .sbg-votd__cite::after { clip-path: inset(0 0 0 0); }
  .sbg-votd.is-pending .sbg-votd__version { opacity: 1; }
}
