/* V41 — motion tied to real interaction, not decorative particles. */
html { scroll-behavior: smooth; }

.motion-ready .reveal-item {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity .62s cubic-bezier(.2,.75,.25,1), transform .62s cubic-bezier(.2,.75,.25,1);
}

.motion-ready .reveal-item.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.motion-ready .reveal-item:nth-child(2) { transition-delay: .08s; }
.motion-ready .reveal-item:nth-child(3) { transition-delay: .16s; }
.motion-ready .reveal-item:nth-child(4) { transition-delay: .24s; }

.homes-heading h2,
.next-steps h2,
.broker h2 {
  position: relative;
}

.homes-heading h2::after,
.next-steps h2::after {
  content: '';
  display: block;
  width: 54px;
  height: 3px;
  margin-top: 12px;
  border-radius: 999px;
  background: linear-gradient(90deg, #39483c, #d3af64);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .75s cubic-bezier(.2,.75,.25,1) .18s;
}

.is-visible .homes-heading h2::after,
.next-steps.is-visible h2::after,
.homes-heading.is-visible h2::after {
  transform: scaleX(1);
}

.home-card {
  transition: transform .32s cubic-bezier(.2,.75,.25,1), box-shadow .32s ease, border-color .32s ease;
  will-change: transform;
}

.home-card:hover,
.home-card:focus-within {
  transform: translateY(-8px);
  border-color: rgba(57, 72, 60, .38);
  box-shadow: 0 22px 46px rgba(38, 61, 48, .14);
}

.home-main { overflow: hidden; }
.gallery-image {
  transition: transform .65s cubic-bezier(.2,.75,.25,1), filter .45s ease;
}
.home-card:hover .gallery-image { transform: scale(1.035); }
.home-main.gallery-changing .gallery-image { animation: dona-gallery-change .42s ease both; }

@keyframes dona-gallery-change {
  0% { opacity: .48; transform: scale(1.025) translateX(8px); filter: saturate(.85); }
  100% { opacity: 1; transform: scale(1) translateX(0); filter: saturate(1); }
}

.photo-thumb {
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease, opacity .2s ease;
}
.photo-thumb:hover { transform: translateY(-3px); }
.photo-thumb:active { transform: scale(.96); }

.step {
  position: relative;
  padding: 17px;
  border: 1px solid transparent;
  border-radius: 16px 16px 16px 5px;
  cursor: pointer;
  transition: transform .28s cubic-bezier(.2,.75,.25,1), background .28s ease, border-color .28s ease, box-shadow .28s ease;
}

.step:hover,
.step:focus-visible,
.step.is-active {
  transform: translateY(-5px);
  border-color: #d5dfd3;
  background: rgba(255, 255, 255, .72);
  box-shadow: 0 14px 30px rgba(57, 72, 60, .10);
  outline: none;
}

.step .number {
  transition: transform .3s cubic-bezier(.2,.8,.2,1), background .3s ease, color .3s ease;
}
.step:hover .number,
.step.is-active .number {
  transform: rotate(-6deg) scale(1.12);
  background: #39483c;
  color: #fff;
}

.purchase-benefits li {
  transition: transform .24s ease, border-color .24s ease, box-shadow .24s ease, background .24s ease;
}
.purchase-benefits li:hover {
  transform: translateY(-4px);
  border-color: #aebdaf;
  background: #fff;
  box-shadow: 0 12px 25px rgba(57, 72, 60, .09);
}

.cta,
.broker-instagram,
.whatsapp-direct {
  position: relative;
  overflow: hidden;
}
.cta::after,
.broker-instagram::after {
  content: '';
  position: absolute;
  top: -80%;
  left: -55%;
  width: 38%;
  height: 260%;
  transform: rotate(22deg);
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.32), transparent);
  transition: left .62s ease;
  pointer-events: none;
}
.cta:hover::after,
.broker-instagram:hover::after { left: 125%; }

.quiz-option {
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease, background .2s ease;
}
.quiz-option:active { transform: scale(.975); }
.quiz-option:has(input:checked) { animation: dona-choice-confirm .34s ease; }
@keyframes dona-choice-confirm {
  0% { transform: scale(.97); }
  60% { transform: scale(1.018); }
  100% { transform: scale(1); }
}

/* One continuous, breathable closing section instead of a card inside a card. */
body > .wrap:has(.broker),
.bottom-shell {
  width: min(1180px, calc(100% - 48px));
  margin-top: 34px;
  margin-bottom: 34px;
  padding: clamp(30px, 4vw, 54px) clamp(28px, 5vw, 66px) 0;
  border: 1px solid rgba(103, 122, 112, .16);
  border-radius: 30px;
  background: linear-gradient(145deg, #f4f7f1 0%, #edf3eb 100%);
  box-shadow: 0 24px 60px rgba(57, 72, 60, .08);
  overflow: hidden;
}

body > .wrap:has(.broker) .broker,
.bottom-shell .broker {
  margin: 0;
  padding: 6px 0 clamp(34px, 4vw, 48px);
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

body > .wrap:has(.broker) .fineprint,
.bottom-shell .fineprint {
  padding: 22px 0;
  border-top: 1px solid rgba(103, 122, 112, .22);
  border-bottom: 1px solid rgba(103, 122, 112, .22);
  line-height: 1.65;
}

body > .wrap:has(.broker) .site-footer,
.bottom-shell .site-footer {
  margin-top: 0;
  padding: clamp(30px, 4vw, 44px) 0 clamp(34px, 5vw, 58px);
  border-top: 0;
}

.homes,
.next-steps,
.broker,
.site-footer {
  scroll-margin-top: 24px;
}

.home-card,
.quiz-card,
.broker-photo,
.purchase-benefits {
  transition-timing-function: cubic-bezier(.2, .75, .25, 1);
}

@media (max-width: 800px) {
  .motion-ready .reveal-item { transform: translateY(16px); }
  .home-card:hover,
  .home-card:focus-within { transform: translateY(-4px); }
  .step { padding: 15px; }
  body > .wrap:has(.broker),
  .bottom-shell {
    width: calc(100% - 24px);
    margin-top: 22px;
    margin-bottom: 18px;
    padding: 25px 20px 0;
    border-radius: 25px;
  }
  body > .wrap:has(.broker) .broker,
  .bottom-shell .broker { padding-bottom: 30px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .motion-ready .reveal-item { opacity: 1; transform: none; transition: none; }
  .home-card,
  .gallery-image,
  .photo-thumb,
  .step,
  .step .number,
  .purchase-benefits li,
  .quiz-option { transition: none; animation: none; }
}
