/* Dream Greener – premium polish (load LAST, after styles.css and mobile.css)
   Subtle motion + finishing touches. Everything respects "reduce motion". */

:root {
  --gold: #c9a86a;
  --gold-soft: rgba(201, 168, 106, .35);
  --star: #e8b53c;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

/* ---------- Headline line control ---------- */
.h1-lines, .h2-lines { max-width: none !important; }
.h1-lines span, .h2-lines span { display: block; }
@media (min-width: 900px) {
  .h1-lines span, .h2-lines span { white-space: nowrap; }
}
.section-head--wide { max-width: none; }
.section-head--wide .lead { max-width: 62ch; }

/* ---------- Eyebrow with a fine gold rule ---------- */
.eyebrow { display: inline-flex; align-items: center; gap: 12px; }
.eyebrow::before { content: ""; width: 28px; height: 1px; background: var(--gold); flex-shrink: 0; }

/* ---------- Header: soft shadow once you scroll ---------- */
.site-header { transition: box-shadow .3s ease, background .3s ease; }
.site-header.is-scrolled { box-shadow: 0 8px 28px rgba(16, 41, 26, .10); }

/* ---------- Hero: slow cinematic zoom + staggered entrance ---------- */
@keyframes fx-zoom { from { transform: scale(1.1); } to { transform: scale(1); } }
@keyframes fx-rise { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }
.hero__bg { animation: fx-zoom 14s var(--ease) both; transform-origin: 60% 50%; }
.hero .container > * { animation: fx-rise .9s var(--ease) both; }
.hero .container > *:nth-child(1) { animation-delay: .10s; }
.hero .container > *:nth-child(2) { animation-delay: .22s; }
.hero .container > *:nth-child(3) { animation-delay: .34s; }
.hero .container > *:nth-child(4) { animation-delay: .46s; }
.hero .container > *:nth-child(5) { animation-delay: .58s; }
.hero .container > *:nth-child(6) { animation-delay: .70s; }

.hero__badge {
  display: inline-flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 7px 14px 7px 10px; margin-bottom: 18px; border-radius: 999px;
  background: rgba(255, 255, 255, .10); border: 1px solid rgba(255, 255, 255, .22);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  color: #fff; font-size: .9rem; font-weight: 600; text-decoration: none;
  transition: background .25s ease, border-color .25s ease;
}
.hero__badge:hover { background: rgba(255, 255, 255, .18); border-color: var(--gold); color: #fff; }
.hero__badge u { text-underline-offset: 3px; text-decoration-color: var(--gold); }
.hero__stars { display: inline-flex; gap: 2px; }
.hero__stars svg, .review__stars svg { width: 15px; height: 15px; fill: var(--star); }

/* ---------- Buttons: light sheen sweep on hover ---------- */
.btn--primary { position: relative; overflow: hidden; isolation: isolate; box-shadow: 0 6px 18px rgba(140, 198, 63, .28); }
.btn--primary::after {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, .55) 50%, transparent 70%);
  transform: translateX(-120%); transition: transform .8s var(--ease);
}
.btn--primary:hover::after { transform: translateX(120%); }
.btn { transition: background .25s, color .25s, border-color .25s, transform .25s var(--ease), box-shadow .25s; }
.btn:hover { transform: translateY(-2px); }

/* ---------- Cards: gentle lift + photo zoom ---------- */
.service-card { transition: transform .35s var(--ease), box-shadow .35s var(--ease), border-color .35s; }
.service-card:hover { transform: translateY(-6px); box-shadow: 0 18px 40px rgba(16, 41, 26, .14); border-color: var(--gold-soft); }
.service-card__img img { transition: transform .9s var(--ease); }
.service-card:hover .service-card__img img { transform: scale(1.06); }
.text-link span { transition: transform .25s var(--ease); }
.text-link:hover span { transform: translateX(4px); }

.feature { position: relative; transition: transform .35s var(--ease), box-shadow .35s var(--ease), border-color .35s; }
.feature::after { content: ""; position: absolute; left: 26px; right: 26px; top: 0; height: 2px; background: linear-gradient(90deg, var(--gold), transparent); opacity: 0; transition: opacity .35s; }
.feature:hover { transform: translateY(-4px); box-shadow: 0 14px 32px rgba(16, 41, 26, .10); border-color: var(--gold-soft); }
.feature:hover::after { opacity: 1; }
.feature__icon { transition: background .3s, color .3s, transform .4s var(--ease); }
.feature:hover .feature__icon { background: var(--forest); color: var(--grass); transform: rotate(-6deg) scale(1.06); }

.path-card { transition: transform .35s var(--ease), box-shadow .35s var(--ease); }
.path-card:hover { transform: translateY(-4px); box-shadow: 0 18px 40px rgba(0, 0, 0, .25); }

/* ---------- Scroll reveal (classes added by effects.js) ---------- */
.fx .reveal { opacity: 0; transform: translateY(26px); transition: opacity .8s var(--ease), transform .8s var(--ease); transition-delay: var(--d, 0s); }
.fx .reveal.is-in { opacity: 1; transform: none; }
/* cards keep their hover transition once revealed */
.fx .service-card.reveal.is-in, .fx .feature.reveal.is-in, .fx .path-card.reveal.is-in { transition: opacity .8s var(--ease), transform .35s var(--ease), box-shadow .35s var(--ease), border-color .35s; transition-delay: var(--d, 0s), 0s, 0s, 0s; }

/* ---------- Reviews carousel (all screen sizes) ---------- */
.section--reviews { background: linear-gradient(180deg, var(--cream) 0%, #eef3e6 100%); }
.reviews-carousel {
  display: flex; gap: 20px; overflow-x: auto; overflow-y: hidden;
  scroll-snap-type: x mandatory; scroll-behavior: smooth; scrollbar-width: none;
  padding: 8px 2px 14px; overscroll-behavior-x: contain;
}
.reviews-carousel::-webkit-scrollbar { display: none; }
.reviews-carousel > .review {
  flex: 0 0 calc((100% - 40px) / 3); max-width: none; scroll-snap-align: start;
  position: relative; margin: 0; padding: 28px 26px 24px; gap: 14px;
  border: 1px solid var(--line); border-radius: 18px; background: #fff;
  box-shadow: 0 10px 26px rgba(16, 41, 26, .07);
  transition: transform .35s var(--ease), box-shadow .35s var(--ease), border-color .35s;
}
.reviews-carousel > .review:hover { transform: translateY(-4px); box-shadow: 0 18px 38px rgba(16, 41, 26, .12); border-color: var(--gold-soft); }
.reviews-carousel > .review::before {
  content: "\201C"; position: absolute; top: 6px; right: 20px;
  font-family: Georgia, serif; font-size: 5rem; line-height: 1; color: #e7efdd; pointer-events: none;
}
.review__stars { display: flex; gap: 3px; }
.reviews-carousel .review blockquote { margin: 0; flex: 1; font-size: .98rem; line-height: 1.65; }
.reviews-carousel .review blockquote p { margin: 0; }
.review__who { display: flex; flex-direction: column; line-height: 1.25; }
.review__who small { display: inline-flex; align-items: center; gap: 5px; margin-top: 3px; font-size: .78rem; font-weight: 500; color: var(--muted); }
.review__who small svg { width: 13px; height: 13px; }
@media (max-width: 1000px) { .reviews-carousel > .review { flex-basis: calc((100% - 20px) / 2); } }
.reviews-actions { margin-top: 26px; }

/* Arrows + dots that are always visible on the reviews carousel */
.swipe-wrap--always { position: relative; }
.swipe-wrap--always .swipe-arrow {
  display: flex; align-items: center; justify-content: center;
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 3;
  width: 46px; height: 46px; padding: 0; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--gold-soft); background: #fff; color: var(--forest);
  box-shadow: 0 8px 22px rgba(16, 41, 26, .16);
  transition: background .25s, color .25s, opacity .25s, transform .25s var(--ease);
}
.swipe-wrap--always .swipe-arrow:hover { background: var(--forest); color: var(--grass); transform: translateY(-50%) scale(1.06); }
.swipe-wrap--always .swipe-arrow--prev { left: -16px; }
.swipe-wrap--always .swipe-arrow--next { right: -16px; }
.swipe-wrap--always .swipe-arrow--next svg { transform: rotate(180deg); }
.swipe-wrap--always .swipe-arrow[hidden] { display: none; }
.swipe-wrap--always .swipe-arrow:disabled { opacity: 0; pointer-events: none; }
.swipe-wrap--always + .swipe-dots { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; margin: 12px 0 0; }
.swipe-wrap--always + .swipe-dots button {
  position: relative; width: 8px; height: 8px; padding: 0; border: 0; border-radius: 999px;
  background: var(--forest); opacity: .2; cursor: pointer; transition: width .25s ease, opacity .25s ease;
}
.swipe-wrap--always + .swipe-dots button::after { content: ""; position: absolute; inset: -8px -5px; }
.swipe-wrap--always + .swipe-dots button[aria-current="true"] { width: 24px; opacity: .85; background: var(--leaf); }
.swipe-wrap--always + .swipe-dots[hidden] { display: none; }

/* ---------- Phones: tighter spacing = less scrolling ---------- */
@media (max-width: 640px) {
  .section { padding: 44px 0; }
  .section-head { margin-bottom: 22px; }
  .lead { font-size: 1rem; }
  .hide-sm { display: none; }
  h2 { font-size: 1.6rem; }
  .hero .container { padding-top: 44px; padding-bottom: 40px; }
  .hero--page .container { padding-top: 38px; padding-bottom: 34px; }
  .hero h1 { font-size: 2rem; }
  .hero p { font-size: 1rem; }
  .hero .btn-row { margin-top: 18px; }
  .hero__badge { font-size: .8rem; margin-bottom: 14px; }
  .eyebrow { margin-bottom: 10px; }
  .cta-band { padding: 24px 20px; gap: 16px; }
  .site-footer { padding: 40px 0 22px; }
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
  .footer-brand { grid-column: 1 / -1; }
  .footer-bottom { margin-top: 26px; }
  .split { gap: 22px; }

  .reviews-carousel > .review { flex-basis: 86%; padding: 22px 20px 20px; }
  .reviews-carousel .review blockquote { font-size: .95rem; }
  .swipe-wrap--always .swipe-arrow { width: 38px; height: 38px; }
  .swipe-wrap--always .swipe-arrow--prev { left: -6px; }
  .swipe-wrap--always .swipe-arrow--next { right: -6px; }
  .reviews-actions { margin-top: 18px; }
}

/* ---------- Respect "reduce motion" ---------- */
@media (prefers-reduced-motion: reduce) {
  .hero__bg, .hero .container > * { animation: none !important; }
  .fx .reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
  .btn--primary::after { display: none; }
  .reviews-carousel { scroll-behavior: auto; }
}

/* ---------- Tidy fixes ---------- */
.hero__badge { display: flex; width: fit-content; }
/* Long reviews are trimmed to a few lines with a "Read more" link (added by effects.js) */
.reviews-carousel .review blockquote p {
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 7; line-clamp: 7; overflow: hidden;
}
.reviews-carousel .review.is-open blockquote p { -webkit-line-clamp: unset; line-clamp: unset; display: block; }
.review__more {
  align-self: flex-start; margin-top: -4px; padding: 0; border: 0; background: none; cursor: pointer;
  font: inherit; font-size: .88rem; font-weight: 700; color: var(--leaf);
  text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--gold);
}
.review__more:hover { color: var(--forest); }
@media (max-width: 640px) {
  .hero .eyebrow, .hero__call { display: none; }   /* the floating bar already has Call */
  .reviews-carousel .review blockquote p { -webkit-line-clamp: 6; line-clamp: 6; }
}
@media (max-width: 640px) {
  .reviews-actions { flex-wrap: nowrap; gap: 8px; }
  .reviews-actions .btn { width: auto; flex: 1 1 0; min-height: 46px; padding: 10px 8px; font-size: .86rem; }
}
