/* ==========================================================================
   Spartan Products — Modern Industrial Design System
   ========================================================================== */

:root {
  --color-bg: #ffffff;
  --color-bg-alt: #f4f5f7;
  --color-bg-dark: #0f1721;
  --color-bg-dark-2: #1a2433;
  --color-text: #1a2433;
  --color-text-muted: #5b6573;
  --color-text-invert: #f4f5f7;
  --color-border: #dde1e6;
  --color-accent: #c8102e;       /* Spartan red */
  --color-accent-dark: #9a0c23;
  --color-steel: #4a5568;

  --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-display: "Inter", system-ui, sans-serif;

  --container-max: 1240px;
  --radius: 4px;
  --radius-lg: 8px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 33, 0.05);
  --shadow-md: 0 4px 12px rgba(15, 23, 33, 0.08);
  --shadow-lg: 0 12px 32px rgba(15, 23, 33, 0.12);
  --transition: 180ms ease;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

a { color: var(--color-accent); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--color-accent-dark); }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.15;
  color: var(--color-text);
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(2.25rem, 4vw, 3.5rem); }
h2 { font-size: clamp(1.75rem, 3vw, 2.5rem); letter-spacing: -0.02em; }
h3 { font-size: 1.375rem; }
h4 { font-size: 1.05rem; text-transform: uppercase; letter-spacing: 0.08em; font-weight: 600; }

p { margin-bottom: 1rem; color: var(--color-text-muted); }
p.lead { font-size: 1.2rem; color: var(--color-text); line-height: 1.55; }

.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Top utility bar ---------- */
.topbar {
  background: var(--color-bg-dark);
  color: var(--color-text-invert);
  font-size: 0.85rem;
}
.topbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 8px;
  padding-bottom: 8px;
}
.topbar a { color: var(--color-text-invert); opacity: 0.85; }
.topbar a:hover { opacity: 1; color: #fff; }
.topbar-left, .topbar-right { display: flex; gap: 24px; align-items: center; }

/* ---------- Header / Nav ---------- */
.site-header {
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  z-index: 50;
}
.site-header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 16px;
  padding-bottom: 16px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
  color: var(--color-text);
}
.logo:hover { color: var(--color-text); }
.logo-mark {
  width: 38px;
  height: 38px;
  background: var(--color-accent);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 900;
  font-size: 1.1rem;
  border-radius: var(--radius);
  letter-spacing: 0;
}
.logo small {
  display: block;
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--color-text-muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.main-nav { display: flex; gap: 36px; align-items: center; }
.main-nav a {
  color: var(--color-text);
  font-weight: 500;
  font-size: 0.95rem;
  position: relative;
  padding: 6px 0;
}
.main-nav a:hover { color: var(--color-accent); }
.main-nav a.active { color: var(--color-accent); }
.main-nav a.active::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -19px;
  height: 2px;
  background: var(--color-accent);
}

/* Dropdown */
.has-dropdown { position: relative; }
.dropdown {
  position: absolute;
  top: 100%;
  left: -16px;
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  min-width: 240px;
  padding: 8px 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: all var(--transition);
}
.has-dropdown:hover .dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.dropdown a {
  display: block;
  padding: 10px 20px;
  font-size: 0.92rem;
  color: var(--color-text);
}
.dropdown a:hover { background: var(--color-bg-alt); color: var(--color-accent); }

/* Mobile nav */
.nav-toggle {
  display: none;
  background: none;
  border: 0;
  width: 40px;
  height: 40px;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--color-text);
  margin: 5px auto;
  transition: var(--transition);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  border-radius: var(--radius);
  border: 2px solid transparent;
  cursor: pointer;
  transition: all var(--transition);
  text-transform: none;
}
.btn-primary {
  background: var(--color-accent);
  color: #fff;
  border-color: var(--color-accent);
}
.btn-primary:hover {
  background: var(--color-accent-dark);
  border-color: var(--color-accent-dark);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}
.btn-outline {
  background: transparent;
  color: var(--color-text);
  border-color: var(--color-text);
}
.btn-outline:hover { background: var(--color-text); color: #fff; }
.btn-outline-light {
  background: transparent;
  color: #fff;
  border-color: rgba(255,255,255,0.5);
}
.btn-outline-light:hover { background: #fff; color: var(--color-text); border-color: #fff; }
.btn-lg { padding: 16px 36px; font-size: 1rem; }
.btn .arrow { transition: transform var(--transition); }
.btn:hover .arrow { transform: translateX(3px); }

/* ---------- Sections ---------- */
section { padding: 88px 0; }
section.tight { padding: 56px 0; }
section.alt { background: var(--color-bg-alt); }
section.dark { background: var(--color-bg-dark); color: var(--color-text-invert); }
section.dark h1, section.dark h2, section.dark h3 { color: #fff; }
section.dark p { color: rgba(255,255,255,0.75); }

.eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: 14px;
}
.section-head { margin-bottom: 56px; max-width: 760px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head p.lead { margin-top: 18px; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  background: var(--color-bg-dark);
  color: var(--color-text-invert);
  padding: 0;
  overflow: hidden;
  min-height: 620px;
  display: flex;
  align-items: center;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg, rgba(15,23,33,0.92) 0%, rgba(15,23,33,0.65) 60%, rgba(200,16,46,0.3) 100%),
    url("images/hero.svg") center/cover;
  z-index: 1;
}
.hero .container {
  position: relative;
  z-index: 2;
  padding-top: 64px;
  padding-bottom: 64px;
  width: 100%;
}
.hero h1 { color: #fff; margin-bottom: 20px; max-width: 820px; }
.hero p.lead { color: rgba(255,255,255,0.9); max-width: 640px; margin-bottom: 36px; }
.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; }
.hero-meta {
  display: flex;
  gap: 40px;
  margin-top: 64px;
  padding-top: 32px;
  border-top: 1px solid rgba(255,255,255,0.15);
  flex-wrap: wrap;
}
.hero-meta .stat strong {
  display: block;
  font-size: 2rem;
  font-weight: 800;
  color: #fff;
  font-family: var(--font-display);
}
.hero-meta .stat span {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.7);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* Sub page hero (smaller) */
.page-hero {
  background: var(--color-bg-dark);
  color: #fff;
  padding: 72px 0 56px;
  position: relative;
  overflow: hidden;
}
.page-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(15,23,33,0.92), rgba(15,23,33,0.7)), url("images/hero-2.svg") center/cover;
  opacity: 1;
}
.page-hero .container { position: relative; z-index: 1; }
.page-hero h1 { color: #fff; margin-bottom: 12px; }
.page-hero p { color: rgba(255,255,255,0.85); font-size: 1.15rem; max-width: 720px; }
.breadcrumbs {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.7);
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.breadcrumbs a { color: rgba(255,255,255,0.7); }
.breadcrumbs a:hover { color: #fff; }
.breadcrumbs span { margin: 0 8px; }

/* ---------- Cards / Grid ---------- */
.grid { display: grid; gap: 28px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--transition);
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: transparent;
}
.card-img {
  aspect-ratio: 16/10;
  background: var(--color-bg-alt);
  position: relative;
  overflow: hidden;
}
.card-img img,
.card-img svg { width: 100%; height: 100%; object-fit: cover; display: block; }
.card-body { padding: 28px 28px 32px; }
.card-tag {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: 10px;
}
.card h3 { margin-bottom: 12px; font-size: 1.35rem; }
.card p { margin-bottom: 20px; }
.card .link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  color: var(--color-text);
  font-size: 0.92rem;
}
.card .link::after {
  content: "→";
  transition: transform var(--transition);
}
.card:hover .link { color: var(--color-accent); }
.card:hover .link::after { transform: translateX(4px); }

/* Feature blocks */
.feature {
  padding: 32px;
  border-left: 3px solid var(--color-accent);
  background: #fff;
  border-radius: 0 var(--radius) var(--radius) 0;
  box-shadow: var(--shadow-sm);
}
.feature .feature-icon {
  width: 48px;
  height: 48px;
  background: rgba(200,16,46,0.08);
  color: var(--color-accent);
  border-radius: var(--radius);
  display: grid;
  place-items: center;
  font-size: 1.4rem;
  font-weight: 800;
  margin-bottom: 18px;
}
.feature h3 { margin-bottom: 10px; font-size: 1.15rem; }
.feature p { margin-bottom: 0; font-size: 0.95rem; }

/* Stats strip */
.stats-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}
.stats-strip .stat {
  padding: 40px 24px;
  text-align: center;
  border-right: 1px solid var(--color-border);
}
.stats-strip .stat:last-child { border-right: 0; }
.stats-strip strong {
  display: block;
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--color-accent);
  font-family: var(--font-display);
  line-height: 1;
  margin-bottom: 6px;
}
.stats-strip span {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* ---------- Split (text + image) ---------- */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 72px;
  align-items: center;
}
.split.reverse > :first-child { order: 2; }
.split-img {
  aspect-ratio: 4/3;
  background: var(--color-bg-alt);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}
.split-img img, .split-img svg { width: 100%; height: 100%; object-fit: cover; }

/* ---------- Tables ---------- */
.product-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  margin: 24px 0;
}
.product-table th {
  background: var(--color-bg-dark);
  color: #fff;
  text-align: left;
  padding: 16px 20px;
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 600;
}
.product-table td {
  padding: 18px 20px;
  border-bottom: 1px solid var(--color-border);
  vertical-align: top;
  font-size: 0.95rem;
}
.product-table tr:last-child td { border-bottom: 0; }
.product-table tr:hover td { background: var(--color-bg-alt); }
.product-table td strong { color: var(--color-text); display: block; margin-bottom: 4px; }
.product-table .product-code {
  font-family: "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--color-accent);
  white-space: nowrap;
}

.badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 12px;
  background: rgba(200,16,46,0.1);
  color: var(--color-accent);
  margin-left: 6px;
}

/* ---------- CTA Banner ---------- */
.cta-banner {
  background: var(--color-bg-dark);
  color: #fff;
  padding: 72px 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.cta-banner::before {
  content: "";
  position: absolute;
  top: -100px; right: -100px;
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(200,16,46,0.25) 0%, transparent 70%);
  pointer-events: none;
}
.cta-banner h2 { color: #fff; margin-bottom: 18px; }
.cta-banner p {
  color: rgba(255,255,255,0.8);
  font-size: 1.15rem;
  max-width: 640px;
  margin: 0 auto 32px;
}

/* ---------- Forms ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 64px;
}
.form-group { margin-bottom: 20px; }
.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--color-text);
  letter-spacing: 0.02em;
}
.form-group label .req { color: var(--color-accent); }
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px 14px;
  font-family: var(--font-sans);
  font-size: 0.98rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: #fff;
  color: var(--color-text);
  transition: border-color var(--transition), box-shadow var(--transition);
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: 0;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(200,16,46,0.12);
}
.form-group textarea { resize: vertical; min-height: 140px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

.contact-info {
  background: var(--color-bg-alt);
  padding: 36px;
  border-radius: var(--radius-lg);
  border-left: 4px solid var(--color-accent);
}
.contact-info h3 { margin-bottom: 20px; font-size: 1.25rem; }
.contact-info .info-item { margin-bottom: 24px; }
.contact-info .info-item:last-child { margin-bottom: 0; }
.contact-info .info-label {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-bottom: 6px;
}
.contact-info .info-value {
  font-size: 1.05rem;
  color: var(--color-text);
  font-weight: 500;
}
.contact-info a { color: var(--color-text); border-bottom: 1px dotted var(--color-accent); }
.contact-info a:hover { color: var(--color-accent); }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--color-bg-dark);
  color: rgba(255,255,255,0.7);
  padding: 64px 0 24px;
  font-size: 0.92rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}
.footer-brand p { color: rgba(255,255,255,0.6); margin-top: 16px; max-width: 320px; }
.footer-col h4 {
  color: #fff;
  font-size: 0.82rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 18px;
}
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 10px; }
.footer-col a { color: rgba(255,255,255,0.7); }
.footer-col a:hover { color: #fff; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  color: rgba(255,255,255,0.5);
  font-size: 0.85rem;
}
.made-in-usa {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  color: rgba(255,255,255,0.8);
}

/* ---------- About page ---------- */
.values-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}
.value-card {
  padding: 36px;
  background: #fff;
  border-radius: var(--radius-lg);
  border-top: 4px solid var(--color-accent);
  box-shadow: var(--shadow-sm);
}
.value-card .num {
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--color-accent);
  line-height: 1;
  margin-bottom: 16px;
  display: block;
}
.value-card h3 { font-size: 1.2rem; margin-bottom: 10px; }

.timeline {
  position: relative;
  padding-left: 32px;
  margin-top: 32px;
}
.timeline::before {
  content: "";
  position: absolute;
  left: 8px;
  top: 8px; bottom: 8px;
  width: 2px;
  background: var(--color-border);
}
.timeline-item {
  position: relative;
  margin-bottom: 32px;
}
.timeline-item::before {
  content: "";
  position: absolute;
  left: -32px;
  top: 8px;
  width: 18px; height: 18px;
  background: var(--color-accent);
  border: 3px solid #fff;
  border-radius: 50%;
  box-shadow: 0 0 0 1px var(--color-border);
}
.timeline-item .year {
  font-family: var(--font-display);
  font-weight: 800;
  color: var(--color-accent);
  font-size: 1.05rem;
  margin-bottom: 4px;
}
.timeline-item p { margin-bottom: 0; }

/* ---------- Industries ---------- */
.industries-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.industry-chip {
  padding: 14px 20px;
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  font-weight: 500;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: all var(--transition);
}
.industry-chip:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
}
.industry-chip .dot {
  width: 8px; height: 8px;
  background: var(--color-accent);
  border-radius: 50%;
  flex-shrink: 0;
}

/* ---------- Utilities ---------- */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.mt-4 { margin-top: 32px; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .split { grid-template-columns: 1fr; gap: 40px; }
  .split.reverse > :first-child { order: initial; }
  .contact-grid { grid-template-columns: 1fr; gap: 40px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .values-grid { grid-template-columns: 1fr; }
  .industries-list { grid-template-columns: repeat(2, 1fr); }
  .stats-strip { grid-template-columns: repeat(2, 1fr); }
  .stats-strip .stat:nth-child(2) { border-right: 0; }
  .stats-strip .stat:nth-child(-n+2) { border-bottom: 1px solid var(--color-border); }
}

@media (max-width: 720px) {
  section { padding: 56px 0; }
  .topbar { display: none; }
  .main-nav {
    display: none;
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: #fff;
    flex-direction: column;
    gap: 0;
    padding: 16px 24px;
    border-bottom: 1px solid var(--color-border);
    box-shadow: var(--shadow-md);
  }
  .main-nav.open { display: flex; }
  .main-nav a { padding: 12px 0; border-bottom: 1px solid var(--color-border); width: 100%; }
  .main-nav a:last-child { border-bottom: 0; }
  .main-nav a.active::after { display: none; }
  .has-dropdown .dropdown {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    border: 0;
    padding-left: 16px;
  }
  .nav-toggle { display: block; }
  .grid-3, .grid-2, .grid-4 { grid-template-columns: 1fr; }
  .industries-list { grid-template-columns: 1fr; }
  .stats-strip { grid-template-columns: 1fr; }
  .stats-strip .stat { border-right: 0; border-bottom: 1px solid var(--color-border); }
  .stats-strip .stat:last-child { border-bottom: 0; }
  .form-row { grid-template-columns: 1fr; }
  .hero { min-height: 480px; }
  .hero-meta { gap: 24px; }
  .product-table thead { display: none; }
  .product-table tr {
    display: block;
    padding: 16px;
    border-bottom: 1px solid var(--color-border);
  }
  .product-table td {
    display: block;
    padding: 4px 0;
    border-bottom: 0;
  }
  .product-table td::before {
    content: attr(data-label);
    display: block;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--color-text-muted);
    margin-bottom: 2px;
  }
}
