/* Fonts */

@font-face { font-family: 'Larsseit'; src: url("fonts/Larsseit-Bold.woff") format("woff"); font-weight: bold; font-style: normal; }
@font-face { font-family: 'Larsseit'; src: url("fonts/Larsseit-BoldItalic.woff") format("woff"); font-weight: bold; font-style: italic; }
@font-face { font-family: 'Larsseit'; src: url("fonts/Larsseit-Italic.woff") format("woff"); font-weight: normal; font-style: italic; }
@font-face { font-family: 'Larsseit'; src: url("fonts/Larsseit-Regular.woff") format("woff"); font-weight: normal; font-style: normal; }
@font-face { font-family: 'Merriweather'; src: url("fonts/Merriweather-Regular.woff") format("woff"); font-weight: normal; font-style: normal; }
@font-face { font-family: 'Merriweather'; src: url("fonts/Merriweather-Italic.woff") format("woff");  font-weight: normal; font-style: italic; }
@font-face { font-family: 'Merriweather'; src: url("fonts/Merriweather-Bold.woff") format("woff"); font-weight: bold; font-style: normal; }
@font-face { font-family: 'Merriweather'; src: url("fonts/Merriweather-BoldItalic.woff") format("woff"); font-weight: bold; font-style: italic; }

/* Global styles */

* {
  box-sizing: border-box;
}

html {
  font-size: 62.5%;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  margin: 0;
  color: #273b5a;
  background: #ffffff;
  font-size: 1.6rem;
  font-family: 'Larsseit', sans-serif;
}

a {
  color: #2978d6;
}

h1 {
  font-family: 'Merriweather', serif;
  font-weight: 400;
}

main {
  display: grid;
  grid-template-areas: 'stack';
  overflow: hidden;
}

main > .page {
  grid-area: stack;
  width: 100%;
}

main > .home.page,
main > .contact.page {
  transition: transform 220ms ease, opacity 220ms ease;
  will-change: transform, opacity;
}

main.route-home > .home.page {
  transform: translateX(0);
  opacity: 1;
  pointer-events: auto;
}

main.route-home > .contact.page {
  transform: translateX(100%);
  opacity: 0;
  pointer-events: none;
}

main.route-contact > .home.page {
  transform: translateX(-100%);
  opacity: 0;
  pointer-events: none;
}

main.route-contact > .contact.page {
  transform: translateX(0);
  opacity: 1;
  pointer-events: auto;
}

.page-shell {
  width: min(150rem, 100%);
  margin: 0 auto;
  padding: 0 4rem;
  @media (max-width: 700px) {
    padding: 0 2rem;
  }
}

.accent-line {
  margin: 2.2rem 0;
  border-top: 4px solid #2978d6;
  width: 6rem;
  @media (max-width: 700px) {
    margin: 1.5rem 0;
    border-width: 3px;
  }
}


/* Header */

.topbar {
  height: 12rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #fff;
  @media (max-width: 700px) {
    position: sticky;
    top: 0;
    height: 7rem;
    z-index: 1000;
  }

  .logo-block {
    width: 21rem;
    @media (max-width: 700px) {
      width: 12rem;
    }
    img {
      display: block;
      width: 100%;
      height: auto;
    }
  }

  nav {
    display: flex;
    gap: 6rem;
    margin-right: 4rem;
    @media (max-width: 700px) {
      gap: 6vw;
      margin: 0;
    }

    a {
      padding: 1rem 0;
      text-decoration: none;
      color: #273b5a;
      font-weight: 700;
      font-size: 1.8rem;
      border-bottom: 4px solid transparent;
      text-transform: uppercase;
      @media (max-width: 700px) {
        padding: 0.6rem 0;
        font-size: 1.5rem;
        border-width: 3px;
      }

      &.active {
        border-color: #2978d6;
      }
    }
  }
}

/* Hero */

.hero {
  min-height: 37.5rem;
  padding-top: 4rem;
  padding-bottom: 4rem;
  background: url(images/hero.webp) no-repeat right center;
  background-size: auto 100%;
  @media (max-width: 1160px) {
    min-height: 0;
  }
  @media (max-width: 950px) {
    background-image: linear-gradient(rgba(255, 255, 255, 0.55), rgba(255, 255, 255, 0.8)), url(images/hero.webp);
  }
  @media (max-width: 540px) {
    background-position: 55% center;
  }

  h1 {
    max-width: 75rem;
    margin: 0;
    font-family: 'Merriweather', serif;
    font-size: 4.2rem;
    line-height: 1.4;
    font-weight: 400;
    @media (max-width: 1160px) {
      max-width: 55rem;
      font-size: 3rem;
      mix-blend-mode: multiply;
    }
    @media (max-width: 600px) {
      max-width: 35rem;
      font-size: 2.1rem;
      br {
        display: none;
      }
    }
  }

  p {
    margin: 0;
    max-width: 61rem;
    font-size: 2rem;
    line-height: 1.5;
    @media (max-width: 1160px) {
      max-width: 52rem;
      font-size: 1.8rem;
    }
    @media (max-width: 600px) {
      max-width: 45rem;
      font-size: 1.5rem;
    }
  }
}


/* Pillars */

.pillars {
  padding: 4rem 0 2.5rem 0;
  border-bottom: 1px solid #ddd;
  margin-bottom: 3rem;

  .page-shell {
    display: flex;
    justify-content: space-between;
    padding: 0;
    @media (max-width: 1050px) {
      flex-direction: column;
      gap: 3rem;
    }
  
    .pillar {
      display: flex;
      gap: 3.5rem;
      flex: 0 0 33.33%;
      padding: 0 6rem;
      @media (max-width: 1230px) {
        padding: 0 3rem;
      }
      @media (max-width: 1050px) {
        margin: 0 auto;
        max-width: 55rem;
        padding: 0 2rem;
      }
      &:not(:last-child) {
        border-right: 1px solid #bbb;
        @media (max-width: 1050px) {
          border-right: 0;
          border-bottom: 1px solid #ddd;
          padding-bottom: 3rem;
        }
      }
  
      .icon-box {
        width: 8rem;
        height: 7.5rem;
        flex-shrink: 0;
        img {
          display: block;
          width: 100%;
          height: 100%;
        }
      }
  
      .pillar-content {
        h2 {
          margin: 0;
          font-size: 1.8rem;
          line-height: 1.3;
        }
        p {
          margin: 0.5rem 0 0;
          font-size: 1.5rem;
          line-height: 1.5;
        }
      }
    }
  }
}

/* Featured work */

.feature {
  display: flex;
  gap: 0 4rem;
  justify-content: center;
  margin-bottom: 4rem;

  @media (max-width: 815px) {
    max-width: 55rem;
    margin: 0 auto 4rem auto;
    padding: 0 2rem;
    flex-direction: column;
  }

  .feature-brand {
    display: flex;
    align-items: center;
    margin: 0;
    padding-right: 5rem;
    border-right: 1px solid #bbb;
    flex: 0 0 auto;
    @media (max-width: 815px) {
      padding: 0;
      border-right: 0;
      margin-bottom: 2rem;
    }
    img {
      width: 100%;
      max-width: 24rem;
      height: auto;
      @media (max-width: 815px) {
        max-width: 18rem;
      }
    }
  }

  .feature-content {
    flex: 0 1 auto;
    @media (max-width: 815px) {
      display: contents;
    }

    h3 {
      margin: 0;
      color: #2978d6;
      font-size: 1.7rem;
      line-height: 1.3;
      text-transform: uppercase;
    }
    p {
      max-width: 66rem;
      margin: 0.5rem 0 0;
      font-size: 1.5rem;
      line-height: 1.5;
    }
  }

  .metrics {
    display: flex;
    gap: 3rem;
    margin: 2.5rem 0 0 0;
    padding: 0;
    list-style: none;

    @media (max-width: 1230px) {
      flex-wrap: wrap;
    }
    @media (max-width: 500px) {
      flex-direction: column;
    }

    li {
      display: flex;
      align-items: center;
      gap: 1.5rem;
      @media (max-width: 1230px) {
        flex-basis: calc(50% - 1.5rem);
        max-width: 26rem;
      }
      &:not(:last-child) {
        border-right: 1px solid #bbb;
        padding-right: 3rem;
        @media (max-width: 1230px) {
          border-right: 0;
          padding-right: 0;
        }
      }

      .icon-box {
        width: 4.5rem;
        height: 4rem;
        flex-shrink: 0;
        img {
          display: block;
          width: 100%;
          height: 100%;
        }
      }

      strong {
        display: block;
        font-size: 1.5rem;
        line-height: 1.3;
      }
      span {
        display: block;
        font-size: 1.4rem;
        line-height: 1.5;
      }
    }
  }
}

/* Footer */

footer {
  display: flex;
  margin-top: auto;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  color: #fff;
  text-align: center;
  padding: 2rem 2rem;
  background: #00254b;
  min-height: 8.2rem;
  
  p {
    margin: 0;
    font-family: 'Merriweather', serif;
    font-size: 1.6rem;
    line-height: 1.5;
  }
  .accent-line {
    margin: 1rem auto 0;
  }
}

/* Contact page */

.contact-copy {
  font-size: 1.8rem;
  line-height: 1.5;
}