/* La composizione originale resta invariata sui monitor grandi. */
.app-menu a:first-child img {
  transform: scale(1.08);
  transform-origin: center;
}

.hero-scroll-hint { display: none; }

.iharmony-card {
  background: linear-gradient(145deg, #c980e8, #9e4dce);
  color: #fff;
}

.iguitar-card {
  grid-column: 1 / -1;
  background: linear-gradient(145deg, #d98b8f, #a94e55);
  color: #fff;
}

.app-grid { grid-template-columns: repeat(2, 1fr); }
.app-grid .imelody-card { grid-column: auto; }

@media (min-width: 1181px) {
  .hero-composition .hero-app {
    width: 420px;
    height: 164px;
  }

  .hero-composition .hero-app:hover,
  .hero-composition .hero-app:focus-visible { z-index: 10; }

  .hero-metro {
    top: 1%;
    right: 6%;
    transform: rotate(4deg);
    z-index: 1;
  }

  .hero-iharmony {
    top: 7%;
    left: 4%;
    transform: rotate(-4deg);
    z-index: 1;
  }

  .hero-guitar {
    top: 29%;
    left: 50%;
    right: auto;
    transform: translateX(-50%) rotate(-1.5deg);
    z-index: 3;
  }

  .hero-guitar:hover,
  .hero-guitar:focus-visible {
    transform: translateX(-50%) translateY(-7px) rotate(0);
  }

  .hero-irhythm {
    left: 5%;
    top: 51%;
    bottom: auto;
    transform: rotate(-3.5deg);
    z-index: 3;
  }

  .hero-imelody {
    left: auto;
    right: 5%;
    top: 55%;
    bottom: auto;
    transform: rotate(3deg);
    z-index: 3;
  }
}

@media (max-width: 1180px) {
  .portal-hero {
    grid-template-columns: minmax(0, 1fr);
    gap: 54px;
    padding-top: 76px;
    padding-right: 0;
    padding-bottom: 58px;
  }

  .portal-hero .hero-copy {
    width: min(680px, calc(100vw - 10vw));
    padding-right: 5vw;
  }

  .hero-composition {
    width: 100%;
    height: auto;
    display: flex;
    align-items: stretch;
    justify-content: flex-start;
    gap: 20px;
    padding: 42px 5vw 38px 0;
    overflow-x: auto;
    overflow-y: visible;
    scroll-snap-type: x mandatory;
    scroll-padding-left: 0;
    overscroll-behavior-inline: contain;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: #65d8eb66 transparent;
  }

  .hero-scroll-hint {
    position: absolute;
    top: 0;
    left: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    color: #a9bbc1;
    font-size: 12px;
    font-weight: 750;
    letter-spacing: .08em;
    text-transform: uppercase;
    white-space: nowrap;
  }

  .hero-scroll-hint span {
    color: var(--cyan);
    font-size: 22px;
    line-height: 1;
    animation: scroll-cue 1.35s ease-in-out infinite;
  }

  .hero-composition::-webkit-scrollbar { height: 4px; }
  .hero-composition::-webkit-scrollbar-track { background: transparent; }
  .hero-composition::-webkit-scrollbar-thumb {
    background: #65d8eb66;
    border-radius: 99px;
  }

  .hero-composition .orbit { display: none; }

  .hero-composition .hero-app,
  .hero-composition .hero-app:hover {
    position: relative;
    inset: auto;
    flex: 0 0 min(390px, 72vw);
    min-height: 154px;
    transform: none;
    scroll-snap-align: start;
    scroll-snap-stop: always;
  }

  .hero-composition .hero-app:hover,
  .hero-composition .hero-app:focus-visible {
    transform: translateY(-6px);
    box-shadow: 0 34px 85px #0009;
  }
}

@media (max-width: 800px) {
  .iguitar-card { grid-column: auto; }
}

@media (max-width: 800px) {
  .portal-hero {
    padding: 62px 0 46px 20px;
    gap: 38px;
  }

  .portal-hero .hero-copy {
    width: 100%;
    padding-right: 20px;
  }

  .hero-composition {
    height: auto;
    gap: 14px;
    padding: 40px 20px 30px 0;
  }

  .hero-composition .hero-app,
  .hero-composition .hero-app:hover {
    flex-basis: min(330px, 82vw);
    min-height: 112px;
    padding: 12px;
    gap: 13px;
    border-radius: 19px;
  }

  .hero-composition .hero-app img {
    width: 88px;
    height: 88px;
    flex: 0 0 88px;
    border-radius: 20px;
  }

  .hero-composition .hero-app span { min-width: 0; }
  .hero-composition .hero-app small { font-size: 8px; }
  .hero-composition .hero-app strong {
    font-size: clamp(17px, 5.2vw, 21px);
    overflow-wrap: anywhere;
  }
}

/* Su iPhone le schede fotografiche devono occupare tutta la riga: la griglia
   a due colonne rendeva titoli e descrizioni troppo stretti. */
@media (max-width: 640px) {
  .app-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .app-grid .app-card,
  .app-grid .imelody-card,
  .app-grid .iguitar-card {
    grid-column: auto;
    width: 100%;
    min-width: 0;
    min-height: 590px;
    padding: 28px;
  }

  .app-grid .card-copy h3 {
    font-size: clamp(40px, 12vw, 50px);
    overflow-wrap: normal;
  }

  .app-grid .card-copy span {
    max-width: 30rem;
    font-size: 18px;
    line-height: 1.55;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-composition { scroll-behavior: auto; }
  .hero-composition .hero-app { transition: none; }
  .hero-scroll-hint span { animation: none; }
}

@keyframes scroll-cue {
  0%, 100% { transform: translateX(0); opacity: .65; }
  50% { transform: translateX(7px); opacity: 1; }
}
