/* =============================================
   Rig N Dig - Custom Industrial CSS
   ============================================= */

:root {
  --navy-950: #050810;
  --navy-900: #0a0e1a;
  --navy-800: #111827;
  --navy-700: #1a2333;
  --navy-600: #242c3d;
  --navy-500: #2f394d;
  --orange-700: #cc5600;
  --orange-600: #ff6b00;
  --orange-500: #ff8533;
  --orange-400: #ffa366;
  --gray-400: #9ca3af;
  --gray-200: #e5e7eb;
  --gray-100: #f3f4f6;
  
  --glass-bg: rgba(26, 35, 51, 0.65);
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
  --industrial-gradient: linear-gradient(135deg, #0a0e1a 0%, #111827 100%);
}

/* ── Base ── */
*, *::before, *::after { box-sizing: border-box; }
body { background: var(--navy-900); color: #e8eaed; scroll-behavior: smooth; }
a { text-decoration: none; }

/* ── Hero Particles ── */
#hero-canvas {
  position: absolute; top: 0; left: 0; width: 100%; height: 100%;
  pointer-events: none; z-index: 0; opacity: .35;
}

/* ── Animated Gear ── */
.gear-animation {
  animation: spin-gear 20s linear infinite;
  transform-origin: center;
  opacity: .06;
}
.gear-animation.reverse { animation-direction: reverse; animation-duration: 30s; }

@keyframes spin-gear {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* ── Hero ── */
.hero-section {
  background: var(--navy-950);
  position: relative; overflow: hidden; min-height: 100vh;
  display: flex; align-items: center;
}
.hero-section::before {
  content: ''; position: absolute; inset: 0;
  background: 
    radial-gradient(circle at 20% 30%, rgba(255,107,0,0.1) 0%, transparent 40%),
    radial-gradient(circle at 80% 70%, rgba(255,107,0,0.05) 0%, transparent 40%);
  z-index: 1;
}
.hero-grid-lines {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,107,0,.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,107,0,.04) 1px, transparent 1px);
  background-size: 80px 80px;
  mask-image: radial-gradient(circle at center, black, transparent 80%);
}

/* ── Glassmorphism ── */
.glass-panel {
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
}
.glass-card {
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.glass-card:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--orange-600);
  transform: translateY(-5px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4), 0 0 20px rgba(255, 107, 0, 0.1);
}

/* ── Orange glow ── */
.glow-orange { box-shadow: 0 0 25px rgba(255,107,0,.4), 0 0 60px rgba(255,107,0,.15); }
.text-glow { text-shadow: 0 0 20px rgba(255,107,0,.5); }

/* ── Cards ── */
.card-dark {
  background: var(--navy-700); border: 1px solid var(--navy-500);
  border-radius: 12px; transition: border-color .2s, transform .2s;
}
.card-dark:hover { border-color: var(--orange-600); transform: translateY(-2px); }

/* ── Product Card ── */
.product-card {
  background: var(--navy-700); border: 1px solid var(--navy-500);
  border-radius: 12px; overflow: hidden; transition: all .3s;
  display: flex; flex-direction: column;
}
.product-card:hover {
  border-color: var(--orange-600);
  box-shadow: 0 8px 30px rgba(255,107,0,.15);
  transform: translateY(-3px);
}
.product-card .product-img {
  width: 100%; height: 200px; object-fit: cover;
  background: var(--navy-600);
}
.product-img-placeholder {
  width: 100%; height: 200px; background: var(--navy-600);
  display: flex; align-items: center; justify-content: center;
  font-size: 3rem; color: var(--navy-500);
}

/* ── Buttons ── */
.btn-primary {
  background: var(--orange-600); color: #fff; font-weight: 600;
  padding: .625rem 1.5rem; border-radius: 8px; border: none;
  cursor: pointer; transition: background .2s, transform .1s;
  display: inline-flex; align-items: center; gap: .5rem;
}
.btn-primary:hover { background: #e55a00; transform: translateY(-1px); }
.btn-outline {
  border: 1px solid var(--orange-600); color: var(--orange-600);
  padding: .625rem 1.5rem; border-radius: 8px; background: transparent;
  cursor: pointer; transition: all .2s;
  display: inline-flex; align-items: center; gap: .5rem;
}
.btn-outline:hover { background: var(--orange-600); color: #fff; }

/* ── Stat Counter ── */
.stat-number {
  font-size: clamp(2rem, 4vw, 3.5rem); font-weight: 800;
  color: var(--orange-500); line-height: 1;
}

/* ── Section Headers ── */
.section-tag {
  display: inline-flex; align-items: center; gap: .5rem;
  background: rgba(255,107,0,.08); border: 1px solid rgba(255,107,0,0.2);
  color: var(--orange-500); font-size: .7rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .15em;
  padding: .4rem 1rem; border-radius: 9999px; margin-bottom: 1.25rem;
}
.section-title { font-size: clamp(2rem, 4vw, 3rem); font-weight: 900; line-height: 1.1; letter-spacing: -0.02em; }
.section-divider {
  width: 80px; height: 4px;
  background: linear-gradient(90deg, var(--orange-600) 0%, var(--orange-500) 50%, transparent 100%);
  margin: 1.25rem 0 2rem;
  border-radius: 2px;
}

/* ── Search & Filter ── */
.filter-panel {
  background: var(--navy-700); border: 1px solid var(--navy-500);
  border-radius: 12px; padding: 1.25rem;
}
input[type="text"], input[type="email"], input[type="password"],
input[type="number"], input[type="tel"], input[type="date"],
input[type="time"], input[type="datetime-local"], input[type="url"],
input[type="search"], select, textarea {
  background: var(--navy-900); border: 1px solid var(--navy-500);
  color: #e8eaed; border-radius: 8px; padding: .625rem .875rem;
  transition: border-color .2s; outline: none; width: 100%;
}
input[type="date"], input[type="time"], input[type="datetime-local"] {
  color-scheme: dark;
}
input:focus, select:focus, textarea:focus { border-color: var(--orange-600); }
input::placeholder, textarea::placeholder { color: #4b5563; }

/* ── Tags ── */
.badge {
  display: inline-flex; align-items: center; gap: .25rem;
  padding: .2rem .6rem; border-radius: 9999px; font-size: .7rem; font-weight: 600;
}
.badge-orange { background: rgba(255,107,0,.15); color: var(--orange-500); }
.badge-green { background: rgba(34,197,94,.12); color: #4ade80; }
.badge-red { background: rgba(239,68,68,.12); color: #f87171; }
.badge-blue { background: rgba(99,102,241,.12); color: #a5b4fc; }
.badge-gray { background: rgba(75,85,99,.3); color: #9ca3af; }

/* ── Table ── */
.data-table { width: 100%; border-collapse: collapse; }
.data-table th {
  background: var(--navy-600); color: #9ca3af;
  font-size: .7rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: .08em; padding: .75rem 1rem; text-align: left;
  border-bottom: 1px solid var(--navy-500);
}
.data-table td {
  padding: .875rem 1rem; border-bottom: 1px solid var(--navy-500);
  font-size: .875rem; vertical-align: middle;
}
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: rgba(255,107,0,.03); }

/* ── Admin Sidebar ── */
.admin-sidebar {
  width: 260px; height: 100vh; background: var(--navy-800);
  border-right: 1px solid var(--navy-500); position: fixed;
  top: 0; left: 0; z-index: 40;
  display: flex; flex-direction: column; overflow: hidden;
}
.admin-sidebar .sidebar-nav {
  flex: 1; overflow-y: auto; overflow-x: hidden;
  scrollbar-width: thin; scrollbar-color: var(--navy-500) transparent;
}
.admin-sidebar .sidebar-nav::-webkit-scrollbar { width: 4px; }
.admin-sidebar .sidebar-nav::-webkit-scrollbar-thumb { background: var(--navy-500); border-radius: 4px; }
.admin-content { margin-left: 260px; min-height: 100vh; }
@media (max-width: 768px) {
  .admin-sidebar { transform: translateX(-100%); transition: transform .3s; }
  .admin-sidebar.open { transform: translateX(0); }
  .admin-content { margin-left: 0; }
}
.nav-item {
  display: flex; align-items: center; gap: .75rem;
  padding: .6rem 1.25rem; font-size: .875rem; font-weight: 500;
  color: #9ca3af; border-radius: 8px; margin: 2px 8px;
  transition: all .2s; cursor: pointer; text-decoration: none;
}
.nav-item:hover, .nav-item.active {
  background: rgba(255,107,0,.12); color: var(--orange-500);
}
.nav-item.active { border-left: 3px solid var(--orange-600); padding-left: calc(1.25rem - 3px); }

/* ── Quick-view Modal ── */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.8);
  backdrop-filter: blur(4px); z-index: 100;
  display: flex; align-items: center; justify-content: center;
}
.modal-box {
  background: var(--navy-700); border: 1px solid var(--navy-500);
  border-radius: 16px; max-width: 700px; width: 95vw;
  max-height: 90vh; overflow-y: auto; position: relative;
}

/* ── Scroll animation ── */
.fade-in { opacity: 0; transform: translateY(20px); transition: opacity .6s, transform .6s; }
.fade-in.visible { opacity: 1; transform: none; }

/* ── Testimonial ── */
.testimonial-card {
  background: var(--navy-700); border: 1px solid var(--navy-500);
  border-radius: 12px; padding: 1.5rem; position: relative;
}
.testimonial-card::before {
  content: '"'; position: absolute; top: 1rem; right: 1.25rem;
  font-size: 4rem; color: rgba(255,107,0,.15); font-family: Georgia;
  line-height: 1;
}

/* ── Industry card ── */
.industry-card {
  background: var(--navy-700); border: 1px solid var(--navy-500);
  border-radius: 12px; padding: 1.5rem; text-align: center;
  transition: all .3s;
}
.industry-card:hover {
  border-color: var(--orange-600); transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(255,107,0,.12);
}

/* ── Loading spinner ── */
.spinner {
  width: 36px; height: 36px; border: 3px solid var(--navy-500);
  border-top-color: var(--orange-600); border-radius: 50%;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── PDF banner ── */
.pdf-strip {
  background: linear-gradient(90deg, rgba(255,107,0,.1), rgba(255,107,0,.05));
  border-left: 3px solid var(--orange-600);
  padding: .875rem 1.25rem; border-radius: 0 8px 8px 0;
}

/* ── Custom scrollbar ── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--navy-800); }
::-webkit-scrollbar-thumb { background: var(--navy-500); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--orange-600); }

/* ── Responsive helpers ── */
@media (max-width: 640px) {
  .hide-mobile { display: none !important; }
}
@media (min-width: 641px) {
  .show-mobile-only { display: none !important; }
}

/* ── PREMIUM ANIMATIONS & SHADOW EFFECTS ── */
@keyframes float {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  50% { transform: translateY(-12px) rotate(0.5deg); }
}
.animate-float {
  animation: float 6s ease-in-out infinite;
}

@keyframes pulse-soft {
  0%, 100% { opacity: 0.15; transform: scale(1); }
  50% { opacity: 0.25; transform: scale(1.1); }
}
.animate-pulse-soft {
  animation: pulse-soft 8s ease-in-out infinite;
}

@keyframes mesh-shift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}
.mesh-gradient-animated {
  background: linear-gradient(-45deg, #0a0e1a, #111827, #1e130c, #070b13);
  background-size: 400% 400%;
  animation: mesh-shift 15s ease infinite;
}

/* ── HUD ELEMENTS ── */
.hud-corner {
  position: absolute;
  width: 12px;
  height: 12px;
  border: 2px solid rgba(255, 107, 0, 0.4);
  z-index: 10;
  pointer-events: none;
}
.hud-corner-tl { top: 12px; left: 12px; border-right: none; border-bottom: none; }
.hud-corner-tr { top: 12px; right: 12px; border-left: none; border-bottom: none; }
.hud-corner-bl { bottom: 12px; left: 12px; border-right: none; border-top: none; }
.hud-corner-br { bottom: 12px; right: 12px; border-left: none; border-top: none; }

.hud-grid {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(255, 107, 0, 0.015) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 107, 0, 0.015) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
  z-index: 0;
}

/* ── PREMIUM GLOWING ORBS ── */
.glow-orb-orange {
  position: absolute;
  width: 350px;
  height: 350px;
  background: radial-gradient(circle, rgba(255, 107, 0, 0.12) 0%, transparent 70%);
  border-radius: 50%;
  filter: blur(50px);
  pointer-events: none;
  z-index: 0;
}
.glow-orb-blue {
  position: absolute;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.08) 0%, transparent 70%);
  border-radius: 50%;
  filter: blur(60px);
  pointer-events: none;
  z-index: 0;
}

/* ── SHIMMER AND CARD INTERACTIVE EFFECT ── */
.shimmer-card {
  position: relative;
  overflow: hidden;
}
.shimmer-card::before {
  content: '';
  position: absolute;
  top: 0; left: -75%;
  width: 50%; height: 100%;
  background: linear-gradient(to right, transparent 0%, rgba(255, 255, 255, 0.03) 50%, transparent 100%);
  transform: skewX(-25deg);
  transition: 0.75s;
  pointer-events: none;
}
.shimmer-card:hover::before {
  left: 125%;
}

.premium-card-hover {
  transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}
.premium-card-hover:hover {
  transform: translateY(-8px) scale(1.015);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5), 0 0 25px rgba(255, 107, 0, 0.08);
  border-color: rgba(255, 107, 0, 0.35);
}

/* ── TELEMETRY LOAD BAR ── */
.telemetry-bar {
  position: relative;
  height: 4px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 2px;
  overflow: hidden;
}
.telemetry-bar-fill {
  position: absolute;
  top: 0; left: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--orange-700), var(--orange-500));
  box-shadow: 0 0 8px var(--orange-500);
  border-radius: 2px;
  transition: width 1.5s cubic-bezier(0.1, 0.8, 0.2, 1);
}
