/* Customs property CSS */

@font-face {
  font-family: "Montserrat", sans-serif;
  src: url(./font/Montserrat-Regular.ttf);
  font-weight: 400;
}

@font-face {
  font-family: "Montserrat", sans-serif;
  src: url(./font/Montserrat-Medium.ttf);
  font-weight: 500;
}

:root {
  /* PALETTE */

  --Color-Primary: #1a1a22;
  --Color-Secondary: #282832;
  --Color-CTA: #35b444;
  --Color-Text: #ffffff;

  /* FONT */

  --Text-XL: 2rem;
  --Text-L: 1.5rem;
  --Text-M: 1.1rem;
  --Text-Base: 1rem;
  --Text-S: 0.85rem;
}

/* RESET CSS */

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}
body {
  font-family: "Montserrat, sans-serif";
  font-size: var(--Text-Base);
  color: var(--Color-Text);
  background-color: var(--Color-Secondary);
}
h1,
h2,
h3,
h4 {
  margin: 0;
  font-weight: 600;
}
p {
  margin: 0;
}
a {
  text-decoration: none;
  color: inherit;
}
img {
  display: block;
  width: 100%;
}
ul {
  list-style: none;
}

/* ANIMAZIONI*/

@keyframes slideFromLeft {
  from {
    opacity: 0;
    transform: translateX(-100px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
@keyframes slideFromRight {
  from {
    opacity: 0;
    transform: translateX(100px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* MOBILE FIRST */

/* HERO SECTION */

.hero-container {
  display: flex;
  flex-direction: column-reverse;
  justify-content: center;
  align-items: center;
  padding: 1rem 1.5rem;
  min-height: 85vh;
}
.hero-text {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}
.hero-text h1 {
  opacity: 0;
  font-size: var(--Text-XL);
  animation: fadeIn 1.5s ease forwards;
  animation-delay: 0.6s;
}
.hero-text p {
  opacity: 0;
  font-size: var(--Text-Base);
}
.hero-text.a {
  animation: fadeIn 1.5s ease forwards;
  animation-delay: 1.5s;
}
.hero-text.b {
  animation: fadeIn 1.5s ease forwards;
  animation-delay: 2.3s;
}
.hero-text a {
  opacity: 0;
  animation: fadeIn 1.5s ease forwards;
  animation-delay: 3s;
  transition: all 0.3s ease-in;
  font-size: var(--Text-M);
}

/* Effect Hover hero */

.hero-text a:hover {
  transform: scale(1.1);
}
.hero-image {
  max-height: 400px;
}
.hero-image img {
  opacity: 0;
  animation: slideFromLeft 1.5s ease forwards;
  animation-delay: 0.5s;
  align-self: center;
}
.hero-cta {
  width: fit-content;
  display: flex;
  justify-content: center;
  align-self: center;
  padding: 0.5rem 2rem;
  background-color: var(--Color-CTA);
  border-radius: 20px;
  margin-top: 2rem;
}
/* Portfolio Section */
.portfolio-container {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  margin-top: 4rem;
  padding: 1rem 1.5rem 3rem;
  background-color: var(--Color-Primary);
  margin-bottom: 4rem;
}
.portfolio-text {
  display: flex;
  justify-content: flex-start;
  align-self: flex-start;
  padding: 2rem 0.5rem;
  font-size: var(--Text-M);
}
.card-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 2rem;
  justify-content: center;
  align-self: center;
}
.card-item {
  position: relative;
  background-color: var(--Color-Secondary);
  border-radius: 16px;
  overflow: hidden;
  max-width: 300px;
  transition: all 0.3s ease-in-out;
  -webkit-box-shadow: 0px 0px 20px -5px #ffffff;
  box-shadow: 0px 0px 20px -5px #ffffff;
}
.card-image img {
  display: flex;
  justify-content: center;
  align-items: center;
}
.card-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding: 2rem 1rem;
  gap: 1.2rem;
  max-height: 160px;
}
.card-text h3 {
  font-size: var(--Text-M);
}
.card-text p {
  font-size: var(--Text-S);
}
.badge {
  color: var(--Color-CTA);
  font-weight: 600;
  position: absolute;
  top: 53%;
  left: 66%;
  font-size: var(--Text-S);
}
.card-item:hover {
  transform: scale(1.1);
}

/* Section Servizi */

.servizi-container {
  display: grid;
  grid-template-columns: 1fr;
  padding: 1rem 1.5rem 3rem;
  gap: 2.3rem;
  margin-bottom: 4rem;
}
.servizi-text {
  display: flex;
  justify-content: flex-start;
  align-self: flex-start;
  padding: 2rem;
  font-size: var(--Text-M);
}
.servizi-item {
  background-color: var(--Color-Primary);
  padding: 2rem 2.5rem;
  border-radius: 16px 4px;
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  transition: all 0.3s ease-in-out;
}
.emoji {
  padding: 0.5rem;
}
.servizi-item h3 {
  font-size: var(--Text-L);
  font-weight: 600;
}
.servizi-item p {
  font-size: var(--Text-Base);
}
.servizi-item:hover {
  transform: scale(1.05);
}

.contact {
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 3rem;
  background-color: var(--Color-Primary);
  padding: 1rem 1.5rem 3rem;
}
.contact-text {
  display: flex;
  flex-direction: column;
  padding: 2rem 0 0;
  gap: 2rem;
}
.contact-text h3 {
  font-size: var(--Text-L);
}
.contact-text p {
  font-size: var(--Text-M);
}
.contact-details {
  transition: all 0.3s ease-in-out;
  border-radius: 25px;
  background-color: var(--Color-Text);
}
.contact-details ul {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-self: center;
  gap: 0.5rem;
  padding: 1rem 1rem 2rem;
  color: var(--Color-Primary);
}
.social-bar ul {
  display: flex;
  flex-direction: row;
  justify-content: center;
  gap: 2rem;
}
.contact-details:hover {
  transform: scale(1.1);
}
.contact-details a:hover {
  color: var(--Color-CTA);
}
.footer {
  text-align: center;
  padding: 1rem 1.5rem 2rem;
}

/* TABLET 768px */

@media (min-width: 768px) {
  /* Hero Section  */

  .hero-container {
    flex-direction: row;
    margin: 2rem;
    background-color: var(--Color-Primary);
    border-radius: 20px;
    -webkit-box-shadow: 0px 0px 20px -5px #ffffff;
    box-shadow: 0px 0px 20px -5px #ffffff;
  }
  .hero-image img {
    animation: slideFromRight 1.5s ease forwards;
    animation-delay: 0.5s;
    max-width: 500px;
    max-height: 500px;
  }

  /* Portfolio Section */
  .card-container {
    justify-content: center;
    align-self: center;
    grid-template-columns: 1fr 1fr;
  }
  .card-item {
    max-width: 300px;
  }

  /* Contatti Section */
  .contact-details {
    padding: 0 4rem;
  }
}

/* Desktop 1024px */

@media (min-width: 1024px) {
  /* Hero Section */

  .hero-text h1 {
    font-size: var(--Text-XL);
  }
  .hero-text p {
    font-size: var(--Text-M);
  }
  /* Portfolio Section */

  .card-container {
    grid-template-columns: 1fr 1fr 1fr;
    gap: 4rem;
    padding-bottom: 2rem;
  }
  .portfolio-text {
    align-self: center;
    padding: 2rem 4rem;
  }
  .porfolio-text h2 {
    font-size: var(--Text-XL);
  }
  /* Servizi Section */
  .servizi-container {
    grid-template-columns: 1fr 1fr 1fr;
  }
  .servizi-text {
    display: flex;
    justify-content: center;
    align-items: center;
  }
  .contact-details {
    padding: 0 7rem;
  }
}
