/* SWARAJ MHE INDIA — PREMIUM 3D SCROLL-DRIVEN MACHINE ANIMATION */
.hero-index,
.hero-side-note,
.hero-scroll,
.story-caption {
  display: none !important;
}

.hero-scroll-story {
  position: relative;
  background: #0d161a;
}

/* Keep the hero sticky while still clipping horizontal overflow on the homepage. */
body.home-page {
  overflow-x: clip;
}

.hero-scroll-story.scroll-story-active {
  height: 250svh;
}

.scroll-story-active .hero-showcase {
  position: sticky;
  top: 0;
  height: 100svh;
  min-height: 600px;
  max-height: none;
  overflow: hidden;
  --story-progress: 0;
  --story-camera: 1;
}

.scroll-story-active .hero-atmosphere {
  transform: scale(var(--story-camera, 1));
  transform-origin: 75% 65%;
  will-change: transform;
}

.scroll-story-active .hero-inner {
  position: relative;
  height: 100%;
  padding-top: 0;
  display: flex;
  align-items: center;
}

/* Hero Copy Column — Centered Vertically in Middle */
.hero-copy-column {
  position: relative;
  z-index: 6;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  min-height: 100%;
  max-width: min(540px, 52vw);
  padding-top: clamp(80px, 12vh, 105px);
  padding-bottom: clamp(60px, 9vh, 85px);
  box-sizing: border-box;
}

.scroll-story-active .hero-copy-column .hero-overline {
  margin: 0 0 16px 0;
  will-change: transform, opacity;
  transition: opacity 0.15s ease-out, transform 0.15s ease-out;
}

.scroll-story-active .hero-copy-column .hero-headline {
  width: auto;
  max-width: 100%;
  margin-top: 0;
  margin-bottom: 22px;
  will-change: transform, opacity;
  transition: opacity 0.15s ease-out, transform 0.15s ease-out;
}

.scroll-story-active .hero-headline {
  width: auto;
  max-width: 58%;
  margin-top: 36px;
  will-change: transform, opacity;
  transition: opacity 0.15s ease-out, transform 0.15s ease-out;
}

.scroll-story-active .hero-headline h1 {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-weight: 800;
  font-size: clamp(44px, 5.2vw, 76px);
  line-height: 0.95;
  letter-spacing: -0.035em;
  white-space: normal;
  color: #ffffff;
  text-transform: uppercase;
  text-shadow: 
    0 2px 4px rgba(0, 0, 0, 0.95),
    0 6px 26px rgba(0, 0, 0, 0.8),
    0 16px 50px rgba(0, 0, 0, 0.55);
  margin: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

.scroll-story-active .hero-headline h1 .title-word,
.hero-headline h1 .title-word {
  display: inline-flex;
  align-items: center;
  min-height: 0.95em;
  position: relative;
}

.type-cursor {
  display: inline-block;
  width: 4px;
  height: 0.82em;
  background: var(--yellow, #ffc629);
  margin-left: 6px;
  vertical-align: middle;
  border-radius: 2px;
  box-shadow: 
    0 0 10px rgba(255, 198, 41, 0.9),
    0 0 22px rgba(255, 198, 41, 0.5);
  animation: heroCursorBlink 0.75s steps(1) infinite;
}

.type-cursor.is-hidden {
  display: none !important;
}

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

.scroll-story-active .hero-headline h1 small {
  display: block;
  margin-top: 28px;
  line-height: 1.4;
}

.scroll-story-active .hero-copy-column .hero-intro {
  position: relative !important;
  top: auto !important;
  left: auto !important;
  max-width: 330px;
  margin: 0 !important;
  will-change: opacity, transform;
  transition: opacity 0.15s ease-out, transform 0.15s ease-out;
}

.scroll-story-active .hero-intro {
  top: clamp(300px, 43svh, 340px);
  left: 0;
  max-width: 320px;
  margin: 0;
  will-change: opacity, transform;
  transition: opacity 0.15s ease-out, transform 0.15s ease-out;
}

.scroll-story-active .hero-intro p {
  font-size: clamp(14px, 1.15vw, 17px);
  line-height: 1.5;
  color: #edece4;
  margin-bottom: 22px;
}

.scroll-story-active .hero-intro .yellow-pill {
  display: inline-flex;
  align-items: center;
  gap: 22px;
  padding: 13px 22px;
  background: var(--yellow);
  color: #111;
  border-radius: 999px;
  font: 700 12px/1 var(--body);
  text-decoration: none;
  box-shadow: 0 6px 20px rgba(255, 198, 41, 0.25);
  transition: opacity 0.2s ease-out, transform 0.25s ease-out, background 0.25s;
}

.scroll-story-active .hero-intro .yellow-pill span {
  font-size: 16px;
  font-weight: 700;
  line-height: 1;
}

/* Minimal Hero About Us Button */
.scroll-story-active .hero-intro .hero-about-btn,
.hero-about-btn {
  display: inline-flex !important;
  align-items: center !important;
  gap: 14px !important;
  padding: 11px 24px !important;
  border-radius: 999px !important;
  background: rgba(255, 255, 255, 0.05) !important;
  border: 1px solid rgba(255, 255, 255, 0.28) !important;
  backdrop-filter: blur(10px) !important;
  -webkit-backdrop-filter: blur(10px) !important;
  color: #ffffff !important;
  font-family: var(--body, 'DM Sans', sans-serif) !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  letter-spacing: 0.06em !important;
  text-transform: uppercase !important;
  text-decoration: none !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25) !important;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.scroll-story-active .hero-intro .hero-about-btn .btn-arrow,
.hero-about-btn .btn-arrow {
  display: inline-block !important;
  font-size: 15px !important;
  color: var(--yellow, #ffc629) !important;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.scroll-story-active .hero-intro .hero-about-btn:hover,
.hero-about-btn:hover {
  background: rgba(255, 198, 41, 0.12) !important;
  border-color: rgba(255, 198, 41, 0.75) !important;
  color: #ffffff !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35), 0 0 16px rgba(255, 198, 41, 0.25) !important;
}

.scroll-story-active .hero-intro .hero-about-btn:hover .btn-arrow,
.hero-about-btn:hover .btn-arrow {
  transform: translateX(4px) !important;
}

/* Machine Stage: positioned on the right side of the warehouse floor matching reference screenshot */
.scroll-story-active .hero-machine-stage {
  position: absolute;
  z-index: 3;
  right: 1.5%;
  bottom: clamp(28px, 4.5svh, 42px);
  width: min(50vw, 750px);
  height: min(50vw, 72svh, 680px);
  pointer-events: none;
  transform-origin: 75% 90%;
  will-change: transform;
}

/* When the interactive rig is mounted, hide the static image */
.scroll-story-active.rig-mounted .hero-machine {
  display: none !important;
}

.scroll-story-active .scroll-lift-rig {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
  filter: drop-shadow(12px 28px 24px rgba(0, 0, 0, 0.65));
}

.scroll-story-active .hero-machine-shadow {
  bottom: 1%;
  left: 10%;
  width: 82%;
  height: 9%;
  background: radial-gradient(ellipse at center, rgba(0, 0, 0, 0.88) 0%, rgba(0, 0, 0, 0.45) 55%, transparent 75%);
  filter: blur(24px);
  transform: none;
}

.scroll-story-active .hero-machine-halo {
  display: none;
}

.scroll-story-active .hero-bottom {
  display: none;
}

.scroll-story-active .story-caption {
  display: flex;
  align-items: center;
  gap: 12px;
  position: absolute;
  left: 0;
  bottom: 78px;
  z-index: 8;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: #ffffff;
}

.scroll-story-active .story-caption small {
  display: block;
  position: absolute;
  left: 20px;
  top: 24px;
  white-space: nowrap;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 2px;
  color: #c2c9c4;
}

.story-pulse {
  width: 8px;
  height: 8px;
  background: var(--yellow);
  border-radius: 50%;
  box-shadow: 0 0 12px var(--yellow);
  animation: pulse-glow 2s ease-in-out infinite;
}

@keyframes pulse-glow {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.4); opacity: 0.7; }
}

/* Minimal Hero Progress Highlight Line */
.scroll-story-active .story-controls {
  display: block;
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 10;
  background: none;
  pointer-events: none;
}

.story-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.story-progress i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, rgba(255, 198, 41, 0.6), #ffc629);
  box-shadow: 0 0 10px rgba(255, 198, 41, 0.75), 0 0 20px rgba(255, 198, 41, 0.35);
  transform: scaleX(var(--story-progress, 0));
  transform-origin: left;
  transition: transform 0.08s linear;
}

.story-chapters {
  display: none !important;
}

.scroll-story-active .hero-scroll {
  z-index: 8;
  bottom: 78px;
  left: auto;
  right: 0;
  font-size: 9px;
  letter-spacing: 1.5px;
  display: flex;
  gap: 12px;
  align-items: center;
}

.scroll-story-active .hero-scroll span {
  font-size: 20px;
  animation: scroll-down 2s ease-in-out infinite;
}

/* Responsive adjustments */
@media (max-width: 1100px) {
  .scroll-story-active .hero-machine-stage {
    width: min(54vw, 680px);
    height: min(55vw, 640px);
    bottom: 45px;
  }
  .scroll-story-active .hero-headline h1 {
    font-size: clamp(48px, 5.5vw, 76px);
  }
}

/* TABLET VIEW (768px - 1024px): Responsive layout with smooth scrolling */
@media (min-width: 768px) and (max-width: 1024px) {
  .hero-scroll-story.scroll-story-active {
    height: 240svh;
  }
  .scroll-story-active .hero-machine-stage {
    width: min(56vw, 560px);
    height: min(56vw, 540px);
    right: 0;
    bottom: 50px;
  }
  .hero-copy-column {
    max-width: min(440px, 46vw);
    padding-top: clamp(65px, 10vh, 85px);
  }
  .scroll-story-active .hero-headline h1 {
    font-size: clamp(38px, 4.6vw, 54px);
  }
}

/* MOBILE VIEW ONLY (< 768px): Completely disable hero section scrolling animation */
@media (max-width: 767px) {
  .hero-scroll-story,
  .hero-scroll-story.scroll-story-active {
    height: auto !important;
  }
  .hero-showcase,
  .scroll-story-active .hero-showcase {
    position: relative !important;
    top: auto !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow: hidden !important;
    padding-bottom: 65px !important;
  }
  .scroll-story-active .hero-inner,
  .hero-inner {
    padding-top: 0 !important;
    min-height: 0 !important;
    height: auto !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
  }
  .hero-copy-column,
  .scroll-story-active .hero-copy-column {
    max-width: 100% !important;
    width: 100% !important;
    padding-top: clamp(112px, 24vw, 135px) !important;
    padding-bottom: 15px !important;
    position: relative !important;
    z-index: 5 !important;
  }
  .hero-copy-column .hero-intro,
  .scroll-story-active .hero-copy-column .hero-intro {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    margin: 0 !important;
    max-width: 100% !important;
  }
  .hero-copy-column .hero-overline,
  .hero-copy-column .hero-headline,
  .hero-copy-column .hero-intro,
  .scroll-story-active .hero-copy-column .hero-overline,
  .scroll-story-active .hero-copy-column .hero-headline,
  .scroll-story-active .hero-copy-column .hero-intro {
    opacity: 1 !important;
    transform: none !important;
  }
  .hero-headline h1 {
    font-size: clamp(32px, 8.5vw, 46px) !important;
    line-height: 1 !important;
  }
  .hero-machine-stage,
  .scroll-story-active .hero-machine-stage {
    position: relative !important;
    inset: auto !important;
    transform: none !important;
    width: 100% !important;
    max-width: 320px !important;
    height: auto !important;
    margin: 10px auto 25px auto !important;
    opacity: 1 !important;
    pointer-events: auto !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    align-self: center !important;
  }
  .scroll-lift-rig,
  .scroll-story-active .scroll-lift-rig {
    display: none !important;
  }
  .hero-machine,
  .scroll-story-active.rig-mounted .hero-machine {
    position: relative !important;
    inset: auto !important;
    display: block !important;
    width: 100% !important;
    max-width: 300px !important;
    height: auto !important;
    max-height: 270px !important;
    object-fit: contain !important;
    margin: 0 auto !important;
    transform: none !important;
    animation: machine-float 5s ease-in-out infinite !important;
  }
  .hero-machine-halo,
  .hero-machine-shadow {
    display: none !important;
  }
  .story-controls,
  .story-progress,
  .story-chapters,
  .story-stage-label,
  .hero-scroll {
    display: none !important;
  }
}

@media (max-width: 480px) {
  .hero-showcase,
  .scroll-story-active .hero-showcase {
    min-height: auto !important;
    padding-bottom: 58px !important;
  }
  .hero-copy-column,
  .scroll-story-active .hero-copy-column {
    padding-top: clamp(108px, 26vw, 130px) !important;
    padding-bottom: 12px !important;
  }
  .hero-headline h1 {
    font-size: clamp(28px, 8.2vw, 38px) !important;
  }
  .hero-machine-stage,
  .scroll-story-active .hero-machine-stage {
    width: 100% !important;
    max-width: 280px !important;
    height: auto !important;
    margin: 8px auto 20px auto !important;
    opacity: 1 !important;
  }
  .hero-machine,
  .scroll-story-active.rig-mounted .hero-machine {
    max-width: 260px !important;
    max-height: 235px !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-scroll-story.scroll-story-active {
    height: auto;
  }
  .scroll-story-active .hero-showcase {
    position: relative;
  }
  .scroll-story-active .scroll-lift-rig,
  .scroll-story-active .story-controls,
  .scroll-story-active .story-caption {
    display: none;
  }
  .scroll-story-active .hero-machine {
    display: block !important;
  }
}

/* ==========================================================================
   HERO QUICK FLOATING ACTIONS (WHATSAPP & CALL) — BOTTOM RIGHT CIRCLES
   Pure floating circular action icons with luminous gradients & micro-interactions
   ========================================================================== */

.hero-quick-floating {
  position: fixed !important;
  right: clamp(18px, 3.2vw, 36px) !important;
  bottom: clamp(24px, 4vh, 36px) !important;
  z-index: 9999 !important;
  display: flex !important;
  flex-direction: column;
  gap: 13px;
  align-items: center;
  user-select: none;
  animation: hero-circle-enter 0.85s cubic-bezier(0.16, 1, 0.3, 1) backwards;
  animation-delay: 0.45s;
}

@keyframes hero-circle-enter {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.85);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Base Floating Circle Button */
.hero-float-btn {
  position: relative;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), 
              box-shadow 0.28s cubic-bezier(0.16, 1, 0.3, 1),
              filter 0.25s ease;
}

.hero-float-btn .float-icon {
  display: block;
  transition: transform 0.25s ease;
}

/* WhatsApp Floating Circle */
.hero-float-btn.float-btn-whatsapp {
  background: linear-gradient(135deg, #25D366 0%, #16a34a 100%);
  color: #ffffff;
  border: 1.5px solid rgba(255, 255, 255, 0.35);
  box-shadow: 
    0 10px 24px rgba(37, 211, 102, 0.45),
    0 2px 6px rgba(0, 0, 0, 0.35),
    inset 0 1px 2px rgba(255, 255, 255, 0.4);
}

.hero-float-btn.float-btn-whatsapp:hover {
  background: linear-gradient(135deg, #2ae66f 0%, #19b854 100%);
  transform: translateY(-3px) scale(1.08);
  box-shadow: 
    0 14px 32px rgba(37, 211, 102, 0.65),
    0 0 20px rgba(37, 211, 102, 0.45),
    inset 0 1px 2px rgba(255, 255, 255, 0.6);
}

.hero-float-btn.float-btn-whatsapp:hover .float-icon {
  transform: scale(1.12) rotate(-8deg);
}

/* Phone Call Floating Circle */
.hero-float-btn.float-btn-call {
  background: linear-gradient(135deg, #ffc629 0%, #e5a912 100%);
  color: #121514;
  border: 1.5px solid rgba(255, 255, 255, 0.45);
  box-shadow: 
    0 10px 24px rgba(255, 198, 41, 0.48),
    0 2px 6px rgba(0, 0, 0, 0.35),
    inset 0 1px 2px rgba(255, 255, 255, 0.5);
}

.hero-float-btn.float-btn-call:hover {
  background: linear-gradient(135deg, #ffd352 0%, #f3b216 100%);
  transform: translateY(-3px) scale(1.08);
  box-shadow: 
    0 14px 32px rgba(255, 198, 41, 0.68),
    0 0 20px rgba(255, 198, 41, 0.45),
    inset 0 1px 2px rgba(255, 255, 255, 0.65);
}

.hero-float-btn.float-btn-call:hover .float-icon {
  animation: phone-shake 0.45s ease-in-out infinite;
}

@keyframes phone-shake {
  0%, 100% { transform: rotate(0deg); }
  25% { transform: rotate(-14deg); }
  75% { transform: rotate(14deg); }
}

/* Subtle Interactive Hover Tooltip (Appears to Left) */
.hero-float-btn .float-tooltip {
  position: absolute;
  right: calc(100% + 12px);
  top: 50%;
  transform: translateY(-50%) translateX(6px);
  background: rgba(14, 20, 22, 0.94);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.16);
  padding: 5px 11px;
  border-radius: 7px;
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.02em;
  white-space: nowrap;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.hero-float-btn .float-tooltip:after {
  content: '';
  position: absolute;
  left: 100%;
  top: 50%;
  transform: translateY(-50%);
  border-width: 5px;
  border-style: solid;
  border-color: transparent transparent transparent rgba(14, 20, 22, 0.94);
}

.hero-float-btn:hover .float-tooltip {
  opacity: 1;
  transform: translateY(-50%) translateX(0);
}

/* Responsive Adaptations */
@media (max-width: 960px) {
  .hero-quick-floating {
    position: fixed !important;
    right: 18px !important;
    bottom: 24px !important;
    z-index: 9999 !important;
    gap: 11px;
  }
  .hero-float-btn {
    width: 48px;
    height: 48px;
  }
  .hero-float-btn .float-icon {
    width: 21px;
    height: 21px;
  }
}

@media (max-width: 680px) {
  .hero-quick-floating {
    position: fixed !important;
    right: 14px !important;
    bottom: 20px !important;
    z-index: 9999 !important;
    gap: 10px;
  }
  .hero-float-btn {
    width: 46px;
    height: 46px;
  }
  .hero-float-btn .float-icon {
    width: 20px;
    height: 20px;
  }
  .hero-float-btn .float-tooltip {
    display: none;
  }
}
