/* ==========================================================================
   Chicco Tech ON AIR — stili
   ========================================================================== */

@view-transition { navigation: auto; }

:root {
	--bg: #050505;
	--surface: #0d0d0d;
	--surface-2: #141414;
	--line: rgba(255, 255, 255, .1);
	--line-strong: rgba(255, 255, 255, .2);
	--ink: #f4f4ee;
	--muted: #a3a39a;
	--yellow: #ffff00;
	--yellow-soft: rgba(255, 255, 0, .14);
	--red: #ff3b30;

	--font: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

	--radius: 22px;
	--radius-sm: 12px;
	--header-h: 76px;
	--wrap: 1320px;
	--gutter: clamp(16px, 4vw, 40px);
	--ease: cubic-bezier(.2, .8, .2, 1);
}

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

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

body {
	margin: 0;
	background:
		linear-gradient(rgba(255, 255, 255, .025) 1px, transparent 1px) 0 0 / 48px 48px,
		linear-gradient(90deg, rgba(255, 255, 255, .025) 1px, transparent 1px) 0 0 / 48px 48px,
		var(--bg);
	color: var(--ink);
	font: 400 16px/1.7 var(--font);
	-webkit-font-smoothing: antialiased;
	overflow-x: hidden;
}

img, svg, video, canvas { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
::selection { background: var(--yellow); color: #000; }

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

.icon { width: 1.1em; height: 1.1em; flex: none; }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.wrap-narrow { width: 100%; max-width: 820px; margin-inline: auto; padding-inline: var(--gutter); }

.screen-reader-text {
	position: absolute !important;
	width: 1px; height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}

.skip-link {
	position: fixed;
	top: 12px; left: 12px;
	z-index: 10000;
	padding: 10px 16px;
	background: var(--yellow);
	color: #000;
	font-weight: 700;
	border-radius: 8px;
	transform: translateY(-150%);
	transition: transform .2s;
}
.skip-link:focus { transform: none; }

/* --- Header -------------------------------------------------------------- */
.site-header {
	position: fixed;
	inset: 0 0 auto;
	z-index: 100;
	height: var(--header-h);
	transition: transform .45s var(--ease);
}
/* Lo sfondo sfocato sta su uno pseudo-elemento: se fosse sull'header stesso,
   il menu mobile (position: fixed) resterebbe "chiuso" nell'altezza dell'header. */
.site-header::before {
	content: '';
	position: absolute;
	inset: 0;
	z-index: -1;
	background: rgba(5, 5, 5, .72);
	-webkit-backdrop-filter: blur(14px) saturate(1.4);
	backdrop-filter: blur(14px) saturate(1.4);
	opacity: 0;
	transition: opacity .3s;
}
.site-header.is-scrolled::before { opacity: 1; }
body.nav-open .site-header { transform: none; }
body.nav-open .site-header::before { opacity: 0; }
body.nav-open .to-top, body.nav-open .share { opacity: 0; pointer-events: none; }
.site-header.is-hidden { transform: translateY(-100%); }

.header-inner {
	height: 100%;
	max-width: 1480px;
	margin-inline: auto;
	padding-inline: var(--gutter);
	display: flex;
	align-items: center;
	gap: 24px;
}

.brand { flex: none; }
.brand img { max-height: 44px; width: auto; }
.brand-text {
	color: var(--yellow);
	font-weight: 800;
	font-size: 22px;
	letter-spacing: .06em;
	text-transform: uppercase;
}

.main-nav { margin-left: auto; }
.nav-list {
	display: flex;
	gap: 6px;
	margin: 0; padding: 0;
	list-style: none;
}
.nav-list a {
	position: relative;
	display: block;
	padding: 8px 14px;
	font-size: 14px;
	font-weight: 500;
	border-radius: 999px;
	transition: color .2s, background-color .2s;
}
.nav-list a:hover { background: rgba(255, 255, 255, .07); }
.nav-list a.is-active,
.nav-list .current-menu-item:not(.menu-item-home) > a { color: var(--yellow); }
.nav-list a.is-active::after {
	content: '';
	position: absolute;
	left: 50%; bottom: 2px;
	width: 4px; height: 4px;
	border-radius: 50%;
	background: var(--yellow);
	transform: translateX(-50%);
}

.header-actions { display: flex; align-items: center; gap: 10px; }

.on-air {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 7px 14px;
	border: 1px solid rgba(255, 59, 48, .45);
	border-radius: 999px;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: .14em;
	text-transform: uppercase;
	color: #fff;
	background: rgba(255, 59, 48, .08);
	transition: background-color .2s, box-shadow .2s;
}
.on-air:hover { background: rgba(255, 59, 48, .2); box-shadow: 0 0 24px rgba(255, 59, 48, .35); }

.on-air-dot {
	display: inline-block;
	width: 8px; height: 8px;
	border-radius: 50%;
	background: var(--red);
	box-shadow: 0 0 0 0 rgba(255, 59, 48, .7);
	animation: onair 1.6s infinite;
}
@keyframes onair {
	0% { box-shadow: 0 0 0 0 rgba(255, 59, 48, .7); }
	70% { box-shadow: 0 0 0 9px rgba(255, 59, 48, 0); }
	100% { box-shadow: 0 0 0 0 rgba(255, 59, 48, 0); }
}

.menu-toggle {
	display: none;
	width: 44px; height: 44px;
	border: 1px solid var(--line-strong);
	border-radius: 50%;
	background: transparent;
	cursor: pointer;
	place-items: center;
}
.menu-toggle-bars { display: grid; gap: 4px; width: 18px; }
.menu-toggle-bars i {
	display: block;
	height: 2px;
	background: currentColor;
	border-radius: 2px;
	transition: transform .3s var(--ease), opacity .2s;
}
.menu-toggle[aria-expanded="true"] i:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] i:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] i:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* Scala di sintonia */
.tuner {
	position: absolute;
	left: 0; right: 0; bottom: 0;
	height: 7px;
	opacity: 0;
	transition: opacity .3s;
	pointer-events: none;
}
.site-header.is-scrolled .tuner { opacity: 1; }
.tuner-scale {
	position: absolute;
	inset: 0;
	background:
		repeating-linear-gradient(90deg, rgba(255, 255, 255, .35) 0 1px, transparent 1px 50px) bottom / 100% 7px no-repeat,
		repeating-linear-gradient(90deg, rgba(255, 255, 255, .18) 0 1px, transparent 1px 10px) bottom / 100% 3px no-repeat;
}
.tuner-needle {
	position: absolute;
	bottom: 0; left: 0;
	width: 2px; height: 12px;
	background: var(--red);
	box-shadow: 0 0 10px var(--red);
	transform: translateX(calc(var(--p, 0) * (100vw - 2px)));
	will-change: transform;
}

/* --- Bottoni ------------------------------------------------------------- */
.btn {
	--tx: 0px; --ty: 0px;
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	min-height: 52px;
	padding: 0 26px;
	border: 1px solid transparent;
	border-radius: 999px;
	font-weight: 700;
	font-size: 15px;
	cursor: pointer;
	transform: translate(var(--tx), var(--ty));
	transition: transform .25s var(--ease), background-color .2s, color .2s, box-shadow .25s, border-color .2s;
}
.btn-primary { background: var(--yellow); color: #000; }
.btn-primary:hover { box-shadow: 0 10px 40px rgba(255, 255, 0, .35); }
.btn-ghost { border-color: var(--line-strong); background: rgba(255, 255, 255, .04); }
.btn-ghost:hover { border-color: var(--ink); background: rgba(255, 255, 255, .1); }
.btn .icon { width: 18px; height: 18px; }

.link-arrow {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-size: 14px;
	font-weight: 700;
	color: var(--yellow);
}
.link-arrow .icon { transition: transform .25s var(--ease); }
.link-arrow:hover .icon { transform: translateX(5px); }

/* --- Hero ---------------------------------------------------------------- */
.hero {
	position: relative;
	min-height: 100svh;
	display: flex;
	align-items: center;
	padding: calc(var(--header-h) + 40px) 0 140px;
	overflow: hidden;
	isolation: isolate;
}

.hero-bg {
	position: absolute;
	inset: 0;
	z-index: -3;
	width: 100%; height: 100%;
	object-fit: cover;
	object-position: 70% 20%;
	transform: scale(calc(1.05 + var(--hero-p, 0) * .08)) translateY(calc(var(--hero-p, 0) * 40px));
	filter: saturate(1.05) contrast(1.05);
}
.hero::before {
	content: '';
	position: absolute;
	inset: 0;
	z-index: -2;
	background:
		linear-gradient(90deg, rgba(5, 5, 5, .96) 0%, rgba(5, 5, 5, .78) 38%, rgba(5, 5, 5, .15) 75%),
		linear-gradient(0deg, var(--bg) 2%, transparent 40%);
}

.hero-spectrum {
	position: absolute;
	left: 0; right: 0; bottom: 0;
	z-index: -1;
	width: 100%;
	height: 42%;
	opacity: .9;
	pointer-events: none;
}

.hero-grain {
	position: absolute;
	inset: -50%;
	z-index: -1;
	opacity: .07;
	pointer-events: none;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
	animation: grain 1s steps(4) infinite;
}
@keyframes grain {
	0% { transform: translate(0, 0); }
	25% { transform: translate(-3%, 2%); }
	50% { transform: translate(2%, -3%); }
	75% { transform: translate(-2%, -1%); }
}

.hero-content { position: relative; }

.eyebrow {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	margin: 0 0 18px;
	color: var(--yellow);
	font-size: clamp(13px, 1.4vw, 16px);
	font-weight: 700;
	letter-spacing: .18em;
	text-transform: uppercase;
}
.rec {
	width: 10px; height: 10px;
	border-radius: 50%;
	background: var(--red);
	animation: blink 1.2s steps(2) infinite;
}
@keyframes blink { 50% { opacity: .15; } }

.hero-title {
	margin: 0;
	font-size: clamp(56px, 13vw, 190px);
	font-weight: 800;
	line-height: .88;
	letter-spacing: -.04em;
	text-transform: uppercase;
}
.hero-title .scramble { display: block; }
.hero-title .accent {
	color: var(--yellow);
	text-shadow: 0 0 60px rgba(255, 255, 0, .35);
}

.hero-sub {
	max-width: 36ch;
	margin: 28px 0 36px;
	font-size: clamp(16px, 1.8vw, 21px);
	color: #e2e2da;
}
.type-caret::after {
	content: '_';
	margin-left: 2px;
	color: var(--yellow);
	animation: blink 1s steps(2) infinite;
}

.hero-ctas { display: flex; flex-wrap: wrap; gap: 14px; }

.scroll-hint {
	position: absolute;
	left: 50%; bottom: 28px;
	width: 26px; height: 42px;
	border: 2px solid rgba(255, 255, 255, .5);
	border-radius: 20px;
	transform: translateX(-50%);
}
.scroll-hint span {
	position: absolute;
	left: 50%; top: 8px;
	width: 4px; height: 8px;
	margin-left: -2px;
	border-radius: 2px;
	background: var(--yellow);
	animation: scrollhint 1.8s var(--ease) infinite;
}
@keyframes scrollhint {
	0% { opacity: 0; transform: translateY(0); }
	30% { opacity: 1; }
	100% { opacity: 0; transform: translateY(14px); }
}

/* --- Sezioni ------------------------------------------------------------- */
.section { padding: clamp(80px, 11vw, 150px) 0; position: relative; }
.section + .section { border-top: 1px solid var(--line); }

.section-head {
	display: grid;
	grid-template-columns: 1fr auto;
	align-items: end;
	gap: 8px 24px;
	margin-bottom: clamp(32px, 5vw, 56px);
}
.section-head .section-kicker { grid-column: 1 / -1; }

.section-kicker {
	margin: 0 0 6px;
	color: var(--muted);
	font-size: 13px;
	letter-spacing: .16em;
	text-transform: uppercase;
}

.section-title,
.page-title {
	margin: 0;
	font-size: clamp(34px, 6vw, 72px);
	font-weight: 800;
	line-height: 1;
	letter-spacing: -.03em;
	text-transform: uppercase;
}
.section-title > span,
.page-title > span { color: var(--yellow); margin-right: .1em; }

.empty-note { color: var(--muted); }
.empty-note a { color: var(--yellow); text-decoration: underline; }

/* --- Card (video + articoli) --------------------------------------------- */
.card {
	--mx: 50%; --my: 50%;
	position: relative;
	display: flex;
	flex-direction: column;
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	overflow: hidden;
	transition: transform .4s var(--ease), border-color .3s, box-shadow .4s;
}
.card::before {
	content: '';
	position: absolute;
	inset: 0;
	z-index: 1;
	border-radius: inherit;
	background: radial-gradient(420px circle at var(--mx) var(--my), rgba(255, 255, 0, .12), transparent 45%);
	opacity: 0;
	transition: opacity .3s;
	pointer-events: none;
}
.card:hover {
	transform: translateY(-6px);
	border-color: rgba(255, 255, 0, .45);
	box-shadow: 0 24px 60px -20px rgba(0, 0, 0, .8), 0 0 0 1px rgba(255, 255, 0, .08);
}
.card:hover::before { opacity: 1; }

.card-media {
	position: relative;
	display: block;
	aspect-ratio: 16 / 9;
	overflow: hidden;
	background: var(--surface-2);
}
.card-media img {
	width: 100%; height: 100%;
	object-fit: cover;
	transition: transform .7s var(--ease), filter .4s;
}
.card:hover .card-media img { transform: scale(1.06); }
.card-media-empty {
	display: grid;
	place-items: center;
	height: 100%;
	color: var(--yellow);
}
.card-media-empty .icon { width: 48px; height: 48px; opacity: .6; }

.card-play {
	position: absolute;
	left: 50%; top: 50%;
	display: grid;
	place-items: center;
	width: 64px; height: 64px;
	border-radius: 50%;
	background: var(--yellow);
	color: #000;
	transform: translate(-50%, -50%) scale(.8);
	opacity: 0;
	transition: transform .35s var(--ease), opacity .3s;
	box-shadow: 0 0 0 10px rgba(255, 255, 0, .18);
}
.card-play .icon { width: 28px; height: 28px; margin-left: 3px; }
.card:hover .card-play,
.card-media:focus-visible .card-play { transform: translate(-50%, -50%) scale(1); opacity: 1; }

.badge {
	position: absolute;
	top: 14px; left: 14px;
	z-index: 2;
	padding: 5px 10px;
	border-radius: 999px;
	background: rgba(0, 0, 0, .75);
	-webkit-backdrop-filter: blur(6px);
	backdrop-filter: blur(6px);
	color: var(--yellow);
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .12em;
	text-transform: uppercase;
}
.badge-new { background: var(--red); color: #fff; }

.card-body { position: relative; z-index: 2; display: flex; flex-direction: column; gap: 10px; padding: 22px 24px 26px; flex: 1; }

.card-meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px 16px;
	margin: 0;
	color: var(--muted);
	font-size: 12px;
	letter-spacing: .08em;
	text-transform: uppercase;
}
.card-meta > * { display: inline-flex; align-items: center; gap: 8px; }
.card-meta > * + *::before { content: ''; width: 4px; height: 4px; border-radius: 50%; background: var(--yellow); opacity: .6; }
.card-meta .badge { position: static; }
.card-meta .badge + *::before { display: none; }

.card-title {
	margin: 0;
	font-size: 19px;
	line-height: 1.35;
	font-weight: 700;
}
.card-title a { background: linear-gradient(var(--yellow), var(--yellow)) 0 100% / 0 2px no-repeat; transition: background-size .35s var(--ease), color .2s; }
.card:hover .card-title a { color: var(--yellow); }
.card-title a::after { content: ''; position: absolute; inset: 0; z-index: 1; }

.card-excerpt { margin: 0; color: var(--muted); font-size: 14px; }

/* Griglia video: il primo è in evidenza */
.video-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 22px;
}
.video-card.is-featured { grid-column: span 2; grid-row: span 2; }
.video-card.is-featured .card-title { font-size: clamp(22px, 2.6vw, 34px); }
.video-card.is-featured .card-body { padding: 28px 32px 34px; flex: none; }
.video-card.is-featured .card-play { width: 88px; height: 88px; opacity: 1; transform: translate(-50%, -50%) scale(1); }
.video-card.is-featured .card-play .icon { width: 38px; height: 38px; }
.video-card.is-featured .card-media { flex: 1; aspect-ratio: auto; min-height: 280px; }

/* Shorts */
.shorts { margin-top: clamp(56px, 8vw, 90px); }
.shorts-title {
	display: flex;
	align-items: center;
	gap: 12px;
	margin: 0 0 22px;
	font-size: 22px;
	text-transform: uppercase;
}
.shorts-logo {
	display: grid;
	place-items: center;
	width: 34px; height: 34px;
	border-radius: 10px;
	background: var(--red);
	color: #fff;
	font-size: 13px;
}
.shorts-row {
	display: grid;
	grid-auto-flow: column;
	grid-auto-columns: minmax(180px, 220px);
	gap: 16px;
	overflow-x: auto;
	padding-bottom: 14px;
	scroll-snap-type: x mandatory;
	scrollbar-width: thin;
	scrollbar-color: var(--yellow) transparent;
	cursor: grab;
}
.shorts-row.is-dragging { cursor: grabbing; scroll-snap-type: none; }
.shorts-row.is-dragging a { pointer-events: none; }
.short-card {
	position: relative;
	display: block;
	aspect-ratio: 9 / 16;
	border-radius: 18px;
	overflow: hidden;
	background: var(--surface-2);
	scroll-snap-align: start;
	border: 1px solid var(--line);
	transition: transform .35s var(--ease), border-color .3s;
}
.short-card:hover { transform: translateY(-6px) rotate(-1deg); border-color: var(--yellow); }
.short-card img { width: 100%; height: 100%; object-fit: cover; }
.short-card::after {
	content: '';
	position: absolute;
	inset: 0;
	background: linear-gradient(0deg, rgba(0, 0, 0, .9) 0%, transparent 55%);
}
.short-title {
	position: absolute;
	left: 14px; right: 14px; bottom: 34px;
	z-index: 1;
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
	font-size: 13px;
	font-weight: 700;
	line-height: 1.35;
}
.short-views {
	position: absolute;
	left: 14px; bottom: 12px;
	z-index: 1;
	color: var(--yellow);
	font-size: 11px;
	text-transform: uppercase;
	letter-spacing: .08em;
}

/* Articoli */
.post-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 22px;
}

/* --- Chi sono ------------------------------------------------------------ */
.section-about {
	background: radial-gradient(900px 500px at 85% 30%, rgba(255, 255, 0, .06), transparent 70%);
}
.about-grid {
	display: grid;
	grid-template-columns: 1.15fr .85fr;
	gap: clamp(40px, 7vw, 100px);
	align-items: center;
}
.about-text { margin-top: 28px; font-size: clamp(16px, 1.5vw, 18px); color: #deded6; }
.about-text p { margin: 0 0 1.1em; }
.about-text b, .about-text strong { color: var(--yellow); font-weight: 700; }

.tags {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 26px 0 0;
	padding: 0;
	list-style: none;
}
.tags li, .tags a {
	padding: 6px 14px;
	border: 1px solid var(--line-strong);
	border-radius: 999px;
	font-size: 13px;
	transition: border-color .2s, color .2s, background-color .2s;
}
.tags li:hover { border-color: var(--yellow); color: var(--yellow); background: var(--yellow-soft); }
.tags li:has(a) { padding: 0; border: 0; }

.about-photo {
	--rx: 0deg; --ry: 0deg;
	position: relative;
	margin: 0;
	border-radius: var(--radius);
	transform: perspective(900px) rotateX(var(--rx)) rotateY(var(--ry));
	transition: transform .3s var(--ease);
	transform-style: preserve-3d;
}
.about-photo::before {
	content: '';
	position: absolute;
	inset: 0;
	border: 2px solid var(--yellow);
	border-radius: inherit;
	transform: translate(18px, 18px) translateZ(-40px);
}
.about-photo img {
	position: relative;
	width: 100%;
	border-radius: inherit;
	background: #111;
	filter: grayscale(1) contrast(1.1);
	transition: filter .5s;
}
.about-photo:hover img { filter: grayscale(0) contrast(1.05); }
.about-photo figcaption {
	position: absolute;
	left: 18px; bottom: 18px;
	display: inline-flex;
	align-items: center;
	gap: 10px;
	padding: 9px 14px;
	border-radius: 999px;
	background: rgba(0, 0, 0, .8);
	-webkit-backdrop-filter: blur(6px);
	backdrop-filter: blur(6px);
	font-size: 12px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .1em;
	transform: translateZ(40px);
}

/* --- Contatti ------------------------------------------------------------ */
.contact-grid {
	display: grid;
	grid-template-columns: .8fr 1.2fr;
	gap: clamp(40px, 6vw, 90px);
	align-items: start;
}
.contact-intro { margin: 24px 0 30px; font-size: 18px; color: #deded6; }
.contact-links { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.contact-links a {
	display: inline-flex;
	align-items: center;
	gap: 14px;
	color: var(--muted);
	transition: color .2s;
	word-break: break-all;
}
.contact-links a:hover { color: var(--yellow); }
.contact-links .icon {
	width: 40px; height: 40px;
	padding: 10px;
	border: 1px solid var(--line-strong);
	border-radius: 50%;
	transition: border-color .2s, background-color .2s;
}
.contact-links a:hover .icon { border-color: var(--yellow); background: var(--yellow-soft); }

.contact-grid .section-title { font-size: clamp(34px, 4.6vw, 60px); }

/* --- Footer -------------------------------------------------------------- */
.site-footer { border-top: 1px solid var(--line); background: #030303; padding-bottom: var(--sb-h, 0px); }

.footer-cta { padding-block: clamp(70px, 10vw, 130px) clamp(50px, 7vw, 80px); }
.footer-cta-kicker { margin: 0 0 16px; color: var(--muted); letter-spacing: .16em; text-transform: uppercase; font-size: 13px; }
.footer-cta-big {
	display: inline-flex;
	align-items: center;
	gap: .3em;
	font-size: clamp(38px, 8.5vw, 124px);
	font-weight: 800;
	line-height: .95;
	letter-spacing: -.04em;
	text-transform: uppercase;
	-webkit-text-stroke: 1.5px var(--ink);
	color: transparent;
	background: linear-gradient(var(--yellow), var(--yellow)) 0 0 / 0 100% no-repeat;
	-webkit-background-clip: text;
	background-clip: text;
	transition: background-size .7s var(--ease), -webkit-text-stroke-color .3s;
}
.footer-cta-big:hover { background-size: 100% 100%; -webkit-text-stroke-color: var(--yellow); }
.footer-cta-big .icon { width: .8em; height: .8em; color: var(--yellow); transition: transform .4s var(--ease); }
.footer-cta-big:hover .icon { transform: translateX(.15em) rotate(-45deg); }

.footer-grid {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	align-items: flex-end;
	gap: 30px;
	padding-block: 40px 50px;
	border-top: 1px solid var(--line);
}
.footer-logo { margin: 0 0 12px; color: var(--yellow); font-weight: 800; font-size: 22px; letter-spacing: .06em; text-transform: uppercase; }
.footer-legal { color: var(--muted); font-size: 13px; }
.footer-legal p { margin: 0 0 4px; }
.footer-legal strong { color: var(--ink); }
.footer-legal a:hover { color: var(--yellow); }
.footer-nav ul { display: flex; flex-wrap: wrap; gap: 18px; margin: 0; padding: 0; list-style: none; font-size: 13px; color: var(--muted); }
.footer-nav a:hover { color: var(--yellow); }

.socials { display: flex; gap: 10px; margin: 0; padding: 0; list-style: none; }
.socials a {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 10px 16px;
	border: 1px solid var(--line-strong);
	border-radius: 999px;
	font-size: 13px;
	transition: border-color .2s, color .2s, background-color .2s;
}
.socials a:hover { border-color: var(--yellow); color: var(--yellow); background: var(--yellow-soft); }
.socials .icon { width: 18px; height: 18px; }

.copyright-bar { background: var(--yellow); color: #000; font-size: 13px; }
.copyright-bar .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 20px; padding-block: 14px; }
.copyright-bar a { text-decoration: underline; }

.to-top {
	position: fixed;
	right: 20px; bottom: 20px;
	z-index: 90;
	display: grid;
	place-items: center;
	width: 48px; height: 48px;
	border: 0;
	border-radius: 50%;
	background: var(--yellow);
	color: #000;
	cursor: pointer;
	box-shadow: 0 10px 30px rgba(0, 0, 0, .5);
	opacity: 0;
	transform: translateY(20px);
	pointer-events: none;
	transition: opacity .3s, transform .3s var(--ease);
}
.to-top svg { width: 22px; height: 22px; }
.to-top.is-visible { opacity: 1; transform: none; pointer-events: auto; }
/* Il badge cookie di iubenda sta in basso a destra: lasciamogli spazio. */
body:has(.iubenda-tp-btn) .to-top { bottom: calc(76px + var(--sb-h, 0px)); }
.to-top { bottom: calc(20px + var(--sb-h, 0px)); }

/* --- Player video (modale) ----------------------------------------------- */
.video-modal {
	width: min(1100px, calc(100vw - 32px));
	max-height: calc(100vh - 32px);
	padding: 0;
	border: 0;
	background: transparent;
	color: var(--ink);
	overflow: visible;
}
.video-modal::backdrop {
	background: rgba(0, 0, 0, .88);
	-webkit-backdrop-filter: blur(8px);
	backdrop-filter: blur(8px);
}
.video-modal[open] { animation: modalin .35s var(--ease); }
@keyframes modalin { from { opacity: 0; transform: scale(.94) translateY(16px); } }
.video-modal-inner { position: relative; }
.video-modal-frame {
	aspect-ratio: 16 / 9;
	border-radius: var(--radius);
	overflow: hidden;
	background: #000;
	box-shadow: 0 0 0 1px rgba(255, 255, 0, .3), 0 40px 120px rgba(0, 0, 0, .8);
}
.video-modal.is-vertical { width: min(420px, calc(100vw - 32px)); }
.video-modal.is-vertical .video-modal-frame { aspect-ratio: 9 / 16; max-height: calc(100vh - 110px); margin-inline: auto; }
.video-modal-frame iframe { width: 100%; height: 100%; border: 0; }
.video-modal-close {
	position: absolute;
	top: -18px; right: -18px;
	z-index: 2;
	display: grid;
	place-items: center;
	width: 44px; height: 44px;
	border: 0;
	border-radius: 50%;
	background: var(--yellow);
	color: #000;
	cursor: pointer;
}
.video-modal-close .icon { width: 22px; height: 22px; }
.video-modal-yt { display: inline-flex; align-items: center; gap: 8px; margin-top: 14px; color: var(--muted); font-size: 13px; }
.video-modal-yt:hover { color: var(--yellow); }

/* --- Pagine interne ------------------------------------------------------ */
.page-main { padding-top: calc(var(--header-h) + clamp(40px, 7vw, 90px)); padding-bottom: clamp(60px, 9vw, 120px); }
.page-hero { margin-bottom: clamp(36px, 6vw, 64px); }
.page-lead { margin: 18px 0 0; max-width: 60ch; color: var(--muted); font-size: 18px; }

.blog-tools { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 18px; margin-top: 34px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
	padding: 8px 16px;
	border: 1px solid var(--line-strong);
	border-radius: 999px;
	font-size: 13px;
	transition: all .2s;
}
.chip:hover { border-color: var(--yellow); color: var(--yellow); }
.chip.is-active { background: var(--yellow); border-color: var(--yellow); color: #000; font-weight: 700; }

.search-form { position: relative; width: min(340px, 100%); }
.search-form input {
	width: 100%;
	padding: 12px 48px 12px 18px;
	border: 1px solid var(--line-strong);
	border-radius: 999px;
	background: var(--surface);
	color: var(--ink);
	font: inherit;
	font-size: 14px;
}
.search-form input:focus { outline: none; border-color: var(--yellow); box-shadow: 0 0 0 4px var(--yellow-soft); }
.search-form button {
	position: absolute;
	right: 6px; top: 50%;
	display: grid;
	place-items: center;
	width: 36px; height: 36px;
	border: 0;
	border-radius: 50%;
	background: var(--yellow);
	color: #000;
	transform: translateY(-50%);
	cursor: pointer;
}
.search-form button svg { width: 16px; height: 16px; }

.pagination { margin-top: 56px; }
.pagination .nav-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.pagination .page-numbers {
	display: grid;
	place-items: center;
	min-width: 46px; height: 46px;
	padding: 0 12px;
	border: 1px solid var(--line-strong);
	border-radius: 999px;
	font-weight: 700;
	transition: all .2s;
}
.pagination .page-numbers:hover { border-color: var(--yellow); color: var(--yellow); }
.pagination .page-numbers.current { background: var(--yellow); border-color: var(--yellow); color: #000; }

.empty-state { padding: 80px 0; text-align: center; color: var(--muted); }
.empty-code { color: var(--yellow); font-weight: 800; font-size: 24px; text-transform: uppercase; }

/* Articolo */
.read-progress { position: fixed; inset: 0 0 auto; z-index: 101; height: 3px; pointer-events: none; }
.read-progress span { display: block; height: 100%; background: var(--yellow); box-shadow: 0 0 12px var(--yellow); transform-origin: 0 50%; transform: scaleX(var(--read, 0)); }

.article-head .card-meta { margin-bottom: 22px; }
.article-title {
	margin: 0;
	font-size: clamp(32px, 5.4vw, 64px);
	font-weight: 800;
	line-height: 1.05;
	letter-spacing: -.03em;
	text-wrap: balance;
}
.article-cover { margin: clamp(36px, 5vw, 60px) auto; max-width: 1240px; }
.article-cover img { width: 100%; border-radius: var(--radius); border: 1px solid var(--line); }

.article-layout {
	display: grid;
	grid-template-columns: 1fr minmax(0, 760px) 1fr;
	gap: 30px;
	max-width: 1240px;
}
.article-layout .entry-content { grid-column: 2; }
.share {
	grid-column: 1;
	justify-self: end;
	position: sticky;
	top: calc(var(--header-h) + 30px);
	align-self: start;
	display: grid;
	gap: 10px;
	justify-items: center;
}
.share-label { writing-mode: vertical-rl; transform: rotate(180deg); color: var(--muted); font-size: 11px; letter-spacing: .2em; text-transform: uppercase; margin-bottom: 6px; }
.share a, .share button {
	display: grid;
	place-items: center;
	width: 44px; height: 44px;
	border: 1px solid var(--line-strong);
	border-radius: 50%;
	background: transparent;
	cursor: pointer;
	transition: all .2s;
}
.share a:hover, .share button:hover, .share button.is-copied { border-color: var(--yellow); color: var(--yellow); background: var(--yellow-soft); }
.share .icon { width: 18px; height: 18px; }

.entry-content { font-size: 17px; line-height: 1.85; color: #e2e2da; }
.entry-content > * { margin-block: 0 1.4em; }
.entry-content h2, .entry-content h3, .entry-content h4 {
	margin-top: 2.2em;
	color: var(--ink);
	line-height: 1.2;
	letter-spacing: -.02em;
}
.entry-content h2 { font-size: clamp(24px, 3vw, 34px); }
.entry-content h2::before { content: '// '; color: var(--yellow); }
.entry-content h3 { font-size: clamp(20px, 2.4vw, 25px); }
.entry-content a { color: var(--yellow); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.entry-content a:hover { text-decoration-thickness: 2px; }
.entry-content strong { color: var(--ink); }
.entry-content img, .entry-content video, .entry-content iframe { border-radius: var(--radius-sm); }
.entry-content figure { margin-inline: 0; }
.entry-content figcaption { color: var(--muted); font-size: 13px; text-align: center; margin-top: 10px; }
.entry-content blockquote {
	margin-inline: 0;
	padding: 20px 26px;
	border-left: 3px solid var(--yellow);
	background: var(--surface);
	border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
	font-size: 1.1em;
	color: var(--ink);
}
.entry-content blockquote p:last-child { margin-bottom: 0; }
.entry-content ul, .entry-content ol { padding-left: 1.3em; }
.entry-content li { margin-bottom: .5em; }
.entry-content ul li::marker { color: var(--yellow); content: '▸  '; }
.entry-content code { padding: 2px 6px; border-radius: 6px; background: var(--surface-2); color: var(--yellow); font-size: .9em; }
.entry-content pre { padding: 20px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); overflow-x: auto; }
.entry-content pre code { padding: 0; background: none; }
.entry-content table { width: 100%; border-collapse: collapse; font-size: 15px; }
.entry-content th, .entry-content td { padding: 12px; border-bottom: 1px solid var(--line); text-align: left; }
.entry-content th { color: var(--yellow); }
.entry-content hr { border: 0; height: 1px; background: var(--line-strong); margin-block: 3em; }
.entry-content .alignwide { margin-inline: calc(-1 * min(120px, 8vw)); }
.entry-content .alignfull { margin-inline: calc(50% - 50vw); max-width: 100vw; }
.entry-content .wp-block-embed__wrapper iframe, .entry-content iframe[src*="youtube"] { width: 100%; height: auto; aspect-ratio: 16 / 9; }
.entry-content .wp-block-button__link { background: var(--yellow); color: #000; border-radius: 999px; text-decoration: none; font-weight: 700; }

.article-foot { margin-top: 60px; }
.article-foot .tags { margin-bottom: 40px; }
.author-box {
	display: flex;
	gap: 22px;
	align-items: flex-start;
	padding: 26px;
	border: 1px solid var(--line);
	border-radius: var(--radius);
	background: var(--surface);
}
.author-box img { width: 72px; height: 72px; flex: none; border-radius: 50%; object-fit: cover; object-position: top; filter: grayscale(1); background: #222; }
.author-box p { margin: 0 0 8px; color: var(--muted); font-size: 14px; }
.author-box .author-name { color: var(--ink); font-weight: 700; font-size: 16px; }

.post-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 30px; }
.post-nav a {
	display: grid;
	gap: 6px;
	height: 100%;
	padding: 20px 22px;
	border: 1px solid var(--line);
	border-radius: var(--radius-sm);
	transition: border-color .2s;
}
.post-nav a:hover { border-color: var(--yellow); }
.post-nav small { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .1em; }
.post-nav span { font-weight: 700; line-height: 1.35; }
.post-nav-next { grid-column: 2; text-align: right; }

.related { border-top: 1px solid var(--line); margin-top: 80px; }
.related .section-title { margin-bottom: 40px; font-size: clamp(28px, 4vw, 44px); }

/* Commenti */
.comments { margin-top: 70px; }
.comments .section-title { font-size: 28px; margin-bottom: 26px; }
.comment-list { list-style: none; padding: 0; }
.comment-list .comment-body { padding: 20px 0; border-bottom: 1px solid var(--line); }
.comment-list .children { list-style: none; padding-left: 28px; }
.comment-author img { border-radius: 50%; display: inline-block; vertical-align: middle; margin-right: 10px; }
.comment-metadata { font-size: 12px; color: var(--muted); }
.comment-respond { margin-top: 40px; }
.comment-form label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.comment-form input[type="text"], .comment-form input[type="email"], .comment-form input[type="url"], .comment-form textarea {
	width: 100%;
	padding: 14px 16px;
	border: 1px solid var(--line-strong);
	border-radius: var(--radius-sm);
	background: var(--surface);
	color: var(--ink);
	font: inherit;
}
.comment-form textarea:focus, .comment-form input:focus { outline: none; border-color: var(--yellow); }

/* 404 */
.error-404 { min-height: 80vh; display: flex; align-items: center; text-align: center; }
.error-404 .hero-ctas { justify-content: center; margin-top: 30px; }
.error-404 .page-lead { margin-inline: auto; }
.glitch { position: relative; font-size: clamp(60px, 14vw, 160px); color: var(--yellow); }
.glitch::before, .glitch::after {
	content: attr(data-text);
	position: absolute;
	inset: 0;
	overflow: hidden;
}
.glitch::before { color: #0ff; transform: translate(-3px, 0); clip-path: inset(0 0 60% 0); animation: glitch 2.2s infinite steps(1); mix-blend-mode: screen; }
.glitch::after { color: var(--red); transform: translate(3px, 0); clip-path: inset(55% 0 0 0); animation: glitch 1.7s infinite reverse steps(1); mix-blend-mode: screen; }
@keyframes glitch {
	0% { clip-path: inset(0 0 80% 0); }
	20% { clip-path: inset(30% 0 40% 0); }
	40% { clip-path: inset(70% 0 5% 0); }
	60% { clip-path: inset(10% 0 70% 0); }
	80% { clip-path: inset(50% 0 20% 0); }
}
.static {
	height: 6px;
	max-width: 420px;
	margin: 30px auto 0;
	border-radius: 3px;
	background: repeating-linear-gradient(90deg, var(--yellow) 0 2px, transparent 2px 6px);
	opacity: .5;
	animation: grain .4s steps(3) infinite;
}

/* --- Nerd mode ---------------------------------------------------------- */
kbd {
	display: inline-grid;
	place-items: center;
	min-width: 1.7em;
	padding: 1px 6px;
	border: 1px solid var(--line-strong);
	border-bottom-width: 2px;
	border-radius: 6px;
	background: rgba(255, 255, 255, .05);
	font: 700 11px/1.5 var(--font);
	color: var(--ink);
}

/* Prompt nella hero */
.prompt {
	margin: 0 0 22px;
	font-size: clamp(13px, 1.4vw, 16px);
	color: var(--muted);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.prompt-user { color: #7CFC9A; font-weight: 700; }
.prompt-path { color: #6cb6ff; font-weight: 700; }
.prompt-sep { margin-right: 6px; }
.prompt-sep:first-of-type { margin-right: 0; }
.prompt-cmd { color: var(--ink); }
[data-type] { color: var(--ink); }
[data-type].is-typing::after {
	content: '';
	display: inline-block;
	width: .6em; height: 1.1em;
	margin-left: 2px;
	vertical-align: -3px;
	background: var(--yellow);
	animation: blink 1s steps(2) infinite;
}
.section-kicker [data-type] { text-transform: none; letter-spacing: .04em; }

.hero-cursor {
	display: inline-block;
	width: .5em; height: .78em;
	margin-left: .08em;
	background: var(--yellow);
	vertical-align: baseline;
	animation: blink 1s steps(2) infinite;
	box-shadow: 0 0 40px rgba(255, 255, 0, .5);
}
.hero-sub .comment { color: var(--muted); }
.type-caret::after { display: none; }

.btn-key { border: 1px dashed var(--line-strong); background: transparent; gap: 6px; }
.btn-key:hover { border-color: var(--yellow); color: var(--yellow); }
.btn-key span { margin-left: 4px; }

/* Log di avvio */
.boot-log {
	position: absolute;
	right: var(--gutter); bottom: 110px;
	z-index: 1;
	margin: 0; padding: 14px 18px;
	list-style: none;
	font-size: 12px;
	line-height: 1.8;
	color: #cfcfc6;
	background: rgba(0, 0, 0, .55);
	border: 1px solid var(--line);
	border-radius: 10px;
	-webkit-backdrop-filter: blur(6px);
	backdrop-filter: blur(6px);
}
.boot-log .ok { color: #7CFC9A; }
.boot-log .warn { color: #ffb020; }
.boot-log .live { color: var(--red); font-weight: 700; }
.js .boot-log li { opacity: 0; animation: bootline .01s forwards; }
.js .boot-log li:nth-child(1) { animation-delay: 1.1s; }
.js .boot-log li:nth-child(2) { animation-delay: 1.5s; }
.js .boot-log li:nth-child(3) { animation-delay: 1.9s; }
.js .boot-log li:nth-child(4) { animation-delay: 2.5s; }
.js .boot-log li:nth-child(5) { animation-delay: 3.1s; }
@keyframes bootline { to { opacity: 1; } }

/* Effetto monitor CRT */
.hero-scanlines {
	position: absolute;
	inset: 0;
	z-index: -1;
	pointer-events: none;
	background: repeating-linear-gradient(0deg, rgba(0, 0, 0, .28) 0 1px, transparent 1px 3px);
	mix-blend-mode: multiply;
}
.hero::after {
	content: '';
	position: absolute;
	inset: 0;
	z-index: -1;
	pointer-events: none;
	background: radial-gradient(ellipse at center, transparent 55%, rgba(0, 0, 0, .55) 100%);
}

/* Titoli con glitch al passaggio del mouse */
.section-kicker .k-path { color: #7CFC9A; text-transform: none; letter-spacing: .04em; }
.glitch-hover { position: relative; display: inline-block; }
.glitch-hover::before, .glitch-hover::after {
	content: attr(data-text);
	position: absolute;
	inset: 0;
	opacity: 0;
	pointer-events: none;
}
.glitch-hover::before { color: #0ff; }
.glitch-hover::after { color: var(--red); }
.section-title:hover .glitch-hover::before { opacity: .8; animation: glitchx .35s steps(2) infinite; mix-blend-mode: screen; }
.section-title:hover .glitch-hover::after { opacity: .8; animation: glitchx .3s steps(2) infinite reverse; mix-blend-mode: screen; }
@keyframes glitchx {
	0% { transform: translate(-3px, 1px); clip-path: inset(0 0 55% 0); }
	50% { transform: translate(3px, -1px); clip-path: inset(45% 0 0 0); }
	100% { transform: translate(-2px, 0); clip-path: inset(20% 0 40% 0); }
}

.shorts-hint { margin-left: auto; color: var(--muted); font-size: 12px; font-weight: 400; text-transform: none; }

/* Neofetch */
.neofetch {
	margin-top: 34px;
	border: 1px solid var(--line-strong);
	border-radius: 14px;
	background: rgba(0, 0, 0, .7);
	overflow: hidden;
	box-shadow: 0 30px 80px -30px rgba(0, 0, 0, .9);
}
.term-bar {
	display: flex;
	align-items: center;
	gap: 7px;
	padding: 10px 14px;
	background: #151515;
	border-bottom: 1px solid var(--line);
	font-size: 12px;
	color: var(--muted);
}
.term-bar i { width: 11px; height: 11px; border-radius: 50%; background: #ff5f57; }
.term-bar i:nth-child(2) { background: #febc2e; }
.term-bar i:nth-child(3) { background: #28c840; }
.term-bar span { margin-left: auto; margin-right: auto; padding-right: 50px; }
.neofetch-body { display: flex; gap: 28px; padding: 22px 24px; align-items: flex-start; }
.neofetch-art { margin: 0; color: var(--yellow); font: 700 13px/1.25 var(--font); text-shadow: 0 0 12px rgba(255, 255, 0, .4); }
.neofetch-info { min-width: 0; font-size: 14px; line-height: 1.6; }
.neofetch-info p { margin: 0; }
.neofetch-host { font-weight: 700; }
.neofetch-host span { color: var(--yellow); }
.neofetch-rule { color: var(--muted); }
.neofetch-info dl { margin: 4px 0 0; }
.neofetch-info dl div { display: flex; flex-wrap: wrap; gap: 0 8px; }
.neofetch-info dt { color: var(--yellow); font-weight: 700; }
.neofetch-info dt::after { content: ':'; color: var(--ink); }
.neofetch-info dd { margin: 0; color: #deded6; }
.neofetch-colors { display: flex; margin-top: 12px !important; }
.neofetch-colors i { width: 22px; height: 16px; }
.neofetch-colors i:nth-child(1) { background: #000; }
.neofetch-colors i:nth-child(2) { background: #ff3b30; }
.neofetch-colors i:nth-child(3) { background: #7CFC9A; }
.neofetch-colors i:nth-child(4) { background: #ffff00; }
.neofetch-colors i:nth-child(5) { background: #6cb6ff; }
.neofetch-colors i:nth-child(6) { background: #d77cff; }
.neofetch-colors i:nth-child(7) { background: #3ee6e6; }
.neofetch-colors i:nth-child(8) { background: #f4f4ee; }

/* Pulsante palette nell'header */
.cmdk-trigger {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	height: 38px;
	padding: 0 8px 0 12px;
	border: 1px solid var(--line-strong);
	border-radius: 999px;
	background: rgba(255, 255, 255, .04);
	cursor: pointer;
	transition: border-color .2s, color .2s;
}
.cmdk-trigger:hover { border-color: var(--yellow); color: var(--yellow); }
.cmdk-trigger svg { width: 16px; height: 16px; }

/* Palette comandi */
.cmdk {
	width: min(640px, calc(100vw - 32px));
	margin-top: 12vh;
	padding: 0;
	border: 0;
	background: transparent;
	color: var(--ink);
}
.cmdk::backdrop { background: rgba(0, 0, 0, .7); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.cmdk[open] { animation: modalin .25s var(--ease); }
.cmdk-box {
	border: 1px solid rgba(255, 255, 0, .35);
	border-radius: 16px;
	background: #0b0b0b;
	box-shadow: 0 40px 120px rgba(0, 0, 0, .8), 0 0 0 6px rgba(255, 255, 0, .05);
	overflow: hidden;
}
.cmdk-input { display: flex; align-items: center; gap: 12px; padding: 16px 18px; border-bottom: 1px solid var(--line); color: var(--yellow); font-weight: 800; }
.cmdk-input input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--ink); font: 500 16px var(--font); }
.cmdk-list { max-height: min(56vh, 440px); margin: 0; padding: 8px; overflow-y: auto; list-style: none; }
.cmdk-group { padding: 10px 12px 4px; color: var(--muted); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; }
.cmdk-item {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 10px 12px;
	border-radius: 10px;
	cursor: pointer;
	font-size: 14px;
}
.cmdk-item .cmdk-k { flex: none; min-width: 92px; color: #7CFC9A; font-size: 12px; }
.cmdk-item .cmdk-l { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cmdk-item[aria-selected="true"] { background: var(--yellow); color: #000; }
.cmdk-item[aria-selected="true"] .cmdk-k { color: #000; opacity: .6; }
.cmdk-empty { padding: 24px 12px; color: var(--muted); text-align: center; }
.cmdk-foot { display: flex; gap: 18px; margin: 0; padding: 10px 18px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.cmdk-foot kbd { margin-right: 4px; }

/* Status bar stile tmux/vim */
.statusbar {
	--h: 28px;
	position: fixed;
	inset: auto 0 0;
	z-index: 95;
	display: flex;
	align-items: stretch;
	height: var(--h);
	background: #0e0e0e;
	border-top: 1px solid var(--line);
	font-size: 12px;
	color: var(--muted);
	white-space: nowrap;
}
.statusbar kbd { font-size: 10px; padding: 0 4px; }
.sb-mode { display: flex; align-items: center; padding: 0 14px; background: var(--yellow); color: #000; font-weight: 800; letter-spacing: .1em; }
.sb-seg { display: flex; align-items: center; gap: 4px; padding: 0 14px; border-right: 1px solid var(--line); }
.sb-path { color: #6cb6ff; overflow: hidden; text-overflow: ellipsis; max-width: 40vw; }
.sb-right { display: flex; margin-left: auto; }
.sb-right .sb-seg { border-right: 0; border-left: 1px solid var(--line); }
.sb-clock { color: var(--ink); font-variant-numeric: tabular-nums; }
@media (min-width: 861px) { :root { --sb-h: 28px; } }
@media (max-width: 860px) { .statusbar { display: none; } }
@media (max-width: 1100px) { .sb-hint { display: none; } }

/* Matrix (easter egg) */
.matrix { position: fixed; inset: 0; z-index: 9990; width: 100%; height: 100%; pointer-events: none; opacity: 0; transition: opacity .6s; }
.matrix.is-on { opacity: .85; }

.toast {
	position: fixed;
	left: 50%; bottom: calc(40px + var(--sb-h, 0px));
	z-index: 9995;
	padding: 12px 20px;
	border: 1px solid var(--yellow);
	border-radius: 10px;
	background: #000;
	color: var(--yellow);
	font-size: 14px;
	font-weight: 700;
	transform: translate(-50%, 20px);
	opacity: 0;
	pointer-events: none;
	transition: opacity .3s, transform .3s var(--ease);
}
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 1080px) { .boot-log { display: none; } }
@media (max-width: 620px) {
	.cmdk-trigger kbd { display: none; }
	.cmdk-trigger { width: 44px; height: 44px; padding: 0; justify-content: center; }
	.btn-key { display: none; }
	.neofetch-body { flex-direction: column; gap: 16px; padding: 18px; }
	.neofetch-art { font-size: 11px; }
	.term-bar span { padding-right: 0; }
	.cmdk { margin-top: 8vh; }
	.cmdk-item .cmdk-k { display: none; }
}


/* Contatti in versione terminale */
.term-contact {
	border: 1px solid var(--line-strong);
	border-radius: 14px;
	background: rgba(0, 0, 0, .8);
	overflow: hidden;
	box-shadow: 0 30px 80px -30px rgba(0, 0, 0, .9), 0 0 0 1px rgba(255, 255, 0, .05);
}

.tc-screen {
	height: clamp(360px, 52vh, 480px);
	padding: 20px 22px;
	overflow-y: auto;
	font-size: 15px;
	line-height: 1.65;
	cursor: text;
	scrollbar-width: thin;
	scrollbar-color: var(--line-strong) transparent;
	background: repeating-linear-gradient(0deg, rgba(255, 255, 255, .015) 0 1px, transparent 1px 3px);
}
.tc-log p { margin: 0 0 6px; white-space: pre-wrap; word-break: break-word; }
.tc-out.cmd { color: #7CFC9A; }
.tc-out.sys { color: var(--muted); }
.tc-out.q { color: var(--yellow); margin-top: 14px; }
.tc-out.q::before { content: '? '; color: #6cb6ff; }
.tc-out.err { color: #ff8a80; }
.tc-out.ok { color: #7CFC9A; font-weight: 700; }
.tc-out a { color: #6cb6ff; text-decoration: underline; }
.tc-echo { color: var(--ink); }
.tc-echo::before { content: '> '; color: var(--muted); }
.tc-line { display: flex; align-items: flex-start; gap: 10px; }
.tc-line[hidden] { display: none; }
.tc-ps { color: var(--yellow); font-weight: 800; line-height: 1.65; }
.tc-input {
	flex: 1;
	min-width: 0;
	padding: 0;
	border: 0;
	outline: 0;
	resize: none;
	overflow: hidden;
	background: transparent;
	color: var(--ink);
	caret-color: var(--yellow);
	font: inherit;
	line-height: 1.65;
}
.tc-input::placeholder { color: rgba(255, 255, 255, .25); }
.tc-send {
	flex: none;
	width: 32px; height: 26px;
	border: 1px solid var(--line-strong);
	border-radius: 6px;
	background: transparent;
	color: var(--yellow);
	font-weight: 800;
	cursor: pointer;
}
.tc-send:hover { border-color: var(--yellow); background: var(--yellow-soft); }

@media (max-width: 620px) {
	.tc-screen { padding: 16px; font-size: 14px; height: 60vh; }
}

/* --- Animazioni di comparsa (solo se il JS è attivo) --------------------- */
.js [data-reveal] {
	opacity: 0;
	transform: translateY(34px);
	transition: opacity .8s var(--ease), transform .8s var(--ease);
	transition-delay: calc(var(--i, 0) * 90ms);
}
.js [data-reveal].is-in { opacity: 1; transform: none; }
.js .card[data-reveal].is-in { transition: opacity .8s var(--ease), transform .4s var(--ease), border-color .3s, box-shadow .4s; transition-delay: calc(var(--i, 0) * 90ms), 0s, 0s, 0s; }

/* --- Responsive ---------------------------------------------------------- */
@media (max-width: 1080px) {
	.video-grid, .post-grid { grid-template-columns: repeat(2, 1fr); }
	.video-card.is-featured { grid-column: 1 / -1; grid-row: auto; }
	.video-card.is-featured .card-media { aspect-ratio: 16 / 9; min-height: 0; flex: none; }
	.post-grid > :nth-child(3):last-child { grid-column: 1 / -1; }
	.article-layout { grid-template-columns: minmax(0, 1fr); }
	.article-layout .entry-content { grid-column: 1; max-width: 760px; margin-inline: auto; width: 100%; }
	.share { position: fixed; top: auto; bottom: 20px; left: 20px; z-index: 80; grid-auto-flow: column; justify-self: auto; }
	.share-label { display: none; }
	.share a, .share button { background: rgba(5, 5, 5, .85); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
}

@media (max-width: 860px) {
	:root { --header-h: 66px; }

	.menu-toggle { display: grid; position: relative; z-index: 2; }
	.main-nav {
		position: fixed;
		inset: 0;
		z-index: 1;
		display: flex;
		align-items: center;
		padding: calc(var(--header-h) + 20px) var(--gutter) 40px;
		background:
			linear-gradient(rgba(255, 255, 255, .03) 1px, transparent 1px) 0 0 / 48px 48px,
			#050505;
		clip-path: circle(0 at calc(100% - 42px) 33px);
		visibility: hidden;
		transition: clip-path .6s var(--ease), visibility 0s .6s;
	}
	.main-nav.is-open { clip-path: circle(150% at calc(100% - 42px) 33px); visibility: visible; transition: clip-path .6s var(--ease), visibility 0s; }
	.nav-list { flex-direction: column; gap: 4px; width: 100%; }
	.nav-list a {
		padding: 10px 0;
		font-size: clamp(34px, 10vw, 54px);
		font-weight: 800;
		text-transform: uppercase;
		letter-spacing: -.02em;
		border-radius: 0;
		color: var(--ink);
		border-bottom: 1px solid var(--line);
		opacity: 0;
		transform: translateY(20px);
		transition: opacity .4s, transform .4s var(--ease), color .2s;
	}
	.nav-list a::before { content: '> '; color: var(--yellow); }
	.nav-list a.is-active { color: var(--yellow); }
	.nav-list a:hover { background: none; color: var(--yellow); }
	.nav-list a.is-active::after { display: none; }
	.main-nav.is-open .nav-list a { opacity: 1; transform: none; }
	.main-nav.is-open .nav-list li:nth-child(2) a { transition-delay: .05s; }
	.main-nav.is-open .nav-list li:nth-child(3) a { transition-delay: .1s; }
	.main-nav.is-open .nav-list li:nth-child(4) a { transition-delay: .15s; }
	.main-nav.is-open .nav-list li:nth-child(5) a { transition-delay: .2s; }
	.main-nav.is-open .nav-list li:nth-child(6) a { transition-delay: .25s; }
	.header-actions { margin-left: auto; position: relative; z-index: 2; }
	.brand { position: relative; z-index: 2; }
	.brand img { max-height: 34px; }
	body.nav-open { overflow: hidden; }

	.about-grid, .contact-grid { grid-template-columns: 1fr; }
	.about-photo { max-width: 460px; }
	.section-head { grid-template-columns: 1fr; }
	.hero { padding-bottom: 110px; }
	.hero-bg { object-position: 58% 15%; }
	.hero::before {
		background:
			linear-gradient(90deg, rgba(5, 5, 5, .92) 0%, rgba(5, 5, 5, .6) 60%, rgba(5, 5, 5, .35) 100%),
			linear-gradient(0deg, var(--bg) 5%, transparent 50%);
	}
}

.swipe-hint { display: none; }

@media (max-width: 620px) {
	.post-grid { grid-template-columns: 1fr; }

	/* Foto "Chi sono": il riquadro giallo spostato non deve uscire dallo schermo */
	.about-photo { width: calc(100% - 12px); margin: 0 12px 12px 0; }
	.about-photo::before { transform: translate(10px, 10px); }
	.about-photo figcaption {
		left: 12px; right: 12px; bottom: 12px;
		justify-content: center;
		font-size: 10px;
		letter-spacing: .06em;
		white-space: nowrap;
	}

	/* Hero mobile: faccia a destra di "CHICCO TECH".
	   Le misure seguono la larghezza dello schermo (vw), come il titolo. */
	.hero {
		align-items: flex-start;
		min-height: 0;
		padding-top: calc(var(--header-h) + 36px);
		padding-bottom: 70px;
	}
	.hero-bg {
		top: calc(189px - 11.15vw);
		bottom: auto;
		height: 95vw;
		object-position: 36.6% 0;
		/* sfuma sotto il mento: il corpo non finisce sotto sottotitolo e pulsanti */
		-webkit-mask-image: linear-gradient(180deg, #000 40%, transparent 58%);
		mask-image: linear-gradient(180deg, #000 40%, transparent 58%);
	}
	.hero::before {
		background:
			linear-gradient(90deg, rgba(5, 5, 5, .85) 0%, rgba(5, 5, 5, .45) 45%, transparent 70%),
			linear-gradient(0deg, var(--bg) 0%, transparent 14%);
	}
	.scroll-hint { display: none; }
	.hero-spectrum { display: none; }

	/* Video in carosello orizzontale, come gli Shorts */
	.video-grid {
		grid-template-columns: none;
		grid-auto-flow: column;
		grid-auto-columns: 84%;
		gap: 14px;
		margin-inline: calc(-1 * var(--gutter));
		padding: 0 var(--gutter) 14px;
		overflow-x: auto;
		scroll-snap-type: x mandatory;
		scroll-padding-inline: var(--gutter);
		overscroll-behavior-x: contain;
		scrollbar-width: thin;
		scrollbar-color: var(--yellow) transparent;
	}
	.video-grid .video-card { scroll-snap-align: start; }
	.video-grid .video-card:hover { transform: none; }
	.video-card.is-featured { grid-column: auto; grid-row: auto; }
	.video-card.is-featured .card-title { font-size: 19px; }
	.video-card.is-featured .card-body { padding: 22px 24px 26px; flex: 1; }
	.video-card.is-featured .card-play { width: 54px; height: 54px; }
	.video-card.is-featured .card-play .icon { width: 28px; height: 28px; }
	.js .video-grid [data-reveal] { opacity: 1; transform: none; transition: border-color .3s; }
	.swipe-hint { display: block; margin: -16px 0 14px; color: var(--muted); font-size: 12px; }
	.form-row { grid-template-columns: 1fr; }
	.on-air span:last-child { display: none; }
	.on-air { padding: 10px; }
	.btn { width: 100%; }
	.hero-ctas { width: 100%; }
	.btn-submit { width: 100%; }
	.post-nav { grid-template-columns: 1fr; }
	.post-nav-next { grid-column: 1; }
	.author-box { flex-direction: column; }
	.video-modal-close { top: -54px; right: 0; }
	.footer-grid { align-items: flex-start; flex-direction: column; }
	.card-play { opacity: 1; transform: translate(-50%, -50%) scale(.85); width: 54px; height: 54px; }
}

/* --- Chi preferisce meno movimento --------------------------------------- */
@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	*, *::before, *::after {
		animation-duration: .01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: .01ms !important;
	}
	.js [data-reveal] { opacity: 1; transform: none; }
	.hero-bg { transform: none; }
	@view-transition { navigation: none; }
}
