/* http://meyerweb.com/eric/tools/css/reset/ 
   v2.0 | 20110126
   License: none (public domain)
*/

html,
body,
div,
span,
applet,
object,
iframe,
h1,
h2,
h3,
h4,
h5,
h6,
p,
blockquote,
pre,
a,
abbr,
acronym,
address,
big,
cite,
code,
del,
dfn,
em,
img,
ins,
kbd,
q,
s,
samp,
small,
strike,
strong,
sub,
sup,
tt,
var,
b,
u,
i,
center,
dl,
dt,
dd,
ol,
ul,
li,
fieldset,
form,
label,
legend,
table,
caption,
tbody,
tfoot,
thead,
tr,
th,
td,
article,
aside,
canvas,
details,
embed,
figure,
figcaption,
footer,
header,
hgroup,
menu,
nav,
output,
ruby,
section,
summary,
time,
mark,
audio,
video {
  margin: 0;
  padding: 0;
  border: 0;
  font-size: 100%;
  font: inherit;
  vertical-align: baseline;
}

button {
  background-color: transparent;
  border-width: 0;
  font-family: inherit;
  font-size: inherit;
  font-style: inherit;
  font-weight: inherit;
  line-height: inherit;
  padding: 0;
}

/* HTML5 display-role reset for older browsers */

article,
aside,
details,
figcaption,
figure,
footer,
header,
hgroup,
menu,
nav,
section {
  display: block;
}

body {
  line-height: 1;
}

ol,
ul {
  list-style: none;
}

blockquote,
q {
  quotes: none;
}

blockquote:before,
blockquote:after,
q:before,
q:after {
  content: '';
  content: none;
}

table {
  border-collapse: collapse;
  border-spacing: 0;
}


/* Colour variables */

:root,
:root.light {
  --lilac: #92a7ff;
  --light: rgb(194 212 255 / 75%);
  --dark: #131e44;
  --white: #ffffff;
  --glass: rgba(255, 255, 255, 45%);
  --glass-hover: rgb(255 255 255 / 60%);
}

:root.dark {
  --lilac: #07164b;
  --light: rgb(25 45 110 / 80%);
  --dark: #b2c2fd;
  --white: #000000;
  --glass: rgb(54 71 128 / 85%);
  --glass-hover: rgb(159 166 255 / 60%);
}

.glass {
  background: var(--glass);
  backdrop-filter: blur(20px);
}


/* General */

html {
  font-size: 16px;
  cursor: none;
  scrollbar-width: thin;
  scrollbar-color: var(--dark) #ffffff1c;
  scroll-behavior: smooth;
}

::-webkit-scrollbar {
  position: fixed !important;
  width: 0px;
  height: 100%;
}

body {
  font-family: 'Archivo', sans-serif;
  margin: 0;
  background: var(--lilac);
  overflow-x: hidden;
}

#loader {
  position: fixed;
  background-color: var(--dark);
  opacity: 1;
  top: 0;
  right: 0;
  height: 100%;
  width: 100%;
  z-index: 99;
  overflow: hidden;
  backdrop-filter: blur(50px);
  animation: swipe 800ms ease-out;
  animation-delay: .5s;
  animation-fill-mode: forwards;
}
 
em {
  font-weight: bold;
}

svg {
  fill: var(--dark);
}

svg g circle {
  fill: none !important;
}

a, button {
  cursor: none;
}

.intro {
  padding: 1rem 3.5vw 1rem 3.5vw;
  color: var(--white);
  max-width: 700px;
}

/* Text */

h1,
h2 {
  color: white;
  position: relative;
  padding-bottom: 0.5rem;
  animation: fadeUp 1s;
  opacity: 0;
  top: 15px;
  animation-fill-mode: forwards;
  animation-delay: 1.75s;
}

h1,
h1 b {
  font-size: 5rem; 
  font-variation-settings: "wght" 800, "wdth" 70;
}

h1 b {
  transition-property: font;
  transition-duration: 1s;
  transition-delay: 0.5s;
}

h1 b:hover {
  font-variation-settings: "wght" 700, "wdth" 125;
  transition: .5s;
}

h2 {
  font-size: 3.5rem;
  font-variation-settings: "wght" 800, "wdth" 70;
}

h3,
h3 b {
  font-size: 2.5rem;
  line-height: 1;
  letter-spacing: .1rem;
  color: white;
  padding: .5rem 0 .75rem 0;
  animation: fadeIn 1s;
  opacity: 0;
  animation-fill-mode: forwards;
  animation-delay: .5s;
  font-variation-settings: "wght" 700, "wdth" 62;
  transition-property: font;
  transition-duration: 1s;
  transition-delay: 0.5s;
}

h3 b:hover {
  font-variation-settings: "wght" 700, "wdth" 125;
  transition-property: font;
  transition-duration: 0.5s;
  transition-delay: 0s;
}

h4 {
  font-size: .8rem;
  line-height: 1.25;
  text-transform: uppercase;
  letter-spacing: .1rem;
  padding: .25rem 0;
}

p {
  line-height: 1.5;
  letter-spacing: .06rem;
  padding: .5rem 0 .5rem 0;
}

h4,
h5,
p {
  animation: fadeIn 1.5s;
  opacity: 0;
  animation-fill-mode: forwards;
  animation-delay: .25s;
  color: var(--dark);
}

p a {
  color: #07164b;
  text-decoration: none;
  background: #cbd5ff;
  border: #cbd5ff solid;
  inset: -2px;
  border-right-width: 5px;
  border-left-width: 5px;
  border-top-width: 1px;
  border-bottom-width: 1px;
  transition: all 200ms cubic-bezier(0.165, 0.84, 0.44, 1);
} 

p a:hover {
  color: #07164b; 
  border-top-width: 4px;
  border-bottom-width: 5px;
}


/* Navigation */

.nav-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: flex-end;
  width: 100%;
  z-index: 5;
}

.nav-bar #logo {
  flex-grow: 1;
  margin: 0;
}

.nav-bar #logo a {
  display: block;
  text-decoration: none;
  text-align: center;
  width: 55px;
  margin: .5rem auto 0 0.75rem;
}

.nav-bar #logo a img {
  transition: transform .7s cubic-bezier(0.075, 0.82, 0.165, 1);
}

.nav-bar #logo a:hover img {
  transform: rotate(185deg);
  transition: transform 1s cubic-bezier(0.075, 0.82, 0.165, 1);
}

.nav-bar a.glass {
  color: var(--dark);
  width: 150px;
  text-decoration: none;
  text-align: center;
  margin: .5rem .5rem auto .5rem;
  opacity: 0;
  box-shadow: 0 0 0px rgb(60 60 89 / 18%);
  border-radius: 50px;
  font-variation-settings: "wght" 200, "wdth" 90;
  animation: floatUp 1s;
  transition: all .75s cubic-bezier(0.075, 0.82, 0.165, 1), position .5s ease-in-outs;
  animation-fill-mode: forwards;
}

.nav-bar a.glass:nth-child(1) {
  animation-delay: .5s;
}

.nav-bar a.glass:nth-child(2) {
  animation-delay: .75s;
}

.nav-bar a.glass:nth-child(3) {
  animation-delay: 1s;
}

.nav-bar a.glass:nth-child(4) {
  animation-delay: 1.25s;
}

.nav-bar a.glass:hover {
  background: var(--glass-hover);
  box-shadow: 0 0 15px rgb(26 24 35 / 10%);
  font-variation-settings: "wght" 200, "wdth" 120;
}

.nav-bar h4 {
  display: block;
  opacity: 1;
  margin: 0;
  padding: .5rem .75rem;
  animation: none;
  transition: all .5s;
}


/* Hero details */

.hero {
  height: 100%;
  min-height: 80vh;
  position: relative;
  display: flex;
  padding: 4rem 3.5vw 1rem 3.5vw;
  z-index: 1;  
}

.hero-text {
  width: 100%;
  display: block;
  padding: 2rem 0 auto 0;
  align-self: center;
}

.hero-text h4 {
  animation-delay: 2.5s;
  animation-duration: 2s;
}


/* Scroll down cta  */

.scroll-down {
  position: relative;
  z-index: 2;
}

.arrow-container {
  width: 330px;
  height: 330px;
  margin: auto 0 0 auto;
  position: absolute;

  border-radius: 50%;
  opacity: 0;
  bottom: -100px;
  left: auto;
  right: -40px;
  animation: scrollPop 1s;
  animation-delay: 2.5s;
  animation-fill-mode: forwards;
}

.arrow-container svg {
  transform: rotate(0deg);
  transition: transform ease-in-out .6s;
}

.arrow-container:hover svg.scroll-text {
  transform: rotate(90deg);
  transition: transform ease-in-out 1s;
}

.arrow-container:hover svg.scroll-arrow {
  transform: translateY(10px);
  transition: transform ease-in-out 1s;
}

.arrow-1 {
  width: 100%;
  height: 100%;
  background: rgb(255 255 255 / 50%);
  opacity: 0;
  border-radius: 50%;
  position: absolute;
  animation: zoomIn 2.5s;
  animation-delay: 5s;
  animation-iteration-count: 1;
}

.arrow-2 {
  width: 100%;
  height: 100%;
  position: absolute;
}

.arrow-2 svg {
  position: absolute;
}

/* Footer */

footer {
  text-align: center;
  min-height: 90vh;
  padding: 5vw;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
}

footer .intro {
  display: block;
  align-self: center;
}

#copyright p {
    font-style: italic;
    font-size: .9rem;
    text-align: center;
}

/* Bubble background */

#canvas {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 100vh;
  z-index: -1;

  opacity: 0;
  animation: fadeIn 3s;
  animation-delay: 1.5s;
  animation-fill-mode: forwards;
}

.bg-blur {
  backdrop-filter: blur(60px);
}

/* Portfolio */

#work {
  position: relative;
  overflow: hidden;
  background-color: var(--light);
}

#work .intro {
  margin-top: 10rem;
}

.container {
  margin-top: 20px;
  overflow: hidden;
}
 
#work-filter {
  width: calc(100% - 7vw);
  transition: all .5s cubic-bezier(0.165, 0.84, 0.44, 1);
  display: block;
  padding: 0rem 3.5vw 1rem 3.5vw;
  top: -4rem;
  background: var(--light);
  z-index: 3;
}
 

#work-filter .btn {
  font-size: .8rem;
  line-height: 1.25;
  text-transform: uppercase;
  letter-spacing: .1rem;
  text-transform: uppercase;
  border: none;
  outline: none;
  padding: 6px 9px;   
  margin: 0.5rem 0.25rem 0.25rem 0;
  background-color: var(--glass);
  color: var(--dark);
  border-radius: 20px;
  transition: all .5s;
}

#work-filter .btn:hover {
  background-color: white;
  color: var(--lilac);
}

#work-filter .btn.active {
  background-color: var(--dark);
  color: var(--white);
}

.filterDiv {
  display: none; 
}

.show {
  display: flex;
 
}

#work-nav {
  display: block;
  border-bottom: solid var(--light) 2px;
  background-color: var(--light);
  width: 100%;
  padding-top: 3rem;
}

#work-nav a {
  color: white;
    text-decoration: none;
    position: relative;
    flex-wrap: wrap;
    background: transparent;
    transition: all .5s;
    animation: fadeIn .2s;
}

#work-nav a:hover {
  background: var(--light);
  box-shadow: 5px 3px 25px #422e5e21;
}

#work-nav a h3 {
  text-transform: uppercase;
  text-decoration: none;
  animation: none;
  opacity: 1;
  font-variation-settings: "wght" 700, "wdth" 62;
  transition-delay: 0s;
  transition: all .2s;
}

#work-nav a:hover h3 {
  transition-delay: 0s;
  transition: all .3s;
  font-variation-settings: "wght" 700, "wdth" 64;
}

#work-nav>a>span {
  display: block;
  padding: 7.5rem 3.5vw 8rem 3.5vw;
  max-width: 40%;
  position: relative;
  z-index: 2;
}

#work-nav a::before {
  content: "";
  width: 100%; 
  border: solid var(--light) 1.5px;
}

#work-nav a div {
  display: flex;
    position: absolute;
    width: 60%;
    right: 0;
    top: 0;
    bottom: 0;
    justify-content: center;
    align-items: center; 
}

#work-nav a div img {
    position: relative; 
    pointer-events: none;
    max-width: 650px;
    max-height: 450px;
    margin: 0 -4%;
    filter: brightness(0.85);
    z-index: 0;
    transition: all 200ms ease-in;
}

#work-nav>a:hover>div img {
  /* height: 105%;
  width: 105%; */
  margin: 0 -2.5%;
  filter: brightness(1);
  z-index: 1;
}

h4 span {
  border: none;
  outline: none;
  padding: 6px 9px;
  margin: 0;
  line-height: 1.75rem;
  white-space: nowrap;
  background-color: var(--glass);
  color: var(--dark);
  border-radius: 20px;
  transition: all .5s;
}

@media only screen and (max-width: 900px) {
  #work {
    padding: 5rem 0 0 0;
  }

  #work-nav>a>span {
    display: block;
    width: 100%;
    max-width: 100%;
    padding: 2.5rem 3.5vw 0rem 3.5vw;
    position: relative;
    z-index: 2;
  }

  #work-nav a div {
    display: flex;
    position: relative;
    width: 90%;
    height: auto;
  }

  #work-nav a div img {
    height: 90%;
    max-height: 400px;
    filter: brightness(1);
    margin: 0;
  }
  #work-nav>a:hover>div img {
    margin: 0;
  }

}

#the-rest {
  color: white;
  background: #14204f;
  padding: 4rem 0 4rem 0;
}

#the-rest p, #the-rest h4{
  color: white;
}

#the-rest .gallery {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  width: 100%;
  justify-content: center; 
}

#the-rest .gallery video {
  display: flex;
  width: 33%;
}


.case-study { 
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: space-evenly;

}

.case-study.light p, .case-study.light h4 {
  color: black;
}

.case-study.dark p, .case-study.dark h4 {
  color: white;
  }

.case-study > span {
  padding: 7rem 3.5vw 5rem 3.5vw;
  display: block;
  width: calc(40% - 7vw);
  min-height: 70vh;
  flex-grow: 1;
}

.case-study > img:first-child {
  width: 60%; 
  height: auto;
  object-fit: cover; 
}

.case-study img {
  display: block;
  width: 100%; 
}

.case-study video {
  box-shadow: 2px 2px 10px #0000004d;
  margin: 5vw auto;
  max-width: 950px;
  display: block;
  width: calc(100% - 7vw);
}

.case-study .gallery {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  width: 100%;
  justify-content: center;
  padding: 2vw 0;
}

.case-study .gallery img, .case-study .gallery video {
  display: flex;
  width: 45%;
  margin: .25%;
  box-shadow: none;
  object-fit: contain;
}

.other-work {
  display: flex;
  background: var(--dark);
  justify-content: center;
}

.other-work a {
  display: flex;
  margin: auto;
  padding: 10vh 3vw 10vh 4vw;
  text-decoration: none;
  color: white;
  width: 100%;
  justify-content: space-between;
  font-size: 2rem;
  font-weight: 600;
  transition: all .5s;
  box-shadow: 2px 2px 7px #0000001a;
}

.other-work a img {
  width: 5rem;
  transform: rotate(0deg);
  transition: .7s cubic-bezier(0.075, 0.82, 0.165, 1);
}

.other-work a:hover {
  background-color: var(--lilac);
  box-shadow: 2px 2px 10px #00000021;
}

.other-work a:hover img{
  transform: rotate(180deg);
}
 

.external-link {
  background: var(--glass);
  box-shadow: 2px 2px 10px rgb(0 0 0 / 5%);
  padding: 1rem 1.5rem;
  margin-top: 2rem;
  max-width: 200px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  text-decoration: none;
  color: var(--dark);
  border-radius: 20px;
  transition: background .5s;
}

.external-link:after{
  content: url(./assets/svg/right-arrow.svg);
  width: 2rem!important;
  height: 0.9rem!important;
  padding-left: 1rem; 
  padding-right: 1rem;
  transition: all .2s; 
}

.external-link:hover {
  background: var(--glass-hover);
  box-shadow: 2px 2px 20px rgb(0 0 0 / 5%);
}

.external-link:hover::after {
  padding-right: .25rem;
}


/* Clients */

#clients {
  padding-top: 5rem;
  padding-bottom: 5rem;
  background: var(--glass);
}

#clients .gallery {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: center;
  margin: auto;
  width: calc(100vw - 5vw);
}

#clients .gallery img {
  margin: .25rem;
}

/* Animation */

@keyframes floatUp {
  0% {
    opacity: 0;
    margin: -2rem .5rem auto .5rem;
  }

  100% {
    opacity: 1;
    margin: .5rem .5rem auto .5rem;
  }
}

@keyframes fadeIn {
  0% {
    opacity: 0;
  }

  100% {
    opacity: 1;
  }
}

@keyframes fadeUp {
  0% {
    opacity: 0;
    top: 15px;
  }

  100% {
    opacity: 1;
    top: 0px;
  }
}

/* @keyframes hero {
  0% {
    min-height: 80vh;
  }

  100% {
    min-height: calc(80vh - 50px);
  }
} */

@keyframes scrollPop {
  0% {
    bottom: -150px;
    opacity: 0;
  }

  100% {
    bottom: -100px;
    opacity: 1;
  }
}

@keyframes zoomIn {
  0% {
    opacity: 0;
    transform: scale(.4);
  }

  50% {
    opacity: 0.5;
    transform: scale(.6);
  }

  100% {
    opacity: 0;
    transform: scale(1);
  }
}

@keyframes swipe {
  0% {
    width: 100%;
  }

  100% {
    width: 0%;
  }
}

/* Custom cursor */

#mouse {
  position: fixed;
  z-index: 5;
  width: 50px;
  height: 50px;
  background-color: rgba(255, 255, 255, 60%);
  border-radius: 50%;
  pointer-events: none;
  backdrop-filter: blur(10px);

  transition: all ease .1s;
  transform: scale(.5);  
}

#mouse.scale-link {
  backdrop-filter: blur(2px);
  background-color: rgba(255, 255, 255, 30%);
  transition: all ease-out .25s;
  transform: scale(1.2);    
}


/* Theme switch */

.toggle-container {
  position: relative;
  z-index: 2;
  opacity: 0;
  animation: fadeUp 1.5s;
  animation-delay: 2.5s;
  animation-fill-mode: forwards;
}

.theme-btn {
  width: 100px;
  height: 40px;
  margin-top: 2rem;
  animation: fadeIn 1s;
  border-radius: 50px; 
  border: solid 1px white;
  background-color: var(--glass);
  box-shadow: 2px 2px 30px var(--light);
  cursor: pointer;
  transition: all 200ms;
}

.theme-btn:hover {
  background-color: var(--glass-hover);
  box-shadow: 2px 2px 10px var(--light);
}

.theme-btn img {
  height: 25px;
  width: 25px;
  display: block;
}

.theme-btn.dark img {
  margin: 0 10px 0 auto;
}

.theme-btn.light img {
  margin: 0 auto 0 10px;
}

.theme-btn.light {
  display: none;
}

.dark .theme-btn.dark {
  display: none;
}

.dark .theme-btn.light {
  display: block;
}


/* Misc */

a::selection,
a::selection {
  background: #7373f4;
}

/* Media queries */

@media only screen and (max-width: 400px){
  .scroll-down {
    display: none;
  }
}

@media only screen and (max-width: 600px){

  html {
    font-size: 13px;
    cursor: auto;
  }

  a, button {
    cursor: auto;
  }

  h1 {
    font-size: 3.5rem;
  }
  h2 {
    font-size: 2rem;
  }

  #mouse {
    display: none;
  }

  #work {
    padding: 1rem 0;
  }

  #work-nav {
    padding-top: 0rem;
  }

  #work-nav a div {
    display: block;
    position: relative;
    width: 100%;
    overflow: hidden;
    margin: auto;
    height: auto;
}

  #work-nav a div img {
    height: auto;
    max-width: 90%;
    max-height: auto;
    filter: brightness(1);
    margin: 0;
}

  .timeline {
    padding: 3.5vw;
  }

  .arrow-container {
    width: 200px;
    height: 200px;
    right: 0px;
  }
  
  #clients .gallery {
    width: 100%;
  }

  .nav-bar #logo {
    display: none;
  }
}

@media only screen and (max-width: 700px){
  .nav-bar {
    justify-content: space-around;
  }
}


@media only screen and (max-width: 950px){

  .case-study {
    display: block; 
  }
  .case-study span {
    width: calc(100% - 7vw);
    max-width: 600px;
    min-height: auto;
    margin: 0 0 4rem 0;
  }
  .case-study img {
    width: 100%;
  }

  .case-study > img:first-child {
    width: 100%;
    height: 50vh;
    object-fit: cover; 
  }
  
}