/* ============================================================
   ALTUS SOLUTION — Enhanced Animations & Transitions
   animations.css  |  v2.0
   ============================================================ */

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

/* ── 2. PAGE TRANSITION (fade-in on load) ────────────────── */
@keyframes pageFadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

body {
  animation: pageFadeIn 0.45s cubic-bezier(0.22, 1, 0.36, 1) both;
}

/* Out-transition for navigation clicks */
body.page-leaving {
  animation: none;
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity 0.22s ease, transform 0.22s ease;
}

/* ── 3. SCROLL ANIMATIONS ────────────────────────────────── */

/* Base hidden state — overrides base.css for richer effects */
.animate-in {
  opacity: 0;
  transform: translateY(32px);
  transition:
    opacity  0.7s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}
.animate-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Directional variants */
.animate-left {
  opacity: 0;
  transform: translateX(-40px);
  transition:
    opacity  0.7s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}
.animate-left.visible {
  opacity: 1;
  transform: translateX(0);
}

.animate-right {
  opacity: 0;
  transform: translateX(40px);
  transition:
    opacity  0.7s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}
.animate-right.visible {
  opacity: 1;
  transform: translateX(0);
}

.animate-scale {
  opacity: 0;
  transform: scale(0.92);
  transition:
    opacity  0.65s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.65s cubic-bezier(0.22, 1, 0.36, 1);
}
.animate-scale.visible {
  opacity: 1;
  transform: scale(1);
}

/* Stagger delays — extended set */
.delay-1  { transition-delay: 0.08s; }
.delay-2  { transition-delay: 0.16s; }
.delay-3  { transition-delay: 0.24s; }
.delay-4  { transition-delay: 0.32s; }
.delay-5  { transition-delay: 0.40s; }
.delay-6  { transition-delay: 0.48s; }

/* ── 4. HERO VIDEO BACKGROUND ────────────────────────────── */
#hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  z-index: 0;
  opacity: 0;
  transition: opacity 1.4s ease;
  pointer-events: none;
  will-change: opacity;
}
#hero-video.loaded { opacity: 1; }

/* Balanced overlay — lets video show through while keeping text legible */
.hero-gradient {
  background:
    linear-gradient(105deg, rgba(10,10,10,0.78) 0%, rgba(10,10,10,0.38) 55%, rgba(10,10,10,0.1) 100%),
    linear-gradient(180deg, rgba(10,10,10,0.1) 0%, rgba(10,10,10,0.58) 100%),
    radial-gradient(ellipse 50% 50% at 72% 48%, rgba(255,92,0,0.04) 0%, transparent 65%);
}

/* ── 5. CARD HOVER INTERACTIONS ──────────────────────────── */
.card,
.service-card,
.founder-card,
.blog-card,
.feature-card {
  transition:
    border-color 0.25s ease,
    transform    0.35s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow   0.35s cubic-bezier(0.22, 1, 0.36, 1) !important;
}
.card:hover,
.service-card:hover,
.founder-card:hover,
.blog-card:hover,
.feature-card:hover {
  transform: translateY(-6px) !important;
  box-shadow: 0 20px 50px rgba(0,0,0,0.55), 0 0 0 1px rgba(255,92,0,0.18) !important;
}

/* ── 6. BUTTON MICRO-INTERACTIONS ────────────────────────── */
.btn {
  position: relative;
  overflow: hidden;
  transition:
    background   0.22s ease,
    color        0.22s ease,
    border-color 0.22s ease,
    transform    0.2s  cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow   0.22s ease !important;
}
.btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.07);
  opacity: 0;
  transition: opacity 0.18s ease;
  border-radius: inherit;
  pointer-events: none;
}
.btn:hover::after  { opacity: 1; }
.btn:active        { transform: translateY(1px) scale(0.98) !important; }

/* ── 7. NAV LINK UNDERLINE SLIDE ─────────────────────────── */
.nav-links a:not(.btn) {
  position: relative;
}
.nav-links a:not(.btn)::after {
  content: '';
  position: absolute;
  left: 0; bottom: -3px;
  width: 0; height: 2px;
  background: var(--color-brand);
  border-radius: 2px;
  transition: width 0.26s cubic-bezier(0.22, 1, 0.36, 1);
}
.nav-links a:not(.btn):hover::after,
.nav-links a.active::after { width: 100%; }

/* ── 8. FOUNDER CARD IMAGE HOVER ─────────────────────────── */
.founder-img-wrap {
  overflow: hidden;
}
.founder-img-wrap img {
  transition: transform 0.55s cubic-bezier(0.22, 1, 0.36, 1) !important;
  transform-origin: center 30%;
}
.founder-card:hover .founder-img-wrap img {
  transform: scale(1.05) translateY(-4px) !important;
}

/* ── 9. STAT NUMBER — solid orange, no shimmer ───────────── */
/* Direct Builder: data is read, not decorated               */
.stat-number {
  color: var(--color-brand);
  background: none;
  -webkit-background-clip: unset;
  -webkit-text-fill-color: unset;
  background-clip: unset;
  animation: none;
}

/* ── 10. EYEBROW — clean mono label, no decorative dot ───── */
/* Editorial precision: labels don't need visual noise       */
@keyframes dotPulse {
  0%, 100% { opacity: 1;   transform: scale(1); }
  50%       { opacity: 0.5; transform: scale(0.75); }
}
/* .eyebrow::before removed — dots distract from editorial reading */

/* ── 11. FOOTER LINK HOVER ───────────────────────────────── */
.footer-links a {
  transition: color 0.2s ease, padding-left 0.2s ease;
  position: relative;
}
.footer-links a:hover {
  color: var(--color-brand);
  padding-left: 6px;
}

/* ── 12. SECTION DIVIDER GLOW ────────────────────────────── */
.section-dark + .section-dark,
.section-surface + .section-dark {
  position: relative;
}
.section-dark + .section-dark::before,
.section-surface + .section-dark::before {
  content: '';
  position: absolute;
  top: 0; left: 50%;
  transform: translateX(-50%);
  width: 60%; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,92,0,0.25), transparent);
}

/* ── 13. SCROLL PROGRESS BAR ─────────────────────────────── */
#scroll-progress {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, #FF5C00, #FF8C40);
  z-index: 9999;
  transition: width 0.08s linear;
  pointer-events: none;
}

/* ── 14. ORACLE BADGE SPIN ───────────────────────────────── */
.oracle-badge {
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}
.oracle-badge:hover {
  transform: scale(1.05);
}

/* ── 15. PAGE HERO ENTRANCE ──────────────────────────────── */
@keyframes heroSlideUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
.page-hero-label  { animation: heroSlideUp 0.5s 0.1s cubic-bezier(0.22,1,0.36,1) both; }
.page-hero-heading{ animation: heroSlideUp 0.6s 0.2s cubic-bezier(0.22,1,0.36,1) both; }
.page-hero-text   { animation: heroSlideUp 0.6s 0.32s cubic-bezier(0.22,1,0.36,1) both; }

/* ── 16. HERO RING PULSE ─────────────────────────────────── */
@keyframes heroPulse {
  0%, 100% {
    box-shadow:
      0 0 0 55px  rgba(255,92,0,0.025),
      0 0 0 110px rgba(255,92,0,0.012),
      0 0 0 165px rgba(255,92,0,0.005),
      0 0 80px    rgba(255,92,0,0.06);
  }
  50% {
    box-shadow:
      0 0 0 55px  rgba(255,92,0,0.042),
      0 0 0 110px rgba(255,92,0,0.020),
      0 0 0 165px rgba(255,92,0,0.008),
      0 0 110px   rgba(255,92,0,0.10);
  }
}
.page-hero::before { animation: heroPulse 6s ease-in-out infinite; }

/* ── 17. TECH PANEL DOT ─────────────────────────────────── */
/* Static — no animation on data readout elements           */
.tp-dot { animation: none; }

/* ── 18. HERO VISUAL WRAP ENTRANCE ──────────────────────── */
@keyframes panelSlideIn {
  from { opacity: 0; transform: translateY(-50%) translateX(30px); }
  to   { opacity: 1; transform: translateY(-50%) translateX(0); }
}
.hero-visual-wrap {
  animation: panelSlideIn 0.8s 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
}

/* ── 19. GLOW PULSE UTILITY ──────────────────────────────── */
@keyframes glowPulse {
  0%, 100% { opacity: 0.5; }
  50%       { opacity: 1.0; }
}

/* ── 20. CARD HOVER (extended) ───────────────────────────── */
/* Ensure glass cards also lift */
.why-item:hover,
.step-item:hover,
.accel-item:hover,
.pillar:hover,
.metric-card:hover {
  transform: translateY(-4px);
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1),
              border-color 0.25s ease,
              box-shadow 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

/* ══════════════════════════════════════════════════════════
   PRO MAX ENHANCEMENTS — frontend-design skill
   ══════════════════════════════════════════════════════════ */

/* ── 21. FILM GRAIN OVERLAY ──────────────────────────────── */
/* Tactile cinematic depth — hallmark of premium dark UIs    */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9997;
  opacity: 0.038;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='320' height='320'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.72' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='320' height='320' filter='url(%23g)'/%3E%3C/svg%3E");
  background-size: 180px 180px;
}

/* ── 22. SERVICE CARD SHIMMER SWEEP ─────────────────────── */
/* Light catches the card edge on hover — premium material feel */
.service-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: -110%;
  width: 60%;
  height: 100%;
  background: linear-gradient(
    105deg,
    transparent 20%,
    rgba(255, 92, 0, 0.07) 50%,
    transparent 80%
  );
  transition: left 0.65s cubic-bezier(0.22, 1, 0.36, 1);
  z-index: 1;
  pointer-events: none;
}
.service-card:hover::after { left: 160%; }

/* ── 23. PRIMARY BUTTON LIGHT SWEEP ─────────────────────── */
/* A single flash of light — kinetic, confident, unforgettable */
.btn-primary::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -80%;
  width: 45%;
  height: 200%;
  background: linear-gradient(
    105deg,
    transparent,
    rgba(255, 255, 255, 0.14),
    transparent
  );
  transform: skewX(-18deg);
  transition: left 0.55s cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: none;
  z-index: 1;
}
.btn-primary:hover::before { left: 150%; }

/* ── 24. EYEBROW DASH ACCENT ─────────────────────────────── */
/* Editorial precision: a clean ruled mark before every label */
.eyebrow::before {
  content: '';
  display: inline-block;
  width: 18px;
  height: 2px;
  background: var(--color-brand);
  border-radius: 1px;
  vertical-align: middle;
  margin-right: 8px;
  flex-shrink: 0;
}

/* ── 25. STAT NUMBER WARM GLOW ───────────────────────────── */
.stat-number {
  text-shadow:
    0 0 40px rgba(255, 92, 0, 0.45),
    0 0 80px rgba(255, 92, 0, 0.18);
}

/* ── 26. CARD HOVER — WARM ORANGE AURA ───────────────────── */
.service-card:hover,
.method-card:hover,
.impact-icon-card:hover,
.why-feat-card:hover,
.why-v2-list li:hover,
.cap-item:hover {
  box-shadow:
    0 0 0 1px rgba(255, 92, 0, 0.28),
    0 16px 48px rgba(0, 0, 0, 0.55),
    0 0 48px rgba(255, 92, 0, 0.07) !important;
}

/* ── 27. SCROLL PROGRESS BAR — KINETIC GLOW ─────────────── */
#scroll-progress {
  background: linear-gradient(90deg, #FF3300, #FF5C00, #FF9040);
  box-shadow: 0 0 8px rgba(255, 92, 0, 0.7), 0 0 18px rgba(255, 92, 0, 0.35);
  height: 2px;
}

/* ── 28. HERO PAGE HEADING WORD STAGGER ──────────────────── */
@keyframes wordUp {
  from { opacity: 0; transform: translateY(18px) skewX(-3deg); }
  to   { opacity: 1; transform: translateY(0)    skewX(0deg); }
}
.word-stagger {
  display: inline-block;
  animation: wordUp 0.55s cubic-bezier(0.22, 1, 0.36, 1) both;
}

/* ── 29. MOUSE SPOTLIGHT ─────────────────────────────────── */
#mouse-spotlight {
  position: fixed;
  pointer-events: none;
  z-index: 9996;
  width: 700px;
  height: 700px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,92,0,0.045) 0%, transparent 62%);
  transform: translate(-50%, -50%);
  will-change: left, top;
  mix-blend-mode: screen;
}

/* ── 30. NAV LINK ACTIVE GLOW ────────────────────────────── */
.nav-links a.active {
  color: var(--color-brand);
  text-shadow: 0 0 20px rgba(255, 92, 0, 0.4);
}

/* ── 31. BRAND DIVIDER LINE GLOW ─────────────────────────── */
.method-divider {
  box-shadow: 0 0 12px rgba(255, 92, 0, 0.3);
}

/* ── 32. FOOTER LOGO HOVER ───────────────────────────────── */
.footer-logo:hover img,
.nav-logo:hover img {
  filter: brightness(1.1) drop-shadow(0 0 8px rgba(255,92,0,0.35));
  transition: filter 0.3s ease;
}

/* ── 33. SECTION HEADING UNDERLINE TRACE ─────────────────── */
@keyframes traceIn {
  from { width: 0; opacity: 0; }
  to   { width: 48px; opacity: 1; }
}
.page-hero-heading::after {
  content: '';
  display: block;
  width: 0;
  height: 3px;
  background: var(--color-brand);
  margin-top: 16px;
  animation: traceIn 0.6s 0.7s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  box-shadow: 0 0 10px rgba(255, 92, 0, 0.6);
}
