/* ============================================================
   W3Industry Theme — Design System
   Single source of truth for all homepage styles.
   Loaded globally via home-header.ejs.
   ============================================================ */

/* ----------------------------------------------------------
   1. DESIGN TOKENS (CSS Custom Properties)
   ---------------------------------------------------------- */
/*
  Brand palette derived from logo:
    #eb0000  — brand red  (large "W" shape)
    #000000  — black dot  (small accent)
  Scheme: Red primary on dark slate — bold, professional, tech-forward.
*/
:root {
  --w3-primary:        #eb0000;   /* brand red */
  --w3-primary-rgb:    235, 0, 0;
  --w3-primary-dark:   #c20000;   /* hover / pressed */
  --w3-primary-light:  #fff0f0;   /* tint background */
  --w3-primary-mid:    #fca5a5;   /* tint border */
  --w3-accent:         #ff3b3b;   /* lighter red for gradients */
  --w3-dark:           #1a202c;
  --w3-muted:          #64748b;
  --w3-border:         rgba(0, 0, 0, 0.06);
  --w3-shadow-sm:      0 2px 4px rgba(0,0,0,0.04);
  --w3-shadow-md:      0 8px 24px rgba(0,0,0,0.08);
  --w3-shadow-lg:      0 20px 40px rgba(0,0,0,0.12);
  --w3-radius:         1rem;
  --w3-radius-sm:      0.5rem;
  --w3-transition:     0.28s cubic-bezier(0.4, 0, 0.2, 1);

  /* Soft tint backgrounds */
  --bg-soft-success:   rgba(45, 206, 137, 0.12);
  --bg-soft-info:      rgba(17, 205, 239, 0.12);
  --bg-soft-warning:   rgba(251, 99, 64, 0.12);
  --bg-soft-primary:   rgba(235, 0, 0, 0.08);
}

/* ----------------------------------------------------------
   2. GLOBAL UTILITIES
   ---------------------------------------------------------- */
.fw-800 { font-weight: 800; }
.text-xxs { font-size: 0.65rem; letter-spacing: 0.1em; }
.text-xs  { font-size: 0.75rem; }
.py-6     { padding-top: 5rem; padding-bottom: 5rem; }
.mb-6     { margin-bottom: 5rem; }
.mt-6     { margin-top: 5rem; }

.bg-white-10  { background: rgba(255, 255, 255, 0.08); }
.border-white-20 { border: 1px solid rgba(255, 255, 255, 0.2) !important; }
.opacity-9    { opacity: 0.9; }

/* ----------------------------------------------------------
   3. ANIMATIONS
   ---------------------------------------------------------- */
@keyframes slowZoom {
  from { transform: scale(1);    }
  to   { transform: scale(1.08); }
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(22px); }
  to   { opacity: 1; transform: translateY(0);    }
}

@keyframes statusPulse {
  0%   { transform: scale(0.95); box-shadow: 0 0 0 0   rgba(0, 255, 65, 0.7); }
  70%  { transform: scale(1);    box-shadow: 0 0 0 8px rgba(0, 255, 65, 0);   }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0   rgba(0, 255, 65, 0);   }
}

@keyframes pulseGreen {
  0%   { transform: scale(1);   box-shadow: 0 0 0 0   rgba(0, 255, 65, 0.7); }
  70%  { transform: scale(1.1); box-shadow: 0 0 0 8px rgba(0, 255, 65, 0);   }
  100% { transform: scale(1);   box-shadow: 0 0 0 0   rgba(0, 255, 65, 0);   }
}

@keyframes corePulse {
  0%, 100% { transform: scale(1);   opacity: 0.9; }
  50%       { transform: scale(1.1); opacity: 1;   }
}

@keyframes orbitRotate {
  from { transform: rotate(0deg);   }
  to   { transform: rotate(360deg); }
}

@keyframes floatNode {
  0%, 100% { transform: translateY(0);    }
  50%       { transform: translateY(-15px); }
}

@keyframes badgeFloat {
  0%, 100% { transform: translateY(0) translateX(0);   }
  50%       { transform: translateY(-10px) translateX(5px); }
}

@keyframes drawChart {
  0%   { stroke-dashoffset: 1000; }
  100% { stroke-dashoffset: 0;    }
}

/* ----------------------------------------------------------
   4. HERO SECTION
   ---------------------------------------------------------- */
.hero-bg {
  animation: slowZoom 20s infinite alternate;
}

.hero-main-title {
  font-size: clamp(1.75rem, 5vw, 3.5rem);
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.hero-lead {
  font-size: clamp(1rem, 2vw, 1.25rem);
  max-width: 820px;
  margin: 0 auto;
}

.text-gradient-light {
  background: linear-gradient(135deg, #d7d7d7 0%, #f9f6f6 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.metric-glass {
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  min-width: 140px;
}

.status-pulse-green {
  display: inline-block;
  width: 8px;
  height: 8px;
  background: var(--w3-green);
  border-radius: 50%;
  animation: statusPulse 2s infinite;
  flex-shrink: 0;
}

.animate-fade-up {
  animation: fadeUp 0.75s ease-out forwards;
  opacity: 0;
}

@media (max-width: 576px) {
  .hero-main-title { padding: 0 8px; }
  .metric-glass    { min-width: 100%; }
}

/* ----------------------------------------------------------
   5. CAPABILITY CARDS
   ---------------------------------------------------------- */
.capability-card {
  position: relative;
  height: 100%;
  background: #ffffff;
  border-radius: var(--w3-radius);
  border: 1px solid var(--w3-border);
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  box-shadow: var(--w3-shadow-sm);
  transition: all var(--w3-transition);
}

.capability-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--w3-shadow-md);
  border-color: rgba(0, 0, 0, 0.1);
}

.card-header-inline {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.icon-wrapper {
  width: 44px;
  height: 44px;
  min-width: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform var(--w3-transition);
}
.icon-wrapper i { font-size: 20px; }

.capability-card:hover .icon-wrapper {
  transform: rotate(-8deg) scale(1.12);
}

.capability-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--w3-dark);
  margin-bottom: 0;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.capability-text {
  font-size: 0.85rem;
  color: var(--w3-muted);
  line-height: 1.65;
  margin-bottom: 0;
  flex: 1;
}

.card-footer-accent {
  position: absolute;
  bottom: 0;
  left: 1.75rem;
  right: 1.75rem;
  height: 3px;
  border-radius: 2px 2px 0 0;
  opacity: 0;
  transition: opacity var(--w3-transition);
}

.capability-card:hover .card-footer-accent { opacity: 1; }

.bg-soft-success { background: var(--bg-soft-success); }
.bg-soft-info    { background: var(--bg-soft-info);    }
.bg-soft-warning { background: var(--bg-soft-warning); }
.bg-soft-primary { background: var(--bg-soft-primary); }

@media (max-width: 768px) {
  .capability-card { padding: 1.35rem; }
}

/* ----------------------------------------------------------
   6. PRODUCTION STATUS SECTION
   ---------------------------------------------------------- */
.status-badge-container { display: flex; align-items: center; }

.status-badge {
  display: inline-flex;
  align-items: center;
  background: #1a1a1a;
  color: #fff;
  padding: 7px 16px;
  border-radius: 50px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
}

.status-dot {
  width: 8px;
  height: 8px;
  background: var(--w3-green);
  border-radius: 50%;
  margin-right: 10px;
  display: inline-block;
  animation: statusPulse 2s infinite;
  flex-shrink: 0;
}

.status-divider {
  margin: 0 8px;
  color: rgba(255, 255, 255, 0.3);
}

@media (min-width: 768px) {
  .status-badge { font-size: 11px; padding: 8px 20px; }
}

/* Terminal / system monitor box */
.system-box {
  background: #0d0d0d;
  border-radius: 10px;
  color: var(--w3-green);
  font-family: 'Courier New', Courier, monospace;
  overflow: hidden;
  border: 1px solid #222;
}

.system-header {
  background: #1a1a1a;
  padding: 9px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 10px;
  border-bottom: 1px solid #2a2a2a;
  color: #fff;
}

.system-label { color: var(--w3-green); font-weight: 700; }

.system-status {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #ccc;
}

.pulse {
  height: 7px;
  width: 7px;
  background: var(--w3-green);
  border-radius: 50%;
  animation: pulseGreen 1.5s infinite;
  flex-shrink: 0;
}

.chart-path {
  stroke-dasharray: 1000;
  stroke-dashoffset: 1000;
  animation: drawChart 4s ease-in-out infinite;
}

/* ----------------------------------------------------------
   7. AI VISUALIZATION
   ---------------------------------------------------------- */
.visual-wrapper {
  position: relative;
  width: 100%;
  max-width: 420px;
  margin: 0 auto;
  aspect-ratio: 1 / 1;
  background: radial-gradient(circle, rgba(var(--w3-primary-rgb), 0.08) 0%, transparent 68%);
  border-radius: 50%;
}

.ai-svg {
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 8px 20px rgba(0, 0, 0, 0.06));
}

.pulse-core {
  animation: corePulse 4s ease-in-out infinite;
  transform-origin: center;
}

.orbit {
  animation: orbitRotate 22s linear infinite;
  transform-origin: center;
}

.node { animation: floatNode 3s ease-in-out infinite; }
.n2   { animation-delay: -0.7s;  }
.n3   { animation-delay: -1.5s;  }
.n4   { animation-delay: -2.2s;  }

.floating-badge {
  position: absolute;
  top: 18%;
  right: 4%;
  background: #fff;
  padding: 8px 16px;
  border-radius: 50px;
  box-shadow: var(--w3-shadow-md);
  animation: badgeFloat 5s ease-in-out infinite;
}

.badge-content {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--w3-primary);
}

/* ----------------------------------------------------------
   8. BLOG CARDS
   ---------------------------------------------------------- */
.blog-image {
  height: 200px;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.card-blog:hover .blog-image {
  transform: scale(1.04);
}

.hover-lift {
  transition: transform var(--w3-transition), box-shadow var(--w3-transition);
}

.hover-lift:hover {
  transform: translateY(-5px);
  box-shadow: var(--w3-shadow-lg) !important;
}

/* ----------------------------------------------------------
   9. NAVBAR ENHANCEMENTS
   ---------------------------------------------------------- */
.navbar.blur {
  background: rgba(255, 255, 255, 0.88) !important;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.nav-link {
  font-size: 0.875rem;
  font-weight: 500;
  transition: color var(--w3-transition);
}

.dropdown-menu {
  border: none;
  border-radius: var(--w3-radius-sm);
  box-shadow: var(--w3-shadow-md);
  padding: 0.5rem 0;
}

.dropdown-item {
  font-size: 0.85rem;
  padding: 0.5rem 1.1rem;
  transition: background var(--w3-transition);
}

.dropdown-item:hover {
  background: var(--bg-soft-primary);
  color: var(--w3-primary);
}

/* ----------------------------------------------------------
   10. FOOTER
   ---------------------------------------------------------- */
footer.w3-footer {
  background: #000000;
  border-top: 1px solid #e9ecef;
}

footer.w3-footer a {
  transition: color var(--w3-transition);
}

footer.w3-footer a:hover {
  color: var(--w3-primary) !important;
  text-decoration: none;
}

.footer-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #e9ecef;
  color: #6c757d;
  transition: background var(--w3-transition), color var(--w3-transition);
}

.footer-social a:hover {
  background: var(--w3-primary);
  color: #fff !important;
}

/* ----------------------------------------------------------
   11. SECTION BACKGROUNDS
   ---------------------------------------------------------- */
.bg-light-soft { background: #f9fafb; }
.bg-whitefff   { background: #ffffff; }

.section-title {
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--w3-dark);
}

/* ----------------------------------------------------------
   12. CTA SECTION
   ---------------------------------------------------------- */
.cta-section {
  background: linear-gradient(135deg, #f8f9fa 0%, #fff0f0 100%);
  border-radius: var(--w3-radius);
}
