/* Frontline EHS — shared stylesheet */

:root {
  --ink: #0f1419;
  --bg: #fafaf7;
  --accent: #d94e1f;
  --steel: #4a5568;
  --line: #d4d4cc;

  --font-display: 'Fraunces', serif;
  --font-body: 'IBM Plex Sans', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--ink);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

a { color: inherit; }

.wrap {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* ---------- Top bar ---------- */
.topbar {
  background: var(--ink);
  color: rgba(250, 250, 247, 0.72);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
}
.topbar .wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.35rem 1.5rem;
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
}
.topbar a { text-decoration: none; color: rgba(250, 250, 247, 0.92); }
.topbar a:hover { color: var(--accent); }
.topbar-links { display: flex; gap: 1.5rem; flex-wrap: wrap; }

/* ---------- Header / nav ---------- */
header.site {
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 50;
}
header.site .wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 76px;
}
.brand {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.35rem;
  letter-spacing: -0.01em;
  text-decoration: none;
  color: var(--ink);
}
.brand .dot { color: var(--accent); }

nav.primary {
  display: flex;
  align-items: center;
  gap: 2.25rem;
}
nav.primary a {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--steel);
  transition: color 0.15s;
}
nav.primary a:hover,
nav.primary a[aria-current="page"] { color: var(--ink); }
nav.primary a.nav-cta {
  border: 1px solid var(--ink);
  padding: 0.55rem 1.1rem;
  color: var(--ink);
}
nav.primary a.nav-cta:hover {
  background: var(--ink);
  color: var(--bg);
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.5rem 0.85rem;
  cursor: pointer;
  color: var(--ink);
}

/* ---------- Hero ---------- */
.hero {
  padding: 5.5rem 0 4rem;
  border-bottom: 1px solid var(--line);
}
.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  margin-bottom: 1.1rem;
}
h1 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(2.3rem, 5vw, 3.6rem);
  line-height: 1.08;
  letter-spacing: -0.015em;
  max-width: 16ch;
}
.hero-sub {
  margin-top: 1.5rem;
  font-size: 1.15rem;
  color: var(--steel);
  max-width: 58ch;
  line-height: 1.7;
}
.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 2.25rem;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  text-decoration: none;
  padding: 0.95rem 1.75rem;
  border: 1px solid transparent;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.btn-primary {
  background: var(--accent);
  color: var(--bg);
  border-color: var(--accent);
}
.btn-primary:hover { background: #b8410c; border-color: #b8410c; }
.btn-outline {
  background: transparent;
  color: var(--ink);
  border-color: var(--ink);
}
.btn-outline:hover { background: var(--ink); color: var(--bg); }
.btn-on-dark {
  background: transparent;
  color: var(--bg);
  border-color: rgba(250, 250, 247, 0.5);
}
.btn-on-dark:hover { background: var(--bg); color: var(--ink); border-color: var(--bg); }

/* ---------- Credentials strip ---------- */
.creds-strip {
  border-bottom: 1px solid var(--line);
  background: #f2f2ec;
}
.creds-strip .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 2rem;
  padding: 1rem 2rem;
  justify-content: center;
}
.creds-strip span {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  color: var(--steel);
}
.creds-strip span::before {
  content: "";
  display: inline-block;
  width: 5px;
  height: 5px;
  background: var(--accent);
  margin-right: 0.55rem;
  vertical-align: middle;
}

/* ---------- Section scaffolding ---------- */
.section {
  padding: 5rem 0;
  border-bottom: 1px solid var(--line);
}
.section.tight { padding: 4rem 0; }
.section-label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  margin-bottom: 0.9rem;
}
h2 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.7rem, 3.2vw, 2.4rem);
  letter-spacing: -0.01em;
  max-width: 24ch;
  line-height: 1.18;
}
.section-body {
  margin-top: 1.25rem;
  color: var(--steel);
  max-width: 68ch;
  font-size: 1.05rem;
  line-height: 1.75;
}

/* ---------- Cards ---------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5px;
  margin-top: 2.75rem;
  background: var(--line);
  border: 1px solid var(--line);
}
.card {
  background: var(--bg);
  padding: 2rem 1.85rem;
}
.card-index {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--accent);
  margin-bottom: 1rem;
}
.card h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.25rem;
  margin-bottom: 0.65rem;
  letter-spacing: -0.005em;
}
.card p {
  color: var(--steel);
  font-size: 0.97rem;
  line-height: 1.65;
}

/* ---------- Segment list (who we serve) ---------- */
.segment-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.75rem 2rem;
  margin-top: 2.5rem;
}
.segment {
  border-top: 2px solid var(--ink);
  padding-top: 1rem;
}
.segment h3 {
  font-family: var(--font-mono);
  font-size: 0.92rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  font-weight: 500;
}

/* ---------- Dark CTA ---------- */
.cta-dark {
  background: var(--ink);
  color: var(--bg);
  padding: 4.5rem 0;
  text-align: center;
}
.cta-dark h2 { color: var(--bg); margin: 0 auto; }
.cta-dark p {
  color: rgba(250, 250, 247, 0.72);
  max-width: 52ch;
  margin: 1.1rem auto 2rem;
  font-size: 1.05rem;
}

/* ---------- Footer ---------- */
footer.site {
  padding: 3.5rem 0 2.5rem;
}
.footer-grid {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 2rem;
}
.footer-brand {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.2rem;
}
.footer-tagline {
  margin-top: 0.6rem;
  color: var(--steel);
  font-size: 0.92rem;
  max-width: 34ch;
}
.footer-contact {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  line-height: 2;
}
.footer-contact a { text-decoration: none; }
.footer-contact a:hover { color: var(--accent); }
.footer-bottom {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--steel);
}

/* ---------- Services page ---------- */
.service-block {
  padding: 4.5rem 0;
  border-bottom: 1px solid var(--line);
}
.service-block-head {
  display: flex;
  align-items: baseline;
  gap: 1.25rem;
  flex-wrap: wrap;
}
.service-num {
  font-family: var(--font-mono);
  font-size: 1rem;
  color: var(--accent);
}
.service-cols {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 2.5rem;
  margin-top: 2rem;
}
.service-cols h4 {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--steel);
  margin-bottom: 0.85rem;
}
.service-cols ul {
  list-style: none;
}
.service-cols li {
  padding: 0.5rem 0;
  border-top: 1px solid var(--line);
  font-size: 0.96rem;
}
.service-cols li:first-child { border-top: none; }
.callout {
  margin-top: 2rem;
  border-left: 3px solid var(--accent);
  padding: 1rem 1.5rem;
  background: #f2f2ec;
  font-size: 0.95rem;
  color: var(--steel);
}
.callout strong { color: var(--ink); }
.pricing-note {
  margin-top: 2rem;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--steel);
}

/* ---------- About page ---------- */
.cred-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5px;
  margin-top: 2.5rem;
  background: var(--line);
  border: 1px solid var(--line);
}
.cred-card {
  background: var(--bg);
  padding: 1.6rem 1.6rem;
}
.cred-card .abbr {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--accent);
}
.cred-card .full {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--steel);
  margin-top: 0.35rem;
  margin-bottom: 0.65rem;
}
.cred-card p {
  font-size: 0.9rem;
  color: var(--steel);
  line-height: 1.6;
}

/* ---------- Contact page ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: minmax(240px, 320px) 1fr;
  gap: 3.5rem;
  margin-top: 2.5rem;
}
.contact-block { }
.contact-block h4 {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  margin-top: 1.75rem;
  margin-bottom: 0.5rem;
}
.contact-block h4:first-child { margin-top: 0; }
.contact-block a {
  text-decoration: none;
  font-size: 1.05rem;
}
.contact-block a:hover { color: var(--accent); }
.contact-block p { color: var(--steel); font-size: 0.98rem; }

form.contact-form {
  display: grid;
  gap: 1.25rem;
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}
.field label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--steel);
  margin-bottom: 0.45rem;
}
.field input,
.field select,
.field textarea {
  width: 100%;
  border: 1px solid var(--line);
  background: var(--bg);
  padding: 0.75rem 0.85rem;
  font-family: var(--font-body);
  font-size: 0.98rem;
  color: var(--ink);
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--accent);
}
.field textarea { resize: vertical; min-height: 140px; }
form.contact-form .btn { justify-self: start; margin-top: 0.5rem; border: none; cursor: pointer; }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .contact-grid { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .wrap { padding: 0 1.25rem; }
  .nav-toggle { display: inline-block; }
  nav.primary {
    position: absolute;
    top: 76px;
    left: 0;
    right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    display: none;
    padding: 0.5rem 1.25rem 1.25rem;
  }
  nav.primary.open { display: flex; }
  nav.primary a { padding: 0.75rem 0; width: 100%; }
  nav.primary a.nav-cta { margin-top: 0.5rem; text-align: center; }
  .hero { padding: 3.5rem 0 2.75rem; }
  .section { padding: 3.5rem 0; }
  .form-row { grid-template-columns: 1fr; }
  .footer-grid { flex-direction: column; }
}
