/* variables */
:root {
	--lg-blue: #afd8e5;
  --dk-blue: #53738a;
  --yellow: #f8e157;
  --altblue: #435A70;
  --altyellow: #F7B309;
}

html {
	font-size: 62.5%;
}

body {
	font-size: 1.8rem;
	line-height: 1.5;
  font-family: 'Nunito', sans-serif;
  background-color: #fff;
  position: relative;
}

h1, h2, h3 {
  font-weight: 700;
}

p {
  margin-bottom: 1rem;
}

a {
  text-decoration: none;
  color: #000;
}

header {
  box-shadow: 0 2px 5px #80808050;
  position: sticky;
  top: 0;
  background-color: #fff;
  z-index: 1;
}

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.8rem 1.5rem;
  position: relative;
}

.logo {
  width: 8rem;
}

.menu {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  cursor: pointer;
  padding: 0.5rem;
  margin-right: -0.5rem;
}

.menu span {
  width: 3.3rem;
  height: 0.4rem;
  background-color: var(--dk-blue);
  border-radius: 5px;
  transition: 0.4s ease;
}

.menu.active span:first-child {
  transform: rotate(45deg) translateX(0.65rem) translateY(0.65rem);
}

.menu.active span:nth-child(2) {
  transform: rotate(225deg);
}

.menu.active span:last-child {
  transform: rotate(-45deg) translateX(0.65rem) translateY(-0.6rem);
}

nav {
  position: absolute;
  top: 7.64rem;
  right: 0;
  width: 100%;
  border-top: 1px solid #80808050;
  box-shadow: 0 2px 5px #80808050;
  transform: scale(0);
  transform-origin: top right;
  opacity: 0;
  transition: 0.4s ease;
  background-color: #fff;
}

nav.active {
  opacity: 1;
  transform: scale(1);
}

.navigation a {
  display: block;
  background-color: #fff;
  padding: 1.5rem;
  color: var(--dk-blue);
  text-align: center;
  text-transform: uppercase;
  font-size: 2rem;
}

.navigation a:after {
  content: "";
  display: block;
  width: 3.5rem;
  height: 0.3rem;
  background-color: var(--altyellow);
  margin: 0 auto;
  border-radius: 5px;
  transform: scale(0);
  transition: 0.4s ease;
}

.navigation a:hover:after {
  transform: scale(1);
  transition-delay: 0.1s;
}

body:not(body.case-study) main .container {
  padding: 10rem 1.5rem;
}

body:not(body.case-study) h1 {
  font-size: 4.395rem;
  line-height: 5.4rem;
  margin-top: 2.8rem;
  margin-bottom: 3rem;
}

body:not(body.case-study) h1:before {
  content: "";
  display: block;
  width: 4rem;
  height: 0.5rem;
  margin-bottom: -2.8rem;
  background-color: var(--altyellow);
}

h1 span {
  margin-left: 5rem;
}

body:not(body.case-study) h2 {
  font-size: 2.813rem;
}

.subtitle {
  font-size: 2.25rem;
}

.works {
  display: grid;
  gap: 4rem;
  padding: 10rem 0;
}

.project {
  box-shadow: 0 5px 20px 1px #80808050;
  border-radius: 20px;
  overflow: hidden;
  transition: 0.4s ease;
  transform: scale(1);
}

.project a {
  display: block;
  color: #000;
  padding: 0;
}

.project .info {
  padding: 1.5rem;
}

.project a:before {
  display: none;
}

.project a svg {
  transition: 0.4s ease;
  position: relative;
  left: 0;
  transition-delay: 0.2s;
}

.project:hover {
  transform: scale(0.95);
}

.project a:hover .info svg {
  left: 0.5rem;
}

.project .info h2 {
  margin-bottom: 0.5rem;
}

.project .info p {
  margin-bottom: 0;
}

.project .info svg {
  margin-left: auto;
  display: block;
}

.project img {
  object-fit: contain;
  object-position: 100% 0;
  width: 100%;
  height: 25rem;
}

.vvoa h2:not(.case-study h2),
.case-study.vvoa h1 {
  color: #5a7c60;
}

.vvoa a:hover .info svg {
  stroke: #5a7c60;
}

.sprint h2:not(.case-study h2),
.case-study.sprint h1 {
  color: #e09e0f;
}

.sprint a:hover .info svg {
  stroke: #e09e0f;
}

.case-study.cookin h1,
.cookin h2:not(.case-study h2) {
  color: #920C27;
}

.cookin a:hover .info svg {
  stroke: #920C27;
}

.case-study.dashboard h1,
.dashboard h2:not(.case-study h2) {
  color: #1e3a8a;
}

.dashboard a:hover .info svg {
  stroke: #1e3a8a;
}

.case-study.cheesecake h1,
.cheesecake h2:not(.case-study h2) {
  color: #b74c38;
}

.cheesecake a:hover .info svg {
  stroke: #b74c38;
}

.index section > h2 {
  text-align: center;
  margin-bottom: 3rem;
}

.additional-works {
  display: flex;
  flex-direction: column;
  gap: 3rem;
}

.additional aside {
  text-align: center;
  margin-top: 6rem;
}

.additional-work h3 {
  font-size: 2.25rem;
  margin-bottom: 0.5rem;
}

main a {
  position: relative;
  padding: 0 0.3rem;
}

main a:before {
  content: "";
  width: 100%;
  height: 1.2rem;
  background: linear-gradient(to left, var(--altyellow) 50%, var(--lg-blue) 50%) right;
  background-size: 200%;
  position: absolute;
  top: 60%;
  left: 50%;
  transform: translateX(-50%) translateY(-50%) rotate(-3deg);
  z-index: -1;
  opacity: 0.4;
  transition: 0.3s ease;
}

main a:hover:before {
  opacity: 0.6;
  background-position: left;
}

footer {
  text-align: center;
}

footer:before {
  content: "";
  display: block;
  width: 3.5rem;
  height: 0.3rem;
  background-color: var(--altyellow);
  margin: 0 auto;
  border-radius: 5px;
}

footer .container,
.case-study footer .container {
  padding: 1.5rem 1.5rem 6rem;
}

footer h3 {
  font-size: 2.813rem;
  margin-bottom: 1.5rem;
}

.contact-links {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 2rem;
}

.contact-links svg {
  width: 4rem;
  fill: var(--dk-blue);
  transition: 0.4s ease;
  cursor: pointer;
}

.contact-links svg:hover {
  fill: var(--altyellow);
}

.case-study main {
  margin-bottom: 10rem;
}

.content p {
  margin-bottom: 3rem;
}

.close-container {
  padding: 0.5rem 1.5rem;
}

.close {
  cursor: pointer;
  margin-left: auto;
  width: max-content;
  height: 3.5rem;
  padding: 0.5rem;
  margin-right: -0.5rem;
}

.close svg {
  width: 2.5rem;
  fill: var(--altyellow);
  transition: 0.4s ease;
}

.close:hover svg {
  fill: var(--lg-blue);
}

.case-study .container {
  padding: 1rem 1.5rem;
}

.project-banner {
  margin-bottom: 4rem;
  background-repeat: no-repeat;
  background-position: top right;
}

.project-banner > div {
  padding: 1.5rem;
  opacity: 0.9;
}

.vvoa .project-banner,
.vvoa.project img {
  background-color: #daead3;
}

.vvoa .project-banner {
  background-image: url('../img/vvoa/cover.jpg');
}

.sprint .project-banner,
.sprint.project img {
  background-color: #fff7d8;
}

.sprint .project-banner {
  background-image: url('../img/design-sprint/cover.jpg');
}

.cookin .project-banner,
.cookin.project img {
  background-color: #fff1ee;
}

.cookin .project-banner {
  background-image: url('../img/cookin/cover.jpg');
}

.dashboard .project-banner,
.dashboard.project img {
  background-color: #cbe2fa;
}

.dashboard .project-banner {
  background-image: url('../img/dashboard/cover.jpg');
}

.cheesecake .project-banner,
.cheesecake.project img {
  background-color: #f1c7ba;
}

.cheesecake .project-banner {
  background-image: url('../img/cheesecakes/cover.jpg');
}

.case-study.vvoa h2:before {
  background-color: #5a7c60;
}

.case-study.sprint h2:before {
  background-color: #e09e0f;
}

.case-study.cookin h2:before {
  background-color: #920C27;
}

.case-study.dashboard h2:before {
  background-color: #1e3a8a;
}

.case-study.cheesecake h2:before{
  background-color: #b74c38;
}

.project-banner .container {
  border-radius: 5px;
  background-color: #fff;
  transition: 0.5s ease;
  padding: 2rem;
}

.project-banner h1 {
  font-size: 2.813rem;
}

.project-banner p {
  margin-bottom: 0;
}

.case-study h2 {
  font-size: 2.25rem;
  margin-bottom: 2rem;
}

.case-study h2:before {
  content: "";
  display: inline-block;
  width: 0.5rem;
  height: 2.2rem;
  background-color: var(--altyellow);
  margin-bottom: -0.3rem;
  margin-right: 1rem;
}

.case-study main .container div {
  margin-bottom: 4rem;
}

.product-wrapper {
  background-color: var(--dk-blue);
  padding: 1rem;
  border-radius: 10px;
}

.product-wrapper img {
  border-radius: 5px;
}

.process-wrapper {
  box-shadow: 0 1px 6px 1px #80808083;
  border-radius: 10px;
  overflow: hidden;
  padding: 1rem;
}

.process-wrapper,
.product-wrapper {
  width: fit-content;
  margin: 0 auto;
}

.about-content {
  max-width: 65rem;
  margin: 0 auto;
}

.img-container {
  display: none;
  position: fixed;
  opacity: 1;
  left: 0;
  top: 0;
  width: 100vw;
  height: 100vh;
  margin-top: 77px;
  background-color: #3d3d3da4;
}

.img-container.show {
  display: block;
}

.img-container .close-container {
  padding: 1rem 1.5rem;
}

.img-container img {
  position: fixed;
  left: 50%;
  top: 53%;
  transform: translateY(-50%) translateX(-50%);
  border-radius: 10px;
  box-shadow: 0 0 20px #474747a1;
  max-width: calc(100vw - 3rem);
}

.open-img {
  cursor: pointer;
}

.preview-links {
  list-style: circle;
  margin: 0 0 3rem 0.5rem;
}

.preview-links li {
  margin-bottom: 0.5rem;
}

/* media queries */

@media screen and (min-width: 700px) {
  .project.sprint {
    background-color: #fff7d8;
  }

  .project.cookin {
    background-color: #fff1ee;
  }

  .project.dashboard{
    background-color: #cbe2fa;
  }

  .project.cheesecake {
    background-color: #f1c7ba;
  }

  .project a {
    display: flex;
    flex-direction: row-reverse;
    height: 40rem;
  }

  .project img {
    object-fit: contain;
    height: 100%;
    max-height: 100%;
    transition: 0.5s ease;
  }

  .project {
    position: relative;
    transition: 0.5s ease;
  }

  .project .info {
    position: absolute;
    bottom: 0.5rem;
    left: 0;
    transition: 0.5s ease;
  }

  .cookin img {
    object-position: 125% 0;
  }

  .flex {
    display: flex;
    justify-content: space-between;
    width: 65rem;
    margin: 0 auto 3rem !important;
    gap: 3rem;
  }

  .product-wrapper img {
    max-height: 60rem;
  }
}

@media screen and (min-width: 800px) {
  .menu {
    display: none;
  }

  nav {
    position: static;
    opacity: 1;
    transform: scale(1);
    box-shadow: none;
    border: none;
  }

  .navigation {
    display: flex;
    gap: 5rem;
    justify-content: flex-end;
  }

  .navigation a {
    font-size: 1.6rem;
    padding: 1.5rem 0;
  }

  .project-banner .container {
    background-color: transparent;
  }

  .project-banner > div {
    position: relative;
    height: 40rem;
  }
  
  .project-banner .container {
    padding-bottom: 4rem;
    position: absolute;
    bottom: 0;
  }
}

@media screen and (min-width: 1000px) {
	.navbar,
  body:not(body.case-study) main .container,
  .close-container,
  .case-study .container {
    max-width: 140rem;
    margin: 0 auto;
  }

  .project-banner > div {
    max-width: 125rem;
    margin: 0 auto;
  }

  .additional-works {
    max-width: 1100px;
    flex-direction: row;
    justify-content: space-between;
    margin: 0 auto;
    gap: 5.5rem;
  }

  .additional-work {
    flex: 1;
  }

  .case-study main > .container > div {
    width: max-content;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 24rem 80rem;
  }

  .case-study main > .container > div h2 {
    grid-column: 1 / 2;
  }

  .content {
    grid-column: 2 / 3;
  }

  .process-wrapper,
  .product-wrapper {
    margin: 0 auto 3rem !important;
    max-width: 65rem;
  }

  .flex {
    display: flex;
    justify-content: space-between;
    width: 65rem;
    margin: 0 auto 3rem !important;
    gap: 3rem;
  }

  .flex .process-wrapper,
  .flex .product-wrapper {
    margin: 0 !important;
  }

  .product-wrapper img {
    max-height: 60rem;
  }
}

@media screen and (min-width: 1200px) {
  .works {
    grid-template-columns: repeat(2, 1fr);
  }

  .project img,
  .project {
    max-height: 25rem;
  }

  .project .info {
    bottom: 17rem;
    left: 2rem;
  }

  .cookin img {
    object-position: 100% 0;
  }

  .cookin .info {
    max-width: 23.6rem;
  }

  .sprint .info {
    max-width: 26.3rem;
  }
}

@media screen and (min-width: 1280px) {
  .cookin .info,
  .sprint .info {
    max-width: 100%;
  }
}

@media screen and (min-width: 1400px) {
  .project .info {
    bottom: 12rem;
  }
  .project,
  .project img {
    max-height: 30rem;
  }
}