/* Lawn and yard care master demo: component styles beyond Tailwind utilities */

:root {
  --brand-green: #166534;
  --brand-green-deep: #0A3D22;
  --brand-amber: #D97706;
  --brand-amber-deep: #B45309;
  --brand-soft: #F3F8F1;
  --brand-muted: #5F6F63;
}

html { scroll-behavior: smooth; }

/* Nav link with animated amber underline */
.nav-link {
  position: relative;
  padding: 4px 2px;
  color: rgba(255, 255, 255, 0.85);
  transition: color 0.2s ease-in-out;
}
.nav-link::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: var(--brand-amber);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1);
  border-radius: 2px;
}
.nav-link:hover { color: #FFFFFF; }
.nav-link:hover::after,
.nav-link:focus-visible::after { transform: scaleX(1); }

/* Hero slow zoom */
.hero-img { animation: hero-zoom 18s ease-out both; }
@keyframes hero-zoom { from { transform: scale(1.08); } to { transform: scale(1); } }

/* Marquee band */
.marquee { overflow: hidden; white-space: nowrap; }
.marquee-track {
  display: inline-flex;
  gap: 1.5rem;
  padding-left: 1.5rem;
  animation: marquee 38s linear infinite;
}
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.outline-text {
  color: transparent;
  -webkit-text-stroke: 1.5px rgba(255, 255, 255, 0.85);
}

/* Angled full-bleed band */
.angled { clip-path: polygon(0 6%, 100% 0, 100% 94%, 0 100%); margin: -2.5rem 0; position: relative; z-index: 1; }
.parallax-img { top: -10%; will-change: transform; }

/* Image hover zoom */
.zoom-img { transition: transform 0.8s cubic-bezier(0.22, 1, 0.36, 1); }
.zoom-img:hover { transform: scale(1.05); }

/* Review strip */
.review-strip { scrollbar-width: thin; scrollbar-color: rgba(22, 101, 52, 0.35) transparent; }
.review-quote {
  scroll-snap-align: start;
  flex: 0 0 min(85vw, 380px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1.5rem;
  border-top: 3px solid var(--brand-amber);
  padding: 1.75rem 0.25rem 0.5rem;
  margin: 0;
}
.review-quote p {
  position: relative;
  font-size: 1.125rem;
  line-height: 1.6;
  color: #1F3326;
}
.review-quote p::before {
  content: '\201C';
  display: block;
  font-size: 4rem;
  line-height: 0.6;
  font-weight: 900;
  color: var(--brand-green);
  opacity: 0.25;
  margin-bottom: 0.5rem;
}
.review-quote footer { display: flex; align-items: center; gap: 0.75rem; font-size: 0.9rem; color: var(--brand-green); }
.review-avatar {
  width: 40px;
  height: 40px;
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: #FFFFFF;
  background: var(--brand-green);
  flex-shrink: 0;
  font-size: 15px;
}
.review-avatar--amber { background: var(--brand-amber-deep); }

/* Frosted glass panels (light background recipe) */
.glass-panel {
  position: relative;
  overflow: hidden;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  background: rgba(255, 255, 255, 0.6);
  -webkit-backdrop-filter: blur(40px) saturate(1.5);
  backdrop-filter: blur(40px) saturate(1.5);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08), 0 8px 32px -4px rgba(20, 53, 36, 0.16);
}
.glass-sheen {
  pointer-events: none;
  position: absolute;
  inset: 0;
  border-radius: 20px;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0.3), transparent);
  mix-blend-mode: overlay;
}
.form-label { display: block; font-size: 0.875rem; font-weight: 600; color: var(--brand-green); }
.form-field {
  margin-top: 0.5rem;
  display: block;
  width: 100%;
  min-height: 3rem;
  border-radius: 0.5rem;
  border: 1px solid rgba(10, 61, 34, 0.15);
  background: rgba(255, 255, 255, 0.8);
  padding: 0.75rem 1rem;
  color: #10231A;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.form-field::placeholder { color: rgba(16, 35, 26, 0.4); }
.form-field:focus { border-color: var(--brand-green); box-shadow: 0 0 0 3px rgba(22, 101, 52, 0.25); }
.chip {
  border-radius: 9999px;
  background: rgba(22, 101, 52, 0.1);
  padding: 0.25rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--brand-green);
}

/* Mobile call bar: safe-area padding */
.call-bar { padding-bottom: calc(0.75rem + env(safe-area-inset-bottom)); min-height: 3.5rem; }

/* Before/After slider */
.ba-slider {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #e5e7eb;
  user-select: none;
  touch-action: pan-y;
  cursor: ew-resize;
}
.ba-slider img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
  display: block;
}
.ba-after-wrap {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  clip-path: inset(0 50% 0 0);
  will-change: clip-path;
}
.ba-handle {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 3px;
  background: #FFFFFF;
  transform: translateX(-50%);
  box-shadow: 0 0 0 1px rgba(22, 101, 52, 0.25), 0 2px 8px rgba(0,0,0,0.25);
  pointer-events: none;
}
.ba-handle::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 44px;
  height: 44px;
  border-radius: 9999px;
  background: #FFFFFF;
  transform: translate(-50%, -50%);
  box-shadow: 0 2px 8px rgba(0,0,0,0.25), 0 0 0 2px var(--brand-amber);
  background-image:
    linear-gradient(45deg, transparent 45%, var(--brand-amber) 45%, var(--brand-amber) 55%, transparent 55%),
    linear-gradient(-45deg, transparent 45%, var(--brand-amber) 45%, var(--brand-amber) 55%, transparent 55%);
  background-size: 12px 12px;
  background-repeat: no-repeat;
  background-position: 10px center, 22px center;
}
.ba-label {
  position: absolute;
  top: 12px;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: 6px;
  color: #FFFFFF;
  z-index: 2;
}
.ba-label--before { left: 12px; background: rgba(10, 61, 34, 0.85); }
.ba-label--after  { right: 12px; background: rgba(180, 83, 9, 0.92); }
@media (max-width: 480px) {
  .ba-handle::after { width: 36px; height: 36px; }
}

/* Scroll reveal */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease-out, transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
  transition-delay: var(--reveal-delay, 0ms);
}
.reveal.is-visible { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-img, .marquee-track { animation: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .zoom-img, .zoom-img:hover { transition: none; transform: none; }
  .parallax-img { transform: none !important; }
}
