/* Ecosistema Nowtech — release v11: hero dinamica */

.sr-only {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.hero {
  overflow: hidden;
  background:
    radial-gradient(circle at 2% 2%, rgba(70, 198, 221, .18), transparent 28%),
    radial-gradient(circle at 94% 15%, rgba(8, 117, 225, .14), transparent 32%),
    linear-gradient(125deg, #fbfdff 0%, #f4f9fc 54%, #eaf6fb 100%) !important;
}

.hero-grid { grid-template-columns: minmax(0, 1.06fr) minmax(420px, .94fr); gap: clamp(42px, 5vw, 76px); }
.hero-copy { max-width: 690px; }
.hero-copy h1 { max-width: 670px; font-size: clamp(3.35rem, 5.35vw, 5rem); }
.hero-copy h1 span {
  display: inline-block;
  background: linear-gradient(110deg, var(--blue-700), #08a7d5 70%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent !important;
}
.hero-lead { max-width: 610px; font-size: clamp(1.15rem, 1.6vw, 1.36rem); }

.hero-cinema {
  position: relative;
  min-height: 550px;
  margin: 0;
  isolation: isolate;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.78);
  border-radius: 32px;
  background: #d7e4eb url("assets/hero-tecnologia-poster.jpg") center/cover no-repeat;
  box-shadow: 0 34px 78px rgba(7, 43, 76, .21), 0 0 0 9px rgba(255,255,255,.44);
}

.hero-cinema::before {
  content: "";
  position: absolute;
  z-index: 4;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.32);
}

.hero-cinema video {
  position: absolute;
  z-index: 0;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-cinema__shade {
  position: absolute;
  z-index: 1;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(7,27,51,.08) 15%, transparent 44%, rgba(7,27,51,.7) 100%),
    linear-gradient(90deg, rgba(7,27,51,.12), transparent 45%);
}

.hero-cinema__network { position: absolute; z-index: 2; inset: 0; pointer-events: none; opacity: .88; }
.network-line {
  position: absolute;
  height: 1px;
  transform-origin: left center;
  background: linear-gradient(90deg, transparent, rgba(117,229,255,.95), transparent);
  filter: drop-shadow(0 0 7px rgba(70,198,221,.8));
  animation: networkPulse 3.2s ease-in-out infinite;
}
.network-line--a { width: 54%; left: 10%; top: 38%; transform: rotate(15deg); }
.network-line--b { width: 43%; left: 48%; top: 27%; transform: rotate(67deg); animation-delay: -1.4s; }
.network-node {
  position: absolute;
  width: 10px;
  height: 10px;
  border: 2px solid rgba(255,255,255,.95);
  border-radius: 50%;
  background: #0fa9d8;
  box-shadow: 0 0 0 0 rgba(70,198,221,.6);
  animation: nodePulse 2.4s ease-out infinite;
}
.network-node--a { left: 20%; top: 39%; }
.network-node--b { right: 34%; top: 48%; animation-delay: -.8s; }
.network-node--c { right: 18%; top: 67%; animation-delay: -1.6s; }

.motion-chip {
  position: absolute;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 154px;
  padding: 11px 14px;
  border: 1px solid rgba(255,255,255,.58);
  border-radius: 15px;
  color: #fff;
  background: rgba(7,27,51,.7);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  box-shadow: 0 12px 28px rgba(7,27,51,.18);
  animation: chipFloat 5s ease-in-out infinite;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.motion-chip svg { width: 24px; height: 24px; fill: none; stroke: #79e4f6; stroke-width: 1.8; flex: 0 0 auto; }
.motion-chip span { display: grid; line-height: 1.15; }
.motion-chip small { color: #aeeef8; font-size: .68rem; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; }
.motion-chip strong { color: #fff; font-size: .86rem; }
.motion-chip:hover,
.motion-chip:focus-visible,
.motion-chip.is-active {
  border-color: rgba(255,255,255,.95);
  background: rgba(8,117,225,.9);
  box-shadow: 0 16px 34px rgba(7,27,51,.28), 0 0 0 4px rgba(121,228,246,.18);
}
.motion-chip:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
.motion-chip--security { left: 18px; top: 22px; }
.motion-chip--cloud { right: 18px; top: 104px; animation-delay: -1.7s; }
.motion-chip--continuity { left: 20px; bottom: 106px; animation-delay: -3.1s; }
.live-dot { width: 11px; height: 11px; border-radius: 50%; background: #63e3a5; box-shadow: 0 0 0 5px rgba(99,227,165,.16); }

/* Soluzioni Nowtech: pillole più leggere, in movimento attorno al team */
.product-chip {
  position: absolute;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 13px;
  border: 1px solid rgba(137, 231, 248, .52);
  border-radius: 999px;
  color: #fff;
  background: rgba(8, 65, 103, .78);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  box-shadow: 0 12px 26px rgba(7, 27, 51, .19);
  text-decoration: none;
  transform-origin: center;
  animation: productSway 5.8s ease-in-out infinite;
}
.product-chip:hover,
.product-chip:focus-visible,
.product-chip.is-active {
  color: #fff;
  background: rgba(8, 117, 225, .92);
  border-color: rgba(255, 255, 255, .82);
}
.product-chip:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
.product-chip strong { color: inherit; font-size: .8rem; letter-spacing: .015em; }
.product-chip__signal {
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #79e4f6;
  box-shadow: 0 0 0 4px rgba(121, 228, 246, .15);
}
.product-chip.is-active .product-chip__signal,
.motion-chip.is-active .live-dot {
  animation: storySignal 1.25s ease-out infinite;
}
.product-chip--pbx { right: 18px; top: 205px; animation-delay: -.7s; }
.product-chip--webtop { left: 22px; top: 184px; animation-delay: -2.6s; animation-name: productSwayReverse; }
.product-chip--percorso { right: 18px; bottom: 116px; animation-delay: -4.2s; }

.hero-cinema__caption {
  position: absolute;
  z-index: 3;
  left: 24px;
  right: 68px;
  bottom: 25px;
  display: grid;
  gap: 2px;
  color: #fff;
}
.hero-cinema__caption small { color: #b9edf7; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.hero-cinema__caption strong { color: #fff; font-size: clamp(1rem, 1.5vw, 1.18rem); }
.hero-cinema__caption.is-changing { animation: storyReveal .32s ease both; }

.motion-toggle {
  position: absolute;
  z-index: 5;
  right: 20px;
  bottom: 22px;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255,255,255,.62);
  border-radius: 50%;
  color: #fff;
  background: rgba(7,27,51,.72);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  cursor: pointer;
}
.motion-toggle:hover { background: rgba(8,117,225,.92); }
.motion-toggle__pause { width: 11px; height: 15px; border-inline: 3px solid currentColor; }
.motion-toggle__play { display: none; width: 0; height: 0; margin-left: 3px; border-block: 8px solid transparent; border-left: 12px solid currentColor; }
.hero-cinema.is-paused .motion-toggle__pause { display: none; }
.hero-cinema.is-paused .motion-toggle__play { display: block; }
.hero-cinema.is-paused :is(.network-line,.network-node,.motion-chip,.product-chip) { animation-play-state: paused; }

@keyframes networkPulse { 0%,100% { opacity: .18; } 45%,65% { opacity: .95; } }
@keyframes nodePulse { 0% { box-shadow: 0 0 0 0 rgba(70,198,221,.62); } 70%,100% { box-shadow: 0 0 0 15px rgba(70,198,221,0); } }
@keyframes chipFloat { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-7px); } }
@keyframes productSway {
  0%,100% { transform: translateY(0) rotate(-2deg); }
  50% { transform: translateY(-6px) rotate(2deg); }
}
@keyframes productSwayReverse {
  0%,100% { transform: translateY(-4px) rotate(2deg); }
  50% { transform: translateY(2px) rotate(-2deg); }
}
@keyframes storyReveal {
  from { opacity: .35; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes storySignal {
  0% { box-shadow: 0 0 0 0 rgba(121,228,246,.72); }
  75%,100% { box-shadow: 0 0 0 10px rgba(121,228,246,0); }
}

@media (max-width: 1100px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr) minmax(380px, .82fr); gap: 34px; }
  .hero-cinema { min-height: 500px; }
  .motion-chip { min-width: 142px; padding: 9px 11px; }
}

@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-copy { max-width: 720px; }
  .hero-cinema { min-height: 520px; }
}

@media (max-width: 767px) {
  .hero { min-height: auto; }
  .hero-grid { grid-template-columns: 1fr; gap: 36px; }
  .hero-copy h1 { font-size: clamp(2.7rem, 12vw, 3.45rem); }
  .hero-actions .button { width: 100%; justify-content: center; }
  .hero-cinema { min-height: 430px; border-radius: 24px; box-shadow: 0 24px 52px rgba(7,43,76,.18), 0 0 0 6px rgba(255,255,255,.46); }
  .motion-chip { min-width: 0; max-width: 158px; }
  .motion-chip--security { left: 12px; top: 15px; }
  .motion-chip--cloud { right: 12px; top: 88px; }
  .motion-chip--continuity { left: 12px; bottom: 94px; }
  .product-chip { padding: 7px 10px; }
  .product-chip strong { font-size: .72rem; }
  .product-chip--webtop { left: 12px; top: 152px; }
  .product-chip--pbx { right: 12px; top: 204px; }
  .product-chip--percorso { right: 12px; bottom: 94px; }
  .hero-cinema__caption { left: 17px; right: 58px; bottom: 18px; }
  .motion-toggle { right: 14px; bottom: 15px; }
}

@media (prefers-reduced-motion: reduce) {
  .hero-cinema video { display: none; }
  .hero-cinema :is(.network-line,.network-node,.motion-chip,.product-chip,.product-chip__signal,.live-dot,.hero-cinema__caption) { animation: none !important; }
  .hero-cinema__network { opacity: .45; }
  .motion-toggle { display: none; }
}

.hero-cinema.motion-disabled video { display: none; }
.hero-cinema.motion-disabled :is(.network-line,.network-node,.motion-chip,.product-chip) { animation: none; }
.hero-cinema.motion-disabled .motion-toggle { display: none; }
