:root {
  --blue: #284fa4;
  --blue-dark: #183b8d;
  --black: #1f1f1f;
  --white: #fdfdfd;
  --silver: #c8c8c8;
  --text: #f7f7f7;
}

* {
  box-sizing: border-box
}

html {
  scroll-behavior: smooth
}

body {
  margin: 0;
  background: var(--black);
  color: var(--text);
  font-family: Georgia, 'Times New Roman', serif;
  line-height: 1.55
}

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px clamp(18px, 5vw, 72px);
  background: var(--blue-dark);

  color: white a.brand {
    position: relative;
  }

  a.brand::before {
    content: "";
    background-image: url('images/MAC\ SYSTEMS\ logo.png');
  }
}

.brand,
.eyebrow,
h1,
h2,
h3 {
  font-family: Georgia, 'Times New Roman', serif;
  font-weight: 500;
  /* letter-spacing: -.03em */
}

h2 {
  font-size: clamp(2rem, 4vw, 2.8rem);
  line-height: 1.1;
  margin: 0 0 28px;
}

.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 20px;
}

.brand {
  font-size: 1.45rem
}

.nav {
  display: flex;
  align-items: center;
  gap: 26px;
  text-transform: uppercase;
  font-size: .9rem
}

.nav a:not(.button) {
  opacity: .9
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 28px;
  border-radius: 7px;
  background: var(--silver);
  color: #111;
  text-transform: uppercase;
  font-weight: 800;
  font-size: .9rem;
  letter-spacing: .02em
}

.button.light {
  background: var(--silver);
  color: #111
}

.section-blue {
  background: var(--blue);
  color: white
}

.section-dark {
  background: var(--black);
  color: white
}

.section-light {
  background: var(--white);
  color: var(--black);
}

.eyebrow {
  margin: 0 0 8px;
  text-transform: uppercase;
  font-size: .9rem;
  letter-spacing: .08em
}

.hero {
  position: relative;
  min-height: 560px;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0.2) 60%, rgba(255, 255, 255, 0) 100%);
  overflow: hidden
}

.hero img {
  width: 100%;
  height: 560px;
  object-fit: cover;
  object-position: center 25%;
  /* filter: brightness(.95); */
  position: relative;
  z-index: -1;
}

.hero-copy {
  position: absolute;
  left: clamp(22px, 10vw, 400px);
  top: 50%;
  transform: translateY(-50%);
  max-width: 560px
}

.hero h1 {
  margin: 0 0 16px;
  font-size: clamp(3.4rem, 5vw, 6.2rem);
  line-height: .9;
  /* text-transform: uppercase; */
  color: white;
  text-shadow: 0 3px 14px rgba(0, 0, 0, .2)
}

.hero p:not(.eyebrow) {
  font-family: Georgia, 'Times New Roman', serif;
  font-weight: 300;
  font-size: clamp(1.1rem, 2vw, 1.45rem);
  max-width: 430px;
  margin: 0 0 28px
}

section.intro {
  padding: 60px 0;

  .container {
    display: flex;

    .intro-image {
      width: 50%;
      /* display: flex;
      justify-content: center;
      align-items: center; */
      padding-right: 30px;

      img {
        /* width: 100%; */
        aspect-ratio: 1/1;
        object-fit: cover;
        border-radius: 5px;
      }
    }

    .intro-copy {
      width: 50%;
      padding-left: 30px;
      display: flex;
      flex-direction: column;
      justify-content: center;
      align-items: flex-start;

      /* h2 {
        font-size: clamp(2rem, 4vw, 2.8rem);
        line-height: .95;
        margin: 0 0 28px
      } */

      p {
        font-size: 1.06rem;
        margin: 0 0 18px;
        /* max-width: 760px */
      }

      .button {
        margin-top: 18px
      }
    }
  }
}

section.services {
  padding: 60px 0;

  .container {
    .section-heading {
      margin: 0 auto 32px;
      text-align: left
    }

    /* .section-heading h2 {
      font-size: clamp(2rem, 4vw, 2.8rem);
      line-height: .95;
      margin: 0
    } */

    .services {
      padding: clamp(46px, 7vw, 82px) clamp(18px, 3vw, 40px)
    }

    .service-grid {
      display: grid;
      grid-template-columns: repeat(4, 1fr);
      gap: 22px;
      /* max-width: 1320px; */
      /* margin: 0 auto 42px */
    }

    .service-card {
      background: white;
      color: #111;
      /* min-height: 310px; */
      padding: 34px 28px;
      display: flex;
      flex-direction: column;
      justify-content: flex-start;
      border-radius: 5px;
    }

    .service-card .icon {
      width: 72px;
      height: 72px;
      /* margin-bottom: auto; */
      color: #050505
    }

    .service-card h3 {
      font-size: 2rem;
      margin: 0;
    }

    .service-card p {
      font-size: 1.02rem;
      margin: 0
    }
  }
}

section.infrastructure {
  padding: 60px 0;

  .container {
    display: flex;

    .infra-copy {
      width: 50%;
      display: flex;
      flex-direction: column;
      justify-content: center;
      align-items: flex-start;
      padding-right: 30px;

      h2 {
        font-size: clamp(2rem, 4vw, 2.8rem);
        line-height: .95;
        margin: 0 0 28px
      }

      p {
        font-size: 1.06rem;
        margin: 0 0 18px;
      }
    }

    .infra-image {
      width: 50%;
      padding-left: 30px;

      img {
        aspect-ratio: 1 / 1;
        object-fit: cover;
        border-radius: 5px;
      }
    }
  }
}

section.gallery {
  padding: 60px 0;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px
}

.gallery-grid img {
  width: 100%;
  height: 360px;
  object-fit: cover;
  border-radius: 5px;
}

section.contact {
  text-align: center;
  position: relative;

  .overlay {
    padding: 60px 0;
    /* background-color: #284fa495; */
    z-index: 2;
    position: relative;
  }

  a.button {
    text-transform: none;
  }
}

section.contact::after {
  content: '';
  background-image: url('images/MAC SYSTEMS logo.png');
  background-repeat: no-repeat;
  background-size: cover;
  width: 200px;
  height: 200px;
  position: absolute;
  bottom: 0;
  right: 2%;
  z-index: 1;
}

.contact h2 {
  font-size: clamp(2.4rem, 5vw, 5rem);
  line-height: .95;
  margin: 0 0 20px
}

.contact p {
  font-size: 1.2rem;
  margin: 0 auto 28px;
  max-width: 650px
}

.footer {
  background: var(--black);
  color: var(--silver);
  text-align: center;

  padding: 24px p {
    margin: 0;
  }
}

@media(max-width:900px) {

  .nav a:not(.button) {
    display: none
  }

  .hero,
  .hero img {
    height: 560px;
    min-height: 560px
  }

  section.intro {
    padding: 20px 0;
  }

  section.intro .container {
    flex-direction: column;

    .intro-image {
      width: 100%;
      padding-right: 0;

      img {
        /* max-width: 300px; */
        aspect-ratio: 2/1;
        object-position: 50% 70%;
        width: 100%;
      }
    }

    .intro-copy {
      width: 100%;
      padding-left: 0;
      margin-top: 20px;
    }
  }

  .intro,
  .infrastructure {
    grid-template-columns: 1fr
  }

  section.services {
    padding: 20px 0;
  }

  section.services .container .service-grid {
    grid-template-columns: 1fr 1fr
  }

  section.gallery {
    padding: 20px 0;
  }


  .service-grid,
  .gallery-grid {
    grid-template-columns: 1fr 1fr
  }

  .intro {
    padding-top: 46px
  }

  section.infrastructure {
    padding: 20px 0;

    .container {
      flex-direction: column-reverse;

      .infra-image {
        width: 100%;
        padding-left: 0;

        img {
          aspect-ratio: 2/1;
          width: 100%;
        }
      }

      .infra-copy {
        width: 100%;
        padding-right: 0;
        margin-top: 20px;
      }
    }
  }

  .infrastructure {
    gap: 22px
  }

  .services>.button {
    margin-left: 0
  }

  .gallery-grid img {
    height: 300px
  }

  section.contact::after {
    opacity: 50%;
  }
}

@media(max-width:767px) {
  section.contact::after {
    opacity: 5%;
    width: 100%;
    height: 100%;
  }
}

@media(max-width:560px) {
  .site-header {
    padding: 14px 16px
  }

  .brand {
    font-size: 1.15rem
  }

  .button {
    min-height: 44px;
    padding: 10px 18px
  }

  .nav {
    gap: 0
  }

  section.hero {
    background: rgba(0, 0, 0, 0.5);
  }

  .hero,
  .hero img {
    height: 520px;
    min-height: 520px;
    object-position: right center;
  }

  .hero-copy {
    left: 20px;
    right: 20px
  }

  .hero h1 {
    font-size: 3.5rem
  }

  /* .intro,
  .services,
  .infrastructure,
  .gallery {
    padding-left: 18px;
    padding-right: 18px
  } */

  section.services .container .service-grid {
    grid-template-columns: 1fr
  }


  .service-grid,
  .gallery-grid {
    grid-template-columns: 1fr
  }

  .service-card {
    min-height: 250px
  }

  .gallery-grid img {
    height: 280px
  }
}