hhtml {
  -webkit-text-size-adjust: 100%;
}

@font-face {
  font-family: 'Trattatello';
  src: url('Trattatello.ttf');
}

body {
  margin: 0;
  background-color: black;
  color: white;
  font-family: 'Trattatello', Arial;
}

nav {
  display: flex;
  justify-content: space-between;
  padding: 20px;
  position: relative;
  z-index: 10;
}

nav a {
  color: white;
  margin-left: 20px;
  text-decoration: none;
}

/* 🔥 HERO FIXATA */
.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;

  padding-top: 40px; /* PRIMA ERA TROPPO BASSO */
}

.hero img {
  width: 450px; /* DIMENSIONE GIUSTA */
  display: block;
  margin: 0 auto;
}

.hero h1 {
  font-size: 50px;
  text-align: center;
  margin-top: 10px;
}

/* RESTO UGUALE */

.about {
  max-width: 600px;
  margin: 100px auto;
  text-align: center;
  padding: 20px;
}

.about h1 {
  letter-spacing: 4px;
  margin-bottom: 40px;
}

.about p {
  margin-bottom: 20px;
  line-height: 1.6;
}

.contact {
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  text-align: center;
  padding: 20px;
}

.contact h1 {
  letter-spacing: 4px;
  margin-bottom: 40px;
  font-size: 40px;
}

.contact-text {
  margin-bottom: 20px;
  letter-spacing: 1px;
}

.email {
  font-size: 18px;
  letter-spacing: 2px;
}

.works {
  padding: 100px 20px;
  text-align: center;
}

.works h1 {
  letter-spacing: 4px;
  margin-bottom: 60px;
}

.works-grid {
  display: flex;
  flex-direction: column;
  gap: 80px;
}

.work-item {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.work-item img {
  width: 500px;
  height: 500px;
  object-fit: cover;
  transition: 0.4s ease;
}

.work-item img:hover {
  transform: scale(1.05);
  opacity: 0.8;
}

.work-item p {
  margin-top: 40px;
  letter-spacing: 3px;
  font-size: 30px;
}

.work-item:first-child p {
  margin-top: -30px;
}

/* INTRO */

#intro {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background: #222;
  color: white;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  cursor: pointer;
  opacity: 1;
  transition: opacity 0.6s ease;
}

#intro.hidden {
  opacity: 0;
  pointer-events: none;
}

#intro p {
  letter-spacing: 6px;
  font-size: 40px;
}

.enter-img {
  width: 500px;
  animation: float 4s ease-in-out infinite;
}

@keyframes float {
  0% { transform: translate(0,0) scale(1); }
  25% { transform: translate(-15px,-20px) scale(1.03); }
  50% { transform: translate(15px,-10px) scale(1.05); }
  75% { transform: translate(-10px,10px) scale(1.02); }
  100% { transform: translate(10px,0) scale(1); }
}

.enter-active {
  animation: enterAnim 0.6s ease forwards;
}

@keyframes enterAnim {
  0% { transform: scale(1); opacity: 1; }
  100% { transform: scale(2); opacity: 0; }
}

/* SECTION */

section {
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  text-align: center;
  padding-top: 80px;
}

/* MOBILE */

@media (max-width: 768px) {

  nav div {
    display: flex;
    justify-content: center;
    gap: 15px;
  }

  nav a {
    font-size: 14px;
    margin: 0;
  }

  .hero {
    padding-top: 20px; /* MOBILE PIÙ SU */
  }

  .hero img {
    width: 380px; /* MOBILE PERFETTO */
  }

  .hero h1 {
    font-size: 40px;
  }

  .page {
    justify-content: flex-start;
    padding-top: 40px;
  }

}

