/* ==========================================================================
   TECNOWEB — BANNER "CHIAVETTA 007"
   Banner curato per le landing statiche /servizi/riparazione-pc-*
   (Battipaglia, Cava de' Tirreni, Pontecagnano Faiano).
   Collegato alla sezione #chiavetta-cybersecurity della pagina SPA /riparazione-pc.

   REGOLA §11.2 della guida: il contenuto è SEMPRE visibile anche senza JavaScript.
   Nessun `opacity:0` incondizionato: lo stato nascosto esiste SOLO se il JS ha già
   aggiunto `.tw-ck-anim` al contenitore. Se il JS non parte (crawler, errore,
   prefers-reduced-motion), l'utente vede comunque tutto, semplicemente senza animazione.

   Prefisso classi `tw-ck-` (TecnoWeb Chiavetta Key) per non collidere con nulla.
   ========================================================================== */

.tw-ck-banner {
  --tw-ck-x: 50%;
  --tw-ck-y: 0%;
  --tw-ck-accent: #34d399;
  --tw-ck-accent-deep: #047857;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  margin: 3.5rem 0;
  padding: 1px;
  border-radius: 1.9rem;
  background: linear-gradient(135deg, rgba(16, 185, 129, .62), rgba(6, 182, 212, .34) 46%, rgba(4, 120, 87, .66));
  box-shadow: 0 24px 62px rgba(16, 185, 129, .16), 0 0 0 1px rgba(255, 255, 255, .05);
}

/* Alone rotante sul bordo */
.tw-ck-banner::before {
  content: "";
  position: absolute;
  inset: -62%;
  z-index: -2;
  background: conic-gradient(from 20deg,
      transparent 0 30%,
      rgba(52, 211, 153, .38) 38%,
      transparent 46% 64%,
      rgba(34, 211, 238, .30) 72%,
      transparent 80% 100%);
  animation: twCkSpin 18s linear infinite;
}

/* Superficie interna + riflesso che segue il mouse */
.tw-ck-banner::after {
  content: "";
  position: absolute;
  inset: 1px;
  z-index: -1;
  border-radius: calc(1.9rem - 1px);
  background:
    radial-gradient(circle at var(--tw-ck-x) var(--tw-ck-y), rgba(52, 211, 153, .13), transparent 42%),
    radial-gradient(circle at 12% 16%, rgba(16, 185, 129, .13), transparent 30%),
    radial-gradient(circle at 88% 84%, rgba(6, 182, 212, .12), transparent 34%),
    linear-gradient(140deg, #03120e, #020806 55%, #04150f);
  transition: background-position .3s ease;
}

/* Linea di scansione: puramente decorativa, non nasconde nulla */
.tw-ck-scan {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 34%;
  z-index: 0;
  pointer-events: none;
  opacity: .0;
  background: linear-gradient(180deg, transparent, rgba(52, 211, 153, .10) 55%, transparent);
  animation: twCkScan 6.5s ease-in-out infinite;
}
.tw-ck-banner.tw-ck-in .tw-ck-scan { opacity: 1; transition: opacity .8s ease; }

.tw-ck-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 1.7rem;
  padding: 2.1rem 2.2rem;
  transition: opacity .55s ease, transform .55s ease;
}
/* Nascosto SOLO se il JS ha confermato di essere partito (§11.2) */
.tw-ck-banner.tw-ck-anim:not(.tw-ck-in) .tw-ck-inner {
  opacity: 0;
  transform: translateY(16px);
}

/* ---------------------------------- Visual ---------------------------------- */
.tw-ck-visual {
  position: relative;
  display: grid;
  place-items: center;
  width: 118px;
  flex: 0 0 auto;
}
.tw-ck-key {
  width: 96px;
  height: auto;
  filter: drop-shadow(0 10px 26px rgba(16, 185, 129, .35));
  animation: twCkFloat 5s ease-in-out infinite;
}
.tw-ck-led { animation: twCkLed 1.5s ease-in-out infinite; }
.tw-ck-mark {
  position: absolute;
  right: -6px;
  bottom: 4px;
  padding: .22rem .5rem;
  border-radius: .55rem;
  background: linear-gradient(120deg, var(--tw-ck-accent), var(--tw-ck-accent-deep));
  color: #022c22;
  font-family: 'Space Grotesk', system-ui, sans-serif;
  font-size: .68rem;
  font-weight: 900;
  letter-spacing: .16em;
  box-shadow: 0 6px 16px rgba(16, 185, 129, .4);
}

/* ----------------------------------- Copy ----------------------------------- */
.tw-ck-copy { min-width: 0; }

.tw-ck-badge {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  margin: 0 0 .7rem;
  padding: .32rem .78rem;
  border-radius: 999px;
  border: 1px solid rgba(110, 231, 183, .45);
  background: rgba(110, 231, 183, .12);
  color: #a7f3d0;
  font-size: .63rem;
  font-weight: 900;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.tw-ck-title {
  margin: 0 0 .7rem;
  color: #fff;
  font-size: clamp(1.2rem, 2.35vw, 1.72rem);
  font-weight: 900;
  line-height: 1.18;
  letter-spacing: -.01em;
}

.tw-ck-text {
  margin: 0 0 1rem;
  color: rgba(209, 250, 229, .87);
  font-size: .95rem;
  line-height: 1.75;
}

.tw-ck-features {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.tw-ck-features li {
  display: inline-flex;
  align-items: center;
  gap: .42rem;
  padding: .38rem .72rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .13);
  background: rgba(255, 255, 255, .055);
  color: #d1fae5;
  font-size: .74rem;
  font-weight: 700;
  line-height: 1.35;
}
.tw-ck-features li span { font-size: .9rem; }

/* ----------------------------------- Side ----------------------------------- */
.tw-ck-side {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: .7rem;
  min-width: 208px;
  text-align: center;
}

.tw-ck-price {
  display: flex;
  flex-direction: column;
  gap: .1rem;
  padding: .8rem .9rem;
  border-radius: 1.1rem;
  border: 1px solid rgba(110, 231, 183, .3);
  background: linear-gradient(150deg, rgba(16, 185, 129, .16), rgba(2, 12, 9, .7));
}
.tw-ck-price-num {
  color: #fff;
  font-family: 'Space Grotesk', system-ui, sans-serif;
  font-size: 1.85rem;
  font-weight: 900;
  line-height: 1;
}
.tw-ck-price-note {
  color: rgba(167, 243, 208, .85);
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.tw-ck-cta {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  overflow: hidden;
  padding: .95rem 1.25rem;
  border-radius: 999px;
  background: linear-gradient(120deg, var(--tw-ck-accent), var(--tw-ck-accent-deep));
  color: #022c22;
  text-decoration: none;
  font-size: .76rem;
  font-weight: 950;
  letter-spacing: .06em;
  text-transform: uppercase;
  box-shadow: 0 12px 30px rgba(16, 185, 129, .32);
  transition: transform .25s ease, box-shadow .25s ease, background .25s ease;
}
.tw-ck-cta svg { width: 17px; height: 17px; flex: 0 0 auto; }
/* Riflesso che attraversa il bottone: parte solo se il JS è attivo */
.tw-ck-cta::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: -60%;
  width: 45%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .55), transparent);
  transform: skewX(-18deg);
}
.tw-ck-banner.tw-ck-in .tw-ck-cta::after { animation: twCkShine 4.6s ease-in-out infinite; }
.tw-ck-cta:hover { transform: translateY(-3px); box-shadow: 0 18px 36px rgba(16, 185, 129, .45); }
.tw-ck-cta:focus-visible { outline: 3px solid #a7f3d0; outline-offset: 3px; }

.tw-ck-note {
  color: rgba(209, 250, 229, .62);
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .03em;
}

/* --------------------------------- Keyframes -------------------------------- */
@keyframes twCkSpin { to { transform: rotate(360deg); } }
@keyframes twCkFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-7px); } }
@keyframes twCkLed { 0%, 100% { opacity: 1; } 50% { opacity: .28; } }
@keyframes twCkScan { 0%, 100% { transform: translateY(-40%); } 50% { transform: translateY(230%); } }
@keyframes twCkShine { 0%, 62% { left: -60%; } 82%, 100% { left: 125%; } }

/* -------------------------------- Responsive -------------------------------- */
@media (max-width: 980px) {
  .tw-ck-inner { grid-template-columns: auto minmax(0, 1fr); }
  .tw-ck-side { grid-column: 1 / -1; min-width: 0; }
}

@media (max-width: 700px) {
  .tw-ck-inner {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
    gap: 1.3rem;
    padding: 1.7rem 1.25rem;
  }
  .tw-ck-visual { width: auto; }
  .tw-ck-features { justify-content: center; }
  .tw-ck-side { width: 100%; }
  .tw-ck-cta { width: 100%; white-space: normal; line-height: 1.35; }
  .tw-ck-title { font-size: 1.22rem; }
}

/* Con "riduci animazioni" attivo: tutto fermo, ma SEMPRE leggibile per intero */
@media (prefers-reduced-motion: reduce) {
  .tw-ck-banner::before,
  .tw-ck-key,
  .tw-ck-led,
  .tw-ck-scan,
  .tw-ck-cta::after { animation: none !important; }
  .tw-ck-banner .tw-ck-inner { opacity: 1 !important; transform: none !important; }
}
