/* Osys - foglio di stile del sito (nessuna dipendenza esterna) */

:root {
	--blue: #1f66ff;
	--blue-dark: #1650d0;
	--sky: #8fd0ec;
	--ink: #131a2a;
	--muted: #556073;
	--line: #e2e8f2;
	--bg: #ffffff;
	--bg-alt: #f4f7fc;
	--navy: #0d1730;
	--radius: 16px;
	--shadow: 0 1px 2px rgba(19, 26, 42, .05), 0 8px 24px rgba(19, 26, 42, .07);
	--shadow-lift: 0 2px 4px rgba(19, 26, 42, .06), 0 18px 40px rgba(19, 26, 42, .12);
	--header-h: 68px;
	--font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", Arial, sans-serif;
}

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

html {
	-webkit-text-size-adjust: 100%;
	scroll-padding-top: calc(var(--header-h) + 12px);
}

body {
	margin: 0;
	font-family: var(--font);
	font-size: 1.0625rem;
	line-height: 1.65;
	color: var(--ink);
	background: var(--bg);
	-webkit-font-smoothing: antialiased;
}

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

h1, h2, h3 {
	margin: 0;
	line-height: 1.15;
	letter-spacing: -0.02em;
	text-wrap: balance;
}

p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

a { color: var(--blue-dark); text-underline-offset: 3px; }
a:hover { color: var(--blue); }

:focus-visible {
	outline: 3px solid var(--blue);
	outline-offset: 3px;
	border-radius: 6px;
}

svg {
	fill: none;
	stroke: currentColor;
	stroke-width: 1.8;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.container {
	width: 100%;
	max-width: 1160px;
	margin-inline: auto;
	padding-inline: 24px;
}

.visually-hidden {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip-path: inset(50%);
	white-space: nowrap;
}

.skip-link {
	position: absolute;
	left: 16px;
	top: -60px;
	z-index: 100;
	padding: 10px 16px;
	border-radius: 10px;
	background: var(--ink);
	color: #fff;
	text-decoration: none;
	transition: top .15s;
}
.skip-link:focus { top: 12px; color: #fff; }

/* ---------- Pulsanti ---------- */

.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	padding: 13px 24px;
	border: 1.5px solid transparent;
	border-radius: 999px;
	font-weight: 650;
	font-size: 1rem;
	line-height: 1.2;
	text-decoration: none;
	transition: background-color .15s, border-color .15s, color .15s, transform .15s, box-shadow .15s;
}
.btn:hover { transform: translateY(-1px); }

.btn-primary {
	background: var(--blue);
	color: #fff;
	box-shadow: 0 8px 20px rgba(31, 102, 255, .28);
}
.btn-primary:hover { background: var(--blue-dark); color: #fff; }

.btn-ghost {
	border-color: var(--line);
	background: #fff;
	color: var(--ink);
}
.btn-ghost:hover { border-color: var(--blue); color: var(--blue-dark); }

.btn-light {
	background: #fff;
	color: var(--navy);
	font-size: 1.125rem;
	padding: 15px 28px;
}
.btn-light:hover { background: #e9f1ff; color: var(--navy); }

/* ---------- Header ---------- */

.site-header {
	position: sticky;
	top: 0;
	z-index: 50;
	background: rgba(255, 255, 255, .88);
	-webkit-backdrop-filter: saturate(160%) blur(12px);
	backdrop-filter: saturate(160%) blur(12px);
	border-bottom: 1px solid var(--line);
}

.header-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
	min-height: var(--header-h);
}

.brand { display: inline-flex; flex: none; }
.brand img { width: auto; height: 50px; }

.site-nav ul {
	display: flex;
	align-items: center;
	gap: 6px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.site-nav a {
	display: block;
	padding: 9px 16px;
	border-radius: 999px;
	color: var(--ink);
	font-weight: 600;
	font-size: .975rem;
	text-decoration: none;
	transition: background-color .15s, color .15s;
}
.site-nav a:hover { background: var(--bg-alt); color: var(--blue-dark); }

.site-nav .nav-cta { background: var(--blue); color: #fff; margin-left: 6px; }
.site-nav .nav-cta:hover { background: var(--blue-dark); color: #fff; }

.nav-toggle {
	display: none;
	padding: 9px;
	border: 1px solid var(--line);
	border-radius: 12px;
	background: #fff;
	color: var(--ink);
	cursor: pointer;
}
.nav-toggle svg { display: block; }

/* ---------- Hero ---------- */

.hero {
	position: relative;
	overflow: hidden;
	background:
		radial-gradient(60% 70% at 100% 0%, rgba(143, 208, 236, .35), transparent 70%),
		radial-gradient(45% 60% at 0% 100%, rgba(31, 102, 255, .10), transparent 70%),
		linear-gradient(180deg, #f6f9ff, #ffffff);
}

.hero-inner {
	display: grid;
	grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
	align-items: center;
	gap: clamp(32px, 5vw, 72px);
	padding-block: clamp(56px, 9vw, 120px);
}

.eyebrow {
	margin: 0 0 18px;
	color: var(--blue-dark);
	font-size: .85rem;
	font-weight: 700;
	letter-spacing: .09em;
	text-transform: uppercase;
}

.hero h1 {
	font-size: clamp(2.1rem, 4.6vw, 3.5rem);
	font-weight: 800;
	letter-spacing: -0.03em;
}
.hero h1 span { color: var(--blue); }

.hero-points {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 14px;
	margin: 32px 0 0;
	padding: 0;
	list-style: none;
}

.hero-points li {
	padding: 14px 16px 14px 18px;
	border-left: 3px solid var(--blue);
	border-radius: 4px 12px 12px 4px;
	background: rgba(255, 255, 255, .8);
	box-shadow: var(--shadow);
	color: var(--muted);
	font-size: .95rem;
	line-height: 1.45;
}
.hero-points strong {
	display: block;
	margin-bottom: 2px;
	color: var(--ink);
	font-size: 1rem;
}

.hero-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	margin-top: 34px;
}

.hero-figure {
	margin: 0;
	padding: clamp(18px, 2.6vw, 34px);
	border: 1px solid var(--line);
	border-radius: 24px;
	background: #fff;
	box-shadow: var(--shadow-lift);
}

/* ---------- Sezioni ---------- */

.section { padding-block: clamp(64px, 9vw, 112px); }
.section-alt { background: var(--bg-alt); }

.section-head {
	max-width: 720px;
	margin: 0 auto clamp(36px, 5vw, 56px);
	text-align: center;
}
.section-head h2 {
	font-size: clamp(1.8rem, 3.4vw, 2.6rem);
	font-weight: 800;
}
.section-head p {
	margin-top: 12px;
	color: var(--muted);
	font-size: 1.125rem;
}

/* ---------- Valori ---------- */

.values {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 20px;
}

.value {
	padding: 28px 24px;
	border: 1px solid var(--line);
	border-radius: var(--radius);
	background: #fff;
	box-shadow: var(--shadow);
}

.value-icon {
	display: grid;
	place-items: center;
	width: 52px;
	height: 52px;
	margin-bottom: 18px;
	border-radius: 14px;
	background: #e8f0ff;
	color: var(--blue);
}
.value-icon svg { width: 26px; height: 26px; }

.value h3 { margin-bottom: 10px; font-size: 1.25rem; }
.value p { color: var(--muted); font-size: 1rem; }

/* ---------- Competenze ---------- */

.skills {
	display: grid;
	grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
	align-items: center;
	gap: clamp(32px, 6vw, 80px);
}

.skills-figure { margin: 0; }
.skills-figure img { width: 100%; max-width: 460px; margin-inline: auto; }

.skills-text { display: grid; gap: 20px; }

.skill {
	padding: 26px 28px;
	border: 1px solid var(--line);
	border-radius: var(--radius);
	background: #fff;
}
.skill h3 { margin-bottom: 12px; font-size: 1.35rem; }
.skill p { color: var(--muted); margin-bottom: .6em; }

/* ---------- Lavori ---------- */

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

.work {
	display: flex;
	flex-direction: column;
	overflow: hidden;
	border: 1px solid var(--line);
	border-radius: var(--radius);
	background: #fff;
	box-shadow: var(--shadow);
	transition: transform .2s, box-shadow .2s;
}
.work:hover { transform: translateY(-3px); box-shadow: var(--shadow-lift); }

.work-shot {
	display: block;
	overflow: hidden;
	border-bottom: 1px solid var(--line);
	background: #eef2f8;
	cursor: zoom-in;
}
.work-shot:focus-visible { outline-offset: -3px; border-radius: var(--radius) var(--radius) 0 0; }
.work-shot img {
	width: 100%;
	aspect-ratio: 16 / 10;
	object-fit: cover;
	object-position: top center;
	transition: transform .35s;
}
.work:hover .work-shot img { transform: scale(1.03); }

.work-body {
	display: flex;
	flex: 1;
	flex-direction: column;
	padding: 22px 24px 24px;
}
.work-body h3 { margin-bottom: 10px; font-size: 1.2rem; line-height: 1.25; }
.work-body p { color: var(--muted); font-size: .975rem; line-height: 1.6; }

.work-link {
	margin-top: auto;
	padding-top: 16px;
	font-weight: 650;
	font-size: .975rem;
	text-decoration: none;
}
.work-link:hover { text-decoration: underline; }

/* ---------- Contatti ---------- */

.contact {
	background:
		radial-gradient(50% 80% at 100% 0%, rgba(31, 102, 255, .35), transparent 70%),
		radial-gradient(40% 70% at 0% 100%, rgba(143, 208, 236, .16), transparent 70%),
		var(--navy);
	color: #fff;
}

.contact-inner { text-align: center; }

.contact-cta h2 {
	font-size: clamp(1.9rem, 3.8vw, 2.9rem);
	font-weight: 800;
}
.contact-cta p {
	max-width: 34em;
	margin: 18px auto 30px;
	color: #c9d4ea;
	font-size: 1.15rem;
}

.contact :focus-visible,
.site-footer :focus-visible { outline-color: #fff; }

/* ---------- Footer ---------- */

.site-footer {
	background: #091024;
	color: #a9b5cf;
	font-size: .925rem;
}

.footer-inner {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding-block: 22px;
}
.footer-inner p { margin: 0; }

.social {
	display: grid;
	place-items: center;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	background: rgba(255, 255, 255, .08);
	color: #fff;
	transition: background-color .15s;
}
.social:hover { background: var(--blue); color: #fff; }
.social svg { fill: currentColor; stroke: none; }

/* ---------- Lightbox ---------- */

.lightbox {
	max-width: none;
	max-height: none;
	padding: 0;
	border: 0;
	background: transparent;
	overflow: visible;
}
.lightbox::backdrop { background: rgba(9, 16, 36, .82); }
.lightbox img {
	max-width: min(94vw, 1400px);
	max-height: 88vh;
	border-radius: 12px;
	background: #fff;
	box-shadow: 0 30px 80px rgba(0, 0, 0, .5);
}
.lightbox-close {
	position: absolute;
	top: -18px;
	right: -18px;
	display: grid;
	place-items: center;
	width: 40px;
	height: 40px;
	border: 0;
	border-radius: 50%;
	background: #fff;
	color: var(--ink);
	box-shadow: 0 4px 14px rgba(0, 0, 0, .3);
	cursor: pointer;
}

/* ---------- Comparsa allo scorrimento ---------- */

@media (prefers-reduced-motion: no-preference) {
	html { scroll-behavior: smooth; }

	.js .reveal {
		opacity: 0;
		transform: translateY(18px);
		transition: opacity .6s ease, transform .6s ease;
	}
	.js .reveal.in { opacity: 1; transform: none; }
	.js .work.reveal.in { transition: opacity .6s ease, transform .2s, box-shadow .2s; }
}

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

/* ---------- Responsive ---------- */

@media (max-width: 1000px) {
	.values { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.works { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 860px) {
	.hero-inner,
	.skills { grid-template-columns: minmax(0, 1fr); }

	.skills-figure img { max-width: 340px; }
}

@media (max-width: 680px) {
	body { font-size: 1rem; }
	.container { padding-inline: 18px; }

	.js .nav-toggle { display: block; }

	.js .site-nav {
		position: absolute;
		inset: 100% 0 auto 0;
		display: none;
		padding: 10px 18px 18px;
		border-bottom: 1px solid var(--line);
		background: #fff;
		box-shadow: 0 18px 30px rgba(19, 26, 42, .10);
	}
	.js .site-nav.open { display: block; }
	.js .site-nav ul { flex-direction: column; align-items: stretch; gap: 4px; }
	.js .site-nav a { padding: 12px 14px; border-radius: 12px; }
	.js .site-nav .nav-cta { margin: 6px 0 0; text-align: center; }

	/* senza JavaScript il menu resta visibile e va a capo */
	.header-inner { flex-wrap: wrap; row-gap: 4px; padding-block: 8px; }
	.js .header-inner { flex-wrap: nowrap; padding-block: 0; }
	.site-nav ul { flex-wrap: wrap; }
	.brand img { height: 40px; }

	.hero-points { grid-template-columns: minmax(0, 1fr); }
	.hero-actions .btn { flex: 1 1 auto; }

	.values,
	.works { grid-template-columns: minmax(0, 1fr); }

	.lightbox-close { top: 8px; right: 8px; }
}
