/* ==========================================================================
   Matteo Del Gallo — Portfolio
   Palette: arancione #ec6648 · rosso #c83f43 · grigio #dddddd · grigio scuro #272727
   ========================================================================== */

@font-face {
  font-family: 'Syne';
  src: url('fonts/syne-latin-wght-normal.woff2') format('woff2-variations');
  font-weight: 400 800;
  font-display: swap;
}
/* Archivo con larghezza 112 (Expanded) già fissata nel file: titoli e testi grandi. */
@font-face {
  font-family: 'Archivo Expanded';
  src: url('fonts/archivo-expanded-latin-wght.woff2') format('woff2-variations');
  font-weight: 500 900;
  font-display: swap;
}
@font-face {
  font-family: 'Manrope';
  src: url('fonts/manrope-latin-wght-normal.woff2') format('woff2-variations');
  font-weight: 200 800;
  font-display: swap;
}

:root {
  --orange: #ec6648;
  --red: #c83f43;
  --grey: #dddddd;
  --ink: #272727;
  --paper: #f5f3ef;
  --white: #ffffff;
  --muted: #5f5b58;
  --line: rgb(39 39 39 / 0.14);

  /* Colori per ruolo: cambiano tra tema chiaro e scuro */
  --bg: var(--paper);
  --text: var(--ink);
  --text-soft: #3c3a39;
  --surface: #ffffff;
  --surface-2: var(--grey);
  --strong: var(--ink);
  --on-strong: #ffffff;
  --hover: rgb(39 39 39 / .07);
  --nav-bg: rgb(245 243 239 / .94);
  --footer: var(--ink);
  --skel: #e7e4df;
  --skel-shine: rgb(255 255 255 / .6);
  --side-h: #6b6767;
  --field-line: rgb(39 39 39 / .22);

  --brand: 'Syne', 'Arial Black', system-ui, sans-serif; /* solo il nome */
  --display: 'Archivo Expanded', 'Arial Black', system-ui, sans-serif;
  --body: 'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif;

  --gutter: clamp(16px, 4vw, 56px);
  --max: 1440px;
  --radius: 22px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-back: cubic-bezier(0.34, 1.56, 0.64, 1);
  --nav-h: 76px;

  color-scheme: light;
}
/* Tema scuro: grigio scuro del brand, testi caldi, stessi arancione e rosso */
:root[data-theme='dark'] {
  --bg: #1e1d1c;
  --text: #f2efe9;
  --text-soft: #d6d1ca;
  --muted: #b3ada7;
  --line: rgb(242 239 233 / .14);
  --surface: #2a2827;
  --surface-2: #34312f;
  --strong: #f2efe9;
  --on-strong: #272727;
  --hover: rgb(255 255 255 / .08);
  --nav-bg: rgb(30 29 28 / .94);
  --footer: #141312;
  --skel: #2f2c2a;
  --skel-shine: rgb(255 255 255 / .07);
  --side-h: #b3ada7;
  --field-line: rgb(242 239 233 / .22);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { overflow-x: clip; -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--nav-h) + 12px); }
/* Lenis (scroll fluido) */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-stopped { overflow: clip; }
.lenis [data-lenis-prevent] { overscroll-behavior: contain; }
[hidden] { display: none !important; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  transition: background-color .4s, color .4s;
  font: 400 clamp(16px, 1.05vw + 10px, 18px) / 1.6 var(--body);
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; }
button { font: inherit; color: inherit; cursor: pointer; }
h1, h2, h3 { font-family: var(--display); line-height: 0.95; letter-spacing: -0.02em; margin: 0; font-weight: 800; overflow-wrap: break-word; hyphens: auto; }
p { margin: 0 0 1em; }
::selection { background: var(--orange); color: var(--white); }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 3px; border-radius: 6px; }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: fixed; left: 12px; top: -60px; z-index: 200; background: var(--ink); color: var(--white); padding: 10px 16px; border-radius: 999px; transition: top .2s; }
.skip:focus { top: 12px; }

/* Transizioni tra pagine (View Transitions API, dove supportata) */
@view-transition { navigation: auto; }
::view-transition-old(root) { animation: vt-out .45s var(--ease) both; }
::view-transition-new(root) { animation: vt-in .6s var(--ease) both; }
::view-transition-group(*) { animation-duration: .6s; animation-timing-function: var(--ease); }
@keyframes vt-out { to { opacity: 0; transform: translateY(-30px) scale(.98); } }
@keyframes vt-in { from { opacity: 0; } }

/* ---------- Elementi ricorrenti ---------- */
.crop { position: absolute; width: 26px; height: 26px; pointer-events: none; opacity: .5; z-index: 1; }
.crop::before, .crop::after { content: ''; position: absolute; background: currentColor; }
.crop::before { left: 50%; top: 0; bottom: 0; width: 1px; }
.crop::after { top: 50%; left: 0; right: 0; height: 1px; }
.crop--tl { top: 18px; left: 18px; } .crop--tr { top: 18px; right: 18px; }
.crop--bl { bottom: 18px; left: 18px; } .crop--br { bottom: 18px; right: 18px; }

.sec-num { font: 800 clamp(16px, 1.4vw, 20px)/1 var(--display); color: var(--orange); display: inline-block; margin-bottom: 14px; }
.sec-num--light { color: var(--white); opacity: .85; }
.sec-num--dark { color: var(--ink); }
.sec-head { max-width: var(--max); margin: 0 auto clamp(28px, 4vw, 56px); padding: 0 var(--gutter); }
.sec-head h2 { font-size: clamp(30px, 7.2vw, 116px); }
.sec-head--row { display: flex; align-items: end; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.sec-sub { max-width: 46ch; color: var(--muted); margin-top: 18px; }

.btn {
  --bg: var(--strong); --fg: var(--on-strong);
  display: inline-flex; align-items: center; gap: .55em;
  padding: .95em 1.5em; border-radius: 999px; border: 2px solid var(--bg);
  background: var(--bg); color: var(--fg); text-decoration: none;
  font: 700 15px/1 var(--body); letter-spacing: .01em; white-space: nowrap;
  position: relative; overflow: hidden; isolation: isolate;
  transition: transform .4s var(--ease), color .35s var(--ease), border-color .35s;
}
.btn::before {
  content: ''; position: absolute; inset: 0; z-index: -1; border-radius: inherit;
  background: var(--orange); transform: translateY(101%); transition: transform .45s var(--ease);
}
.btn:hover::before, .btn:focus-visible::before { transform: none; }
.btn:hover { border-color: var(--orange); }
.btn svg { width: 1.15em; height: 1.15em; }
.btn--primary { --bg: var(--strong); }
.btn--ghost { --bg: transparent; --fg: var(--text); border-color: currentColor; }
.btn--ghost:hover { color: var(--white); }
.btn--pill { padding: .75em 1.2em; }
.btn--light { --bg: var(--white); --fg: var(--ink); }
.btn--light:hover { color: var(--white); }
.btn--dark { --bg: var(--ink); --fg: var(--white); }
.btn--dark::before { background: var(--red); }
.btn--dark:hover { border-color: var(--red); }
.btn sup { font-size: .7em; opacity: .7; }
.pulse { width: 8px; height: 8px; border-radius: 50%; background: #3ccf6e; box-shadow: 0 0 0 0 rgb(60 207 110 / .6); animation: pulse 2s infinite; flex: none; display: inline-block; }
@keyframes pulse { 70% { box-shadow: 0 0 0 9px rgb(60 207 110 / 0); } 100% { box-shadow: 0 0 0 0 rgb(60 207 110 / 0); } }

/* ---------- Barra di avanzamento ---------- */
.progress { position: fixed; inset: 0 0 auto; height: 3px; z-index: 120; background: linear-gradient(90deg, var(--red), var(--orange)); transform-origin: 0 50%; transform: scaleX(var(--p, 0)); }

/* ---------- Navigazione ---------- */
.nav {
  position: fixed; inset: 0 0 auto; z-index: 100; height: var(--nav-h);
  display: flex; align-items: center; gap: 28px; padding: 0 var(--gutter);
  transition: transform .5s var(--ease), background .3s, box-shadow .3s;
}
.nav.is-scrolled { background: var(--nav-bg); box-shadow: 0 1px 0 var(--line); }
.nav.is-hidden { transform: translateY(-100%); }
.nav__brand { display: flex; align-items: center; gap: 14px; text-decoration: none; margin-right: auto; }
.nav__logo { width: 52px; height: auto; transition: transform .6s var(--ease-back); }
.logo { overflow: visible; }
.nav__logo, .footer__logo { transition: transform .9s var(--ease); will-change: transform; }
.nav__brand:hover .nav__logo, .footer__brand:hover .footer__logo { transform: rotate(-8deg) scale(1.06); }
.nav__logo path, .footer__logo path { transition: transform .9s var(--ease); }
.nav__name { display: flex; flex-direction: column; padding-left: 14px; border-left: 1px solid var(--line); line-height: 1.15; }
.nav__name b { font: 700 18px/1.1 var(--brand); letter-spacing: -.01em; white-space: nowrap; }
.nav__name small { font-size: 12px; color: var(--muted); font-weight: 600; }
.nav__links { display: flex; gap: 6px; }
.nav__links a { position: relative; text-decoration: none; font-weight: 700; font-size: 15px; padding: 10px 14px; border-radius: 999px; transition: background .25s; white-space: nowrap; }
.nav__links a:hover { background: var(--hover); }
.nav__links a[aria-current='page'] { background: var(--hover); }
.nav__burger { display: none; width: 48px; height: 48px; border: 0; border-radius: 50%; background: var(--strong); position: relative; z-index: 2; }
.nav__burger span { position: absolute; left: 14px; right: 14px; height: 2px; background: var(--on-strong); transition: transform .4s var(--ease); }
.nav__burger span:first-child { top: 19px; } .nav__burger span:last-child { top: 27px; }
.nav__burger[aria-expanded='true'] span:first-child { transform: translateY(4px) rotate(45deg); }
.nav__burger[aria-expanded='true'] span:last-child { transform: translateY(-4px) rotate(-45deg); }

.menu {
  position: fixed; inset: 0; z-index: 99; background: var(--orange); color: var(--white);
  display: flex; flex-direction: column; justify-content: center; padding: calc(var(--nav-h) + 20px) var(--gutter) 40px;
  clip-path: circle(0 at calc(100% - var(--gutter) - 24px) calc(var(--nav-h) / 2));
  transition: clip-path .7s var(--ease);
}
.menu.is-open { clip-path: circle(150% at calc(100% - var(--gutter) - 24px) calc(var(--nav-h) / 2)); }
.menu nav { display: flex; flex-direction: column; }
.menu nav a { font: 800 clamp(30px, 9.4vw, 88px)/1.05 var(--display); text-decoration: none; display: flex; align-items: baseline; gap: 14px; }
.menu nav a span { font-size: 16px; opacity: .8; }
.menu__foot { display: flex; gap: 12px; margin-top: 40px; flex-wrap: wrap; }
.menu .social { color: var(--white); }

.social { display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 999px; border: 1.5px solid currentColor; text-decoration: none; font-weight: 700; font-size: 14px; transition: background .3s, color .3s; }
.social svg { width: 18px; height: 18px; }
.social:hover { background: var(--strong); color: var(--on-strong); border-color: var(--strong); }


/* ---------- Hero ---------- */
.hero { position: relative; min-height: calc(100svh - clamp(90px, 13vh, 150px)); padding: calc(var(--nav-h) + 4vh) var(--gutter) 6vh; display: flex; align-items: center; overflow: hidden; }
.hero__grid { width: 100%; max-width: var(--max); margin: 0 auto; display: grid; grid-template-columns: 1fr auto; grid-template-areas: 'kicker kicker' 'title title' 'lead badge' 'ctas badge'; column-gap: 4vw; align-items: end; position: relative; }
.hero__kicker { grid-area: kicker; display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 14px; background: var(--surface); padding: 8px 14px; border-radius: 999px; justify-self: start; box-shadow: 0 6px 24px rgb(39 39 39 / .06); margin-bottom: 3vh; }
.hero__title { font-family: var(--brand); grid-area: title; position: relative; z-index: 1; font-size: clamp(56px, 11.2vw, 188px); line-height: .86; letter-spacing: -.045em; font-weight: 800; }
.hero__line { display: block; white-space: nowrap; }
.hero__line--2 { color: var(--orange); }
.hero__dot { color: var(--red); display: inline-block; animation: bob 2.4s var(--ease) infinite; }
@keyframes bob { 50% { transform: translateY(-.08em); } }
[data-split] .wd { display: inline-block; white-space: nowrap; }
[data-split] .ch { display: inline-block; font-variation-settings: 'wght' var(--w, 800); font-weight: 800; transition: color .3s; will-change: transform; }
.hero__lead { grid-area: lead; font-size: clamp(18px, 1.6vw, 24px); line-height: 1.4; margin: 4vh 0 0; max-width: 34ch; font-weight: 500; }
.rotator { white-space: nowrap; display: inline-grid; vertical-align: bottom; overflow: hidden; height: 1.4em; color: var(--red); font-weight: 800; }
.rotator span { display: block; transition: transform .6s var(--ease), opacity .6s; }
.rotator span.is-out { transform: translateY(-110%); opacity: 0; }
.rotator span.is-in { animation: rot-in .6s var(--ease) both; }
@keyframes rot-in { from { transform: translateY(110%); opacity: 0; } }
.hero__ctas { grid-area: ctas; display: flex; gap: 12px; flex-wrap: wrap; margin-top: 4vh; }
.hero__logo { position: absolute; right: 0; top: -2vh; width: clamp(200px, 23vw, 380px); cursor: pointer; z-index: 2; }
.hero__mark { width: 100%; overflow: visible; }
.hero__mark { transform: translate3d(calc(var(--mx, 0) * 28px), calc(var(--my, 0) * 22px), 0) rotate(calc(var(--mx, 0) * 6deg)); will-change: transform; }
.hero__logo.is-boing .hero__mark { animation: boing .9s var(--ease-back); }
@keyframes boing { 20% { transform: scale(.9, 1.1) rotate(-6deg); } 50% { transform: scale(1.08, .94) rotate(4deg); } 75% { transform: scale(.98, 1.02) rotate(-1deg); } }
.hero__bubble { position: absolute; top: 2%; right: 4%; background: var(--ink); color: var(--white); font: 800 clamp(14px, 1.4vw, 20px)/1 var(--display); padding: 14px 18px; border-radius: 18px 18px 18px 4px; white-space: pre; transform: scale(0) rotate(-10deg); transform-origin: 0 100%; transition: transform .5s var(--ease-back); pointer-events: none; }
.hero__logo.is-boing .hero__bubble { transform: scale(1) rotate(-4deg); }
.badge { grid-area: badge; justify-self: end; width: clamp(110px, 11vw, 160px); aspect-ratio: 1; position: relative; display: grid; place-items: center; color: var(--text); text-decoration: none; margin-top: 4vh; }
.badge__ring { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(var(--spin, 0deg)); font: 700 15px var(--brand); letter-spacing: .14em; text-transform: uppercase; fill: currentColor; }
.badge__logo { width: 42%; transition: transform .5s var(--ease-back); }
.badge:hover .badge__logo { transform: translateY(6px) rotate(-10deg); color: var(--orange); }
.badge--music { border: 0; background: none; padding: 0; cursor: pointer; font: inherit; }
.badge.is-playing .badge__ring { animation: badge-spin 9s linear infinite; }
.badge.is-playing .badge__logo { color: var(--orange); }
@keyframes badge-spin { to { rotate: 360deg; } }
/* Freccina scritta a mano che invita a cliccare (sparisce dopo il primo clic) */
.badge__hint { position: absolute; right: 88%; bottom: 82%; display: flex; flex-direction: column; align-items: flex-end; color: var(--red); pointer-events: none; transition: opacity .4s, transform .4s var(--ease); animation: hint-bob 2.4s var(--ease) infinite; }
.badge__hint span { font: 700 13px/1.25 var(--body); text-align: right; white-space: nowrap; transform: rotate(-4deg); order: -1; margin-bottom: 2px; }
.badge__hint svg { width: 64px; height: auto; margin-right: -6px; }
.badge.is-hint-off .badge__hint { opacity: 0; transform: translateY(6px); animation: none; }
@keyframes hint-bob { 50% { translate: -4px 3px; } }
/* Mini-player Spotify in basso a destra */
.player-dock { position: fixed; right: 16px; bottom: 16px; z-index: 300; width: min(360px, calc(100vw - 32px)); transition: transform .5s var(--ease-back), width .5s var(--ease); display: flex; align-items: center; gap: 8px; padding: 8px; border-radius: 20px; background: var(--strong); box-shadow: 0 20px 50px rgb(0 0 0 / .3); transform: translateY(140%); }
.player-dock.is-open { transform: none; }
.player-dock.is-mini { width: 260px; }
.player-dock.is-mini:hover, .player-dock.is-mini:focus-within { width: min(360px, calc(100vw - 32px)); }
.player-dock__frame { flex: 1; min-width: 0; height: 80px; border-radius: 12px; overflow: hidden; }
.player-dock__frame iframe { display: block; width: 100%; height: 80px; border: 0; }
.player-dock__close { flex: none; width: 34px; height: 34px; border-radius: 50%; border: 0; background: var(--orange); color: var(--white); font-weight: 800; cursor: pointer; }

/* ---------- Marquee ---------- */
.marquee-wrap { overflow: hidden; padding: 3vw 0; margin: -3vw 0 0; }
/* Menu mobile aperto: logo e nome diventano bianchi sul fondo arancione */
.nav.is-menu-open { background: transparent !important; box-shadow: none !important; transform: none !important; }
.nav.is-menu-open .nav__logo path { fill: var(--white); transition: fill .4s var(--ease); }
.nav.is-menu-open .nav__name { color: var(--white); border-color: rgb(255 255 255 / .4); }
.nav.is-menu-open .nav__name small { color: rgb(255 255 255 / .8); }
.nav__logo path { transition: fill .4s var(--ease), transform .9s var(--ease); }
.marquee { background: var(--red); color: var(--white); overflow: hidden; padding: 18px 0; transform: rotate(-2deg) scale(1.04); margin: 2vh 0 4vh; }
.marquee__track { display: flex; width: max-content; animation: marquee 32s linear infinite; transform: skewX(var(--skew, 0deg)); }
.marquee span { display: flex; align-items: center; font: 800 clamp(26px, 4vw, 56px)/1 var(--display); white-space: nowrap; }
.marquee i { font-style: normal; color: var(--orange); margin: 0 .55em; font-size: .7em; display: inline-block; animation: spin 6s linear infinite; }
.marquee:hover .marquee__track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-50%) skewX(var(--skew, 0deg)); } }
@keyframes spin { to { rotate: 360deg; } }

/* ---------- Lavori ---------- */
.work { padding: 6vh 0 12vh; }
.work__bar { max-width: var(--max); margin: 0 auto 32px; padding: 0 var(--gutter); display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; position: sticky; top: calc(var(--nav-h) - 6px); z-index: 10; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { border: 1.5px solid var(--text); background: var(--bg); border-radius: 999px; padding: 9px 16px; font-weight: 700; font-size: 14px; transition: background .3s, color .3s, transform .3s var(--ease-back); }
.chip sup { font-size: 10px; margin-left: 2px; opacity: .7; }
.chip:hover { transform: translateY(-2px); }
.chip.is-active { background: var(--strong); color: var(--on-strong); }
.views { display: inline-flex; background: var(--surface); border-radius: 999px; padding: 4px; box-shadow: 0 6px 20px rgb(39 39 39 / .06); }
.views button { border: 0; background: none; padding: 8px 16px; border-radius: 999px; font-weight: 700; font-size: 14px; }
.views button[aria-pressed='true'] { background: var(--orange); color: var(--white); }

.grid { list-style: none; margin: 0 auto; padding: 0 var(--gutter); max-width: var(--max); display: grid; grid-template-columns: repeat(6, 1fr); gap: clamp(16px, 2vw, 28px); grid-auto-flow: dense; }
.card { grid-column: span 2; }
.card--big { grid-column: span 3; }
.card[hidden] { display: none; }
.card a { display: block; text-decoration: none; position: relative; }
.card__media { margin: 0; border-radius: var(--radius); overflow: hidden; aspect-ratio: 4 / 3; background: var(--surface-2); position: relative; transform: translateZ(0); }
.card--big .card__media { aspect-ratio: 16 / 11; }
.card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .9s var(--ease), filter .5s; }
.card__media::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 40%, rgb(200 63 67 / .55)); opacity: 0; transition: opacity .5s; }
.card a:hover .card__media img { transform: scale(1.06) rotate(.6deg); }
.card a:hover .card__media::after { opacity: 1; }
.card__meta { display: grid; grid-template-columns: auto 1fr; column-gap: 12px; padding: 16px 4px 0; }
.card__num { font: 800 14px/1.6 var(--display); color: var(--orange); grid-row: span 2; }
.card__title { font: 700 clamp(17px, 1.4vw, 21px)/1.2 var(--display); letter-spacing: -.01em; overflow-wrap: break-word; }
.card__info { font-size: 13px; color: var(--muted); font-weight: 600; margin: 6px 0 0; }
.card__src { position: absolute; top: 14px; right: 14px; width: 38px; height: 38px; border-radius: 50%; background: var(--surface); display: grid; place-items: center; box-shadow: 0 4px 16px rgb(0 0 0 / .12); transform: scale(0) rotate(-90deg); transition: transform .5s var(--ease-back); }
.card__src svg { width: 20px; height: 20px; }
.card__src--manual { display: none; }
.card a:hover .card__src { transform: none; }
.card a:hover .card__title { color: var(--red); }

.rows { list-style: none; margin: 0 auto; padding: 0 var(--gutter); max-width: var(--max); border-top: 1px solid var(--line); }
.rows li[hidden] { display: none; }
.rows a { display: grid; grid-template-columns: 3.5em 1fr 10em 4em 32px; gap: 16px; align-items: center; padding: 22px 6px; border-bottom: 1px solid var(--line); text-decoration: none; transition: padding .4s var(--ease), color .3s, background .3s; }
.rows a:hover { padding-left: 22px; color: var(--red); }
.row__num { font: 800 14px var(--display); color: var(--orange); }
.row__title { font: 700 clamp(18px, 2.4vw, 34px)/1.1 var(--display); letter-spacing: -.02em; overflow-wrap: break-word; min-width: 0; }
.row__cat, .row__year { font-size: 14px; font-weight: 600; color: var(--muted); }
.row__arrow svg { width: 26px; transition: transform .4s var(--ease); }
.rows a:hover .row__arrow svg { transform: rotate(45deg); }
.row-preview { position: fixed; left: 0; top: 0; width: 320px; aspect-ratio: 4 / 3; border-radius: 16px; overflow: hidden; pointer-events: none; z-index: 50; opacity: 0; transform: translate(-50%, -50%) scale(.6) rotate(-6deg); transition: opacity .3s, transform .4s var(--ease); box-shadow: 0 30px 60px rgb(0 0 0 / .25); }
.row-preview.is-visible { opacity: 1; transform: translate(-50%, -50%) scale(1) rotate(-3deg); }
.row-preview img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- Chi sono ---------- */
.about { display: grid; grid-template-columns: 1.1fr .9fr 1fr; max-width: calc(var(--max) + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter) 12vh; gap: 0; align-items: stretch; }
.about__panel { position: relative; background: var(--red); color: var(--white); padding: clamp(32px, 4vw, 64px); border-radius: var(--radius) 0 0 var(--radius); }
.about__panel h2 { font-size: clamp(40px, 5vw, 76px); margin-bottom: 28px; }
.about__panel p { font-size: clamp(16px, 1.15vw, 19px); }
.stats { list-style: none; padding: 0; margin: 36px 0 0; display: flex; gap: 28px; flex-wrap: wrap; }
.stats li { display: flex; flex-direction: column; }
.stats b { font: 800 clamp(44px, 5vw, 72px)/1 var(--display); }
.stats span { font-size: 13px; font-weight: 700; opacity: .85; }
.about__photo { position: relative; background: var(--red); display: flex; align-items: flex-end; justify-content: center; overflow: hidden; perspective: 900px; }
.about__shape { position: absolute; left: 6%; right: 6%; bottom: 0; top: 42%; background: var(--white); clip-path: polygon(14% 4%, 62% 0, 96% 18%, 100% 62%, 92% 100%, 4% 100%, 0 44%); transition: clip-path .8s var(--ease); }
.about__photo:hover .about__shape { clip-path: polygon(4% 10%, 70% 2%, 100% 30%, 94% 70%, 98% 100%, 0 100%, 8% 52%); }
.about__photo img { position: relative; width: 108%; max-width: none; transform: rotateY(calc(var(--tx, 0) * 1deg)) rotateX(calc(var(--ty, 0) * -1deg)); transition: transform .5s var(--ease); }
.sticker { position: absolute; z-index: 2; top: 7%; right: 7%; background: var(--white); color: var(--red); font: 800 10.5px/1.25 var(--body); text-transform: uppercase; letter-spacing: .06em; padding: 0; border-radius: 50%; width: 118px; height: 118px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; transform: rotate(12deg); box-shadow: 0 10px 30px rgb(0 0 0 / .18); animation: wobble 5s var(--ease) infinite; }
@keyframes wobble { 50% { transform: rotate(-6deg) scale(1.05); } }
.about__side { background: var(--surface-2); padding: clamp(32px, 4vw, 56px); border-radius: 0 var(--radius) var(--radius) 0; }
.about__side h3 { font-size: clamp(22px, 2vw, 30px); color: var(--side-h); margin: 0 0 16px; }
.about__side h3:not(:first-child) { margin-top: 32px; }
.certs, .services { list-style: none; padding: 0; margin: 0; }
.certs li { display: grid; grid-template-columns: 34px 1fr; column-gap: 12px; align-items: center; font-weight: 700; padding: 8px 0; line-height: 1.25; }
.certs__a { grid-row: span 2; }
.certs small { color: var(--muted); font-weight: 600; grid-column: 2; }
.certs__a { width: 34px; height: 34px; border-radius: 8px; background: #fa0f00; color: var(--white); display: grid; place-items: center; font: 800 18px var(--display); flex: none; }
.tools { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(54px, 1fr)); gap: 8px; }
.tools li { aspect-ratio: 1; border-radius: 12px; background: var(--bg); color: var(--fg); display: grid; place-items: center; font: 800 20px var(--display); position: relative; transition: transform .45s var(--ease-back); cursor: default; }
.tools li:hover { transform: translateY(-6px) rotate(-8deg) scale(1.08); }
.tools em { position: absolute; bottom: calc(100% + 8px); left: 50%; translate: -50% 0; background: var(--ink); color: var(--white); font: 700 12px var(--body); padding: 5px 9px; border-radius: 8px; white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity .2s; }
.tools li:hover em { opacity: 1; }
.services li { font-weight: 700; padding: 10px 0; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; }
.services li::after { content: '→'; color: var(--red); transition: transform .3s var(--ease); }
.services li:hover::after { transform: translateX(6px); }

/* ---------- Processo ---------- */
.process { padding: 0 0 12vh; }
.steps { list-style: none; margin: 0 auto; padding: 0 var(--gutter); max-width: var(--max); display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; counter-reset: s; }
.step { background: var(--surface); border-radius: var(--radius); padding: 28px; position: relative; overflow: hidden; transition: transform .5s var(--ease), background .4s, color .4s; min-height: 280px; display: flex; flex-direction: column; }
.step:hover { transform: translateY(-10px) rotate(-1.2deg); background: var(--strong); color: var(--on-strong); }
.step__n { font: 800 clamp(60px, 5.4vw, 84px)/1 var(--body); font-variant-numeric: tabular-nums lining-nums; letter-spacing: -.04em; color: var(--orange); margin-bottom: 40px; transition: transform .6s var(--ease-back); }
.step:hover .step__n { transform: scale(1.12) rotate(-6deg); }
.step h3 { font-size: 26px; margin: 24px 0 10px; }
.step p { font-size: 15px; margin: 0; opacity: .85; }

/* ---------- Feed ---------- */
.feed { padding: 0 0 12vh; overflow: hidden; }
.feed__track { display: flex; gap: clamp(16px, 2vw, 28px); padding: 24px var(--gutter) 36px; overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: none; cursor: grab; }
.feed__track::-webkit-scrollbar { display: none; }
.feed__track.is-dragging { cursor: grabbing; scroll-snap-type: none; }
.feed__track.is-dragging a { pointer-events: none; }
.polaroid { flex: none; width: clamp(220px, 22vw, 300px); background: var(--surface); padding: 12px 12px 18px; border-radius: 6px; text-decoration: none; box-shadow: 0 12px 30px rgb(39 39 39 / .1); rotate: var(--r); transition: rotate .5s var(--ease-back), transform .5s var(--ease-back), box-shadow .4s; scroll-snap-align: center; user-select: none; -webkit-user-drag: none; }
.polaroid img { aspect-ratio: 1; object-fit: cover; width: 100%; border-radius: 2px; pointer-events: none; }
.polaroid span { display: block; font: 700 14px/1.3 var(--display); margin-top: 12px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.polaroid:hover { rotate: 0deg; transform: translateY(-10px) scale(1.03); box-shadow: 0 24px 50px rgb(39 39 39 / .18); }
.feed .btn svg { width: 18px; height: 18px; }

/* ---------- Contatti ---------- */
.contact { position: relative; background: var(--orange); color: var(--ink); padding: clamp(64px, 10vw, 140px) var(--gutter); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); column-gap: clamp(32px, 6vw, 96px); }
.contact__head { grid-column: 1 / -1; }
.contact__intro, .form { max-width: 720px; }
.contact__title { white-space: nowrap; font-size: min(8.4vw, 160px); color: var(--white); margin-bottom: 28px; letter-spacing: -.03em; }
.contact__title .accent { color: var(--red); }
.contact__intro > p { font-size: clamp(17px, 1.3vw, 21px); font-weight: 500; max-width: 40ch; }
.direct { list-style: none; padding: 0; margin: 32px 0; display: grid; gap: 10px; }
.direct li { display: flex; align-items: center; gap: 8px; }
.direct a { display: inline-flex; align-items: center; gap: 12px; font: 700 clamp(17px, 1.6vw, 24px) var(--display); text-decoration: none; background: var(--white); padding: 12px 18px; border-radius: 999px; transition: transform .4s var(--ease-back), background .3s, color .3s; word-break: break-all; }
.direct a:hover { transform: translateX(6px); background: var(--ink); color: var(--white); }
.direct svg { width: 22px; height: 22px; flex: none; color: var(--red); }
.direct a:hover svg { color: var(--orange); }
.copy { width: 46px; height: 46px; border-radius: 50%; border: 0; background: rgb(255 255 255 / .35); display: grid; place-items: center; flex: none; transition: background .3s, transform .3s var(--ease-back); }
.copy:hover { background: var(--white); transform: rotate(-10deg); }
.copy svg { width: 20px; height: 20px; }
.contact__social { display: flex; gap: 10px; flex-wrap: wrap; }
.contact .social { color: var(--ink); }

.form { color: var(--text); background: var(--bg); border-radius: calc(var(--radius) + 6px); padding: clamp(24px, 3.4vw, 48px); box-shadow: 0 40px 80px rgb(120 30 20 / .25); align-self: start; position: relative; }
.chips { border: 0; padding: 0; margin: 0 0 22px; display: flex; flex-wrap: wrap; gap: 8px; }
.chips legend { font: 700 18px var(--display); margin-bottom: 12px; padding: 0; }
.chips--small legend { font-size: 15px; }
.chip-check { position: relative; }
.chip-check input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.chip-check span { display: inline-block; padding: 9px 15px; border-radius: 999px; border: 1.5px solid var(--text); font-weight: 700; font-size: 14px; transition: background .25s, color .25s, transform .35s var(--ease-back); }
.chip-check input:checked + span { background: var(--strong); color: var(--on-strong); transform: scale(1.06) rotate(-2deg); }
.chip-check input:focus-visible + span { outline: 3px solid var(--orange); outline-offset: 2px; }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field { position: relative; margin-bottom: 14px; }
.field input, .field textarea { width: 100%; border: 1.5px solid var(--field-line); background: var(--surface); border-radius: 14px; padding: 26px 16px 10px; font: 500 16px var(--body); color: var(--text); transition: border-color .3s, box-shadow .3s; resize: vertical; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--orange); box-shadow: 0 0 0 4px rgb(236 102 72 / .18); }
.field label { position: absolute; left: 17px; top: 18px; color: var(--muted); font-weight: 600; pointer-events: none; transform-origin: 0 0; transition: transform .3s var(--ease), color .3s; }
.field input:focus + label, .field input:not(:placeholder-shown) + label,
.field textarea:focus + label, .field textarea:not(:placeholder-shown) + label { transform: translateY(-11px) scale(.74); color: var(--red); }
.field.is-invalid input, .field.is-invalid textarea { border-color: var(--red); animation: shake .4s; }
@keyframes shake { 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }
.hp { position: absolute; left: -9999px; }
.consent { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; margin: 6px 0 22px; }
.consent input { width: 20px; height: 20px; accent-color: var(--red); flex: none; margin-top: 2px; }
.btn--send { width: 100%; justify-content: center; font-size: 17px; padding: 1.15em; }
.btn--send svg { transition: transform .6s var(--ease); }
.btn--send:hover svg { transform: translate(4px, -4px) rotate(8deg); }
.btn--send.is-sending svg { animation: fly 1s var(--ease) infinite; }
@keyframes fly { 50% { transform: translate(30px, -30px); opacity: 0; } 51% { transform: translate(-30px, 30px); } }
.form__status { margin: 14px 0 0; font-weight: 700; min-height: 1.6em; }
.form__status.is-ok { color: #1c7c45; }
.form__status.is-error { color: var(--red); }
.confetti { position: fixed; width: 10px; height: 14px; z-index: 400; pointer-events: none; border-radius: 2px; }

/* ---------- Footer ---------- */
.footer { position: relative; background: var(--footer); color: var(--grey); padding: clamp(64px, 9vw, 120px) var(--gutter) 28px; overflow: hidden; }
.footer__big { font: 800 clamp(34px, 8vw, 136px)/.95 var(--display); letter-spacing: -.03em; color: var(--white); max-width: 14ch; margin-bottom: clamp(48px, 7vw, 96px); }
.footer__big .accent { color: var(--orange); }
.footer__cols { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 32px; max-width: var(--max); border-top: 1px solid rgb(221 221 221 / .18); padding-top: 40px; }
.footer__cols a { display: block; text-decoration: none; padding: 4px 0; transition: color .25s, transform .3s var(--ease); }
.footer__cols a:hover { color: var(--orange); transform: translateX(4px); }
.footer__logo { width: 72px; margin-bottom: 16px; }
.footer__h { font: 700 13px var(--body); text-transform: uppercase; letter-spacing: .14em; color: #9b9796; margin-bottom: 12px; }
.footer__social { display: flex !important; align-items: center; gap: 10px; }
.footer__social svg { width: 18px; height: 18px; }
.footer__bottom { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-top: 56px; font-size: 14px; color: #9b9796; }
.footer__bottom p { margin: 0; }
.totop { background: none; border: 1.5px solid currentColor; border-radius: 999px; padding: 10px 18px; font-weight: 700; transition: background .3s, color .3s; }
.totop:hover { background: var(--orange); color: var(--white); border-color: var(--orange); }

/* ---------- Pagina progetto ---------- */
.is-project main, .is-page main { padding-top: var(--nav-h); }
.crumbs { max-width: var(--max); margin: 24px auto 0; padding: 0 var(--gutter); display: flex; gap: 10px; font-size: 13px; font-weight: 600; color: var(--muted); flex-wrap: wrap; }
.crumbs a { text-decoration: none; } .crumbs a:hover { color: var(--red); }

/* ---------- Pagine interne (lavori, chi sono, contatti) ---------- */
.page-head { padding-bottom: clamp(24px, 3vw, 40px); }
.page-head h1 { font-size: clamp(44px, 9vw, 150px); max-width: none; letter-spacing: -.03em; }
.page-head__intro { max-width: 52ch; margin: 20px 0 0; font-size: clamp(17px, 1.3vw, 20px); color: var(--text-soft); }
.work--page { padding-top: 0; }
.work--page + .cta-band { margin-top: 0; margin-bottom: clamp(64px, 9vw, 120px); }
.is-about .about { padding-bottom: clamp(64px, 9vw, 120px); }
.is-about .cta-band { margin-bottom: clamp(64px, 9vw, 120px); }

/* Home: le 4 più recenti, due per riga */
.grid--home .card { grid-column: span 3; }
.grid--home .card__media { aspect-ratio: 16 / 11; }
.work__more { text-align: center; margin: clamp(36px, 5vw, 64px) 0 0; }
.about__panel .btn { margin-top: 32px; }

/* Home: invito ai contatti al posto del modulo */
.contact--teaser { align-items: end; }
.contact--teaser .contact__go { margin: 0; justify-self: end; }
.contact--page { padding-top: clamp(32px, 5vw, 64px); }
.crumbs--on-orange { grid-column: 1 / -1; padding: 0; margin: 0 0 clamp(28px, 4vw, 56px); max-width: none; color: var(--ink); opacity: .75; }
.crumbs--on-orange a:hover { color: var(--white); }

/* Chi sono: storia, servizi, clienti */
.story { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter) clamp(64px, 9vw, 120px); }
.story__row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: clamp(20px, 4vw, 64px); padding: clamp(32px, 4vw, 56px) 0; border-top: 1px solid var(--line); }
.story__row h2 { font-size: clamp(26px, 3vw, 44px); }
.story__row p { font-size: clamp(16px, 1.2vw, 19px); max-width: 62ch; margin: 0 0 1em; }
.svc { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 40px; }
.svc h3 { font-size: clamp(18px, 1.5vw, 22px); margin-bottom: 8px; color: var(--red); }
.svc p { font-size: 15px !important; margin: 0 !important; color: var(--text-soft); }
.clients { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.clients li { border: 1.5px solid var(--text); border-radius: 999px; padding: 10px 18px; font: 700 15px/1 var(--display); }

/* ---------- Lab ---------- */
.lab-block { max-width: var(--max); margin: 0 auto; padding: clamp(32px, 5vw, 64px) var(--gutter) clamp(56px, 8vw, 110px); }
.lab-block + .lab-block { border-top: 1px solid var(--line); }
.lab-block__head { margin-bottom: clamp(24px, 3.5vw, 44px); }
.lab-block__head h2 { font-size: clamp(32px, 5.6vw, 84px); }
.lab-block__head p { margin: 14px 0 0; color: var(--text-soft); font-size: clamp(16px, 1.2vw, 19px); }
/* Caratteri usati da "Prova il tuo nome" e dal quiz */
.ff-moderno { font: 900 1em/1 var(--display); text-transform: uppercase; letter-spacing: -.02em; }
.ff-elegante { font: 200 1em/1.1 var(--body); text-transform: uppercase; letter-spacing: .28em; }
.ff-creativo { font: 800 1em/1 var(--brand); text-transform: lowercase; letter-spacing: -.02em; }
.ff-minimal { font: 500 1em/1.1 var(--body); text-transform: lowercase; letter-spacing: -.01em; }
.ff-minimal::after { content: '.'; color: var(--orange); }
.ff-dinamico { font: 800 1em/1 var(--display); font-style: italic; display: inline-block; transform: skewX(-12deg); letter-spacing: -.03em; }
.ff-classico { font: italic 400 1.08em/1.1 'Iowan Old Style', 'Palatino Linotype', Palatino, Georgia, serif; }
.namer__field input { width: 100%; font: 700 clamp(22px, 3vw, 40px)/1.2 var(--display); padding: .55em .8em; border: 2px solid var(--text); border-radius: 18px; background: var(--surface); color: var(--text); }
.namer__field input:focus { outline: none; border-color: var(--orange); }
.namer__grid { list-style: none; margin: 24px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(14px, 1.6vw, 22px); }
.namer__card { position: relative; display: flex; flex-direction: column; justify-content: space-between; gap: 22px; min-height: 260px; padding: clamp(20px, 2.2vw, 30px); border-radius: var(--radius); background: var(--surface); overflow: hidden; transition: transform .45s var(--ease-back); }
.namer__card:hover { transform: translateY(-4px) rotate(-.4deg); }
.namer__card--moderno { background: var(--orange); color: var(--white); }
.namer__card--elegante { background: #f3ead9; color: #3d3527; }
.namer__card--creativo { background: var(--red); color: var(--white); }
.namer__card--minimal { background: var(--surface); }
.namer__card--dinamico { background: #272727; color: #f3efe8; }
.namer__card--classico { background: var(--surface-2); }
.namer__sample { margin: auto 0; font-size: clamp(26px, 2.8vw, 44px); overflow-wrap: anywhere; text-align: center; }
.namer__meta b { display: block; font: 800 15px var(--display); }
.namer__meta span { font-size: 13px; opacity: .75; }
.namer__pick { font-weight: 700; font-size: 14px; color: inherit; align-self: flex-start; }
/* Quiz */
.quiz { position: relative; background: var(--surface); border-radius: var(--radius); padding: clamp(22px, 3.4vw, 48px); }
.quiz__bar { height: 6px; border-radius: 6px; background: var(--surface-2); margin-bottom: clamp(22px, 3vw, 36px); overflow: hidden; }
.quiz__bar span { display: block; height: 100%; width: var(--p, 0%); background: var(--orange); transition: width .5s var(--ease); }
.quiz__step { border: 0; margin: 0; padding: 0; min-width: 0; }
.quiz__step[hidden], .quiz__result[hidden] { display: none; }
.quiz__step legend { font: 700 clamp(22px, 2.6vw, 36px)/1.2 var(--display); margin-bottom: 22px; padding: 0; }
.quiz__step legend span { font-size: .55em; color: var(--orange); margin-right: 6px; vertical-align: middle; }
.quiz__opts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.quiz__opt { display: flex; align-items: center; gap: 14px; text-align: left; padding: 18px 20px; border: 1.5px solid var(--field-line); border-radius: 16px; background: var(--bg); color: var(--text); font: 700 16px/1.3 var(--body); cursor: pointer; transition: border-color .25s, transform .3s var(--ease-back), background .25s; }
.quiz__opt:hover, .quiz__opt:focus-visible { border-color: var(--orange); transform: translateY(-2px); }
.quiz__opt.is-picked { background: var(--strong); color: var(--on-strong); border-color: var(--strong); }
.quiz__opt--type { justify-content: center; padding: 26px 20px; }
.quiz__type { font-size: 44px; }
.quiz__sw { display: inline-flex; flex: none; }
.quiz__sw i { width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid rgb(0 0 0 / .12); margin-right: -6px; }
.quiz__result { animation: quiz-in .6s var(--ease) both; }
@keyframes quiz-in { from { opacity: 0; transform: translateY(16px); } }
.quiz__kicker { margin: 0; font-weight: 700; font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--text-soft); }
.quiz__result h3 { font-size: clamp(44px, 7vw, 104px); color: var(--orange); margin: 6px 0 16px; }
.quiz__result > p { max-width: 60ch; font-size: clamp(16px, 1.2vw, 19px); }
.quiz__sub { margin-top: 28px; font-weight: 700; }
.quiz__works { list-style: none; margin: 12px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.quiz__works a { display: block; text-decoration: none; }
.quiz__works img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 14px; }
.quiz__works span { display: block; margin-top: 8px; font: 700 14px/1.3 var(--display); }
.quiz__actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 28px; }
/* Sfondi */
.walls { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 18px; }
.walls a { display: block; text-decoration: none; }
.walls img { width: 100%; aspect-ratio: 9 / 19.5; object-fit: cover; border-radius: 22px; box-shadow: 0 14px 30px rgb(0 0 0 / .12); transition: transform .45s var(--ease-back); }
.walls a:hover img { transform: translateY(-6px) rotate(-1deg); }
.walls span { display: block; margin-top: 10px; font: 700 14px var(--display); }
.walls small { font: 600 12px var(--body); color: var(--muted); }
.walls-soon { display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap; padding: clamp(22px, 3vw, 36px); border: 1.5px dashed var(--field-line); border-radius: var(--radius); }
.walls-soon p { margin: 0; font: 700 clamp(18px, 1.8vw, 24px)/1.3 var(--display); max-width: 40ch; }
.pill { display: inline-block; padding: 8px 14px; border-radius: 999px; background: var(--orange); color: var(--white); font-weight: 700; font-size: 13px; }
.is-lab .cta-band, .is-blog .cta-band { margin-top: 0; margin-bottom: clamp(64px, 9vw, 120px); }

/* ---------- Blog ---------- */
.blog { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter) clamp(56px, 8vw, 110px); }
.blog__empty { font: 700 22px var(--display); color: var(--text-soft); }
.post-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(20px, 3vw, 40px); }
.post-card a { display: block; text-decoration: none; }
.post-cover { position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius); display: flex; align-items: flex-end; padding: clamp(20px, 3vw, 36px); overflow: hidden; color: var(--white); }
.post-cover span { font: 800 clamp(40px, 6vw, 96px)/.95 var(--display); letter-spacing: -.03em; text-transform: lowercase; transition: transform .6s var(--ease); }
.post-cover .crop { opacity: .5; }
.post-cover--orange { background: var(--orange); }
.post-cover--red { background: var(--red); }
.post-cover--dark { background: #272727; color: #f3efe8; }
.post-cover--grey { background: #dddddd; color: #272727; }
.post-card a:hover .post-cover span { transform: translateY(-6px); }
.post-card__meta, .post__meta { margin: 16px 0 6px; font-size: 13px; font-weight: 600; color: var(--muted); }
.post-card__title { font-size: clamp(20px, 2vw, 28px); line-height: 1.15; transition: color .3s; }
.post-card a:hover .post-card__title { color: var(--red); }
.post-card__desc { margin: 10px 0 0; color: var(--text-soft); }
.post__head { max-width: 860px; margin: 0 auto; padding: clamp(32px, 6vw, 72px) var(--gutter) clamp(20px, 3vw, 36px); }
.post__head h1 { font-size: clamp(32px, 5.4vw, 72px); letter-spacing: -.025em; line-height: 1.02; margin: 4px 0 20px; }
.post__cover { max-width: calc(860px - 2 * var(--gutter)); margin: 0 auto clamp(28px, 4vw, 48px); aspect-ratio: 21 / 9; width: calc(100% - 2 * var(--gutter)); }
.prose { max-width: 860px; margin: 0 auto; padding: 0 var(--gutter); font-size: clamp(17px, 1.25vw, 19px); line-height: 1.7; }
.prose h2 { font-size: clamp(24px, 2.4vw, 34px); margin: 1.8em 0 .5em; line-height: 1.15; }
.prose h3 { font-size: clamp(19px, 1.7vw, 24px); margin: 1.5em 0 .4em; }
.prose p, .prose ul, .prose ol { margin: 0 0 1.1em; }
.prose li { margin-bottom: .4em; }
.prose a { color: var(--red); }
.prose strong { font-weight: 800; }
.prose blockquote { margin: 1.5em 0; padding: .2em 0 .2em 1.2em; border-left: 4px solid var(--orange); font: 700 1.15em/1.45 var(--display); }
.post .tags { max-width: 860px; margin: 28px auto 0; padding: 0 var(--gutter); }
.post .cta-band { max-width: calc(860px + 2 * var(--gutter)); }
.post__more { max-width: var(--max); margin: 0 auto; padding: clamp(48px, 7vw, 96px) var(--gutter); }
.post__more > h2 { font-size: clamp(28px, 3.6vw, 52px); margin-bottom: 28px; }

/* FAQ */
.faq { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter) clamp(48px, 7vw, 96px); }
.faq__item { border-top: 1px solid var(--line); }
.faq__item:last-child { border-bottom: 1px solid var(--line); }
.faq__item summary { list-style: none; display: grid; grid-template-columns: 3em minmax(0, 1fr) 28px; gap: 16px; align-items: center; padding: clamp(20px, 2.4vw, 30px) 4px; cursor: pointer; }
.faq__item summary::-webkit-details-marker { display: none; }
.faq__n { font: 800 14px var(--display); color: var(--orange); }
.faq__q { font: 700 clamp(18px, 2vw, 28px)/1.2 var(--display); letter-spacing: -.01em; transition: color .3s; }
.faq__item summary:hover .faq__q { color: var(--red); }
.faq__icon { position: relative; width: 22px; height: 22px; justify-self: end; }
.faq__icon::before, .faq__icon::after { content: ''; position: absolute; left: 0; top: 50%; width: 100%; height: 2px; background: currentColor; transition: transform .4s var(--ease); }
.faq__icon::after { transform: rotate(90deg); }
.faq__item[open] .faq__icon::after { transform: rotate(0deg); }
.faq__item p { margin: -4px 0 0; padding: 0 4px clamp(22px, 2.6vw, 32px) calc(3em + 20px); max-width: 70ch; font-size: clamp(16px, 1.2vw, 19px); color: var(--text-soft); }
.is-faq .cta-band { margin-top: 0; margin-bottom: clamp(64px, 9vw, 120px); }
.faq-link { max-width: var(--max); margin: 0 auto; padding: clamp(36px, 5vw, 64px) var(--gutter); display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.faq-link p { margin: 0; font: 700 clamp(20px, 2.2vw, 30px)/1.2 var(--display); }
.music { display: flex; align-items: center; gap: clamp(20px, 3vw, 40px); background: var(--strong); color: var(--on-strong); border-radius: var(--radius); padding: clamp(20px, 3vw, 36px); }
.music.is-on { display: block; padding: 0; background: none; }
.music iframe { display: block; width: 100%; height: 352px; border: 0; border-radius: 14px; }
.music__vinyl { flex: none; width: clamp(110px, 12vw, 150px); aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center;
  background: repeating-radial-gradient(circle, #1b1b1b 0 2px, #2c2c2c 2px 4px); box-shadow: 0 10px 30px rgb(0 0 0 / .3); animation: vinyl 6s linear infinite paused; }
.music:hover .music__vinyl { animation-play-state: running; }
.music__vinyl span { width: 44%; aspect-ratio: 1; border-radius: 50%; background: var(--orange); display: grid; place-items: center; }
.music__logo { width: 66%; height: auto; }
.music__logo path { fill: var(--white); }
@keyframes vinyl { to { transform: rotate(360deg); } }
.music__body p { font: 700 clamp(18px, 1.6vw, 22px)/1.3 var(--display); margin: 0 0 18px !important; max-width: none; }
.music__ctas { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.music .btn--primary { --bg: var(--orange); --fg: var(--white); }
.music .btn--primary::before { background: var(--red); }
.music__ext { color: inherit; font-weight: 700; font-size: 15px; }
.music__body small { display: block; margin-top: 16px; font-size: 12px; opacity: .6; }
.project__head { position: relative; max-width: var(--max); margin: 0 auto; padding: clamp(32px, 6vw, 80px) var(--gutter) clamp(28px, 4vw, 56px); }
.project__head .crop { color: var(--orange); }
.project__cat { font-weight: 700; display: flex; gap: 10px; align-items: baseline; }
.project__cat .sec-num { margin: 0; }
.project__head h1 { font-size: clamp(30px, 6.4vw, 104px); max-width: 18ch; letter-spacing: -.025em; line-height: 1; }
.project__meta { display: flex; flex-wrap: wrap; gap: 14px 48px; margin: clamp(28px, 4vw, 48px) 0 0; padding-top: 24px; border-top: 1px solid var(--line); }
.project__meta dt { font-size: 12px; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); font-weight: 700; }
.project__meta dd { margin: 4px 0 0; font-weight: 700; }
.project__meta a { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; color: var(--red); }
.project__meta svg { width: 18px; height: 18px; }
.project__hero { margin: 0 auto; max-width: calc(1100px + 2 * var(--gutter)); padding: 0 var(--gutter); }
.project__hero img { width: auto; max-width: 100%; max-height: 78vh; margin: 0 auto; }
.project__hero img, .project__gallery img { width: 100%; border-radius: var(--radius); background: var(--surface-2); cursor: zoom-in; }
.project__body { max-width: 860px; margin: 0 auto; padding: clamp(48px, 7vw, 100px) var(--gutter); }
.lead { font: 600 clamp(20px, 2vw, 28px)/1.4 var(--display); letter-spacing: -.01em; margin-bottom: 1.4em; }
.project__body h2 { font-size: clamp(24px, 2.6vw, 36px); margin: 1.6em 0 .6em; position: relative; padding-left: 26px; line-height: 1.1; }
.project__body h2::before { content: ''; position: absolute; left: 0; top: .2em; width: 12px; height: 12px; border-radius: 50%; background: var(--orange); }
.project__body section p { color: var(--text-soft); }
.tags { list-style: none; padding: 0; margin: 40px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.tags li { background: var(--surface); border-radius: 999px; padding: 7px 14px; font-size: 13px; font-weight: 700; color: var(--muted); }
.project__gallery { max-width: calc(var(--max) + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter); display: grid; grid-template-columns: 1fr 1fr; gap: clamp(16px, 2vw, 28px); }
.project__gallery figure { margin: 0; }
.project__gallery .wide { grid-column: 1 / -1; }
.cta-band { max-width: var(--max); margin: clamp(64px, 9vw, 120px) auto 0; padding: clamp(28px, 4vw, 48px) var(--gutter); display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.cta-band p { font: 800 clamp(26px, 3.4vw, 48px)/1 var(--display); margin: 0; }
.next { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 24px; max-width: var(--max); margin: 0 auto; padding: clamp(48px, 8vw, 120px) var(--gutter); text-decoration: none; position: relative; }
.next__label { grid-column: 1; font-weight: 700; color: var(--orange); text-transform: uppercase; letter-spacing: .14em; font-size: 13px; }
.next__title { grid-column: 1; font: 800 clamp(28px, 5.4vw, 86px)/1 var(--display); letter-spacing: -.025em; overflow-wrap: break-word; hyphens: auto; min-width: 0; transition: color .3s, transform .6s var(--ease); }
.next__img { grid-column: 2; grid-row: 1 / span 2; width: clamp(140px, 24vw, 340px); border-radius: var(--radius); overflow: hidden; transform: rotate(4deg) scale(.92); transition: transform .6s var(--ease-back); }
.next__img img { aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }
.next:hover .next__title { color: var(--red); transform: translateX(14px); }
.next:hover .next__img { transform: rotate(-3deg) scale(1); }

.lightbox { border: 0; padding: 0; background: transparent; max-width: 100vw; max-height: 100vh; width: 100vw; height: 100vh; }
.lightbox::backdrop { background: rgb(39 39 39 / .92); backdrop-filter: blur(6px); }
.lightbox[open] { display: grid; place-items: center; }
.lightbox img { max-width: 92vw; max-height: 86vh; width: auto; border-radius: 12px; animation: lb .45s var(--ease) both; }
@keyframes lb { from { transform: scale(.92); opacity: 0; } }
.lightbox button { position: fixed; border: 0; color: var(--ink); background: var(--white); width: 52px; height: 52px; border-radius: 50%; font-size: 20px; font-weight: 800; display: grid; place-items: center; transition: background .3s, transform .3s var(--ease-back); }
.lightbox button:hover { background: var(--orange); color: var(--white); transform: scale(1.08); }
.lightbox__close { top: 20px; right: 20px; }
.lightbox__nav--prev { left: 20px; top: 50%; translate: 0 -50%; }
.lightbox__nav--next { right: 20px; top: 50%; translate: 0 -50%; }

/* ---------- Pagine semplici ---------- */
.page { position: relative; max-width: 860px; margin: 0 auto; padding: clamp(48px, 8vw, 120px) var(--gutter); }
.page h1 { font-size: clamp(40px, 6vw, 84px); margin-bottom: .5em; }
.page h2 { font-size: 24px; margin: 1.8em 0 .5em; }
.page--404 { text-align: center; min-height: 70vh; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.big404 { font: 800 clamp(96px, 24vw, 300px)/.8 var(--display); letter-spacing: -.04em; color: var(--orange); margin: 0 0 24px; }
.big404 span { color: var(--red); display: inline-block; animation: spin404 4s var(--ease) infinite; }
@keyframes spin404 { 40%, 100% { transform: rotate(360deg); } }
.game { width: 100%; margin-top: clamp(40px, 6vw, 72px); }
.game__hud { display: flex; justify-content: center; gap: clamp(16px, 4vw, 40px); font-size: 13px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--text-soft); margin-bottom: 14px; }
.game__hud b { font: 800 20px/1 var(--display); letter-spacing: 0; color: var(--text); margin-left: 6px; font-variant-numeric: tabular-nums; }
.game__arena { position: relative; height: clamp(320px, 52vh, 460px); border-radius: var(--radius); background: var(--surface); border: 1.5px dashed var(--field-line); overflow: hidden; touch-action: manipulation; user-select: none; }
.game__target { position: absolute; left: 0; top: 0; width: var(--s, 110px); padding: 0; border: 0; background: none; cursor: crosshair; opacity: 0; will-change: transform; }
.is-playing .game__target { opacity: 1; }
.game__logo { width: 100%; height: auto; display: block; pointer-events: none; }
.game__target.is-hit .game__logo { animation: hit .3s var(--ease-back); }
@keyframes hit { 40% { transform: scale(.8) rotate(-8deg); } }
.game__overlay { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px; padding: 24px; text-align: center; }
.game__overlay[hidden] { display: none; }
.game__overlay p { margin: 0; font: 700 clamp(18px, 2vw, 24px)/1.35 var(--display); }
.game__overlay strong { color: var(--red); }

/* ---------- Cursore personalizzato ---------- */
.cursor { position: fixed; left: 0; top: 0; z-index: 500; pointer-events: none; width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 50%; background: var(--orange); transition: width .35s var(--ease), height .35s var(--ease), margin .35s var(--ease), background .3s, opacity .3s; display: grid; place-items: center; mix-blend-mode: multiply; }
.cursor.is-hover { width: 56px; height: 56px; margin: -28px 0 0 -28px; background: rgb(236 102 72 / .35); }
.cursor.has-label { width: 92px; height: 92px; margin: -46px 0 0 -46px; background: var(--strong); mix-blend-mode: normal; }
.cursor__label { color: var(--on-strong); font: 800 13px var(--display); opacity: 0; transition: opacity .2s; }
.cursor.has-label .cursor__label { opacity: 1; }
.cursor.is-hidden { opacity: 0; }
@media (hover: hover) and (pointer: fine) { .has-cursor, .has-cursor a, .has-cursor button { cursor: none; } }

/* ---------- Animazioni di comparsa ---------- */
.js [data-reveal] { opacity: 0; transform: translateY(36px); transition: opacity .9s var(--ease), transform .9s var(--ease); transition-delay: calc(var(--i, 0) * 70ms); }
.js [data-reveal].is-in { opacity: 1; transform: none; }
/* Finché lo script non ha diviso il testo resta nascosto: niente scritta ferma che poi sparisce e risale.
   Se lo script non parte, dopo 2 s ricompare comunque. */
.js [data-split]:not(.is-split), .js [data-split-words]:not(.is-split) { opacity: 0; animation: unhide 0s 2s forwards; }
@keyframes unhide { to { opacity: 1; } }
.js [data-split-words] .w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .06em; margin-bottom: -.06em; }
.js [data-split-words] .w > span { display: inline-block; transform: translateY(105%); transition: transform 1s var(--ease); transition-delay: calc(var(--wi) * 60ms); }
.js [data-split-words].is-in .w > span { transform: none; }
[data-split] .ch { animation: char-in 1s var(--ease) both; animation-delay: calc(var(--ci) * 40ms + var(--intro-delay, 0ms)); }
@keyframes char-in { from { transform: translateY(80%) rotate(8deg); opacity: 0; } }
.js .hero__logo { animation: logo-in 1.2s var(--ease-back) both; animation-delay: calc(var(--intro-delay, 0ms) + 300ms); }
@keyframes logo-in { from { opacity: 0; translate: 0 60px; scale: .8; } }


/* ---------- Slider prima/dopo ---------- */
.compare { margin: 2.4em auto 0; max-width: 540px; }
.compare__stage { position: relative; border-radius: var(--radius); overflow: hidden; background: #fff; touch-action: pan-y; user-select: none; cursor: ew-resize; box-shadow: 0 20px 50px rgb(39 39 39 / .1); }
.compare__img { display: block; width: 100%; height: auto; pointer-events: none; -webkit-user-drag: none; }
.compare__before { position: absolute; inset: 0; clip-path: inset(0 calc(100% - var(--pos)) 0 0); }
.compare__before .compare__img { height: 100%; object-fit: cover; }
.compare__handle { position: absolute; top: 0; bottom: 0; left: var(--pos); width: 3px; margin-left: -1.5px; background: var(--orange); pointer-events: none; }
.compare__knob { position: absolute; top: 50%; left: 50%; width: 56px; height: 56px; margin: -28px 0 0 -28px; border-radius: 50%; background: var(--orange); color: #fff; display: grid; place-items: center; box-shadow: 0 8px 24px rgb(200 63 67 / .35); transition: transform .4s var(--ease-back); }
.compare__knob svg { width: 26px; height: 26px; }
.compare.is-dragging .compare__knob, .compare__stage:hover .compare__knob { transform: scale(1.12); }
.compare__label { position: absolute; top: 16px; padding: 7px 14px; border-radius: 999px; font: 700 13px var(--body); letter-spacing: .02em; pointer-events: none; transition: opacity .3s; }
.compare__label--before { left: 16px; background: rgb(39 39 39 / .85); color: #fff; }
.compare__label--after { right: 16px; background: var(--orange); color: #fff; }
.compare.is-left .compare__label--before { opacity: 0; }
.compare.is-right .compare__label--after { opacity: 0; }
.compare__range { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; margin: 0; cursor: ew-resize; }
.compare:has(.compare__range:focus-visible) .compare__knob { outline: 3px solid var(--text); outline-offset: 3px; }
.compare figcaption { margin-top: 12px; font-size: 14px; color: var(--muted); text-align: center; }

/* ---------- Interruttore tema chiaro/scuro ---------- */
.theme-toggle { width: 44px; height: 44px; border-radius: 50%; border: 1.5px solid var(--line); background: var(--surface); color: var(--text); display: grid; place-items: center; flex: none; position: relative; overflow: hidden; transition: background .3s, border-color .3s, transform .5s var(--ease-back); }
.theme-toggle:hover { transform: rotate(-20deg); border-color: var(--orange); }
.theme-toggle svg { width: 20px; height: 20px; position: absolute; transition: transform .6s var(--ease-back), opacity .3s; }
.theme-toggle .i-moon { transform: translateY(0) rotate(0); }
.theme-toggle .i-sun { transform: translateY(140%) rotate(90deg); opacity: 0; color: var(--orange); }
:root[data-theme='dark'] .theme-toggle .i-moon { transform: translateY(-140%) rotate(-90deg); opacity: 0; }
:root[data-theme='dark'] .theme-toggle .i-sun { transform: none; opacity: 1; }
:root[data-theme='dark'] .cursor { mix-blend-mode: normal; }
:root[data-theme='dark'] .hero__kicker, :root[data-theme='dark'] .views { box-shadow: none; border: 1px solid var(--line); }
.nav.is-menu-open .theme-toggle { background: transparent; border-color: rgb(255 255 255 / .5); color: #fff; }

/* ---------- Skeleton delle immagini ---------- */
/* Finché l'immagine non arriva, al suo posto c'è un riquadro grigio con un riflesso che scorre. */
.js img.sk { background-color: var(--skel); background-image: linear-gradient(100deg, transparent 30%, var(--skel-shine) 50%, transparent 70%); background-size: 250% 100%; background-repeat: no-repeat; animation: shimmer 1.4s ease-in-out infinite; }
.js img.sk.is-loaded { animation: img-in .6s var(--ease) both; background: none; }
@keyframes shimmer { from { background-position: 130% 0; } to { background-position: -30% 0; } }
@keyframes img-in { from { opacity: .3; } }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .nav__links { gap: 0; }
  .nav__links a { padding: 10px 10px; }
  .nav__name small { display: none; }
  .about { grid-template-columns: 1fr 1fr; }
  .about__panel { border-radius: var(--radius) 0 0 0; }
  .about__photo { border-radius: 0 var(--radius) 0 0; }
  .about__side { grid-column: 1 / -1; border-radius: 0 0 var(--radius) var(--radius); display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 32px; }
  .about__side h3:not(:first-child) { margin-top: 0; }
  .about__side > * { grid-row: auto; }
  .steps { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 900px) {
  :root { --nav-h: 68px; }
  .nav__links, .nav__cta { display: none; }
  .theme-toggle { margin-left: auto; }
  .nav__brand { margin-right: 0; }
  .nav__name b { white-space: nowrap; font-size: 16px; }
  .nav { gap: 12px; }
  .hero__kicker { font-size: 12.5px; white-space: nowrap; }
  .nav__burger { display: block; }
  .nav__name small { display: none; }
  .hero__grid { grid-template-columns: minmax(0, 1fr); grid-template-areas: 'logo' 'kicker' 'title' 'lead' 'ctas'; }
  .hero__logo { position: relative; grid-area: logo; top: 0; width: min(58vw, 300px); justify-self: center; margin-bottom: 3vh; }
  .hero__title { font-size: clamp(38px, 12.6vw, 120px); }
  .badge { display: none; }
  .grid { grid-template-columns: 1fr 1fr; }
  .card, .card--big { grid-column: span 1; }
  .card--big:nth-child(3n + 1) { grid-column: 1 / -1; }
  .rows a { grid-template-columns: 2.4em 1fr 26px; }
  .row__cat, .row__year { display: none; }
  .contact { grid-template-columns: minmax(0, 1fr); row-gap: 32px; }
  .grid--home .card { grid-column: span 1; }
  .namer__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .contact--teaser .contact__go { justify-self: start; }
  .story__row { grid-template-columns: minmax(0, 1fr); }
  .footer__cols { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .grid { grid-template-columns: 1fr; }
  .svc { grid-template-columns: 1fr; }
  .namer__grid, .quiz__opts, .quiz__works, .post-grid { grid-template-columns: 1fr; }
  .namer__card { min-height: 200px; }
  .faq__item summary { grid-template-columns: 2.2em minmax(0, 1fr) 22px; gap: 10px; }
  .faq__item p { padding-left: calc(2.2em + 10px); }
  .music { flex-direction: column; align-items: flex-start; }
  .card--big:nth-child(3n + 1) { grid-column: auto; }
  .about { grid-template-columns: 1fr; }
  .about__panel { border-radius: var(--radius) var(--radius) 0 0; }
  .about__photo { border-radius: 0; min-height: 360px; }
  .about__side { grid-template-columns: 1fr; border-radius: 0 0 var(--radius) var(--radius); }
  .about__side h3:not(:first-child) { margin-top: 28px; }
  .steps { grid-template-columns: 1fr; }
  .step { min-height: 0; }
  .step__n { margin-bottom: 12px; }
  .form__row { grid-template-columns: 1fr; gap: 0; }
  .project__gallery { grid-template-columns: 1fr; }
  .next { grid-template-columns: 1fr; }
  .next__img { grid-column: 1; grid-row: auto; width: 70%; }
  .footer__cols { grid-template-columns: 1fr; }
  .work__bar { position: static; }
  .crop { display: none; }
  .marquee { padding: 12px 0; }
  .direct a { font-size: 14px; word-break: normal; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .js [data-reveal], .js [data-split-words] .w > span { opacity: 1; transform: none; }
  @view-transition { navigation: none; }
  /* La fascia continua a scorrere, più lenta: è un movimento leggero e si ferma al passaggio del mouse. */
  .marquee__track { animation-duration: 70s !important; animation-iteration-count: infinite !important; }
}
