/* ============================================================
   BUBBLES OF MEMORIES — pagina gioco
   Estende css/style.css (token, navbar, bottoni, footer).
   1. Token di pagina
   2. Navbar: CTA wishlist
   3. Hero gioco
   4. Titoli e testi di sezione
   5. Il mondo
   6. Caratteristiche
   7. Pannelli + Gallery
   8. La creatura
   9. CTA wishlist
  10. Footer
  11. Responsive
   ============================================================ */

/* ---------- 1. Token di pagina (palette più blu) ---------- */
.page-game {
  --bg:            #060c22;
  --bg-2:          #08102a;
  --bg-3:          #0b1433;
  --line:          rgba(140, 165, 255, .16);
  --line-strong:   rgba(160, 185, 255, .3);
  --blue:          #6fa8ff;
  /* Tinta unita: sotto la hero il riempimento dell'onda deve combaciare */
  background: var(--bg);
}

/* ---------- 2. Navbar: CTA wishlist ---------- */
.btn--sm { padding: 10px 18px; font-size: .7rem; gap: 9px; }
.btn--sm svg { width: 15px; height: 15px; }
.nav__cta { flex: none; }

/* ---------- 3. Hero gioco ---------- */
.ghero {
  position: relative;
  min-height: 100svh;
  display: flex; align-items: center;
  padding: calc(var(--nav-h) + 40px) 0 clamp(120px, 13vw, 190px);
  overflow: hidden;
  /* Bagliore d'atmosfera dietro l'artwork */
  background: radial-gradient(85% 70% at 52% 8%, #0e1c48 0%, transparent 62%), var(--bg);
}
.ghero__art { position: absolute; inset: 0; }
.ghero__scene { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

.ghero__veil {
  position: absolute; inset: 0;
  background:
    linear-gradient(90deg, rgba(6, 12, 34, .96) 0%, rgba(6, 12, 34, .82) 32%, rgba(6, 12, 34, .05) 66%),
    linear-gradient(0deg, rgba(6, 12, 34, .7) 0%, transparent 18%);
}
.ghero__stars {
  position: absolute; inset: 0;
  background-image:
    radial-gradient(1.6px 1.6px at 14% 20%, rgba(255,255,255,.65), transparent),
    radial-gradient(1.3px 1.3px at 36% 10%, rgba(255,255,255,.5), transparent),
    radial-gradient(1.7px 1.7px at 62% 26%, rgba(255,255,255,.45), transparent),
    radial-gradient(1.4px 1.4px at 82% 12%, rgba(255,255,255,.55), transparent),
    radial-gradient(1.2px 1.2px at 24% 62%, rgba(255,255,255,.35), transparent),
    radial-gradient(1.5px 1.5px at 94% 58%, rgba(255,255,255,.4), transparent);
  animation: twinkle 6s ease-in-out infinite alternate;
}

/* Bolle con immagine dentro */
.gbubble { display: grid; place-items: center; }
.gbubble__ph {
  width: 72%; height: 72%;
  border-radius: 50%;
  border-color: rgba(200, 220, 255, .38);
  background: rgba(10, 18, 46, .55);
}
.gbubble__ph::after { font-size: .5rem; letter-spacing: .12em; color: rgba(230, 238, 255, .6); }
.gbubble__img {
  width: 130%; height: 130%;
  border-radius: 50%;
  object-fit: cover;
  opacity: .92;
}

.ghero__inner { position: relative; z-index: 2; }
.ghero__content { max-width: 560px; }

.ghero__kicker { display: flex; flex-wrap: wrap; gap: 10px; color: var(--text-soft); }
.ghero__kicker i { font-style: normal; color: var(--violet-2); opacity: .7; }

.ghero__title { margin-bottom: 18px; }
/* Logo del titolo. Il file ha margini trasparenti attorno al disegno
   (misurati: 11,35% a sinistra, 9,42% sopra e 7,63% sotto): li recupero con
   margini negativi, così il logo si allinea otticamente al testo qui sotto. */
.ghero__logo {
  --logo-w: min(100%, 600px);
  display: block;
  width: var(--logo-w);
  height: auto;
  margin: calc(var(--logo-w) * -.0495)
          0
          calc(var(--logo-w) * -.0401)
          calc(var(--logo-w) * -.1135);
}

.ghero__lead {
  margin-bottom: 34px;
  max-width: 440px;
  color: var(--text-soft);
  line-height: 1.9;
}
.ghero__actions { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 28px; }

/* Link trailer */
.play {
  display: inline-flex; align-items: center; gap: 14px;
  font-size: .8rem; letter-spacing: .1em;
  color: var(--text-soft);
  transition: color .3s var(--ease);
}
.play__btn {
  display: grid; place-items: center;
  width: 38px; height: 38px; flex: none;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  color: var(--text);
  transition: transform .3s var(--ease), border-color .3s var(--ease), background-color .3s var(--ease);
}
.play__btn svg { width: 18px; height: 18px; }
.play:hover { color: var(--text); }
.play:hover .play__btn {
  transform: scale(1.08);
  border-color: var(--violet-2);
  background: rgba(124, 92, 240, .18);
}

/* ---------- Onde decorative ----------
   Curve vere in SVG: `preserveAspectRatio="none"` le stira in larghezza,
   `vector-effect="non-scaling-stroke"` tiene il filo sempre sottile. */
.wave { position: relative; pointer-events: none; }
.wave svg { display: block; width: 100%; height: 100%; }
.wave__fill { fill: var(--bg); }
.wave__line {
  fill: none;
  stroke-width: 1.1;
  filter: drop-shadow(0 0 7px rgba(150, 180, 255, .4));
}
/* Seconda linea, più tenue: dà profondità all'onda */
.wave__line--soft { opacity: .4; filter: none; }

/* Onda di chiusura della hero: taglia l'artwork sul fondo */
.wave--hero {
  position: absolute; left: 0; right: 0; bottom: -1px;
  z-index: 1;
  height: clamp(96px, 11vw, 160px);
}
/* Il vertice della curva è a y=14 su un viewBox alto 160 → 8.75% */
.wave__dot {
  position: absolute; left: 50%; top: 8.75%;
  width: 9px; height: 9px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 18px 5px rgba(170, 200, 255, .85);
}

/* Onda di separazione tra le sezioni */
.wave--split {
  height: clamp(64px, 7.5vw, 110px);
  margin-block: clamp(-34px, -2.5vw, -12px);
}

/* ---------- 4. Titoli e testi di sezione ---------- */
.gsec { position: relative; }
.gsec--tight { padding: clamp(40px, 5vw, 64px) 0; }
/* Sotto l'onda della hero serve meno respiro in alto */
.gsec--mondo { padding-top: clamp(32px, 4.5vw, 68px); }

.gtitle {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 20px;
  font-size: clamp(1.5rem, 2.6vw, 2.05rem);
  font-weight: 400;
  letter-spacing: .01em;
}
.gtitle--lead { margin-bottom: 28px; }
.gtitle__spark { display: block; width: 22px; height: 22px; flex: none; color: var(--violet-2); }
.gtitle__spark--after { width: 15px; height: 15px; opacity: .8; }

.gtext {
  margin-bottom: 26px;
  max-width: 440px;
  color: var(--text-soft);
  font-size: .92rem;
  line-height: 1.95;
}

/* Placeholder immagine, varianti di questa pagina */
.img-ph--wide  { width: 100%; aspect-ratio: 16 / 9; border-radius: var(--radius); }
.img-ph--media { width: 100%; aspect-ratio: 4 / 3; border-radius: var(--radius-sm); }
.img-ph--thumb { width: 100%; aspect-ratio: 3 / 4; border-radius: var(--radius-sm); }

/* ---------- 5. Il mondo ---------- */
.mondo__grid {
  display: grid;
  grid-template-columns: 1fr 1.75fr;
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}
.mondo__body { padding-left: clamp(0px, 2vw, 32px); }
.mondo__media { position: relative; }

/* Slideshow con frecce laterali */
.slideshow { position: relative; }
.slideshow__viewport {
  position: relative;
  width: 100%; aspect-ratio: 16 / 9;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.slideshow__img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity .5s var(--ease);
}
.slideshow__img.is-active { opacity: 1; }

.slideshow__nav {
  position: absolute; top: 50%;
  display: grid; place-items: center;
  width: 40px; height: 40px; padding: 0;
  transform: translateY(-50%);
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: rgba(10, 16, 42, .72);
  color: var(--text-soft);
  cursor: pointer;
  backdrop-filter: blur(6px);
  transition: color .3s var(--ease), border-color .3s var(--ease), background-color .3s var(--ease);
}
.slideshow__nav svg { width: 20px; height: 20px; }
.slideshow__nav[hidden] { display: none; }
.slideshow__nav--prev { left: 14px; }
.slideshow__nav--next { right: 14px; }
.slideshow__nav:hover {
  color: var(--text);
  border-color: var(--violet-2);
  background: rgba(10, 16, 42, .92);
}

/* ---------- 6. Caratteristiche ---------- */
.feats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}
.feat {
  display: flex; align-items: flex-start; gap: 16px;
  padding: 24px 22px;
}
.feat__icon {
  display: grid; place-items: center;
  width: 52px; height: 52px; flex: none;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: radial-gradient(circle at 32% 28%, rgba(150, 175, 255, .22), rgba(90, 110, 220, .06));
  color: var(--violet-2);
}
.feat__icon svg { width: 26px; height: 26px; }
.feat:nth-child(2) .feat__icon { color: var(--pink); }
.feat:nth-child(4) .feat__icon { color: var(--blue); }
.feat__title {
  margin-bottom: 8px;
  font-size: .98rem; font-weight: 400;
}
.feat__text { color: var(--text-soft); font-size: .78rem; line-height: 1.75; }

/* ---------- 7. Pannelli + Gallery ---------- */
.panel {
  padding: clamp(22px, 3vw, 32px);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: linear-gradient(160deg, rgba(255, 255, 255, .045), rgba(255, 255, 255, .012));
}
.panel__head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 20px; flex-wrap: wrap;
  margin-bottom: 22px;
}
.panel__head .gtitle { margin-bottom: 0; }

.ggallery {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}
.ggallery__item {
  display: block;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--line);
  transition: transform .4s var(--ease), border-color .4s var(--ease), box-shadow .4s var(--ease);
}
.ggallery__item:hover {
  transform: translateY(-6px);
  border-color: var(--line-strong);
  box-shadow: var(--shadow-lg);
}
.ggallery__img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.ggallery .img-ph--media { border-radius: 0; }

/* ---------- 8. La creatura ---------- */
.creatura {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: clamp(24px, 3.5vw, 48px);
  align-items: center;
}
.creatura__portrait,
.creatura__img {
  width: clamp(150px, 15vw, 200px);
  aspect-ratio: 1;
  border-radius: 50%;
  object-fit: cover;
  flex: none;
}
.creatura__portrait { border-style: dashed; }
.creatura__img { border: 1px solid var(--line-strong); }
.creatura__body .gtext { margin-bottom: 22px; }

.carousel {
  position: relative;
  display: flex; align-items: center; gap: 12px;
  width: clamp(280px, 30vw, 380px);
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(124, 92, 240, .07);
}
.carousel__track {
  display: flex; gap: 12px;
  flex: 1;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}
.carousel__track::-webkit-scrollbar { display: none; }
.carousel__track li { flex: 0 0 calc((100% - 24px) / 3); scroll-snap-align: start; }
.carousel__img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; border-radius: var(--radius-sm); }
.carousel__nav {
  display: grid; place-items: center;
  width: 30px; height: 30px; flex: none; padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: rgba(10, 16, 42, .8);
  color: var(--text-soft);
  cursor: pointer;
  transition: color .3s var(--ease), border-color .3s var(--ease), transform .3s var(--ease);
}
.carousel__nav svg { width: 16px; height: 16px; }
.carousel__nav:hover { color: var(--text); border-color: var(--violet-2); transform: scale(1.08); }
.carousel__nav:disabled { opacity: .3; cursor: default; transform: none; }

/* ---------- 9. CTA wishlist ---------- */
.wish {
  position: relative;
  display: flex; align-items: center; gap: clamp(20px, 3vw, 36px);
  overflow: hidden;
  padding: clamp(26px, 3.5vw, 40px) clamp(24px, 4vw, 52px);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  background: linear-gradient(110deg, rgba(90, 66, 190, .55), rgba(140, 96, 200, .38) 55%, rgba(70, 54, 160, .5));
}
.wish__glow { position: absolute; border-radius: 50%; filter: blur(46px); pointer-events: none; }
.wish__glow--1 { left: -4%; bottom: -60%; width: 320px; height: 320px; background: rgba(160, 130, 255, .45); }
.wish__glow--2 { right: -2%; top: -70%; width: 300px; height: 300px; background: rgba(190, 150, 255, .35); }

.wish__icon {
  position: relative; z-index: 1;
  display: grid; place-items: center;
  width: 86px; height: 86px; flex: none;
  border: 1px solid rgba(255, 255, 255, .45);
  border-radius: 50%;
  color: #fff;
}
.wish__icon svg { width: 42px; height: 42px; }
.wish__body { position: relative; z-index: 1; flex: 1; }
.wish__title {
  margin-bottom: 10px;
  font-size: clamp(1.15rem, 2.2vw, 1.6rem);
  font-weight: 400;
}
.wish__text { color: rgba(255, 255, 255, .78); font-size: .8rem; }
.wish .btn { position: relative; z-index: 1; }

/* ---------- 10. Footer ---------- */
.page-game .footer { background: #050a1c; }
.footer__social { display: flex; gap: 18px; }
.footer__social li + li { margin-top: 0; }   /* annulla la spaziatura verticale di .footer__col */
.footer__social a { color: var(--text-soft); transition: color .3s var(--ease), transform .3s var(--ease); }
.footer__social a > * { width: 20px; height: 20px; object-fit: contain; }
.footer__social a:hover { color: var(--violet-2); transform: translateY(-2px); }
.footer__col--social .footer__title { display: flex; align-items: center; gap: 8px; }
.footer__bottom--center { justify-content: center; text-align: center; }

/* ---------- 11. Responsive ---------- */
@media (max-width: 1080px) {
  .feats { grid-template-columns: repeat(2, 1fr); }
  .creatura { grid-template-columns: auto 1fr; }
  .carousel { grid-column: 1 / -1; width: 100%; }
}

@media (max-width: 900px) {
  .nav__cta { width: 100%; justify-content: center; }

  .ghero { min-height: auto; padding: calc(var(--nav-h) + 60px) 0 120px; }
  .ghero__veil {
    background: linear-gradient(180deg, rgba(6, 12, 34, .55) 0%, rgba(6, 12, 34, .9) 48%, var(--bg) 90%);
  }
  .ghero__content { max-width: none; }

  .mondo__grid { grid-template-columns: 1fr; }
  .mondo__body { padding-left: 0; }
  .ggallery { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  .feats { grid-template-columns: 1fr; }
  .creatura { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .creatura .gtitle { justify-content: center; }
  .creatura .gtext { margin-inline: auto; }
  .wish { flex-direction: column; text-align: center; }
  .wish__title br { display: none; }
}
