/* ==========================================================================
   Brew Touch — Bi-Directional Scroll Replay, Floating Motion & Gold Glow
   ========================================================================== */

/* --------------------------------------------------------------------------
   0. Design Tokens & Reusable CSS Variables
   -------------------------------------------------------------------------- */
:root {
  --bt-gold: #C9A15A;
  --bt-gold-rgb: 201, 161, 90;
  --bt-gold-light: #DAB36E;
  --bt-dark-bg: #1C1712;
  --bt-dark-roast: #2D251E;
  --bt-light-bg: #F7F3EC;
  --bt-card-bg: #FFFFFF;
  --bt-card-border: #E8DFD1;

  /* Standardized Soft Gold Glow System */
  --bt-glow-sm: 0 0 12px rgba(var(--bt-gold-rgb), 0.35);
  --bt-glow: 0 0 20px rgba(var(--bt-gold-rgb), 0.45);
  --bt-glow-lg: 0 0 30px rgba(var(--bt-gold-rgb), 0.55);
  --bt-shadow-lift: 0 18px 40px rgba(28, 23, 18, 0.09);

  /* Physics & Smooth Easing Curves */
  --bt-ease-smooth: cubic-bezier(0.22, 1, 0.36, 1);
  --bt-ease-float: cubic-bezier(0.16, 1, 0.3, 1);
  --bt-ease-in-out: cubic-bezier(0.25, 1, 0.5, 1);
  --bt-ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* --------------------------------------------------------------------------
   1. VISIBILITY SAFETY FIRST — Universal Guarantee
   All elements are 100% visible by default under all circumstances.
   -------------------------------------------------------------------------- */
.elementor-invisible {
  visibility: visible !important;
  opacity: 1 !important;
}

.bt-float-up,
.bt-animate-up,
.bt-float-left,
.bt-animate-left,
.bt-float-right,
.bt-animate-right,
.bt-float-zoom,
.bt-animate-zoom,
.bt-animate-fade {
  opacity: 1;
  visibility: visible;
  transform: translate3d(0, 0, 0) scale(1);
  will-change: opacity, transform;
}

/* --------------------------------------------------------------------------
   2. BI-DIRECTIONAL SCROLL-REPLAY FLOATING ANIMATIONS
   Resets smoothly when off-screen, replays with full stagger when entering viewport.
   -------------------------------------------------------------------------- */

/* Off-Screen / Pre-Animation State (Ready to Replay) */
.bt-js-ready .bt-float-up:not(.bt-in-view),
.bt-js-ready .bt-animate-up:not(.bt-in-view) {
  opacity: 0.001;
  transform: translate3d(0, 42px, 0);
  transition: opacity 0.35s ease, transform 0.35s ease;
  transition-delay: 0s !important;
}

.bt-js-ready .bt-float-left:not(.bt-in-view),
.bt-js-ready .bt-animate-left:not(.bt-in-view) {
  opacity: 0.001;
  transform: translate3d(-45px, 15px, 0);
  transition: opacity 0.35s ease, transform 0.35s ease;
  transition-delay: 0s !important;
}

.bt-js-ready .bt-float-right:not(.bt-in-view),
.bt-js-ready .bt-animate-right:not(.bt-in-view) {
  opacity: 0.001;
  transform: translate3d(45px, 15px, 0);
  transition: opacity 0.35s ease, transform 0.35s ease;
  transition-delay: 0s !important;
}

.bt-js-ready .bt-float-zoom:not(.bt-in-view),
.bt-js-ready .bt-animate-zoom:not(.bt-in-view) {
  opacity: 0.001;
  transform: translate3d(0, 58px, 0) scale(0.92);
  transition: opacity 0.35s ease, transform 0.35s ease;
  transition-delay: 0s !important;
}

.bt-js-ready .bt-trust-card:not(.bt-in-view) {
  opacity: 0.001;
  transform: translate3d(0, 46px, 0);
  transition: opacity 0.35s ease, transform 0.35s ease;
  transition-delay: 0s !important;
}

.bt-js-ready .bt-dark-banner:not(.bt-in-view) {
  opacity: 0.001;
  transform: translate3d(0, 42px, 0);
  transition: opacity 0.35s ease, transform 0.35s ease;
  transition-delay: 0s !important;
}

.bt-js-ready .bt-animate-fade:not(.bt-in-view) {
  opacity: 0.001;
  transform: translate3d(0, 18px, 0);
  transition: opacity 0.35s ease, transform 0.35s ease;
  transition-delay: 0s !important;
}

/* In-View Entrance State (Triggers every time element enters from Top or Bottom) */
.bt-js-ready .bt-in-view {
  opacity: 1 !important;
  visibility: visible !important;
  transform: translate3d(0, 0, 0) scale(1) !important;
  transition: opacity 0.85s var(--bt-ease-float),
              transform 0.85s var(--bt-ease-float) !important;
}

/* Stagger Delays when entering view */
.bt-js-ready .bt-in-view.bt-delay-1 { transition-delay: 80ms !important; }
.bt-js-ready .bt-in-view.bt-delay-2 { transition-delay: 200ms !important; }
.bt-js-ready .bt-in-view.bt-delay-3 { transition-delay: 340ms !important; }
.bt-js-ready .bt-in-view.bt-delay-4 { transition-delay: 480ms !important; }
.bt-js-ready .bt-in-view.bt-delay-5 { transition-delay: 620ms !important; }
.bt-js-ready .bt-in-view.bt-delay-6 { transition-delay: 760ms !important; }

/* --------------------------------------------------------------------------
   3. CONTINUOUS AMBIENT MOTION (Energy & Breathing Life)
   -------------------------------------------------------------------------- */

/* A. Product Photography Micro-Float / Breathing Loop */
@keyframes btPhotoBreathe {
  0%, 100% {
    transform: translateY(0px) scale(1);
  }
  50% {
    transform: translateY(-6px) scale(1.012);
  }
}

.bt-photo-breathe img {
  animation: btPhotoBreathe 5.5s ease-in-out infinite;
  will-change: transform;
}

/* B. Icon Circles Idle Gold Glow Pulse (Subtle breathing aura) */
@keyframes btIconIdlePulse {
  0%, 100% {
    filter: drop-shadow(0 0 1px rgba(var(--bt-gold-rgb), 0.15));
  }
  50% {
    filter: drop-shadow(0 0 9px rgba(var(--bt-gold-rgb), 0.45));
  }
}

.bt-icon-pulse img {
  animation: btIconIdlePulse 4s ease-in-out infinite;
  will-change: filter;
}

/* Stagger idle pulse cycles across icon sets */
.bt-step-item:nth-child(3) .bt-icon-pulse img,
.bt-pillar-item:nth-child(3) .bt-icon-pulse img {
  animation-delay: 1.3s;
}

.bt-step-item:nth-child(5) .bt-icon-pulse img,
.bt-pillar-item:nth-child(5) .bt-icon-pulse img {
  animation-delay: 2.6s;
}

/* C. Floating Top-Down Cup */
@keyframes floatCup {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  50% { transform: translateY(-7px) rotate(1.2deg); }
}

.bt-img-float {
  transition: transform 0.8s var(--bt-ease-smooth) !important;
  will-change: transform;
}

.bt-img-float img {
  animation: floatCup 5s ease-in-out infinite !important;
  transition: filter 0.8s var(--bt-ease-smooth),
              transform 0.8s var(--bt-ease-smooth) !important;
  will-change: transform, filter;
}

.bt-img-float:hover {
  transform: scale(1.08) !important;
}

.bt-img-float:hover img {
  filter: drop-shadow(0 0 20px rgba(var(--bt-gold-rgb), 0.7)) !important;
}

/* D. Dotted Line Connector Gentle Pulse */
@keyframes pulseConnector {
  0%, 100% { opacity: 0.35; transform: scaleX(1); }
  50% { opacity: 0.95; transform: scaleX(1.08); filter: drop-shadow(0 0 5px rgba(var(--bt-gold-rgb), 0.6)); }
}

.bt-dotted-connector {
  animation: pulseConnector 3.5s ease-in-out infinite !important;
}

/* --------------------------------------------------------------------------
   4. SILKY-SMOOTH PICTURE HOVER EFFECTS
   -------------------------------------------------------------------------- */

.bt-img-zoom {
  overflow: hidden !important;
  border-radius: 16px !important;
  border: 1px solid transparent;
  transition: transform 0.85s var(--bt-ease-smooth),
              box-shadow 0.85s var(--bt-ease-smooth),
              border-color 0.85s var(--bt-ease-smooth) !important;
  will-change: transform, box-shadow;
  transform: translate3d(0, 0, 0);
}

.bt-img-zoom img {
  display: block !important;
  width: 100% !important;
  height: auto !important;
  transition: transform 0.9s var(--bt-ease-smooth),
              filter 0.9s var(--bt-ease-smooth) !important;
  will-change: transform, filter;
  transform-origin: center center;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.bt-img-zoom:hover {
  transform: translateY(-5px) !important;
  box-shadow: 0 22px 50px rgba(28, 23, 18, 0.16), var(--bt-glow-lg) !important;
  border-color: rgba(var(--bt-gold-rgb), 0.45) !important;
}

.bt-img-zoom:hover img {
  animation: none !important;
  transform: scale(1.045) !important;
  filter: contrast(1.02) saturate(1.04) !important;
}

/* --------------------------------------------------------------------------
   5. Circular Icons — Buttery Smooth Hover & Glow
   -------------------------------------------------------------------------- */
.bt-feature-badge,
.bt-step-item,
.bt-story-step,
.bt-pillar-item {
  transition: transform 0.5s var(--bt-ease-smooth) !important;
  cursor: default;
}

.bt-feature-badge img,
.bt-step-item img,
.bt-story-step img,
.bt-pillar-item img {
  transition: transform 0.55s var(--bt-ease-spring),
              filter 0.55s var(--bt-ease-smooth) !important;
  will-change: transform, filter;
  border-radius: 50%;
}

.bt-feature-badge:hover img,
.bt-step-item:hover img,
.bt-story-step:hover img,
.bt-pillar-item:hover img {
  animation: none !important;
  transform: scale(1.12) rotate(2deg) !important;
  filter: drop-shadow(0 0 15px rgba(var(--bt-gold-rgb), 0.7)) !important;
}

/* --------------------------------------------------------------------------
   6. Trust / Certification Cards — Silky Elevate & Icon Lift
   -------------------------------------------------------------------------- */
.bt-trust-card {
  transition: transform 0.5s var(--bt-ease-smooth),
              box-shadow 0.5s var(--bt-ease-smooth),
              border-color 0.5s var(--bt-ease-smooth) !important;
  will-change: transform, box-shadow, border-color;
  cursor: default;
}

.bt-trust-card:hover {
  transform: translateY(-7px) !important;
  box-shadow: var(--bt-shadow-lift), var(--bt-glow) !important;
  border-color: var(--bt-gold) !important;
}

.bt-trust-card img {
  transition: transform 0.6s var(--bt-ease-spring),
              filter 0.6s var(--bt-ease-smooth) !important;
  will-change: transform, filter;
}

.bt-trust-card:hover img {
  transform: scale(1.12) translateY(-2px) !important;
  filter: drop-shadow(0 0 12px rgba(var(--bt-gold-rgb), 0.55)) !important;
}

/* --------------------------------------------------------------------------
   7. Logo Micro-Interaction + Gold Glow
   -------------------------------------------------------------------------- */
.bt-logo {
  cursor: pointer;
}

.bt-logo img {
  transition: transform 0.5s var(--bt-ease-spring),
              filter 0.5s var(--bt-ease-smooth) !important;
  will-change: transform, filter;
}

.bt-logo:hover img {
  transform: scale(1.08) rotate(-2deg) !important;
  filter: drop-shadow(0 0 12px rgba(var(--bt-gold-rgb), 0.6)) !important;
}

/* --------------------------------------------------------------------------
   8. Header Sticky & Dynamic Shrink Effect
   -------------------------------------------------------------------------- */
.bt-header {
  position: sticky !important;
  top: 0 !important;
  z-index: 9999 !important;
  transition: padding 0.35s var(--bt-ease-float),
              box-shadow 0.35s var(--bt-ease-float),
              background-color 0.35s ease !important;
  backdrop-filter: blur(14px) !important;
  -webkit-backdrop-filter: blur(14px) !important;
}

.bt-header.scrolled {
  padding-top: 14px !important;
  padding-bottom: 14px !important;
  box-shadow: 0 6px 25px rgba(28, 23, 18, 0.07), var(--bt-glow-sm) !important;
  background-color: rgba(247, 243, 236, 0.95) !important;
}

/* --------------------------------------------------------------------------
   9. Navigation Links — Animated Underline + Soft Glow
   -------------------------------------------------------------------------- */
.bt-nav-link a,
.bt-nav-link .elementor-heading-title {
  position: relative !important;
  display: inline-block !important;
  transition: color 0.25s var(--bt-ease-in-out),
              text-shadow 0.25s ease !important;
  cursor: pointer;
}

.bt-nav-link a::after,
.bt-nav-link .elementor-heading-title::after {
  content: '' !important;
  position: absolute !important;
  width: 0 !important;
  height: 1.5px !important;
  bottom: -3px !important;
  left: 50% !important;
  background-color: var(--bt-gold) !important;
  box-shadow: var(--bt-glow-sm) !important;
  transition: width 0.3s var(--bt-ease-in-out),
              left 0.3s var(--bt-ease-in-out) !important;
  border-radius: 1px !important;
}

.bt-nav-link:hover a,
.bt-nav-link:hover .elementor-heading-title {
  color: var(--bt-gold) !important;
  text-shadow: 0 0 12px rgba(var(--bt-gold-rgb), 0.4) !important;
}

.bt-nav-link:hover a::after,
.bt-nav-link:hover .elementor-heading-title::after {
  width: 100% !important;
  left: 0 !important;
}

/* --------------------------------------------------------------------------
   10. Buttons — Tactile Feedback + Soft Gold Glow Bloom
   -------------------------------------------------------------------------- */
.bt-btn-dark a.elementor-button,
.bt-btn-dark .elementor-button,
.bt-btn-outline a.elementor-button,
.bt-btn-outline .elementor-button,
.bt-btn-gold-pill a.elementor-button,
.bt-btn-gold-pill .elementor-button,
.bt-btn-light a.elementor-button,
.bt-btn-light .elementor-button {
  transition: transform 0.25s var(--bt-ease-in-out),
              box-shadow 0.25s var(--bt-ease-in-out),
              background-color 0.25s ease,
              border-color 0.25s ease,
              color 0.25s ease !important;
  will-change: transform, box-shadow;
  position: relative !important;
}

/* Dark Button Hover */
.bt-btn-dark:hover a.elementor-button,
.bt-btn-dark:hover .elementor-button {
  transform: translateY(-2px) scale(1.02) !important;
  background-color: var(--bt-dark-roast) !important;
  box-shadow: 0 8px 24px rgba(28, 23, 18, 0.2), var(--bt-glow) !important;
}

.bt-btn-dark:active a.elementor-button,
.bt-btn-dark:active .elementor-button {
  transform: translateY(0) scale(0.98) !important;
}

/* Outlined Button Hover */
.bt-btn-outline:hover a.elementor-button,
.bt-btn-outline:hover .elementor-button {
  transform: translateY(-2px) scale(1.02) !important;
  background-color: var(--bt-dark-bg) !important;
  border-color: var(--bt-gold) !important;
  color: #FFFFFF !important;
  box-shadow: 0 8px 24px rgba(28, 23, 18, 0.15), var(--bt-glow) !important;
}

.bt-btn-outline:active a.elementor-button,
.bt-btn-outline:active .elementor-button {
  transform: translateY(0) scale(0.98) !important;
}

/* Gold Pill Button Hover */
.bt-btn-gold-pill a.elementor-button .elementor-button-text,
.bt-btn-gold-pill .elementor-button {
  transition: letter-spacing 0.25s ease !important;
}

.bt-btn-gold-pill:hover a.elementor-button,
.bt-btn-gold-pill:hover .elementor-button {
  transform: translateY(-2px) scale(1.02) !important;
  background-color: var(--bt-gold-light) !important;
  box-shadow: 0 8px 25px rgba(28, 23, 18, 0.15), var(--bt-glow-lg) !important;
}

.bt-btn-gold-pill:active a.elementor-button,
.bt-btn-gold-pill:active .elementor-button {
  transform: translateY(0) scale(0.98) !important;
}

/* Light Button Hover */
.bt-btn-light:hover a.elementor-button,
.bt-btn-light:hover .elementor-button {
  transform: translateY(-2px) scale(1.02) !important;
  background-color: #FFFFFF !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18), var(--bt-glow) !important;
}

.bt-btn-light:active a.elementor-button,
.bt-btn-light:active .elementor-button {
  transform: translateY(0) scale(0.98) !important;
}

/* --------------------------------------------------------------------------
   11. Dark Banners Depth
   -------------------------------------------------------------------------- */
.bt-dark-banner {
  box-shadow: 0 20px 50px rgba(28, 23, 18, 0.22) !important;
}

/* --------------------------------------------------------------------------
   12. Accessibility — Respect Reduced Motion
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .bt-photo-breathe img,
  .bt-icon-pulse img,
  .bt-img-zoom img,
  .bt-img-float img,
  .bt-dotted-connector,
  .bt-feature-badge img,
  .bt-step-item img,
  .bt-story-step img,
  .bt-pillar-item img {
    animation: none !important;
  }
}
