/* ==========================================================================
   ES POLISH v2.3 — 2026-09-10 — electronicsolution.computer
   Rifinitura ADDITIVA di design e micro-animazioni sul tema v2.2.0.
   Nessun elemento aggiunto, rimosso o spostato. Regole prefissate con `body`
   per prevalere sul CSS aggiuntivo del Customizer a parita' di selettore.
   Vincoli CEO rispettati: testi e pulsanti ORO, rosso solo nei dettagli gia'
   esistenti (bordo/glow card, focus campi), hero non toccato, niente loop.
   Rollback: eliminare questo file (enqueue condizionato a file_exists).
   ========================================================================== */

/* 1. Tipografia */
body h1,
body h2,
body h3,
body .hero__title,
body .section-header__title,
body .service-card__title,
body .case-card__title {
	text-wrap: balance;
}
body p,
body .hero__subtitle,
body .section-header__description,
body .service-card__description,
body .case-card__description {
	text-wrap: pretty;
}
body [data-count],
body .stat__number,
body .hero__stat-number {
	font-variant-numeric: tabular-nums;
}

/* 2. Pulsanti: easing per proprieta' (era "all"), stato premuto, focus coerente */
body .btn {
	transition:
		transform .3s cubic-bezier(.16, 1, .3, 1),
		box-shadow .3s cubic-bezier(.16, 1, .3, 1),
		background-color .25s ease,
		color .25s ease,
		border-color .25s ease;
}
body .btn:active {
	transform: translateY(0) scale(.97);
	transition-duration: .08s;
}
body .btn:focus-visible,
body .navbar__link:focus-visible,
body .service-card__link:focus-visible {
	outline: 2px solid var(--gold, #C5A059);
	outline-offset: 3px;
}

/* 3. Card servizi: icona che sale e si accende, titolo oro chiaro (testi oro = regola),
      il rosso resta confinato al bordo/glow gia' previsto dal tema */
body .service-card__icon-wrapper {
	transition: transform .3s cubic-bezier(.16, 1, .3, 1), background-color .3s ease;
}
body .service-card:hover .service-card__icon-wrapper {
	transform: translateY(-3px);
	background: rgba(197, 160, 89, .16);
}
body .service-card__title {
	transition: color .25s ease;
}
body .service-card:hover .service-card__title {
	color: var(--gold-light, #d4b477);
}
body .service-card__link {
	transition: gap .25s cubic-bezier(.16, 1, .3, 1), color .2s ease;
}

/* 4. Stagger completo della griglia 3x3 (il tema ne prevede solo 4) */
@media (prefers-reduced-motion: no-preference) {
	body .reveal-stagger > .reveal:nth-child(5) { transition-delay: .55s; }
	body .reveal-stagger > .reveal:nth-child(6) { transition-delay: .65s; }
	body .reveal-stagger > .reveal:nth-child(7) { transition-delay: .75s; }
	body .reveal-stagger > .reveal:nth-child(8) { transition-delay: .85s; }
	body .reveal-stagger > .reveal:nth-child(9) { transition-delay: .95s; }
}

/* 5. Card portfolio: curva hover morbida */
body .case-card {
	transition:
		transform .35s cubic-bezier(.16, 1, .3, 1),
		box-shadow .35s ease,
		border-color .35s ease;
}

/* 6. Footer: sottolineatura che scorre sui link */
body .es-footer a:not(.btn) {
	background-image: linear-gradient(currentColor, currentColor);
	background-size: 0 1px;
	background-repeat: no-repeat;
	background-position: 0 100%;
	transition: background-size .25s cubic-bezier(.16, 1, .3, 1), color .2s ease;
}
body .es-footer a:not(.btn):hover {
	background-size: 100% 1px;
}

/* 7. Form: transizione morbida su focus (il colore resta quello del tema) */
body .contact__input,
body .wpcf7-form-control:not(.wpcf7-submit) {
	transition: border-color .2s ease, box-shadow .2s ease, background-color .2s ease;
}

/* 8. Ancore: le sezioni atterrano sotto l'header fisso */
body section[id] {
	scroll-margin-top: 90px;
}

/* 9. Prestazioni: rilascio di will-change dopo il reveal */
body .reveal.revealed {
	will-change: auto;
}

/* 10. Selezione testo coerente con il brand */
body ::selection {
	background: #C5A059;
	color: #0B0C10;
}

/* 11. Movimento ridotto */
@media (prefers-reduced-motion: reduce) {
	body .btn:active,
	body .service-card:hover .service-card__icon-wrapper {
		transform: none;
	}
	body .es-footer a:not(.btn) {
		transition: color .2s ease;
	}
}
