:root {
  --ink: #15191d;
  --muted: #5c6874;
  --line: #d9dee4;
  --paper: #ffffff;
  --soft: #f4f6f8;
  --steel: #314253;
  --blue: #1261a6;
  --blue-dark: #0d4778;
  --gold: #f0b323;
  --green: #2f7d61;
  --red: #b13b32;
  --shadow: 0 18px 48px rgba(15, 24, 33, 0.16);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.5;
}

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

a {
  color: inherit;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.site-header,
.tools-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 76px;
  padding: 12px clamp(18px, 5vw, 64px);
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid rgba(217, 222, 228, 0.9);
  backdrop-filter: blur(14px);
}

.brand img {
  width: min(245px, 56vw);
  height: auto;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 22px;
  font-size: 0.92rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0;
}

.site-nav a {
  text-decoration: none;
  color: var(--steel);
}

.site-nav a:hover {
  color: var(--blue);
}

.nav-action {
  padding: 10px 14px;
  color: var(--paper) !important;
  background: var(--blue);
  border-radius: 6px;
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--paper);
}

.nav-toggle span:not(.sr-only) {
  display: block;
  width: 20px;
  height: 2px;
  margin: 4px auto;
  background: var(--ink);
}

.hero {
  position: relative;
  display: flex;
  min-height: calc(100vh - 76px);
  align-items: center;
  padding: clamp(72px, 10vw, 124px) clamp(20px, 7vw, 92px);
  color: var(--paper);
  isolation: isolate;
}

.public-hero {
  background: linear-gradient(90deg, rgba(13, 26, 37, 0.84), rgba(13, 26, 37, 0.44), rgba(13, 26, 37, 0.18)), url("/assets/hero-work.jpg") center / cover no-repeat;
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 8px;
  background: linear-gradient(90deg, var(--blue), var(--gold), var(--red));
  z-index: -1;
}

.hero-content {
  width: min(760px, 100%);
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--gold);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero h1,
.tools-hero h1 {
  margin: 0;
  font-size: clamp(2.7rem, 6vw, 5.8rem);
  line-height: 0.95;
  letter-spacing: 0;
}

.hero p {
  max-width: 620px;
  margin: 24px 0 0;
  font-size: clamp(1.05rem, 1.7vw, 1.35rem);
}

.hero-actions,
.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: 6px;
  font: inherit;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}

.button.primary {
  color: var(--paper);
  background: var(--blue);
}

.button.primary:hover {
  background: var(--blue-dark);
}

.button.secondary {
  color: var(--ink);
  background: var(--paper);
  border-color: var(--line);
}

.button.secondary:hover {
  border-color: var(--blue);
}

.button.small {
  min-height: 40px;
  padding-inline: 14px;
  font-size: 0.9rem;
}

.section {
  padding: clamp(58px, 8vw, 96px) clamp(20px, 7vw, 92px);
}

.section-heading {
  max-width: 760px;
  margin-bottom: 34px;
}

.section-heading.compact {
  margin-bottom: 24px;
}

.section h2,
.tools-hero h1,
.workflow-section h2 {
  margin: 0;
  font-size: clamp(2rem, 3.5vw, 3.35rem);
  line-height: 1;
  letter-spacing: 0;
}

.section-heading p:not(.eyebrow),
.project-copy p,
.split-copy p,
.contact-section p,
.workflow-section p {
  color: var(--muted);
  font-size: 1.05rem;
}

.service-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.service-card,
.project-grid article,
.tool-card {
  overflow: hidden;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.service-card img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.service-card div,
.project-grid article,
.tool-card {
  padding: 20px;
}

.service-card h3,
.project-grid h3,
.tool-card h2 {
  margin: 0 0 8px;
  font-size: 1.25rem;
  letter-spacing: 0;
}

.service-card p,
.tool-card p {
  margin: 0;
  color: var(--muted);
}

.project-band {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: 34px;
  align-items: center;
  background: var(--soft);
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.project-grid img {
  width: 100%;
  aspect-ratio: 1.15 / 1;
  object-fit: cover;
  border-radius: 6px;
}

.project-grid h3 {
  margin-top: 14px;
}

.safety-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 460px);
  gap: 34px;
  align-items: center;
}

.metrics {
  display: grid;
  gap: 12px;
}

.metrics div,
.tool-status div,
.workflow-list li {
  padding: 22px;
  background: var(--soft);
  border-left: 5px solid var(--blue);
  border-radius: 6px;
}

.metrics strong,
.tool-status strong,
.workflow-list strong {
  display: block;
  font-size: 1.45rem;
}

.metrics span,
.tool-status span,
.workflow-list span {
  display: block;
  color: var(--muted);
}

.contact-section {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  color: var(--paper);
  background: linear-gradient(135deg, #17212a, #253747);
}

.contact-section .eyebrow,
.contact-section p {
  color: #f6d882;
}

.contact-section div:first-child {
  max-width: 760px;
}

.site-footer {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 28px clamp(20px, 7vw, 92px);
  border-top: 1px solid var(--line);
}

.site-footer img {
  width: 168px;
}

.site-footer p {
  margin: 4px 0 0;
  color: var(--muted);
}

.tools-body {
  min-height: 100vh;
  background: linear-gradient(180deg, #f7f9fb 0, #ffffff 44%);
}

.tools-hero {
  padding: clamp(48px, 8vw, 76px) clamp(20px, 7vw, 92px) 24px;
}

.tools-hero p:not(.eyebrow) {
  max-width: 760px;
  color: var(--muted);
  font-size: 1.08rem;
}

.tool-status {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  padding: 0 clamp(20px, 7vw, 92px) 24px;
}

.tool-status div:first-child {
  border-left-color: var(--gold);
}

.tool-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  padding: 0 clamp(20px, 7vw, 92px) clamp(48px, 8vw, 72px);
}

.tool-card {
  display: flex;
  min-height: 280px;
  flex-direction: column;
  gap: 14px;
  box-shadow: 0 12px 30px rgba(18, 39, 60, 0.08);
}

.tool-card .button {
  width: 100%;
  margin-top: auto;
}

.tool-card.muted {
  background: #f9fafb;
}

.tool-icon {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  color: var(--paper);
  background: var(--blue);
  border-radius: 6px;
  font-weight: 900;
}

.workflow-section {
  padding: 56px clamp(20px, 7vw, 92px) 80px;
  background: #17212a;
  color: var(--paper);
}

.workflow-section p,
.workflow-list span {
  color: #cbd4dd;
}

.workflow-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.workflow-list li {
  background: rgba(255, 255, 255, 0.08);
  border-left-color: var(--gold);
}

.draft-toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 30;
  max-width: min(340px, calc(100vw - 36px));
  padding: 14px 16px;
  color: var(--paper);
  background: #17212a;
  border-radius: 8px;
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 180ms ease, transform 180ms ease;
  pointer-events: none;
}

.draft-toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 980px) {
  .nav-toggle {
    display: block;
  }

  .site-nav {
    position: absolute;
    inset: 76px 0 auto;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 12px 20px 20px;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
  }

  .site-nav.is-open {
    display: flex;
  }

  .site-nav a {
    padding: 13px 0;
  }

  .nav-action {
    text-align: center;
  }

  .service-grid,
  .project-band,
  .safety-section,
  .tool-grid,
  .workflow-list {
    grid-template-columns: 1fr 1fr;
  }

  .project-band,
  .safety-section {
    align-items: start;
  }
}

@media (max-width: 680px) {
  .site-header,
  .tools-header {
    min-height: 68px;
    padding-inline: 16px;
  }

  .brand img {
    width: min(210px, 58vw);
  }

  .hero {
    min-height: 86vh;
    padding-inline: 20px;
  }

  .hero-actions,
  .contact-actions,
  .contact-section,
  .site-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .button {
    width: 100%;
  }

  .section {
    padding-inline: 20px;
  }

  .service-grid,
  .project-grid,
  .project-band,
  .safety-section,
  .tool-status,
  .tool-grid,
  .workflow-list {
    grid-template-columns: 1fr;
  }

  .tools-hero,
  .tool-status,
  .tool-grid,
  .workflow-section {
    padding-inline: 20px;
  }
}
