/* LF Builders — v1 enhancement styles (ported from the v2 design system).
   Teal #20a7ad identity. Everything is additive and JS-gated where it
   could hide content (html.lf-js). */

/* ---- reveal on scroll ---- */
html.lf-js .lf-reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.22, 0.61, 0.36, 1);
}
html.lf-js .lf-reveal.lf-in {
  opacity: 1;
  transform: none;
}
@media (prefers-reduced-motion: reduce) {
  html.lf-js .lf-reveal { opacity: 1; transform: none; transition: none; }
}

/* ---- testimonials: scroll-snap replacement for Swiper ---- */
.testimonials-carousel.lf-snap .swiper-wrapper {
  display: flex;
  gap: 18px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: 6px 2px 18px;
}
.testimonials-carousel.lf-snap .swiper-wrapper::-webkit-scrollbar { display: none; }
.testimonials-carousel.lf-snap { overflow: hidden; }
.testimonials-carousel.lf-snap .swiper-slide {
  flex: 0 0 100%;
  min-width: 100%;
  scroll-snap-align: center;
  scroll-snap-stop: always;
}
.testimonials-carousel.lf-snap .swiper-slide .testimonial {
  max-width: 620px;
  margin: 0 auto;
}
.testimonials-carousel.lf-snap .swiper-pagination,
.testimonials-carousel.lf-snap .swiper-button-prev,
.testimonials-carousel.lf-snap .swiper-button-next { display: none; }

.lf-scroller-shell { position: relative; }
.lf-scroller-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid rgba(32, 167, 173, 0.45);
  background: rgba(255, 255, 255, 0.92);
  color: #12777c;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12);
  transition: background 0.2s ease, transform 0.2s ease, opacity 0.2s ease;
}
.lf-scroller-arrow:hover { background: #20a7ad; color: #fff; transform: translateY(-50%) scale(1.06); }
.lf-scroller-arrow:disabled { opacity: 0.25; cursor: default; }
.lf-scroller-arrow--prev { left: 6px; }
.lf-scroller-arrow--next { right: 6px; }
@media (max-width: 600px) {
  .lf-scroller-arrow { width: 34px; height: 34px; font-size: 15px; }
}

/* ---- lightbox ---- */
.lf-lightbox {
  border: 0;
  padding: 0;
  background: transparent;
  max-width: min(94vw, 1100px);
}
.lf-lightbox::backdrop { background: rgba(10, 14, 15, 0.82); }
.lf-lightbox figure { margin: 0; }
.lf-lightbox img {
  display: block;
  max-width: min(94vw, 1100px);
  max-height: 84vh;
  width: auto;
  height: auto;
  margin: 0 auto;
  border-radius: 10px;
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.5);
}
.lf-lightbox figcaption {
  color: #cfe9ea;
  text-align: center;
  font-size: 0.85rem;
  padding-top: 10px;
}
.lf-lightbox__close {
  position: fixed;
  top: 14px;
  right: 18px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 0;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  font-size: 22px;
  cursor: pointer;
}
.lf-lightbox__close:hover { background: rgba(255, 255, 255, 0.3); }
.lf-zoomable { cursor: zoom-in; position: relative; }
.lf-zoomable:focus-visible { outline: 3px solid #20a7ad; outline-offset: 3px; }
.lf-zoomable::after {
  content: "⤢";
  position: absolute;
  right: 10px;
  bottom: 10px;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: rgba(12, 60, 62, 0.66);
  color: #fff;
  font-size: 16px;
  line-height: 30px;
  text-align: center;
  pointer-events: none;
  opacity: 0.85;
}

/* ---- renovation.reviews feed card ---- */
.lf-rr-card {
  margin: 46px auto 38px;
  padding: 0 18px;
  max-width: 760px;
}
.lf-rr-inner {
  background: #fff;
  border: 1px solid rgba(32, 167, 173, 0.28);
  border-top: 4px solid #20a7ad;
  border-radius: 14px;
  padding: 26px 26px 22px;
  box-shadow: 0 6px 26px rgba(15, 96, 100, 0.08);
}
.lf-rr-inner h2 {
  margin: 0 0 4px;
  font-size: 1.35rem;
  color: #123347 !important;
  background: transparent !important;
  padding: 0 !important;
  text-shadow: none;
  box-shadow: none;
  letter-spacing: normal;
}
.lf-rr-sub { margin: 0 0 14px; color: #567; font-size: 0.9rem; }
.lf-rr-card .lf-rr-list { list-style: none; margin: 0; padding: 0; }
.lf-rr-card .lf-rr-list li { padding: 10px 0; border-top: 1px dashed rgba(32, 167, 173, 0.3); }
.lf-rr-card .lf-rr-list li a {
  color: #12777c;
  font-weight: 600;
  text-decoration: none;
}
.lf-rr-card .lf-rr-list li a:hover { text-decoration: underline; }
.lf-rr-meta { display: block; font-size: 0.78rem; color: #789; padding-top: 2px; }
.lf-rr-more {
  display: inline-block;
  margin-top: 14px;
  color: #fff;
  background: #20a7ad;
  padding: 9px 18px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  transition: background 0.2s ease, transform 0.2s ease;
}
.lf-rr-more:hover { background: #178085; transform: translateY(-1px); }
.lf-rr-fallback .lf-rr-list::before {
  content: "Visit the forum for the latest renovation questions and answers.";
  color: #567;
  font-size: 0.9rem;
}

/* ---- mobile sticky action bar ---- */
.lf-action-bar {
  position: fixed;
  left: 10px;
  right: 10px;
  bottom: 10px;
  z-index: 9990;
  display: flex;
  gap: 8px;
  align-items: stretch;
  padding: 8px;
  border-radius: 14px;
  background: rgba(16, 42, 44, 0.94);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
  transform: translateY(120%);
  transition: transform 0.35s cubic-bezier(0.22, 0.61, 0.36, 1);
}
.lf-action-bar.lf-ab-on { transform: none; }
.lf-action-bar a {
  flex: 1;
  text-align: center;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.95rem;
  padding: 12px 6px;
  border-radius: 10px;
}
.lf-ab-call { background: rgba(255, 255, 255, 0.12); color: #fff; }
.lf-ab-quote { background: #20a7ad; color: #fff; }
.lf-ab-close {
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.7);
  font-size: 20px;
  padding: 0 8px;
  cursor: pointer;
}
@media (min-width: 769px) { .lf-action-bar { display: none; } }
@media (prefers-reduced-motion: reduce) { .lf-action-bar { transition: none; } }

/* ---- small global polish ---- */
a:focus-visible, button:focus-visible {
  outline: 3px solid rgba(32, 167, 173, 0.7);
  outline-offset: 2px;
}
.rotating-border .button.explore {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.rotating-border .button.explore:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(18, 119, 124, 0.28);
}
.divider { transition: opacity 0.4s ease; }
img { max-width: 100%; }


/* ---- v1 homepage feed card: 92vw under body zoom 1.25 overflows the
   viewport (vw ignores zoom). Percentage of the zoomed parent is correct
   on every device. ---- */
.rr-card {
  width: min(980px, 92%) !important;
  max-width: 100%;
}
.rr-section { padding-left: 12px; padding-right: 12px; box-sizing: border-box; }


/* ---- QA round 2 ---- */

/* hero splash: #main is a centered flex column, sections shrink to content;
   force the hero full-bleed on every device */
#intro.intro-splash {
  width: 100%;
  align-self: stretch;
}

/* feed card CTA: right side, no arrow */
.lf-rr-more {
  display: block;
  width: max-content;
  margin-left: auto;
  margin-right: 0;
}

/* square image corners inside the project modals */
.modal img,
.modal .carousel-images img,
.random-modal-img img {
  border-radius: 0 !important;
}

/* hero logo sits left, not centered */
#intro.intro-splash .header-logo { margin-bottom: 25px; } /* centered on desktop */
@media (max-width: 768px) {
  #intro.intro-splash .header-logo { text-align: left; }
  #intro.intro-splash .header-logo img { margin: 0; }
}

/* mobile action bar: pinned flush to the bottom edge, slimmer */
.lf-action-bar {
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: 0;
  padding: 6px 8px;
  gap: 6px;
}
.lf-action-bar a {
  padding: 9px 6px;
  font-size: 0.9rem;
}

/* video facade thumbs: crop pillarboxed hq thumbnails instead of
   showing black bars; give them proper room on small screens */
.youtube-video-placeholder {
  background-size: cover !important;
  background-position: center !important;
}
/* (mobile aspect-ratio override removed 2026-07-10: it outgrew the
   fixed-height video sections and overlapped the next heading; cover
   alone fixes the squished/stretched thumbnails) */


/* lightbox: always centered in the viewport, image never overflows */
.lf-lightbox {
  margin: auto;
  max-height: 94vh;
  overflow: hidden;
}
.lf-lightbox figure {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  max-height: 88vh;
}
.lf-lightbox img { max-height: 78vh; }

/* forum feed card: square corners */
.lf-rr-inner { border-radius: 0; }


/* keep the animated saw visible above the pinned action bar */
html.lf-ab-open #gary-playground { bottom: 56px; }


/* footer stays reachable when the action bar is pinned */
html.lf-ab-open body { padding-bottom: 58px; }

/* ==== funnel spotlight widget ==== */
.lf-fs {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 9980;
  width: min(340px, calc(100vw - 32px));
  background:
    radial-gradient(1px 1px at 12px 12px, rgba(8, 11, 13, 0.05) 1px, transparent 1.5px),
    linear-gradient(160deg, #ffffff 0%, #f2fbfb 100%);
  background-size: 24px 24px, auto;
  border: 1px solid rgba(32, 167, 173, 0.4);
  border-top: 5px solid #20a7ad;
  border-radius: 0;
  box-shadow: 0 18px 48px rgba(8, 40, 42, 0.28);
  opacity: 0;
  transform: translateY(28px) scale(0.97);
  transition: opacity 0.4s ease, transform 0.45s cubic-bezier(0.22, 0.61, 0.36, 1);
}
.lf-fs--on { opacity: 1; transform: none; }
.lf-fs__close {
  position: absolute;
  top: 8px;
  right: 10px;
  border: 0;
  background: transparent;
  color: #6b7a7e;
  font-size: 20px;
  cursor: pointer;
  line-height: 1;
}
.lf-fs__close:hover { color: #12777c; }
.lf-fs__badge {
  display: inline-block;
  margin: 14px 0 0 18px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: #063033;
  background: linear-gradient(90deg, #ffd76a, #ffc22e);
  padding: 4px 12px;
  border-radius: 999px;
  box-shadow: 0 2px 8px rgba(255, 194, 46, 0.45);
  animation: lf-fs-pulse 2.2s ease-in-out infinite;
}
@keyframes lf-fs-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}
.lf-fs__body { padding: 10px 18px 16px; }
.lf-fs__emoji { float: right; font-size: 1.9rem; margin: 2px 0 6px 10px; }
.lf-fs h3 {
  margin: 6px 0 4px;
  font-size: 1.02rem;
  line-height: 1.3;
  color: #10282b;
}
.lf-fs__deal {
  margin: 0 0 12px;
  font-size: 0.88rem;
  color: #1e565a;
  font-weight: 600;
}
.lf-fs__cta {
  display: block;
  text-align: center;
  background: #20a7ad;
  color: #fff;
  font-weight: 800;
  font-size: 0.95rem;
  padding: 11px 14px;
  border-radius: 10px;
  text-decoration: none;
  box-shadow: 0 6px 18px rgba(32, 167, 173, 0.4);
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}
.lf-fs__cta:hover {
  background: #178085;
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(32, 167, 173, 0.5);
}
.lf-fs__trust {
  display: block;
  margin-top: 9px;
  font-size: 0.72rem;
  color: #5a6a6e;
  text-align: center;
}
@media (max-width: 768px) {
  .lf-fs { right: 8px; left: 8px; width: auto; bottom: 8px; }
  html.lf-ab-open .lf-fs { bottom: 62px; }
}
@media (prefers-reduced-motion: reduce) {
  .lf-fs { transition: none; }
  .lf-fs__badge { animation: none; }
}


/* ==== scroll progress bar ==== */
.lf-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0;
  z-index: 10001;
  background: linear-gradient(90deg, #20a7ad, #7fe3e8);
  box-shadow: 0 0 8px rgba(32, 167, 173, 0.55);
  transition: width 0.12s linear;
  pointer-events: none;
}


/* popups are square (Garrett 2026-07-10) */
.lf-fs, .lf-lightbox img { border-radius: 0 !important; }

/* smooth in-page scrolling */
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }


/* ==== LF animation pack ("1000x" round, 2026-07-10 stamp o) ==== */

/* directional slide-ins never spawn a horizontal scrollbar */
html.lf-js { overflow-x: clip; }

/* directional section reveals (JS assigns --l / --r alternately) */
html.lf-js .lf-reveal.lf-reveal--l { transform: translateX(-28px); }
html.lf-js .lf-reveal.lf-reveal--r { transform: translateX(28px); }
html.lf-js .lf-reveal.lf-in { transform: none; }
@media (max-width: 768px) {
  html.lf-js .lf-reveal.lf-reveal--l,
  html.lf-js .lf-reveal.lf-reveal--r { transform: translateY(22px); }
  html.lf-js .lf-reveal.lf-in { transform: none; }
}

/* staggered children cascade in after their section */
html.lf-js .lf-reveal .lf-stagger {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.55s ease, transform 0.55s cubic-bezier(0.22, 0.61, 0.36, 1);
  transition-delay: calc(var(--lf-i, 0) * 90ms + 120ms);
}
html.lf-js .lf-reveal.lf-in .lf-stagger { opacity: 1; transform: none; }

/* section headings draw a teal underline once revealed */
html.lf-js .lf-reveal h2 { position: relative; }
html.lf-js .lf-reveal h2::after {
  content: "";
  display: block;
  width: 64px;
  height: 3px;
  margin: 8px auto 0;
  background: linear-gradient(90deg, #20a7ad, #7fe3e8);
  transform: scaleX(0);
  transition: transform 0.7s 0.35s cubic-bezier(0.22, 0.61, 0.36, 1);
}
html.lf-js .lf-reveal.lf-in h2::after { transform: scaleX(1); }

/* page entrance (service pages; homepage keeps its intro system) */
html.lf-js.lf-page-in #main {
  animation: lf-page-in 0.6s cubic-bezier(0.22, 0.61, 0.36, 1) both;
}
@keyframes lf-page-in {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}

/* saw blade riding the scroll progress bar */
.lf-progress-saw {
  position: fixed;
  top: -4px;
  left: -11px;
  z-index: 10002;
  width: 22px;
  height: 22px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
  filter: drop-shadow(0 1px 3px rgba(8, 40, 42, 0.4));
}

/* image wipe-in reveals */
html.lf-js .lf-wipe {
  clip-path: inset(0 0 100% 0);
  transition: clip-path 0.8s cubic-bezier(0.22, 0.61, 0.36, 1);
  transition-delay: var(--lf-wd, 0ms);
}
html.lf-js .lf-wipe.lf-wipe-in { clip-path: inset(0 0 0 0); }

/* gallery hover life */
.random-gary-img { transition: transform 0.5s cubic-bezier(0.22, 0.61, 0.36, 1), box-shadow 0.4s ease; }
.random-gary-img:hover { transform: scale(1.02); box-shadow: 0 14px 34px rgba(8, 40, 42, 0.22); }
img.showcase { transition: transform 0.7s cubic-bezier(0.22, 0.61, 0.36, 1), box-shadow 0.4s ease; }
img.showcase:hover { transform: scale(1.03); box-shadow: 0 12px 30px rgba(8, 40, 42, 0.2); }

/* CTA sheen sweep */
.lf-shine { overflow: hidden; }
.lf-sheen {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 40%;
  left: -60%;
  background: linear-gradient(105deg, transparent, rgba(255, 255, 255, 0.5), transparent);
  transform: skewX(-18deg);
  animation: lf-sheen 5.6s ease-in-out infinite;
  pointer-events: none;
}
@keyframes lf-sheen {
  0%, 72% { left: -60%; }
  88%, 100% { left: 130%; }
}

/* tap/click ripple */
.lf-clip { overflow: hidden; }
.lf-ripple {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.5) 0%, rgba(255, 255, 255, 0) 65%);
  transform: scale(0);
  opacity: 0.9;
  animation: lf-ripple 0.6s ease-out forwards;
  pointer-events: none;
}
@keyframes lf-ripple {
  to { transform: scale(1); opacity: 0; }
}

/* 3D tilt cards */
.lf-tilt { transition: transform 0.3s ease, box-shadow 0.3s ease; }
.lf-tilt:hover { box-shadow: 0 18px 40px rgba(8, 40, 42, 0.25); }

/* nav links draw a teal underline */
.nav-link {
  background-image: linear-gradient(90deg, #20a7ad, #7fe3e8);
  background-size: 0 2px;
  background-repeat: no-repeat;
  background-position: 0 100%;
  transition: background-size 0.28s ease;
}
.nav-link:hover, .nav-link:focus-visible { background-size: 100% 2px; }

/* lightbox pop-in */
.lf-lightbox[open] { animation: lf-lb-in 0.35s cubic-bezier(0.22, 0.61, 0.36, 1); }
@keyframes lf-lb-in {
  from { opacity: 0; transform: scale(0.92); }
}
.lf-lightbox[open]::backdrop { animation: lf-lb-bd 0.35s ease; }
@keyframes lf-lb-bd {
  from { opacity: 0; }
}

/* funnel spotlight: springy pop + hover lift */
.lf-fs { transition: opacity 0.45s ease, transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1); }
.lf-fs--on:hover { transform: translateY(-3px); transition-duration: 0.25s; }

/* action bar: bouncy entrance + periodic call nudge */
.lf-action-bar.lf-ab-on { animation: lf-ab-pop 0.55s cubic-bezier(0.34, 1.56, 0.64, 1); }
@keyframes lf-ab-pop {
  0% { transform: translateY(120%); }
  70% { transform: translateY(-6%); }
  100% { transform: none; }
}
.lf-ab-call { animation: lf-call-pulse 7s ease-in-out infinite; }
@keyframes lf-call-pulse {
  0%, 92%, 100% { transform: none; }
  94% { transform: rotate(-2deg) scale(1.04); }
  96% { transform: rotate(2deg) scale(1.04); }
  98% { transform: rotate(-1deg); }
}

/* every pack animation dies under reduced motion */
@media (prefers-reduced-motion: reduce) {
  html.lf-js .lf-reveal.lf-reveal--l,
  html.lf-js .lf-reveal.lf-reveal--r { transform: none; opacity: 1; }
  html.lf-js .lf-reveal .lf-stagger { opacity: 1; transform: none; transition: none; }
  html.lf-js .lf-reveal h2::after { transform: scaleX(1); transition: none; }
  html.lf-js.lf-page-in #main { animation: none; }
  html.lf-js .lf-wipe { clip-path: none; transition: none; }
  .lf-sheen, .lf-ripple, .lf-progress-saw { display: none; }
  .lf-ab-call, .lf-action-bar.lf-ab-on { animation: none; }
  .random-gary-img, img.showcase, .lf-tilt { transition: none; }
}


/* ==== press & community marquee ==== */
.lf-mq {
  overflow: hidden;
  padding: 14px 0;
  margin: 34px auto;
  /* match the page's content column at every device size */
  width: min(1200px, 94%);
  max-width: 94%;
  border-top: 1px solid rgba(32, 167, 173, 0.25);
  border-bottom: 1px solid rgba(32, 167, 173, 0.25);
}
.lf-mq__track {
  display: flex;
  gap: 44px;
  width: max-content;
  animation: lf-mq-scroll 30s linear infinite;
}
.lf-mq:hover .lf-mq__track { animation-play-state: paused; }
@keyframes lf-mq-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
.lf-mq__item {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  text-decoration: none;
  white-space: nowrap;
}
.lf-mq__item i {
  font-style: normal;
  color: #fff;
  font-weight: 800;
  font-size: 0.62rem;
  width: 26px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0;
}
.lf-mq__item b {
  color: #000000;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
}
a.lf-mq__item:hover b { color: #157a7f; }
@media (prefers-reduced-motion: reduce) {
  .lf-mq__track { animation: none; flex-wrap: wrap; width: auto; justify-content: center; }
}


/* ==== mobile width containment (2026-07-10) ====
   At phone widths the homepage flag marquee + hero chain inflated #main
   to ~2600px, and anything sized in % (incl. .lf-mq) inherited the blowout.
   Anchor #main to the viewport and stop children from exceeding it.
   (Phones never get the body zoom, so vw is safe inside this query.) */
@media (max-width: 768px) {
  .app, #main { max-width: 100vw; overflow-x: clip; }
  #main > * { max-width: 100%; min-width: 0; }
  .flag-marquee, .flag-marquee__track { max-width: 100vw; overflow: hidden; }
  #intro.intro-splash, .intro-bg, .intro-bg__video { max-width: 100vw; }
  .lf-mq { width: 94%; max-width: 94%; }
}


/* galleries load their images async; never clip them (fixes invisible
   service-page galleries caused by the wipe-in observing empty boxes) */
html.lf-js .random-gary-img.lf-wipe,
html.lf-js .random-gary-img {
  clip-path: none !important;
}
