/* ==========================================================================
   Xentup — stili del sito
   Il layout è tutto qui: il tema disattiva gli stili di layout di WordPress
   (add_theme_support 'disable-layout-styles'). I colori e i font vengono da
   theme.json e sono esposti come --wp--preset--*.
   ========================================================================== */

:root {
	--ink: var(--wp--preset--color--ink, #0E1116);
	--paper: var(--wp--preset--color--paper, #FAFAF8);
	--paper-2: var(--wp--preset--color--paper-2, #F0F0EE);
	--ink-text: var(--wp--preset--color--ink-text, #14171A);
	--paper-text: #F5F5F3;
	--surface: #FFFFFF;
	--brand-green: var(--wp--preset--color--brand-green, #83F019);
	--brand-green-hover: #6FD815;
	--brand-green-deep: var(--wp--preset--color--brand-green-deep, #4C8A12);
	--teal: var(--wp--preset--color--teal, #4E948C);
	--icon-muted: #525860;
	--line: rgba(20, 23, 26, 0.12);
	--line-strong: rgba(20, 23, 26, 0.24);
	--nav-height: 74px;
	--font-display: var(--wp--preset--font-family--display, 'Space Grotesk', sans-serif);
	--font-body: var(--wp--preset--font-family--body, 'IBM Plex Sans', sans-serif);
	--font-mono: var(--wp--preset--font-family--mono, 'IBM Plex Mono', monospace);
}

/* Il sito è sempre in tema scuro (scelta del cliente, ottobre 2026): i valori
   chiari sopra restano come riferimento della bozza originale. */
:root {
	--paper: #191C20;
	--paper-2: #232628;
	--ink-text: #EDECEA;
	--icon-muted: #9CA3AC;
	--line: rgba(237, 236, 234, 0.13);
	--line-strong: rgba(237, 236, 234, 0.25);
	color-scheme: dark;
}

/* Navbar e footer restano sempre chiari: il logo è nero su bianco. */
.nav,
.site-footer {
	--ink-text: #14171A;
	--line: rgba(20, 23, 26, 0.12);
	--line-strong: rgba(20, 23, 26, 0.24);
	color-scheme: light;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--nav-height); }
body {
	margin: 0;
	background: var(--paper);
	color: var(--ink-text);
	font-family: var(--font-body);
	font-size: 16px;
	line-height: 1.65;
	-webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 600; line-height: 1.12; margin: 0; }
p, figure { margin: 0; }
::selection { background: var(--brand-green); color: var(--ink); }
:focus-visible { outline: 2px solid var(--brand-green); outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
		scroll-behavior: auto !important;
	}
}

.wp-site-blocks > * { margin-block: 0; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 28px; }

/* ---------- Nav ---------- */
.nav {
	position: fixed; top: 0; left: 0; right: 0; z-index: 100;
	background: var(--surface);
	border-bottom: 1px solid var(--line);
	transition: box-shadow .3s ease;
}
.admin-bar .nav { top: 32px; }
@media (max-width: 782px) { .admin-bar .nav { top: 46px; } }
.nav.is-scrolled { box-shadow: 0 8px 24px rgba(18, 24, 33, 0.10); }
.nav-inner {
	max-width: 1180px; margin: 0 auto; padding: 0 28px;
	height: var(--nav-height); display: flex; align-items: center; justify-content: space-between;
}
.brand { display: inline-flex; align-items: center; text-decoration: none; }
.brand-logo { height: 26px; width: auto; }
.nav-links { display: flex; align-items: center; gap: 0; list-style: none; margin: 0; padding: 0; }
.nav-links > li { position: relative; }
.nav-links a {
	position: relative;
	display: inline-block; padding: 14px 11px; color: var(--ink-text);
	text-decoration: none; font-size: 0.9rem; font-weight: 600; opacity: 0.82; white-space: nowrap;
	transition: opacity .2s ease;
}
.nav-links a:hover { opacity: 1; }
.nav-links > li > a:not(.nav-cta)::after {
	content: ''; position: absolute; left: 11px; right: 11px; bottom: 9px; height: 2px;
	background: var(--brand-green); transform: scaleX(0); transform-origin: left;
	transition: transform .25s ease;
}
.nav-links > li > a:hover::after { transform: scaleX(1); }
.nav-cta {
	border: 1px solid var(--line-strong);
	border-radius: 3px; margin-left: 6px; padding: 9px 16px !important;
}
.nav-cta:hover { border-color: var(--brand-green); background: rgba(131, 240, 25, 0.10); }

.caret {
	display: inline-block; width: 6px; height: 6px;
	border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor;
	transform: rotate(45deg); margin-left: 7px; position: relative; top: -2px; opacity: 0.6;
}
.dropdown {
	position: absolute; top: 100%; left: 0; min-width: 220px;
	background: var(--surface); border: 1px solid var(--line);
	border-radius: 4px; padding: 8px; margin-top: 6px;
	opacity: 0; visibility: hidden; transform: translateY(-6px);
	transition: opacity .18s ease, transform .18s ease, visibility .18s;
	box-shadow: 0 12px 28px rgba(18, 24, 33, 0.14);
}
.has-dropdown:hover .dropdown,
.has-dropdown:focus-within .dropdown { opacity: 1; visibility: visible; transform: translateY(0); }
.dropdown a { display: block; padding: 10px 12px; border-radius: 3px; font-size: 0.92rem; opacity: 1; white-space: normal; }
.dropdown a:hover { background: rgba(131, 240, 25, 0.12); }
.dropdown a small { display: block; font-size: 0.78rem; opacity: 0.6; margin-top: 2px; font-weight: 400; }

.nav-toggle { display: none; background: none; border: 0; padding: 8px; cursor: pointer; }
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--ink-text); margin: 5px 0; }

/* Il breakpoint del menu mobile deve coincidere con MOBILE_NAV in assets/js/main.js. */
@media (max-width: 680px) {
	.nav-toggle { display: block; }
	.nav-links {
		position: fixed; top: var(--nav-height); left: 0; right: 0; bottom: 0;
		background: var(--surface); flex-direction: column; align-items: stretch;
		padding: 10px 28px 40px; gap: 0;
		transform: translateX(100%); transition: transform .3s ease;
		overflow-y: auto;
	}
	.admin-bar .nav-links { top: calc(var(--nav-height) + 46px); }
	.nav-links.open { transform: translateX(0); }
	.nav-links a { padding: 16px 4px; border-bottom: 1px solid var(--line); width: 100%; white-space: normal; }
	.nav-links > li > a::after { display: none; }
	.dropdown {
		position: static; opacity: 1; visibility: visible; transform: none;
		display: none; box-shadow: none; border: 0; background: transparent;
		padding: 0 0 0 14px; margin: 0;
	}
	.has-dropdown.open .dropdown { display: block; }
	.caret { float: right; margin-top: 8px; }
	.nav-cta { margin: 14px 0 0; text-align: center; }
}

/* ---------- Buttons (core/button) ---------- */
.wp-block-buttons { display: flex; gap: 14px; flex-wrap: wrap; }
.wp-block-button .wp-block-button__link {
	font-family: var(--font-body); font-size: 0.96rem; font-weight: 500; line-height: 1.65;
	padding: 13px 26px; border-radius: 3px; text-decoration: none;
	display: inline-block; border: 1px solid transparent; cursor: pointer;
	transition: transform .18s ease, background .18s ease, border-color .18s ease;
}
.wp-block-button .wp-block-button__link:hover { transform: translateY(-1px); }
.btn-primary .wp-block-button__link { background: var(--brand-green); color: #141014; }
.btn-primary .wp-block-button__link:hover { background: var(--brand-green-hover); }
.btn-ghost .wp-block-button__link { background: transparent; border-color: rgba(241, 238, 230, 0.35); color: var(--paper-text); }
.btn-ghost .wp-block-button__link:hover { border-color: var(--paper-text); }

/* ---------- Hero ---------- */
.hero {
	background: var(--ink); color: var(--paper-text);
	padding: 168px 0 110px; position: relative; overflow: hidden;
}
.hero-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 56px; align-items: center; }
.hero h1 { font-size: clamp(2.5rem, 4.6vw, 4.1rem); max-width: 11ch; margin-bottom: 26px; }
.hero-lede { font-size: 1.12rem; line-height: 1.7; max-width: 52ch; color: rgba(241, 238, 230, 0.82); margin-bottom: 38px; }
.hero-art svg { width: 100%; height: auto; }
.hero-art .draw { stroke-dasharray: 900; stroke-dashoffset: 900; animation: draw 2.2s ease forwards; }
.hero-art .draw2 { animation-delay: .25s; }
.hero-art .draw3 { animation-delay: .5s; }
.hero-art .node { opacity: 0; animation: fadeIn .6s ease forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes fadeIn { to { opacity: 1; } }
@media (max-width: 860px) {
	.hero { padding: 132px 0 80px; }
	.hero-grid { grid-template-columns: 1fr; gap: 40px; }
	.hero-art { max-width: 420px; }
}

/* ---------- Sezioni ---------- */
.section { padding: 104px 0; }
.section-head { margin-bottom: 52px; border-bottom: 1px solid var(--line); padding-bottom: 26px; }
.section-head h2 { font-size: clamp(1.9rem, 2.6vw, 2.6rem); }
.section-head p:not(.section-number) { max-width: 44ch; opacity: 0.78; font-size: 1.02rem; }
.section-head h2 + p { margin-top: 0; }
.section-number {
	font-family: var(--font-mono); font-size: 0.82rem; opacity: 0.6;
	letter-spacing: 0.02em; margin-bottom: 10px;
	display: flex; align-items: center; gap: 7px;
}
.section-number::before {
	content: ''; width: 6px; height: 6px; border-radius: 50%;
	background: var(--brand-green); flex-shrink: 0;
}
@media (max-width: 680px) { .section { padding: 72px 0; } }

.verticals-label { font-size: 1.2rem; font-weight: 600; margin: 70px 0 8px; }
.verticals-label.is-first { margin-top: 0; }
.verticals-sub { opacity: 0.72; max-width: 60ch; margin-bottom: 34px; }

/* ---------- Offering: piattaforme ---------- */
.platform-card {
	display: grid; grid-template-columns: 0.95fr 1.05fr;
	background: var(--paper-2); color: var(--ink-text);
	border: 1px solid var(--line); border-radius: 6px; overflow: hidden;
}
.platform-card + .platform-card { margin-top: 24px; }
.platform-copy { padding: 56px; }
.platform-copy .eyebrow-word { color: var(--brand-green-deep); font-weight: 600; }
.platform-copy h3 { font-size: 1.9rem; margin: 12px 0 18px; max-width: 14ch; }
.platform-copy > p:not(.eyebrow-word) { opacity: 0.78; margin-bottom: 28px; max-width: 46ch; }
.platform-copy > p.platform-tagline { font-weight: 500; opacity: 0.9; margin-bottom: 14px; }
.dot-list { list-style: none; padding: 0; margin: 0 0 28px; display: grid; gap: 10px; }
.dot-list li { font-size: 0.92rem; opacity: 0.82; padding-left: 16px; position: relative; }
.dot-list li::before {
	content: ''; position: absolute; left: 0; top: 8px;
	width: 6px; height: 6px; border-radius: 50%; background: var(--brand-green-deep);
}
.platform-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 28px; }
.fact-label { font-family: var(--font-mono); font-size: 0.76rem; opacity: 0.55; margin-bottom: 4px; }
.fact-value { font-size: 0.95rem; font-weight: 500; }
.platform-visual {
	background: radial-gradient(circle at 30% 30%, rgba(78, 148, 140, 0.16), transparent 60%), var(--paper);
	padding: 40px; display: flex; align-items: center; justify-content: center;
	border-left: 1px solid var(--line);
	color: var(--ink-text);
}

/* ---------- Griglie di card (verticali, asset) ---------- */
.card-grid { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); }
.card-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.card-grid.cols-2 { grid-template-columns: repeat(2, 1fr); margin-bottom: 56px; }
.vertical-card {
	background: var(--paper); padding: 32px 26px; min-height: 260px;
	display: flex; flex-direction: column; gap: 18px;
}
.vertical-card .icon { width: 40px; height: 40px; color: var(--icon-muted); }
.vertical-card h4 { font-size: 1.08rem; max-width: 16ch; }
.vertical-card p { font-size: 0.92rem; opacity: 0.76; }
.vertical-card .card-note { font-size: 0.8rem; opacity: 0.6; margin-top: auto; padding-top: 6px; }
@media (max-width: 980px) {
	.platform-card { grid-template-columns: 1fr; }
	.platform-visual { border-left: 0; border-top: 1px solid var(--line); }
	.card-grid.cols-3 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 700px) { .card-grid.cols-2 { grid-template-columns: 1fr; } }
@media (max-width: 560px) {
	.card-grid.cols-3 { grid-template-columns: 1fr; }
	.platform-copy { padding: 36px 24px; }
}

/* ---------- Clienti ---------- */
.client-strip { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 28px 36px; }
.client-logo {
	background: var(--surface); border-radius: 8px; padding: 20px 34px;
	display: flex; align-items: center; justify-content: center;
	min-width: 150px; min-height: 96px;
	box-shadow: 0 1px 3px rgba(18, 24, 33, 0.06), 0 6px 16px rgba(18, 24, 33, 0.05);
	border: 1px solid var(--line);
	transition: transform .2s ease, box-shadow .2s ease;
}
.client-logo:hover {
	transform: translateY(-3px);
	box-shadow: 0 4px 10px rgba(18, 24, 33, 0.08), 0 12px 24px rgba(18, 24, 33, 0.08);
}
.client-logo img { max-width: 100%; max-height: 52px; width: auto; height: auto; }
@media (max-width: 760px) {
	.client-strip { gap: 20px 24px; }
	.client-logo { padding: 16px 26px; min-width: 130px; min-height: 82px; }
	.client-logo img { max-height: 42px; }
}

/* ---------- Company Profile ---------- */
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; margin-bottom: 70px; }
.profile-lead p { margin-bottom: 16px; opacity: 0.85; }
.inline-link { color: var(--brand-green-deep); font-weight: 600; text-decoration: none; border-bottom: 1px solid currentColor; }
.iso-badge {
	border: 1px solid var(--line-strong); border-radius: 6px; padding: 26px;
	display: flex; gap: 18px; align-items: flex-start; align-self: start;
}
.iso-badge .icon { width: 44px; height: 44px; color: var(--teal); flex-shrink: 0; }
.iso-badge h4 { font-size: 1rem; margin-bottom: 6px; }
.profile-lead .iso-badge p { font-size: 0.9rem; opacity: 0.72; margin: 0; }

.quality-objectives {
	list-style: none; margin: 0 0 60px; padding: 0;
	display: grid; grid-template-columns: 1fr 1fr; gap: 0;
	border-top: 1px solid var(--line);
}
.quality-objectives li {
	padding: 20px 0 20px 30px; border-bottom: 1px solid var(--line); position: relative;
	font-size: 0.98rem;
}
.quality-objectives li:nth-child(odd) { border-right: 1px solid var(--line); padding-right: 24px; }
.quality-objectives li:nth-child(even) { padding-left: 54px; }
.quality-objectives li::before {
	content: ''; position: absolute; left: 0; top: 32px; width: 14px; height: 1.5px; background: var(--brand-green);
}
.quality-objectives li:nth-child(even)::before { left: 24px; }

.pillars { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; margin-bottom: 60px; }
.pillar h4 { font-size: 1.15rem; margin-bottom: 12px; }
.pillar p { opacity: 0.8; font-size: 0.97rem; margin-bottom: 12px; }

.signoff {
	border-top: 1px solid var(--line); padding-top: 28px;
	display: flex; justify-content: space-between; flex-wrap: wrap; gap: 14px;
	font-size: 0.92rem;
}
.signoff p { opacity: 0.75; }
.signoff .signoff-title { opacity: 1; font-family: var(--font-display); font-weight: 600; font-size: 1rem; margin-bottom: 3px; }

@media (max-width: 760px) {
	.two-col, .pillars, .quality-objectives { grid-template-columns: 1fr; }
	.two-col { gap: 8px; }
	.quality-objectives li:nth-child(odd) { border-right: 0; }
	.quality-objectives li:nth-child(even) { padding-left: 30px; }
	.quality-objectives li:nth-child(even)::before { left: 0; }
}

/* ---------- Contatti ---------- */
.contact-card {
	border: 1px solid var(--line-strong); border-radius: 6px; padding: 14px 30px;
	display: grid; grid-template-columns: 1fr 1fr; column-gap: 48px;
}
.contact-line { display: flex; gap: 14px; padding: 16px 0; border-bottom: 1px solid var(--line); align-items: flex-start; }
.contact-line:nth-last-child(-n+2) { border-bottom: 0; }
.contact-line .icon { width: 20px; height: 20px; color: var(--icon-muted); flex-shrink: 0; margin-top: 2px; }
.contact-label { font-family: var(--font-mono); font-size: 0.74rem; opacity: 0.55; margin-bottom: 3px; }
.contact-value a { text-decoration: none; }
.contact-value a:hover { color: var(--brand-green-deep); }
.map-frame { margin-top: 24px; border: 1px solid var(--line-strong); border-radius: 6px; overflow: hidden; }
.map-frame iframe { display: block; width: 100%; height: 380px; border: 0; }
@media (max-width: 760px) {
	.map-frame iframe { height: 300px; }
	.contact-card { grid-template-columns: 1fr; padding: 14px 24px; }
	.contact-line:nth-last-child(2) { border-bottom: 1px solid var(--line); }
}

/* ---------- Footer ---------- */
.site-footer { background: var(--surface); color: var(--ink-text); padding: 56px 0 34px; border-top: 1px solid var(--line); }
.footer-top {
	display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 36px;
	padding-bottom: 36px; border-bottom: 1px solid var(--line); margin-bottom: 26px;
}
.footer-logo { height: 26px; width: auto; }
.footer-links { display: flex; gap: 28px; flex-wrap: wrap; list-style: none; padding: 0; margin: 0; }
.footer-links a { text-decoration: none; font-size: 0.92rem; font-weight: 600; opacity: 0.85; }
.footer-links a:hover { color: var(--brand-green-deep); opacity: 1; }
.footer-bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; font-size: 0.82rem; opacity: 0.6; }
.footer-legal { display: flex; gap: 18px; width: 100%; }
.footer-legal a { text-decoration: none; font-weight: 600; }
.footer-legal a:hover { color: var(--brand-green-deep); }

/* ---------- Pagine generiche (privacy, 404…) ---------- */
.page-default { padding: calc(var(--nav-height) + 72px) 0 104px; min-height: 60vh; }
.page-default .wrap { max-width: 820px; }
.page-title { font-size: clamp(2rem, 3.4vw, 2.8rem); margin-bottom: 32px; }
.page-content > * + * { margin-top: 1em; }
.page-content h2 { font-size: 1.5rem; margin-top: 2em; }
.page-content h3 { font-size: 1.2rem; margin-top: 1.6em; }
.page-content a, .page-default p a { color: var(--brand-green-deep); }
.post-list .wp-block-post-title { font-size: 1.5rem; margin-top: 40px; }
.post-list .wp-block-post-title a { text-decoration: none; }
