/* ==========================================================================
   JOMETRY ARCHITECTURAL MOTION & INTERACTIVE SIMULATION ANIMATIONS
   MACR MAYR INDIA PVT LTD · 2026 EDITION
   ========================================================================== */

/* Page Entry Transition (Opacity on Body, Subtle Translate on Main) */
@keyframes pageFadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.page-transition {
  animation: pageFadeIn 0.35s ease-out forwards;
}

.page-transition main {
  animation: mainFadeSlide 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

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

/* Keyframe Animations */
@keyframes slotGlowAmber {
  0%, 100% {
    filter: drop-shadow(0 0 4px rgba(255, 170, 51, 0.8)) drop-shadow(0 0 12px rgba(255, 170, 51, 0.4));
    opacity: 0.9;
  }
  50% {
    filter: drop-shadow(0 0 8px rgba(255, 170, 51, 1)) drop-shadow(0 0 24px rgba(255, 170, 51, 0.7));
    opacity: 1;
  }
}

@keyframes beaconPulse {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(20, 88, 153, 0.7);
  }
  70% {
    transform: scale(1);
    box-shadow: 0 0 0 8px rgba(20, 88, 153, 0);
  }
  100% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(20, 88, 153, 0);
  }
}

@keyframes electricalPulse {
  0% {
    stroke-dashoffset: 100;
  }
  100% {
    stroke-dashoffset: 0;
  }
}

@keyframes springCompress {
  0% { transform: scale(1); }
  50% { transform: scale(0.85); }
  100% { transform: scale(1); }
}

@keyframes floatPanelOpen {
  0% { transform: translateZ(0px) translateY(0); }
  100% { transform: translateZ(80px) translateY(-15px); }
}

@keyframes snapIndexFeedback {
  0% { transform: translateZ(80px); }
  75% { transform: translateZ(-4px); }
  100% { transform: translateZ(0); }
}

@keyframes windGustDeflect {
  0%, 100% { transform: skewY(0deg); }
  50% { transform: skewY(0.8deg); }
}

/* Scroll Reveal Classes */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.55s cubic-bezier(0.16, 1, 0.3, 1), transform 0.55s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

.reveal.is-revealed {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }

/* Interactive Hover Utilities */
.hover-lift {
  transition: transform var(--transition-normal), box-shadow var(--transition-normal), border-color var(--transition-fast);
}
.hover-lift:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
  border-color: var(--color-ink);
}

/* Status Indicator Beacon */
.status-beacon {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--color-service-blue);
  animation: beaconPulse 2.2s infinite ease-in-out;
  margin-right: 6px;
  vertical-align: middle;
}
.status-beacon.moss {
  background: var(--color-living-moss);
}
.status-beacon.amber {
  background: var(--color-status-development);
}

/* Hero Background Crossfade */
.hero-bg-layer {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 0.75s cubic-bezier(0.16, 1, 0.3, 1), transform 1.2s ease-out;
  transform: scale(1.02);
  z-index: 1;
}
.hero-bg-layer.active {
  opacity: 1;
  transform: scale(1);
}

/* 3-Move WallClick Assembly Animation Stages */
.sim-stage-canvas {
  perspective: 900px;
  transition: all 0.4s ease;
}

.sim-stage-canvas.state-pressed .sim-demount-panel {
  transform: translateZ(4px);
  filter: brightness(1.05);
  box-shadow: 0 0 15px var(--color-service-blue-glow);
}

.sim-stage-canvas.state-open .sim-demount-panel {
  transform: translateZ(90px) translateY(-20px);
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.35);
}

.sim-stage-canvas.state-closed .sim-demount-panel {
  transform: translateZ(0);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.sim-node-point {
  transition: all 0.3s ease;
}
.sim-node-point.node-trigger {
  fill: #38bdf8;
  r: 7;
  filter: drop-shadow(0 0 6px #38bdf8);
}
.sim-node-point.node-detached {
  fill: #94a3b8;
  r: 5;
  stroke: #f59e0b;
  stroke-width: 2;
}
.sim-node-point.node-locked {
  fill: #22c55e;
  r: 6;
  filter: drop-shadow(0 0 5px #22c55e);
}

/* Raceway Active Tier Highlight */
.raceway-tier-path {
  stroke-dasharray: 6 4;
  animation: electricalPulse 2.5s linear infinite;
  opacity: 0.35;
  transition: opacity 0.3s ease, stroke-width 0.3s ease;
}
.raceway-tier-path.active-tier {
  opacity: 1;
  stroke-width: 3.5;
  filter: drop-shadow(0 0 6px currentColor);
}

/* Tile Studio Visuals */
.studio-tile {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 2px;
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.25s ease, filter 0.25s ease;
  user-select: none;
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.06), 0 4px 12px rgba(0,0,0,0.3);
}

.studio-tile:hover {
  filter: brightness(1.1);
  box-shadow: inset 0 0 0 2px var(--color-backlit-amber), 0 8px 24px rgba(0,0,0,0.45);
  z-index: 2;
}

.studio-tile:active {
  transform: scale(0.97);
}

/* Backlit Active Elevation */
.backlit-active .studio-tile {
  background-color: #111216 !important;
  border-color: #26231c !important;
}

/* Slit Light Night Facade Effects */
.slit-light {
  transition: all 0.35s ease;
}

.facade-sim-stage.mode-wind {
  animation: windGustDeflect 3s ease-in-out infinite;
}
