/* ============================================================
   逐步小工单 — Industrial Manufacturing Design System
   Steel / Gunmetal / Safety Amber
   ============================================================ */

/* ---------- Custom Scrollbar (industrial) ---------- */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: #1a1a1a;
}
::-webkit-scrollbar-thumb {
  background: #444;
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: #f59e0b;
}

/* ---------- Base ---------- */
html {
  scroll-behavior: smooth;
}
body {
  background: #1a1a1a;
  color: #cbd5e1;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans SC", sans-serif;
  overflow-x: hidden;
  transition: background 0.4s ease, color 0.4s ease;
}

/* ---------- Industrial Diamond Plate Texture ---------- */
.hero-dot-pattern {
  background-image:
    radial-gradient(circle, rgba(245, 158, 11, 0.12) 1px, transparent 1px),
    repeating-linear-gradient(
      0deg, transparent, transparent 2px,
      rgba(255,255,255,0.008) 2px, rgba(255,255,255,0.008) 4px
    );
  background-size: 24px 24px, 100% 100%;
}

/* ---------- Caution Stripe Pattern ---------- */
.caution-stripe {
  background: repeating-linear-gradient(
    -45deg,
    #f59e0b 0px, #f59e0b 8px,
    #1a1a1a 8px, #1a1a1a 16px
  );
}

/* ---------- Industrial Panel Cards ---------- */
.glass-card {
  background: linear-gradient(180deg, #2a2a2a 0%, #222 100%);
  border: 1px solid #3a3a3a;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.03),
    0 4px 20px rgba(0,0,0,0.3);
  position: relative;
}
.glass-card::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: repeating-linear-gradient(
    0deg, transparent, transparent 2px,
    rgba(0,0,0,0.03) 2px, rgba(0,0,0,0.03) 4px
  );
  pointer-events: none;
  border-radius: inherit;
}
.glass-card-strong {
  background: linear-gradient(180deg, #333 0%, #2a2a2a 100%);
  border: 1px solid #4a4a4a;
  box-shadow:
    inset 0 2px 0 rgba(255,255,255,0.04),
    0 4px 24px rgba(0,0,0,0.4);
}

/* ---------- Industrial Rivet Corner Accents ---------- */
.industrial-rivet::before {
  content: '';
  position: absolute;
  top: 8px; left: 8px;
  width: 8px; height: 8px;
  background: radial-gradient(circle at 40% 40%, #888, #444);
  border-radius: 50%;
  box-shadow: 0 0 4px rgba(0,0,0,0.5);
  z-index: 2;
}
.industrial-rivet::after {
  content: '';
  position: absolute;
  top: 8px; right: 8px;
  width: 8px; height: 8px;
  background: radial-gradient(circle at 40% 40%, #888, #444);
  border-radius: 50%;
  box-shadow: 0 0 4px rgba(0,0,0,0.5);
  z-index: 2;
}

/* ---------- Glow Orb Animations (industrial heater glow) ---------- */
@keyframes float-orb-1 {
  0%, 100% { transform: translate(0, 0) scale(1); opacity: 0.4; }
  25% { transform: translate(40px, -60px) scale(1.1); opacity: 0.6; }
  50% { transform: translate(-20px, -120px) scale(0.9); opacity: 0.3; }
  75% { transform: translate(-50px, -40px) scale(1.05); opacity: 0.5; }
}
@keyframes float-orb-2 {
  0%, 100% { transform: translate(0, 0) scale(1); opacity: 0.3; }
  33% { transform: translate(-60px, -80px) scale(1.15); opacity: 0.5; }
  66% { transform: translate(30px, -40px) scale(0.85); opacity: 0.25; }
}
@keyframes float-orb-3 {
  0%, 100% { transform: translate(0, 0) scale(1); opacity: 0.25; }
  50% { transform: translate(50px, -100px) scale(1.2); opacity: 0.45; }
}
.orb-1 { animation: float-orb-1 8s ease-in-out infinite; }
.orb-2 { animation: float-orb-2 10s ease-in-out infinite; }
.orb-3 { animation: float-orb-3 7s ease-in-out infinite; }

/* ---------- Card Hover (industrial - lifts & glows edge) ---------- */
.card-glow {
  transition: border-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
}
.card-glow:hover {
  border-color: rgba(245, 158, 11, 0.5);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.05),
    0 0 30px rgba(245, 158, 11, 0.12),
    0 10px 40px rgba(0,0,0,0.4);
  transform: translateY(-4px);
}

/* ---------- Counter ---------- */
.counter {
  font-variant-numeric: tabular-nums;
}

/* ---------- Glow Text ---------- */
.text-glow-amber {
  text-shadow: 0 0 16px rgba(245, 158, 11, 0.5), 0 0 32px rgba(245, 158, 11, 0.15);
}
.glow-text {
  text-shadow: 0 0 16px rgba(245, 158, 11, 0.5), 0 0 32px rgba(245, 158, 11, 0.15);
}

/* ---------- Section Heading Accent Bar (industrial steel) ---------- */
.section-accent-bar {
  width: 4px;
  height: 32px;
  background: linear-gradient(180deg, #f59e0b, #f97316);
  border-radius: 2px;
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.3);
}

/* ---------- Industrial Buttons ---------- */
.btn-amber {
  background: linear-gradient(180deg, #f59e0b 0%, #d97706 100%);
  color: #111;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  font-size: 0.85rem;
  border: 1px solid #b45309;
  box-shadow:
    0 2px 0 #b45309,
    0 4px 16px rgba(245, 158, 11, 0.2);
  transition: all 0.2s ease;
  position: relative;
}
.btn-amber:hover {
  background: linear-gradient(180deg, #fbbf24 0%, #f59e0b 100%);
  box-shadow:
    0 2px 0 #d97706,
    0 6px 24px rgba(245, 158, 11, 0.35);
  transform: translateY(-1px);
}
.btn-amber:active {
  transform: translateY(1px);
  box-shadow: 0 0 0 #b45309, 0 2px 8px rgba(245, 158, 11, 0.2);
}
.btn-outline-amber {
  border: 2px solid #f59e0b;
  color: #f59e0b;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  font-size: 0.85rem;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}
.btn-outline-amber::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(245, 158, 11, 0.08);
  transform: translateX(-100%);
  transition: transform 0.3s ease;
}
.btn-outline-amber:hover {
  border-color: #fbbf24;
  color: #fbbf24;
  box-shadow: 0 0 20px rgba(245, 158, 11, 0.2), inset 0 0 30px rgba(245, 158, 11, 0.05);
}
.btn-outline-amber:hover::before {
  transform: translateX(0);
}

/* ---------- Icon Circle ---------- */
.icon-circle-amber {
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.3);
  color: #f59e0b;
  box-shadow: inset 0 0 15px rgba(245, 158, 11, 0.05);
}

/* ---------- Step Tabs ---------- */
.step-tab {
  position: relative;
  transition: all 0.3s ease;
  color: #8899aa;
}
.step-tab.active {
  color: #f59e0b;
  border-bottom-color: #f59e0b;
  background: rgba(245, 158, 11, 0.06);
}
.step-tab::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 2px;
  background: #f59e0b;
  transition: width 0.3s ease;
  box-shadow: 0 0 8px rgba(245, 158, 11, 0.5);
}
.step-tab.active::after {
  width: 60%;
}
.step-tab:hover:not(.active) {
  color: #fbbf24;
  background: rgba(245, 158, 11, 0.03);
}
.step-panel {
  display: none;
  animation: fadeInUp 0.4s ease;
}
.step-panel.active {
  display: block;
}
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---------- Scroll Reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.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; }
.reveal-delay-4 { transition-delay: 0.4s; }
.reveal-delay-5 { transition-delay: 0.5s; }

/* ---------- Swiper ---------- */
.swiper { width: 100%; }
.swiper-pagination-bullet {
  background: #555 !important;
  opacity: 1 !important;
  width: 10px !important;
  height: 10px !important;
  transition: all 0.3s ease;
}
.swiper-pagination-bullet-active {
  background: #f59e0b !important;
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.5);
  width: 28px !important;
  border-radius: 5px !important;
}
.swiper-button-prev,
.swiper-button-next {
  color: #f59e0b !important;
  opacity: 0.7;
  transition: opacity 0.3s ease;
}
.swiper-button-prev:hover,
.swiper-button-next:hover {
  opacity: 1;
}
.swiper-button-prev::after,
.swiper-button-next::after {
  font-size: 24px !important;
  font-weight: bold;
}
@media (max-width: 768px) {
  .swiper-button-prev,
  .swiper-button-next {
    display: none !important;
  }
}

/* ---------- Form Input ---------- */
.form-input-dark {
  background: #1a1a1a;
  border: 1px solid #3a3a3a;
  color: #e2e8f0;
  transition: all 0.3s ease;
}
.form-input-dark::placeholder {
  color: #666;
}
.form-input-dark:focus {
  outline: none;
  border-color: #f59e0b;
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.12), inset 0 0 10px rgba(245, 158, 11, 0.05);
  background: #222;
}

/* ---------- Back to Top ---------- */
#backToTop {
  background: linear-gradient(180deg, #f59e0b, #d97706);
  color: #111;
  border: 1px solid #b45309;
  box-shadow: 0 4px 20px rgba(245, 158, 11, 0.25);
  transition: all 0.3s ease;
}
#backToTop:hover {
  box-shadow: 0 6px 30px rgba(245, 158, 11, 0.4);
  transform: translateY(-2px);
}
#backToTop.visible {
  opacity: 1 !important;
  visibility: visible !important;
}

/* ---------- Tags ---------- */
.tag-amber {
  background: rgba(245, 158, 11, 0.1);
  color: #f59e0b;
  border: 1px solid rgba(245, 158, 11, 0.25);
  font-weight: 600;
  letter-spacing: 0.5px;
}

/* ---------- Accent Borders ---------- */
.border-accent-purple { border-left: 3px solid #a855f7; }
.border-accent-green { border-left: 3px solid #34d399; }
.border-accent-blue { border-left: 3px solid #38bdf8; }
.border-accent-orange { border-left: 3px solid #f97316; }
.border-accent-pink { border-left: 3px solid #f472b6; }

/* ---------- Navbar Scroll Shadow ---------- */
#navbar.scrolled {
  box-shadow: 0 4px 20px rgba(0,0,0,0.5);
}

/* ---------- Toast ---------- */
.toast {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%) translateY(-100px);
  background: linear-gradient(180deg, #f59e0b, #d97706);
  color: #111;
  padding: 12px 24px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 14px;
  z-index: 9999;
  border: 1px solid #b45309;
  box-shadow: 0 8px 30px rgba(245, 158, 11, 0.3);
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  pointer-events: none;
}
.toast.show {
  transform: translateX(-50%) translateY(0);
}

/* ============================================================
   INDUSTRIAL DECORATIVE ELEMENTS
   ============================================================ */

/* Gear background pattern */
.gear-pattern {
  position: relative;
}
.gear-pattern::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 20% 30%, rgba(245, 158, 11, 0.03) 0%, transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(245, 158, 11, 0.03) 0%, transparent 50%);
  pointer-events: none;
}

/* Caution stripe divider */
.caution-divider {
  height: 4px;
  background: repeating-linear-gradient(
    -45deg,
    #f59e0b 0px, #f59e0b 6px,
    #1a1a1a 6px, #1a1a1a 12px
  );
  border: none;
  margin: 0;
}

/* Industrial inset panel */
.inset-panel {
  background: #151515;
  border: 1px solid #2a2a2a;
  box-shadow: inset 0 2px 8px rgba(0,0,0,0.4);
}

/* ---------- Light Mode (Industrial Workshop) ---------- */
body:not(.dark) {
  background: #e8e4df;
  color: #2a2a2a;
}

body:not(.dark) .text-slate-100 { color: #1a1a1a !important; }
body:not(.dark) .text-slate-200 { color: #222 !important; }
body:not(.dark) .text-slate-300 { color: #333 !important; }
body:not(.dark) .text-slate-400 { color: #555 !important; }
body:not(.dark) .text-slate-500 { color: #777 !important; }

body:not(.dark) .glass-card {
  background: linear-gradient(180deg, #fafaf7 0%, #f0ede8 100%);
  border: 1px solid #d5d0c8;
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
}
body:not(.dark) .glass-card-strong {
  background: linear-gradient(180deg, #fafaf7 0%, #f2efea 100%);
  border: 1px solid #d5d0c8;
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}
body:not(.dark) .card-glow:hover {
  border-color: rgba(245, 158, 11, 0.5);
  box-shadow: 0 0 24px rgba(245, 158, 11, 0.15), 0 8px 32px rgba(0,0,0,0.12);
}

body:not(.dark) .form-input-dark {
  background: #fafaf7;
  border: 1px solid #d5d0c8;
  color: #2a2a2a;
}
body:not(.dark) .form-input-dark::placeholder {
  color: #999;
}
body:not(.dark) .form-input-dark:focus {
  border-color: #f59e0b;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.15);
}

body:not(.dark) .hero-dot-pattern {
  background-image:
    radial-gradient(circle, rgba(245, 158, 11, 0.15) 1px, transparent 1px),
    repeating-linear-gradient(
      0deg, transparent, transparent 2px,
      rgba(0,0,0,0.015) 2px, rgba(0,0,0,0.015) 4px
    );
  background-size: 24px 24px, 100% 100%;
}

body:not(.dark) .icon-circle-amber {
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.3);
  color: #d97706;
}

body:not(.dark) .btn-outline-amber {
  border-color: #d97706;
  color: #d97706;
}
body:not(.dark) .btn-outline-amber:hover {
  border-color: #f59e0b;
  color: #f59e0b;
}

body:not(.dark) .tag-amber {
  background: rgba(245, 158, 11, 0.12);
  color: #b45309;
  border-color: rgba(245, 158, 11, 0.3);
}

body:not(.dark) #stats,
body:not(.dark) #testimonial,
body:not(.dark) #about {
  background: #ded9d2 !important;
}
body:not(.dark) #stats > .absolute,
body:not(.dark) #testimonial > .absolute,
body:not(.dark) #about > .absolute {
  background: #ded9d2 !important;
  background-image: none !important;
}
body:not(.dark) footer {
  background: #ded9d2 !important;
  border-top-color: #d5d0c8 !important;
}
body:not(.dark) footer .text-slate-500 { color: #777 !important; }
body:not(.dark) footer .bg-slate-800 { background: #e8e4df !important; }
body:not(.dark) footer .border-slate-800 { border-color: #d5d0c8 !important; }
body:not(.dark) footer .text-slate-400 { color: #555 !important; }

body:not(.dark) .bg-slate-800\/30 { background: rgba(232, 228, 223, 0.5) !important; }
body:not(.dark) .border-slate-700\/20 { border-color: rgba(213, 208, 200, 0.5) !important; }
body:not(.dark) .bg-slate-900 { background: #ded9d2 !important; }
body:not(.dark) .bg-slate-900\/50 { background: rgba(222, 217, 210, 0.5) !important; }
body:not(.dark) .bg-slate-900\/70 { background: rgba(222, 217, 210, 0.7) !important; }
body:not(.dark) .bg-slate-900\/80 { background: rgba(222, 217, 210, 0.8) !important; }
body:not(.dark) .bg-slate-950 { background: #ded9d2 !important; }
body:not(.dark) .from-slate-950 { --tw-gradient-from: #ded9d2 !important; }
body:not(.dark) .via-slate-900 { --tw-gradient-stops: #ded9d2 !important; }
body:not(.dark) .to-slate-950 { --tw-gradient-to: #ded9d2 !important; }
body:not(.dark) .via-slate-900\/90 { --tw-gradient-stops: rgba(222, 217, 210, 0.9) !important; }
body:not(.dark) .via-slate-900\/80 { --tw-gradient-stops: rgba(222, 217, 210, 0.8) !important; }
body:not(.dark) .from-slate-900\/80 { --tw-gradient-from: rgba(222, 217, 210, 0.8) !important; }
body:not(.dark) .to-slate-900\/80 { --tw-gradient-to: rgba(222, 217, 210, 0.8) !important; }

body:not(.dark) .swiper-pagination-bullet {
  background: #ccc !important;
}

body:not(.dark) .step-tab {
  color: #777;
}

/* ============================================================
   DARK MODE
   ============================================================ */
body.dark {
  background: #1a1a1a;
  color: #9ca3af;
}

body.dark #navbar {
  background: rgba(20, 20, 20, 0.95) !important;
  border-bottom-color: #2a2a2a !important;
}
body.dark #navbar .text-slate-800 { color: #e5e7eb !important; }
body.dark #navbar .text-slate-600 { color: #9ca3af !important; }
body.dark #navbar .text-slate-600:hover { color: #f59e0b !important; }
body.dark #navbar .hover\:bg-slate-100:hover { background: rgba(255,255,255,0.08) !important; }
body.dark #mobileMenuBtn .text-slate-600 { color: #9ca3af !important; }

body.dark::-webkit-scrollbar-track {
  background: #1a1a1a;
}
body.dark::-webkit-scrollbar-thumb {
  background: #444;
}
body.dark::-webkit-scrollbar-thumb:hover {
  background: #f59e0b;
}

body.dark .hero-dot-pattern {
  background-image:
    radial-gradient(circle, rgba(245, 158, 11, 0.08) 1px, transparent 1px),
    repeating-linear-gradient(
      0deg, transparent, transparent 2px,
      rgba(255,255,255,0.01) 2px, rgba(255,255,255,0.01) 4px
    );
  background-size: 24px 24px, 100% 100%;
}

body.dark .glass-card {
  background: linear-gradient(180deg, #2a2a2a 0%, #222 100%);
  border-color: #3a3a3a;
}
body.dark .glass-card-strong {
  background: linear-gradient(180deg, #333 0%, #2a2a2a 100%);
  border-color: #4a4a4a;
}

body.dark .card-glow:hover {
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.05),
    0 0 30px rgba(245, 158, 11, 0.12),
    0 10px 40px rgba(0,0,0,0.4);
}

body.dark .icon-circle-amber {
  color: #f59e0b;
}

body.dark .form-input-dark {
  background: #1a1a1a;
  border-color: #3a3a3a;
  color: #e2e8f0;
}
body.dark .form-input-dark::placeholder {
  color: #666;
}
body.dark .form-input-dark:focus {
  background: #222;
  border-color: #f59e0b;
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.12), inset 0 0 10px rgba(245, 158, 11, 0.05);
}

body.dark .tag-amber {
  color: #f59e0b;
}

body.dark .swiper-pagination-bullet {
  background: #555 !important;
}

body.dark #navbar.scrolled {
  box-shadow: 0 4px 20px rgba(0,0,0,0.6);
}

body.dark #stats,
body.dark #testimonial,
body.dark #about {
  background: #151515;
}
body.dark footer {
  background: #151515;
  border-top-color: #2a2a2a;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1023px) {
  #mobileMenu {
    background: rgba(20, 20, 20, 0.98);
    backdrop-filter: blur(16px);
    border-top: 1px solid #2a2a2a;
  }
  #mobileMenu a {
    color: #9ca3af;
    border-radius: 8px;
  }
  #mobileMenu a:hover {
    color: #f59e0b;
    background: rgba(245, 158, 11, 0.08);
  }
  body:not(.dark) #mobileMenu {
    background: rgba(232, 228, 223, 0.98);
    border-top: 1px solid #d5d0c8;
  }
  body:not(.dark) #mobileMenu a {
    color: #555;
  }
}

@media (max-width: 640px) {
  .hero-headline {
    font-size: 1.75rem;
    line-height: 1.3;
  }
  .hero-subtitle {
    font-size: 0.95rem;
  }
}

@media (max-width: 768px) {
  .glass-card {
    box-shadow: 0 4px 16px rgba(0,0,0,0.2);
  }
}

@media (max-width: 480px) {
  section {
    padding-top: 3rem;
    padding-bottom: 3rem;
  }
}