/* ==========================================================
   Comply Consulting — foglio di stile unico
   ========================================================== */

:root {
	--navy: #004976;
	--navy-deep: #0A2A43;
	--orange: #FF6900;
	--paper: #F5F7F9;
	--white: #FFFFFF;
	--ink: #1B2733;
	--muted: #5A6B7B;
	--rule: #D6DEE5;

	--sans: "Instrument Sans", "Helvetica Neue", Arial, sans-serif;
	--serif: "Source Serif 4", Georgia, "Times New Roman", serif;

	/* scala 1.25 */
	--fs-14: 0.875rem;
	--fs-16: 1rem;
	--fs-18: 1.125rem;
	--fs-22: 1.375rem;
	--fs-28: 1.75rem;
	--fs-35: 2.1875rem;
	--fs-44: 2.75rem;
	--fs-56: 3.5rem;

	--container: 1200px;
	--gutter: clamp(16px, 4vw, 40px);
	--header-h: 84px;
}

/* ---------- base ---------- */

*,
*::before,
*::after { box-sizing: border-box; }

html {
	-webkit-text-size-adjust: 100%;
	scroll-behavior: smooth;
	scroll-padding-top: var(--header-h);
}

body {
	margin: 0;
	background: var(--white);
	color: var(--ink);
	font-family: var(--serif);
	font-size: var(--fs-18);
	line-height: 1.65;
	font-optical-sizing: auto;
	-webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; height: auto; }

h1, h2, h3, h4 {
	margin: 0;
	font-family: var(--sans);
	font-weight: 600;
	line-height: 1.15;
	letter-spacing: -0.015em;
	color: var(--navy);
}

p { margin: 0 0 1em; }

a { color: var(--navy); text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
a:hover { color: var(--orange); }

:focus-visible {
	outline: 2px solid var(--orange);
	outline-offset: 3px;
}

.container {
	width: 100%;
	max-width: calc(var(--container) + 2 * var(--gutter));
	margin: 0 auto;
	padding: 0 var(--gutter);
}

.skip-link {
	position: absolute;
	left: var(--gutter);
	top: -100px;
	z-index: 100;
	padding: 10px 16px;
	background: var(--white);
	color: var(--navy);
	font-family: var(--sans);
	font-weight: 600;
}
.skip-link:focus { top: 12px; }

/* ---------- header ---------- */

.site-header {
	position: fixed;
	inset: 0 0 auto 0;
	z-index: 50;
	height: var(--header-h);
	transition: background-color 0.25s ease, box-shadow 0.25s ease;
}

.site-header .container {
	display: flex;
	align-items: center;
	justify-content: space-between;
	height: 100%;
}

.brand { display: block; line-height: 0; }
.brand img { width: 180px; height: auto; }
.brand .logo-dark { display: none; }

.site-nav ul {
	display: flex;
	gap: 36px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.site-nav a {
	position: relative;
	display: block;
	padding: 6px 0;
	font-family: var(--sans);
	font-size: var(--fs-16);
	font-weight: 500;
	color: var(--white);
	text-decoration: none;
}

.site-nav a::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	height: 2px;
	background: var(--orange);
	transform: scaleX(0);
	transform-origin: left;
	transition: transform 0.2s ease;
}
.site-nav a:hover::after,
.site-nav a[aria-current="page"]::after { transform: scaleX(1); }

.nav-toggle {
	display: none;
	padding: 8px;
	border: 0;
	background: none;
	color: var(--white);
	cursor: pointer;
}
.nav-toggle svg { display: block; }

/* selettore lingua IT / EN */
.site-nav { margin-left: auto; }

.lang-switch {
	display: flex;
	align-items: center;
	margin: 0 0 0 36px;
	padding: 0 0 0 20px;
	list-style: none;
	border-left: 1px solid rgba(255, 255, 255, 0.35);
	font-family: var(--sans);
	font-size: var(--fs-14);
	font-weight: 600;
	letter-spacing: 0.04em;
}
.lang-switch li + li::before {
	content: "/";
	margin: 0 6px;
	color: rgba(255, 255, 255, 0.5);
}
.lang-switch a {
	color: rgba(255, 255, 255, 0.7);
	text-decoration: none;
}
.lang-switch a:hover { color: var(--orange); }
.lang-switch a[aria-current="true"] { color: var(--white); border-bottom: 2px solid var(--orange); }

/* stato "pieno": dopo lo scroll sulla home, sempre sulle pagine interne */
.site-header.is-solid {
	background: var(--white);
	box-shadow: 0 1px 0 var(--rule);
}
.site-header.is-solid .logo-light { display: none; }
.site-header.is-solid .logo-dark { display: block; }
.site-header.is-solid .site-nav a,
.site-header.is-solid .nav-toggle { color: var(--navy); }
.site-header.is-solid .lang-switch,
.site-header.menu-open .lang-switch { border-color: var(--rule); }
.site-header.is-solid .lang-switch a,
.site-header.menu-open .lang-switch a,
.site-header.is-solid .lang-switch li + li::before,
.site-header.menu-open .lang-switch li + li::before { color: var(--muted); }
.site-header.is-solid .lang-switch a[aria-current="true"],
.site-header.menu-open .lang-switch a[aria-current="true"] { color: var(--navy); }

/* ---------- hero ---------- */

.hero {
	position: relative;
	display: flex;
	align-items: flex-end;
	min-height: 88vh;
	min-height: 88svh;
	overflow: hidden;
	background: var(--navy-deep);
	color: var(--white);
}

/* duotono: foto in scala di grigi fusa con il blu Comply */
.hero-media {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: 30% 50%;
	filter: grayscale(1) contrast(1.15) brightness(1.05);
	mix-blend-mode: luminosity;
	opacity: 0.6;
}

.hero::after {
	content: "";
	position: absolute;
	inset: 0;
	background:
		linear-gradient(to top, rgba(10, 42, 67, 0.95) 0%, rgba(10, 42, 67, 0.55) 45%, rgba(10, 42, 67, 0.15) 100%),
		linear-gradient(to bottom, rgba(10, 42, 67, 0.6) 0%, rgba(10, 42, 67, 0) 22%);
}

.hero-content {
	position: relative;
	z-index: 1;
	width: 100%;
	padding-top: calc(var(--header-h) + 64px);
	padding-bottom: clamp(40px, 7vh, 72px);
	animation: hero-in 0.9s ease-out both;
}

.hero-kicker {
	margin: 0 0 20px;
	font-family: var(--sans);
	font-size: var(--fs-16);
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--orange);
}

.hero h1 {
	max-width: 17ch;
	color: var(--white);
	text-wrap: balance;
	font-size: clamp(2.5rem, 6vw, 4.375rem);
	font-weight: 600;
	letter-spacing: -0.025em;
	line-height: 1.02;
}

.hero-lead {
	max-width: 36em;
	margin: 28px 0 0;
	font-size: clamp(var(--fs-18), 1.6vw, var(--fs-22));
	line-height: 1.55;
	color: rgba(255, 255, 255, 0.86);
}

.hero-functions {
	display: flex;
	flex-wrap: wrap;
	margin: 48px 0 0;
	padding: 0;
	list-style: none;
	border-top: 2px solid var(--orange);
	max-width: 760px;
}

.hero-functions li { flex: 1 1 0; min-width: 180px; }
.hero-functions li + li { border-left: 1px solid rgba(255, 255, 255, 0.25); }

.hero-functions a {
	display: block;
	padding: 18px 20px 4px;
	font-family: var(--sans);
	font-size: var(--fs-18);
	font-weight: 500;
	color: var(--white);
	text-decoration: none;
}
.hero-functions li:first-child a { padding-left: 0; }
.hero-functions a:hover { color: var(--orange); }

@keyframes hero-in {
	from { opacity: 0; transform: translateY(12px); }
	to { opacity: 1; transform: none; }
}

/* ---------- sezioni ---------- */

.section { padding: clamp(72px, 10vw, 128px) 0; }
.section--paper { background: var(--paper); }

/* griglia a due colonne: etichetta a sinistra, contenuto a destra */
.split {
	display: grid;
	grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
	column-gap: 48px;
}

.section-head { margin-bottom: 56px; }
.section-head h2 {
	font-size: clamp(var(--fs-35), 4vw, var(--fs-44));
	padding-top: 20px;
	border-top: 2px solid var(--orange);
	display: inline-block;
}
.section-head p {
	max-width: 38em;
	margin: 0;
	color: var(--ink);
}

/* ---------- servizi ---------- */

.service {
	padding: 48px 0;
	border-top: 1px solid var(--rule);
}
.service:last-child { border-bottom: 1px solid var(--rule); }

.service-label { align-self: start; }
.service-label h3 { font-size: var(--fs-28); }
.service-label p {
	margin: 8px 0 0;
	font-family: var(--sans);
	font-size: var(--fs-16);
	color: var(--muted);
}

.service-body > p { max-width: 38em; }

.activities {
	margin: 24px 0 0;
	padding: 0;
	list-style: none;
	columns: 2;
	column-gap: 40px;
	font-size: var(--fs-16);
	line-height: 1.55;
}

.activities li {
	position: relative;
	break-inside: avoid;
	padding: 0 0 14px 22px;
}
.activities li::before {
	content: "";
	position: absolute;
	left: 0;
	top: 0.72em;
	width: 10px;
	height: 2px;
	background: var(--orange);
}

/* ---------- team ---------- */

.team-group {
	padding: 40px 0;
	border-top: 1px solid var(--rule);
}

.team-group h3 {
	font-size: var(--fs-22);
	font-weight: 500;
}

.people {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 32px 24px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.person a {
	display: block;
	color: inherit;
	text-decoration: none;
}

.person img {
	width: 100%;
	aspect-ratio: 4 / 5;
	object-fit: cover;
	background: var(--rule);
}

.person-name {
	display: inline-block;
	margin-top: 14px;
	padding-bottom: 2px;
	font-family: var(--sans);
	font-size: var(--fs-18);
	font-weight: 600;
	color: var(--navy);
	border-bottom: 2px solid transparent;
	transition: border-color 0.2s ease;
}
.person a:hover .person-name,
.person a:focus-visible .person-name { border-color: var(--orange); }

.person-role {
	display: block;
	font-family: var(--sans);
	font-size: var(--fs-14);
	color: var(--muted);
}

/* ---------- contatti ---------- */

.contacts {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 32px;
	margin: 0;
}

.contacts div { padding-top: 20px; border-top: 1px solid var(--rule); }

.contacts dt {
	font-family: var(--sans);
	font-size: var(--fs-14);
	color: var(--muted);
}

.contacts dd {
	margin: 6px 0 0;
	font-family: var(--sans);
	font-size: var(--fs-22);
	font-weight: 500;
	line-height: 1.35;
}
.contacts dd a { text-decoration: none; }
.contacts dd a:hover { text-decoration: underline; }

/* ---------- footer ---------- */

.site-footer {
	padding: 64px 0 40px;
	background: var(--navy-deep);
	color: rgba(255, 255, 255, 0.72);
	font-family: var(--sans);
	font-size: var(--fs-14);
	line-height: 1.7;
}

.site-footer a { color: var(--white); }
.site-footer a:hover { color: var(--orange); }

.footer-top {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	align-items: flex-start;
	gap: 32px;
	padding-bottom: 40px;
	border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}
.footer-top img { width: 160px; }

.company { margin: 0; font-style: normal; }
.company strong { color: var(--white); font-weight: 600; }

.footer-bottom {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: 16px;
	padding-top: 24px;
}

.footer-links {
	display: flex;
	gap: 24px;
	margin: 0;
	padding: 0;
	list-style: none;
}
.footer-links a { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; }

/* ---------- pagine interne ---------- */

.page { padding: calc(var(--header-h) + 56px) 0 clamp(72px, 10vw, 120px); }

.back-link {
	display: inline-block;
	margin-bottom: 40px;
	font-family: var(--sans);
	font-size: var(--fs-16);
	font-weight: 500;
	text-decoration: none;
}
.back-link:hover { text-decoration: underline; }

.bio {
	display: grid;
	grid-template-columns: minmax(0, 4fr) minmax(0, 7fr);
	column-gap: 64px;
	align-items: start;
}

.bio-photo {
	width: 100%;
	aspect-ratio: 4 / 5;
	object-fit: cover;
	background: var(--rule);
}

.bio h1 { font-size: clamp(var(--fs-35), 4.5vw, var(--fs-56)); letter-spacing: -0.025em; }

.bio-role {
	margin: 12px 0 0;
	padding-bottom: 28px;
	font-family: var(--sans);
	font-size: var(--fs-22);
	color: var(--muted);
	position: relative;
}
.bio-role::after {
	content: "";
	position: absolute;
	left: 0;
	bottom: 0;
	width: 56px;
	height: 2px;
	background: var(--orange);
}

.bio-text { max-width: 38em; margin-top: 32px; }

.prose { max-width: 42em; }
.prose h1 {
	font-size: clamp(var(--fs-28), 3.5vw, var(--fs-44));
	margin-bottom: 40px;
}
.prose h2 {
	margin: 48px 0 12px;
	font-size: var(--fs-22);
}
.prose ul { padding-left: 1.2em; margin: 0 0 1em; }
.prose li { margin-bottom: 0.4em; }

/* ---------- responsive ---------- */

@media (max-width: 1100px) {
	.people { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
	.people { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.activities { columns: 1; }
	.contacts { grid-template-columns: 1fr; gap: 24px; }
}

@media (max-width: 760px) {
	:root { --header-h: 68px; }

	.brand img { width: 140px; }

	.nav-toggle { display: block; }

	/* su mobile il selettore resta visibile accanto al pulsante del menu */
	.lang-switch { order: 1; margin-left: auto; margin-right: 12px; padding-left: 0; border-left: 0; }
	.nav-toggle { order: 2; }

	.site-nav {
		position: absolute;
		top: var(--header-h);
		left: 0;
		right: 0;
		display: none;
		background: var(--white);
		box-shadow: 0 1px 0 var(--rule);
	}
	.site-nav.is-open { display: block; }
	.site-nav ul {
		flex-direction: column;
		gap: 0;
		padding: 8px var(--gutter) 16px;
	}
	.site-nav a,
	.site-header .site-nav a { padding: 12px 0; color: var(--navy); }
	.site-nav a::after { display: none; }

	/* menu aperto sopra l'hero: l'header diventa pieno */
	.site-header.menu-open { background: var(--white); }
	.site-header.menu-open .logo-light { display: none; }
	.site-header.menu-open .logo-dark { display: block; }
	.site-header.menu-open .nav-toggle { color: var(--navy); }

	.split,
	.bio { grid-template-columns: 1fr; }

	.service-label,
	.team-group h3,
	.section-head h2 { margin-bottom: 24px; }

	.hero-functions { flex-direction: column; border-top-width: 2px; }
	.hero-functions li + li { border-left: 0; border-top: 1px solid rgba(255, 255, 255, 0.2); }
	.hero-functions a,
	.hero-functions li:first-child a { padding: 14px 0; }

	.bio-photo { max-width: 320px; margin-bottom: 32px; }
}

@media (min-width: 761px) {
	.service-label { position: sticky; top: calc(var(--header-h) + 32px); }
}

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	*,
	*::before,
	*::after {
		animation: none !important;
		transition: none !important;
	}
}
