html, body { margin: 0; height: 100%; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; }

/* Background: original Adobe Edge Animate composition cycled the bottom
   gradient stop through 6 pastel hues every 12s (decoded from the
   compiled intro_edge.js keyframe data: white stays fixed at the 60%
   stop, only the 100% stop color-cycles). Registering --bg-bottom as a
   <color> custom property is what makes the browser actually interpolate
   between the hues frame-by-frame instead of jump-cutting at each
   keyframe (animating the `background` shorthand directly does not
   reliably crossfade gradients across browsers). */
@property --bg-bottom {
  syntax: '<color>';
  inherits: false;
  initial-value: #efefba;
}
.intro-stage {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  overflow: hidden;
  --bg-bottom: #efefba;
  background: linear-gradient(180deg, #ffffff 0%, #ffffff 60%, var(--bg-bottom) 100%);
  animation: intro-bg-cycle 12s linear infinite;
  display: flex;
  align-items: center;
  justify-content: center;
}
@keyframes intro-bg-cycle {
  0%      { --bg-bottom: #efefba; }
  16.667% { --bg-bottom: #efbaba; }
  33.333% { --bg-bottom: #beefba; }
  50%     { --bg-bottom: #baeeef; }
  66.667% { --bg-bottom: #bebaef; }
  83.333% { --bg-bottom: #ecbaef; }
  100%    { --bg-bottom: #efefba; }
}

/* Logo: original bounced continuously (top: 0 -> -10px -> 0, 2s loop,
   starting ~2s after load) on top of a one-shot fade/scale entrance. */
.intro-logo-wrap {
  animation: intro-logo-float 2s ease-in-out 2s infinite;
}
@keyframes intro-logo-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.intro-logo {
  width: min(70vw, 550px);
  height: auto;
  opacity: 0;
  animation: intro-fade-in 900ms ease-out 200ms forwards;
}
@keyframes intro-fade-in {
  from { opacity: 0; transform: scale(0.92); }
  to { opacity: 1; transform: scale(1); }
}

.lang-switcher {
  position: absolute;
  top: 24px;
  right: 24px;
  display: flex;
  gap: 6px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
  opacity: 0;
  animation: intro-chrome-in 700ms ease-out 250ms forwards;
}
.lang-switcher button { border: none; background: none; padding: 4px; cursor: pointer; border-radius: 6px; line-height: 0; transition: transform 0.15s ease; }
.lang-switcher button:hover { transform: translateY(-2px); }
.lang-switcher button img { width: 40px; height: auto; }
.lang-switcher button.is-selected { outline: 2px solid #3b6fd6; transform: scale(1.08); }

/* Language-switch confirmation: original showed a text label ("Italiano" /
   "English", in the digitgraphics font, crimson rgba(200,35,80,1), ~70px)
   that scaled up and faded out ("burst") whenever a language was picked
   (Symbol_Selected_Language in the original composition), anchored
   bottom-right near the Enter button (right:150px / bottom:200px on the
   original stage), not near the flag switcher. */
.lang-confirm {
  position: absolute;
  right: clamp(90px, 20vw, 150px);
  bottom: clamp(120px, 26vw, 200px);
  font-family: 'digitgraphicsregular', -apple-system, sans-serif;
  font-weight: 400;
  font-size: clamp(2rem, 6vw, 4.375rem);
  text-align: left;
  color: rgba(200, 35, 80, 1);
  text-shadow: 0 0 16px rgba(142, 27, 27, 0.35);
  pointer-events: none;
  opacity: 0;
}
.lang-confirm.is-bursting {
  animation: lang-burst 1.1s ease-out;
}
@keyframes lang-burst {
  0%   { opacity: 0; transform: scale(0.6); }
  22%  { opacity: 1; transform: scale(1); }
  100% { opacity: 0; transform: scale(2.4); }
}

.enter-cta {
  position: absolute;
  right: clamp(16px, 5vw, 48px);
  bottom: clamp(16px, 5vw, 48px);
  width: clamp(90px, 14vw, 144px);
  height: clamp(90px, 14vw, 144px);
  cursor: pointer;
  border: none;
  background: none;
  padding: 0;
  opacity: 0;
  animation: intro-chrome-in 700ms ease-out 750ms forwards;
}
@keyframes intro-chrome-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Enter/Entra text: original rotated the curved text a full 360°, every
   6s, continuously — not a static curved image as first assumed. */
.enter-cta .enter-text-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transition: opacity 0.2s ease;
  animation: enter-text-spin 6s linear infinite;
}
@keyframes enter-text-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* Power icon: original only animated on hover (pop to 1.15x scale, back
   down on mouse-leave) — no continuous idle motion. */
.enter-cta .enter-power-img {
  position: absolute;
  width: 67.4%;
  height: 67.4%;
  top: 16.3%;
  left: 16.3%;
  border-radius: 50%;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), filter 0.2s ease;
}
.enter-cta:hover .enter-power-img { filter: brightness(1.08); transform: scale(1.15); }
.enter-cta:active .enter-power-img { filter: brightness(0.94); transform: scale(1.05); }

@media (max-width: 480px) {
  .lang-switcher { top: 14px; right: 14px; padding: 6px; }
  .lang-switcher button img { width: 30px; }
}

@media (prefers-reduced-motion: reduce) {
  .intro-stage, .intro-logo-wrap, .intro-logo, .enter-cta .enter-text-img,
  .lang-switcher, .enter-cta, .lang-confirm.is-bursting {
    animation: none;
    opacity: 1;
  }
}
