/* Root & Leaf — motion & scroll reveals */

/* —— Reveal variants —— */
.reveal,
.fade-in {
  opacity: 0;
  transform: translateY(32px);
  transition:
    opacity 0.85s var(--ease-out),
    transform 0.85s var(--ease-out),
    filter 0.85s var(--ease-out);
  will-change: opacity, transform;
}

.reveal-left { transform: translate(-36px, 20px); }
.reveal-right { transform: translate(36px, 20px); }
.reveal-scale { transform: translateY(28px) scale(0.92); }
.reveal-blur { transform: translateY(24px); filter: blur(10px); }
.reveal-fade { transform: translateY(16px); }
.reveal-flip {
  opacity: 0;
  transform: perspective(800px) rotateX(10deg) translateY(28px);
  transform-origin: center bottom;
}

.reveal.is-visible,
.fade-in.is-visible,
.reveal-left.is-visible,
.reveal-right.is-visible,
.reveal-scale.is-visible,
.reveal-blur.is-visible,
.reveal-fade.is-visible,
.reveal-flip.is-visible {
  opacity: 1;
  transform: translate(0) scale(1);
  filter: blur(0);
}

.reveal-stagger.is-visible {
  transition-delay: calc(var(--reveal-delay, 0ms));
}

/* —— Sections —— */
.section--scroll {
  position: relative;
  isolation: isolate;
}

.section--scroll.is-inview {
  animation: sectionGlow 1.2s var(--ease-out) forwards;
}

@keyframes sectionGlow {
  from { background: transparent; }
  to { background: transparent; }
}

.section--scroll::after {
  content: "";
  position: absolute;
  top: 8%;
  right: 4%;
  width: clamp(60px, 12vw, 100px);
  height: clamp(60px, 12vw, 100px);
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 40'%3E%3Cpath d='M16 4C10 14 8 24 16 36C24 24 22 14 16 4Z' fill='%238fd4b0' fill-opacity='0.12'/%3E%3C/svg%3E") center/contain no-repeat;
  opacity: 0;
  transform: rotate(-12deg) scale(0.85);
  transition: opacity 1s var(--ease-out), transform 1.1s var(--ease-out);
  pointer-events: none;
  z-index: 0;
}

.section--scroll.is-inview::after {
  opacity: 1;
  transform: rotate(4deg) scale(1);
}

.section-divider {
  height: 1px;
  max-width: min(var(--max-width), calc(100% - 2rem));
  margin: 0 auto 2.25rem;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(143, 212, 176, 0.15) 20%,
    var(--accent) 50%,
    rgba(143, 212, 176, 0.15) 80%,
    transparent 100%
  );
  opacity: 0;
  transform: scaleX(0.25);
  transition: opacity 0.9s var(--ease-out), transform 1.1s var(--ease-out);
}

.section-divider.is-visible {
  opacity: 0.45;
  transform: scaleX(1);
}

.section-eyebrow {
  position: relative;
  display: inline-block;
}

.section-eyebrow::before {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), transparent);
  transition: width 0.8s var(--ease-out);
}

.section-eyebrow.is-visible::before,
.section--scroll.is-inview .section-eyebrow::before {
  width: 100%;
}

/* —— Cards & glass —— */
.glass-card,
.usp-card,
.journal-card,
.review-card,
.stat-card,
.team-card,
.pot-card__saucer,
.filters-panel,
.cta-block,
.newsletter-strip,
.promo-banner {
  transition:
    transform 0.5s var(--ease-out),
    box-shadow 0.5s var(--ease-out),
    border-color 0.4s ease;
}

.usp-card:hover,
.journal-card:hover,
.review-card:hover,
.stat-card:hover,
.team-card:hover,
.filters-panel:hover {
  transform: translateY(-6px);
  border-color: rgba(143, 212, 176, 0.32);
  box-shadow: var(--shadow-glow), var(--shadow-card);
}

.zoom-media {
  overflow: hidden;
  border-radius: inherit;
}

.zoom-media img {
  transition: transform 0.7s var(--ease-out);
}

.zoom-media:hover img {
  transform: scale(1.08);
}

/* —— Hero micro-motion —— */
.hero-badge {
  animation: badgeFloat 5s ease-in-out infinite;
}

@keyframes badgeFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

.hero-stat {
  transition: transform 0.4s var(--ease-out);
}

.hero-stat:hover {
  transform: translateY(-3px);
}

.hero-stat__value {
  transition: color 0.35s;
}

.hero-stat:hover .hero-stat__value {
  color: var(--accent);
}

/* —— Buttons & links —— */
.btn {
  transition:
    transform 0.4s var(--ease-out),
    box-shadow 0.4s var(--ease-out),
    background 0.35s,
    border-color 0.35s,
    color 0.35s;
}

.btn-primary:hover {
  box-shadow: 0 0 32px rgba(143, 212, 176, 0.35);
}

.btn-secondary:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.nav-desktop a,
.section-header > a,
.footer-nav a {
  position: relative;
}

.nav-desktop a::after,
.section-header > a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -3px;
  width: 100%;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s var(--ease-out);
}

.nav-desktop a:hover::after,
.nav-desktop a.is-active::after,
.section-header > a:hover::after {
  transform: scaleX(1);
}

.chip {
  transition: transform 0.3s var(--ease-out), background 0.3s, border-color 0.3s, color 0.3s;
}

.chip:hover {
  transform: translateY(-2px);
}

.pot-card.tilt-card:hover {
  transform: perspective(900px) rotateX(var(--tilt-y, 0deg)) rotateY(var(--tilt-x, 0deg)) translateY(-8px);
}

.chip.is-active {
  animation: chipPulse 2.5s ease-in-out infinite;
}

@keyframes chipPulse {
  0%, 100% { box-shadow: 0 0 0 rgba(143, 212, 176, 0); }
  50% { box-shadow: 0 0 16px rgba(143, 212, 176, 0.2); }
}

/* —— Marquee polish —— */
.marquee {
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}

/* —— Ambient extras —— */
.ambient-vine {
  position: absolute;
  width: 120px;
  height: 200px;
  opacity: 0.06;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 120'%3E%3Cpath d='M20 0 Q8 40 20 80 Q32 40 20 0' fill='none' stroke='%238fd4b0' stroke-width='2'/%3E%3Cpath d='M20 30 Q5 50 12 70' fill='none' stroke='%238fd4b0' stroke-width='1.5'/%3E%3C/svg%3E") center/contain no-repeat;
  animation: vineSway 12s ease-in-out infinite;
  pointer-events: none;
}

.ambient-vine--1 { left: 2%; top: 20%; animation-delay: 0s; }
.ambient-vine--2 { right: 3%; bottom: 15%; animation-delay: -4s; transform: scaleX(-1); }

@keyframes vineSway {
  0%, 100% { transform: rotate(-3deg) translateY(0); }
  50% { transform: rotate(3deg) translateY(8px); }
}

.ambient-orb--3 {
  width: 30vw;
  height: 30vw;
  top: 40%;
  left: 30%;
  background: radial-gradient(circle, rgba(212, 184, 150, 0.08), transparent 70%);
  animation-delay: -10s;
}

/* —— Footer —— */
.site-footer .footer-col.is-visible {
  animation: footerUp 0.7s var(--ease-out) backwards;
}

@keyframes footerUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

/* —— Icon buttons —— */
.icon-btn {
  transition: transform 0.35s var(--ease-out), background 0.35s, border-color 0.35s, color 0.35s;
}

.icon-btn:hover {
  transform: scale(1.08);
  border-color: rgba(143, 212, 176, 0.45);
}

@media (prefers-reduced-motion: reduce) {
  .reveal, .fade-in, .reveal-left, .reveal-right, .reveal-scale, .reveal-blur, .reveal-fade {
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
    transition: none !important;
  }

  .hero-badge,
  .chip.is-active,
  .ambient-vine,
  .section--scroll::after {
    animation: none !important;
  }

  .section-divider {
    opacity: 0.35;
    transform: scaleX(1);
  }
}
