/* Base styles shared by every page */
:root {
  --text: #252725;
  --muted: #6c706b;
  --line: #d9ddd5;
  --accent: #61715f;
  --accent-dark: #465445;
  --soft: #f5f7f3;
  --paper: #fbfaf6;
  --deep-green: #334331;
  --page-width: 1440px;
  --white: #ffffff;
}

* {
  box-sizing: border-box;
}

html {
  overflow-y: scroll;
}

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  color: var(--text);
  background: var(--white);
  line-height: 1.6;
}

main,
.site-header,
.site-footer {
  max-width: var(--page-width);
  margin-right: auto;
  margin-left: auto;
}

main {
  background: var(--paper);
}

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

a {
  color: inherit;
  text-decoration: none;
}

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

.container {
  width: 100%;
  margin: 0 auto;
}

.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;
}

/* Header and navigation */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  min-height: 76px;
  padding: 0;
  border-bottom: 1px solid var(--line);
  background: rgba(251, 250, 246, 0.96);
}

.logo {
  color: var(--text);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0;
}

.logo span {
  color: var(--accent);
}

.brand-mccabe {
  color: var(--accent);
}

.brand-name {
  font-weight: 700;
}

.button .brand-mccabe {
  color: currentColor;
}

.projects-page .button .brand-name,
.projects-page .button .brand-mccabe {
  color: var(--white);
}

.projects-page .button .brand-name {
  margin-left: 4px;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 28px;
  color: var(--muted);
  font-size: 14px;
}

.site-nav a {
  padding: 28px 0;
  border-bottom: 1px solid transparent;
  transition: color 160ms ease, border-color 160ms ease;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--text);
  border-color: var(--accent);
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--line);
  background: var(--white);
  cursor: pointer;
}

.menu-line {
  display: block;
  width: 20px;
  height: 1px;
  margin: 5px auto;
  background: var(--text);
}

/* Hero */
.hero img {
  height: min(62vw, 620px);
  min-height: 360px;
  object-fit: cover;
}

.hero-copy {
  padding: 54px 0 72px;
}

.eyebrow {
  margin-bottom: 14px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  color: var(--accent);
  font-weight: 400;
  line-height: 1.12;
}

h1 {
  max-width: 820px;
  margin-bottom: 30px;
  font-size: clamp(42px, 7vw, 84px);
}

h2 {
  font-size: clamp(30px, 4vw, 52px);
}

h3 {
  font-size: 24px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 13px 24px;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: var(--white);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
  transition: background 160ms ease, border-color 160ms ease;
}

.button::after {
  content: "->";
  margin-left: 12px;
  font-weight: 400;
}

.button:hover {
  border-color: var(--accent-dark);
  background: var(--accent-dark);
}

/* Homepage layout inspired by the supplied reference */
.home-page .hero {
  min-height: auto;
  background: var(--paper);
}

.home-page .hero::after {
  content: none;
}

.home-page .hero img {
  height: auto;
  min-height: 0;
  object-fit: contain;
}

.home-page .hero-copy {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(560px, 0.85fr);
  gap: 64px;
  align-items: start;
  width: 100%;
  padding: 38px 0 70px;
}

.home-page .hero-copy h1 {
  grid-column: 2;
  justify-self: end;
  max-width: none;
  margin-bottom: 0;
  color: var(--text);
  font-size: 22px;
  font-weight: 400;
  line-height: 1.5;
  text-align: right;
  white-space: nowrap;
}

.home-page .hero-copy p {
  justify-self: end;
  width: max-content;
  max-width: none;
  margin: 3px 0 0;
  color: var(--text);
  font-size: 14px;
  line-height: 1.8;
  white-space: nowrap;
}

.section-intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(560px, 0.85fr);
  gap: 64px;
  align-items: start;
  margin-bottom: 58px;
}

.home-services .section-intro {
  width: 100%;
}

.home-about h2,
.home-contact h2 {
  font-size: clamp(30px, 3vw, 38px);
  line-height: 1.18;
}

.section-intro h2 {
  font-size: 22px;
  font-weight: 700;
  line-height: 1.18;
}

.section-intro p {
  max-width: none;
  margin: 0;
  color: var(--text);
  font-size: 14px;
  line-height: 1.8;
  white-space: nowrap;
}

.home-services {
  padding: 70px 0 96px;
  background: var(--paper);
}

.home-services .container {
  width: 100%;
}

.home-services-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0;
}

.home-services-grid article {
  min-height: 236px;
  padding: 0 28px;
  border-left: 1px solid var(--line);
  text-align: center;
}

.home-services-grid article:first-child {
  border-left: 0;
  padding-left: 0;
}

.home-services-grid article:last-child {
  padding-right: 0;
}

.svg-defs {
  display: none;
}

.service-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 58px;
  height: 58px;
  margin: 0 auto 28px;
  color: var(--accent);
  letter-spacing: 0;
}

.service-icon svg {
  width: 48px;
  height: 48px;
  fill: none;
  stroke: #5F7F73;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.5;
}

.home-services-grid h3 {
  margin-bottom: 20px;
  font-size: 15px;
  line-height: 1.35;
  text-align: center;
  white-space: nowrap;
}

.home-services-grid p {
  margin-bottom: 0;
  color: var(--text);
  font-size: 13px;
  line-height: 1.8;
}

.home-about {
  padding: 84px 0;
  background: #f1efea;
}

.home-about-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.75fr) minmax(0, 1fr);
  gap: 110px;
}

.home-about p {
  max-width: 520px;
  color: var(--text);
  font-size: 15px;
  line-height: 1.85;
}

.home-about .button {
  margin-top: 18px;
}

.home-contact {
  padding: 68px 0;
  background: var(--accent);
  color: var(--white);
}

.home-contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(240px, 0.8fr) auto;
  gap: 70px;
  align-items: center;
  width: min(1280px, calc(100% - 48px));
}

.home-contact .eyebrow {
  color: var(--white);
  transform: translateY(-18px);
}

.home-contact h2 {
  margin-bottom: 22px;
  color: var(--white);
  font-size: 22px;
  line-height: 1.3;
}

.home-contact p,
.home-contact address {
  margin: 0;
  color: var(--white);
  font-style: normal;
  font-size: 14px;
}

.home-contact address p + p {
  margin-top: 16px;
}

.outline-button {
  border-color: rgba(255, 255, 255, 0.58);
  background: transparent;
}

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

/* Page sections */
.section {
  padding: 86px 0;
  border-top: 1px solid var(--line);
}

.muted-section,
.contact-band {
  background: var(--soft);
}

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

.section-heading h2 {
  max-width: 720px;
}

.page-intro {
  padding: 52px 0 28px;
  border-bottom: 1px solid var(--line);
}

.page-intro h1 {
  margin-bottom: 22px;
}

.projects-page .page-intro h1,
.about-page .page-intro h1,
.services-page .services-intro h1 {
  margin-bottom: 14px;
  font-size: 22px;
  line-height: 1.3;
}

.projects-page .page-intro h1 {
  color: var(--text);
}

.about-page .page-intro h1 {
  color: var(--text);
}

.projects-page .page-intro .eyebrow {
  margin-top: 44px;
}

.projects-page .page-intro .eyebrow,
.about-page .page-intro .eyebrow,
.services-page .services-label {
  color: var(--accent);
}

.projects-page .page-intro .eyebrow,
.about-page .page-intro .eyebrow,
.contact-page .page-intro .eyebrow,
.services-page .services-intro h1 {
  font-size: 22px;
  line-height: 1.3;
}

.services-page .services-intro h1 {
  margin-top: 44px;
  margin-bottom: 0;
  font-weight: 700;
}

.contact-page .page-intro h1 {
  margin-bottom: 14px;
  color: var(--text);
  font-size: 22px;
  line-height: 1.3;
}

.contact-page .page-intro .eyebrow {
  color: var(--accent);
  margin-top: 44px;
}

.about-page .page-intro .eyebrow {
  margin-top: 44px;
}

.page-intro .eyebrow {
  margin-bottom: 0;
}

.about-page .page-intro,
.contact-page .page-intro {
  padding-top: 52px;
}

.about-page .page-intro,
.contact-page .page-intro {
  padding-bottom: 28px;
}

.page-intro .button {
  margin-top: 10px;
}

.large-text {
  max-width: 680px;
  color: var(--text);
  font-size: clamp(20px, 2.4vw, 28px);
  line-height: 1.45;
}

.projects-page .large-text,
.contact-page .large-text {
  max-width: none;
  font-size: 20px;
  line-height: 1.45;
}

.about-page .large-text {
  max-width: none;
  font-size: 22px;
  line-height: 1.45;
}

.about-page .large-text {
  white-space: nowrap;
}

.about-page .about-lead {
  font-size: 20px;
}

.about-page .section .split > div {
  width: 760px;
  max-width: 100%;
}

.about-page .section {
  padding-top: 64px;
}

.projects-page .section .large-text {
  max-width: none;
  margin-bottom: 0;
}

.projects-page .page-intro + .section .container {
  display: grid;
  grid-template-columns: minmax(0, 50%) auto;
  gap: 64px;
  align-items: center;
}

.projects-page .page-intro + .section .button {
  justify-self: end;
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 72px;
  align-items: start;
}

/* Services */
.service-list,
.services-grid {
  list-style: none;
  margin: 0;
  padding: 0;
}

.service-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--line);
}

.service-list li {
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}

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

.services-grid article {
  padding: 32px 0;
  border-top: 1px solid var(--line);
}

.services-grid p {
  color: var(--text);
}

.services-page {
  background: #fbfbf8;
}

.services-container {
  width: 100%;
}

.services-intro {
  padding: 52px 0 28px;
  border-bottom: 1px solid var(--line);
}

.services-intro .section-intro {
  margin-bottom: 0;
}

.services-label {
  margin-bottom: 22px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.services-intro h1 {
  margin-bottom: 0;
  font-size: clamp(34px, 5vw, 48px);
  line-height: 1.12;
}

.services-intro p {
  max-width: 360px;
  margin-bottom: 0;
  color: var(--text);
  font-size: 14px;
  line-height: 1.8;
}

.services-intro .services-summary {
  max-width: 1040px;
  margin: 0 0 18px;
  color: var(--text);
  font-size: 22px;
  line-height: 1.3;
  white-space: nowrap;
}

.page-intro + .section {
  border-top: 0;
}

.projects-page .page-intro + .section,
.contact-page .page-intro + .section {
  padding-top: 64px;
}

.services-section {
  padding: 64px 0 112px;
}

.services-page .home-services-grid h2 {
  margin-bottom: 18px;
  font-size: 16px;
  line-height: 1.35;
}

.services-page .home-services-grid p {
  margin-bottom: 0;
  font-size: 13px;
  line-height: 1.75;
}

/* Forms */
.contact-form {
  display: grid;
  gap: 14px;
}

.form-hidden {
  display: none;
}

.contact-form label {
  color: var(--muted);
  font-size: 14px;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 14px 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: var(--text);
  font: inherit;
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: 0;
  border-color: var(--accent);
}

.contact-form .button {
  justify-self: start;
  margin-top: 14px;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 34px 0;
  border-top: 1px solid var(--line);
  color: var(--text);
  font-size: 14px;
}

.site-footer p {
  margin-bottom: 0;
}

.site-footer span {
  color: var(--accent);
}

/* Responsive layout */
@media (max-width: 820px) {
  .container {
    width: min(100% - 40px, 1120px);
  }

  .site-header {
    padding: 0 20px;
  }

  .menu-toggle {
    display: block;
  }

  .site-nav {
    position: absolute;
    top: 76px;
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 14px 20px 22px;
    border-bottom: 1px solid var(--line);
    background: var(--white);
  }

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

  .site-nav a {
    width: 100%;
    padding: 14px 0;
  }

  .hero img {
    height: 58vh;
    min-height: 340px;
  }

  .home-page .hero img {
    min-height: 0;
    height: auto;
  }

  .home-page .hero-copy {
    grid-template-columns: 1fr;
    gap: 22px;
    width: min(100% - 40px, 1120px);
    padding: 32px 0 56px;
  }

  .home-page .hero-copy p {
    justify-self: start;
    width: auto;
    white-space: normal;
  }

  .home-page .hero-copy h1 {
    grid-column: auto;
    justify-self: start;
    text-align: left;
    white-space: normal;
  }

  .section-intro,
  .home-about-grid,
  .home-contact-grid {
    grid-template-columns: 1fr;
    gap: 30px;
    width: min(100% - 40px, 1120px);
  }

  .section-intro p {
    white-space: normal;
  }

  .services-intro .services-summary {
    white-space: normal;
  }

  .about-page .large-text {
    white-space: normal;
  }

  .projects-page .section .large-text {
    max-width: 100%;
  }

  .projects-page .page-intro + .section .container {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .projects-page .page-intro + .section .button {
    justify-self: start;
  }

  .home-services {
    padding: 52px 0 66px;
  }

  .home-services .container {
    width: min(100% - 40px, 1120px);
  }

  .home-services-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 34px 34px;
  }

  .home-services-grid article,
  .home-services-grid article:first-child {
    min-height: auto;
    padding: 0 0 28px;
    border-left: 0;
    border-bottom: 1px solid var(--line);
  }

  .home-services-grid h3 {
    white-space: normal;
  }

  .home-about,
  .home-contact {
    padding: 58px 0;
  }

  .hero-copy,
  .section,
  .page-intro {
    padding: 58px 0;
  }

  .services-intro {
    padding: 58px 0 24px;
  }

  .services-section {
    padding: 40px 0 72px;
  }

  .split,
  .services-grid {
    grid-template-columns: 1fr;
  }

  .split {
    gap: 34px;
  }

  .service-list {
    grid-template-columns: 1fr;
  }

  .site-footer {
    display: block;
    padding: 28px 20px;
  }

  .site-footer p + p {
    margin-top: 8px;
  }
}

@media (max-width: 520px) {
  .container {
    width: min(100% - 28px, 1120px);
  }

  .home-services .container {
    width: min(100% - 28px, 1120px);
  }

  h1 {
    font-size: 38px;
  }

  h2 {
    font-size: 30px;
  }

  .home-services-grid {
    grid-template-columns: 1fr;
  }

  .home-page .hero img {
    min-height: 0;
    height: auto;
  }
}
