Avvicina il cursore: il percorso si adatta, le tappe restano.
Anno
Trimestri
Mesi
Timing trimestrale
Temi e messaggi chiave.
Keyword e direzioni creative per ogni trimestre, ricalibrate su risultati reali e trend dell'audience.
.advp{
--advp-bg:#00263E; --advp-navy:#003152; --advp-yellow:#FFDE45;
--advp-cream:#E0DFC6; --advp-paper:#F4EEF1;
container-type:inline-size; container-name:advp;
width:100%; height:100%; font-family:inherit; color:#fff;
-webkit-font-smoothing:antialiased;
}
.advp *{box-sizing:border-box}
.advp-in{
position:relative; display:flex; flex-direction:column;
height:var(--advp-h,100%); min-height:var(--advp-min-h,520px);
background:var(--advp-bg); overflow:hidden;
}
.advp-stage{position:absolute; inset:0; touch-action:pan-y}
.advp-svg{display:block; width:100%; height:100%; overflow:visible}
/* --- testata: switch + didascalia --- */
.advp-head{
position:absolute; z-index:2; pointer-events:none;
top:clamp(28px,8%,56px); left:clamp(24px,7%,64px); width:min(44%,380px);
transition:opacity .7s ease, transform .7s ease;
}
.advp.js:not(.is-ready) .advp-head{opacity:0; transform:translateY(8px); transition:none}
.advp-seg{display:inline-flex; border:1px solid rgba(255,255,255,.22); pointer-events:auto}
.advp .advp-seg button{
-webkit-appearance:none; appearance:none; margin:0; width:auto; min-height:0;
background:transparent; border:0; border-radius:0; box-shadow:none; text-shadow:none;
color:rgba(255,255,255,.72); font-family:inherit; font-size:11px; font-weight:700;
line-height:1; letter-spacing:.14em; text-transform:uppercase; white-space:nowrap;
padding:11px 15px; cursor:pointer; transition:background-color .25s, color .25s;
}
.advp .advp-seg button + button{border-left:1px solid rgba(255,255,255,.22)}
.advp .advp-seg button:hover, .advp .advp-seg button:focus{background:rgba(255,255,255,.07); color:#fff}
.advp .advp-seg button[aria-selected="true"],
.advp .advp-seg button[aria-selected="true"]:hover,
.advp .advp-seg button[aria-selected="true"]:focus{background:var(--advp-yellow); color:var(--advp-bg)}
.advp .advp-seg button:focus-visible{outline:2px solid var(--advp-yellow); outline-offset:3px}
.advp-cap{margin-top:24px; transition:opacity .22s ease}
.advp-cap.is-swap{opacity:0}
.advp-eyebrow{display:block; color:var(--advp-yellow); font-size:11px; font-weight:700; letter-spacing:.16em; text-transform:uppercase; margin-bottom:10px}
.advp-title{display:block; font-size:20px; font-weight:700; line-height:1.25; color:#fff; margin-bottom:8px}
.advp-text{display:block; font-size:14px; line-height:1.55; color:rgba(255,255,255,.72); max-width:36ch}
/* --- suggerimento --- */
.advp-hint{
position:absolute; right:clamp(24px,7%,64px); bottom:64px; max-width:60%;
display:flex; align-items:center; gap:8px; text-align:right;
font-size:12px; line-height:1.35; color:rgba(255,255,255,.45);
opacity:0; transition:opacity .6s ease 1s; pointer-events:none;
}
.advp.is-ready .advp-hint{opacity:1}
.advp.is-touched .advp-hint{opacity:0; transition-delay:0s}
/* --- grafico --- */
.advp-line{fill:none; stroke-linejoin:round; stroke-linecap:round}
.advp-base{stroke:rgba(255,255,255,.16); stroke-width:1}
.advp-tick{stroke:rgba(255,255,255,.28); stroke-width:1}
.advp-grid line{stroke:rgba(255,255,255,.055); stroke-width:1}
.advp-guide{stroke:rgba(255,222,69,.22); stroke-width:1; stroke-dasharray:3 6; fill:none}
.advp-lbl{fill:rgba(255,255,255,.42); font-family:inherit; font-size:10px; font-weight:700; letter-spacing:.14em; text-anchor:middle}
.advp-m, .advp-axis{opacity:0; transition:opacity .5s ease}
.advp.is-ready .advp-axis,
.advp.is-ready .advp-m--all,
.advp.is-ready[data-mode="anno"] .advp-m--anno,
.advp.is-ready[data-mode="trimestri"] .advp-m--trimestri,
.advp.is-ready[data-mode="mesi"] .advp-m--mesi{opacity:1}
/* --- tappe --- */
.advp-node{pointer-events:none; outline:none; cursor:pointer}
.advp.is-ready .advp-node.advp-m--all,
.advp.is-ready[data-mode="anno"] .advp-node.advp-m--anno,
.advp.is-ready[data-mode="trimestri"] .advp-node.advp-m--trimestri,
.advp.is-ready[data-mode="mesi"] .advp-node.advp-m--mesi{pointer-events:auto}
.advp-hit{fill:transparent}
.advp-dot{
transform-box:fill-box; transform-origin:center; transform:scale(0);
transition:transform .45s cubic-bezier(.34,1.56,.64,1) var(--d,0ms);
}
.advp.is-ready .advp-m--all .advp-dot,
.advp.is-ready[data-mode="anno"] .advp-m--anno .advp-dot,
.advp.is-ready[data-mode="trimestri"] .advp-m--trimestri .advp-dot,
.advp.is-ready[data-mode="mesi"] .advp-m--mesi .advp-dot{transform:scale(1)}
.advp.is-ready .advp-node:hover .advp-dot,
.advp.is-ready .advp-node:focus-visible .advp-dot,
.advp.is-ready .advp-node.is-active .advp-dot{transform:scale(1.3); transition-delay:0ms}
.advp-node:focus-visible .advp-hit{stroke:var(--advp-yellow); stroke-width:1.5}
.advp-t-start .advp-dot, .advp-t-check .advp-dot, .advp-t-dot .advp-dot, .advp-t-mini .advp-dot{fill:var(--advp-cream)}
.advp-t-ring .advp-dot, .advp-t-key .advp-dot{fill:var(--advp-bg); stroke:var(--advp-cream); stroke-width:2}
.advp-t-goal .advp-dot{fill:var(--advp-yellow)}
.advp-halo{fill:none; stroke:var(--advp-yellow); stroke-width:1.5; transform-box:fill-box; transform-origin:center; opacity:0; pointer-events:none}
.advp.is-ready .advp-halo{animation:advp-pulse 2.8s ease-out 1.2s infinite}
@keyframes advp-pulse{0%{transform:scale(1); opacity:.55} 100%{transform:scale(2.9); opacity:0}}
/* --- tooltip --- */
.advp-tip{
position:absolute; z-index:5; left:0; top:0; width:max-content; max-width:250px;
background:var(--advp-paper); color:var(--advp-bg); padding:12px 14px 13px;
box-shadow:0 12px 32px rgba(0,0,0,.28); pointer-events:none;
opacity:0; transform:translateY(4px); transition:opacity .18s ease, transform .18s ease;
}
.advp-tip.is-on{opacity:1; transform:none}
.advp-tip-k{display:block; font-size:10.5px; font-weight:700; letter-spacing:.14em; text-transform:uppercase; color:var(--advp-navy); margin-bottom:6px}
.advp-tip-t{display:block; font-size:13px; line-height:1.45; color:rgba(0,38,62,.82)}
/* --- colonna stretta / mobile --- */
@container advp (max-width: 640px){
.advp-in{height:auto; min-height:0}
.advp-head{position:static; order:-1; width:auto; padding:28px 24px 4px}
.advp-text{max-width:none}
.advp-stage{position:relative; inset:auto; height:360px}
.advp-hint{display:none}
}
@media (prefers-reduced-motion: reduce){
.advp *, .advp *::before, .advp *::after{transition-duration:.01ms !important; animation:none !important}
}
(function () {
/* ---------- Testi e dati: modificabili ---------- */
var MESI = ['Gennaio','Febbraio','Marzo','Aprile','Maggio','Giugno','Luglio','Agosto','Settembre','Ottobre','Novembre','Dicembre'];
var INIZIALI = ['G','F','M','A','M','G','L','A','S','O','N','D'];
var MODES = {
anno: {
eyebrow: 'Timing annuale',
title: 'La rotta di lungo periodo.',
text: "Date chiave, eventi e periodicità del brand: un riferimento stabile che protegge l'identità per tutto l'anno.",
// [mese, avanzamento 0–1]
path: [[0,0],[12,1]],
nodes: [
{ m: 2, type: 'key', k: 'Data chiave', t: 'Lanci, ricorrenze e momenti del brand fissati in calendario.' },
{ m: 7, type: 'key', k: 'Evento', t: "Gli appuntamenti dell'anno, pianificati in anticipo e non rincorsi." },
{ m: 10, type: 'key', k: 'Periodicità', t: 'Stagionalità e cicli del settore già previsti nella rotta.' }
]
},
trimestri: {
eyebrow: 'Timing trimestrale',
title: 'Temi e messaggi chiave.',
text: "Keyword e direzioni creative per ogni trimestre, ricalibrate su risultati reali e trend dell'audience.",
path: [[0,0],[3,.45],[6,.25],[9,.62],[12,1]],
nodes: [
{ m: 3, type: 'check', k: 'Q1 · Verifica', t: 'Keyword e messaggi chiave messi alla prova dei primi risultati.' },
{ m: 6, type: 'ring', k: 'Q2 · Ricalibrazione', t: 'Il mercato risponde diversamente? La strategia si adatta ai dati, senza perdere la rotta.' },
{ m: 9, type: 'dot', k: 'Q3 · Nuova direzione', t: "Temi e direzioni creative aggiornati sui trend dell'audience." }
]
},
mesi: {
eyebrow: 'Piano mensile',
title: 'Contenuti e canali.',
text: 'I temi del trimestre diventano asset digitali concreti, con il giusto tone of voice per ogni canale.',
path: [[0,0],[1,.14],[2,.31],[3,.45],[4,.36],[5,.30],[6,.25],[7,.38],[8,.44],[9,.62],[10,.69],[11,.86],[12,1]],
nodes: (function () {
var out = [], ord = ['primo','secondo','terzo'];
for (var m = 1; m <= 11; m++) {
out.push(m % 3 === 0
? { m: m, type: 'mini', r: 5, k: MESI[m-1] + ' · Fine trimestre', t: 'Chiusura del ' + ord[m/3-1] + ' trimestre: report e verifica dei risultati.' }
: { m: m, type: 'mini', k: MESI[m-1] + ' · Piano mensile', t: 'Contenuti e canali del mese, con il giusto tone of voice.' });
}
return out;
})()
}
};
var SHARED = [
{ m: 0, type: 'start', k: 'Punto di partenza', t: "Audit e osservazione: si parte dall'analisi reale dei processi, non dalla teoria." },
{ m: 12, type: 'goal', k: 'Obiettivo', t: 'Il traguardo fissato a inizio percorso. Ogni step, annuale, trimestrale o mensile, lavora per raggiungerlo.' }
];
var RADII = { start: 4.5, goal: 10, check: 8, ring: 6.5, dot: 6, key: 5.5, mini: 3.5 };
/* ---------- Motore ---------- */
var SPM = 8, N = 12 * SPM + 1; // 8 campioni per mese
var K = 0.075, DAMP = 0.78; // molla
var NS = 'http://www.w3.org/2000/svg';
function el(tag, attrs, parent) {
var e = document.createElementNS(NS, tag);
for (var a in attrs) e.setAttribute(a, attrs[a]);
if (parent) parent.appendChild(e);
return e;
}
function clamp(v, a, b) { return v
b ? b : v; }
function smooth(x) { x = clamp(x, 0, 1); return x * x * (3 - 2 * x); }
function pAt(path, t) {
for (var i = 1; i < path.length; i++) {
if (t <= path[i][0] + 1e-9) {
var a = path[i-1], b = path[i], u = (t - a[0]) / (b[0] - a[0]);
return a[1] + (b[1] - a[1]) * u;
}
}
return path[path.length-1][1];
}
function init(root) {
if (root.getAttribute('data-advp-init')) return;
root.setAttribute('data-advp-init', '1');
root.classList.add('js');
var inner = root.querySelector('.advp-in');
var stage = root.querySelector('.advp-stage');
var svg = root.querySelector('.advp-svg');
var head = root.querySelector('.advp-head');
var cap = root.querySelector('.advp-cap');
var tip = root.querySelector('.advp-tip');
var tabs = root.querySelectorAll('.advp-seg button');
var reduce = window.matchMedia && matchMedia('(prefers-reduced-motion: reduce)').matches;
var canHover = window.matchMedia && matchMedia('(hover: hover)').matches;
if (!canHover) root.querySelector('.advp-hint-txt').textContent = 'Tocca le tappe per i dettagli.';
var mode = root.getAttribute('data-mode') || 'trimestri';
var W = 0, H = 0, L = {};
var P = [], V = [], T = [], C = [], act = [], pins = [], taper = [], wob = [];
var entered = false, readyAt = Infinity, visible = false, running = false, last = 0, ptr = null;
for (var i = 0; i < N; i++) {
P.push({x:0,y:0}); V.push({x:0,y:0}); T.push({x:0,y:0}); C.push({x:0,y:0});
act.push(Infinity); pins.push(false); taper.push(1);
wob.push([.6 + Math.random(), .6 + Math.random(), Math.random()*6.3, Math.random()*6.3]);
}
// livelli SVG
var gGrid = el('g', {'class':'advp-grid'}, svg);
var gAxis = el('g', {'class':'advp-axis'}, svg);
var guide = el('line', {'class':'advp-guide advp-m advp-m--trimestri advp-m--mesi'}, svg);
var line = el('polyline', {'class':'advp-line'}, svg);
var gNodes = el('g', {}, svg);
// tappe
var nodes = [];
function addNode(n, scope, k) {
var g = el('g', {'class':'advp-node advp-m advp-m--' + scope + ' advp-t-' + n.type, tabindex:'-1', role:'button', 'aria-label': n.k + '. ' + n.t}, gNodes);
el('circle', {'class':'advp-hit', r: 16}, g);
if (n.type === 'goal') el('circle', {'class':'advp-halo', r: RADII.goal}, g);
var d = el('circle', {'class':'advp-dot', r: n.r || RADII[n.type]}, g);
d.style.setProperty('--d', (k * 45) + 'ms');
var obj = { g: g, n: n, scope: scope, idx: Math.round(n.m * SPM) };
nodes.push(obj);
g.addEventListener('pointerenter', function (e) { if (e.pointerType !== 'touch') showTip(obj); });
g.addEventListener('pointerleave', function (e) { if (e.pointerType !== 'touch') hideTip(); });
g.addEventListener('focus', function () { showTip(obj); });
g.addEventListener('blur', hideTip);
g.addEventListener('pointerdown', function (e) { lastPT = e.pointerType; });
g.addEventListener('click', function (e) {
e.stopPropagation();
if (lastPT === 'mouse') showTip(obj); // col mouse il click non chiude
else if (tipFor === obj) hideTip(); else showTip(obj);
});
g.addEventListener('keydown', function (e) { if (e.key === 'Escape') hideTip(); });
}
Object.keys(MODES).forEach(function (m) { MODES[m].nodes.forEach(function (n, k) { addNode(n, m, k + 1); }); });
SHARED.forEach(function (n, k) { addNode(n, 'all', k === 0 ? 0 : 6); });
// tooltip
var tipFor = null, lastPT = '';
function showTip(o) {
if (!root.classList.contains('is-ready')) return;
tipFor = o;
nodes.forEach(function (x) { x.g.classList.toggle('is-active', x === o); });
tip.querySelector('.advp-tip-k').textContent = o.n.k;
tip.querySelector('.advp-tip-t').textContent = o.n.t;
var p = T[o.idx], sx = stage.offsetLeft, sy = stage.offsetTop;
var tw = tip.offsetWidth, th = tip.offsetHeight, iw = inner.clientWidth;
var x = clamp(p.x + sx - tw / 2, 10, iw - tw - 10);
var y = p.y + sy - th - 20;
if (y 0 && v < 12) el('line', {x1: X(v), x2: X(v), y1: L.top - 10, y2: L.axis - 8}, gg);
});
});
var ly = L.axis + 24, t;
t = el('text', {'class':'advp-lbl advp-m advp-m--anno', x: X(6), y: ly}, gAxis); t.textContent = 'GENNAIO → DICEMBRE';
for (var q = 0; q < 4; q++) { t = el('text', {'class':'advp-lbl advp-m advp-m--trimestri', x: X(q*3 + 1.5), y: ly}, gAxis); t.textContent = 'Q' + (q+1); }
for (var m = 0; m < 12; m++) { t = el('text', {'class':'advp-lbl advp-m advp-m--mesi', x: X(m + .5), y: ly}, gAxis); t.textContent = INIZIALI[m]; }
guide.setAttribute('x1', X(0)); guide.setAttribute('y1', Y(0));
guide.setAttribute('x2', X(12)); guide.setAttribute('y2', Y(1));
setTargets();
if (entered) { for (var i = 0; i < N; i++) { P[i].x = T[i].x; P[i].y = T[i].y; V[i].x = V[i].y = 0; } }
else makeChaos();
draw(performance.now());
}
function setTargets() {
var path = MODES[mode].path;
for (var i = 0; i < N; i++) { var m = i / SPM; T[i].x = X(m); T[i].y = Y(pAt(path, m)); pins[i] = false; }
var pinIdx = [0, N - 1];
MODES[mode].nodes.forEach(function (n) { pinIdx.push(Math.round(n.m * SPM)); });
pinIdx.forEach(function (k) { pins[k] = true; });
for (var j = 0; j < N; j++) {
var dmin = 99;
pinIdx.forEach(function (k) { dmin = Math.min(dmin, Math.abs(k - j)); });
taper[j] = smooth(dmin / 6);
}
}
// disordine: una linea aggrovigliata che evita la didascalia
function makeChaos() {
var hr = head.getBoundingClientRect(), sr = stage.getBoundingClientRect();
var box = { l: hr.left - sr.left - 14, r: hr.right - sr.left + 14, t: hr.top - sr.top - 14, b: hr.bottom - sr.top + 14 };
function ok(x, y) {
if (x L.x1 || y L.base) return false;
return !(x > box.l && x box.t && y < box.b);
}
var step = clamp(W * 0.05, 16, 42), x, y, a = Math.random() * 6.28, tries = 0;
do { x = L.x0 + Math.random() * (L.x1 - L.x0); y = L.top + Math.random() * (L.base - L.top); } while (!ok(x, y) && ++tries < 200);
for (var i = 0; i < N; i++) {
var nx, ny, k = 0;
do {
a += (Math.random() - .5) * (k ? 3 : 1.8);
var s = step * (.55 + Math.random() * .9);
nx = x + Math.cos(a) * s; ny = y + Math.sin(a) * s;
} while (!ok(nx, ny) && ++k = 24) { nx = (L.x0 + L.x1) * .62; ny = (L.top + L.base) * .55; }
x = nx; y = ny;
C[i].x = P[i].x = x; C[i].y = P[i].y = y; V[i].x = V[i].y = 0;
}
}
function enter(now) {
if (entered) return;
entered = true;
if (reduce) {
for (var i = 0; i < N; i++) { P[i].x = T[i].x; P[i].y = T[i].y; act[i] = 0; }
readyAt = 0; root.classList.add('is-ready'); draw(now); return;
}
for (var j = 0; j < N; j++) act[j] = now + 450 + j * 11;
readyAt = now + 450 + N * 11 + 250;
}
function setMode(m) {
if (!MODES[m] || m === mode) return;
mode = m; root.setAttribute('data-mode', m);
tabs.forEach(function (b) { b.setAttribute('aria-selected', b.getAttribute('data-mode') === m ? 'true' : 'false'); });
nodes.forEach(function (o) { o.g.setAttribute('tabindex', (o.scope === m || o.scope === 'all') ? '0' : '-1'); });
hideTip();
cap.classList.add('is-swap');
setTimeout(function () {
cap.querySelector('.advp-eyebrow').textContent = MODES[m].eyebrow;
cap.querySelector('.advp-title').textContent = MODES[m].title;
cap.querySelector('.advp-text').textContent = MODES[m].text;
cap.classList.remove('is-swap');
}, reduce ? 0 : 200);
setTargets();
if (reduce) for (var i = 0; i < N; i++) { P[i].x = T[i].x; P[i].y = T[i].y; }
kick();
}
tabs.forEach(function (b) { b.addEventListener('click', function (e) { e.stopPropagation(); setMode(b.getAttribute('data-mode')); }); });
// puntatore: la linea si lascia attrarre, le tappe restano ferme
stage.addEventListener('pointermove', function (e) {
if (e.pointerType === 'touch' || reduce) return;
var r = svg.getBoundingClientRect();
ptr = { x: e.clientX - r.left, y: e.clientY - r.top };
kick();
});
stage.addEventListener('pointerleave', function () { ptr = null; kick(); });
function draw(now) {
var pts = '';
for (var i = 0; i < N; i++) pts += P[i].x.toFixed(1) + ',' + P[i].y.toFixed(1) + ' ';
line.setAttribute('points', pts);
// dal grigio del disordine al giallo del percorso
var o = 1;
if (now < readyAt + 600) {
var s = 0;
for (var j = 0; j < N; j++) s += Math.abs(P[j].x - T[j].x) + Math.abs(P[j].y - T[j].y);
o = 1 - clamp((s / N) / (W * 0.12), 0, 1);
}
var r = Math.round(224 + 31 * o), g = Math.round(223 - 1 * o), b = Math.round(198 - 129 * o);
line.setAttribute('stroke', 'rgba(' + r + ',' + g + ',' + b + ',' + (0.32 + 0.26 * o).toFixed(3) + ')');
line.setAttribute('stroke-width', (1.25 + 1.25 * o).toFixed(2));
for (var k = 0; k < nodes.length; k++) {
var p = P[nodes[k].idx];
nodes[k].g.setAttribute('transform', 'translate(' + p.x.toFixed(1) + ' ' + p.y.toFixed(1) + ')');
}
}
function frame(now) {
if (!visible) { running = false; return; }
var dt = Math.min(48, now - last) / 16.667; last = now;
var moving = !entered, R = clamp(W * 0.14, 70, 120), touched = false;
var damp = Math.pow(DAMP, dt), t = now * 0.001;
for (var i = 0; i < N; i++) {
if (now readyAt && !pins[i]) {
var dx = ptr.x - tx, dy = ptr.y - ty, d = Math.sqrt(dx * dx + dy * dy);
if (d 0.15) touched = true;
}
}
V[i].x = (V[i].x + (tx - P[i].x) * K * dt) * damp;
V[i].y = (V[i].y + (ty - P[i].y) * K * dt) * damp;
P[i].x += V[i].x * dt; P[i].y += V[i].y * dt;
if (Math.abs(V[i].x) + Math.abs(V[i].y) > 0.02 || Math.abs(tx - P[i].x) + Math.abs(ty - P[i].y) > 0.1) moving = true;
}
if (now >= readyAt && !root.classList.contains('is-ready')) {
root.classList.add('is-ready');
nodes.forEach(function (o) { o.g.setAttribute('tabindex', (o.scope === mode || o.scope === 'all') ? '0' : '-1'); });
}
if (touched && !root.classList.contains('is-touched')) root.classList.add('is-touched');
draw(now);
if (moving || ptr || now = 0.35) enter(performance.now());
if (visible) kick();
});
}, { threshold: [0, 0.35] }).observe(stage);
} else { visible = true; enter(performance.now()); kick(); }
if ('ResizeObserver' in window) {
var rt;
new ResizeObserver(function () { clearTimeout(rt); rt = setTimeout(function () { layout(); kick(); }, 60); }).observe(stage);
}
window.addEventListener('resize', function () { layout(); kick(); });
layout();
}
// nasconde subito la didascalia (evita il lampo prima dell'animazione)
document.querySelectorAll('.advp').forEach(function (r) { r.classList.add('js'); });
function boot() { document.querySelectorAll('.advp').forEach(init); }
if (document.readyState === 'loading') document.addEventListener('DOMContentLoaded', boot); else boot();
})();