/*
Theme Name: Margine
Theme URI: https://albertolatu.com
Author: Alberto Latu
Description: Tema a blocchi "Margine": pagine annotate, evidenziatore, note a margine e segni a mano. Colori e font si cambiano da Aspetto > Editor > Stili.
Version: 0.2.12
Requires at least: 6.6
Requires PHP: 7.4
License: GPLv2 or later
Text Domain: margine
*/

:root {
	--m-blue: var(--wp--preset--color--blue, #0048ea);
	--m-teal: var(--wp--preset--color--teal, #0099ba);
	--m-mint: var(--wp--preset--color--mint, #7ff4c4);
	--m-ink: var(--wp--preset--color--ink, #0b0d12);
	--m-paper: var(--wp--preset--color--paper, #ffffff);
	--m-bg: var(--wp--preset--color--bg, #f6f8f8);
	--m-muted: var(--wp--preset--color--muted, #535a63);
	--m-line: var(--wp--preset--color--line, #d5dbe0);
	--m-darkline: #2a2f38;
	--m-serif: var(--wp--preset--font-family--serif);
	--m-mono: var(--wp--preset--font-family--mono);
	--m-hand: var(--wp--preset--font-family--hand);
}

h1, h2, h3, .wp-block-site-title { font-variation-settings: "SOFT" 100, "WONK" 1; text-wrap: balance; }
h1 { font-variation-settings: "SOFT" 100, "WONK" 1, "opsz" 144; }

/* Evidenziatore: il formato "Evidenzia" (mark) dell'editor diventa una passata di menta */
mark, mark.has-inline-color { background: linear-gradient(transparent 56%, var(--m-mint) 56%, var(--m-mint) 92%, transparent 92%) !important; color: inherit !important; padding: 0 .05em; }
@supports (animation-timeline: view()) {
	.entry-content mark { background-size: 0% 100% !important; background-repeat: no-repeat !important; animation: margine-hl linear both; animation-timeline: view(); animation-range: entry 10% cover 35%; }
	@keyframes margine-hl { to { background-size: 100% 100%; } }
}
.entry-content h1 mark, h1 mark { animation: none !important; background-size: 100% 100% !important; }
@media (prefers-reduced-motion: reduce) { .entry-content mark { animation: none !important; background-size: 100% 100% !important; } }

/* Testo scritto a mano e note a margine */
.is-style-hand { font-family: var(--m-hand) !important; color: var(--m-blue); font-size: 30px !important; line-height: 1.05 !important; }
.is-style-note, .m-mono { font-family: var(--m-mono); font-stretch: 87%; font-size: 12px !important; line-height: 1.55; letter-spacing: .01em; }
.is-style-note { color: var(--m-blue); border-left: 1px dashed var(--m-line); padding-left: 16px; }
.m-under { display: inline-block; padding-bottom: 8px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 12' preserveAspectRatio='none'%3E%3Cpath d='M2 8 C 30 2, 50 12, 80 6 S 140 2, 198 7' fill='none' stroke='%230048ea' stroke-width='2.2' stroke-linecap='round'/%3E%3C/svg%3E") bottom left / 100% 12px no-repeat; }

/* Pulsanti */
.wp-block-button__link { transition: transform .2s; }
.wp-block-button__link:hover { transform: rotate(-1.5deg); }
.wp-block-button.is-style-outline .wp-block-button__link { background: transparent; color: var(--m-ink); border: 1.5px solid currentColor; padding: 12.5px 20.5px; }

/* Header e footer */
.m-header { border-bottom: 1px solid var(--m-ink); padding-block: 18px; }
.m-header .wp-block-site-logo img { width: 38px; height: auto; }
.m-header .wp-block-site-title { font-family: var(--m-serif); font-weight: 600; font-size: 22px; }
.m-header .wp-block-site-title a { color: var(--m-ink); text-decoration: none; }
.m-header .wp-block-navigation { font-size: 15px; }
.m-header .wp-block-navigation a { text-decoration: none; }
.m-header .wp-block-navigation .current-menu-item a { text-decoration: underline; text-decoration-color: var(--m-blue); text-decoration-thickness: 2px; text-underline-offset: 5px; }
.m-footer { border-top: 1px solid var(--m-darkline); background: var(--m-ink); color: #9aa3ae; padding-block: 22px; font-family: var(--m-mono); font-stretch: 87%; font-size: 12px; }
.m-footer a { color: #9aa3ae; }

/* Fasce a tutta larghezza */
.is-style-band-white, .is-style-band-dark, .is-style-band-blue, .is-style-band-mint, .m-band { padding-top: 72px !important; padding-bottom: 72px !important; margin-top: 0 !important; margin-bottom: 0 !important; }
.entry-content > * + .alignfull { margin-top: 0 !important; }
.is-style-band-white { background: var(--m-paper); }
.is-style-band-dark { background: var(--m-ink); color: #fff; }
.is-style-band-blue { background: var(--m-blue); color: #fff; }
.is-style-band-mint { background: var(--m-mint); color: var(--m-ink); }
.is-style-band-dark a:not(.wp-block-button__link), .is-style-band-blue a:not(.wp-block-button__link) { color: var(--m-mint); }
.is-style-band-dark mark { background: linear-gradient(transparent 56%, rgba(127,244,196,.35) 56%, rgba(127,244,196,.35) 92%, transparent 92%) !important; }
.is-style-band-dark .m-lead, .is-style-band-dark .m-tool p { color: #c4c9d1; }
.is-style-band-blue p { color: #dbe5ff; }

/* Intestazione di sezione: titolo a sinistra, testo a destra */
.m-head { align-items: flex-end !important; margin-bottom: 36px !important; }
.m-head p { color: var(--m-muted); max-width: 46ch; }
.is-style-band-dark .m-head p { color: #c4c9d1; }

/* Hero */
.m-hero { padding-block: 56px 64px; align-items: center !important; }
.m-lede { font-size: 21px !important; line-height: 1.5; max-width: 46ch; }
.m-everywhere { position: relative; min-height: 400px; }
.m-everywhere .q { position: absolute; left: 8%; right: 8%; top: 44%; background: var(--m-paper); border: 1.5px solid var(--m-ink); border-radius: 999px; padding: 14px 20px; display: flex; align-items: center; gap: 10px; box-shadow: 5px 5px 0 var(--m-ink); z-index: 2; font-family: var(--m-mono); font-size: 14px; }
.m-everywhere .q i { display: inline-block; width: 2px; height: 18px; background: var(--m-blue); animation: margine-blink 1s steps(1) infinite; }
@keyframes margine-blink { 50% { opacity: 0; } }
.m-everywhere .chip { position: absolute; font-family: var(--m-mono); font-stretch: 87%; font-size: 13px; padding: 8px 12px; border-radius: 999px; border: 1.5px solid var(--m-ink); background: var(--m-paper); white-space: nowrap; }
.m-everywhere .chip.b { background: var(--m-blue); color: #fff; border-color: var(--m-blue); }
.m-everywhere .chip.t { background: var(--m-teal); color: #fff; border-color: var(--m-teal); }
.m-everywhere .chip.m { background: var(--m-mint); }
.m-everywhere svg { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 1; }
.m-everywhere .hand { position: absolute; right: 0; bottom: 0; transform: rotate(-4deg); font-family: var(--m-hand); color: var(--m-blue); font-size: 28px; line-height: 1; }

/* Schede servizi */
.is-style-card { border: 1.5px solid var(--m-ink); padding: 24px !important; background: var(--m-bg); height: 100%; transition: transform .2s, box-shadow .2s; }
.is-style-card:hover { transform: translate(-3px, -3px); box-shadow: 6px 6px 0 var(--m-blue); }
.is-style-card p { color: var(--m-muted); font-size: 16px; }
.is-style-card .m-more a { font-weight: 600; text-decoration: none; }
.m-ul-mint, .m-ul-teal, .m-ul-blue { text-decoration: underline; text-decoration-thickness: 5px; text-underline-offset: 6px; text-decoration-skip-ink: none; }
.m-ul-mint { text-decoration-color: var(--m-mint); }
.m-ul-teal { text-decoration-color: var(--m-teal); }
.m-ul-blue { text-decoration-color: var(--m-blue); }

/* Strumenti */
.m-tools { border-top: 1px solid var(--m-darkline); gap: 0 !important; }
.m-tools > .wp-block-column { padding: 28px 24px 28px 0; border-right: 1px solid var(--m-darkline); }
.m-tools > .wp-block-column + .wp-block-column { padding-left: 24px; }
.m-tools > .wp-block-column:last-child { border-right: 0; }
.m-kind { font-family: var(--m-mono); font-stretch: 87%; font-size: 11px !important; color: var(--m-teal) !important; letter-spacing: .06em; text-transform: uppercase; }
.is-style-tool-name { font-weight: 700 !important; font-size: 38px !important; line-height: 1 !important; color: var(--m-mint); font-variation-settings: "SOFT" 100, "WONK" 1, "opsz" 96; }
.is-style-sheet { background: var(--m-paper); color: var(--m-ink); padding: 26px 28px !important; transform: rotate(-1deg); box-shadow: 8px 8px 0 var(--m-blue); max-width: 780px; margin-top: 40px !important; }
.is-style-sheet p { color: var(--m-ink); }
.m-before { color: var(--m-muted) !important; text-decoration: line-through; text-decoration-color: var(--m-blue); text-decoration-thickness: 1.5px; }
.m-quoteish { font-family: var(--m-serif); font-style: italic; font-size: 18px !important; line-height: 1.45; }

/* Metodo */
.m-flow { gap: 48px !important; }
.m-flow > .wp-block-column { position: relative; }
.m-flow > .wp-block-column:not(:last-child)::after { content: ""; position: absolute; top: 26px; right: -44px; width: 40px; height: 22px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 56 28'%3E%3Cpath d='M2 16 C 18 6, 32 22, 50 13' fill='none' stroke='%237ff4c4' stroke-width='2.4' stroke-linecap='round'/%3E%3Cpath d='M42 6 L51 13 L43 21' fill='none' stroke='%237ff4c4' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat; }
.m-verb { font-family: var(--m-serif) !important; font-weight: 300; font-style: italic; font-size: clamp(44px, 5vw, 68px) !important; line-height: 1 !important; letter-spacing: -.02em; color: #fff !important; font-variation-settings: "SOFT" 100, "WONK" 1, "opsz" 144; }
.m-metric { background: var(--m-mint); color: var(--m-ink); padding: 0 .3em; }

/* Chi sono */
.m-about { align-items: center !important; }
.m-about .wp-block-image img { border: 1.5px solid var(--m-ink); filter: grayscale(1) contrast(1.05); }
.m-facts p { font-family: var(--m-mono); font-stretch: 87%; font-size: 12px; color: var(--m-blue); }
.m-facts strong { color: var(--m-ink); font-weight: 500; }

/* Testimonianze */
.m-quote { font-family: var(--m-serif) !important; font-style: italic; font-size: clamp(22px, 2.4vw, 30px) !important; line-height: 1.3 !important; font-variation-settings: "SOFT" 100, "WONK" 1, "opsz" 96; }
.m-quote::before { content: "\201C"; display: block; font-style: normal; font-weight: 800; font-size: 110px; line-height: .6; height: 48px; color: var(--m-blue); }
.m-placeholder { border: 1.5px dashed var(--m-ink); padding: 18px !important; margin-top: 36px !important; }

/* Contatti */
.m-contact-title { color: var(--m-mint) !important; font-size: clamp(48px, 7vw, 96px) !important; font-weight: 340 !important; }
.is-style-band-dark .wp-block-button:not(.is-style-outline) .wp-block-button__link { background: var(--m-mint); color: var(--m-ink); }

@media (max-width: 781px) {
	.m-tools > .wp-block-column, .m-tools > .wp-block-column + .wp-block-column { padding: 22px 0; border-right: 0; border-bottom: 1px solid var(--m-darkline); }
	.is-style-sheet { transform: none; }
	.m-flow > .wp-block-column:not(:last-child)::after { top: auto; bottom: -38px; right: auto; left: 0; transform: rotate(90deg); }
	.m-everywhere { min-height: 340px; }
	.m-header .wp-block-navigation { font-size: 16px; }
}


/* FAQ (blocchi Dettagli) */
.m-faq { max-width: 860px; }
.m-faq .wp-block-details { border-top: 1.5px solid var(--m-ink); padding: 18px 0 !important; margin: 0 !important; }
.m-faq .wp-block-details:last-child { border-bottom: 1.5px solid var(--m-ink); }
.m-faq summary { font-family: var(--m-serif); font-size: 21px; line-height: 1.3; cursor: pointer; list-style: none; padding-right: 36px; position: relative; }
.m-faq summary::-webkit-details-marker { display: none; }
.m-faq summary::after { content: "+"; position: absolute; right: 4px; top: -2px; font-family: var(--m-mono); font-size: 24px; color: var(--m-blue); }
.m-faq details[open] summary::after { content: "–"; }
.m-faq details p { color: var(--m-muted); margin-top: 12px; max-width: 70ch; }
.is-style-band-dark .m-faq .wp-block-details { border-color: var(--m-darkline); }
.is-style-band-dark .m-faq details p { color: #c4c9d1; }

/* Elenchi dentro i fogli e le schede */
.is-style-sheet ul, .m-list { padding-left: 1.1em; }
.is-style-sheet li, .m-list li { margin: 6px 0; }


/* Link alle pagine nel footer */
.m-footer-nav { margin-bottom: 18px !important; gap: 8px 24px !important; }
.m-footer-nav a { text-decoration: none; font-weight: 600; }
.m-footer-nav a:hover { text-decoration: underline; text-decoration-color: var(--m-mint); text-decoration-thickness: 3px; text-underline-offset: 4px; }
.m-footer p a { color: inherit; }


/* ===== v0.1.4: visual pagina SEO e GEO + footer ===== */

/* Risposta AI animata (hero) */
.m-ask { position: relative; background: var(--m-paper); border: 1.5px solid var(--m-ink); box-shadow: 8px 8px 0 var(--m-blue); padding: 18px 22px 20px; max-width: 470px; margin: 0 0 56px auto; transform: rotate(1deg); }
.m-ask-bar { font-family: var(--m-mono); font-stretch: 87%; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--m-teal); display: flex; gap: 8px; align-items: center; margin-bottom: 14px; }
.m-ask-bar .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--m-mint); border: 1.5px solid var(--m-ink); }
.m-ask-q { background: var(--m-bg); border: 1px solid var(--m-line); border-radius: 14px 14px 3px 14px; padding: 10px 14px; margin: 0 0 16px auto; width: fit-content; max-width: 88%; min-height: 1.5em; font-size: 15px; line-height: 1.4; }
.m-ask-q::after { content: ""; display: inline-block; width: 2px; height: 1em; background: var(--m-blue); margin-left: 2px; vertical-align: -2px; animation: margine-blink 1s steps(1) infinite; }
.m-ask-a { transition: opacity .45s ease, transform .45s ease; }
.m-ask-a.is-off { opacity: 0; transform: translateY(8px); }
.m-ask-lead { font-size: 15px; margin: 0 0 8px; }
.m-ask ol { margin: 0; padding-left: 1.3em; font-size: 15px; }
.m-ask li { margin: 8px 0; }
.m-ask li i { display: inline-block; height: 9px; width: 72%; background: var(--m-line); border-radius: 5px; vertical-align: middle; }
.m-ask li + li + li i { width: 54%; }
.m-ask li.is-you mark { font-weight: 600; }
.m-ask-why { display: block; color: var(--m-muted); font-size: 13px; line-height: 1.4; margin-top: 2px; }
.m-ask-src { font-family: var(--m-mono); font-stretch: 87%; font-size: 11px; color: var(--m-muted); margin: 14px 0 0; padding-top: 8px; border-top: 1px dashed var(--m-line); }
.m-ask-note { position: absolute; left: -12px; bottom: -50px; font-family: var(--m-hand); color: var(--m-blue); font-size: 30px; line-height: 1; transform: rotate(-4deg); white-space: nowrap; }

/* Mini illustrazioni nelle schede SEO / GEO */
.m-mini { border: 1.5px solid var(--m-ink); background: var(--m-paper); padding: 12px 14px; margin: 6px 0 4px; font-family: var(--m-mono); font-stretch: 87%; font-size: 11px; width: 100%; box-sizing: border-box; }
.m-serp-bar { border: 1.5px solid var(--m-ink); border-radius: 999px; padding: 5px 12px; margin-bottom: 8px; color: var(--m-ink); }
.m-serp-r { display: grid; gap: 5px; padding: 8px 0; border-top: 1px solid var(--m-line); }
.m-serp-r b { display: block; height: 9px; width: 55%; background: #c9d6ff; border-radius: 4px; }
.m-serp-r i { display: block; height: 7px; width: 88%; background: var(--m-line); border-radius: 4px; }
.m-serp-r.is-you { background: rgba(127,244,196,.45); margin: 0 -14px; padding: 8px 14px; border-top: 0; }
.m-serp-r.is-you b { height: auto; width: auto; background: none; color: var(--m-blue); font-weight: 500; font-size: 12px; }
.m-cite { text-align: center; }
.m-cite .src { display: inline-block; border: 1px solid var(--m-ink); border-radius: 999px; padding: 3px 9px; margin: 3px 2px; }
.m-cite .arrow { display: block; font-family: var(--m-hand); color: var(--m-blue); font-size: 30px; line-height: .9; margin: 2px 0; }
.m-cite .you { display: inline-block; background: var(--m-mint); color: var(--m-ink); border: 1.5px solid var(--m-ink); border-radius: 14px 14px 14px 3px; padding: 7px 12px; font-family: var(--m-serif); font-style: italic; font-size: 15px; }

/* Icone disegnate dei servizi */
.m-ico { display: block; width: 54px; height: 54px; margin-bottom: 14px; fill: none; stroke: var(--m-mint); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }

/* Footer */
.m-footer { background: var(--m-paper); color: var(--m-ink); border-top: 1.5px solid var(--m-ink); padding-block: 56px 22px; font-family: inherit; font-stretch: normal; font-size: 15px; }
.m-footer a { color: var(--m-ink); text-decoration: none; }
.m-footer a:hover { text-decoration: underline; text-decoration-color: var(--m-mint); text-decoration-thickness: 3px; text-underline-offset: 4px; }
.m-footer-brand { gap: 10px !important; align-items: center; }
.m-footer-brand .wp-block-site-logo img { width: 34px; height: auto; }
.m-footer-brand .wp-block-site-title { font-family: var(--m-serif); font-weight: 600; font-size: 24px; margin: 0; }
.m-footer-claim { color: var(--m-muted); max-width: 34ch; margin-top: 12px !important; }
.m-footer-label { font-family: var(--m-mono); font-stretch: 87%; font-size: 11px !important; text-transform: uppercase; letter-spacing: .08em; color: var(--m-teal); margin-bottom: 12px !important; }
.m-footer-nav { margin: 0 !important; gap: 8px !important; }
.m-footer-nav a { font-weight: 500; }
.m-footer-list p { margin: 0 0 8px !important; }
.m-footer-bottom { border-top: 1px solid var(--m-line); margin-top: 44px !important; padding-top: 16px; font-family: var(--m-mono); font-stretch: 87%; font-size: 12px; color: var(--m-muted); align-items: center; }
.m-footer-bottom .is-style-hand { font-size: 24px !important; color: var(--m-blue); margin: 0; }

@media (max-width: 781px) {
	.m-ask { transform: none; margin: 8px 0 52px; max-width: none; }
	.m-ask-note { left: 4px; }
	.m-footer-cols { gap: 28px !important; }
}

.m-ask mark { background: var(--m-mint) !important; animation: none !important; padding: 0 .25em; }
.m-cite { min-height: 186px; display: flex; flex-direction: column; justify-content: center; align-items: center; }
.m-cite > .src { display: none; }
.m-cite-srcs { display: block; }


/* Grafico disegnato: SEO + GEO crescono insieme */
.m-grow { background: var(--m-paper); border: 1.5px solid var(--m-ink); box-shadow: 8px 8px 0 var(--m-blue); padding: 18px 18px 14px; transform: rotate(-1deg); }
.m-grow svg { display: block; width: 100%; height: auto; overflow: visible; }
.m-grow .ax { stroke: var(--m-ink); stroke-width: 1.5; fill: none; stroke-linecap: round; }
.m-grow .grid { stroke: var(--m-line); stroke-width: 1; stroke-dasharray: 3 5; }
.m-grow .area { fill: var(--m-mint); opacity: 0; transition: opacity 1s ease 1.4s; }
.m-grow .ln { fill: none; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 1; }
.m-grow .ln-seo { stroke: var(--m-blue); stroke-width: 3.2; }
.m-grow .ln-geo { stroke: var(--m-teal); stroke-width: 3.2; }
.m-grow .dot { opacity: 0; transition: opacity .4s ease 1.9s; }
.m-grow .hand { font-family: var(--m-hand); font-size: 30px; fill: var(--m-blue); opacity: 0; transition: opacity .6s ease 1.7s; }
.m-grow .hand.t { fill: var(--m-teal); }
.m-grow .mono { font-family: var(--m-mono); font-stretch: 87%; font-size: 11px; fill: var(--m-muted); letter-spacing: .04em; }
.m-grow.is-in .ln-seo { animation: margine-draw 1.6s ease forwards; }
.m-grow.is-in .ln-geo { animation: margine-draw 1.6s ease .35s forwards; }
.m-grow.is-in .area { opacity: .38; }
.m-grow.is-in .dot, .m-grow.is-in .hand { opacity: 1; }
@keyframes margine-draw { to { stroke-dashoffset: 0; } }
.m-grow-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.m-grow-tags span { font-family: var(--m-mono); font-stretch: 87%; font-size: 11px; border: 1px solid var(--m-ink); border-radius: 999px; padding: 4px 10px; background: var(--m-bg); }
.m-grow-tags span:first-child { background: var(--m-mint); }
.m-explain p { font-size: 18px; line-height: 1.6; }
@media (prefers-reduced-motion: reduce) {
	.m-grow .ln { stroke-dashoffset: 0; animation: none !important; }
	.m-grow .area { opacity: .38; } .m-grow .dot, .m-grow .hand { opacity: 1; }
}
@media (max-width: 781px) { .m-grow { transform: none; margin-top: 12px; } }


/* Visual astratto: la reputazione che si allarga (onde + punti che si accendono) */
.m-ripple { position: relative; width: 100%; max-width: 460px; aspect-ratio: 1; margin: 0 auto; }
.m-ripple svg { width: 100%; height: 100%; display: block; overflow: visible; }
.m-ripple .orbit { fill: none; stroke: var(--m-line); stroke-width: 1.2; stroke-dasharray: 2 7; stroke-linecap: round; }
.m-ripple .wave { fill: none; stroke-width: 2; transform-origin: 200px 200px; transform-box: view-box; opacity: 0; }
.m-ripple .wave.b { stroke: var(--m-blue); }
.m-ripple .wave.t { stroke: var(--m-teal); }
.m-ripple .wave.m { stroke: var(--m-mint); stroke-width: 6; }
.m-ripple .core { fill: var(--m-mint); stroke: var(--m-ink); stroke-width: 2; }
.m-ripple .core-in { fill: var(--m-ink); }
.m-ripple .node { fill: var(--m-paper); stroke: var(--m-ink); stroke-width: 1.5; transform-box: fill-box; transform-origin: center; }
.m-ripple .link { fill: none; stroke: var(--m-ink); stroke-width: 1; stroke-dasharray: 1; stroke-dashoffset: 1; opacity: .35; }
.m-ripple .sq { fill: var(--m-blue); }
@keyframes margine-wave { 0% { transform: scale(.18); opacity: 0; } 12% { opacity: .9; } 100% { transform: scale(1); opacity: 0; } }
@keyframes margine-node { 0%, 100% { fill: var(--m-paper); transform: scale(1); } 45%, 60% { fill: var(--m-mint); transform: scale(1.35); } }
@keyframes margine-link { 0%, 30% { stroke-dashoffset: 1; } 55%, 85% { stroke-dashoffset: 0; } 100% { stroke-dashoffset: -1; } }
@keyframes margine-breathe { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.06); } }
.m-ripple .wave { animation: margine-wave 6s cubic-bezier(.2,.6,.3,1) infinite; }
.m-ripple .wave:nth-of-type(2) { animation-delay: 1.5s; } .m-ripple .wave:nth-of-type(3) { animation-delay: 3s; } .m-ripple .wave:nth-of-type(4) { animation-delay: 4.5s; }
.m-ripple .node { animation: margine-node 6s ease-in-out infinite; }
.m-ripple .link { animation: margine-link 6s ease-in-out infinite; }
.m-ripple .core-g { transform-origin: 200px 200px; transform-box: view-box; animation: margine-breathe 3s ease-in-out infinite; }
@media (prefers-reduced-motion: reduce) {
	.m-ripple .wave, .m-ripple .node, .m-ripple .link, .m-ripple .core-g { animation: none !important; }
	.m-ripple .wave { opacity: .5; } .m-ripple .link { stroke-dashoffset: 0; }
}


/* v0.1.8: visual astratto fermo */
.m-ripple .wave, .m-ripple .node, .m-ripple .link, .m-ripple .core-g { animation: none !important; }
.m-ripple .wave { opacity: 1; transform: none; }
.m-ripple .wave.m { opacity: .9; }
.m-ripple .wave.soft { opacity: .35; }
.m-ripple .link { stroke-dashoffset: 0; stroke-dasharray: none; opacity: .3; }
.m-ripple .node.on { fill: var(--m-mint); }

/* Sezione formazione */
.m-train .m-facts p { font-size: 13px; margin-bottom: 14px; }
.m-train .m-facts strong { font-size: 16px; font-family: var(--m-sans, inherit); }


/* Elenco vantaggi */
.m-benefits { list-style: none; padding: 0 !important; margin: 18px 0 0 !important; }
.m-benefits li { position: relative; padding: 10px 0 10px 34px; border-top: 1px solid var(--m-line); font-size: 17px; line-height: 1.45; }
.m-benefits li:last-child { border-bottom: 1px solid var(--m-line); }
.m-benefits li::before { content: ""; position: absolute; left: 0; top: 13px; width: 20px; height: 20px; border-radius: 50%; background: var(--m-mint) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5.5 10.5l3 3 6-7' fill='none' stroke='%230b0d12' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 20px no-repeat; border: 1.5px solid var(--m-ink); box-sizing: border-box; }
.m-benefits strong { font-weight: 600; }


/* Visual astratto: collage + segno a mano */
.m-collage { width: 100%; max-width: 460px; margin: 0 auto; }
.m-collage svg { display: block; width: 100%; height: auto; }


/* v0.2.1: footer nero, continuo con la fascia Contattami */
.m-footer { background: var(--m-ink); color: #c4c9d1; border-top: 0; padding-block: 0 24px; margin-top: 0 !important; }
.m-footer > .m-footer-cols { border-top: 1px solid var(--m-darkline); padding-top: 48px; }
.m-footer a { color: #fff; }
.m-footer a:hover { text-decoration-color: var(--m-mint); }
.m-footer-brand .wp-block-site-title a { color: #fff; }
.m-footer-claim { color: #9aa3ae; }
.m-footer-label { color: var(--m-mint); }
.m-footer-bottom { border-top-color: var(--m-darkline); color: #9aa3ae; }
.m-footer-bottom .is-style-hand { color: var(--m-mint); }
/* niente spazi tra l'ultima fascia della pagina e il footer */
.wp-site-blocks > footer, .wp-site-blocks > .wp-block-template-part:last-child { margin-top: 0 !important; }
main.wp-block-group { margin-bottom: 0 !important; padding-bottom: 0 !important; }
.entry-content > .alignfull:last-child { margin-bottom: 0 !important; }


/* Continuazione di una fascia, senza stacco */
.m-band.m-band-cont { padding-top: 0 !important; }
.m-band-cont .m-kind { margin-bottom: 4px; }
.m-band-cont .is-style-card h3 { font-size: 22px; margin: 0 0 6px; }


/* Strumenti in Chi sono: continuazione della bio, sobria */
.m-toolist-wrap h2 { font-size: clamp(26px, 2.6vw, 32px) !important; margin-bottom: 6px !important; }
.m-toolist-wrap .m-toolist-lead { color: var(--m-muted); margin-bottom: 18px !important; }
.m-toolist { display: grid !important; grid-template-columns: 1fr 1fr; gap: 0 40px; }
.m-toolist > .wp-block-group { border-top: 1px solid var(--m-line); padding: 16px 0 18px !important; margin: 0 !important; }
.m-toolist h3 { font-size: 20px !important; margin: 0 0 6px !important; display: inline-block; text-decoration: underline; text-decoration-color: var(--m-mint); text-decoration-thickness: 5px; text-underline-offset: 5px; text-decoration-skip-ink: none; }
.m-toolist p { color: var(--m-muted); font-size: 15px; line-height: 1.5; margin: 0 !important; }
@media (max-width: 781px) { .m-toolist { grid-template-columns: 1fr; } .m-toolist-spacer { display: none; } }


/* Bio + strumenti senza stacco */
.m-band:has(+ .m-band-cont) { padding-bottom: 24px !important; }
.m-toolist { margin-top: 4px !important; }


/* Elenco strumenti v2 */
.m-toolist { grid-template-columns: 1fr !important; max-width: 640px; }
.m-toolist > .wp-block-group { border-top: 0 !important; padding: 8px 0 12px !important; }


/* Nota ads nella pagina SEO e GEO */
.m-ads-note { margin-top: 18px !important; color: var(--m-muted); font-size: 15px; }
.m-ads-note a { font-weight: 600; text-decoration: none; }


/* Form contatti */
.m-form { background: var(--m-paper); border: 1.5px solid var(--m-ink); box-shadow: 8px 8px 0 var(--m-blue); padding: 28px; }
.m-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
.m-field { margin: 0 0 16px !important; }
.m-field label { display: block; font-family: var(--m-mono); font-stretch: 87%; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--m-teal); margin-bottom: 6px; }
.m-field label span { text-transform: none; letter-spacing: 0; color: var(--m-muted); }
.m-field input, .m-field textarea { width: 100%; box-sizing: border-box; font: inherit; font-size: 16px; color: var(--m-ink); background: var(--m-bg); border: 1.5px solid var(--m-ink); border-radius: 0; padding: 12px 14px; }
.m-field textarea { resize: vertical; min-height: 140px; }
.m-field input:focus, .m-field textarea:focus { outline: none; background: var(--m-paper); box-shadow: 4px 4px 0 var(--m-mint); }
.m-check { font-size: 14px; color: var(--m-muted); margin: 4px 0 18px !important; }
.m-check label { display: flex; gap: 10px; align-items: flex-start; }
.m-check input { margin-top: 3px; accent-color: var(--m-blue); width: 16px; height: 16px; flex: none; }
.m-form-actions { margin: 0 !important; }
.m-form button { cursor: pointer; border: 0; }
.m-form button:disabled { opacity: .5; cursor: default; }
.m-form-msg { margin: 16px 0 0 !important; padding: 12px 14px; border: 1.5px solid var(--m-ink); font-size: 15px; }
.m-ok { background: var(--m-mint); }
.m-ko { background: #ffe1dc; }
.m-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
.m-form-intro p { max-width: 38ch; }
.m-form-intro .m-note { color: var(--m-muted); font-size: 15px; }
@media (max-width: 781px) { .m-form-row { grid-template-columns: 1fr; } .m-form { padding: 20px; box-shadow: 5px 5px 0 var(--m-blue); } }


/* Selettore di lingua */
.margine-lang { font-family: var(--m-mono); font-stretch: 87%; font-size: 12px; letter-spacing: .06em; text-decoration: none; color: var(--m-ink); border: 1.5px solid var(--m-ink); border-radius: 999px; padding: 4px 10px; line-height: 1; }
.margine-lang:hover { background: var(--m-mint); }
.m-header .wp-block-shortcode, .m-header p:has(> .margine-lang) { margin: 0; }


/* Home inglese: h1 un po' più piccolo */
html[lang="en"] .m-hero h1 { font-size: clamp(40px, 4.6vw, 62px) !important; }


/* Schema "ovunque ti cerchino": linee calcolate dal JS, chip sopra le linee, nota sotto */
.m-everywhere { margin-bottom: 44px; }
.m-everywhere svg { z-index: 0; overflow: visible; }
.m-everywhere .chip { z-index: 3; }
.m-everywhere .q > span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.m-everywhere .hand { bottom: -40px; max-width: 100%; }
@media (max-width: 600px) {
  .m-everywhere { min-height: 300px; }
  .m-everywhere .q { left: 3%; right: 3%; font-size: 12px; padding: 12px 16px; box-shadow: 4px 4px 0 var(--m-ink); }
  .m-everywhere .chip { font-size: 11px; padding: 6px 10px; }
  .m-everywhere .hand { font-size: 21px; bottom: -32px; }
}
