/*
Theme Name: Matteo Capretti
Theme URI: https://matteocapretti.com
Author: Matteo Capretti
Description: Tema del sito matteocapretti.com (2026). Font, icone e immagini ospitati nel tema, nessuna risorsa esterna.
Version: 2.1.0
Requires at least: 6.6
Requires PHP: 7.4
License: Proprietario
Text Domain: matteocapretti
*/

/* matteocapretti.com, versione 2 (29/10/2026)
   Direzione: "dark tech". Fondo quasi nero, un solo accento blu elettrico (lo stesso della chat IA),
   Geist + Geist Mono, griglia tecnica di sfondo. Forme: pulsanti a pillola, riquadri con raggio 20px.
   Movimento: particelle nel monogramma, testi che si compongono, dati che si animano. Tutto si spegne
   con "riduci movimento" del sistema. Nessuna risorsa esterna. */

@font-face { font-family: "Geist"; src: url("assets/fonts/Geist-Variable.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Geist Mono"; src: url("assets/fonts/GeistMono-Variable.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }

:root {
  --bg: #05060a;
  --bg-2: #090b11;
  --surface: #0c0f17;
  --surface-2: #121624;
  --ink: #eef1f8;
  --ink-2: #b4bccb;
  --muted: #7a8396;
  --line: rgba(255, 255, 255, .08);
  --line-2: rgba(255, 255, 255, .14);
  --accent: #4a63ff;
  --accent-hi: #8b9cff;
  --accent-ink: #ffffff;
  --accent-soft: rgba(74, 99, 255, .16);
  --mono-color: #eef1f8;
  --radius: 20px;
  --ease: cubic-bezier(.16, 1, .3, 1);
  --pad: clamp(20px, 5vw, 72px);
  --mono: "Geist Mono", ui-monospace, Menlo, monospace;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; background: var(--bg); }
body { margin: 0; background: var(--bg); color: var(--ink); font: 17px/1.6 "Geist", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
/* griglia tecnica fissa sotto tutto */
body::before { content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 88px 88px; opacity: .35;
  -webkit-mask: radial-gradient(ellipse 90% 70% at 50% 0%, #000 30%, transparent 80%); mask: radial-gradient(ellipse 90% 70% at 50% 0%, #000 30%, transparent 80%); }
/* grana leggera */
body::after { content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 40; opacity: .06; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }
::selection { background: var(--accent); color: var(--accent-ink); }
a { color: inherit; }
img { display: block; max-width: 100%; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: var(--bg); padding: 8px 14px; border-radius: 99px; z-index: 50; }
.skip:focus { left: 8px; }
:focus-visible { outline: 2px solid var(--accent-hi); outline-offset: 3px; border-radius: 6px; }
.ico, .tile-ico { filter: invert(1); }

/* luce che segue il puntatore su tutta la pagina */
.cursor-light { position: fixed; left: 0; top: 0; width: 640px; height: 640px; margin: -320px 0 0 -320px; border-radius: 50%; pointer-events: none; z-index: 0;
  background: radial-gradient(closest-side, rgba(74, 99, 255, .11), transparent); transform: translate3d(var(--cx, -999px), var(--cy, -999px), 0); }

/* ---------- monogramma ---------- */
.mono-mark { width: 28px; height: 28px; flex: none; background: var(--mono-color);
  -webkit-mask: url("assets/img/monogramma.png") center/contain no-repeat; mask: url("assets/img/monogramma.png") center/contain no-repeat; }

/* ---------- etichette tecniche ---------- */
.kicker { font-family: var(--mono); font-size: 13px; text-transform: uppercase; letter-spacing: .14em; color: var(--accent-hi); margin: 0 0 22px; display: flex; align-items: center; gap: 12px; }
.kicker::before { content: ""; width: 28px; height: 1px; background: currentColor; }
.tag { font-family: var(--mono); font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); border: 1px solid var(--line-2); border-radius: 999px; padding: 5px 10px; white-space: nowrap; }
.pulse { width: 8px; height: 8px; border-radius: 50%; background: #3ddc97; box-shadow: 0 0 0 0 rgba(61, 220, 151, .6); animation: pulse 2s infinite; flex: none; }
@keyframes pulse { 70% { box-shadow: 0 0 0 9px rgba(61, 220, 151, 0); } 100% { box-shadow: 0 0 0 0 rgba(61, 220, 151, 0); } }

/* ---------- pulsanti: sempre a pillola ---------- */
.btn { position: relative; display: inline-flex; align-items: center; gap: 10px; height: 52px; padding: 0 26px; border-radius: 999px; font: 500 16px/1 inherit; font-family: inherit; text-decoration: none; white-space: nowrap; cursor: pointer; border: 0;
  transition: transform .4s var(--ease), background .3s, color .3s, box-shadow .4s var(--ease), border-color .3s; }
.btn:active { scale: .98; }
.btn .ico { width: 18px; height: 18px; transition: transform .4s var(--ease); }
.btn:hover .ico { transform: translate(2px, -2px); }
.btn-solid { background: var(--accent); color: #fff; box-shadow: 0 0 0 1px rgba(255, 255, 255, .12) inset, 0 10px 40px -12px var(--accent); }
.btn-solid .ico { filter: invert(1); }
.btn-solid:hover { background: #5c73ff; box-shadow: 0 0 0 1px rgba(255, 255, 255, .2) inset, 0 14px 50px -10px var(--accent); }
.btn-ghost { background: rgba(255, 255, 255, .03); border: 1px solid var(--line-2); color: var(--ink); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.btn-ghost:hover { border-color: var(--accent-hi); background: var(--accent-soft); }
.btn-sm { height: 40px; padding: 0 18px; font-size: 15px; }
.btn-lg { height: 62px; padding: 0 32px; font-size: 18px; }
.ico { width: 20px; height: 20px; }

/* ---------- navigazione ---------- */
.nav { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 28px; height: 68px; padding: 0 var(--pad);
  background: color-mix(in srgb, var(--bg) 70%, transparent); backdrop-filter: blur(18px) saturate(160%); -webkit-backdrop-filter: blur(18px) saturate(160%);
  border-bottom: 1px solid var(--line); }
.nav-progress { position: absolute; left: 0; bottom: -1px; height: 1px; width: 100%; background: linear-gradient(90deg, transparent, var(--accent-hi)); transform-origin: left; transform: scaleX(var(--sp, 0)); }
.nav-brand { display: flex; align-items: center; gap: 12px; font-weight: 600; letter-spacing: -.01em; text-decoration: none; margin-right: auto; }
.nav nav { display: flex; gap: 26px; }
.nav nav a { text-decoration: none; color: var(--ink-2); font-size: 15px; display: flex; gap: 6px; align-items: baseline; transition: color .3s; }
.nav nav a span { font-family: var(--mono); font-size: 11px; color: var(--accent-hi); }
.nav nav a:hover { color: var(--ink); }
.nav-clock { margin: 0; font-family: var(--mono); font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 8px; letter-spacing: .04em; text-transform: uppercase; }
.nav-clock i { width: 6px; height: 6px; border-radius: 50%; background: #3ddc97; box-shadow: 0 0 10px #3ddc97; }

/* ---------- hero ---------- */
.hero { position: relative; display: grid; grid-template-columns: 1.05fr .95fr; grid-template-rows: 1fr auto; align-items: center; column-gap: 40px;
  min-height: calc(100dvh - 68px); padding: 40px var(--pad) 28px; overflow: hidden; isolation: isolate; }
.hero-canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; }
.hero-grid { position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(60% 70% at 72% 45%, rgba(74, 99, 255, .2), transparent 70%), radial-gradient(40% 40% at 10% 100%, rgba(74, 99, 255, .08), transparent 70%); }
.hero-copy { position: relative; z-index: 2; pointer-events: none; }
.hero-copy a, .hero-copy button { pointer-events: auto; }
h1 { font-size: clamp(46px, 6.6vw, 104px); line-height: .98; letter-spacing: -.05em; font-weight: 600; margin: 0; max-width: 11ch; }
h1 em { font-style: normal; color: var(--accent-hi); }
/* il gradiente va sulle singole parole: le parole animate sono inline-block */
h1 em, h1 em .w > span { background: linear-gradient(100deg, #aab6ff, var(--accent-hi) 45%, #6d82ff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-sub { font-size: clamp(18px, 1.45vw, 21px); color: var(--ink-2); max-width: 42ch; margin: 30px 0 38px; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-art { position: relative; z-index: 1; aspect-ratio: 1; width: 100%; max-width: 640px; justify-self: end; pointer-events: none; }
.mono-fallback { position: absolute; inset: 0; opacity: 0; background: linear-gradient(140deg, var(--accent-hi), var(--ink) 60%);
  -webkit-mask: url("assets/img/monogramma.png") center/contain no-repeat; mask: url("assets/img/monogramma.png") center/contain no-repeat; transition: opacity .6s; }
.no-canvas .mono-fallback { opacity: 1; }
.hud { grid-column: 1 / -1; position: relative; z-index: 2; display: grid; grid-template-columns: repeat(4, 1fr); margin: 36px 0 0; border: 1px solid var(--line); border-radius: 16px;
  background: color-mix(in srgb, var(--bg) 55%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.hud div { padding: 16px 20px; }
.hud div + div { border-left: 1px solid var(--line); }
.hud dt { font-family: var(--mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.hud dd { margin: 4px 0 0; font-size: 15px; font-weight: 500; }
.hero-hint { position: absolute; right: var(--pad); top: 18px; z-index: 2; margin: 0; font-family: var(--mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }

/* ---------- testi che si compongono ---------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .9s var(--ease), transform .9s var(--ease); transition-delay: calc(var(--d, 0) * 110ms); }
.reveal.in { opacity: 1; transform: none; }
.split .w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .08em; margin-bottom: -.08em; }
.split .w > span { display: inline-block; transform: translateY(105%); filter: blur(8px); opacity: 0;
  transition: transform 1s var(--ease), filter 1s var(--ease), opacity 1s var(--ease); transition-delay: calc(var(--i) * 45ms + 80ms); }
.split.in .w > span { transform: none; filter: none; opacity: 1; }

/* ---------- nastri qualifiche ---------- */
.ticker { border-block: 1px solid var(--line); overflow: hidden; padding: 18px 0; display: grid; gap: 12px; background: var(--bg-2);
  -webkit-mask: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); mask: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); }
.ticker-track { display: flex; width: max-content; animation: scorri 50s linear infinite; }
.ticker-rev { animation-direction: reverse; animation-duration: 60s; }
.ticker:hover .ticker-track { animation-play-state: paused; }
.ticker ul { display: flex; gap: 48px; padding: 0 24px; margin: 0; list-style: none; }
.ticker li { font-family: var(--mono); font-size: 14px; color: var(--ink-2); white-space: nowrap; display: flex; align-items: center; gap: 48px; text-transform: uppercase; letter-spacing: .06em; }
.ticker-rev li { font-family: "Geist", sans-serif; text-transform: none; letter-spacing: -.02em; font-size: clamp(22px, 2.4vw, 34px); font-weight: 600; color: transparent; -webkit-text-stroke: 1px var(--line-2); }
.ticker li::after { content: ""; width: 6px; height: 6px; background: var(--accent); transform: rotate(45deg); box-shadow: 0 0 10px var(--accent); }
@keyframes scorri { to { transform: translateX(-50%); } }

/* ---------- sezioni ---------- */
.section { position: relative; padding: clamp(64px, 8vw, 120px) var(--pad); }
.sec-head { margin-bottom: 44px; }
.h2 { font-size: clamp(36px, 4.6vw, 68px); line-height: 1.02; letter-spacing: -.04em; font-weight: 600; margin: 0; max-width: 18ch; }
.lead { font-size: clamp(18px, 1.4vw, 20px); color: var(--ink-2); max-width: 52ch; }

/* ---------- bento servizi ---------- */
.bento { display: grid; grid-template-columns: repeat(6, 1fr); grid-auto-rows: minmax(250px, auto); gap: 14px; }
.tile { --x: 50%; --y: 50%; position: relative; grid-column: span 2; padding: 28px; border-radius: var(--radius); background: linear-gradient(180deg, var(--surface-2), var(--surface)); display: flex; flex-direction: column; overflow: hidden; isolation: isolate;
  box-shadow: 0 0 0 1px var(--line) inset; transition: transform .6s var(--ease); }
/* bordo luminoso che segue il puntatore */
.tile::before { content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px; z-index: 2; pointer-events: none; opacity: 0; transition: opacity .4s;
  background: radial-gradient(260px circle at var(--x) var(--y), var(--accent-hi), transparent 70%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0); }
.tile::after { content: ""; position: absolute; inset: 0; z-index: -1; opacity: 0; transition: opacity .4s; background: radial-gradient(420px circle at var(--x) var(--y), var(--accent-soft), transparent 60%); }
.tile:hover::before, .tile:hover::after { opacity: 1; }
.tile:hover { transform: translateY(-4px); }
.tile-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 18px; }
.tile h3 { font-size: 23px; letter-spacing: -.02em; line-height: 1.15; margin: auto 0 10px; font-weight: 600; }
.tile p { margin: 0; color: var(--ink-2); max-width: 46ch; }
.tile-ico { width: 30px; height: 30px; }
.tile-hero { grid-column: span 4; grid-row: span 2; }
.tile-hero h3 { font-size: clamp(30px, 3.2vw, 48px); letter-spacing: -.035em; }
.tile-hero p { font-size: 18px; }
.tile-ai { grid-column: span 2; grid-row: span 2; background: radial-gradient(120% 80% at 100% 0%, rgba(74, 99, 255, .45), transparent 60%), linear-gradient(180deg, #121a44, #0b0f22); }
.tile-ai p { color: rgba(238, 241, 248, .82); }
.tile-link { display: inline-flex; align-items: center; gap: 8px; margin-top: 24px; font-weight: 500; text-decoration: none; color: var(--accent-hi); }
.tile-link .ico { filter: invert(64%) sepia(40%) saturate(1500%) hue-rotate(200deg); transition: transform .4s var(--ease); }
.tile-link:hover .ico { transform: translateX(4px); }

/* animazioni dentro i riquadri: partono quando il riquadro entra nello schermo (.in) */
.viz-road { width: 100%; height: auto; margin: 8px 0 28px; overflow: visible; }
.viz-gridlines path { stroke: var(--line); stroke-dasharray: 4 6; }
.viz-line { fill: none; stroke: var(--accent-hi); stroke-width: 2.5; stroke-dasharray: 1; stroke-dashoffset: 1; filter: drop-shadow(0 0 8px var(--accent)); transition: stroke-dashoffset 2.2s var(--ease) .3s; }
.viz-node { fill: var(--bg); stroke: var(--accent-hi); stroke-width: 2; opacity: 0; transition: opacity .5s; transition-delay: calc(.9s + var(--n, 0) * .55s); }
.viz-road text { fill: var(--muted); font: 12px var(--mono); text-anchor: middle; text-transform: uppercase; letter-spacing: .08em; opacity: 0; transition: opacity .6s 1.6s; }
.in .viz-line { stroke-dashoffset: 0; }
.in .viz-node, .in .viz-road text { opacity: 1; }
.term { font-family: var(--mono); font-size: 13px; line-height: 1.5; background: rgba(0, 0, 0, .35); border: 1px solid rgba(255, 255, 255, .1); border-radius: 14px; padding: 16px; margin-bottom: 26px; }
.term p { margin: 0; }
.term-in { color: var(--ink); min-height: 3em; }
.term-in::before { content: "> "; color: var(--accent-hi); }
.term-in.typing::after { content: ""; display: inline-block; width: 7px; height: 14px; background: var(--accent-hi); vertical-align: -2px; margin-left: 2px; animation: blink 1s steps(1) infinite; }
.term-out { display: grid; gap: 7px; margin: 14px 0 12px !important; }
.term-out .bar { height: 7px; border-radius: 4px; width: 0; background: linear-gradient(90deg, rgba(139, 156, 255, .7), rgba(139, 156, 255, .25)); transition: width .8s var(--ease); }
.term.done .term-out .bar { width: var(--w, 96%); }
.term.done .bar:nth-child(2) { transition-delay: .15s; } .term.done .bar:nth-child(3) { transition-delay: .3s; } .term.done .bar:nth-child(4) { transition-delay: .45s; }
.term-ok { color: #3ddc97; opacity: 0; transition: opacity .5s .8s; }
.term-ok::before { content: "✓ "; }
.term.done .term-ok { opacity: 1; }
@keyframes blink { 50% { opacity: 0; } }
.ring { position: relative; width: 112px; height: 112px; margin: 0 0 22px; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring circle { fill: none; stroke: var(--line-2); stroke-width: 7; }
.ring .ring-val { stroke: var(--accent-hi); stroke-linecap: round; stroke-dasharray: 100; stroke-dashoffset: 100; transition: stroke-dashoffset 1.8s var(--ease) .3s; filter: drop-shadow(0 0 6px var(--accent)); }
.in .ring .ring-val { stroke-dashoffset: 10; }
.ring span { position: absolute; inset: 0; display: grid; place-content: center; font-size: 30px; font-weight: 600; letter-spacing: -.03em; }
.ring small { font-size: 14px; color: var(--muted); }
.ring span { grid-auto-flow: column; align-items: baseline; }
.viz-net { width: 100%; max-width: 240px; height: auto; margin: 0 0 22px; overflow: visible; }
.viz-net path { fill: none; stroke: var(--line-2); stroke-width: 1.2; stroke-dasharray: 3 5; animation: flow 3s linear infinite; }
.viz-net circle { fill: var(--surface); stroke: var(--accent-hi); stroke-width: 2; animation: blinknode 3.2s infinite; animation-delay: calc(var(--n, 0) * .5s); }
@keyframes flow { to { stroke-dashoffset: -32; } }
@keyframes blinknode { 0%, 100% { fill: var(--surface); } 15% { fill: var(--accent-hi); } 40% { fill: var(--surface); } }
.scan { position: relative; display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 24px; padding: 14px; border-radius: 14px; border: 1px solid var(--line); overflow: hidden; }
.scan span { font-family: var(--mono); font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-2); padding: 5px 9px; border-radius: 8px; background: rgba(255, 255, 255, .04); }
.scan span::before { content: "✓ "; color: #3ddc97; }
.scan::after { content: ""; position: absolute; top: 0; bottom: 0; width: 70px; left: -80px; background: linear-gradient(90deg, transparent, rgba(139, 156, 255, .35), transparent); animation: scan 3.4s var(--ease) infinite; }
@keyframes scan { to { left: 110%; } }

/* ---------- manifesto AI Act ---------- */
.manifesto { position: relative; padding: clamp(72px, 9vw, 136px) var(--pad); background: var(--bg-2); border-block: 1px solid var(--line); overflow: hidden; isolation: isolate; }
.manifesto::before { content: ""; position: absolute; right: -10%; top: -30%; width: 70vw; aspect-ratio: 1; border-radius: 50%; z-index: -1; background: radial-gradient(closest-side, rgba(74, 99, 255, .18), transparent); }
.manifesto-h { font-size: clamp(36px, 5.6vw, 88px); line-height: 1.02; letter-spacing: -.045em; font-weight: 600; margin: 0; max-width: 19ch; }
.manifesto-h .wd { color: rgba(238, 241, 248, .16); transition: color .35s; }
.manifesto-h .wd.on { color: var(--ink); }
.manifesto-body { display: grid; grid-template-columns: .8fr 1.2fr; gap: 14px; margin-top: 56px; }
.counter, .course { border-radius: var(--radius); box-shadow: 0 0 0 1px var(--line) inset; background: color-mix(in srgb, var(--surface) 80%, transparent); padding: 30px; }
.counter { display: flex; flex-direction: column; justify-content: space-between; gap: 16px; }
.counter-label, .counter-clock { margin: 0; font-family: var(--mono); font-size: 12px; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); }
.counter-num { margin: 0; font-size: clamp(72px, 9vw, 140px); line-height: .9; font-weight: 600; letter-spacing: -.06em; font-variant-numeric: tabular-nums;
  background: linear-gradient(180deg, var(--ink), var(--accent-hi)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.counter-num small { font-size: 20px; letter-spacing: 0; margin-left: 10px; color: var(--ink-2); -webkit-text-fill-color: var(--ink-2); }
.counter-clock { color: var(--accent-hi); font-variant-numeric: tabular-nums; }
.course-tag { margin: 0 0 14px; display: flex; gap: 10px; align-items: center; font-family: var(--mono); font-size: 12px; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); }
.course h3 { font-size: clamp(28px, 2.8vw, 40px); letter-spacing: -.035em; line-height: 1.05; margin: 0 0 14px; font-weight: 600; }
.course > p:not(.course-tag) { margin: 0; color: var(--ink-2); max-width: 58ch; }
.course-meta { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 22px 0 26px; }
.course-meta li { font-family: var(--mono); font-size: 12px; text-transform: uppercase; letter-spacing: .06em; padding: 6px 11px; border-radius: 999px; border: 1px solid var(--line-2); color: var(--ink-2); }

/* ---------- metodo ---------- */
.metodo { display: grid; grid-template-columns: .9fr 1.1fr; gap: 80px; align-items: start; }
.metodo-head { position: sticky; top: 120px; }
.metodo-head .lead { margin-top: 24px; }
.metodo-steps { --p: 0; list-style: none; margin: 0; padding: 0 0 0 64px; counter-reset: s; position: relative; }
.metodo-steps::before, .metodo-steps::after { content: ""; position: absolute; left: 19px; top: 34px; bottom: 34px; width: 2px; border-radius: 2px; background: var(--line); }
.metodo-steps::after { background: linear-gradient(var(--accent-hi), var(--accent)); box-shadow: 0 0 12px var(--accent); transform-origin: top; transform: scaleY(var(--p)); }
.step { counter-increment: s; padding: 26px 0; position: relative; opacity: .35; transition: opacity .6s var(--ease); }
.step + .step { border-top: 1px solid var(--line); }
.step::before { content: counter(s, decimal-leading-zero); position: absolute; left: -64px; top: 30px; z-index: 1; width: 40px; height: 40px; border-radius: 50%; display: grid; place-content: center;
  font-family: var(--mono); font-size: 13px; color: var(--muted); background: var(--bg); box-shadow: 0 0 0 1px var(--line-2) inset; transition: color .4s, box-shadow .4s, background .4s; }
.step.on { opacity: 1; }
.step.on::before { color: #fff; background: var(--accent); box-shadow: 0 0 0 1px var(--accent-hi) inset, 0 0 22px var(--accent); }
.step h3 { font-size: clamp(26px, 2.6vw, 38px); letter-spacing: -.03em; margin: 0 0 8px; font-weight: 600; }
.step p { margin: 0; color: var(--ink-2); max-width: 44ch; }

/* ---------- ambiti ---------- */
.ambiti { list-style: none; margin: 0; padding: 0; counter-reset: a; display: grid; grid-template-columns: 1fr 1fr; column-gap: 48px; }
.ambito { counter-increment: a; position: relative; display: grid; grid-template-columns: 56px 1fr; column-gap: 8px; padding: 26px 8px 26px 0; border-top: 1px solid var(--line); isolation: isolate; }
.ambito::before { content: counter(a, decimal-leading-zero); grid-row: span 2; font-family: var(--mono); font-size: 13px; color: var(--accent-hi); padding-top: 7px; }
.ambito::after { content: ""; position: absolute; left: 0; right: 0; top: -1px; height: 1px; background: linear-gradient(90deg, var(--accent-hi), transparent); transform: scaleX(0); transform-origin: left; transition: transform .7s var(--ease); }
.ambito:hover::after { transform: scaleX(1); }
.ambito h3 { margin: 0 0 6px; font-size: clamp(21px, 1.9vw, 26px); letter-spacing: -.025em; line-height: 1.15; font-weight: 600; transition: color .3s; }
.ambito:hover h3 { color: var(--accent-hi); }
.ambito p { margin: 0; color: var(--ink-2); max-width: 48ch; }

/* ---------- chi sono ---------- */
.chi { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(32px, 5vw, 80px); align-items: center; }
.shell { border-radius: var(--radius); background: #070910; box-shadow: 0 0 0 1px var(--line-2) inset, 0 40px 100px -40px rgba(74, 99, 255, .5); overflow: hidden; font-family: var(--mono); font-size: 14.5px; }
.shell-bar { display: flex; align-items: center; gap: 8px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.shell-bar i { width: 11px; height: 11px; border-radius: 50%; background: var(--line-2); }
.shell-bar span { margin-left: auto; margin-right: auto; padding-right: 50px; font-size: 12px; color: var(--muted); }
.shell-body { padding: 22px 24px 28px; min-height: 300px; }
.shell-body p, .shell-body ul { margin: 0; }
.shell .cmd { color: var(--ink); min-height: 1.6em; }
.shell .cmd::before { content: "matteo ~ % "; color: var(--accent-hi); }
.shell .cmd + .out, .shell .out + .cmd { margin-top: 8px; }
.shell .out { color: var(--ink-2); list-style: none; padding: 0; opacity: 0; transition: opacity .3s; }
.shell .out.in { opacity: 1; }
.shell ul.out li::before { content: "+ "; color: #3ddc97; }
.cmd-last { opacity: 0; }
.cmd-last.in { opacity: 1; }
.caret { display: inline-block; width: 8px; height: 16px; background: var(--accent-hi); vertical-align: -3px; animation: blink 1s steps(1) infinite; }
.chi-testo > p { color: var(--ink-2); max-width: 56ch; }
.chi-testo .h2 { margin-bottom: 26px; }

/* ---------- contatti ---------- */
.contatti { position: relative; padding: clamp(80px, 11vw, 160px) var(--pad) clamp(120px, 14vw, 200px); text-align: center; display: flex; flex-direction: column; align-items: center; overflow: hidden; isolation: isolate; }
.contatti .kicker::after { content: ""; width: 28px; height: 1px; background: currentColor; }
.floor { position: absolute; left: -50%; right: -50%; bottom: 0; height: 120%; z-index: -1; pointer-events: none; transform: perspective(700px) rotateX(60deg); transform-origin: 50% 100%;
  background-image: linear-gradient(rgba(139, 156, 255, .5) 1px, transparent 1px), linear-gradient(90deg, rgba(139, 156, 255, .5) 1px, transparent 1px);
  background-size: 64px 64px; animation: avanza 2.4s linear infinite;
  -webkit-mask: linear-gradient(to top, #000 5%, transparent 85%); mask: linear-gradient(to top, #000 5%, transparent 85%); }
.contatti::before { content: ""; position: absolute; left: 50%; bottom: 10%; width: min(1000px, 140vw); height: 360px; translate: -50% 0; z-index: -1; border-radius: 50%; background: radial-gradient(closest-side, rgba(74, 99, 255, .35), transparent); filter: blur(20px); }
@keyframes avanza { to { background-position: 0 64px; } }
.contatti-h { font-size: clamp(42px, 6.4vw, 100px); line-height: 1; letter-spacing: -.05em; font-weight: 600; margin: 0 0 24px; max-width: 15ch; }
.contatti .lead { margin: 0 0 40px; }
.contatti-cta { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }
.contatti-cta .btn-ghost { font-family: var(--mono); font-size: 15px; }
.contatti-cta .btn-ghost.ok { border-color: #3ddc97; color: #3ddc97; }

/* ---------- footer ---------- */
.footer { display: grid; grid-template-columns: 1.2fr 1.2fr auto; gap: 40px; align-items: end; padding: 48px var(--pad); border-top: 1px solid var(--line); font-size: 14px; color: var(--muted); background: var(--bg); position: relative; }
.footer-brand { display: flex; gap: 14px; align-items: center; }
.footer-brand p, .footer-legal { margin: 0; line-height: 1.7; }
.footer strong { color: var(--ink); font-weight: 600; }
.footer-links { display: flex; flex-direction: column; gap: 6px; text-align: right; }
.footer a { text-decoration: none; }
.footer a:hover { color: var(--ink); }

/* ---------- pagine legali ---------- */
.legal { max-width: 760px; margin: 0 auto; padding: 72px var(--pad) 120px; }
.legal h1 { font-size: clamp(36px, 5vw, 60px); max-width: none; margin-bottom: 12px; }
.legal h2 { font-size: 22px; letter-spacing: -.02em; margin: 48px 0 12px; }
.legal p, .legal li { color: var(--ink-2); }
.legal table { width: 100%; border-collapse: collapse; margin: 16px 0; font-size: 15px; }
.legal th, .legal td { text-align: left; padding: 12px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.legal .agg { font-family: var(--mono); font-size: 13px; color: var(--muted); }

/* ---------- schermi stretti ---------- */
@media (max-width: 1100px) {
  .nav-clock { display: none; }
}
@media (max-width: 1024px) {
  .nav nav { display: none; }
  .bento { grid-template-columns: repeat(2, 1fr); }
  .tile, .tile-wide, .tile-ai { grid-column: span 1; grid-row: auto; }
  .tile-hero { grid-column: span 2; grid-row: auto; }
  .metodo { grid-template-columns: 1fr; gap: 24px; }
  .metodo-head { position: static; }
  .manifesto-body { grid-template-columns: 1fr; }
  .chi { grid-template-columns: 1fr; }
  .chi .shell { order: 2; }
  .hud { grid-template-columns: repeat(2, 1fr); }
  .hud div:nth-child(3) { border-left: 0; }
  .hud div:nth-child(n+3) { border-top: 1px solid var(--line); }
  .footer { grid-template-columns: 1fr; align-items: start; }
  .footer-links { text-align: left; }
}
@media (max-width: 767px) {
  body { font-size: 16px; }
  .hero { grid-template-columns: 1fr; grid-template-rows: auto; min-height: auto; padding-top: 12px; }
  .hero-art { order: -1; width: 78%; max-width: 340px; justify-self: center; margin-bottom: 4px; }
  .hero-hint { display: none; }
  .kicker { font-size: 11.5px; letter-spacing: .1em; }
  .kicker::before { width: 18px; }
  .hud { margin-top: 32px; }
  .hud div { padding: 12px 14px; }
  .bento { grid-template-columns: 1fr; }
  .tile, .tile-hero, .tile-wide, .tile-ai { grid-column: auto; min-height: 0; }
  .ambiti { grid-template-columns: 1fr; }
  .ambito { grid-template-columns: 44px 1fr; }
  .metodo-steps { padding-left: 54px; }
  .step::before { left: -54px; width: 36px; height: 36px; }
  .metodo-steps::before, .metodo-steps::after { left: 17px; }
  .contatti-cta .btn-ghost { font-size: 13px; padding: 0 20px; }
  .btn-lg { height: 56px; }
}

/* ---------- movimento ridotto ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal, .split .w > span { opacity: 1; transform: none; filter: none; transition: none; }
  .ticker-track, .floor, .viz-net path, .viz-net circle, .scan::after, .pulse { animation: none; }
  .step { opacity: 1; }
  .manifesto-h .wd { color: var(--ink); }
  .viz-line { stroke-dashoffset: 0; } .viz-node, .viz-road text { opacity: 1; }
  .ring .ring-val { stroke-dashoffset: 10; }
  .term-out .bar { width: var(--w, 96%); } .term-ok, .shell .out, .cmd-last { opacity: 1; }
  .tile, .btn { transition: none; }
}


/* ---------- adattamenti WordPress ---------- */
.wp-site-blocks > * { margin-block-start: 0; }
.wp-site-blocks { padding: 0; }
.admin-bar .nav { top: 32px; }
@media (max-width: 782px) { .admin-bar .nav { top: 46px; } }
.legal .wp-block-post-title { font-size: clamp(36px, 5vw, 60px); line-height: 1.05; letter-spacing: -.04em; font-weight: 600; margin: 0 0 12px; }
.legal figure.wp-block-table { margin: 16px 0; overflow-x: auto; }
.legal a { color: var(--accent); }
/* nell'editor non gira app.js: mostrare subito gli elementi animati */
.editor-styles-wrapper .reveal { opacity: 1; transform: none; }

/* intestazione dentro una parte di modello (pagine WooCommerce e Tutor) */
.wp-block-template-part:has(> .nav) { position: sticky; top: 0; z-index: 20; }
.admin-bar .wp-block-template-part:has(> .nav) { top: 32px; }
.wp-block-template-part > .nav { position: relative; top: 0; }
@media (max-width: 782px) { .admin-bar .wp-block-template-part:has(> .nav) { top: 46px; } }

/* ---------- negozio e corsi: WooCommerce e Tutor LMS nello stile del sito ---------- */
.woocommerce, .wc-block-components-form, .tutor-wrap, .tutor-course-details-page { font-family: inherit; color: var(--ink); }
.wp-site-blocks > main, .wp-site-blocks > .wp-block-group { padding-inline: var(--pad); }
.wp-element-button, .wc-block-components-button:not(.is-link), .woocommerce .button, .woocommerce button.button,
.tutor-btn-primary, .tutor-btn.tutor-btn-primary {
  background: var(--ink) !important; color: var(--bg) !important; border: 0 !important; border-radius: 999px !important;
  font-family: inherit !important; font-weight: 500 !important; padding: 14px 26px !important; transition: background .3s; }
.wp-element-button:hover, .wc-block-components-button:not(.is-link):hover, .woocommerce .button:hover,
.tutor-btn-primary:hover { background: var(--accent) !important; color: var(--accent-ink) !important; }
.wc-block-components-text-input input, .wc-block-components-combobox input, .wc-blocks-components-select select,
.woocommerce form .input-text, .tutor-form-control {
  border-radius: 12px !important; border: 1px solid var(--line) !important; background: var(--surface) !important; color: var(--ink) !important; }
.wc-block-components-text-input input:focus, .tutor-form-control:focus { border-color: var(--accent) !important; box-shadow: 0 0 0 3px var(--accent-soft) !important; }
.wc-block-cart, .wc-block-checkout, .tutor-container { max-width: 1200px; margin-inline: auto; }
.tutor-color-primary, .tutor-text-primary { color: var(--accent) !important; }
:root { --tutor-color-primary: var(--accent); --tutor-color-primary-hover: var(--ink); }
