.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 700ms ease, transform 700ms ease;
}

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

.line {
  fill: none;
  stroke: rgba(255, 255, 255, 0.74);
  stroke-width: 5;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 900;
  stroke-dashoffset: 900;
  animation: drawSteel 2.2s ease forwards;
}

.line-frame {
  animation-delay: 450ms;
  stroke: rgba(174, 184, 195, 0.8);
}

.line-gate {
  animation-delay: 800ms;
  stroke: rgba(243, 165, 20, 0.86);
}

@keyframes drawSteel {
  to {
    stroke-dashoffset: 0;
  }
}

.hero-content {
  animation: heroLift 900ms ease 200ms both;
}

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

.hero-sparks {
  animation: sparkDrift 8s linear infinite alternate;
}

@keyframes sparkDrift {
  from {
    transform: translate3d(0, 0, 0) scale(1);
  }
  to {
    transform: translate3d(-1.5rem, 1rem, 0) scale(1.06);
  }
}

@keyframes imageDrift {
  from {
    transform: scale(1.08) translate3d(-1.2%, -0.8%, 0);
  }
  to {
    transform: scale(1.14) translate3d(1.2%, 0.8%, 0);
  }
}

@keyframes steelSweep {
  0%,
  28% {
    background-position: 0 0, 180% 0;
  }
  68%,
  100% {
    background-position: 0 0, -80% 0;
  }
}

@keyframes blueprintGrid {
  from {
    background-position: 0 0, 0 0, center;
  }
  to {
    background-position: 32px 32px, 32px 32px, center;
  }
}

@keyframes blueprintDraw {
  0% {
    clip-path: inset(0 100% 0 0);
    opacity: 0.45;
  }
  38%,
  72% {
    clip-path: inset(0 0 0 0);
    opacity: 1;
  }
  100% {
    clip-path: inset(0 0 0 100%);
    opacity: 0.5;
  }
}

.weld-core {
  animation: weldPulse 850ms ease-in-out infinite alternate;
}

.weld-ring {
  animation: weldRing 1.6s ease-out infinite;
}

@keyframes weldPulse {
  from {
    opacity: 0.72;
    transform: translate(-50%, -50%) scale(0.82);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.22);
  }
}

@keyframes weldRing {
  from {
    opacity: 0.72;
    transform: translate(-50%, -50%) scale(0.28);
  }
  to {
    opacity: 0;
    transform: translate(-50%, -50%) scale(1.35);
  }
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(circle at 78% 68%, rgba(255, 255, 255, 0.12), transparent 2rem),
    radial-gradient(circle at 76% 70%, rgba(243, 165, 20, 0.24), transparent 7rem),
    radial-gradient(circle at 70% 58%, rgba(5, 14, 24, 0), rgba(5, 14, 24, 0.18) 26rem);
  animation: heatShimmer 2.8s ease-in-out infinite alternate;
  mix-blend-mode: screen;
}

@keyframes heatShimmer {
  from {
    opacity: 0.4;
    transform: translate3d(0, 0, 0) scale(1);
  }
  to {
    opacity: 0.75;
    transform: translate3d(-0.6rem, 0.35rem, 0) scale(1.025);
  }
}

.magnetic::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent, rgba(255, 255, 255, 0.28), transparent);
  transform: translateX(-120%);
  transition: transform 600ms ease;
}

.magnetic:hover::after,
.magnetic:focus-visible::after {
  transform: translateX(120%);
}

.tilt-card {
  transform-style: preserve-3d;
  transition: transform 160ms ease, box-shadow 160ms ease;
  will-change: transform;
}

.tilt-card:hover {
  box-shadow: 0 30px 90px rgba(6, 27, 62, 0.32);
}

.service-tile img,
.gallery-item img,
.contact-media img {
  transition: transform 650ms ease;
}

.service-tile:hover img,
.gallery-item:hover img,
.contact-media:hover img {
  transform: scale(1.05);
}

.morph-shape.active path {
  stroke-dasharray: 1000;
  stroke-dashoffset: 1000;
  animation: drawSteel 1.1s ease forwards;
}

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

  .reveal {
    opacity: 1;
    transform: none;
  }

  .weld-canvas,
  .weld-hotspot,
  .hero::before {
    display: none;
  }
}

/* =============================================
   FORGE SECTION KEYFRAMES
   ============================================= */

@keyframes forgeGridScroll {
  from { background-position: 0 0, 0 0; }
  to   { background-position: 52px 52px, 52px 52px; }
}

@keyframes forgeStreakFall {
  0%   { top: -32%; opacity: 0; }
  6%   { opacity: 1; }
  94%  { opacity: 0.7; }
  100% { top: 132%; opacity: 0; }
}

@keyframes forgeOrbPulse {
  from { transform: scale(0.88); opacity: 0.7; }
  to   { transform: scale(1.12); opacity: 1; }
}

@keyframes forgeScanLine {
  0%   { top: 14%; opacity: 0; }
  7%   { opacity: 1; }
  93%  { opacity: 1; }
  100% { top: 83%; opacity: 0; }
}

@keyframes forgeStatusPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.45; transform: scale(0.8); }
}

@keyframes forgeSparkFly {
  0%   { transform: translate(-50%, -50%) scale(1); opacity: 1; }
  100% {
    transform: translate(calc(-50% + var(--sdx, 40px)), calc(-50% + var(--sdy, -40px))) scale(0);
    opacity: 0;
  }
}
