:root {
  --navy: #052d51;
  --navy-dark: #021a30;
  --blue: #0b5f9f;
  --gold: #f6b93b;
  --ink: #15202b;
  --muted: #5e6a78;
  --line: #dfe6ee;
  --panel: #f5f8fb;
  --white: #ffffff;
  --shadow: 0 18px 50px rgba(5, 45, 81, 0.16);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: "Open Sans", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  background: var(--white);
}

a {
  color: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 28px;
  min-height: 118px;
  padding: 14px clamp(18px, 4vw, 58px);
  background: var(--navy);
  color: var(--white);
  border-bottom: 1px solid rgba(255, 255, 255, 0.26);
}

.brand img {
  width: clamp(190px, 23vw, 300px);
}

.main-nav {
  display: flex;
  justify-content: center;
  gap: clamp(14px, 2.4vw, 34px);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.main-nav a,
.footer-links a {
  text-decoration: none;
}

.main-nav a:hover,
.footer-links a:hover {
  color: var(--gold);
}

.header-call,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 4px;
  font-weight: 800;
  text-decoration: none;
  border: 2px solid transparent;
}

.header-call,
.button.primary {
  color: var(--navy-dark);
  background: var(--gold);
}

.button.secondary {
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.68);
  background: rgba(5, 45, 81, 0.22);
}

.hero {
  min-height: 620px;
  display: flex;
  align-items: center;
  background:
    linear-gradient(90deg, rgba(2, 26, 48, 0.86) 0%, rgba(2, 26, 48, 0.68) 42%, rgba(2, 26, 48, 0.18) 100%),
    url("https://merrimackvalleyroofing.com/wp-content/uploads/2023/06/Merrimack-hero-1.png") right center / cover no-repeat;
  color: var(--white);
}

.hero-inner {
  width: min(760px, calc(100% - 36px));
  margin-left: clamp(18px, 7vw, 96px);
  padding: 86px 0;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--gold);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 760px;
  margin-bottom: 20px;
  font-size: clamp(42px, 6vw, 78px);
  line-height: 0.98;
  font-weight: 900;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 18px;
  color: var(--navy-dark);
  font-size: clamp(31px, 4vw, 50px);
  line-height: 1.08;
  font-weight: 900;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 10px;
  color: var(--navy-dark);
  font-size: 22px;
  line-height: 1.18;
}

.hero-copy {
  max-width: 650px;
  margin-bottom: 28px;
  font-size: clamp(18px, 2vw, 22px);
  color: rgba(255, 255, 255, 0.9);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.trust-band {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--navy);
  color: var(--white);
}

.trust-band div {
  padding: 26px clamp(18px, 3vw, 44px);
  background: #083760;
}

.trust-band strong,
.trust-band span {
  display: block;
}

.trust-band strong {
  margin-bottom: 6px;
  font-size: 19px;
}

.trust-band span {
  color: #d9e4ef;
}

.section {
  width: min(1180px, calc(100% - 36px));
  margin: 0 auto;
  padding: clamp(62px, 8vw, 108px) 0;
}

.intro,
.materials,
.contact-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.9fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}

.section-copy p,
.contact-copy p,
.service-card p,
.steps p {
  color: var(--muted);
}

.image-panel {
  position: relative;
  overflow: hidden;
  border-radius: 6px;
  box-shadow: var(--shadow);
}

.image-panel::before {
  content: "";
  position: absolute;
  inset: 16px;
  border: 2px solid rgba(246, 185, 59, 0.8);
  pointer-events: none;
}

.image-panel img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.services {
  width: 100%;
  max-width: none;
  padding-left: clamp(18px, 4vw, 58px);
  padding-right: clamp(18px, 4vw, 58px);
  background: var(--panel);
}

.section-heading {
  width: min(900px, 100%);
  margin: 0 auto 36px;
  text-align: center;
}

.service-grid {
  width: min(1180px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 22px;
}

.service-card {
  overflow: hidden;
  border-radius: 6px;
  background: var(--white);
  box-shadow: 0 10px 30px rgba(5, 45, 81, 0.09);
}

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

.service-card div {
  padding: 24px;
}

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

.logo-strip img {
  width: 100%;
  min-height: 94px;
  padding: 18px;
  object-fit: contain;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--white);
}

.process {
  width: 100%;
  max-width: none;
  padding-left: clamp(18px, 4vw, 58px);
  padding-right: clamp(18px, 4vw, 58px);
  background: var(--navy-dark);
}

.process h2,
.process h3 {
  color: var(--white);
}

.steps {
  width: min(1180px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}

.steps div {
  min-height: 230px;
  padding: 30px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.steps span {
  display: inline-block;
  margin-bottom: 22px;
  color: var(--gold);
  font-size: 28px;
  font-weight: 900;
}

.steps p {
  color: #d9e4ef;
}

.contact-section {
  align-items: start;
}

.contact-copy a {
  color: var(--blue);
  font-weight: 800;
}

.contact-line {
  margin-bottom: 8px;
}

.nowrap {
  white-space: nowrap;
}

.contact-form {
  display: grid;
  gap: 16px;
  padding: clamp(24px, 4vw, 38px);
  border-radius: 6px;
  background: var(--panel);
  border: 1px solid var(--line);
}

.contact-form label {
  display: grid;
  gap: 7px;
  color: var(--navy-dark);
  font-weight: 800;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  border: 1px solid #c9d4df;
  border-radius: 4px;
  padding: 13px 14px;
  font: inherit;
  background: var(--white);
}

.contact-form textarea {
  resize: vertical;
}

.contact-form .button {
  width: 100%;
  cursor: pointer;
}

.site-footer {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto;
  gap: 28px;
  align-items: start;
  padding: 44px clamp(18px, 4vw, 58px);
  background: #272727;
  color: var(--white);
}

.site-footer p {
  max-width: 560px;
  margin-top: 12px;
  color: #d4d7dd;
}

.footer-links {
  display: grid;
  gap: 9px;
  text-align: right;
}

@media (max-width: 980px) {
  .site-header {
    grid-template-columns: 1fr auto;
    min-height: 98px;
  }

  .main-nav {
    grid-column: 1 / -1;
    order: 3;
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .hero {
    min-height: 560px;
    background:
      linear-gradient(90deg, rgba(2, 26, 48, 0.9), rgba(2, 26, 48, 0.56)),
      url("https://merrimackvalleyroofing.com/wp-content/uploads/2023/06/Merrimack-hero_mobile.png") center / cover no-repeat;
  }

  .trust-band,
  .intro,
  .materials,
  .contact-section,
  .service-grid,
  .steps,
  .site-footer {
    grid-template-columns: 1fr;
  }

  .footer-links {
    text-align: left;
  }
}

@media (max-width: 640px) {
  .site-header {
    gap: 14px;
    padding: 12px 16px;
  }

  .header-call {
    min-height: 42px;
    padding: 0 14px;
  }

  .main-nav {
    font-size: 12px;
    gap: 16px;
  }

  .hero-inner {
    width: calc(100% - 32px);
    margin: 0 auto;
    text-align: center;
  }

  .hero-actions {
    justify-content: center;
  }

  .button {
    width: 100%;
  }

  .service-card div,
  .steps div {
    padding: 22px;
  }
}
