/* ============================================
   S TECH QUALITY PARTS — Premium Light Theme
   Clean White + Blue Accent (#2563eb)
   ============================================ */

:root {
  --bg-primary: #ffffff;
  --bg-secondary: #f8fafc;
  --bg-card: #ffffff;
  --bg-elevated: #f1f5f9;
  --bg-hero: linear-gradient(135deg, #f0f4ff 0%, #e8f0fe 50%, #f8fafc 100%);
  
  --accent: #2563eb;
  --accent-hover: #1d4ed8;
  --accent-light: #3b82f6;
  --accent-glow: rgba(37, 99, 235, 0.15);
  --accent-soft: rgba(37, 99, 235, 0.06);
  --accent-gradient: linear-gradient(135deg, #2563eb 0%, #3b82f6 50%, #60a5fa 100%);
  
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  
  --border: rgba(0, 0, 0, 0.06);
  --border-hover: rgba(37, 99, 235, 0.25);
  
  --section-py: clamp(4rem, 8vw, 7rem);
  --container: 1280px;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: 'Montserrat', sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  overflow-x: hidden;
  line-height: 1.7;
}

img { max-width: 100%; height: auto; display: block; }
a { text-decoration: none; color: inherit; }

.container { max-width: var(--container); margin: 0 auto; padding: 0 1.5rem; }

/* ---- Glass Effects (Light) ---- */
.glass-nav {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--border);
}

.glass-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 1.25rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04), 0 4px 20px rgba(0,0,0,0.03);
  transition: all 0.5s var(--ease-out);
}

.glass-card:hover {
  border-color: var(--border-hover);
  box-shadow: 0 8px 40px rgba(37, 99, 235, 0.08), 0 1px 3px rgba(0,0,0,0.04);
  transform: translateY(-4px);
}

/* ---- Metallic Card (Light) ---- */
.metallic-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 1.25rem;
  overflow: hidden;
  transition: all 0.5s var(--ease-out);
  position: relative;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.metallic-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--accent-gradient);
  opacity: 0;
  transition: opacity 0.5s;
}

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

.metallic-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-6px);
  box-shadow: 0 20px 60px -15px rgba(37, 99, 235, 0.12), 0 1px 3px rgba(0,0,0,0.04);
}

/* ---- Section Headers ---- */
.section-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.3em;
  color: var(--accent);
  display: flex;
  align-items: center;
  gap: 1rem;
}

.section-label::before {
  content: '';
  width: 2rem;
  height: 2px;
  background: var(--accent-gradient);
  border-radius: 2px;
}

.section-title {
  font-size: clamp(2rem, 5vw, 3.25rem);
  font-weight: 900;
  line-height: 1.1;
  color: var(--text-primary);
}

.section-title .highlight {
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ---- Buttons ---- */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.875rem 2rem;
  border-radius: 0.75rem;
  font-weight: 700;
  font-size: 0.875rem;
  color: white;
  background: var(--accent-gradient);
  border: none;
  cursor: pointer;
  transition: all 0.4s var(--ease-out);
  position: relative;
  overflow: hidden;
}

.btn-primary::before {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 100%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transition: left 0.6s;
}

.btn-primary:hover::before { left: 100%; }
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px var(--accent-glow);
}

.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.875rem 2rem;
  border-radius: 0.75rem;
  font-weight: 700;
  font-size: 0.875rem;
  color: var(--text-primary);
  background: transparent;
  border: 1px solid var(--border);
  cursor: pointer;
  transition: all 0.4s var(--ease-out);
}

.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-soft);
  transform: translateY(-2px);
}

/* ---- Counters ---- */
.counter-value {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 900;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ---- 3D Hero ---- */
.hero-3d-wrapper { perspective: 1200px; }
.hero-3d-image {
  transform-style: preserve-3d;
  transition: transform 0.3s ease-out;
  will-change: transform;
}

/* ---- Particles ---- */
#particles-canvas {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

/* ---- Glow Orbs (Light) ---- */
.glow-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.12;
  animation: float 8s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(30px, -30px) scale(1.1); }
  66% { transform: translate(-20px, 20px) scale(0.9); }
}

/* ---- Loading Screen ---- */
.loading-screen {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--bg-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.6s, visibility 0.6s;
}

.loading-screen.hidden { opacity: 0; visibility: hidden; }

.gear-spinner {
  width: 50px; height: 50px;
  border: 3px solid var(--bg-elevated);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ---- Scroll Reveal ---- */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s var(--ease-out);
}
.reveal.active { opacity: 1; transform: translateY(0); }

/* ---- Dot Pattern ---- */
.dot-pattern {
  background-image: radial-gradient(circle at 1px 1px, rgba(0,0,0,0.05) 1px, transparent 0);
  background-size: 24px 24px;
}

/* ---- Form Inputs ---- */
.form-input {
  width: 100%;
  padding: 0.875rem 1.25rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.875rem;
  outline: none;
  transition: all 0.3s;
}

.form-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
  background: var(--bg-card);
}

.form-input::placeholder { color: var(--text-muted); }

/* ---- Star Rating ---- */
.star { color: #f59e0b; }

/* ---- Animated Border ---- */
.animated-border { position: relative; }
.animated-border::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--accent-gradient);
  animation: borderGlow 3s ease-in-out infinite;
}

@keyframes borderGlow {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 1; }
}

/* ---- Fabrication Journey ---- */
.journey-step {
  position: relative;
  text-align: center;
  padding: 2rem 1.5rem;
}

.journey-step .step-icon {
  width: 80px; height: 80px;
  border-radius: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.25rem;
  font-size: 1.75rem;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid rgba(37, 99, 235, 0.1);
  transition: all 0.4s var(--ease-out);
}

.journey-step:hover .step-icon {
  background: var(--accent);
  color: white;
  transform: translateY(-4px);
  box-shadow: 0 12px 30px var(--accent-glow);
}

.journey-connector {
  position: absolute;
  top: 50%; right: -30%;
  width: 60%; height: 2px;
  background: linear-gradient(90deg, var(--border), var(--accent-glow), var(--border));
}

/* ---- Testimonials Carousel ---- */
.testimonial-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 1.25rem;
  padding: 2rem;
  height: 100%;
}

.swiper-pagination-bullet {
  background: var(--accent) !important;
  opacity: 0.3 !important;
}
.swiper-pagination-bullet-active {
  opacity: 1 !important;
  width: 24px !important;
  border-radius: 12px !important;
}

/* ---- Gallery Masonry ---- */
.gallery-masonry {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 200px;
  gap: 1rem;
}

.gallery-masonry .gallery-item { 
  border-radius: 1rem;
  overflow: hidden;
  position: relative;
}

.gallery-masonry .gallery-item:nth-child(4n+1) { grid-row: span 2; }
.gallery-masonry .gallery-item:nth-child(4n+3) { grid-column: span 2; }
.gallery-masonry .gallery-item:nth-child(7n+1) { grid-row: span 2; grid-column: span 2; }

.gallery-masonry .gallery-item img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.7s var(--ease-out);
}

.gallery-masonry .gallery-item:hover img { transform: scale(1.08); }

.gallery-masonry .gallery-item .overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.6), transparent);
  opacity: 0;
  transition: opacity 0.4s;
  display: flex;
  align-items: flex-end;
  padding: 1.5rem;
}

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

@media (max-width: 768px) {
  .gallery-masonry {
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: 150px;
  }
  .journey-connector { display: none; }
}

/* ---- Custom Scrollbar (Light) ---- */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-secondary); }
::-webkit-scrollbar-thumb { background: rgba(37, 99, 235, 0.2); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }
