/* Equipment Plus Co. — Custom Styles */
/* Extends Tailwind with Google Stitch animations, tokens, and responsive utilities */

@layer base {
  html {
    margin: 0;
    padding: 0;
    width: 100%;
    min-height: 100%;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
  }
  body {
    margin: 0;
    padding: 0;
    width: 100%;
    min-height: 100%;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
  }
  main > :first-child {
    margin-top: 0 !important;
  }
  main > :last-child {
    margin-bottom: 0 !important;
  }
}

/* Sleek Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: #f0edec;
}
::-webkit-scrollbar-thumb {
  background: #c2c6d2;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #7b5800;
}

/* ==========================================================================
   SCROLL & STAGGER REVEAL ANIMATIONS
   ========================================================================== */
.reveal-on-scroll {
  opacity: 0;
  transform: translateY(28px);
  transition-property: opacity, transform;
  transition-duration: 700ms;
  transition-timing-function: cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform, opacity;
}

.reveal-on-scroll.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Staggered Card Elements with progressive timing */
.card-reveal {
  opacity: 0;
  transform: translateY(32px) scale(0.97);
  transition-property: opacity, transform, box-shadow, border-color;
  transition-duration: 650ms;
  transition-timing-function: cubic-bezier(0.16, 1, 0.3, 1);
  transition-delay: var(--delay, 0ms);
  will-change: transform, opacity;
}

.card-reveal.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* Reveal Left & Right */
.reveal-left {
  opacity: 0;
  transform: translateX(-35px);
  transition-property: opacity, transform;
  transition-duration: 750ms;
  transition-timing-function: cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform, opacity;
}
.reveal-left.is-visible {
  opacity: 1;
  transform: translateX(0);
}

.reveal-right {
  opacity: 0;
  transform: translateX(35px);
  transition-property: opacity, transform;
  transition-duration: 750ms;
  transition-timing-function: cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform, opacity;
}
.reveal-right.is-visible {
  opacity: 1;
  transform: translateX(0);
}

.reveal-scale {
  opacity: 0;
  transform: scale(0.94);
  transition-property: opacity, transform;
  transition-duration: 700ms;
  transition-timing-function: cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform, opacity;
}
.reveal-scale.is-visible {
  opacity: 1;
  transform: scale(1);
}

/* Legacy reveal classes compatibility */
.reveal-init-down, .reveal-init-up, .reveal-init-left, .reveal-init-right, .reveal-init-scale {
  opacity: 0;
  transition: opacity 650ms cubic-bezier(0.16, 1, 0.3, 1), transform 650ms cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform, opacity;
}
.reveal-init-down { transform: translateY(-26px); }
.reveal-init-up { transform: translateY(28px); }
.reveal-init-left { transform: translateX(-28px); }
.reveal-init-right { transform: translateX(28px); }
.reveal-init-scale { transform: scale(0.95); }
.reveal-init-down.is-visible,
.reveal-init-up.is-visible,
.reveal-init-left.is-visible,
.reveal-init-right.is-visible,
.reveal-init-scale.is-visible {
  opacity: 1;
  transform: translate(0) scale(1);
}

/* Hero load sequence */
@keyframes heroFadeInUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.hero-anim-1 { animation: heroFadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.1s both; }
.hero-anim-2 { animation: heroFadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.25s both; }
.hero-anim-3 { animation: heroFadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.4s both; }
.hero-anim-4 { animation: heroFadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.55s both; }
.hero-anim-5 { animation: heroFadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.7s both; }

/* Interactive Card Hover Polish */
.interactive-card {
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease, border-color 0.3s ease;
}
.interactive-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 32px -8px rgba(0, 0, 0, 0.12), 0 4px 12px -2px rgba(0, 0, 0, 0.06);
}

/* Subtle pulse effect for status dots */
@keyframes livePing {
  0% { transform: scale(0.95); opacity: 0.9; }
  50% { transform: scale(1.3); opacity: 0.4; }
  100% { transform: scale(0.95); opacity: 0.9; }
}
.live-pulse {
  animation: livePing 2s infinite ease-in-out;
}

/* Accessibility / reduced motion */
@media (prefers-reduced-motion: reduce) {
  .reveal-on-scroll,
  .card-reveal,
  .reveal-left,
  .reveal-right,
  .reveal-scale,
  .reveal-init-down,
  .reveal-init-up,
  .reveal-init-left,
  .reveal-init-right,
  .reveal-init-scale {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}

/* Line clamp utilities */
.line-clamp-1 { display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.line-clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.line-clamp-3 { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* Prose styles for rich text content */
.prose h2 { font-size: 24px; font-weight: 700; margin: 1.5rem 0 0.75rem; }
.prose h3 { font-size: 20px; font-weight: 600; margin: 1.25rem 0 0.5rem; }
.prose p { margin: 0.75rem 0; }
.prose ul, .prose ol { padding-left: 1.5rem; margin: 0.75rem 0; }
.prose li { margin: 0.25rem 0; }

/* Mobile bottom bar clearance */
@media (max-width: 639px) {
  body {
    padding-bottom: 56px;
  }
}
