*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-size: 16px;
}

body {
  margin: 0;
  color: #212529;
  background: #fff;
  font-family: "Nunito", sans-serif;
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: 0.0625em;
}

img {
  max-width: 100%;
  height: auto;
  vertical-align: middle;
}

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

h4 {
  margin-bottom: 0.5rem;
  font-size: 1.5rem;
  font-weight: 500;
  line-height: 1.2;
}

p {
  margin-bottom: 1rem;
}

a {
  color: #64a19d;
  text-decoration: none;
}

a:hover,
a:focus {
  color: #3c6360;
}

.container {
  width: 100%;
  margin-right: auto;
  margin-left: auto;
  padding-right: 15px;
  padding-left: 15px;
}

@media (min-width: 576px) {
  .container {
    max-width: 540px;
  }
}

@media (min-width: 768px) {
  .container {
    max-width: 720px;
  }
}

@media (min-width: 992px) {
  .container {
    max-width: 960px;
  }
}

@media (min-width: 1200px) {
  .container {
    max-width: 1140px;
  }
}

.muted {
  color: rgba(0, 0, 0, 0.5);
}

.brand-mark {
  font-weight: bolder;
  letter-spacing: 3px;
  font-size: 120%;
}

#mainNav {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  z-index: 1030;
  min-height: 56px;
  background: #fff;
}

.nav-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: inline-block;
  padding: 0.9rem 0;
  margin-right: 1rem;
  color: #161616;
  font-size: 1.25rem;
  font-weight: 700;
  line-height: inherit;
  white-space: nowrap;
}

.brand:hover,
.brand:focus {
  color: #161616;
}

.nav-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0.5rem 0;
  padding: 0.75rem;
  color: #64a19d;
  font: inherit;
  font-size: 80%;
  letter-spacing: inherit;
  background: transparent;
  border: 1px solid #64a19d;
  cursor: pointer;
}

.nav-toggle svg {
  width: 1rem;
  height: 1rem;
}

.nav-links {
  display: none;
  flex-basis: 100%;
}

.nav-links.is-open {
  display: block;
}

.nav-links ul {
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav-links a {
  display: block;
  padding: 0.5rem 0;
  color: rgba(0, 0, 0, 0.5);
}

.nav-links a:hover,
.nav-links a:focus {
  color: rgba(0, 0, 0, 0.7);
}

@media (min-width: 992px) {
  #mainNav {
    padding-top: 0;
    padding-bottom: 0;
    background: transparent;
    transition: background-color 0.3s ease-in-out;
  }

  .brand {
    padding: 0.5rem 0;
    color: #fff;
  }

  .brand:hover,
  .brand:focus {
    color: #fff;
  }

  .nav-toggle {
    display: none;
  }

  .nav-links,
  .nav-links.is-open {
    display: block;
    flex-basis: auto;
  }

  .nav-links ul {
    flex-direction: row;
  }

  .nav-links a {
    padding: 2rem 1.5rem;
    color: #fff;
    transition: none;
  }

  .nav-links a:hover,
  .nav-links a:focus {
    color: rgba(255, 255, 255, 0.75);
  }

  #mainNav.navbar-shrink {
    background: #fff;
  }

  #mainNav.navbar-shrink .brand,
  #mainNav.navbar-shrink .brand:hover,
  #mainNav.navbar-shrink .brand:focus {
    color: #161616;
  }

  #mainNav.navbar-shrink .nav-links a {
    padding: 1.5rem 1.5rem 1.25rem;
    color: #161616;
    border-bottom: 0.25rem solid transparent;
  }

  #mainNav.navbar-shrink .nav-links a:hover,
  #mainNav.navbar-shrink .nav-links a:focus {
    color: #64a19d;
  }

  #mainNav.navbar-shrink .nav-links a:active {
    color: #467370;
  }

  #mainNav.navbar-shrink .nav-links a.active {
    color: #64a19d;
    border-bottom-color: #64a19d;
  }
}

.masthead {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 35rem;
  padding: 15rem 0;
  background: url("../img/bg-masthead.jpg") center center / cover no-repeat;
}

.masthead-inner {
  width: 100%;
  text-align: center;
}

.name {
  visibility: hidden;
}

.masthead h1 {
  margin: 0 auto;
  font-family: "Varela Round", sans-serif;
  font-size: 2.5rem;
  font-weight: 400;
  line-height: 2.5rem;
  letter-spacing: 0.8rem;
  text-transform: uppercase;
  background: linear-gradient(rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.masthead h2 {
  max-width: 20rem;
  margin: 0.5rem auto 3rem;
  color: rgba(255, 255, 255, 0.5);
  font-size: 1rem;
  font-weight: 500;
}

@media (min-width: 768px) {
  .masthead h1 {
    font-size: 4rem;
    line-height: 4rem;
  }
}

@media (min-width: 992px) {
  .masthead {
    height: 100vh;
    min-height: 0;
    padding: 0;
  }

  .masthead h1 {
    font-size: 6.5rem;
    line-height: 6.5rem;
  }

  .masthead h2 {
    max-width: 30rem;
    font-size: 1.25rem;
  }
}

.btn {
  display: inline-block;
  padding: 1.25rem 2rem;
  color: #fff;
  font-family: "Varela Round", sans-serif;
  font-size: 80%;
  letter-spacing: 0.15rem;
  text-transform: uppercase;
  background: #64a19d;
  border: 0;
  box-shadow: 0 0.1875rem 0.1875rem 0 rgba(0, 0, 0, 0.1);
}

.btn:hover,
.btn:focus {
  color: #fff;
  background: #4f837f;
}

.btn:active {
  background: #467370;
}

.projects {
  padding: 3rem 0;
  background: #f8f9fa;
}

.about-block,
.feature {
  display: grid;
  gap: 1rem;
  align-items: center;
  margin-bottom: 1.5rem;
}

.about-copy,
.feature-text,
.panel-text {
  text-align: center;
}

.about-copy p,
.feature-text p {
  margin-bottom: 0;
}

.panel {
  background: #161616;
  color: #fff;
}

.panel-text {
  padding: 3rem;
  font-size: 90%;
}

.panel-text h4 {
  color: #fff;
}

.panel-text p {
  margin-bottom: 0;
  color: rgba(255, 255, 255, 0.5);
}

.panel-text hr {
  display: none;
  width: 30%;
  margin: 1rem 0 0;
  border: 0;
  border-top: 0.25rem solid #64a19d;
}

.feature {
  margin-top: 3rem;
}

.more {
  padding: 0;
  color: #64a19d;
  font: inherit;
  letter-spacing: inherit;
  text-decoration: underline;
  background: none;
  border: 0;
  cursor: pointer;
}

.more:hover,
.more:focus {
  color: #3c6360;
}

@media (min-width: 992px) {
  .about-block {
    grid-template-columns: 8.333% 33.333% 8.333% 1fr;
    gap: 0;
    margin-bottom: 3rem;
  }

  .about-block img {
    grid-column: 2;
  }

  .about-copy {
    grid-column: 4;
  }

  .about-copy,
  .feature-text,
  .panel-text {
    text-align: left;
  }

  .panel-text.align-end {
    text-align: right;
  }

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

  .split img {
    width: 100%;
  }

  .panel {
    display: flex;
    align-items: center;
  }

  .panel-text {
    width: 100%;
    padding: 5rem;
  }

  .panel-text hr {
    display: block;
  }

  .split.reverse .panel {
    order: -1;
  }

  .feature {
    grid-template-columns: 1fr 1fr;
    gap: 0;
    margin-bottom: 3rem;
  }

  .feature-text {
    padding: 0 0 0 2rem;
    border-right: 0.5rem solid #64a19d;
  }
}

.contact {
  padding: 1rem;
  color: rgba(255, 255, 255, 0.5);
  text-align: center;
  background: #161616;
}

.social {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 5rem;
}

.social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  color: rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.1);
  border-radius: 100%;
}

.social a:hover,
.social a:focus {
  color: rgba(255, 255, 255, 0.5);
}

.social a:active {
  color: #fff;
}

.social svg {
  width: 1.1rem;
  height: 1.1rem;
}

.copyright {
  margin-top: 3rem;
}

dialog {
  width: calc(100% - 2rem);
  max-width: 500px;
  max-height: calc(100vh - 2rem);
  padding: 0;
  overflow: hidden;
  color: #212529;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.2);
  border-radius: 0.3rem;
  box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.5);
}

dialog[open] {
  display: flex;
  flex-direction: column;
}

dialog form {
  display: flex;
  flex-direction: column;
  min-height: 0;
  max-height: calc(100vh - 2rem);
  margin: 0;
}

dialog::backdrop {
  background: rgba(0, 0, 0, 0.5);
}

dialog header,
dialog footer {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  padding: 1rem;
}

dialog header {
  justify-content: space-between;
  border-bottom: 1px solid #dee2e6;
}

dialog header h4 {
  margin: 0;
}

dialog footer {
  justify-content: flex-end;
  border-top: 1px solid #dee2e6;
}

.dialog-body {
  min-height: 0;
  padding: 1rem;
  overflow: auto;
}

.dialog-body img {
  width: 150px;
}

.dialog-x {
  padding: 0;
  color: #000;
  font-size: 1.5rem;
  line-height: 1;
  background: none;
  border: 0;
  cursor: pointer;
}

dialog footer button {
  padding: 0.375rem 0.75rem;
  font: inherit;
  letter-spacing: inherit;
  background: #fff;
  border: 1px solid #ced4da;
  border-radius: 0.25rem;
  cursor: pointer;
}

#gameCanvas {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: -1;
}
