/*
Theme Name: Stefa
Theme URI: https://www.stefa.it
Author: App Native Italia
Description: Tema su misura per Stefa Impianti Elettrici Srl. Leggero, senza page builder, bilingue con Polylang. Richiede il plugin Stefa Core (mu-plugin).
Version: 2.0.0
Requires at least: 6.4
Requires PHP: 7.4
Text Domain: stefa
*/

/* ==========================================================================
   Font e variabili
   ========================================================================== */

@font-face { font-family: "Archivo"; src: url("assets/fonts/archivo.woff2") format("woff2"); font-weight: 100 900; font-stretch: 62% 125%; font-display: swap; }
@font-face { font-family: "Manrope"; src: url("assets/fonts/manrope.woff2") format("woff2"); font-weight: 200 800; font-display: swap; }
@font-face { font-family: "Stefa Mono"; src: url("assets/fonts/mono.woff2") format("woff2"); font-weight: 500; font-display: swap; }

:root {
	--red: #b32025;
	--red-dark: #8e181c;
	--red-light: #e0383d;
	--ink: #0d0e10;
	--ink-2: #15171a;
	--ink-3: #202327;
	--grey: #6d7278;
	--grey-light: #a4a9ae;
	--line: #dedcd6;
	--line-dark: rgba(255, 255, 255, .12);
	--paper: #ffffff;
	--paper-2: #f4f3ef;
	--accent: var(--red);

	--display: "Archivo", "Arial Black", sans-serif;
	--body: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
	--mono: "Stefa Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

	--wrap: 1320px;
	--gutter: clamp(20px, 4.5vw, 64px);
	--section: clamp(80px, 11vw, 160px);
	--topbar-h: 40px;
	--bar-h: 84px;
	--ease: cubic-bezier(.2, .7, .1, 1);
}

/* ==========================================================================
   Base
   ========================================================================== */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 90px; }
body {
	margin: 0; font-family: var(--body); font-size: 17px; line-height: 1.7; color: var(--ink);
	background: var(--paper); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; overflow-x: clip;
}
img, svg { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration-color: var(--accent); text-underline-offset: 4px; text-decoration-thickness: 1px; }
a:hover { color: var(--accent); }
::selection { background: var(--red); color: #fff; }
:focus-visible { outline: 2px solid var(--red-light); outline-offset: 3px; }

.screen-reader-text, .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;
}
.skip-link:focus { position: fixed; top: 12px; left: 12px; z-index: 200; width: auto; height: auto; clip: auto; padding: 12px 18px; background: #fff; color: var(--ink); }

h1, h2, h3, h4 {
	font-family: var(--display); font-stretch: 112%; font-weight: 800; line-height: 1.02;
	letter-spacing: -.015em; text-transform: uppercase; margin: 0 0 .6em;
}
h1 { font-size: clamp(2.6rem, 6vw, 6rem); }
h2 { font-size: clamp(2rem, 4.2vw, 3.7rem); }
h3 { font-size: clamp(1.05rem, 1.4vw, 1.25rem); font-weight: 700; letter-spacing: .01em; line-height: 1.2; }
h4 { font-size: 1rem; }
h1 em, h2 em, h3 em { font-style: normal; color: var(--accent); }
p { margin: 0 0 1.2em; }
strong { font-weight: 700; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.icon { width: 1.1em; height: 1.1em; flex-shrink: 0; }

/* Linee verticali della griglia, come in un disegno tecnico */
.grid-lines {
	position: fixed; inset: 0; z-index: 40; pointer-events: none;
	max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter);
	display: flex; justify-content: space-between; mix-blend-mode: difference;
}
.grid-lines span { width: 1px; height: 100%; background: rgba(255, 255, 255, .06); }
@media (max-width: 760px) { .grid-lines span:nth-child(2), .grid-lines span:nth-child(4) { display: none; } }

/* ==========================================================================
   Etichette e testi
   ========================================================================== */

.eyebrow {
	display: flex; align-items: center; gap: 14px; margin: 0 0 22px;
	font-family: var(--mono); font-size: 12px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--accent);
}
.eyebrow::before { content: ""; width: 28px; height: 1px; background: currentColor; flex-shrink: 0; }
.eyebrow--light { color: #fff; }
.eyebrow--light::before { background: var(--red-light); }

.lead { font-size: clamp(1.15rem, 1.6vw, 1.38rem); line-height: 1.5; font-weight: 500; }
.muted { color: var(--grey); }
.statement {
	font-family: var(--display); font-stretch: 112%; font-weight: 300; text-transform: uppercase;
	font-size: clamp(1.7rem, 3.4vw, 3rem); line-height: 1.08; letter-spacing: -.01em;
}
.statement strong { font-weight: 800; color: var(--accent); }
.mono { font-family: var(--mono); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; }

/* ==========================================================================
   Pulsanti
   ========================================================================== */

.btn, .wp-block-button__link {
	position: relative; display: inline-flex; align-items: center; gap: 14px; overflow: hidden; isolation: isolate;
	padding: 17px 28px; border: 1px solid var(--red); border-radius: 0; background: var(--red); color: #fff;
	font-family: var(--body); font-size: 13px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
	text-decoration: none; cursor: pointer; transition: color .35s var(--ease), border-color .35s var(--ease);
}
.btn::before, .wp-block-button__link::before {
	content: ""; position: absolute; inset: 0; z-index: -1; background: var(--ink);
	transform: scaleX(0); transform-origin: right; transition: transform .45s var(--ease);
}
.btn:hover, .wp-block-button__link:hover { color: #fff; border-color: var(--ink); }
.btn:hover::before, .wp-block-button__link:hover::before { transform: scaleX(1); transform-origin: left; }
.btn .icon { transition: transform .35s var(--ease); }
.btn:hover .icon { transform: translateX(4px); }
.btn--small { padding: 12px 18px; font-size: 12px; }
.btn--ghost, .is-style-outline .wp-block-button__link { background: transparent; border-color: currentColor; color: inherit; }
.btn--ghost::before, .is-style-outline .wp-block-button__link::before { background: var(--red); }
.btn--ghost:hover, .is-style-outline .wp-block-button__link:hover { border-color: var(--red); }
.section--dark .wp-block-button:not(.is-style-outline) .wp-block-button__link:hover, .hero .btn:not(.btn--ghost):hover { border-color: #fff; color: var(--ink); }
.section--dark .wp-block-button:not(.is-style-outline) .wp-block-button__link::before, .hero .btn:not(.btn--ghost)::before { background: #fff; }
.wp-block-buttons { display: flex; flex-wrap: wrap; gap: 14px; margin: 2.2em 0 0; }

/* ==========================================================================
   Intestazione
   ========================================================================== */

.site-header {
	position: fixed; inset: 0 0 auto; z-index: 60; color: #fff;
	transition: transform .5s var(--ease), background-color .4s ease, border-color .4s ease;
	border-bottom: 1px solid transparent;
}
.site-header.is-scrolled { background: rgba(13, 14, 16, .88); -webkit-backdrop-filter: blur(16px) saturate(140%); backdrop-filter: blur(16px) saturate(140%); border-color: var(--line-dark); }
.site-header.is-hidden:not(.is-open) { transform: translateY(-100%); }

.topbar { height: var(--topbar-h); overflow: hidden; border-bottom: 1px solid var(--line-dark); transition: height .4s var(--ease), opacity .3s; }
.is-scrolled .topbar { height: 0; opacity: 0; border-color: transparent; }
.topbar__inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; height: var(--topbar-h); font-family: var(--mono); font-size: 11.5px; letter-spacing: .1em; text-transform: uppercase; color: rgba(255, 255, 255, .7); }
.topbar__claim { display: flex; align-items: center; gap: 10px; margin: 0; }
.dot { width: 6px; height: 6px; border-radius: 50%; background: var(--red-light); box-shadow: 0 0 0 0 rgba(224, 56, 61, .6); animation: dot 2.4s infinite; }
@keyframes dot { 70% { box-shadow: 0 0 0 8px rgba(224, 56, 61, 0); } 100% { box-shadow: 0 0 0 0 rgba(224, 56, 61, 0); } }
.topbar__links { display: flex; align-items: center; gap: 26px; }
.topbar__links a { text-decoration: none; transition: color .2s; }
.topbar__links a:hover { color: #fff; }
.topbar__links .icon { width: 16px; height: 16px; }

.lang-switch { display: flex; align-items: center; gap: 2px; font-family: var(--mono); font-size: 11.5px; letter-spacing: .1em; }
.lang-switch a { padding: 4px 7px; text-decoration: none; color: rgba(255, 255, 255, .5); border: 1px solid transparent; }
.lang-switch a[aria-current="true"] { color: #fff; border-color: var(--line-dark); }
.lang-switch a:hover { color: #fff; }

.mainbar { position: relative; }
.mainbar__inner { display: flex; align-items: center; gap: 40px; height: var(--bar-h); transition: height .4s var(--ease); }
.is-scrolled .mainbar__inner { height: 70px; }
.site-logo { display: block; flex-shrink: 0; margin-right: auto; transition: opacity .4s ease; }
.site-logo img { width: auto; height: 46px; transition: height .4s var(--ease); }
.is-scrolled .site-logo img { height: 38px; }

.site-nav { display: flex; align-items: center; }
.site-nav ul { list-style: none; margin: 0; padding: 0; }
.menu { display: flex; gap: 36px; }
.menu > li > a {
	position: relative; display: flex; align-items: center; gap: 6px; padding: 10px 0;
	font-size: 13px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; text-decoration: none; color: rgba(255, 255, 255, .82);
	transition: color .2s;
}
.menu > li > a .icon { width: 14px; height: 14px; transition: transform .3s var(--ease); }
.menu > li > a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 2px; height: 1px; background: var(--red-light); transform: scaleX(0); transform-origin: right; transition: transform .4s var(--ease); }
.menu > li > a:hover, .menu > .current-menu-item > a, .menu > .current-menu-ancestor > a, .menu > .current-page-ancestor > a { color: #fff; }
.menu > li > a:hover::after, .menu > .current-menu-item > a::after, .menu > .current-menu-ancestor > a::after, .menu > .current-page-ancestor > a::after { transform: scaleX(1); transform-origin: left; }
.menu > li:hover > a .icon { transform: rotate(180deg); }

.header-cta .icon { width: 16px; height: 16px; }
.site-nav__mobile { display: none; }

/* Mega-menu dei servizi */
.mega {
	position: absolute; left: 0; right: 0; top: 100%; background: var(--ink-2); border-top: 1px solid var(--line-dark); border-bottom: 1px solid var(--line-dark);
	opacity: 0; visibility: hidden; transform: translateY(-6px); transition: opacity .3s ease, transform .4s var(--ease), visibility .3s;
}
@media (min-width: 1181px) {
	.menu > li:hover > .mega, .menu > li:focus-within > .mega { opacity: 1; visibility: visible; transform: none; }
}
.mega__inner { display: grid; grid-template-columns: 1fr 2fr; gap: 48px; max-width: var(--wrap); margin: 0 auto; padding: 44px var(--gutter) 52px; }
.mega__eyebrow { margin: 0 0 14px; font-family: var(--mono); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--red-light); }
.mega__text { margin: 0 0 22px; color: rgba(255, 255, 255, .7); font-size: 15px; line-height: 1.6; max-width: 34ch; }
.mega__all { display: inline-flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; text-decoration: none; }
.mega__all .icon { width: 16px; transition: transform .3s var(--ease); }
.mega__all:hover { color: #fff; }
.mega__all:hover .icon { transform: translateX(4px); }
.mega .sub-menu { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--line-dark); border: 1px solid var(--line-dark); }
.mega__card { position: relative; display: flex; flex-direction: column; gap: 10px; height: 100%; padding: 30px 30px 64px; background: var(--ink-2); text-decoration: none; transition: background-color .3s ease; }
.mega__card:hover { background: var(--ink-3); color: #fff; }
.mega__idx { font-family: var(--mono); font-size: 12px; color: var(--red-light); letter-spacing: .1em; }
.mega__title { font-family: var(--display); font-stretch: 112%; font-weight: 700; font-size: 1.15rem; line-height: 1.2; text-transform: uppercase; }
.mega__desc { font-size: 14px; line-height: 1.55; color: rgba(255, 255, 255, .6); }
.mega__go { position: absolute; right: 26px; bottom: 24px; width: 38px; height: 38px; display: grid; place-items: center; border: 1px solid var(--line-dark); border-radius: 50%; transition: background-color .3s, border-color .3s, transform .3s var(--ease); }
.mega__go .icon { width: 16px; }
.mega__card:hover .mega__go { background: var(--red); border-color: var(--red); transform: translateX(4px); }

/* Pulsante del menu mobile */
.nav-toggle { display: none; align-items: center; gap: 12px; padding: 8px 0; border: 0; background: none; color: #fff; cursor: pointer; font-family: var(--mono); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; }
.nav-toggle__icon { position: relative; width: 26px; height: 10px; }
.nav-toggle__icon::before, .nav-toggle__icon::after { content: ""; position: absolute; left: 0; width: 100%; height: 1.5px; background: currentColor; transition: transform .4s var(--ease), top .4s var(--ease), width .4s var(--ease); }
.nav-toggle__icon::before { top: 0; }
.nav-toggle__icon::after { top: 8px; width: 70%; left: auto; right: 0; }
.is-open .nav-toggle__icon::before { top: 4px; transform: rotate(45deg); }
.is-open .nav-toggle__icon::after { top: 4px; width: 100%; transform: rotate(-45deg); }

@media (max-width: 1180px) {
	.nav-toggle { display: inline-flex; }
	.mainbar__inner { gap: 24px; }
	.site-nav {
		position: fixed; inset: 0; z-index: -1; flex-direction: column; align-items: stretch; justify-content: space-between; gap: 40px;
		padding: calc(var(--bar-h) + 40px) var(--gutter) 40px; background: var(--ink); overflow-y: auto;
		clip-path: inset(0 0 100% 0); transition: clip-path .7s var(--ease), visibility 0s .7s; visibility: hidden;
	}
	.is-open .site-nav { clip-path: inset(0); visibility: visible; transition: clip-path .7s var(--ease); }
	.menu { flex-direction: column; gap: 0; counter-reset: nav; }
	.menu > li { border-bottom: 1px solid var(--line-dark); counter-increment: nav; opacity: 0; transform: translateY(16px); transition: opacity .5s ease, transform .6s var(--ease); }
	.is-open .menu > li { opacity: 1; transform: none; }
	.is-open .menu > li:nth-child(2) { transition-delay: .06s; }
	.is-open .menu > li:nth-child(3) { transition-delay: .12s; }
	.is-open .menu > li:nth-child(4) { transition-delay: .18s; }
	.is-open .menu > li:nth-child(5) { transition-delay: .24s; }
	.is-open .menu > li:nth-child(6) { transition-delay: .3s; }
	.menu > li > a { padding: 18px 0; font-family: var(--display); font-stretch: 112%; font-weight: 700; font-size: clamp(1.6rem, 6vw, 2.4rem); letter-spacing: -.01em; color: #fff; }
	.menu > li > a::before { content: counter(nav, decimal-leading-zero); font-family: var(--mono); font-size: 12px; font-weight: 500; letter-spacing: .1em; color: var(--red-light); margin-right: 14px; align-self: flex-start; margin-top: .5em; }
	.menu > li > a::after, .menu > li > a .icon { display: none; }
	.mega { position: static; opacity: 1; visibility: inherit; transform: none; background: none; border: 0; }
	.mega__inner { display: block; padding: 0 0 18px 34px; }
	.mega__intro { display: none; }
	.mega .sub-menu { display: block; background: none; border: 0; }
	.mega__card { flex-direction: row; align-items: baseline; gap: 12px; padding: 8px 0; background: none; }
	.mega__card:hover { background: none; color: var(--red-light); }
	.mega__title { font-size: 1rem; }
	.mega__desc, .mega__go { display: none; }
	.site-nav__mobile { display: flex; flex-direction: column; gap: 14px; font-size: 15px; }
	.site-nav__mobile a { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; color: rgba(255, 255, 255, .75); }
	.lang-switch--large { gap: 8px; font-size: 14px; }
	.lang-switch--large a { padding: 8px 14px; }
	body.nav-open { overflow: hidden; }
}
@media (max-width: 900px) {
	:root { --topbar-h: 0px; }
	.topbar { display: none; }
}
@media (max-width: 640px) {
	:root { --bar-h: 72px; }
	.header-cta { display: none; }
	.site-logo img { height: 40px; }
}

/* ==========================================================================
   Hero della home
   ========================================================================== */

.hero { position: relative; color: #fff; background: var(--ink); overflow: hidden; isolation: isolate; }
.hero--home { display: flex; align-items: flex-end; min-height: 100vh; min-height: 100svh; padding: calc(var(--topbar-h) + var(--bar-h) + 48px) 0 clamp(64px, 9vh, 104px); }
.hero__media { position: absolute; inset: 0; z-index: -2; }
.hero__media img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.12); animation: hero-zoom 14s var(--ease) forwards; }
@keyframes hero-zoom { to { transform: scale(1); } }
.hero--home::after {
	content: ""; position: absolute; inset: 0; z-index: -1;
	background:
		linear-gradient(90deg, rgba(13, 14, 16, .94) 0%, rgba(13, 14, 16, .72) 42%, rgba(13, 14, 16, .3) 100%),
		linear-gradient(0deg, rgba(13, 14, 16, .9) 0%, rgba(13, 14, 16, 0) 45%);
}
.hero__inner { width: 100%; }
.hero__eyebrow { opacity: 0; animation: fade-up .9s var(--ease) .2s forwards; }
.hero__title { margin: 0; font-size: clamp(2.5rem, 6.6vw, 6.8rem); font-weight: 300; line-height: .98; letter-spacing: -.025em; font-stretch: 108%; }
.hero__line { display: block; overflow: hidden; padding-bottom: .04em; }
.hero__line > span { display: inline-block; transform: translateY(105%); animation: line-up 1.1s var(--ease) forwards; animation-delay: calc(.35s + var(--i) * .13s); }
.hero__line--accent { font-weight: 800; color: var(--red-light); }
@keyframes line-up { to { transform: none; } }
@keyframes fade-up { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
.hero__bottom {
	display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 32px 64px;
	margin-top: clamp(36px, 6vh, 64px); padding-top: 32px; border-top: 1px solid rgba(255, 255, 255, .18);
	opacity: 0; animation: fade-up 1s var(--ease) .9s forwards;
}
.hero__lead { max-width: 52ch; margin: 0; font-size: clamp(1.02rem, 1.3vw, 1.2rem); color: rgba(255, 255, 255, .78); }
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; }
.hero__coords { position: absolute; right: calc(var(--gutter) / 2); top: 50%; transform: translateY(-50%) rotate(180deg); writing-mode: vertical-rl; font-family: var(--mono); font-size: 11px; letter-spacing: .3em; color: rgba(255, 255, 255, .45); }
.hero__scroll { position: absolute; left: 50%; bottom: 0; display: flex; flex-direction: column; align-items: center; gap: 12px; transform: translateX(-50%); font-family: var(--mono); font-size: 10.5px; letter-spacing: .3em; text-transform: uppercase; text-decoration: none; color: rgba(255, 255, 255, .55); }
.hero__scroll::after { content: ""; width: 1px; height: 40px; background: linear-gradient(var(--red-light), transparent); animation: scroll-line 2.2s ease-in-out infinite; transform-origin: top; }
@keyframes scroll-line { 0% { transform: scaleY(0); } 60% { transform: scaleY(1); opacity: 1; } 100% { transform: scaleY(1); opacity: 0; } }
@media (max-width: 860px) {
	.hero__bottom { grid-template-columns: 1fr; }
	.hero__coords, .hero__scroll { display: none; }
}

/* Dati chiave sotto l'hero */
.facts { background: var(--ink); color: #fff; border-top: 1px solid var(--line-dark); }
.facts__inner { display: grid; grid-template-columns: repeat(4, 1fr); }
.fact { display: flex; flex-direction: column; gap: 10px; padding: 34px 28px; border-left: 1px solid var(--line-dark); }
.fact:last-child { border-right: 1px solid var(--line-dark); }
.fact__value { font-family: var(--display); font-stretch: 112%; font-weight: 800; font-size: clamp(1.5rem, 2.6vw, 2.4rem); line-height: 1; text-transform: uppercase; }
.fact__label { font-family: var(--mono); font-size: 11.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--grey-light); }
@media (max-width: 860px) {
	.facts__inner { grid-template-columns: 1fr 1fr; padding: 0; }
	.fact { border-bottom: 1px solid var(--line-dark); padding: 26px var(--gutter); }
	.fact:nth-child(odd) { border-left: 0; }
	.fact:last-child { border-right: 0; }
}

/* Nastro dei Paesi */
.marquee { overflow: hidden; background: var(--ink); border-top: 1px solid var(--line-dark); border-bottom: 1px solid var(--line-dark); padding: clamp(18px, 3vw, 34px) 0; }
.marquee__track { display: flex; width: max-content; animation: marquee 48s linear infinite; }
.marquee span {
	display: flex; align-items: center; gap: clamp(28px, 4vw, 64px); padding-right: clamp(28px, 4vw, 64px);
	font-family: var(--display); font-stretch: 125%; font-weight: 800; font-size: clamp(2.2rem, 6vw, 5.4rem); line-height: 1; text-transform: uppercase;
	color: transparent; -webkit-text-stroke: 1px rgba(255, 255, 255, .32);
}
.marquee span::after { content: ""; width: .18em; height: .18em; background: var(--red); flex-shrink: 0; }
.marquee:hover .marquee__track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ==========================================================================
   Intestazione delle pagine interne
   ========================================================================== */

.page-hero { position: relative; background: var(--ink); color: #fff; padding: calc(var(--topbar-h) + var(--bar-h) + clamp(56px, 9vw, 120px)) 0 0; overflow: hidden; }
.page-hero--plain { padding-bottom: clamp(56px, 8vw, 104px); }
.breadcrumbs { display: flex; flex-wrap: wrap; gap: 4px; margin: 0 0 28px; font-family: var(--mono); font-size: 11.5px; letter-spacing: .12em; text-transform: uppercase; color: rgba(255, 255, 255, .55); opacity: 0; animation: fade-up .8s var(--ease) .1s forwards; }
.breadcrumbs a { text-decoration: none; }
.breadcrumbs a:hover { color: #fff; }
.breadcrumbs__sep { color: var(--red-light); margin: 0 .6em; }
.page-hero__title { max-width: 16ch; margin: 0; font-size: clamp(2.5rem, 6.2vw, 6.2rem); line-height: .98; opacity: 0; animation: fade-up 1s var(--ease) .2s forwards; }
.page-hero__lead { max-width: 58ch; margin: 28px 0 0; font-size: clamp(1.05rem, 1.4vw, 1.25rem); color: rgba(255, 255, 255, .72); opacity: 0; animation: fade-up 1s var(--ease) .35s forwards; }
.page-hero__media { position: relative; margin: clamp(48px, 7vw, 88px) 0 0 auto; width: calc(100% - var(--gutter)); height: clamp(260px, 52vh, 620px); overflow: hidden; clip-path: inset(0 0 100% 0); animation: reveal-down 1.4s var(--ease) .45s forwards; }
.page-hero__img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.15); animation: hero-zoom 2.2s var(--ease) .45s forwards; }
@keyframes reveal-down { to { clip-path: inset(0); } }
@media (min-width: 1449px) { .page-hero__media { width: calc(100% - (100vw - var(--wrap)) / 2 - var(--gutter)); } }

/* ==========================================================================
   Sezioni di contenuto (blocchi Gutenberg)
   ========================================================================== */

.entry > .section, .entry > .wp-block-group.section { padding: var(--section) 0; margin: 0; }
.section > .wp-block-group__inner-container { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.section--narrow > .wp-block-group__inner-container { max-width: 940px; }
.wp-block-group__inner-container > *:last-child, .wp-block-column > *:last-child { margin-bottom: 0; }
.section--light { background: var(--paper-2); }
.section--dark { --accent: var(--red-light); background: var(--ink); color: #fff; }
.section--dark .muted { color: rgba(255, 255, 255, .62); }
.section--dark + .section--dark { border-top: 1px solid var(--line-dark); }
.section--center { text-align: center; }
.section--center .eyebrow { justify-content: center; }
.section--center .wp-block-buttons { justify-content: center; }

.wp-block-columns { display: flex; flex-wrap: wrap; gap: clamp(28px, 5vw, 96px); margin: 0 0 1.5em; }
.wp-block-column { flex: 1 1 0; min-width: 0; }
.wp-block-column[style*="flex-basis"] { flex-grow: 0; }
.wp-block-columns.are-vertically-aligned-center { align-items: center; }
.section-head { margin-bottom: clamp(48px, 6vw, 88px) !important; align-items: flex-end; }
.section-head h2 { margin-bottom: 0; }
.section-head .lead, .section-head p:last-child { margin-bottom: 0; }
@media (max-width: 900px) {
	.wp-block-columns { flex-direction: column; }
	.wp-block-column { flex-basis: auto !important; }
	.section-head { align-items: stretch; }
}

.entry ul, .entry ol { padding-left: 1.2em; margin: 0 0 1.4em; }
.entry li { margin-bottom: .4em; }

.more { margin-top: 1.6em; }
.more a { display: inline-flex; align-items: center; gap: 10px; font-size: 12.5px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; text-decoration: none; color: var(--accent); }
.more a::after { content: "→"; font-size: 1.2em; transition: transform .3s var(--ease); }
.more a:hover::after { transform: translateX(5px); }

/* Immagini con didascalia tecnica */
.wp-block-image { margin: 0 0 1.5em; position: relative; }
.wp-block-image img { width: 100%; height: 100%; object-fit: cover; }
.wp-block-image figcaption { margin-top: 14px; font-family: var(--mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--grey); }
.img-tall img { aspect-ratio: 4 / 5; }
.img-wide img { aspect-ratio: 16 / 10; }

/* Liste a segni */
.checklist { list-style: none; padding: 0 !important; }
.checklist li { position: relative; padding: 15px 0 15px 34px; margin: 0; border-bottom: 1px solid var(--line); }
.checklist li:first-child { border-top: 1px solid var(--line); }
.checklist li::before { content: ""; position: absolute; left: 0; top: 27px; width: 18px; height: 1px; background: var(--accent); }
.section--dark .checklist li { border-color: var(--line-dark); }
.checklist--cols { columns: 2; column-gap: 48px; }
.checklist--cols li { break-inside: avoid; }
.checklist--cols li:nth-child(4) { border-top: 1px solid var(--line); }
@media (max-width: 700px) { .checklist--cols { columns: 1; } .checklist--cols li:nth-child(4) { border-top: 0; } }

/* Schede a griglia */
.cards { gap: 0 !important; border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.cards > .wp-block-column { position: relative; padding: clamp(30px, 3.2vw, 48px); border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); transition: background-color .4s ease; }
.cards > .wp-block-column::before { content: ""; position: absolute; top: -1px; left: -1px; width: 56px; height: 2px; background: var(--accent); transition: width .6s var(--ease); }
.cards > .wp-block-column:hover::before { width: calc(100% + 2px); }
.section--dark .cards, .section--dark .cards > .wp-block-column { border-color: var(--line-dark); }
.section--dark .cards > .wp-block-column:hover { background: var(--ink-2); }
.cards h3 { margin-bottom: .8em; }
.cards + .cards { border-top: 0; }

/* Pannelli dei servizi con immagine */
.service-panels { gap: 2px !important; }
.service-panels > .wp-block-column {
	position: relative; isolation: isolate; overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end;
	min-height: clamp(540px, 74vh, 740px); padding: clamp(32px, 4vw, 56px); color: #fff; background: var(--ink);
}
.service-panels .panel-img { position: absolute !important; inset: 0; z-index: -2; margin: 0 !important; }
.service-panels .panel-img img { height: 100%; transition: transform 1.4s var(--ease); }
.service-panels > .wp-block-column::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(0deg, rgba(13, 14, 16, .96) 22%, rgba(13, 14, 16, .6) 62%, rgba(13, 14, 16, .35) 100%); }
.service-panels > .wp-block-column::after { content: ""; position: absolute; left: 0; bottom: 0; height: 3px; width: 0; background: var(--red); transition: width .8s var(--ease); }
.service-panels > .wp-block-column:hover::after { width: 100%; }
.service-panels > .wp-block-column:hover .panel-img img { transform: scale(1.06); }
.panel-idx { position: absolute; top: clamp(28px, 3vw, 44px); left: clamp(32px, 4vw, 56px); margin: 0 !important; font-family: var(--mono); font-size: 13px; letter-spacing: .14em; color: var(--red-light); }
.service-panels h3 { font-size: clamp(1.5rem, 2.4vw, 2.2rem); line-height: 1.05; margin-bottom: .6em; max-width: 16ch; }
.service-panels .muted { color: rgba(255, 255, 255, .72); max-width: 46ch; }
.service-panels .checklist li { border-color: rgba(255, 255, 255, .16); padding-top: 11px; padding-bottom: 11px; font-size: 15.5px; }
.service-panels .checklist li::before { top: 23px; background: var(--red-light); }
.service-panels .more a { color: #fff; }

/* Fasi del metodo */
.steps { list-style: none; padding: 0 !important; counter-reset: step; }
.steps > li { counter-increment: step; position: relative; display: grid; grid-template-columns: 110px 1fr; gap: 0 24px; padding: 34px 0; margin: 0; border-top: 1px solid var(--line); }
.steps > li:last-child { border-bottom: 1px solid var(--line); }
.steps > li::before { content: counter(step, decimal-leading-zero); grid-row: span 2; font-family: var(--display); font-stretch: 112%; font-weight: 300; font-size: clamp(2.4rem, 4vw, 3.6rem); line-height: .9; color: var(--accent); }
.steps > li strong { display: block; font-family: var(--display); font-stretch: 112%; font-weight: 700; text-transform: uppercase; font-size: 1.2rem; letter-spacing: .01em; margin-bottom: 6px; }
.section--dark .steps > li { border-color: var(--line-dark); color: rgba(255, 255, 255, .72); }
.section--dark .steps > li strong { color: #fff; }
@media (max-width: 600px) { .steps > li { grid-template-columns: 64px 1fr; } }

/* Variante a linea temporale orizzontale */
.steps--timeline { display: grid; grid-template-columns: repeat(6, 1fr); position: relative; }
.steps--timeline::before { content: ""; position: absolute; left: 0; right: 0; top: 7px; height: 1px; background: var(--line-dark); }
.steps--timeline::after { content: ""; position: absolute; left: 0; top: 7px; height: 1px; width: 100%; background: var(--red-light); transform: scaleX(0); transform-origin: left; transition: transform 2.4s var(--ease) .4s; }
.is-visible.steps--timeline::after, .is-visible .steps--timeline::after { transform: scaleX(1); }
.steps--timeline > li { display: block; padding: 46px 24px 0 0; border: 0 !important; font-size: 15px; line-height: 1.6; }
.steps--timeline > li::before { display: block; margin-bottom: 18px; font-size: 13px; font-family: var(--mono); font-weight: 500; letter-spacing: .12em; line-height: 1; }
.steps--timeline > li::after { content: ""; position: absolute; top: 2px; left: 0; width: 11px; height: 11px; background: var(--ink); border: 1px solid var(--red-light); transform: rotate(45deg); }
.steps--timeline > li strong { font-size: 1.02rem; margin-bottom: 10px; }
@media (max-width: 1100px) { .steps--timeline { grid-template-columns: repeat(3, 1fr); row-gap: 48px; } .steps--timeline::before, .steps--timeline::after { display: none; } }
@media (max-width: 640px) {
	.steps--timeline { grid-template-columns: 1fr; row-gap: 0; padding-left: 28px !important; }
	.steps--timeline::before, .steps--timeline::after { display: block; top: 0; bottom: 0; left: 5px; width: 1px; height: auto; transform-origin: top; }
	.steps--timeline::after { transform: scaleY(0); }
	.is-visible.steps--timeline::after, .is-visible .steps--timeline::after { transform: scaleY(1); }
	.steps--timeline > li { padding: 0 0 36px; }
	.steps--timeline > li::after { left: -28px; top: 1px; }
}

/* Settori */
.sectors { display: grid !important; grid-template-columns: repeat(3, 1fr); gap: 0; list-style: none; padding: 0 !important; counter-reset: sector; border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.sectors li {
	counter-increment: sector; position: relative; display: flex; flex-direction: column; justify-content: space-between; gap: 40px; min-height: 200px; margin: 0; padding: 30px 30px 34px;
	border-right: 1px solid var(--line); border-bottom: 1px solid var(--line);
	font-family: var(--display); font-stretch: 112%; font-weight: 700; text-transform: uppercase; font-size: clamp(1.05rem, 1.6vw, 1.4rem); line-height: 1.15;
	transition: background-color .4s ease, color .4s ease;
}
.sectors li::before { content: "S—" counter(sector, decimal-leading-zero); font-family: var(--mono); font-weight: 500; font-size: 12px; letter-spacing: .12em; color: var(--accent); transition: color .4s; }
.sectors li::after { content: "→"; position: absolute; right: 28px; top: 24px; font-family: var(--body); font-size: 1.3rem; opacity: 0; transform: translateX(-8px); transition: opacity .3s, transform .4s var(--ease); }
.sectors li:hover { background: var(--red); color: #fff; }
.sectors li:hover::before { color: #fff; }
.sectors li:hover::after { opacity: 1; transform: none; }
.section--dark .sectors, .section--dark .sectors li { border-color: var(--line-dark); }
@media (max-width: 900px) { .sectors { grid-template-columns: repeat(2, 1fr); } .sectors li { min-height: 160px; } }
@media (max-width: 520px) { .sectors { grid-template-columns: 1fr; } .sectors li { min-height: 0; gap: 18px; } }

/* Motivi numerati */
.reasons { display: grid !important; grid-template-columns: repeat(3, 1fr); gap: 0 48px; list-style: none; padding: 0 !important; counter-reset: reason; }
.reasons li { counter-increment: reason; display: flex; gap: 18px; padding: 24px 0; margin: 0; border-top: 1px solid var(--line); font-weight: 600; font-size: 1.04rem; line-height: 1.45; }
.reasons li::before { content: counter(reason, decimal-leading-zero); font-family: var(--mono); font-weight: 500; font-size: 12px; letter-spacing: .1em; color: var(--accent); padding-top: 4px; }
.section--dark .reasons li { border-color: var(--line-dark); }
@media (max-width: 900px) { .reasons { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .reasons { grid-template-columns: 1fr; } }

/* Paesi */
.countries { display: flex; flex-wrap: wrap; gap: 10px; list-style: none; padding: 0 !important; }
.countries li { margin: 0; padding: 10px 18px; border: 1px solid currentColor; font-family: var(--mono); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; }
.section--center .countries { justify-content: center; }

/* Mappa d'Europa */
.map-block { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.9fr); gap: clamp(32px, 5vw, 80px); align-items: center; }
.map-list { list-style: none; padding: 0 !important; margin: 0 !important; }
.map-list li { display: flex; align-items: baseline; gap: 18px; padding: 13px 0; margin: 0; border-top: 1px solid var(--line-dark); font-family: var(--display); font-stretch: 112%; font-weight: 700; font-size: 1.15rem; text-transform: uppercase; cursor: default; transition: color .25s, padding-left .35s var(--ease); }
.map-list li:last-child { border-bottom: 1px solid var(--line-dark); }
.map-list li:hover, .map-list li.is-active { color: var(--red-light); padding-left: 10px; }
.map-list__idx { font-family: var(--mono); font-weight: 500; font-size: 11.5px; letter-spacing: .12em; color: var(--grey-light); }
.europe-map { width: 100%; height: auto; overflow: visible; }
.map-base path { fill: #1d2024; stroke: var(--ink); stroke-width: .7; }
.map-hi path { fill: var(--red); stroke: var(--ink); stroke-width: .9; transition: fill .3s; cursor: pointer; }
.map-hi path:hover, .map-hi path.is-active { fill: var(--red-light); }
.map-hq circle { fill: #fff; }
.map-hq .map-pulse { fill: none; stroke: #fff; stroke-width: 1.2; transform-origin: center; transform-box: fill-box; animation: pulse 2.4s ease-out infinite; }
.map-hq text { fill: #fff; font-family: var(--mono); font-size: 13px; letter-spacing: .12em; text-transform: uppercase; }
@keyframes pulse { from { transform: scale(1); opacity: 1; } to { transform: scale(4); opacity: 0; } }
@media (max-width: 900px) { .map-block { grid-template-columns: 1fr; } .map-list { display: grid; grid-template-columns: 1fr 1fr; column-gap: 24px; } .map-list li:nth-last-child(2) { border-bottom: 1px solid var(--line-dark); } }

/* Messaggio del CEO */
.founder-quote { position: relative; padding-top: 70px; }
.founder-quote::before { content: "“"; position: absolute; top: -.18em; left: -.04em; font-family: var(--display); font-weight: 800; font-size: 9rem; line-height: 1; color: var(--accent); }
.signature { margin-top: 2.2em; padding-top: 1.4em; border-top: 1px solid var(--line); font-family: var(--mono); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--grey); }
.signature strong { display: block; margin-bottom: 4px; font-family: var(--display); font-stretch: 112%; text-transform: uppercase; font-size: 1.15rem; letter-spacing: 0; color: var(--ink); }

.wp-block-separator { border: 0; border-top: 1px solid var(--line); margin: 3em auto; }

/* ==========================================================================
   Moduli
   ========================================================================== */

.contact-grid { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: clamp(40px, 7vw, 120px); }
@media (max-width: 900px) { .contact-grid { grid-template-columns: 1fr; } }
.contact-info dl { margin: 0; }
.contact-info dt { margin-top: 30px; font-family: var(--mono); font-size: 11.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); }
.contact-info dt:first-child { margin-top: 0; }
.contact-info dd { margin: 8px 0 0; font-family: var(--display); font-stretch: 112%; font-weight: 700; font-size: 1.3rem; line-height: 1.3; }
.contact-info dd a { text-decoration: none; }
.contact-info dd.contact-info__countries { font-family: var(--body); font-weight: 500; font-size: 1rem; color: var(--grey); }

.form { display: grid; grid-template-columns: 1fr 1fr; gap: 30px 32px; }
.form__field { display: flex; flex-direction: column; gap: 6px; }
.form__field--full { grid-column: 1 / -1; }
@media (max-width: 640px) { .form { grid-template-columns: 1fr; } }
.form label { font-family: var(--mono); font-size: 11.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--grey); }
.form input[type="text"], .form input[type="email"], .form input[type="tel"], .form textarea, .form select {
	width: 100%; padding: 12px 0; border: 0; border-bottom: 1px solid #c9c7c0; border-radius: 0; background: transparent;
	font: inherit; font-size: 17px; color: var(--ink); transition: border-color .25s;
}
.form select { appearance: none; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' fill='none' stroke='%23b32025' stroke-width='1.6'%3E%3Cpath d='m3 5 4 4 4-4'/%3E%3C/svg%3E") no-repeat right 4px center; padding-right: 28px; cursor: pointer; }
.form textarea { min-height: 150px; resize: vertical; }
.form input:focus, .form textarea:focus, .form select:focus { outline: none; border-color: var(--red); }
.form__file input { padding: 18px; border: 1px dashed #c9c7c0; background: var(--paper); font-size: 15px; cursor: pointer; }
.form__file input:hover { border-color: var(--red); }
.form__file input::file-selector-button { margin-right: 16px; padding: 10px 16px; border: 0; background: var(--ink); color: #fff; font: 600 12px var(--body); letter-spacing: .12em; text-transform: uppercase; cursor: pointer; }
.form__check { flex-direction: row; align-items: flex-start; gap: 14px; }
.form__check input { margin-top: 3px; width: 18px; height: 18px; accent-color: var(--red); flex-shrink: 0; }
.form__check label { font-family: var(--body); font-size: 14px; letter-spacing: 0; text-transform: none; line-height: 1.55; color: var(--ink); }
.form__submit { flex-direction: row; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px; }
.form__required { font-family: var(--mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--grey); }
.form__hp { position: absolute !important; left: -9999px !important; }
.notice { grid-column: 1 / -1; margin: 0; padding: 18px 22px; border-left: 3px solid var(--red); background: var(--paper-2); font-weight: 600; }
.notice--ok { border-color: #2e7d32; }

/* ==========================================================================
   Piè di pagina
   ========================================================================== */

.site-footer { position: relative; background: var(--ink); color: rgba(255, 255, 255, .7); font-size: 15px; overflow: hidden; }
.site-footer a { text-decoration: none; transition: color .2s; }
.site-footer a:hover { color: #fff; }

.footer-cta { background: var(--red); color: #fff; }
.footer-cta__inner { display: flex; align-items: center; justify-content: space-between; gap: 48px; padding-top: clamp(64px, 9vw, 128px); padding-bottom: clamp(64px, 9vw, 128px); }
.footer-cta h2 { margin: 0; max-width: 15ch; font-size: clamp(2.2rem, 5.2vw, 4.8rem); color: #fff; }
.footer-cta__text { max-width: 52ch; margin: 24px 0 0; color: rgba(255, 255, 255, .85); font-size: 1.1rem; }
.footer-cta .eyebrow::before { background: #fff; }
.footer-cta__button {
	flex-shrink: 0; display: grid; place-items: center; width: clamp(110px, 12vw, 168px); aspect-ratio: 1; border-radius: 50%;
	background: #fff; color: var(--red); transition: transform .6s var(--ease), background-color .3s, color .3s;
}
.footer-cta__button .icon { width: 34%; height: 34%; transition: transform .6s var(--ease); }
.footer-cta__button:hover { background: var(--ink); color: #fff !important; transform: scale(1.06); }
.footer-cta__button:hover .icon { transform: rotate(-45deg); }
@media (max-width: 760px) { .footer-cta__inner { flex-direction: column; align-items: flex-start; } }

.footer-main { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 48px; padding-top: 88px; padding-bottom: 40px; }
@media (max-width: 1000px) { .footer-main { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer-main { grid-template-columns: 1fr; } }
.footer-main__brand img { height: 52px; width: auto; margin-bottom: 26px; }
.footer-main__brand p { max-width: 38ch; }
.footer-main h3 { margin-bottom: 22px; font-family: var(--mono); font-size: 11.5px; font-weight: 500; letter-spacing: .14em; color: var(--grey-light); }
.footer-main ul { list-style: none; margin: 0; padding: 0; }
.footer-main li { margin-bottom: 12px; }
.footer-menu .sub-menu { margin: 10px 0 0 14px; font-size: 14px; }
.footer-menu .sub-menu li { margin-bottom: 8px; }
.footer-social { display: inline-flex; align-items: center; gap: 10px; margin-top: 8px; padding: 10px 16px; border: 1px solid var(--line-dark); font-size: 13px; }
.footer-social .icon { width: 18px; height: 18px; }

.footer-mark {
	font-family: var(--display); font-stretch: 125%; font-weight: 800; font-size: 25.5vw; line-height: .72; letter-spacing: -.02em; text-align: center;
	color: transparent; -webkit-text-stroke: 1px rgba(255, 255, 255, .1); user-select: none; white-space: nowrap; margin: 24px 0 -1.5vw;
}
.footer-bottom { position: relative; border-top: 1px solid var(--line-dark); background: var(--ink); }
.footer-bottom__inner { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-top: 24px; padding-bottom: 24px; font-family: var(--mono); font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; color: rgba(255, 255, 255, .45); }
.footer-legal { display: flex; gap: 24px; list-style: none; margin: 0; padding: 0; }

.page-hero .wp-block-buttons { margin-top: 40px; }

/* ==========================================================================
   Comparsa durante lo scorrimento
   ========================================================================== */

@media (prefers-reduced-motion: no-preference) {
	.js .reveal { opacity: 0; transform: translateY(32px); transition: opacity 1s var(--ease), transform 1.1s var(--ease); transition-delay: var(--delay, 0s); }
	.js .reveal.is-visible { opacity: 1; transform: none; }
	.js .reveal.wp-block-image { opacity: 1; transform: none; clip-path: inset(100% 0 0 0); transition: clip-path 1.3s var(--ease); }
	.js .reveal.is-visible.wp-block-image { clip-path: inset(0); }
}
@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	*, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0s !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
	.marquee__track { animation: none; }
}
