/* ==========================================================================
   ZHUODA STEEL — Minimalist Industrial Design System
   Shandong Zhuoda Steel Co., Ltd.
   ========================================================================== */

:root {
  --bg-white: #FFFFFF;
  --bg-slate-50: #F8FAFC;
  --bg-dark-950: #0B1120;
  --bg-dark-900: #0F172A;
  --text-primary: #0F172A;
  --text-secondary: #475569;
  --border-hairline: #E2E8F0;
  --accent-orange: #EA580C;
  --accent-orange-hover: #C2410C;
}

html {
  scroll-behavior: smooth;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--text-primary);
  background-color: var(--bg-white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, .font-display {
  font-family: 'Space Grotesk', sans-serif;
  letter-spacing: -0.02em;
}

.tabular-nums {
  font-variant-numeric: tabular-nums;
}

/* Precision Architectural Grid Overlay (Hero & Dark Panels) */
.industrial-grid-dark {
  background-image:
    linear-gradient(to right, rgba(148, 163, 184, 0.07) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(148, 163, 184, 0.07) 1px, transparent 1px);
  background-size: 64px 64px;
}

.industrial-grid-light {
  background-image:
    linear-gradient(to right, rgba(15, 23, 42, 0.035) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(15, 23, 42, 0.035) 1px, transparent 1px);
  background-size: 48px 48px;
}

/* Sticky Glass Navbar States */
.navbar-base {
  transition: background-color 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.navbar-scrolled {
  background-color: rgba(11, 17, 32, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom-color: rgba(148, 163, 184, 0.16);
  box-shadow: 0 4px 24px -4px rgba(11, 17, 32, 0.35);
}

/* Nav Link Hairline Underline */
.nav-link {
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 0;
  height: 1.5px;
  background-color: var(--accent-orange);
  transition: width 0.22s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

/* Product Card Precision Hover */
.product-card {
  transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
}

.product-card:hover {
  border-color: #94A3B8;
  box-shadow: 0 12px 32px -12px rgba(15, 23, 42, 0.12);
}

.product-card img {
  transition: transform 0.55s cubic-bezier(0.16, 1, 0.3, 1);
}

.product-card:hover img {
  transform: scale(1.05);
}

/* Industry Card Hover Reveal */
.industry-card img {
  transition: transform 0.65s cubic-bezier(0.16, 1, 0.3, 1);
}

.industry-card:hover img {
  transform: scale(1.06);
}

.industry-desc {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height 0.38s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease, margin-top 0.3s ease;
}

.industry-card:hover .industry-desc,
.industry-card:focus-within .industry-desc {
  max-height: 140px;
  opacity: 1;
  margin-top: 0.75rem;
}

/* Always show brief on touch / small screens */
@media (max-width: 1023px) {
  .industry-desc {
    max-height: 140px;
    opacity: 0.9;
    margin-top: 0.625rem;
  }
}

/* Engineering Spec Tabs */
.spec-tab {
  position: relative;
  white-space: nowrap;
  transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}

.spec-tab[aria-selected="true"],
.spec-tab[aria-selected="true"]:hover {
  background-color: var(--bg-dark-900) !important;
  color: #FFFFFF !important;
  border-color: var(--bg-dark-900) !important;
}

.spec-tab[aria-selected="true"]::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background-color: var(--accent-orange);
}

/* Modal Transitions */
.modal-backdrop {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease;
}

.modal-backdrop.is-open {
  opacity: 1;
  pointer-events: auto;
}

.modal-panel {
  transform: translateY(12px) scale(0.985);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-backdrop.is-open .modal-panel {
  transform: translateY(0) scale(1);
}

/* RFQ Field Highlight Flash (when pre-filled from Modal) */
@keyframes fieldFlash {
  0% {
    box-shadow: 0 0 0 0 rgba(234, 88, 12, 0.45);
    border-color: #EA580C;
    background-color: #FFF7ED;
  }
  100% {
    box-shadow: 0 0 0 6px rgba(234, 88, 12, 0);
    border-color: #CBD5E1;
    background-color: #FFFFFF;
  }
}

.rfq-highlight {
  animation: fieldFlash 1.4s ease-out;
}

/* Subtle Scroll Reveal */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.55s ease, transform 0.55s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Clean Scrollbar for Horizontal Engineering Tables */
.spec-table-wrap::-webkit-scrollbar {
  height: 6px;
}

.spec-table-wrap::-webkit-scrollbar-track {
  background: #F1F5F9;
}

.spec-table-wrap::-webkit-scrollbar-thumb {
  background: #CBD5E1;
  border-radius: 2px;
}

.spec-table-wrap::-webkit-scrollbar-thumb:hover {
  background: #94A3B8;
}

/* Mobile Sticky Bottom Bar */
.mobile-sticky-cta {
  transition: transform 0.28s ease, opacity 0.28s ease;
}

.mobile-sticky-cta.is-hidden {
  transform: translateY(100%);
  opacity: 0;
  pointer-events: none;
}
