/*
Theme Name: Lean Unfolded
Theme URI: https://staging.leanunfolded.com
Author: Lean Unfolded
Description: Block theme custom per il blog Lean Unfolded, basato sulla brand identity: carta, origami e annotazioni a mano.
Version: 0.2.0
Requires at least: 6.5
Tested up to: 6.9
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: lean-unfolded
Tags: blog, block-patterns, full-site-editing
*/

/* ---------------------------------------------------------------------------
   Lean Unfolded — layer grafico "carta & origami" sopra i token di theme.json
--------------------------------------------------------------------------- */

/* Marchio origami (SVG inline nel header/footer) */
.lu-mark {
	width: 2.6em;
	height: auto;
	color: var(--wp--preset--color--ink);
	flex-shrink: 0;
}
.lu-wordmark a {
	text-transform: lowercase;
	letter-spacing: -0.02em;
}

/* Header */
.lu-header {
	background: var(--wp--preset--color--white);
	border-bottom: 1px solid var(--wp--preset--color--paper);
	position: sticky;
	top: 0;
	z-index: 50;
}
.lu-header .lu-header-row {
	padding-top: var(--wp--preset--spacing--40);
	padding-bottom: var(--wp--preset--spacing--40);
}

/* Footer scuro con logo negativo */
.lu-footer {
	background: var(--wp--preset--color--dark);
	color: var(--wp--preset--color--white);
}
.lu-footer .lu-mark {
	color: var(--wp--preset--color--white);
}
.lu-footer a {
	color: var(--wp--preset--color--primary-soft);
}
.lu-footer .lu-hand {
	color: var(--wp--preset--color--primary-soft);
}

/* Foglio di carta con washi tape */
.lu-paper {
	background: var(--wp--preset--color--white);
	box-shadow: var(--wp--preset--shadow--paper);
	border-radius: 4px;
	position: relative;
	padding: var(--wp--preset--spacing--60) !important;
}
.lu-tape::before {
	content: "";
	position: absolute;
	top: -13px;
	left: 50%;
	transform: translateX(-50%) rotate(-2deg);
	width: 108px;
	height: 26px;
	background: var(--wp--preset--color--primary-soft);
	opacity: 0.85;
	/* bordo superiore seghettato come nastro strappato */
	clip-path: polygon(0 4%, 3% 0, 6% 4%, 9% 0, 12% 4%, 15% 0, 18% 4%, 21% 0, 24% 4%, 27% 0, 30% 4%, 33% 0, 36% 4%, 39% 0, 42% 4%, 45% 0, 48% 4%, 51% 0, 54% 4%, 57% 0, 60% 4%, 63% 0, 66% 4%, 69% 0, 72% 4%, 75% 0, 78% 4%, 81% 0, 84% 4%, 87% 0, 90% 4%, 93% 0, 96% 4%, 100% 0, 100% 100%, 0 100%);
}
.lu-tape-lu::before {
	left: 24px;
	transform: rotate(-6deg);
}

/* Annotazioni a mano */
.lu-hand {
	font-family: var(--wp--preset--font-family--hand);
	color: var(--wp--preset--color--primary);
	font-size: var(--wp--preset--font-size--large);
	line-height: 1.4;
}

/* Sottolineatura scarabocchiata per titoli */
.lu-scribble-underline {
	position: relative;
	display: inline-block;
}
.lu-scribble-underline::after {
	content: "";
	position: absolute;
	left: 2%;
	right: 4%;
	bottom: -0.35em;
	height: 0.45em;
	background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 300 20' preserveAspectRatio='none'%3E%3Cpath d='M4 12 C 60 6, 120 16, 178 10 S 268 8, 296 12 M20 16 C 90 12, 200 18, 292 15' fill='none' stroke='%23A3CAE6' stroke-width='5' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat center / 100% 100%;
}

/* Card articolo nel loop */
.lu-card .wp-block-post-featured-image {
	border-radius: 4px 4px 0 0;
	margin-bottom: var(--wp--preset--spacing--40);
}
.lu-card .wp-block-post-featured-image img {
	border-radius: 4px 4px 0 0;
}
.lu-card .wp-block-post-title a {
	color: var(--wp--preset--color--ink);
	text-decoration: none;
}
.lu-card .wp-block-post-title a:hover {
	color: var(--wp--preset--color--primary);
}
.lu-card .wp-block-post-terms a,
.lu-single-meta a {
	font-family: var(--wp--preset--font-family--hand);
	color: var(--wp--preset--color--primary);
	text-decoration: none;
	font-size: var(--wp--preset--font-size--medium);
}
.lu-card .wp-block-post-date,
.lu-single-meta .wp-block-post-date {
	color: var(--wp--preset--color--faint);
	font-size: var(--wp--preset--font-size--small);
	text-transform: uppercase;
	letter-spacing: 0.08em;
}

/* Pezzi di origami fluttuanti (decorazione hero) */
.lu-fragments {
	color: var(--wp--preset--color--primary-soft);
	opacity: 0.9;
}

/* Freccia a mano */
.lu-arrow {
	color: var(--wp--preset--color--primary);
}

/* Quote come foglietto */
.wp-block-quote.lu-note,
.wp-block-pullquote.lu-note {
	background: var(--wp--preset--color--white);
	box-shadow: var(--wp--preset--shadow--paper);
	border: none;
	padding: var(--wp--preset--spacing--50);
	position: relative;
	margin-top: var(--wp--preset--spacing--60);
}
.wp-block-quote.lu-note::before,
.wp-block-pullquote.lu-note::before {
	content: "";
	position: absolute;
	top: -12px;
	right: 22px;
	transform: rotate(4deg);
	width: 84px;
	height: 24px;
	background: var(--wp--preset--color--primary-soft);
	opacity: 0.85;
}

/* Legibilità contenuto articolo */
.lu-content {
	font-weight: 300;
}
.lu-content strong {
	font-weight: 500;
	color: var(--wp--preset--color--ink);
}
