/*
Theme Name: Altrove
Theme URI: https://altroverivista.com
Author: Altrove Rivista
Description: Tema a blocchi per ALTROVE — Rivista del quotidiano. Giallo acido, blu vernice, rosso e carta; Schibsted Grotesk ExtraBold e IBM Plex Mono. Home costruita come il carosello manifesto: apertura gialla, intermezzo fotografico, testo in blu su carta.
Requires at least: 6.5
Tested up to: 6.8
Requires PHP: 7.4
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: altrove
Tags: full-site-editing, block-patterns, blog, news, one-column, three-columns, custom-colors, editor-style
*/

/* ---------- Sezioni a filo, senza spazi tra una fascia e l'altra ---------- */
.wp-site-blocks > * + *,
main.wp-block-group > * + * { margin-block-start: 0; }

/* ---------- Tipografia del sistema ---------- */
.alt-lettering,
.alt-stack p {
	font-weight: 800;
	text-transform: uppercase;
	letter-spacing: -0.03em;
	line-height: 1.03;
}
.alt-mono,
.alt-mono a {
	font-family: var(--wp--preset--font-family--plex-mono);
	font-size: var(--wp--preset--font-size--nota);
	font-weight: 400;
	text-transform: uppercase;
	letter-spacing: 0;
	line-height: 1.5;
}
.alt-justify {
	text-align: justify;
	word-spacing: 0.22em;
	hyphens: manual;
}
.alt-nowrap { white-space: nowrap; }

/* ---------- Apertura gialla a scaletta ---------- */
.alt-hero {
	min-height: 100vh;
	display: grid !important;
	grid-template-rows: 1fr auto;
	gap: 0 !important;
}
.alt-hero__stacks {
	display: grid !important;
	gap: clamp(32px, 6vh, 96px) !important;
	align-content: center;
	padding-block: clamp(32px, 6vh, 80px);
}
.alt-stack { margin: 0 !important; display: flex; flex-direction: column; gap: 0.35em !important; }
.alt-stack p { margin: 0 !important; white-space: nowrap; }
.alt-stack .alt-ghost { color: rgba(17, 17, 17, 0.14); }
.alt-stack--left { justify-self: start; text-align: left; }
.alt-stack--center { justify-self: center; text-align: center; }
.alt-stack--right { justify-self: end; text-align: right; }

/* ---------- Righe mono a tre colonne ---------- */
.alt-row3 {
	display: grid !important;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 16px !important;
}
.alt-row3 > *:nth-child(2) { text-align: center; }
.alt-row3 > *:nth-child(3) { text-align: right; }
.alt-row3 > * { margin: 0 !important; }

/* ---------- Intermezzo fotografico ---------- */
.alt-intermezzo { margin-top: 0 !important; margin-bottom: 0 !important; }
.alt-intermezzo img { width: 100% !important; height: 80vh !important; object-fit: cover; object-position: 50% 45%; display: block; }
.alt-intermezzo figcaption { position: absolute; left: var(--wp--preset--spacing--50); bottom: 16px; margin: 0; color: var(--wp--preset--color--nero); font-family: var(--wp--preset--font-family--plex-mono); font-size: 14px; }
.alt-intermezzo { position: relative; }

/* ---------- Elenco rubriche ---------- */
.alt-rubriche { border-bottom: 2px solid currentColor; gap: 0 !important; }
.alt-rubrica {
	display: flex !important;
	justify-content: space-between;
	align-items: baseline;
	gap: 24px;
	border-top: 2px solid currentColor;
	padding: clamp(12px, 1.6vw, 22px) 0 clamp(10px, 1.3vw, 18px);
	margin: 0 !important;
}
.alt-rubrica p { margin: 0; }
.alt-rubrica .alt-lettering { font-size: var(--wp--preset--font-size--lettering-l); line-height: 0.95; letter-spacing: -0.04em; }

/* ---------- Griglia articoli ---------- */
.alt-grid .wp-block-post-featured-image img { aspect-ratio: 4 / 5; object-fit: cover; width: 100%; }
.alt-grid .wp-block-post-title { font-size: var(--wp--preset--font-size--lettering); }
.alt-grid .wp-block-post-title a:hover { text-decoration: none; opacity: .7; }

/* ---------- Logo: cerchio giallo con orizzonte rosso ---------- */
.alt-logo {
	width: var(--alt-logo, 120px);
	height: var(--alt-logo, 120px);
	border-radius: 50%;
	background: var(--wp--preset--color--giallo-acido);
	position: relative;
	overflow: hidden;
	flex-shrink: 0;
	margin: 0 !important;
}
.alt-logo::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	top: 50%;
	height: max(4px, 6.5%);
	transform: translateY(-50%);
	background: var(--wp--preset--color--rosso);
}
.alt-logo--s { --alt-logo: 44px; }

/* ---------- Articolo ---------- */
.alt-article .wp-block-post-content > p:first-child::first-line { font-weight: 800; text-transform: uppercase; }
.alt-article .wp-block-post-content blockquote p { margin: 0; }

/* ---------- Newsletter ---------- */
.alt-newsletter input[type="email"] {
	border: 2px solid var(--wp--preset--color--nero) !important;
	background: transparent !important;
	font-family: var(--wp--preset--font-family--plex-mono);
	border-radius: 0 !important;
}

/* ---------- Telefono ---------- */
@media (max-width: 700px) {
	.alt-justify { text-align: left; word-spacing: 0.08em; }
	.alt-row3 { grid-template-columns: 1fr 1fr; }
	.alt-row3 > *:nth-child(2) { display: none; }
	.alt-row3 > *:nth-child(3) { text-align: right; }
	.alt-hero { min-height: 92vh; }
	.alt-hero__stacks { gap: 40px !important; }
	.alt-intermezzo img { height: 60vh !important; }
	.alt-rubrica { flex-wrap: wrap; }
}
