/* Variables */

:root {
  --color-primary-dark: #0f1f31;
  --color-primary-light: #fff;
  --color-blue: #3f88c5;
  --color-red: #d00000;
  --color-light-gray: #d2d3de;
  --color-medium-gray: #a2a6b3;
  --color-dark-gray: #717988;
  --color-darker-gray: #5E6471;
  --nav-height-mobile: 160px;
  --nav-height-desktop: 80px;
}

html, body, main, section, footer, div, span, h1, h2, h3, h4, h5, h6, p, a, strong, i, ul, li, picture {
  margin: 0;
  padding: 0;
  vertical-align: baseline;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

html, body {
  min-height: 100vh;
  font-size: 100%;
  color: var(--color-primary-dark);
}

@media (min-width: 700px) {
  html, body {
  font-size: 110%;
  }
}

@media (min-width: 1000px) {
  html, body {
  font-size: 120%;
  }
}

body {
  font: 1rem / 1.4 Helvetica, Arial, sans-serif;
  font-weight: 400;
  background: url("images/countryside2.jpg") no-repeat center;
  background-size: cover;
  background-attachment: fixed;
}

p:not(:last-of-type) {
  margin-bottom: 1rem;
}

a {
  display: block;
  text-decoration: none;
  color: #fff;
}

.headline {
  color: var(--color-primary-dark);
  font-family: 'Playfair Display', 'New York', 'Times New Roman', serif;
  font-size: 4rem;
  line-height: 1;
  margin-bottom: 1rem;
  font-weight: 400;
  letter-spacing: -2px;
}

.headline span {
  color: var(--color-blue);
}

#intro .headline,
#contact .headline {
  color: var(--color-blue);
}

#intro .headline span,
#contact .headline span {
  color: #fff;
}

.section-header {
  font-size: 1rem;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

#about .section-header {
  color: var(--color-medium-gray);
}

#contact .section-header {
  color: var(--color-medium-gray);
}

.button {
  display: inline-block;
  padding: 8px 16px;
  background-color: var(--color-red); 
}

@media (min-width: 576px) {
  .button {
    pointer-events: none;
  }
}

.button,
.tile {
  border-radius: 10px;
}

header {
  position: fixed;
  top: 0;
  width: 100%;
  background: var(--color-primary-dark);
  z-index: 1000;
}

#primary-nav {
  display: flex;
  padding: 0 2rem;
  z-index: 10;
  color: var(--color-primary-light);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: var(--nav-height-mobile);
  text-align: center;
}

@media (min-width: 700px) {
  #primary-nav {
    flex-direction: row;
    justify-content: center;
    align-items: center;
    height: var(--nav-height-desktop);
    text-align: left;
  }
}

@media (min-width: 700px) {
  #primary-nav #nav_logo,
  #primary-nav #phone {
    flex: 0 0 25%;
    max-width: 25%;
  }
}

#primary-nav #nav_logo img {
  width: 100%;
  max-width: 200px;
}

#primary-nav #menu {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  justify-content: center;
  text-align: center;
  margin: 0;
  padding: 0;
  list-style-type: none;
  width: 100%;
  align-items: center;
}

@media (min-width: 700px) {
  #primary-nav #menu {
    justify-content: center;
    flex: 0 0 50%;
    max-width: 50%;
  }
}

@media (min-width: 700px) {
  #primary-nav li {
    font-size: 1rem;
  }
}

#primary-nav #nav_logo {
  width: 100%;
  margin: 0 auto;
}

#menu a {
  position: relative;
  display: inline-flex;
  color: #fff;
  font-weight: bold;
}

#menu a::after {
  width: 100%;
  height: 3px;
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--color-red);
  transform: scale3d(0, 1, 1);
  transition: transform 350ms cubic-bezier(0.25, 1, 0.5, 1);
  content: "";
}

#menu a:hover::after {
  transform: scale3d(1, 1, 1);
  transition-timing-function: cubic-bezier(0.34, 1.56, 0.64, 1);
}

@media (min-width: 700px) {
  #primary-nav #phone {
    display: flex;
    justify-content: flex-end;
  }
}

.container {
  margin: 0 auto;
  padding: calc(var(--nav-height-mobile) + 1rem) 1rem;
  max-width: 1400px;
}

@media (min-width: 700px) {
  .container {
    width: 85%;
    padding: calc(var(--nav-height-desktop) + 1rem) 1rem;
  }
}

/* Max widths on individual content areas */

#intro__content,
#about__content,
#contact__content {
  max-width: 1000px;
  width: 100%;
}

#intro, #about, #contact, footer {
  backdrop-filter: blur(4px);
}

#intro, #contact, footer {
  background: hsla(212 53.1% 12.5% / 0.75);
  color: #fff;
}

#about {
  background: hsla(0 0% 100% / 0.92);
}

#intro__content-wrapper {
  min-height: 85vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 3rem;
}

@media (min-width: 700px) {
  #intro__content-wrapper {
    min-height: 95vh;
    gap: 5rem;
  }
}

#intro__content {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  justify-content: center;
  align-items: center;
}

@media (min-width: 700px) {
  #intro__content {
    flex-direction: row;
    gap: 3.5rem;
  }
}

#intro__content img {
  width: 180px;
}

#tiles {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: repeat(2, 1fr);
  grid-gap: 1rem;
  width: 100%;
}

@media (min-width: 1200px) {
  #tiles {
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: 1fr;
  }
}

.tile {
  border: 1px solid var(--color-medium-gray);
  padding: 1.5rem 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  min-height: 200px;
}

.tile img {
  width: 120px;
}

@media (min-width: 700px) {
  .tile img {
    width: 150px;
  }
}

.tile__text {
  font-size: 1rem;
  color: #fff;
  text-align: center;
  line-height: 1.2;
  font-weight: 700;
}

#about__content-wrapper,
#contact__content-wrapper {
  min-height: 65vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

@media (min-width: 700px) {
  #about__content-wrapper,
  #contact__content-wrapper {
      min-height: 75vh;
  }
}

#about__content {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  align-content: center;
}

@media (min-width: 700px) {
  #about__content {
    flex-direction: row;
    gap: 3rem;
  }
}

#service-area {
  padding-left: 1rem;
}

#about__content img {
  width: 280px;
  margin: 0 auto;
}

@media (min-width: 700px) {
    #about__content img {
    width: 360px;
  }
}

#contact__details {
  display: flex;
  flex-direction: column;
  gap: 3rem;
  margin-top: 2rem;
  align-items: center;
}

@media (min-width: 700px) {
  #contact__details {
    flex-direction: row;
  }
}

#contact__details-left.tile {
  gap: 0;
  align-items: flex-start;
  width: 100%;
}

@media (min-width: 700px) {
  #contact__details-left.tile {
    width: auto;
  }
}

#contact__details-right img {
  width: 300px;
  margin: 0 auto;
}

@media (min-width: 1000px) {
  #contact__details-right img {
    width: 400px;
  }
}

.contact-header {
  font-size: 0.8rem;
  color: var(--color-medium-gray);
  margin-top: 0.7rem;
}

footer {
  padding: 2rem;
  text-align: center;
  color: var(--color-medium-gray);
}

/* ANIMATIONS */

#primary-nav, #intro {
  overflow: hidden;
}

#nav_logo, #menu, #phone {
  animation: fadeInDown 0.4s ease backwards;
}

#nav_logo {
  animation-delay: 0.6s;
}

#menu {
  animation-delay: 0.8s;
}

#phone {
  animation-delay: 0.9s;
}

#intro__content-wrapper {
  animation: fadeInUp 0.4s 0.3s ease backwards;
}

/* KEYFRAMES */

@keyframes fadeInDown {
  0% {
    opacity: 0;
    transform: translateY(-30%);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInUp {
  0% {
    opacity: 0;
    transform: translateY(30%);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}