/* Site header and footer, from the design boards v2 (desktop 1440 px, mobile 390 px).
 * Desktop menu from 1024 px; below, bag and menu button as in the mobile board.
 * Footer in three columns from 1240 px, where they fit; below, the company details under logo and links.
 * Content 1200 px wide with at least 40 px margins, as in the magazine theme 1.0.10 (call of 2026-11-26): the boards
 * stay at 1440 px. */

:root {
	--tcs-content: 1200px;
}

.tcs-head,
.tcs-foot {
	color: #000000;
	background: #FFFFFF;
	font-family: 'Helvetica Neue', 'Inter Tight', Helvetica, Arial, sans-serif;
	font-size: 12px;
	line-height: 1.45;
}

.tcs-head a,
.tcs-head a:visited,
.tcs-foot a,
.tcs-foot a:visited {
	color: #000000;
	text-decoration: none;
}

/* Underline under the mouse only: on phones it would stay after the tap */
@media (hover: hover) {
	.tcs-head a:hover,
	.tcs-foot a:hover {
		color: #000000;
		text-decoration: underline;
		text-underline-offset: 3px;
	}
}

.tcs-head a:focus-visible,
.tcs-head button:focus-visible,
.tcs-foot a:focus-visible {
	outline: 2px solid #000000;
	outline-offset: 3px;
}

.tcs-head .cap,
.tcs-foot .cap {
	text-transform: uppercase;
	font-weight: 700;
	letter-spacing: 0.02em;
}

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

/* The masthead stays in view; --k goes from 0 to 1 over the first 240 px of scroll (site.js).
 * Desktop: it stops at 670 px wide (Biagio's screenshot, 2026-11-17); mobile: 210 px.
 * As in the magazine theme (1.0.1, 2026-11-23): the header on screen is fixed over the page, and .tcs-head keeps the
 * place of the big masthead in the page (::before, from the proportions of the logo), so the masthead shrinks without
 * moving the page. As a sticky block it changed the page height at every frame, and the browser took the scroll back
 * to keep the page still, so masthead and page chased each other on phones. */
.tcs-head {
	position: relative;
	z-index: 50;
}

/* Place of the big masthead: padding 20 + 12, bar 48, logo 2894 × 372 as wide as the page box; plus the open menu
 * (--tcs-menu-h, site.js), which pushes the page down */
.tcs-head::before {
	content: '';
	display: block;
	box-sizing: content-box;
	width: calc(min(100%, var(--tcs-content) + 80px) - 80px);
	margin: 0 auto;
	padding: 20px 0 calc(60px + var(--tcs-menu-h, 0px));
	aspect-ratio: 2894 / 372;
}

/* Full width for the white background, content in the page box (--tcs-content, at least 40 px margins) */
.tcs-head__in {
	position: fixed;
	top: var(--wp-admin--admin-bar--height, 0px);
	left: 0;
	right: 0;
	box-sizing: border-box;
	padding: 0 max(40px, calc((100% - var(--tcs-content)) / 2));
	background: #FFFFFF;
}

.tcs-head__home {
	display: block;
	line-height: 0;
	padding: calc(20px - var(--k, 0) * 9px) 0 calc(12px - var(--k, 0) * 4px);
}

.tcs-head a.tcs-head__home:hover {
	text-decoration: none;
}

.tcs-head__mast {
	display: block;
	width: calc(100% - var(--k, 0) * (100% - 670px));
	max-width: none;
	height: auto;
	margin: 0 auto;
}

.tcs-head__bar {
	display: flex;
	justify-content: space-between;
	align-items: center;
	height: 48px;
	font-size: 12px;
}

.tcs-head__nav {
	display: flex;
	gap: 40px;
}

.tcs-head__icons {
	display: none;
	align-items: center;
}

.tcs-head .tcs-bag-m,
.tcs-head .tcs-head__toggle {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
}

.tcs-head a.tcs-bag-m:hover {
	text-decoration: none;
}

/* Bag drawn in CSS, with the number of items inside */
.tcs-bag-ico {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	width: 18px;
	height: 20px;
	border: 1.5px solid #000000;
	font-size: 9px;
	font-weight: 700;
}

.tcs-bag-ico__handle {
	position: absolute;
	top: -6px;
	left: 4px;
	box-sizing: content-box;
	width: 7px;
	height: 5px;
	border: 1.5px solid #000000;
	border-bottom: 0;
	border-radius: 4px 4px 0 0;
}

/* Hello styles every button: the menu button is only its icon */
.tcs-head .tcs-head__toggle,
.tcs-head .tcs-head__toggle:hover,
.tcs-head .tcs-head__toggle:focus {
	padding: 0;
	border: 0;
	border-radius: 0;
	background: none;
	color: #000000;
	font: inherit;
	cursor: pointer;
	transition: none;
}

.tcs-head__menu {
	display: flex;
	flex-direction: column;
	gap: 14px;
	padding: 4px 0 20px;
	border-top: 1px solid #000000;
	font-size: 14px;
}

.tcs-head__menu[hidden] {
	display: none;
}

/* Menu open: the page under it does not scroll; the header scrolls when it is taller than the screen */
html.tcs-menu-open {
	overflow: hidden;
}

.tcs-menu-open .tcs-head__in {
	max-height: calc(100vh - var(--wp-admin--admin-bar--height, 0px));
	max-height: calc(100dvh - var(--wp-admin--admin-bar--height, 0px));
	overflow-y: auto;
	overscroll-behavior: contain;
}

/* Phones and tablets (site.js: tcs-sda, tcs-shrink), as in the magazine theme (1.0.2, 2026-11-23). The header keeps
 * the layout of the big masthead and the small one is drawn with transforms: the masthead scales from its top centre,
 * the bar, the menu and the white of tcs-head__bg move up. tcs-sda: the browser plays them over the first 240 px of
 * scroll on its compositor, where the scroll itself runs, so the masthead cannot lag behind the finger (a script got
 * the scroll in fits and starts on the iPhone). tcs-shrink, browsers without it: a transition past the top of the page
 * (is-small). The values of the small masthead come from the rules above with --k: 1 (site.js); a short page keeps
 * the big one (is-still). */
.tcs-head__bg {
	display: none;
}

.tcs-sda .tcs-head__in,
.tcs-shrink .tcs-head__in {
	background: none;
	pointer-events: none;
}

.tcs-sda .tcs-head__bg,
.tcs-shrink .tcs-head__bg {
	display: block;
	position: absolute;
	inset: 0;
	z-index: -1;
	background: #FFFFFF;
}

.tcs-sda .tcs-head__home,
.tcs-sda .tcs-head__bar,
.tcs-sda .tcs-head__menu,
.tcs-shrink .tcs-head__home,
.tcs-shrink .tcs-head__bar,
.tcs-shrink .tcs-head__menu,
.tcs-menu-open .tcs-head__in {
	pointer-events: auto;
}

.tcs-sda .tcs-head__home,
.tcs-shrink .tcs-head__home {
	transform-origin: 50% 0;
}

.tcs-sda .tcs-head__menu,
.tcs-shrink .tcs-head__menu {
	background: #FFFFFF;
}

.tcs-sda .tcs-head__home {
	animation: tcs-head-home linear both;
	animation-timeline: scroll(root);
	animation-range: 0 240px;
}

.tcs-sda .tcs-head__bar {
	animation: tcs-head-bar linear both;
	animation-timeline: scroll(root);
	animation-range: 0 240px;
}

.tcs-sda .tcs-head__bg,
.tcs-sda .tcs-head__menu {
	animation: tcs-head-lift linear both;
	animation-timeline: scroll(root);
	animation-range: 0 240px;
}

.tcs-sda .tcs-head.is-still .tcs-head__home,
.tcs-sda .tcs-head.is-still .tcs-head__bar,
.tcs-sda .tcs-head.is-still .tcs-head__bg,
.tcs-sda .tcs-head.is-still .tcs-head__menu {
	animation: none;
}

.tcs-shrink .tcs-head__home,
.tcs-shrink .tcs-head__bar,
.tcs-shrink .tcs-head__bg,
.tcs-shrink .tcs-head__menu {
	transition: transform 0.45s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.tcs-head__group {
	display: flex;
	flex-direction: column;
}

.tcs-head__group a {
	line-height: 44px;
}

@media (min-width: 1024px) {
	.tcs-head .tcs-head__menu,
	.tcs-head .tcs-head__icons {
		display: none;
	}
}

/* Tablet and mobile: bag and menu button; the icons sit on the page margin */
@media (max-width: 1023px) {
	.tcs-head__nav {
		display: none;
	}

	.tcs-head__icons {
		display: flex;
	}

	.tcs-head__bar {
		justify-content: flex-end;
		margin-right: -12px;
	}
}

/* Mobile board (390 px) */
@media (max-width: 767px) {
	.tcs-head {
		font-size: 13px;
	}

	/* Place of the big masthead: bar 48, padding 2 + 14, logo as wide as the page box, plus the open menu */
	.tcs-head::before {
		width: calc(100% - 32px);
		padding: 50px 0 calc(14px + var(--tcs-menu-h, 0px));
	}

	/* Bag and menu above the masthead, the menu opens under it */
	.tcs-head__in {
		display: flex;
		flex-direction: column;
		padding: 0 16px;
	}

	.tcs-head__bar {
		order: -1;
	}

	.tcs-head__home {
		padding: 2px 0 calc(14px - var(--k, 0) * 8px);
	}

	.tcs-head__mast {
		width: calc(100% - var(--k, 0) * (100% - 210px));
	}
}

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

.tcs-foot {
	margin-top: 72px;
}

.tcs-foot__in {
	box-sizing: border-box;
	max-width: calc(var(--tcs-content) + 80px);
	margin: 0 auto;
	padding: 32px 40px 48px;
	position: relative;
	display: grid;
	grid-template-columns: 300px minmax(0, 1fr) 420px;
	gap: 32px;
	align-items: end;
}

/* Line above the footer as wide as the content, on mobile too (Biagio, 2026-11-26: "allineala al contenuto") */
.tcs-foot__in::before {
	content: '';
	position: absolute;
	top: 0;
	left: 40px;
	right: 40px;
	border-top: 1px solid #000000;
}

.tcs-foot__logo {
	display: block;
	width: 240px;
	max-width: none;
	height: auto;
}

.tcs-foot__links {
	display: flex;
	gap: 56px;
	font-size: 12px;
}

.tcs-foot__col {
	display: flex;
	flex-direction: column;
}

.tcs-foot__col a {
	line-height: 22px;
}

.tcs-foot__company {
	margin: 0;
	font-size: 11px;
	line-height: 1.5;
	color: #555555;
}

/* Tablet and small desktop: logo and links, the company details under them */
@media (max-width: 1239px) {
	.tcs-foot__in {
		grid-template-columns: 300px minmax(0, 1fr);
	}

	.tcs-foot__company {
		grid-column: 1 / -1;
		max-width: 420px;
	}
}

/* Mobile board (390 px) */
@media (max-width: 767px) {
	.tcs-foot {
		margin-top: 48px;
		font-size: 13px;
	}

	.tcs-foot__in {
		display: block;
		padding: 28px 16px 40px;
	}

	.tcs-foot__in::before {
		left: 16px;
		right: 16px;
	}

	.tcs-foot__logo {
		width: 200px;
	}

	.tcs-foot__links {
		margin-top: 24px;
		display: grid;
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 16px;
	}

	.tcs-foot__col a {
		line-height: 36px;
	}

	.tcs-foot__company {
		margin-top: 24px;
		max-width: none;
	}
}
