*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

@keyframes fade-in-up {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

:focus-visible {
  outline: 2px solid #f5c453;
  outline-offset: 2px;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.6;
  background-image: url(immagini/immagine_background.png);
  color: #f5f7ff;
  background-size: cover;
  background-position: bottom right;
}

.inizio {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(5, 8, 20, 0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
}

.div-logo {
  display: flex;
  justify-content: center;
  align-items: center;
}

.logo {
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #f5f7ff;
  text-decoration: none;
  font-size: 1.4rem;
  white-space: nowrap;
}

.logo span {
  color: #9900ff;
}

.gif {
  width: 50%;
  max-width: 40px;
  height: auto;
  object-fit: cover;
  white-space: nowrap;
}

.Navigazione {
  position: relative;
}

.Navigazione ul {
  list-style: none;
  display: flex;
  gap: 1rem;
}

.Navigazione a {
  text-decoration: none;
  color: #d7ddf5;
  font-size: 0.9rem;
  position: relative;
  padding-bottom: 0.15rem;
  transition: color 0.2s ease;
}

.Navigazione a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, rgb(71, 18, 244), rgb(162, 35, 246));
  transition: width 0.25s ease;
}

.Navigazione a:hover,
.Navigazione a:focus-visible {
  color: #ffffff;
}

.Navigazione a:hover::after,
.Navigazione a:focus-visible::after {
  width: 100%;
}

.bottone {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
}

.nav-bar {
  display: block;
  width: 20px;
  height: 2px;
  background: #f5f7ff;
  margin: 3px 0;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

/* hamburger animation when open */
.bottone.open .nav-bar:nth-child(1) {
  transform: translateY(5px) rotate(45deg);
}
.bottone.open .nav-bar:nth-child(2) {
  opacity: 0;
}
.bottone.open .nav-bar:nth-child(3) {
  transform: translateY(-5px) rotate(-45deg);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  align-items: center;
  padding: 2.5rem 1.25rem 2rem;
  gap: 2rem;
}

.hero-content h1 {
  font-size: clamp(2.3rem, 3vw, 3.4rem);
  margin-bottom: 0.75rem;
}

.hero-content p {
  max-width: 32rem;
  color: #d7ddf5;
  margin-bottom: 1.5rem;
}

.liquid-btn {
  position: relative;
  padding: clamp(12px, 3vw, 18px) clamp(30px, 6vw, 50px);
  font-size: clamp(14px, 2.5vw, 22px);
  color: #fff;
  border: none;
  cursor: pointer;
  border-radius: 50px;
  overflow: hidden;
  text-transform: uppercase;
  font-weight: 2px;
  background: linear-gradient(135deg, rgb(46, 0, 195), rgb(114, 0, 190));
  box-shadow: 0 0 20px rgba(79, 172, 254, 0.8), 0 0 40px rgba(0, 242, 254, 0.6);
  transition: transform 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: min-content;
  white-space: nowrap;
}

.liquid-btn:hover {
  transform: scale(1.05);
}

.liquid-btn::before,
.liquid-btn::after {
  content: "";
  position: absolute;
  left: -50%;
  width: 200%;
  height: 300%;
  background: radial-gradient(circle, rgba(255, 255, 255, 255, 0.25) 20%,
      transparent 70%);
  animation: wave 6s linear infinite;
  border-radius: 40%;
  z-index: 1;
}

.liquid-btn::after {
  animation-duration: 8s;
  opacity: 0.6;
}

.shine {
  position: absolute;
  top: 0;
  left: -75%;
  width: 50%;
  height: 100%;
  background: linear-gradient(120deg, rgba(255, 255, 255, 0.3)0%,
      transparent 60%);
  transform: skew(-25deg);
  animation: shineMove 4s infinite;
  z-index: 2;
}

@keyframes wave {
  0% {
    transform: translateY(0) rotate(0deg);
  }

  50% {
    transform: translateY(-10%) rotate(180deg);
  }

  100% {
    transform: translateY(0) rotate(360deg);
  }
}

@keyframes shineMove {
  0% {
    left: -75%;
  }

  100% {
    left: 125%;
  }
}

.scritta {
  font-size: 15px;
  color: #fff;
  text-decoration: none;
  position: relative;
  z-index: 3;
}

.hero-image {
  position: relative;
  min-height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.keyblade {
  width: 200px;
  height: auto;
  position: absolute;
  animation: orbit-rotate 18s linear infinite;
}

.keyblade-orbit::before {
  content: "";
  border-radius: 50%;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
}

@keyframes orbit-rotate {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

.section-header {
  padding: 0 1.25rem;
  margin-bottom: 1rem;
}

.section-header h2 {
  font-size: 2rem;
  margin-bottom: 0.25rem;
}

.section-header p {
  color: #d7ddf5;
  font-size: 1.5rem;
}

.featured {
  padding-bottom: 2rem;
}

.grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
  padding: 0 1.25rem;
}

.card {
  background: linear-gradient(145deg, rgb(22, 0, 96), rgb(60, 0, 100));
  border-radius: 1rem;
  padding: 1rem;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.06);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.card-large {
  grid-column: span 2;
  grid-row: span 2;
  height: 300px;
}

.card-link {
  text-decoration: none;
  color: inherit;
  display: block;
  height: 100%;
}

.card-content h3 {
  font-size: 1.05rem;
  margin-bottom: 0.4rem;
}

.card-content p {
  font-size: 0.9rem;
  color: #d7ddf5;
  margin-bottom: 0.75rem;
}

.tag {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  background: rgba(245, 196, 83, 0.1);
  color: #f5c453;
  font-size: 0.75rem;
}

.card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top right, rgba(78, 164, 255, 0.25), transparent 55%);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.card:hover,
.card:focus-within {
  transform: translateY(-3px);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.5);
  border-color: rgba(79, 172, 254, 0.8);
  animation: shadow-drop-center 0.4s cubic-bezier(0.250, 0.460, 0.450, 0.940) both;
}


@keyframes shadow-drop-center {
  0% {
    box-shadow: 0 0 0 0 rgb(79, 172, 254, 0.8);
  }
  100% {
    box-shadow: 0 0 20px 0px rgb(79, 172, 254, 0.8);
  }
}

.card:hover::after,
.card:focus-within::after {
  opacity: 1;
}

.about {
  padding: 2rem 1.25rem 3rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.about-text {
  flex: 2 1 260px;
}

.about-highlight {
  flex: 1 1 220px;
  background: rgba(5, 8, 20, 0.9);
  border-radius: 1rem;
  padding: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.about-highlight h3 {
  margin-bottom: 0.5rem;
}

.about-highlight ul {
  list-style: disc;
  padding-left: 1.1rem;
  font-size: 0.9rem;
}

.site-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 1.5rem 1.25rem 1rem;
  background: rgba(5, 8, 20, 0.95);
}

.footer-columns {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-bottom: 1rem;
}

.footer-columns section h3 {
  font-size: 0.9rem;
  margin-bottom: 0.4rem;
}

.footer-columns ul {
  list-style: none;
}

.footer-columns a {
  text-decoration: none;
  color: #d7ddf5;
  font-size: 0.85rem;
  transition: color 0.2s ease;
}

.footer-columns a:hover,
.footer-columns a:focus-visible {
  color: #4ea4ff;
}

.footer-bottom {
  font-size: 0.75rem;
  color: #a9b3e0;
}

.page-main {
  padding: 2rem 1.25rem 3rem;
}

.page-header {
  margin-bottom: 1.5rem;
}

.page-header h1 {
  font-size: 1.6rem;
  margin-bottom: 0.4rem;
}

.page-header p {
  color: #d7ddf5;
  font-size: 0.95rem;
  max-width: 32rem;
}

.sub-nav ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 0.75rem;
}

.sub-nav a {
  font-size: 0.85rem;
  text-decoration: none;
  color: #4ea4ff;
  border-radius: 999px;
  border: 1px solid rgba(78, 164, 255, 0.4);
  padding: 0.25rem 0.7rem;
  transition: background 0.2s ease, color 0.2s ease, transform 0.15s ease;
}

.sub-nav a:hover,
.sub-nav a:focus-visible {
  background: rgba(78, 164, 255, 0.15);
  color: #ffffff;
  transform: translateY(-1px);
}

.lore-section {
  margin-bottom: 2rem;
  padding: 1.25rem;
  border-radius: 1rem;
  background: rgba(5, 8, 20, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.06);
  animation: fade-in-up 0.6s ease both;
}

.lore-section:nth-of-type(2) {
  animation-delay: 0.1s;
}

.lore-section:nth-of-type(3) {
  animation-delay: 0.2s;
}

.lore-section h2 {
  margin-bottom: 0.25rem;
}

.meta {
  font-size: 0.8rem;
  color: #a9b3e0;
  margin-bottom: 0.75rem;
}

.conteiner {
  display: grid;
  place-items: center;
  margin-inline: 1.5rem;
  padding-block: 5rem;
}

.card__container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  row-gap: 3.5rem;
}

.card__article {
  position: relative; 
  overflow: hidden;
  height: 250px;
}

.cards {
  display: flex;
  width: 50%;
}

.card__img {
  width: 200px;
  height: 300px;
  border-radius: 1.5rem;
}

.card__data {
  width: 280px;
  background-color: var(--container-color);
  padding: 1.5rem 2rem;
  box-shadow: 0 8px 24px hsla(0, 0%, 0%, 15);
  border-radius: 1rem;
  position: absolute;
  bottom: -9rem;
  left: 0;
  right: 50%;
  margin-inline: auto;
  opacity: 0;
  transition: opacity 1s 1s;
}

.card__description {
  display: block;
  font-size: var(--small-font-size);
  margin-bottom: .25rem;
}

.card__title {
  font-size: var(--h2-font-size);
  font-weight: 500;
  color: var(--title-color);
  margin-bottom: .75rem;
}

.card__button {
  text-decoration: none;
  font-size: var(--small-font-size);
  font-weight: 500;
  color: var(--first-color);
}

.card__button:hover {
  text-decoration: underline;
}

.card__article:hover .card__data {
  animation: show-data 1s forwards;
  opacity: 1;
  transition: opacity .3s;
}

.card__article:hover{
  animation: remove-overflow 2s forwards;
}

.card__article:not(:hover){
  animation: show-overflow 2s forwards;
}

.card__article:not(:hover) .card__data{
  animation: remove-data 1s forwards;
}

@keyframes show-data {
  50% {
    transform: translateY(-10rem);
  }
  100% {
    transform: translateY(-7rem);
  }
}

@keyframes remove-overflow {
  to {
    overflow: initial;
  }
}

@keyframes remove-data {
  0%{
    transform: translateY(-7rem);
  }
  50%{
    transform: translateY(-10rem);
  }
  100%{
    transform: translateY(.5rem);
  }
}

@keyframes show-overflow {
  0%{
    overflow: initial;
    pointer-events: none;
  }
  50%{
    overflow: hidden;
  }
}

.containerA {
  position: relative;              
  margin: 2rem auto 0;            
  width: 1000px;
  max-width: 100%;                
  height: 600px;
  box-shadow: 0 30px 50px #dbdbdb;
}

.featured {
  padding-bottom: 4rem;
}

.containerA .slide {
  width: 100%;
  height: 100%;
  position: relative;
  overflow: hidden;
}

.containerA .slide .item {
  width: 200px;
  height: 300px;
  position: absolute;
  top: 50%;
  transform: translate(0, -50%) ease;
  border-radius: 20px;
  box-shadow: 0 30px 50px #505050;
  background-position: 50% 50%;
  background-size: cover;
  display: inline-block;
  transition: 0.5s ease;
}

.slide .item:nth-child(1){
  top: 0;
  left: 0;
  transform: translate(0, 0);
  border-radius: 0;
  width: 100%;
  height: 100%;
}

.slide .item:nth-child(2) {
  left: 50%;
}

.slide .item:nth-child(3) {
  left: calc(50% + 220px);
}

.slide .item:nth-child(4) {
  left: calc(50% + 440px);
}

.slide .item:nth-child(n + 5) {
  left: calc(50% + 440px);
  opacity: 0;
}

.item .contentA {
  position: absolute;
  top: 25%;
  left: 20px;
  width: 300px;
  text-align: left;
  color: #eee;
  transform: translate(0, -50%) ease;
  display: none;
}

.featured > #mondi {
  font-size: 40px;
  color: #fff;
}

.slide .item:nth-child(1) .contentA {
  display: block;
}

.contentA .name {
  font-size: 40px;
  text-transform: uppercase;
  font-weight: bold;
  opacity: 0;
  animation: animate 1s ease-in-out 1 forwards;
}

.contentA.des {
  margin-top: 10px;
  margin-bottom: 20px;
  opacity: 0;
  animation: animate 1s ease-in-out 0.3s 1 forwards;
}

@keyframes animate {
  from {
    opacity: 0;
    transform: translate(0, 100px);
    filter: blur(33px);
  }
  to {
    opacity: 1;
    transform: translate(0);
    filter: blur(0);
  }
}

.buttonA {
  width: 100%;
  text-align: center;
  position: absolute;
  bottom: 20px;
}

.buttonA button {
  width: 40px;
  height: 35px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  margin: 0 5px;
  border: 1px solid #000;
  transition: 0.3s;
}

.buttonA button:hover {
  background: #ababab;
  color: #fff;
}


/* sempre in fondo le media query */
@media (max-width: 768px) {
  .Navigazione ul {
    position: absolute;
    right: 0;
    top: 100%;
    background: rgba(5, 8, 20, 0.98);
    flex-direction: column;
    padding: 0.75rem 1rem;
    border-radius: 0 0 0 0.75rem;
    min-width: 180px;
    transform-origin: top right;
    transform: scaleY(0);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.18s ease, opacity 0.18s ease;
  }

  .Navigazione[aria-expanded="true"] ul {
    transform: scaleY(1);
    opacity: 1;
    pointer-events: auto;
  }

  .bottone {
    display: block;
  }

  .hero {
    grid-template-columns: minmax(0, 1fr);
    padding-top: 1.5rem;
  }

  .hero-image {
    order: -1;
  }

  .grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .card-large {
    grid-column: auto;
    grid-row: auto;
  }

  .about {
    flex-direction: column;
  }

  .footer-columns {
    flex-direction: column;
  }
}

@media (min-width: 769px) and (max-width: 1024px) {
  .hero {
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  }

  .grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .card-large {
    grid-column: span 2;
  }
}

@media (min-width: 1025px) {
  body {
    font-size: 16px;
  }

  .hero {
    max-width: 1100px;
    margin: 0 auto;
  }

  .featured,
  .about,
  .page-main,
  .site-footer {
    max-width: 1100px;
    margin: 0 auto;
  }
}