/* ==========================================================================
   NEW AGE MACHINERY — INDUSTRIAL MACHINE TOOLS & ENGINEERING SOLUTIONS
   Domain: https://www.newagemachinery.in
   Brand Palette:
   - Dark Gray: #555655
   - Brand Blue: #0C8CE3
   - Pure White: #FFFFFF
   - Light Section: #F7F8FA
   - Deep Charcoal Text: #1F2328
   ========================================================================== */

:root {
  --brand-gray: #555655;
  --brand-gray-dark: #3B3C3B;
  --brand-blue: #0C8CE3;
  --brand-blue-hover: #0972BA;
  --brand-blue-light: #EEF7FD;
  --surface-white: #FFFFFF;
  --surface-light: #F7F8FA;
  --text-charcoal: #1F2328;
  --text-muted: #555655;
  --border-subtle: #E4E7EC;
}

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

html {
  scroll-behavior: smooth;
  font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--text-charcoal);
  background-color: var(--surface-white);
  -webkit-font-smoothing: antialiased;
}

body {
  margin: 0;
  font-family: 'Roboto', sans-serif;
  font-weight: 400;
  line-height: 1.6;
  color: var(--text-charcoal);
  background-color: var(--surface-white);
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  text-wrap: balance;
  letter-spacing: -0.015em;
}

/* Accessible Focus Rings */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--brand-blue);
  outline-offset: 2px;
}

/* Header scroll elevation */
.site-header {
  transition: box-shadow 180ms cubic-bezier(0.16, 1, 0.3, 1), background-color 180ms ease;
}

.site-header.is-scrolled {
  box-shadow: 0 4px 20px -4px rgba(15, 23, 42, 0.08);
}

/* Navigation active & hover underline */
.nav-link {
  position: relative;
  color: #3B3C3B;
  font-weight: 500;
  transition: color 160ms ease;
}

.nav-link::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 100%;
  height: 2px;
  background-color: var(--brand-blue);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 180ms cubic-bezier(0.16, 1, 0.3, 1);
}

.nav-link:hover,
.nav-link.active {
  color: var(--brand-blue);
}

.nav-link:hover::after,
.nav-link.active::after {
  transform: scaleX(1);
  transform-origin: left;
}

/* Hero Carousel */
.hero-slide {
  opacity: 0;
  pointer-events: none;
  transition: opacity 550ms cubic-bezier(0.16, 1, 0.3, 1);
}

.hero-slide.active {
  opacity: 1;
  pointer-events: auto;
  z-index: 10;
}

/* Product & Category Cards */
.industrial-card {
  background-color: var(--surface-white);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  transition: transform 180ms cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 180ms cubic-bezier(0.16, 1, 0.3, 1),
              border-color 180ms ease;
}

.industrial-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 28px -8px rgba(15, 23, 42, 0.08);
  border-color: #CBD5E1;
}

/* Consistent Machinery Image Container */
.machine-img-box {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  background-color: #F8FAFC;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-bottom: 1px solid var(--border-subtle);
}

.machine-img-box img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 0.75rem;
  transition: transform 250ms cubic-bezier(0.16, 1, 0.3, 1);
}

.industrial-card:hover .machine-img-box img {
  transform: scale(1.03);
}

/* Fallback Placeholder for Unavailable Images */
.machine-img-fallback {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 1.5rem;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #F8FAFC 0%, #EEF2F6 100%);
  color: var(--brand-gray);
}

/* Technical Specification Table */
.spec-table-wrapper {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
}

.spec-table {
  width: 100%;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
  min-width: 480px;
}

.spec-table th,
.spec-table td {
  padding: 14px 20px;
  text-align: left;
  font-size: 0.9375rem;
  border-bottom: 1px solid var(--border-subtle);
}

.spec-table thead th {
  background-color: var(--brand-gray);
  color: #FFFFFF;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.spec-table tbody tr:nth-child(even) {
  background-color: var(--surface-light);
}

.spec-table tbody tr:nth-child(odd) {
  background-color: #FFFFFF;
}

.spec-table tbody tr:last-child td {
  border-bottom: none;
}

.spec-table td:first-child {
  font-weight: 500;
  color: #1F2328;
  width: 42%;
}

.spec-table td:last-child {
  color: #3B3C3B;
}

/* Reveal on Scroll (Progressive Enhancement — always visible if JS disabled or reduced motion) */
@media (prefers-reduced-motion: no-preference) {
  .reveal-item {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 350ms cubic-bezier(0.16, 1, 0.3, 1),
                transform 350ms cubic-bezier(0.16, 1, 0.3, 1);
  }
}

/* Scroll to top button */
.scroll-top-btn {
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: opacity 180ms ease, transform 180ms ease, background-color 160ms ease;
}

.scroll-top-btn.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}
