/* ============================================
   ANIMATIONS & EFFECTS
   ============================================ */

/* --- Scroll Reveal Animations --- */
.fade-up {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}
.fade-up.visible { opacity: 1; transform: translateY(0); }

.fade-left {
  opacity: 0;
  transform: translateX(-50px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}
.fade-left.visible { opacity: 1; transform: translateX(0); }

.fade-right {
  opacity: 0;
  transform: translateX(50px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}
.fade-right.visible { opacity: 1; transform: translateX(0); }

.scale-in {
  opacity: 0;
  transform: scale(0.9);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.scale-in.visible { opacity: 1; transform: scale(1); }

/* Stagger children */
.stagger-children > *:nth-child(1) { transition-delay: 0s; }
.stagger-children > *:nth-child(2) { transition-delay: 0.12s; }
.stagger-children > *:nth-child(3) { transition-delay: 0.24s; }
.stagger-children > *:nth-child(4) { transition-delay: 0.36s; }
.stagger-children > *:nth-child(5) { transition-delay: 0.48s; }
.stagger-children > *:nth-child(6) { transition-delay: 0.6s; }

/* --- Hero Animations --- */
@keyframes heroFadeIn {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes heroLogoReveal {
  from { opacity: 0; transform: scale(0.85); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes ringPulse {
  0% { transform: scale(1); opacity: 0.15; }
  50% { transform: scale(1.03); opacity: 0.08; }
  100% { transform: scale(1); opacity: 0.15; }
}

@keyframes ringRotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes shimmer {
  0% { background-position: -200% center; }
  100% { background-position: 200% center; }
}

@keyframes subtlePulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

@keyframes slideInLine {
  from { width: 0; }
  to { width: 60px; }
}

.hero-text {
  animation: heroFadeIn 1s ease 0.2s both;
}

.hero-logo-large {
  animation: heroLogoReveal 1.2s ease 0.5s both;
}

.hero-logo-ring {
  animation: ringPulse 4s ease-in-out infinite;
}

.hero-logo-ring-2 {
  animation: ringPulse 5s ease-in-out 1s infinite;
}

.metallic-line.animated {
  animation: slideInLine 0.8s ease both;
}

/* --- Typing Cursor --- */
.typing-cursor {
  display: inline-block;
  width: 3px;
  height: 1em;
  background: var(--crimson);
  margin-left: 4px;
  animation: blink 0.8s infinite;
  vertical-align: text-bottom;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

/* --- Counter Animation --- */
.stat-counter {
  display: flex;
  gap: 3rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 3rem;
}

.stat-item {
  text-align: center;
}

.stat-number {
  font-family: var(--font-heading);
  font-size: 3rem;
  color: var(--pure-white);
  line-height: 1;
  margin-bottom: 0.3rem;
}

.stat-label {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--light-gray);
}

/* --- Card Hover Lift & Glow --- */
.card {
  transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              box-shadow 0.4s ease,
              border-color 0.4s ease;
}

.card:hover {
  transform: translateY(-8px);
  box-shadow: 0 25px 60px rgba(0,0,0,0.08), 0 0 0 1px rgba(176,30,40,0.06);
}

/* --- Service Box Hover --- */
.service-box {
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.service-box:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 50px rgba(0,0,0,0.07);
}

/* --- Team Photo Hover --- */
.team-featured-photo {
  transition: transform 0.5s ease, box-shadow 0.5s ease;
  overflow: hidden;
}

.team-featured-photo:hover {
  transform: scale(1.03);
  box-shadow: 0 15px 40px rgba(0,0,0,0.1);
}

/* --- Button Pulse on CTA --- */
@keyframes ctaPulse {
  0% { box-shadow: 0 0 0 0 rgba(176,30,40,0.4); }
  70% { box-shadow: 0 0 0 12px rgba(176,30,40,0); }
  100% { box-shadow: 0 0 0 0 rgba(176,30,40,0); }
}

.btn-pulse {
  animation: ctaPulse 2.5s infinite;
}

/* --- ITHORR Letter Hover --- */
.ithorr-letter {
  transition: transform 0.3s ease;
  cursor: default;
}

.ithorr-letter:hover {
  transform: scale(1.15) translateY(-4px);
}

/* --- Value Detail Slide --- */
.value-detail {
  transition: transform 0.3s ease, background 0.3s ease;
  padding-left: 1rem;
  padding-right: 1rem;
  border-radius: 6px;
}

.value-detail:hover {
  background: rgba(0,0,0,0.015);
  transform: translateX(6px);
}

/* --- Smooth Nav Shadow on Scroll --- */
.nav.scrolled {
  box-shadow: 0 4px 30px rgba(0,0,0,0.08);
}

/* --- Quote Block Accent Animation --- */
.quote-block {
  position: relative;
  overflow: hidden;
}

.quote-block::after {
  content: '\201C';
  position: absolute;
  top: -20px;
  right: 20px;
  font-family: var(--font-heading);
  font-size: 8rem;
  color: rgba(0,0,0,0.03);
  line-height: 1;
  pointer-events: none;
}

/* --- Page Transition --- */
body {
  animation: pageIn 0.5s ease both;
}

@keyframes pageIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* --- Contact Promise Glow --- */
.contact-promise {
  transition: box-shadow 0.4s ease;
}

.contact-promise:hover {
  box-shadow: 0 0 30px rgba(176,30,40,0.15);
}

/* --- Parallax Helper --- */
.parallax-bg {
  transition: transform 0.1s linear;
  will-change: transform;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
