@font-face {
  font-family: 'Inconsolata';
  src: url('../assets/fonts/Inconsolata.otf') format('opentype');
}

@font-face {
  font-family: 'MODERNIZ';
  src: url('../assets/fonts/MODERNIZnew.otf') format('opentype');
}

@font-face {
  font-family: 'TangoSans';
  src: url('../assets/fonts/TangoSans.ttf') format('truetype');
}

/* Root Vars */
:root {
  --nav-color: #040405;
  --primary-color: #050522;
  --secondary-color: #23232e;
  --accent-color: #e6192a;
  --contrast-color: #ededf5;
  --text-color: #fff;
  --faded-text-color: #0000008f;
  --faded-white: #ffffff8f;
  --border-radius: 20px;
  --text-font: 'Inconsolata', Arial, monospace;
  --title-font: 'MODERNIZ', Arial, sans-serif;
  --accent-font: 'TangoSans', Arial, sans-serif;
}

html {
  scroll-behavior: smooth;
}

body,
.app {
  margin: 0;
  background-color: var(--primary-color);
  color: var(--text-color);
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: url('../assets/cursors/arrow.png'), default;
  width: 100%;
}

p {
  font-family: var(--text-font);
  line-height: 1.6;
  font-size: 14px;
  margin: 0;
}

/*  Cursor Rules  */
a, button, .clickable,
.box:hover, .footer .logo:hover, .menu-btn {
  cursor: url('../assets/cursors/pointer.png'), pointer;
}

/* Navbar */
#navbar {
  position: fixed;
  z-index: 1000;
  width: 50vw;
  max-height: 65px !important;
  top: 20px;
  font-size: 16px;
}

.navbar {
  background: transparent;
  padding: 25px 35px;
  border-radius: var(--border-radius);
  display: flex;
  align-items: center;
  max-height: 65px !important;
  margin: 0;
  border: 2px solid var(--border-color);
  transition: all 0.3s ease-out;
}

.navbar.scrolled {
  background-color: #050522a5 !important;
  backdrop-filter: blur(10px);
}

.buttons {
  margin-left: auto;
  padding: 8px 20px;
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

.buttons a {
  text-decoration: none;
  color: var(--faded-text-color);
  padding: 0 5px;
  font-family: var(--accent-font);
  transition: color 0.3s ease-out;
}

.buttons a:hover { color: var(--primary-color); }

.active {
  font-weight: bold;
  color: var(--primary-color) !important;
}

/* Navbar links */
.nav-links {
  list-style: none;
  margin: 0;
  padding-left: 20px;
}

.nav-links li { display: inline-block; }
.nav-links li a {
  color: var(--primary-color);
  text-decoration: none;
  font-family: var(--accent-font);
  padding: 8px 20px;
  border-radius: var(--border-radius);
  transition: all 0.2s ease-in-out;
}

.nav-links li a:hover {
  background-color: var(--text-color);
}

/* Navbar scrolled overrides */
.navbar.scrolled .nav-links li a { color: var(--text-color); }
.navbar.scrolled .active { color: var(--text-color) !important; }
.navbar.scrolled .buttons a { color: var(--faded-white); }
.navbar.scrolled .buttons a:hover,
.navbar.scrolled .menu-btn { color: var(--text-color) !important; }
.navbar.scrolled .nav-links li a:hover {
  background-color: var(--contrast-color) !important;
  color: var(--primary-color) !important;
}

.logo {
  height: 35px;
  transition: all 0.5s ease-out;
}

.logo:hover {
  rotate: -10deg;
  transform: scale(1.1);
}

/* Sections */
.home {
  height: 100vh;
  width: 100%;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

#jams, .jams, .events, .projects {
  width: 100%;
  padding: 50px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.jams { background-color: var(--contrast-color); }

/* Jam cards */
.jams a { 
  text-decoration: none; 
  color: var(--accent-color); 
  font-family: var(--text-font); 
}

.jams .link {
  text-decoration: underline !important;
  color: var(--primary-color) !important;
  transition: all 0.2s ease-in-out;
}

.jams .link:hover {
  color: var(--accent-color) !important;
}

.jam {
  padding: 60px;
  background-color: var(--primary-color);
  border-radius: var(--border-radius);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transition: all 0.3s ease-in-out;
  margin-bottom: 50px;
}


.jam h1, .jam p, .jam i,
.jam-title, .jams .date-icon { 
  color: #ff5500 !important;
  transition: all 0.3s ease-in-out;
}

.jam:hover h1, .jam:hover p, .jam:hover i {
  color: var(--primary-color) !important;
}

.jam:hover { background-color: #ff5500; }
.jam-title {
  font-family: var(--title-font);
  font-size: 48px;
  margin: 0;
}

.jam p { margin: 0 !important; padding: 0 !important; }
.jam-date {
  display: flex;
  align-items: center;
  flex-direction: row;
  gap: 10px;
  margin: 0;
  padding: 0;
}

.jams .title { color: var(--primary-color); }
.jams p { color: var(--primary-color); margin-bottom: 30px; }

/* Events */
.events { background-color: var(--primary-color); }
.events p { color: var(--faded-white); margin-bottom: 30px; }
.event-card {
  border-radius: var(--border-radius);
  background-color: var(--secondary-color);
  width: 350px;
  height: 350px;
  transition: all 0.5s ease-in-out;
}

.events .over { filter: grayscale(100%); }

/* Projects */
.projects {
  background-color: var(--contrast-color);
  color: var(--primary-color);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.projects .title, .projects p {
  color: var(--primary-color) !important;
}

.projects p {
  color: var(--primary-color) !important;
  margin-bottom: 30px;
}

/* Titles */
.title {
  font-family: var(--title-font);
  font-size: 32px;
  margin: 0;
  padding: 0;
}

/* Grid container */
.grid-container {
  display: grid;
  justify-content: center;
  grid-auto-columns: 30vw;
  grid-auto-rows: 20vw;
  gap: 1em;
  grid-template-areas: 
    "box-1 box-1"
    "box-2 box-3"
    "box-2 box-4";
}

.box {
  background-color: var(--accent-color);
  border-radius: var(--border-radius);
  padding: 50px;
  display: flex;
  font-family: var(--title-font);
  color: var(--primary-color);
  text-decoration: none;
  transition: all 1.5s cubic-bezier(.23,1.19,.9,.98);
  background-size: cover;
  background-position: center;
}

.box:hover {
  transform: scale(0.98);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.grid-container a {
  text-decoration: none;
  color: var(--contrast-color) !important;
}

/* Rows & Cols */
.row { display: flex; flex-direction: row; }
.col {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
}

/* Footer */
.footer {
  width: 100%;
  background-color: var(--nav-color);
  padding: 50px 0 0;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.footer .col { display: flex; flex-direction: column; margin: 0; }
.footer p { margin: 0; color: var(--faded-white); }
.footer h4 {
  margin-bottom: 10px;
  color: var(--text-color);
  font-family: var(--accent-font);
  font-weight: normal;
}

.footer .social-links {
  list-style: none;
  padding: 0;
  display: flex;
  gap: 10px;
}

.footer .social-links a {
  color: var(--text-color);
  font-size: 20px;
  transition: all 0.3s ease-in-out;
}

.footer .social-links a:hover { color: var(--accent-color); }
.footer .logo { height: 50px; width: auto; }
.footer .logo:hover { transform: scale(1.02); }
.footer .row {
  width: 85%;
  margin: auto;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
}


/* Event card images */
.event-card-img img {
  width: 100%;
  height: 100%;
  border-radius: var(--border-radius);
  object-fit: cover;
}

/* Transition animation */
.transition {
  position: fixed;
  top: 0; left: 0;
  width: 100vw; height: 100vh;
  display: flex;
  flex-direction: column;
  z-index: 10000;
  pointer-events: none;
}

.transition-row { flex: 1; display: flex; }
.transition-row.row-1 .block { transform-origin: top; }
.transition-row.row-2 .block { transform-origin: bottom; }
.block {
  flex: 1;
  background-color: var(--primary-color);
  transform: scaleY(1);
  will-change: transform;
}

/* Text selection */
::selection {
  background: var(--accent-color);   
  color: var(--primary-color);
}

/* Mobile menu */
.menu-btn {
  font-size: 22px;
  margin-left: auto;
  visibility: hidden;
  pointer-events: none;
  color: var(--primary-color) !important;
  font-weight: bold;
}
.menu {
  margin: 0;
  visibility: hidden;
  display: flex;
  flex-direction: column;
  gap: 20px;
  position: fixed;
  top: 0;
  right: 50%;
  transform: translate(50%, -200%);
  background-color: var(--accent-color);
  width: 100vw;
  align-items: center;
  z-index: -1;
  padding: 150px 0 20px;
  border-bottom-left-radius: var(--border-radius);
  border-bottom-right-radius: var(--border-radius);
  transition: all 0.8s ease-in-out;
  pointer-events: none;
}

.menu.visible {
  visibility: visible;
  pointer-events: all;
  transform: translate(50%, 0);
}

.menu li {
  font-size: 20px;
  list-style: none;
  font-family: var(--accent-font);
  transition: all 0.3s ease-out;
}

.menu li a {
  color: var(--primary-color);
  text-decoration: none;
  padding: 10px 20px;
  border-radius: var(--border-radius);
  transition: all 0.2s ease-in-out;
}

.menu li a:hover { background-color: var(--contrast-color); }

/* Home */
#home {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  width: 100%;
  background-color: var(--accent-color);
  font-family: var(--text-font);
  background-image: url("../assets/home_animation.gif");
}

.home-logo { width: 40vw; height: auto; }

/* Join Us */
#join-us {
  width: 100%;
  background-color: var(--nav-color);
  display: flex;
  flex-direction: column;
  align-items: center;
  color: var(--contrast-color);
  padding: 200px 0 50px;
  text-align: center;
}

.join-us .title {
  margin: 0;
  font-size: 60px;
  max-width: 80%;
}

.join-us p {
  font-size: 16px;
  line-height: 1.5;
  max-width: 600px;
  margin: 0 0 30px;
  color: var(--faded-white);
}

.join-btn {
  padding: 15px 30px;
  font-size: 20px;
  font-family: var(--accent-font);
  background-color: var(--contrast-color);
  border-radius: var(--border-radius);
  color: var(--nav-color);
  text-decoration: none;
  transition: all 0.3s ease-in-out;
}

.join-btn:hover {
  background-color: var(--accent-color);
  color: var(--primary-color);
}

/* Carousel */
.carousel {
  width: 100%;
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
}

.carousel-img {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: url('../assets/sandman_titlecard.png') no-repeat center center;
  background-size: cover;
  z-index: -1;
  opacity: 0.6;
}

/* Telemóvel */
@media (max-width: 450px) {

  .box { padding: 20px; font-size: 14px; }

  .jam-card {
    width: 350px;
    height: 350px;
    transition: all 0.5s ease-in-out;
  }

  #footer { font-size: 20px; }
  .footer .col { height: 110px; }
  .footer p { font-size: 16px; }
  .footer .social-links a { font-size: 24px; }


  .join-us .title { font-size: 40px; }
  .join-us p { font-size: 18px; padding: 0 20px; }
  .join-btn { padding: 30px 50px; font-size: 22px; }

}

@media (max-width: 1420px){
  #navbar {
  width: 80vw !important;
  }
}

@media (max-width: 1050px) {
    #navbar { width: 90vw; top: 10px; font-size: 18px; }
    .navbar { padding: 15px 20px; }
    .nav-links { visibility: hidden; }

    .menu.visible { align-items: center; padding: 150px 0 20px; }
    .menu-btn { visibility: visible; pointer-events: all; }


}

@media (max-width: 840px) {
   #events .row { flex-direction: column; } 

  .grid-container {
    grid-auto-columns: 350px;
    grid-auto-rows: 250px;
    grid-template-areas: 
      "box-1"
      "box-2"
      "box-3" 
      "box-4";
  }

  .jam { width: 80%; padding: 50px 20px; }
  .jam-title { font-size: 32px; }
  .jam-date { font-size: 16px; }

  .join-us p{
    max-width: 80%;
  }
  
  .events, .projects {
    padding: 50px 0;
  }

  .join-us {
    padding: 100px 0 50px !important;
  }
  
}

@media (max-width: 405px) {

  #navbar {
    width: 90vw !important;
  }

  .buttons a {
    font-size: 14px;
  }

  .buttons i {
    font-size: 20px;
  }

  .events img, .events .event-card, .events .event-card-img {
    width: 80vw !important;
    height: 80vw !important;
  }

  .grid-container {
    grid-auto-columns: 80vw;
    grid-auto-rows: 200px;
  }

  .join-us .title { font-size: 40px; }
  .join-us p { font-size: 16px; }

}