:root {
  --text: #1d1d1f;
  --muted: #6e6e73;
  --bg: #ffffff;
  --gray: #f5f5f7;
  --line: #d2d2d7;
  --accent: #557565;
  --accent-dark: #456253;
  --blue: #0071e3;
  --blue-link: #0066cc;

  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Inter", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --gutter: clamp(20px, 5vw, 44px);
  --ease: cubic-bezier(0.25, 0.1, 0.25, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 48px; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.47;
  letter-spacing: -0.011em;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, p, ul, ol, figure { margin: 0; padding: 0; }
ul, ol { list-style: none; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }

:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; border-radius: 6px; }

.wrap { width: 100%; max-width: 1068px; margin-inline: auto; padding-inline: var(--gutter); }

.skip {
  position: absolute; left: 16px; top: -60px; z-index: 100;
  background: var(--text); color: #fff; padding: 10px 16px; border-radius: 8px;
}
.skip:focus { top: 60px; }

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, 0.8);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}
.nav__inner {
  max-width: 1068px; margin-inline: auto; padding-inline: var(--gutter);
  height: 48px; display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
.nav__brand { font-size: 15px; font-weight: 600; letter-spacing: -0.01em; }
.nav__links { display: flex; gap: clamp(18px, 3vw, 32px); font-size: 13px; }
.nav__short { display: none; }
.nav__progress { position: absolute; left: 0; bottom: -1px; width: 100%; height: 2px; background: var(--text); transform: scaleX(0); transform-origin: left; }
.nav__links a { color: var(--text); opacity: 0.8; transition: opacity 0.2s; }
.nav__links a:hover,
.nav__links a.is-active { opacity: 1; }
.nav__links a.is-active { font-weight: 500; }

/* ---------- Shared type ---------- */
.eyebrow { font-size: clamp(17px, 2vw, 21px); font-weight: 600; color: var(--muted); letter-spacing: -0.01em; }

.link { color: var(--text); font-size: 17px; font-weight: 500; }
.link::after { content: "\2192"; display: inline-block; margin-left: 0.4em; transition: transform 0.3s var(--ease); }
a.link:hover::after,
a:hover > .link::after { transform: translateX(5px); }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  min-height: calc(100svh - 48px);
  display: flex; align-items: flex-end;
  padding: clamp(56px, 9vw, 110px) 0 clamp(36px, 5vw, 64px);
}
.hero__inner { position: relative; z-index: 1; will-change: transform, opacity; }
.hero__title {
  margin-top: 16px;
  font-size: clamp(2.3rem, 9.2vw, 7.5rem); font-weight: 600;
  line-height: 1; letter-spacing: -0.045em;
}
.line--muted { color: var(--muted); }
.hero__foot {
  margin-top: clamp(32px, 5vw, 64px); padding-top: 24px; border-top: 1px solid var(--line);
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 24px 40px;
}
.hero__lead {
  max-width: 24em;
  font-size: clamp(1.1rem, 1.9vw, 1.4rem); line-height: 1.3; letter-spacing: -0.015em; color: var(--muted);
}

.cta { display: inline-flex; align-items: center; gap: 16px; font-size: clamp(1.15rem, 1.9vw, 1.4rem); font-weight: 600; letter-spacing: -0.02em; }
.cta i,
.row__arrow {
  display: grid; place-items: center; flex: none;
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--text); color: #fff;
  transition: transform 0.45s var(--ease-out);
}
.cta:hover i { transform: translateX(8px); }

/* Parola che cambia */
.rotator { display: inline-grid; vertical-align: top; overflow: hidden; padding-bottom: 0.14em; margin-bottom: -0.14em; }
.rot { grid-area: 1 / 1; transform: translateY(110%); opacity: 0; transition: transform 0.7s var(--ease-out), opacity 0.4s; }
.rot.is-on { transform: none; opacity: 1; }
.rot.is-out { transform: translateY(-110%); opacity: 0; }

/* Simbolo € di particelle */
.hero__canvas { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }

/* ---------- Numeri ---------- */
.stats { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.stats__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.stats__grid li { padding: clamp(32px, 5vw, 64px) clamp(16px, 3vw, 40px) clamp(32px, 5vw, 64px) 0; }
.stats__grid li + li { padding-left: clamp(16px, 3vw, 40px); border-left: 1px solid var(--line); }
.stats__num { font-size: clamp(3rem, 7.5vw, 5.5rem); font-weight: 600; line-height: 1; letter-spacing: -0.045em; font-variant-numeric: tabular-nums; }
.stats__label { margin-top: 14px; max-width: 20em; color: var(--muted); }

/* ---------- Sections ---------- */
.section { padding: clamp(72px, 11vw, 140px) 0; }
.section--gray { background: var(--gray); }

.head { max-width: 760px; margin-bottom: clamp(40px, 6vw, 72px); }
.head__lead { margin-top: 20px; max-width: 28em; font-size: clamp(1.1rem, 1.9vw, 1.4rem); line-height: 1.3; letter-spacing: -0.015em; color: var(--muted); }
.head__title {
  margin-top: 8px;
  font-size: clamp(2rem, 5.4vw, 3.5rem); font-weight: 600;
  line-height: 1.08; letter-spacing: -0.03em;
}

/* ---------- Dire ---------- */
.about { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(32px, 6vw, 80px); align-items: center; }
.about__photo { overflow: hidden; border-radius: 28px; background: var(--gray); }
.about__photo img {
  width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 100%;
  transform-origin: 20% 60%; will-change: transform;
}
.about__text p + p { margin-top: 20px; }
.about__text p { color: var(--muted); font-size: clamp(1.05rem, 1.6vw, 1.3rem); line-height: 1.4; }
.about__text .about__big {
  color: var(--text); font-weight: 600;
  font-size: clamp(1.4rem, 2.8vw, 2rem); line-height: 1.2; letter-spacing: -0.02em;
}

/* ---------- Tiles ---------- */
.tiles { display: grid; gap: 20px; }
.tiles--three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.tiles--two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.tiles--two .tile { padding: clamp(28px, 4vw, 48px); }
.tiles--two .tile h3 { font-size: clamp(1.8rem, 3.4vw, 2.6rem); letter-spacing: -0.03em; }
.about + .tiles { margin-top: clamp(48px, 8vw, 96px); }

.tile {
  display: flex; flex-direction: column; height: 100%;
  padding: clamp(24px, 3vw, 36px); border-radius: 28px;
  background: var(--gray);
}
.tile--white { background: var(--bg); }
.tile h3 { font-size: clamp(1.4rem, 2.2vw, 1.75rem); font-weight: 600; line-height: 1.15; letter-spacing: -0.02em; }
.tile p { margin-top: 12px; color: var(--muted); }
.tile__role { margin-bottom: 8px; font-size: 14px; font-weight: 600; color: var(--muted); }
.tile .tile__stat { margin: 20px 0 8px; color: var(--text); font-size: clamp(1.5rem, 2.8vw, 2.1rem); font-weight: 600; line-height: 1.1; letter-spacing: -0.03em; }
.tile__stat span { color: var(--muted); }
.tile .tile__zones { color: var(--text); font-size: 15px; font-weight: 500; }
.tile .link { margin-top: auto; padding-top: 28px; }
.tile--link { transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease); }
.tile--link:hover { transform: translateY(-6px) scale(1.015); box-shadow: 0 18px 50px rgba(0, 0, 0, 0.1); }

/* ---------- Monete ---------- */
.head-row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 28px 40px; margin-bottom: clamp(40px, 6vw, 72px); }
.head-row .head { margin-bottom: 0; }
.coins { display: flex; align-items: flex-end; gap: 12px; height: 132px; }
.pile { display: flex; flex-direction: column-reverse; gap: 3px; }
.coin { width: 56px; height: 11px; border-radius: 6px; background: var(--text); transform: translateX(var(--x)); }
.coin:nth-child(3n + 2) { background: #b9b9c0; }
.coin:nth-child(3n) { background: var(--bg); box-shadow: inset 0 0 0 1.5px var(--text); }
.js .coin { opacity: 0; }
.js .coins.is-in .coin { animation: coin-drop 0.75s cubic-bezier(0.3, 0, 0.4, 1) forwards; animation-delay: calc(0.3s + var(--p) * 0.3s + var(--n) * 0.12s); }
@keyframes coin-drop {
  0% { opacity: 0; transform: translate(var(--x), -190px); }
  15% { opacity: 1; }
  62% { transform: translate(var(--x), 0); }
  78% { transform: translate(var(--x), -7px); }
  100% { opacity: 1; transform: translate(var(--x), 0); }
}

/* ---------- Grafico ---------- */
.chart { --plot: clamp(190px, 24vw, 280px); --a: var(--text); --b: #b9b9c0; margin-top: 20px; height: auto; padding: clamp(24px, 4vw, 48px); }
.chart__head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 16px 32px; }
.chart__head h3 { font-size: clamp(1.6rem, 3.2vw, 2.4rem); letter-spacing: -0.03em; }
.chart__legend { display: flex; flex-wrap: wrap; gap: 6px 20px; font-size: 14px; font-weight: 500; }
.chart__legend li { display: flex; align-items: center; gap: 8px; }
.chart__key { width: 12px; height: 12px; border-radius: 3px; background: var(--a); }
.chart__key--b { background: var(--b); }
.chart__bars { margin-top: clamp(28px, 4vw, 48px); display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); align-items: end; }
.chart__pair { display: flex; align-items: flex-end; gap: 4px; padding-right: clamp(10px, 3vw, 40px); }
.chart__col { flex: 1; max-width: 72px; display: flex; flex-direction: column; align-items: center; }
.chart__val { margin-bottom: 8px; font-size: clamp(10px, 1.5vw, 15px); font-weight: 600; letter-spacing: -0.03em; white-space: nowrap; }
.chart__bar { position: relative; width: 100%; height: calc(var(--plot) * var(--h, 0.5)); border-radius: 6px 6px 0 0; background: var(--a); }
.chart__col--b .chart__bar { background: var(--b); }
/* Anno in corso: barra piena fino al dato di oggi, tratteggio sopra per quello che manca */
.is-partial .chart__bar { border-radius: 0; }
.is-partial .chart__bar::before {
  content: ""; position: absolute; left: 0; right: 0; bottom: 100%; height: 20px;
  border: 1.5px dashed var(--muted); border-bottom: 0; border-radius: 6px 6px 0 0;
}
.is-partial .chart__val { margin-bottom: 28px; }
.chart__year { display: block; padding-top: 12px; border-top: 1px solid var(--line); font-size: clamp(13px, 1.6vw, 15px); font-weight: 600; color: var(--text); }
.chart__year small { display: block; margin-top: 2px; font-size: clamp(11px, 1.4vw, 13px); font-weight: 500; color: var(--muted); }
.chart .chart__note { margin-top: 16px; font-size: 13px; }
.js .chart__bar { transform: scaleY(0); transform-origin: bottom; transition: transform 1.3s var(--ease-out); transition-delay: calc(var(--i, 0) * 0.09s + 0.2s); }
.js .chart__val { opacity: 0; transform: translateY(10px); transition: opacity 0.6s, transform 0.6s var(--ease-out); transition-delay: calc(var(--i, 0) * 0.09s + 0.9s); }
.js .chart.is-in .chart__bar { transform: none; }
.js .chart.is-in .chart__val { opacity: 1; transform: none; }

/* ---------- Fascia scorrevole ---------- */
.band { overflow: hidden; padding: 0 0 clamp(56px, 8vw, 100px); }
.band__track { display: flex; width: max-content; will-change: transform; }
.band__track span { font-size: clamp(3rem, 10vw, 8rem); font-weight: 600; line-height: 1.1; letter-spacing: -0.045em; color: #e8e8ed; white-space: nowrap; }
.band__track span::after { content: "\00B7"; margin: 0 0.35em; }

/* ---------- Contatti ---------- */
#contatti { padding-top: 0; }
#contatti .head { margin-bottom: 8px; }
.contact__title {
  font-size: clamp(2.2rem, 7.6vw, 5.5rem); font-weight: 600;
  line-height: 1.03; letter-spacing: -0.04em;
}
.contact__lead {
  margin-top: 24px; max-width: 26em;
  font-size: clamp(1.1rem, 1.9vw, 1.4rem); line-height: 1.3; letter-spacing: -0.015em; color: var(--muted);
}
.rows { margin-top: clamp(40px, 6vw, 72px); border-bottom: 1px solid var(--line); }
.row {
  display: grid; grid-template-columns: 150px minmax(0, 1fr) auto; align-items: center; gap: 4px 20px;
  padding: clamp(18px, 2.6vw, 30px) 0; border-top: 1px solid var(--line);
  transition: padding 0.45s var(--ease-out);
}
.row__label { font-size: 15px; font-weight: 600; color: var(--muted); }
.row__value { font-size: clamp(1.25rem, 4.2vw, 3rem); font-weight: 600; line-height: 1.1; letter-spacing: -0.035em; overflow-wrap: anywhere; }
.row__arrow { background: var(--gray); color: var(--text); transition: transform 0.45s var(--ease-out), background 0.3s, color 0.3s; }
.row:hover { padding-left: 18px; }
.row:hover .row__arrow { background: var(--text); color: #fff; transform: rotate(-45deg); }

/* ---------- Footer ---------- */
.footer { background: var(--gray); font-size: 12px; color: var(--muted); }
.footer__inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 24px; padding-block: 20px; }
.footer__social { display: flex; flex-wrap: wrap; gap: 4px 14px; }
.footer a { color: #424245; }
.footer a:hover { text-decoration: underline; }

/* ---------- Motion ---------- */
.js .reveal {
  opacity: 0; transform: translateY(36px) scale(0.98);
  transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out);
  transition-delay: var(--delay, 0s);
}
.js .reveal.is-in { opacity: 1; transform: none; }

.line { display: block; overflow: hidden; padding-bottom: 0.14em; margin-bottom: -0.14em; }
.line > span { display: block; }
.js .lines .line > span { transform: translateY(115%); transition: transform 1s var(--ease-out); }
.js .lines .line:nth-child(2) > span { transition-delay: 0.12s; }
.js .lines .line:nth-child(3) > span { transition-delay: 0.24s; }
.js .lines.is-in .line > span { transform: none; }

.js .hero__foot { --delay: 0.5s; }

.js .about__photo.reveal { clip-path: inset(12% 12% 12% 12% round 28px); transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out), clip-path 1.2s var(--ease-out); }
.js .about__photo.reveal.is-in { clip-path: inset(0 round 28px); }

.w { transition: opacity 0.25s linear; }

.word { display: inline-block; overflow: hidden; padding: 0 0.04em 0.14em; margin: 0 -0.04em -0.14em; vertical-align: top; }
.word > span { display: inline-block; transform: translateY(110%); transition: transform 0.9s var(--ease-out); transition-delay: calc(var(--i) * 45ms + 0.1s); }
.is-in .word > span { transform: none; }
.cta i { will-change: transform; }

.nav { animation: nav-in 0.8s var(--ease-out) both; }
@keyframes nav-in { from { opacity: 0; transform: translateY(-100%); } }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .about { grid-template-columns: 1fr; }
  .about__photo { max-width: 440px; }
  .tiles--three, .tiles--two { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .chart__tot { display: none; }
  .chart__live { display: block; font-size: 11px; font-weight: 500; color: var(--muted); text-indent: -0.6em; overflow: hidden; }
  .chart__year { min-height: 66px; }
  .chart__pair { padding-right: 8px; }
  .nav__full { display: none; }
  .nav__short { display: inline; }
  .stats__grid { grid-template-columns: 1fr; }
  .stats__grid li, .stats__grid li + li { padding: 28px 0; border-left: 0; }
  .stats__grid li + li { border-top: 1px solid var(--line); }
  .row { grid-template-columns: minmax(0, 1fr) auto; }
  .row__label { grid-column: 1 / -1; }
  .row__arrow, .cta i { width: 44px; height: 44px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .js .reveal { opacity: 1; transform: none; clip-path: none; }
  .js .lines .line > span { transform: none; }
  .js .chart__bar, .js .chart__val { transform: none; opacity: 1; }
  .js .coin { opacity: 1; }
}

/* ---------- Colore d'accento e pulsanti ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  padding: 14px 24px; border-radius: 980px; background: var(--accent); color: #fff;
  font-size: 16px; font-weight: 600; line-height: 1.2; letter-spacing: -0.01em; white-space: nowrap;
  transition: background 0.25s, color 0.25s, border-color 0.25s, transform 0.3s var(--ease-out);
}
.btn:hover { background: var(--accent-dark); transform: scale(1.04); }
.btn:active { transform: scale(0.97); }
.btn--small { padding: 8px 14px; font-size: 13px; }
.btn--small svg { width: 14px; height: 14px; }
.btn--ghost { background: transparent; color: var(--text); box-shadow: inset 0 0 0 1.5px var(--line); }
.btn--ghost:hover { background: transparent; color: var(--accent); box-shadow: inset 0 0 0 1.5px var(--accent); }
.btn--light { background: #fff; color: var(--accent-dark); }
.btn--light:hover { background: #f5f5f7; }
.btn--outline { background: transparent; box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, 0.6); }
.btn--outline:hover { background: rgba(255, 255, 255, 0.12); }

.hero__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 28px; }
.cta i { background: var(--accent); }
.nav__progress { background: var(--accent); }
.row:hover .row__arrow { background: var(--accent); }
.chart { --a: var(--accent); }
.coin { background: var(--accent); }
.coin:nth-child(3n) { box-shadow: inset 0 0 0 1.5px var(--accent); }
a.link { color: var(--accent-dark); }

.after-cta { margin-top: 28px; font-size: clamp(1.05rem, 1.8vw, 1.3rem); font-weight: 600; letter-spacing: -0.02em; }
.after-cta .link { font-size: inherit; font-weight: 600; margin-left: 0.3em; }

.cta-band {
  margin-top: 20px; padding: clamp(28px, 5vw, 56px); border-radius: 28px; background: var(--accent); color: #fff;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px 40px;
}
.cta-band__title { flex: 1 1 320px; font-size: clamp(1.6rem, 3.4vw, 2.5rem); font-weight: 600; line-height: 1.1; letter-spacing: -0.03em; }
.cta-band__title span { color: rgba(255, 255, 255, 0.7); }
.cta-band__actions { display: flex; flex-wrap: wrap; gap: 12px; }

.callbar { display: none; }
@media (max-width: 640px) {
  .nav__call { display: none; }
  .callbar {
    position: fixed; z-index: 40; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom));
    display: flex; gap: 8px; padding: 8px; border-radius: 980px;
    background: rgba(255, 255, 255, 0.82); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
    border: 1px solid rgba(0, 0, 0, 0.06); box-shadow: 0 10px 34px rgba(0, 0, 0, 0.16);
    opacity: 0; transform: translateY(120%); pointer-events: none;
    transition: opacity 0.4s, transform 0.5s var(--ease-out);
  }
  .callbar.is-on { opacity: 1; transform: none; pointer-events: auto; }
  .callbar .btn { flex: 1; padding: 13px 16px; font-size: 15px; }
  .cta-band__actions, .cta-band__actions .btn { width: 100%; }
}

/* ---------- Logo ---------- */
.nav__brand { display: flex; align-items: center; gap: 10px; }
.nav__logo { height: 36px; width: auto; }
.footer__brand img { display: inline-block; height: 22px; width: auto; margin-right: 10px; vertical-align: middle; opacity: 0.75; }
