/* ============================================================
   M&A Supply — mandasupply.com
   Design system: charcoal-navy base, titanium-silver surfaces,
   safety-amber accent. Mobile-first, no frameworks.
   ============================================================ */

:root {
  /* Colour system */
  --navy-950: #081019;
  --navy-900: #0b1826;
  --navy-800: #102436;
  --navy-700: #163349;
  --steel-050: #f6f8fa;
  --steel-100: #eef1f5;
  --steel-200: #dde3ea;
  --steel-300: #c2cbd6;
  --steel-500: #5d6b7a;
  --ink: #1a2733;
  --amber: #f0a11c;
  --amber-dark: #d18404;
  --white: #ffffff;

  /* Type */
  --font-head: "Barlow", "Segoe UI", Arial, sans-serif;
  --font-body: "Inter", "Segoe UI", Arial, sans-serif;

  /* Spacing scale (4px base) */
  --s-1: 4px;  --s-2: 8px;  --s-3: 12px; --s-4: 16px;
  --s-6: 24px; --s-8: 32px; --s-12: 48px; --s-16: 64px;

  --radius: 10px;
  --shadow: 0 2px 8px rgba(8, 16, 25, 0.08);
  --shadow-lg: 0 8px 28px rgba(8, 16, 25, 0.14);
  --container: 1200px;
}

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

html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

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

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

h1 { font-size: 2.25rem; }
h2 { font-size: 1.75rem; }
h3 { font-size: 1.25rem; }
h4 { font-size: 1rem; }

@media (min-width: 768px) {
  h1 { font-size: 3rem; }
  h2 { font-size: 2.25rem; }
  h3 { font-size: 1.4rem; }
}

p { max-width: 68ch; }

a { color: var(--navy-700); }

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

@media (min-width: 768px) { .container { padding: 0 var(--s-8); } }

/* ---------- Utility ---------- */
.section { padding: var(--s-12) 0; }
@media (min-width: 768px) { .section { padding: var(--s-16) 0; } }

.section--tint { background: var(--steel-050); }
.section--dark { background: var(--navy-900); }
.section--dark h2, .section--dark h3 { color: var(--white); }
.section--dark p { color: var(--steel-300); }

.eyebrow {
  display: inline-block;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--amber-dark);
  margin-bottom: var(--s-3);
}
.section--dark .eyebrow { color: var(--amber); }

.section-head { max-width: 720px; margin-bottom: var(--s-8); }
.section-head p { margin-top: var(--s-3); color: var(--steel-500); }
.section--dark .section-head p { color: var(--steel-300); }
.section-head--center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head--center p { margin-left: auto; margin-right: auto; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 1rem;
  padding: 14px 28px;
  border-radius: 8px;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.2s ease-out, box-shadow 0.2s ease-out, background-color 0.2s ease-out;
  min-height: 44px;
}

.btn--primary {
  background: var(--amber);
  color: var(--navy-950);
}
.btn--primary:hover { background: var(--amber-dark); transform: translateY(-2px); box-shadow: var(--shadow-lg); }

.btn--outline {
  background: transparent;
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.45);
}
.btn--outline:hover { border-color: var(--white); background: rgba(255, 255, 255, 0.08); }

.btn--outline-dark {
  background: transparent;
  color: var(--navy-800);
  border-color: var(--steel-300);
}
.btn--outline-dark:hover { border-color: var(--navy-800); background: var(--steel-100); }

:focus-visible {
  outline: 3px solid var(--amber);
  outline-offset: 2px;
}

/* ---------- Header ---------- */
.topbar {
  background: var(--navy-950);
  color: var(--steel-300);
  font-size: 0.85rem;
  padding: var(--s-2) 0;
}
.topbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--s-4);
}
.topbar a { color: var(--steel-100); text-decoration: none; }
.topbar a:hover { color: var(--amber); }
.topbar__tag { display: none; }
@media (min-width: 768px) { .topbar__tag { display: block; } }
.topbar__contacts { display: flex; gap: var(--s-6); }

.site-header {
  background: var(--navy-900);
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: 0 2px 12px rgba(8, 16, 25, 0.35);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-4);
  min-height: 72px;
}

.logo { display: flex; align-items: center; gap: var(--s-3); text-decoration: none; }
.logo svg { height: 44px; width: auto; }

.nav { display: none; }
.nav a {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--steel-100);
  text-decoration: none;
  padding: var(--s-2) var(--s-3);
  border-radius: 6px;
  transition: color 0.15s ease-out, background-color 0.15s ease-out;
}
.nav a:hover { color: var(--amber); }
.nav a[aria-current="page"] { color: var(--amber); }

.nav .btn { margin-left: var(--s-3); padding: 10px 20px; }

.nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: none;
  border: 1px solid var(--navy-700);
  border-radius: 8px;
  cursor: pointer;
}
.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--steel-100);
  position: relative;
  transition: transform 0.2s ease-out, opacity 0.2s ease-out;
  content: "";
}
.nav-toggle span::before { position: absolute; top: -6px; }
.nav-toggle span::after { position: absolute; top: 6px; }
.nav-toggle[aria-expanded="true"] span { background: transparent; }
.nav-toggle[aria-expanded="true"] span::before { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span::after { transform: translateY(-6px) rotate(-45deg); }

@media (min-width: 1024px) {
  .nav { display: flex; align-items: center; gap: var(--s-1); }
  .nav-toggle { display: none; }
}

.mobile-nav {
  display: none;
  background: var(--navy-800);
  border-top: 1px solid var(--navy-700);
}
.mobile-nav.is-open { display: block; }
.mobile-nav a {
  display: block;
  padding: var(--s-4);
  color: var(--steel-100);
  text-decoration: none;
  font-family: var(--font-head);
  font-weight: 600;
  border-bottom: 1px solid var(--navy-700);
}
.mobile-nav a:hover, .mobile-nav a[aria-current="page"] { color: var(--amber); }
@media (min-width: 1024px) { .mobile-nav { display: none !important; } }

/* ---------- Hero ---------- */
.hero {
  background:
    radial-gradient(1100px 500px at 85% -10%, rgba(240, 161, 28, 0.14), transparent 60%),
    linear-gradient(160deg, var(--navy-950) 0%, var(--navy-900) 55%, var(--navy-800) 100%);
  color: var(--white);
  position: relative;
  overflow: hidden;
}
.hero__pattern {
  position: absolute;
  inset: 0;
  opacity: 0.35;
  pointer-events: none;
}
.hero .container {
  position: relative;
  padding-top: var(--s-16);
  padding-bottom: var(--s-16);
}
@media (min-width: 1024px) {
  .hero .container { padding-top: 96px; padding-bottom: 96px; }
}
.hero h1 { color: var(--white); max-width: 17ch; }
.hero h1 em { font-style: normal; color: var(--amber); }
.hero__lead {
  margin-top: var(--s-4);
  font-size: 1.1rem;
  color: var(--steel-300);
  max-width: 56ch;
}
.hero__actions { margin-top: var(--s-8); display: flex; flex-wrap: wrap; gap: var(--s-4); }

.hero__stats {
  margin-top: var(--s-12);
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--s-4);
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding-top: var(--s-8);
}
@media (min-width: 768px) { .hero__stats { grid-template-columns: repeat(4, 1fr); } }
.hero__stat strong {
  display: block;
  font-family: var(--font-head);
  font-size: 1.6rem;
  color: var(--amber);
}
.hero__stat span { font-size: 0.9rem; color: var(--steel-300); }

/* Page hero (inner pages) */
.page-hero {
  background: linear-gradient(160deg, var(--navy-950), var(--navy-800));
  color: var(--white);
  padding: var(--s-12) 0;
}
.page-hero h1 { color: var(--white); }
.page-hero p { margin-top: var(--s-3); color: var(--steel-300); max-width: 62ch; }
.breadcrumb { font-size: 0.85rem; margin-bottom: var(--s-3); color: var(--steel-300); }
.breadcrumb a { color: var(--steel-300); }
.breadcrumb a:hover { color: var(--amber); }

/* ---------- Card grids ---------- */
.grid {
  display: grid;
  gap: var(--s-6);
  grid-template-columns: 1fr;
}
@media (min-width: 640px) { .grid--2 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 640px) { .grid--3 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .grid--3 { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 640px) { .grid--4 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .grid--4 { grid-template-columns: repeat(4, 1fr); } }

.card {
  background: var(--white);
  border: 1px solid var(--steel-200);
  border-radius: var(--radius);
  padding: var(--s-6);
  box-shadow: var(--shadow);
  transition: transform 0.2s ease-out, box-shadow 0.2s ease-out;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.card h3 { margin: var(--s-4) 0 var(--s-2); }
.card p { font-size: 0.95rem; color: var(--steel-500); }
.card__link {
  display: inline-block;
  margin-top: var(--s-4);
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--amber-dark);
  text-decoration: none;
}
.card__link:hover { text-decoration: underline; }

.card__icon {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  background: linear-gradient(150deg, var(--navy-800), var(--navy-700));
  display: flex;
  align-items: center;
  justify-content: center;
}
.card__icon svg { width: 32px; height: 32px; stroke: var(--amber); }

/* Dark cards */
.section--dark .card {
  background: var(--navy-800);
  border-color: var(--navy-700);
}
.section--dark .card h3 { color: var(--white); }
.section--dark .card p { color: var(--steel-300); }

/* ---------- Materials strip ---------- */
.chips { display: flex; flex-wrap: wrap; gap: var(--s-2); }
.chip {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 0.85rem;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--navy-800);
  color: var(--steel-100);
  border: 1px solid var(--navy-700);
}
.chip--light { background: var(--steel-100); color: var(--navy-800); border-color: var(--steel-200); }

/* ---------- Split feature ---------- */
.split {
  display: grid;
  gap: var(--s-8);
  align-items: center;
}
@media (min-width: 1024px) { .split { grid-template-columns: 1fr 1fr; gap: var(--s-16); } }
.split h2 { margin-bottom: var(--s-4); }
.split ul { list-style: none; margin-top: var(--s-4); }
.split li {
  padding-left: 32px;
  position: relative;
  margin-bottom: var(--s-3);
}
.split li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 5px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--amber);
  -webkit-mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="black" stroke-width="3"><path d="M4 12l5 5L20 6"/></svg>') center / contain no-repeat;
  mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="black" stroke-width="3"><path d="M4 12l5 5L20 6"/></svg>') center / contain no-repeat;
}
.split__panel {
  border-radius: var(--radius);
  background: linear-gradient(155deg, var(--navy-900), var(--navy-700));
  padding: var(--s-8);
  color: var(--steel-100);
  box-shadow: var(--shadow-lg);
}
.split__panel h3 { color: var(--white); margin-bottom: var(--s-4); }
.split__panel .chips { margin-top: var(--s-4); }

/* ---------- Product detail sections ---------- */
.product-block { padding: var(--s-12) 0; border-bottom: 1px solid var(--steel-200); }
.product-block:last-of-type { border-bottom: none; }
.product-block__inner {
  display: grid;
  gap: var(--s-8);
}
@media (min-width: 1024px) {
  .product-block__inner { grid-template-columns: 88px 1fr; align-items: start; }
}
.product-block h2 { font-size: 1.6rem; margin-bottom: var(--s-3); scroll-margin-top: 120px; }
.product-block p { color: var(--steel-500); margin-bottom: var(--s-4); }
.spec-cols { display: grid; gap: var(--s-6); margin-top: var(--s-4); }
@media (min-width: 768px) { .spec-cols { grid-template-columns: repeat(3, 1fr); } }
.spec-cols h4 {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--amber-dark);
  margin-bottom: var(--s-2);
}
.spec-cols ul { list-style: none; font-size: 0.92rem; color: var(--ink); }
.spec-cols li { padding: 5px 0; border-bottom: 1px dashed var(--steel-200); }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--steel-200); }
table { border-collapse: collapse; width: 100%; min-width: 640px; font-size: 0.92rem; }
th, td { text-align: left; padding: var(--s-3) var(--s-4); }
thead { background: var(--navy-900); color: var(--white); font-family: var(--font-head); }
tbody tr:nth-child(even) { background: var(--steel-050); }
tbody td { border-bottom: 1px solid var(--steel-200); }

/* ---------- CTA banner ---------- */
.cta-banner {
  background:
    radial-gradient(700px 300px at 15% 110%, rgba(240, 161, 28, 0.18), transparent 60%),
    linear-gradient(150deg, var(--navy-950), var(--navy-800));
  border-radius: 16px;
  padding: var(--s-8);
  color: var(--white);
  display: flex;
  flex-direction: column;
  gap: var(--s-6);
  align-items: flex-start;
}
@media (min-width: 768px) {
  .cta-banner { flex-direction: row; align-items: center; justify-content: space-between; padding: var(--s-12); }
}
.cta-banner h2 { color: var(--white); margin-bottom: var(--s-2); }
.cta-banner p { color: var(--steel-300); }

/* ---------- Forms ---------- */
.form-grid { display: grid; gap: var(--s-4); }
@media (min-width: 768px) { .form-grid { grid-template-columns: 1fr 1fr; } }
.form-field { display: flex; flex-direction: column; gap: var(--s-1); }
.form-field--full { grid-column: 1 / -1; }
.form-field label { font-family: var(--font-head); font-weight: 600; font-size: 0.9rem; }
.form-field input,
.form-field select,
.form-field textarea {
  font: inherit;
  padding: 12px 14px;
  border: 1px solid var(--steel-300);
  border-radius: 8px;
  background: var(--white);
  color: var(--ink);
  min-height: 44px;
}
.form-field textarea { min-height: 140px; resize: vertical; }
.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  outline: 3px solid rgba(240, 161, 28, 0.45);
  border-color: var(--amber-dark);
}
.form-note { font-size: 0.85rem; color: var(--steel-500); }

.form-alert {
  padding: var(--s-4);
  border-radius: 8px;
  margin-bottom: var(--s-6);
  font-weight: 500;
}
.form-alert--ok { background: #e7f6ec; color: #14532d; border: 1px solid #bbe5c8; }
.form-alert--err { background: #fdeceb; color: #7f1d1d; border: 1px solid #f5c6c3; }
.form-alert--err a { color: inherit; }

/* Honeypot field: hidden from humans, visible to naive bots */
.hp-field { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Contact page ---------- */
.contact-layout { display: grid; gap: var(--s-8); }
@media (min-width: 1024px) { .contact-layout { grid-template-columns: 1.4fr 1fr; gap: var(--s-16); } }
.contact-card {
  background: var(--navy-900);
  color: var(--steel-100);
  border-radius: var(--radius);
  padding: var(--s-8);
}
.contact-card h3 { color: var(--white); margin-bottom: var(--s-4); }
.contact-card dl { display: grid; gap: var(--s-4); }
.contact-card dt {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--amber);
}
.contact-card dd { margin-top: 2px; }
.contact-card a { color: var(--steel-100); }
.contact-card a:hover { color: var(--amber); }
.contact-card__hours { margin-top: var(--s-6); padding-top: var(--s-6); border-top: 1px solid var(--navy-700); font-size: 0.9rem; }

/* ---------- Values / About ---------- */
.value-num {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 2rem;
  color: var(--steel-300);
}

.timeline { list-style: none; margin-top: var(--s-6); }
.timeline li { position: relative; padding: 0 0 var(--s-6) var(--s-8); border-left: 2px solid var(--steel-200); margin-left: 8px; }
.timeline li:last-child { padding-bottom: 0; }
.timeline li::before {
  content: "";
  position: absolute;
  left: -8px;
  top: 4px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--amber);
  border: 3px solid var(--white);
}
.timeline strong { font-family: var(--font-head); display: block; color: var(--navy-900); }
.timeline p { font-size: 0.95rem; color: var(--steel-500); }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--navy-950);
  color: var(--steel-300);
  padding: var(--s-12) 0 var(--s-8);
  font-size: 0.95rem;
}
.footer-grid { display: grid; gap: var(--s-8); }
@media (min-width: 768px) { .footer-grid { grid-template-columns: 2fr 1fr 1fr 1.4fr; } }
.site-footer h4 {
  color: var(--white);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: var(--s-4);
}
.site-footer ul { list-style: none; }
.site-footer li { margin-bottom: var(--s-2); }
.site-footer a { color: var(--steel-300); text-decoration: none; }
.site-footer a:hover { color: var(--amber); }
.footer-about p { margin-top: var(--s-4); max-width: 40ch; font-size: 0.9rem; }
.footer-bottom {
  margin-top: var(--s-12);
  padding-top: var(--s-6);
  border-top: 1px solid var(--navy-800);
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-3);
  justify-content: space-between;
  font-size: 0.82rem;
  color: var(--steel-500);
}

/* ---------- Reveal on scroll (only when JS is available) ---------- */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.5s ease-out, transform 0.5s ease-out; }
.js .reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .js .reveal { opacity: 1; transform: none; } }
