@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;600;800&display=swap');

:root {
  --primary: #eab308; /* Yellow 500 */
  --secondary: #171717; /* Neutral 900 (Blackish) */
  --accent: #facc15; /* Yellow 400 */
  --text-main: #f8fafc;
  --glass-bg: rgba(23, 23, 23, 0.7); /* Darker glass for better yellow contrast */
  --glass-border: rgba(255, 255, 255, 0.1);
}

html {
  scroll-behavior: smooth;
  font-family: 'Outfit', sans-serif;
}

body {
  background-color: #0a0a0a; /* Very dark background */
  color: var(--text-main);
  overflow-x: hidden;
}

/* Glass Pill Menu (Dynamic Island style) */
.glass-pill {
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

/* Nav links inside magnetic nav */
.mag-link {
  border-radius: 9999px;
}
.mag-link:hover {
  color: #171717 !important; /* Dark text on hover when the yellow pill slides behind it */
}

/* Fullscreen circular reveal utilities */
.transition-clip-path {
  transition-property: clip-path, -webkit-clip-path, pointer-events, background-color;
}

/* (Removed old nav-link styles since we use mag-link and sliding indicator now) */

/* Hero Slider */
.slider-container {
  position: relative;
  width: 100%;
  height: 100vh;
  overflow: hidden;
}
.slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 1s ease-in-out, transform 1.5s ease-in-out;
  transform: scale(1.05);
  z-index: 1;
}
.slide.active {
  opacity: 1;
  transform: scale(1);
  z-index: 2;
}
.slide-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  filter: brightness(0.35) contrast(1.1); /* Darken image more to make yellow text pop */
}

/* Text Animations in Slider */
.slide-content {
  position: relative;
  z-index: 3;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.slide-text {
  font-family: 'Outfit', sans-serif;
  font-size: 5rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: linear-gradient(to right, #ffffff, #d4d4d8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  opacity: 0;
  transform: translateY(60px) scale(0.95);
  transition: all 1.2s cubic-bezier(0.25, 1, 0.5, 1) 0.5s;
  filter: drop-shadow(0 15px 25px rgba(0, 0, 0, 0.9));
}
.slide.active .slide-text {
  opacity: 1;
  transform: translateY(0) scale(1);
}
@media (max-width: 768px) {
  .slide-text {
    font-size: 2.5rem;
    padding: 0 20px;
    letter-spacing: 0.05em;
  }
}

/* Bento Grid Cards (Glassmorphism) */
.bento-card {
  background: rgba(38, 38, 38, 0.4);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--glass-border);
  border-radius: 1.5rem;
  padding: 2.5rem;
  transition: transform 0.4s ease, box-shadow 0.4s ease, border-color 0.4s ease;
  position: relative;
  overflow: hidden;
}
.bento-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 50%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.03), transparent);
  transform: skewX(-20deg);
  transition: 0.5s;
}
.bento-card:hover::before {
  left: 150%;
}
.bento-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
  border-color: rgba(250, 204, 21, 0.3); /* Yellow hover border */
}

/* Scroll Reveal Animations */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: all 0.8s cubic-bezier(0.5, 0, 0, 1);
}
.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

/* Form Styles */
.input-field {
  background: rgba(23, 23, 23, 0.6);
  border: 1px solid var(--glass-border);
  color: white;
  transition: all 0.3s ease;
}
.input-field:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 15px rgba(250, 204, 21, 0.2); /* Yellow glow */
}

/* Button Glow Effect */
.btn-glow {
  position: relative;
}
.btn-glow::before {
  content: '';
  position: absolute;
  top: -2px; left: -2px; right: -2px; bottom: -2px;
  background: linear-gradient(45deg, var(--primary), var(--accent), var(--primary));
  z-index: -1;
  border-radius: inherit;
  filter: blur(8px);
  opacity: 0;
  transition: opacity 0.3s ease;
}
.btn-glow:hover::before {
  opacity: 1;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 10px;
}
::-webkit-scrollbar-track {
  background: #0a0a0a;
}
::-webkit-scrollbar-thumb {
  background: #404040;
  border-radius: 5px;
}
::-webkit-scrollbar-thumb:hover {
  background: #525252;
}

/* =========================================
   PRODUCTION FLOW CSS DIAGRAM
   ========================================= */

.flow-container {
  width: 100%;
  padding: 2rem 0;
  perspective: 1000px;
}

.flow-grid {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
  position: relative;
  margin: 0 auto;
}

/* Common Node Styles */
.flow-node {
  background: rgba(23, 23, 23, 0.8);
  backdrop-filter: blur(10px);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  padding: 1rem 2rem;
  text-align: center;
  font-weight: 600;
  position: relative;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow: 0 10px 25px rgba(0,0,0,0.5);
  z-index: 10;
}

.flow-node:hover {
  transform: translateY(-5px) scale(1.05);
  box-shadow: 0 15px 35px rgba(0,0,0,0.7);
  border-color: rgba(255,255,255,0.3);
}

/* Top & Bottom Rows */
.flow-top-row, .flow-bottom-row {
  display: flex;
  justify-content: center;
  gap: 3rem;
  width: 100%;
}

.support-node {
  min-width: 140px;
}

/* Main Pipeline (Horizontal Center) */
.flow-main-pipeline {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  width: 100%;
  position: relative;
}

.flow-core-zone {
  display: flex;
  align-items: center;
  justify-content: space-around;
  background: linear-gradient(90deg, rgba(234,179,8,0.1), rgba(234,179,8,0.3), rgba(234,179,8,0.1));
  border: 1px solid rgba(234,179,8,0.4);
  box-shadow: inset 0 0 50px rgba(234,179,8,0.1), 0 0 30px rgba(234,179,8,0.15);
  border-radius: 16px;
  padding: 2.5rem;
  min-width: 500px;
  position: relative;
  z-index: 5;
}

/* Core Nodes */
.core-node {
  background: rgba(82, 82, 82, 0.8);
  color: #fff;
  font-size: 1.1rem;
  border-color: rgba(255,255,255,0.2);
}
.core-node:hover {
  background: rgba(115, 115, 115, 0.9);
  border-color: var(--primary);
  box-shadow: 0 0 25px rgba(234,179,8,0.4);
}

/* Vertical Nodes (Start & End) */
.flow-vertical-node {
  background: linear-gradient(180deg, #333, #111);
  border: 1px solid #555;
  border-radius: 8px;
  padding: 2rem 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 10;
  box-shadow: 0 10px 20px rgba(0,0,0,0.8);
}
.vertical-text {
  writing-mode: vertical-rl;
  text-orientation: mixed;
  transform: rotate(180deg);
  text-align: center;
  font-weight: 800;
  font-size: 1.2rem;
  letter-spacing: 2px;
  color: #ccc;
  text-transform: uppercase;
}

/* ================== ARROWS & LINES ================== */

/* Horizontal Arrow */
.flow-arrow-right {
  position: absolute;
  top: 50%;
  right: -60px;
  width: 60px;
  height: 3px;
  background: rgba(255,255,255,0.3);
  transform: translateY(-50%);
  z-index: 1;
}
.flow-arrow-right::after {
  content: '';
  position: absolute;
  right: -5px;
  top: -6px;
  border-top: 7px solid transparent;
  border-bottom: 7px solid transparent;
  border-left: 10px solid rgba(255,255,255,0.5);
}

/* Inner Arrow between core nodes */
.inner-arrow {
  right: -85px;
  width: 85px;
}

/* Arrow before Customer Satisfaction */
.entry-arrow {
  left: -80px;
  width: 80px;
  right: auto;
}
.entry-arrow::after {
  right: -5px;
}

/* Vertical Lines from Support nodes */
.flow-line-down, .flow-line-up {
  position: absolute;
  left: 50%;
  width: 2px;
  height: 45px;
  background: rgba(255,255,255,0.2);
  transform: translateX(-50%);
  z-index: 1;
}
.flow-line-down {
  bottom: -45px;
}
.flow-line-down::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: -4px;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 8px solid rgba(255,255,255,0.4);
}

.flow-line-up {
  top: -45px;
}
.flow-line-up::after {
  content: '';
  position: absolute;
  top: -5px;
  left: -4px;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-bottom: 8px solid rgba(255,255,255,0.4);
}

/* ================== ENERGY FLOW ANIMATION ================== */
/* We add a glowing pseudo-element that travels along the lines */

@keyframes energyFlowHorizontal {
  0% { left: 0; opacity: 0; }
  10% { opacity: 1; box-shadow: 0 0 10px 2px var(--primary); }
  90% { opacity: 1; box-shadow: 0 0 10px 2px var(--primary); }
  100% { left: 100%; opacity: 0; }
}

@keyframes energyFlowVerticalDown {
  0% { top: 0; opacity: 0; }
  10% { opacity: 1; box-shadow: 0 0 10px 2px #4ade80; }
  90% { opacity: 1; box-shadow: 0 0 10px 2px #4ade80; }
  100% { top: 100%; opacity: 0; }
}

@keyframes energyFlowVerticalUp {
  0% { bottom: 0; opacity: 0; }
  10% { opacity: 1; box-shadow: 0 0 10px 2px #60a5fa; }
  90% { opacity: 1; box-shadow: 0 0 10px 2px #60a5fa; }
  100% { bottom: 100%; opacity: 0; }
}

.flow-arrow-right::before,
.flow-line-down::before,
.flow-line-up::before {
  content: '';
  position: absolute;
  background: #fff;
  border-radius: 50%;
  z-index: 2;
}

.flow-arrow-right::before {
  top: -1px;
  width: 5px;
  height: 5px;
  animation: energyFlowHorizontal 2s infinite linear;
}

.flow-line-down::before {
  left: -1.5px;
  width: 5px;
  height: 5px;
  animation: energyFlowVerticalDown 2s infinite linear 0.5s;
}

.flow-line-up::before {
  left: -1.5px;
  width: 5px;
  height: 5px;
  animation: energyFlowVerticalUp 2s infinite linear 1s;
}

/* =========================================
   SERVICES PAGE STYLES
   ========================================= */

.service-card {
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 20px;
  padding: 2.5rem 2rem;
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: radial-gradient(circle at top right, rgba(234,179,8,0.1), transparent 70%);
  z-index: -1;
  opacity: 0;
  transition: opacity 0.5s ease;
}

.service-card:hover {
  transform: translateY(-10px) scale(1.02);
  border-color: rgba(234, 179, 8, 0.3);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5), 0 0 20px rgba(234, 179, 8, 0.1);
}

.service-card:hover::before {
  opacity: 1;
}

.service-icon {
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, rgba(234,179,8,0.2), rgba(234,179,8,0.05));
  border: 1px solid rgba(234,179,8,0.2);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  color: #eab308;
  margin-bottom: 1.5rem;
  transition: all 0.5s ease;
  box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.service-card:hover .service-icon {
  transform: scale(1.1) rotate(5deg);
  background: linear-gradient(135deg, rgba(234,179,8,0.4), rgba(234,179,8,0.1));
  color: #fde047;
  box-shadow: 0 0 20px rgba(234,179,8,0.4);
}

.service-title {
  color: #fff;
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 1rem;
  line-height: 1.4;
}

.service-desc {
  color: #9ca3af;
  font-size: 0.95rem;
  line-height: 1.6;
}

/* Equipment Grid Item Hover effect */
.eq-item {
  transform: translateZ(0); /* Hardware acceleration */
}
.eq-item:hover {
  box-shadow: 0 10px 25px rgba(234,179,8,0.1);
}

/* =========================================
   PRODUCT GALLERY STYLES
   ========================================= */

/* The Masonry Container uses CSS Grid with dense packing */
.gallery-masonry {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  grid-auto-rows: 250px;
  grid-auto-flow: dense;
  gap: 1.5rem;
}

/* Base masonry item */
.masonry-item {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
  transition: all 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  background: #111;
  /* Start span 1 */
  grid-column: span 1;
  grid-row: span 1;
}

/* Different sizes for masonry effect */
.masonry-item-large {
  grid-column: span 2;
  grid-row: span 2;
}

@media (max-width: 768px) {
  .masonry-item-large {
    grid-column: span 1;
    grid-row: span 1;
  }
}

.masonry-item-tall {
  grid-row: span 2;
}

.masonry-item-wide {
  grid-column: span 2;
}

@media (max-width: 768px) {
  .masonry-item-wide {
    grid-column: span 1;
  }
}

/* Image wrapper */
.masonry-image-wrapper {
  width: 100%;
  height: 100%;
  position: relative;
}

.masonry-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s ease;
  filter: grayscale(20%);
}

/* Overlay for hover */
.masonry-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.9), transparent);
  opacity: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.4s ease;
}

/* 3D Magnetic Hover Effect */
.masonry-item:hover {
  z-index: 10;
  transform: scale(1.03) translateY(-10px);
  box-shadow: 0 25px 50px rgba(234,179,8,0.2), 0 0 20px rgba(234,179,8,0.1);
  border: 1px solid rgba(234,179,8,0.3);
}

.masonry-item:hover .masonry-img {
  transform: scale(1.1);
  filter: grayscale(0%);
}

.masonry-item:hover .masonry-overlay {
  opacity: 1;
}

/* Cinematic dimmer effect: When hovering masonry container, dim all non-hovered items */
.gallery-masonry:hover .masonry-item:not(:hover) {
  opacity: 0.4;
  filter: blur(2px) grayscale(80%);
}

/* =========================================
   CUSTOMER SCROLLER STYLES (DUAL TRACK)
   ========================================= */

.scroller-track {
  display: flex;
  width: max-content;
  will-change: transform;
}

.track-left {
  animation: scrollLeft 40s linear infinite;
}

.track-right {
  /* Starts shifted and moves back to 0 for right-scrolling effect */
  animation: scrollRight 40s linear infinite;
}

/* Pause animation on hover for both tracks */
.scroller-container:hover .track-left,
.scroller-container:hover .track-right {
  animation-play-state: paused;
}

@keyframes scrollLeft {
  0% { transform: translateX(0); }
  100% { transform: translateX(calc(-50% - 20px)); }
}

@keyframes scrollRight {
  0% { transform: translateX(calc(-50% - 20px)); }
  100% { transform: translateX(0); }
}

/* 3D Perspective for the container */
.perspective-1000 {
  perspective: 1000px;
}


