/**
 * RSTQ Modern — page-title option A: Gold shimmer
 * Soft fade/slide-up, one gold→white shimmer, teal underline draw-in,
 * eyebrow "RSTQ Transportation · Since 2007".
 * Transform/opacity only. Respects prefers-reduced-motion.
 * Skips homepage + reservations (page-id-7301 Lead Form lives in the H1).
 */

body.home .limoking-page-title-wrapper,
body.page-id-7301 .limoking-page-title-wrapper {
  /* leave untouched */
}

/* Scope: all other pages that show the theme page-title banner */
body:not(.home):not(.page-id-7301) .limoking-page-title-wrapper {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

/* Stronger readable overlay (parent overlay is currently opacity:0) */
body:not(.home):not(.page-id-7301) .limoking-page-title-wrapper .limoking-page-title-overlay {
  opacity: 1 !important;
  background: linear-gradient(
    180deg,
    rgba(26, 31, 38, 0.55) 0%,
    rgba(26, 31, 38, 0.42) 45%,
    rgba(26, 31, 38, 0.62) 100%
  ) !important;
  pointer-events: none;
}

body:not(.home):not(.page-id-7301) .limoking-page-title-wrapper .limoking-page-title-container {
  position: relative;
  z-index: 2;
}

/* Eyebrow removed in 1.1.7.1 at Quentin's request. */

/* Title fade + slide up */
body:not(.home):not(.page-id-7301) .limoking-page-title-wrapper .limoking-page-title {
  position: relative;
  display: inline-block;
  max-width: 100%;
  opacity: 0;
  transform: translateY(18px);
  animation: rstq-pta-title 0.85s cubic-bezier(0.22, 1, 0.36, 1) 0.15s forwards;
  /* Shimmer via background-clip */
  background-image: linear-gradient(
    110deg,
    #ffffff 0%,
    #ffffff 38%,
    #e6ae48 50%,
    #ffffff 62%,
    #ffffff 100%
  ) !important;
  background-size: 220% 100% !important;
  background-position: 100% 0 !important;
  -webkit-background-clip: text !important;
  background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  color: transparent !important;
  /* Keep a soft shadow on a pseudo so clip doesn't kill readability */
  filter: drop-shadow(0 2px 10px rgba(0, 0, 0, 0.55));
}

body:not(.home):not(.page-id-7301) .limoking-page-title-wrapper.rstq-pta-ready .limoking-page-title {
  animation:
    rstq-pta-title 0.85s cubic-bezier(0.22, 1, 0.36, 1) 0.15s forwards,
    rstq-pta-shimmer 1.6s ease-in-out 0.85s 1 forwards;
}

/* Teal underline that draws in */
body:not(.home):not(.page-id-7301) .limoking-page-title-wrapper .limoking-page-title::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -0.18em;
  width: 100%;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, #1eacc7 0%, #1796af 55%, rgba(30, 172, 199, 0.25) 100%);
  transform: scaleX(0);
  transform-origin: left center;
  animation: rstq-pta-underline 0.75s cubic-bezier(0.22, 1, 0.36, 1) 0.55s forwards;
  pointer-events: none;
}

@keyframes rstq-pta-eyebrow {
  to { opacity: 1; transform: translateY(0); }
}
@keyframes rstq-pta-title {
  to { opacity: 1; transform: translateY(0); }
}
@keyframes rstq-pta-shimmer {
  0%   { background-position: 100% 0; }
  100% { background-position: -120% 0; }
}
@keyframes rstq-pta-underline {
  to { transform: scaleX(1); }
}

@media (max-width: 767px) {
  body:not(.home):not(.page-id-7301) .limoking-page-title-wrapper .limoking-page-title-container::before {
    font-size: 0.62rem;
    letter-spacing: 0.12em;
    margin-bottom: 8px;
  }
}

@media (prefers-reduced-motion: reduce) {
  body:not(.home):not(.page-id-7301) .limoking-page-title-wrapper .limoking-page-title-container::before,
  body:not(.home):not(.page-id-7301) .limoking-page-title-wrapper .limoking-page-title,
  body:not(.home):not(.page-id-7301) .limoking-page-title-wrapper .limoking-page-title::after {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
  body:not(.home):not(.page-id-7301) .limoking-page-title-wrapper .limoking-page-title {
    background: none !important;
    -webkit-text-fill-color: #ffffff !important;
    color: #ffffff !important;
    filter: none;
  }
  body:not(.home):not(.page-id-7301) .limoking-page-title-wrapper .limoking-page-title::after {
    transform: scaleX(1) !important;
  }
}

/* ---- 1.1.7.3: letter-by-letter rise + gold wave ---- */
body:not(.home):not(.page-id-7301) .limoking-page-title-wrapper .limoking-page-title.rstq-pta-split {
  opacity: 1;
  transform: none;
  animation: none !important;
  background: none !important;
  -webkit-text-fill-color: currentColor !important;
  color: #ffffff !important;
  filter: none;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.6);
}
.rstq-pta-split .rstq-pta-word { display: inline-block; white-space: nowrap; }
.rstq-pta-split .rstq-pta-char {
  display: inline-block;
  opacity: 0;
  transform: translateY(0.6em) scale(0.9);
  animation:
    rstq-pta-char-in 0.6s cubic-bezier(0.22, 1, 0.36, 1) calc(0.15s + var(--i) * 0.06s) forwards,
    rstq-pta-char-gold 7s ease-in-out calc(0.9s + var(--n) * 0.06s + var(--i) * 0.07s) infinite;
}
.rstq-pta-split::after {
  animation-delay: calc(0.4s + var(--n) * 0.06s) !important;
}
@keyframes rstq-pta-char-in {
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes rstq-pta-char-gold {
  0%, 12%, 100% { color: #ffffff; text-shadow: 0 2px 14px rgba(0, 0, 0, 0.6); }
  5% { color: #e6ae48; text-shadow: 0 0 18px rgba(230, 174, 72, 0.75), 0 2px 14px rgba(0, 0, 0, 0.6); }
}
@media (prefers-reduced-motion: reduce) {
  .rstq-pta-split .rstq-pta-char { animation: none !important; opacity: 1 !important; transform: none !important; }
}
