/* ==========================================================================
   Ironleaf Safety — shared stylesheet
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Archivo:ital,wght@0,400;0,500;0,600;0,700;0,800;0,900&family=Archivo+Expanded:wght@700;800;900&display=swap');

:root {
  /* Color tokens */
  --charcoal: #242320;
  --steel: #5b6470;
  --fog: #6b685f;
  --paper: #edeee9;
  --paper-dim: #e2e3dd;
  --safety: #c9d400;
  --safety-dark: #9aa300;
  --line: #d3d5cd;
  --white: #ffffff;

  /* Type */
  --font-display: 'Archivo Expanded', 'Archivo', sans-serif;
  --font-body: 'Archivo', sans-serif;

  /* Layout */
  --container: 1180px;
  --gutter: clamp(1.25rem, 4vw, 3rem);
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--charcoal);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; display: block; }
a { color: inherit; }
ul { padding: 0; margin: 0; list-style: none; }
h1, h2, h3, h4, p { margin: 0; }
button { font-family: inherit; cursor: pointer; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

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

/* ---- Layout helpers ---- */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
}
.prose { max-width: 65ch; }
.section { padding: clamp(3.5rem, 7vw, 6.5rem) 0; }
.section--tight { padding: clamp(2.5rem, 5vw, 4rem) 0; }
.section--dark { background: var(--charcoal); color: var(--paper); }
.section--dark .fog-text { color: var(--paper-dim); }

/* ---- Hazard stripe divider ----
   Structural device pulled from real hi-vis vest striping; used sparingly
   as a section boundary, not decoration. */
.hazard-bar {
  height: 10px;
  width: 100%;
  background: repeating-linear-gradient(
    -45deg,
    var(--charcoal) 0 14px,
    var(--safety) 14px 28px
  );
  transform-origin: left center;
  transform: scaleX(0);
  animation: hazard-draw 900ms ease-out 200ms forwards;
}
@keyframes hazard-draw {
  to { transform: scaleX(1); }
}
@media (prefers-reduced-motion: reduce) {
  .hazard-bar { transform: scaleX(1); animation: none; }
}

/* ---- Nav ---- */
.nav {
  border-bottom: 1px solid var(--line);
  background: var(--paper);
  position: sticky;
  top: 0;
  z-index: 20;
}
.nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 84px;
}
.wordmark {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1.35rem;
  letter-spacing: 0.01em;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  line-height: 1;
}
.wordmark span:first-child { color: var(--charcoal); }
.wordmark span:last-child {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.6rem;
  letter-spacing: 0.16em;
  color: var(--fog);
  margin-top: 4px;
}
.nav-links {
  display: flex;
  gap: clamp(1.25rem, 3vw, 2.25rem);
}
.nav-links a {
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--charcoal);
  padding: 0.25rem 0;
  border-bottom: 2px solid transparent;
  transition: border-color 150ms ease;
}
.nav-links a:hover, .nav-links a[aria-current="page"] {
  border-color: var(--safety-dark);
}
.nav-cta {
  background: var(--charcoal);
  color: var(--paper) !important;
  padding: 0.6rem 1.1rem !important;
  border: none !important;
}
.nav-cta:hover { border-color: transparent !important; background: var(--steel); }
.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--charcoal);
  padding: 0.5rem 0.7rem;
}
.nav-toggle svg { width: 18px; height: 18px; }

@media (max-width: 760px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 84px;
    left: 0;
    right: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    flex-direction: column;
    padding: 1rem var(--gutter) 1.5rem;
    gap: 1rem;
  }
  .nav-links.is-open { display: flex; }
  .nav-toggle { display: inline-flex; align-items: center; justify-content: center; }
}

/* ---- Type scale ---- */
.eyebrow-free { /* marker class only, no visual eyebrow used site-wide */ }

h1, .h1 {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(2.6rem, 4.2vw + 1rem, 4.4rem);
  line-height: 1.03;
  letter-spacing: -0.01em;
  color: var(--charcoal);
}
h2, .h2 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.8rem, 2.4vw + 1rem, 2.6rem);
  line-height: 1.08;
  color: var(--charcoal);
}
h3, .h3 {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 1.3rem;
  line-height: 1.3;
  color: var(--charcoal);
}
.lede {
  font-size: clamp(1.05rem, 1vw + 0.9rem, 1.25rem);
  color: var(--fog);
  line-height: 1.55;
}
.fog-text { color: var(--fog); }

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.9rem 1.5rem;
  font-weight: 700;
  font-size: 0.98rem;
  text-decoration: none;
  border: 2px solid var(--charcoal);
  transition: background 150ms ease, color 150ms ease, border-color 150ms ease;
}
.btn--primary {
  background: var(--safety);
  border-color: var(--charcoal);
  color: var(--charcoal);
}
.btn--primary:hover { background: var(--safety-dark); }
.btn--ghost {
  background: transparent;
  border-color: var(--charcoal);
  color: var(--charcoal);
}
.btn--ghost:hover { background: var(--charcoal); color: var(--paper); }
.btn--ghost-light {
  background: transparent;
  border-color: var(--paper-dim);
  color: var(--paper);
}
.btn--ghost-light:hover { background: var(--paper); color: var(--charcoal); }

/* ---- Certification tag ----
   Deliberately a hard-edged rectangle, not a rounded pill — reads as a
   spec-sheet stamp rather than a SaaS badge. */
.cert-tag {
  display: inline-block;
  border: 1.5px solid var(--steel);
  color: var(--steel);
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.02em;
  padding: 0.3rem 0.6rem;
}

/* ---- Hero ---- */
.hero .container {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
  padding-top: clamp(2.5rem, 6vw, 4.5rem);
  padding-bottom: clamp(2.5rem, 6vw, 4.5rem);
}
.hero-copy p.lede { margin-top: 1.25rem; max-width: 46ch; }
.hero-actions { display: flex; gap: 1rem; margin-top: 2rem; flex-wrap: wrap; }
.hero-art { border: 1px solid var(--line); background: var(--white); padding: 1.5rem; }
.hero-art figcaption {
  margin-top: 0.75rem;
  font-size: 0.8rem;
  color: var(--fog);
  border-top: 1px solid var(--line);
  padding-top: 0.6rem;
}

@media (max-width: 860px) {
  .hero .container { grid-template-columns: 1fr; }
  .hero-art { order: -1; }
}

/* ---- Value row (home page, 3-up) ---- */
.value-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border-top: 1px solid var(--line);
}
.value-grid > div {
  padding: 2rem clamp(1rem, 2vw, 1.75rem);
  border-right: 1px solid var(--line);
}
.value-grid > div:last-child { border-right: none; }
.value-grid h3 { margin-bottom: 0.6rem; }
@media (max-width: 760px) {
  .value-grid { grid-template-columns: 1fr; }
  .value-grid > div { border-right: none; border-bottom: 1px solid var(--line); }
  .value-grid > div:last-child { border-bottom: none; }
}

/* ---- Product spec rows ---- */
.spec-row {
  display: grid;
  grid-template-columns: 140px 1.3fr 1fr auto;
  gap: clamp(1.25rem, 3vw, 2.5rem);
  align-items: center;
  padding: clamp(1.75rem, 3vw, 2.5rem) 0;
  border-top: 1px solid var(--line);
}
.spec-row:last-child { border-bottom: 1px solid var(--line); }
.spec-row .icon-box {
  border: 1px solid var(--line);
  background: var(--white);
  padding: 1rem;
}
.spec-row h3 { margin-bottom: 0.4rem; }
.spec-row .cert-col { display: flex; flex-direction: column; gap: 0.5rem; align-items: flex-start; }
.spec-status {
  font-size: 0.85rem;
  color: var(--fog);
}

@media (max-width: 820px) {
  .spec-row {
    grid-template-columns: 90px 1fr;
    grid-template-areas:
      "icon title"
      "cert cert"
      "status status";
  }
  .spec-row .icon-box { grid-area: icon; }
  .spec-row .spec-main { grid-area: title; }
  .spec-row .cert-col { grid-area: cert; margin-top: 0.75rem; }
  .spec-row .spec-status { grid-area: status; }
}

/* ---- Numbered steps (distributors page — a genuine sequence) ---- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; }
.step { border-top: 3px solid var(--charcoal); padding-top: 1rem; }
.step .num {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 2.25rem;
  color: var(--steel);
  display: block;
  margin-bottom: 0.5rem;
}
@media (max-width: 760px) {
  .steps { grid-template-columns: 1fr; }
}

/* ---- Two column (about / distributor content) ---- */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: start;
}
@media (max-width: 820px) {
  .split { grid-template-columns: 1fr; }
}

/* ---- Contact ---- */
.contact-card {
  border: 1px solid var(--line);
  background: var(--white);
  padding: clamp(1.75rem, 4vw, 3rem);
}
.contact-detail { display: flex; gap: 0.9rem; padding: 0.9rem 0; border-top: 1px solid var(--line); }
.contact-detail:first-child { border-top: none; }
.contact-detail dt { font-weight: 700; width: 110px; flex-shrink: 0; }
.contact-detail dd { margin: 0; color: var(--fog); }

/* ---- Footer ---- */
.site-footer {
  background: var(--charcoal);
  color: var(--paper-dim);
  padding: clamp(2.5rem, 5vw, 3.5rem) 0 2rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid rgba(237, 238, 233, 0.15);
}
.footer-grid h4 {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--paper);
  margin-bottom: 0.9rem;
}
.footer-grid a {
  text-decoration: none;
  color: var(--paper-dim);
  display: block;
  padding: 0.3rem 0;
  font-size: 0.92rem;
}
.footer-grid a:hover { color: var(--safety); }
.footer-legal {
  padding-top: 1.5rem;
  font-size: 0.82rem;
  color: rgba(237, 238, 233, 0.6);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
}
@media (max-width: 760px) {
  .footer-grid { grid-template-columns: 1fr; }
}
