/* ==========================================================
   Cubo Studio — stile
   Ispirato a builder.subbyx.com: bianco, viola, titoli larghi,
   card pastello e schede che si impilano.
   ========================================================== */

@font-face { font-family: "Archivo"; src: url("/assets/fonts/archivo-var.woff2") format("woff2"); font-weight: 100 900; font-stretch: 62% 125%; font-display: swap; }
@font-face { font-family: "Manrope"; src: url("/assets/fonts/manrope-var.woff2") format("woff2"); font-weight: 200 800; font-display: swap; }

:root {
  --ink: #141418;
  --muted: #5d5d6b;
  --soft: #8a8a99;
  --line: #ececf4;
  --grid: #e8e6f6;
  --bg: #ffffff;
  --accent: #6c3dee;
  --accent-dark: #5a2fd6;
  --accent-soft: #efe9ff;

  --f-display: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --f-body: "Manrope", "Helvetica Neue", Arial, sans-serif;

  --page: 1200px;
  --gutter: clamp(16px, 4vw, 40px);
  --section: clamp(96px, 12vw, 168px);
  --nav-h: 64px;

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --tint: #ffffff;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 96px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--tint); color: var(--ink);
  font-family: var(--f-body); font-size: 16px; line-height: 1.55; font-weight: 400;
  -webkit-font-smoothing: antialiased;
  transition: background-color .8s var(--ease);
}
h1, h2, h3, p, ul, ol, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; }
button, input { font: inherit; color: inherit; }
svg { display: block; }
::selection { background: var(--accent); color: #fff; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 8px; }

.skip { position: absolute; left: 16px; top: -100px; z-index: 100; background: var(--ink); color: #fff; padding: 10px 14px; border-radius: 10px; }
.skip:focus { top: 16px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.wrap { max-width: calc(var(--page) + var(--gutter) * 2); margin: 0 auto; padding: 0 var(--gutter); }
.accent { color: var(--accent); }

/* ---------- Tipografia ---------- */

.display, .hero__title, .card__title, .tile__title, .who__item h3 {
  font-family: var(--f-display); font-stretch: 125%; font-weight: 500;
  letter-spacing: -0.025em; text-wrap: balance;
}
.display { font-size: clamp(32px, 4.4vw, 60px); line-height: 1.06; }

/* ---------- Bottoni, chip, icone ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 22px; border: 0; border-radius: 999px;
  font-family: var(--f-body); font-size: 15px; font-weight: 700; letter-spacing: -0.005em;
  text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background-color .25s var(--ease), transform .25s var(--ease), box-shadow .25s var(--ease);
}
.btn--sm { min-height: 40px; padding: 0 18px; font-size: 14px; }
.btn--accent { background: var(--accent); color: #fff; box-shadow: 0 6px 18px -8px rgba(108, 61, 238, .7); }
.btn--accent:hover { background: var(--accent-dark); transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.chip {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 8px 16px 8px 8px; border-radius: 999px;
  background: #fff; border: 1px solid var(--line);
  box-shadow: 0 8px 24px -14px rgba(40, 20, 120, .35);
  font-size: 14px; font-weight: 600; white-space: nowrap;
}
.chip__ico, .tag svg, .end__contacts svg, .mock-target svg, .mock-browser__cta svg {
  fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
}
.chip__ico { width: 28px; height: 28px; padding: 5px; border-radius: 8px; background: var(--accent-soft); color: var(--accent); }

/* ---------- Nav ---------- */

.nav { position: fixed; inset: 0 0 auto; z-index: 50; padding: 12px var(--gutter); pointer-events: none; }
.nav__bar {
  pointer-events: auto;
  max-width: var(--page); margin: 0 auto; height: var(--nav-h);
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px;
  padding: 0 10px 0 22px; border-radius: 999px;
  border: 1px solid transparent;
  transition: background-color .35s var(--ease), border-color .35s var(--ease), box-shadow .35s var(--ease), backdrop-filter .35s;
}
.nav.is-scrolled .nav__bar {
  background: rgba(255, 255, 255, .82); border-color: var(--line);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 10px 30px -18px rgba(40, 20, 120, .25);
}
.logo { justify-self: start; display: inline-flex; align-items: baseline; gap: 6px; text-decoration: none; }
.logo b { font-family: var(--f-display); font-stretch: 125%; font-weight: 800; font-size: 18px; letter-spacing: 0.02em; }
.logo span { font-size: 16px; font-weight: 600; color: var(--muted); }
.nav__links { display: flex; gap: 4px; }
.nav__links a {
  padding: 8px 14px; border-radius: 999px; text-decoration: none;
  font-size: 15px; font-weight: 600; color: var(--muted);
  transition: color .2s, background-color .2s;
}
.nav__links a:hover { color: var(--ink); background: rgba(108, 61, 238, .07); }
.nav__links a[aria-current] { color: var(--accent); }
.nav__end { justify-self: end; display: flex; align-items: center; gap: 8px; }
.nav__toggle { display: none; position: relative; width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 50%; background: #fff; cursor: pointer; }
.nav__toggle span { position: absolute; left: 13px; right: 13px; height: 2px; border-radius: 2px; background: var(--ink); transition: transform .3s var(--ease), top .3s var(--ease); }
.nav__toggle span:first-child { top: 17px; }
.nav__toggle span:last-child { top: 25px; }
.nav.is-open .nav__toggle span:first-child { top: 21px; transform: rotate(45deg); }
.nav.is-open .nav__toggle span:last-child { top: 21px; transform: rotate(-45deg); }

/* ---------- Hero ---------- */

.hero {
  position: relative; overflow: hidden;
  min-height: 100svh; display: grid; place-items: center;
  padding: calc(var(--nav-h) + 72px) var(--gutter) 96px;
}
.hero__grid { position: absolute; inset: 0; pointer-events: none; }
.hero__grid span { position: absolute; border: 1px solid var(--grid); border-radius: 28px; }
.hero__grid::after { /* sfuma la griglia verso il centro e il fondo */
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(ellipse 46% 42% at 50% 52%, #fff 30%, rgba(255,255,255,0) 72%), linear-gradient(to bottom, rgba(255,255,255,0) 70%, #fff);
}
.hero__glow {
  position: absolute; left: 50%; top: 58%; width: min(900px, 120vw); aspect-ratio: 1.6;
  transform: translate(-50%, -50%); pointer-events: none;
  background: radial-gradient(closest-side, rgba(150, 120, 255, .22), rgba(150, 120, 255, 0));
}
.hero__chips { position: absolute; inset: 0; pointer-events: none; }
.chip--float { position: absolute; left: var(--x); top: var(--y); }
.chip--dim { filter: blur(1.5px); opacity: .45; }
html.motion .chip--float { animation: float 6s ease-in-out var(--d) infinite alternate; }
@keyframes float { from { translate: 0 -8px; } to { translate: 0 8px; } }

.hero__inner { position: relative; z-index: 1; text-align: center; display: grid; justify-items: center; gap: 28px; max-width: 980px; }
.hero__title { font-size: clamp(38px, 6.4vw, 88px); line-height: 1.04; }
.hero__verb {
  position: relative; display: block; height: 1.12em; margin: 0 auto;
  color: var(--accent); filter: url(#goo);
  transition: width .9s var(--ease);
}
.hero__verb > span { position: absolute; left: 50%; top: 0; translate: -50% 0; white-space: nowrap; user-select: none; }
.morph__b { opacity: 0; }

/* comparsa: le parole passano da sfocate a nitide */
html.motion .wd { display: inline-block; opacity: 0; filter: blur(12px); transform: translateY(.35em); transition: opacity .9s var(--ease), filter .9s var(--ease), transform .9s var(--ease); transition-delay: calc(var(--i, 0) * 55ms + var(--d0, 0ms)); }
html.motion .is-shown .wd, html.motion .wd.is-shown { opacity: 1; filter: none; transform: none; }
html.motion .hero__in, html.motion .hero__verb { opacity: 0; filter: blur(12px); transform: translateY(14px); transition: opacity 1s var(--ease), filter 1s var(--ease), transform 1s var(--ease), width .9s var(--ease); }
html.motion .hero.is-shown .hero__verb { opacity: 1; filter: url(#goo); transform: none; }
html.motion .hero.is-shown .hero__in { opacity: 1; filter: none; transform: none; transition-delay: .9s; }
html.motion .hero.is-shown .hero__note { transition-delay: 1.1s; }
html.motion .chip--float { opacity: 0; scale: .8; transition: opacity 1s var(--ease), scale 1s var(--ease); }
html.motion .hero.is-shown .chip--float { opacity: 1; scale: 1; transition-delay: calc(1.2s + var(--d)); }
html.motion .hero.is-shown .chip--dim { opacity: .45; }
.hero__line { display: block; }
.hero__sub { max-width: 58ch; font-size: clamp(16px, 1.4vw, 19px); color: var(--muted); }
.hero__note { margin-top: -14px; font-size: 13px; color: var(--soft); }

/* barra "descrivi la tua attività" */
.prompt {
  position: relative; display: flex; align-items: center; gap: 10px;
  width: min(640px, 100%); padding: 8px 8px 8px 16px;
  background: #fff; border: 1px solid var(--line); border-radius: 999px;
  box-shadow: 0 18px 40px -22px rgba(60, 30, 160, .45), 0 2px 6px rgba(20, 10, 60, .04);
  transition: box-shadow .3s var(--ease), border-color .3s var(--ease);
}
.prompt:focus-within { border-color: #cfc1ff; box-shadow: 0 18px 44px -20px rgba(108, 61, 238, .55), 0 0 0 4px rgba(108, 61, 238, .1); }
.prompt__ico { flex: none; width: 22px; height: 22px; fill: none; stroke: var(--accent); stroke-width: 1.7; stroke-linejoin: round; }
.prompt input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; font-size: 16px; color: var(--ink); }
.prompt input::placeholder { color: var(--soft); }
.prompt--dock {
  position: fixed; left: 50%; bottom: 20px; z-index: 40; width: min(560px, calc(100% - 32px));
  transform: translate(-50%, 140%); opacity: 0; transition: transform .5s var(--ease), opacity .4s var(--ease);
}
.prompt--dock.is-on { transform: translate(-50%, 0); opacity: 1; }

/* ---------- Capacità: raggi che diventano un globo (sezione ferma mentre scorri) ---------- */

.globe { position: relative; height: 420svh; }
.globe__stage {
  position: sticky; top: 0; height: 100svh; overflow: hidden;
  display: grid; place-items: center;
}
.globe__canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.globe__chips { position: absolute; inset: 0; pointer-events: none; }
.globe__chips .chip {
  position: absolute; left: 0; top: 0; translate: -50% -50%;
  opacity: 0; filter: blur(8px); scale: .9;
  transition: opacity .6s var(--ease), filter .6s var(--ease), scale .6s var(--ease), box-shadow .6s var(--ease);
}
.globe__chips .chip.is-in { opacity: 1; filter: none; scale: 1; }
.globe__chips .chip.is-glow { box-shadow: 0 0 0 1px color-mix(in srgb, var(--glow) 35%, transparent), 0 10px 34px -6px color-mix(in srgb, var(--glow) 55%, transparent); }
.globe__chips .chip.is-glow .chip__ico { background: color-mix(in srgb, var(--glow) 16%, #fff); color: var(--glow); }
html:not(.motion) .globe { height: auto; }
html:not(.motion) .globe__stage { position: relative; height: 760px; }

/* ---------- Perché noi (card pastello in fila) ---------- */

.why { padding: calc(var(--section) / 2) 0 var(--section); overflow: hidden; }
.why__title { text-align: center; margin-bottom: clamp(40px, 5vw, 72px); }
.rail {
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(280px, 340px); gap: 20px;
  padding: 0 max(var(--gutter), calc((100% - var(--page)) / 2)) 16px;
  overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
}
.rail::-webkit-scrollbar { display: none; }
.tile { scroll-snap-align: start; }
.tile__art {
  position: relative; aspect-ratio: 4 / 5; border-radius: 28px; overflow: hidden;
  display: grid; place-items: center; padding: 22px;
  background: linear-gradient(160deg, var(--t1), var(--t2));
}
.tile--blue { --t1: #dde7ff; --t2: #7ea2ff; --tk: #3b5bdb; }
.tile--mint { --t1: #e2fbf2; --t2: #8ee6c8; --tk: #0f8a6a; }
.tile--yellow { --t1: #fff6da; --t2: #ffd277; --tk: #b7791f; }
.tile--pink { --t1: #fde8f6; --t2: #f6a6dc; --tk: #c2368f; }
.tile__kicker { margin-top: 20px; font-size: 13px; font-weight: 700; color: var(--tk); }
.tile__title { margin-top: 6px; font-size: 22px; line-height: 1.15; }
.tile__text { margin-top: 10px; font-size: 15px; color: var(--muted); }

/* finti schermi dentro le card */
.bubble { max-width: 92%; padding: 11px 14px; border-radius: 18px; font-size: 13.5px; line-height: 1.4; box-shadow: 0 8px 20px -14px rgba(0,0,0,.35); }
.bubble--me { margin-left: auto; background: var(--accent); color: #fff; border-bottom-right-radius: 6px; }
.bubble--them { background: #fff; border-bottom-left-radius: 6px; }
.mock-chat { width: 100%; display: grid; gap: 10px; }
.mock-toggles { width: 100%; background: #fff; border-radius: 18px; padding: 8px 16px; box-shadow: 0 14px 30px -18px rgba(0,0,0,.3); }
.mock-toggles li { display: flex; justify-content: space-between; align-items: center; padding: 11px 0; font-size: 14px; font-weight: 600; }
.mock-toggles li + li { border-top: 1px solid var(--line); }
.sw { position: relative; width: 36px; height: 22px; border-radius: 999px; background: #e3e3ec; transition: background-color .3s; }
.sw::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.2); transition: transform .3s var(--ease); }
.sw.is-on { background: #10b981; }
.sw.is-on::after { transform: translateX(14px); }
.mock-wa { width: 100%; display: grid; gap: 12px; }
.mock-wa__head, .mock-ad__head { display: flex; align-items: center; gap: 10px; background: #fff; border-radius: 16px; padding: 10px 12px; box-shadow: 0 10px 24px -16px rgba(0,0,0,.3); }
.mock-wa__head b, .mock-ad__head b { display: block; font-size: 14px; }
.mock-wa__head small, .mock-ad__head small { font-size: 12px; color: var(--soft); }
.avatar { flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--ink); color: #fff; font-family: var(--f-display); font-stretch: 125%; font-weight: 700; font-size: 14px; }
.mock-consistency { width: 100%; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.mini { position: relative; background: #fff; border-radius: 14px; padding: 8px; box-shadow: 0 10px 24px -16px rgba(0,0,0,.3); }
.mini i { display: block; border-radius: 9px; background: linear-gradient(135deg, #f9a8d4, #c084fc); }
.mini--post i { aspect-ratio: 1; }
.mini--ad i { aspect-ratio: 4/3; }
.mini--ad em { display: block; margin-top: 6px; padding: 5px; border-radius: 7px; background: var(--ink); color: #fff; font-size: 11px; font-style: normal; font-weight: 700; text-align: center; }
.mini--site { grid-column: 1 / -1; display: grid; grid-template-columns: 2fr 1fr; gap: 6px; }
.mini--site i { height: 52px; }
.mini--site i + i { background: #fbcfe8; }

/* ---------- Servizi (schede impilate) ---------- */

.services { padding: var(--section) 0; position: relative; }
.services__title { text-align: center; margin-bottom: clamp(48px, 6vw, 88px); }
.stack { display: grid; gap: 28px; }
.card {
  position: sticky; top: calc(var(--nav-h) + 40px);
  display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: clamp(24px, 4vw, 56px); align-items: center;
  min-height: min(560px, calc(100svh - var(--nav-h) - 80px));
  padding: clamp(24px, 3vw, 40px); padding-left: clamp(28px, 4vw, 56px);
  background: #fff; border-radius: 36px; border: 1px solid rgba(20, 10, 60, .06);
  box-shadow: 0 30px 60px -40px rgba(40, 20, 120, .35);
  transform-origin: 50% 0;
}
.card__copy { display: grid; gap: 18px; justify-items: start; }
.tag {
  display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px 6px 9px; border-radius: 10px;
  background: var(--c-soft); color: var(--c); font-size: 13px; font-weight: 700;
}
.tag svg { width: 17px; height: 17px; }
.card__title { font-size: clamp(26px, 2.8vw, 40px); line-height: 1.1; }
.card__text { color: var(--muted); max-width: 46ch; }
.card__list { display: flex; flex-wrap: wrap; gap: 8px; }
.card__list li { padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); font-size: 13px; font-weight: 600; color: var(--muted); }
.card__art {
  position: relative; align-self: stretch; min-height: 380px;
  display: grid; place-items: center; align-content: center; gap: 18px; padding: 32px;
  border-radius: 26px; overflow: hidden;
  background: radial-gradient(120% 90% at 80% 10%, var(--g2), var(--g1) 55%, #fff 120%);
}
/* indicatore laterale */
.dots { position: fixed; left: max(14px, calc((100vw - var(--page)) / 2 - 36px)); top: 50%; transform: translateY(-50%); z-index: 30; display: grid; gap: 10px; opacity: 0; pointer-events: none; transition: opacity .4s; }
.dots.is-on { opacity: 1; }
.dots li { width: 8px; height: 8px; border-radius: 999px; background: rgba(20, 10, 60, .15); transition: height .4s var(--ease), background-color .4s; }
.dots li.is-active { height: 24px; background: var(--dot, var(--accent)); }

/* finti schermi dei servizi */
.mock-cal, .mock-brand, .mock-ad, .mock-browser { width: min(380px, 100%); background: #fff; border-radius: 20px; box-shadow: 0 24px 50px -30px rgba(20, 10, 60, .45); }
.mock-cal { padding: 18px; }
.mock-cal__head, .mock-brand__row { display: flex; justify-content: space-between; align-items: baseline; font-size: 13px; }
.mock-cal__head span, .mock-brand__row span { color: var(--soft); }
.mock-cal__grid { margin-top: 14px; display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; text-align: center; }
.mock-cal__grid span { font-size: 11px; font-weight: 700; color: var(--soft); }
.mock-cal__grid i { height: 44px; border-radius: 10px; background: #f5f3fb; font-style: normal; font-size: 10px; font-weight: 700; display: grid; place-items: center; }
.ev--reel { background: #ead8ff !important; color: #7e22ce; }
.ev--story { background: #ffe1f1 !important; color: #be185d; }
.ev--post { background: #e0e7ff !important; color: #4338ca; }

.mock-phone { width: 170px; aspect-ratio: 9 / 18; padding: 8px; border-radius: 30px; background: #141418; box-shadow: 0 30px 50px -28px rgba(0,0,0,.6); }
.mock-phone__screen { position: relative; height: 100%; border-radius: 23px; overflow: hidden; background: linear-gradient(170deg, #ffb86b, #f9733a 55%, #7c2d12); display: grid; place-items: center; }
.mock-phone__play { width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.25); backdrop-filter: blur(6px); }
.mock-phone__play svg { width: 22px; height: 22px; fill: #fff; }
.mock-phone__cap { position: absolute; left: 12px; right: 12px; bottom: 18px; padding: 6px 8px; border-radius: 8px; background: rgba(0,0,0,.55); color: #fff; font-size: 11px; font-weight: 700; text-align: center; }
.mock-timeline { width: min(320px, 100%); display: flex; gap: 4px; padding: 8px; border-radius: 14px; background: #fff; box-shadow: 0 14px 30px -20px rgba(0,0,0,.35); }
.mock-timeline i { flex: 0 0 var(--w); height: 26px; border-radius: 7px; background: linear-gradient(90deg, #fdba74, #fb923c); }

.mock-photos { width: min(380px, 100%); display: grid; grid-template-columns: 1.2fr 1fr; grid-template-rows: 130px 110px; gap: 10px; }
.ph { position: relative; border-radius: 18px; display: flex; align-items: flex-end; padding: 10px; font-size: 12px; font-weight: 700; color: #fff; box-shadow: 0 16px 30px -22px rgba(0,0,0,.45); }
.ph--a { grid-row: 1 / 3; background: linear-gradient(160deg, #fcd34d, #d97706 70%, #78350f); }
.ph--b { background: linear-gradient(160deg, #fde68a, #f59e0b); }
.ph--c { background: linear-gradient(160deg, #fef3c7, #fbbf24); color: #78350f; }
.ph--d { display: none; }

.mock-brand { padding: 18px; display: grid; gap: 14px; }
.mock-brand__logo { height: 110px; border-radius: 14px; display: grid; place-items: center; background: #0f172a; color: #99f6e4; font-family: var(--f-display); font-stretch: 125%; font-weight: 800; font-size: 44px; }
.mock-brand__sw { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.mock-brand__sw i { height: 34px; border-radius: 10px; border: 1px solid var(--line); }

.mock-ad { padding: 12px; display: grid; gap: 10px; }
.mock-ad__head { box-shadow: none; padding: 2px; }
.mock-ad__img { aspect-ratio: 16 / 10; border-radius: 14px; background: linear-gradient(150deg, #bfdbfe, #3b82f6 70%, #1e3a8a); }
.mock-ad__foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: 13px; font-weight: 600; }
.mock-ad__foot em { font-style: normal; padding: 7px 14px; border-radius: 999px; background: #2563eb; color: #fff; font-size: 12px; font-weight: 700; }
.mock-target { display: flex; gap: 8px; }
.mock-target span { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 999px; background: #fff; font-size: 13px; font-weight: 700; color: #1d4ed8; box-shadow: 0 10px 22px -16px rgba(0,0,0,.35); }
.mock-target svg { width: 15px; height: 15px; }

.mock-browser { overflow: hidden; }
.mock-browser__bar { display: flex; align-items: center; gap: 6px; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.mock-browser__bar i { width: 9px; height: 9px; border-radius: 50%; background: #e3e3ec; }
.mock-browser__bar span { margin-left: 10px; font-size: 12px; color: var(--soft); }
.mock-browser__body { padding: 22px; display: grid; gap: 10px; justify-items: start; }
.l { display: block; height: 14px; border-radius: 6px; background: #ece8fb; }
.l--title { width: 80%; height: 22px; background: #d9d0fb; }
.l--sub { width: 60%; }
.mock-browser__cta { display: inline-flex; align-items: center; gap: 8px; margin-top: 6px; padding: 9px 14px; border-radius: 999px; background: #22c55e; color: #fff; font-size: 12px; font-weight: 700; }
.mock-browser__cta svg { width: 15px; height: 15px; }
.mock-browser__cols { width: 100%; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 8px; }
.mock-browser__cols i { height: 58px; border-radius: 10px; background: #f3f0fe; }

/* ---------- Per chi ---------- */

.who { padding: var(--section) 0; }
.who__title { text-align: center; max-width: 18ch; margin: 0 auto clamp(48px, 6vw, 80px); }
.who__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.who__item { padding: 32px 28px; border-radius: 28px; background: #fff; border: 1px solid var(--line); box-shadow: 0 24px 50px -40px rgba(40, 20, 120, .3); }
.who__item h3 { font-size: 22px; line-height: 1.15; }
.who__item p { margin-top: 12px; color: var(--muted); font-size: 15px; }

/* dove lavoriamo: due colonne come i numeri del riferimento */
.where { margin-top: clamp(80px, 10vw, 140px); text-align: center; }
.where__title { font-family: var(--f-display); font-stretch: 125%; font-weight: 500; font-size: clamp(24px, 2.6vw, 34px); letter-spacing: -0.02em; }
.where__cols { margin: clamp(32px, 4vw, 56px) auto 0; max-width: 820px; display: grid; grid-template-columns: 1fr 1fr; }
.where__col { padding: 8px 24px; }
.where__col + .where__col { border-left: 1px solid var(--line); }
.where__city { font-family: var(--f-display); font-stretch: 125%; font-weight: 500; font-size: clamp(40px, 5.6vw, 76px); line-height: 1; letter-spacing: -0.03em; color: var(--accent); }
.where__text { margin-top: 14px; color: var(--muted); font-size: 15px; }
html.motion .where__cols .where__col:nth-child(2) { transition-delay: .12s; }

/* ---------- Chiusura e piè di pagina ---------- */

.end { position: relative; }
.end__track { position: relative; height: 240svh; }
.end__stage {
  position: sticky; top: 0; height: 100svh; overflow: hidden; isolation: isolate;
  padding: calc(var(--frame, 0) * 12px);
  background: #c9bcff;
}
.end__stage::before { /* cornice: sfumatura che gira dietro al riquadro */
  content: ""; position: absolute; left: 50%; top: 50%; z-index: -1; width: 160vmax; height: 160vmax;
  translate: -50% -50%;
  background: conic-gradient(from 0deg, #b04db0, #d9b8e8, #a645a8, #c9b3e6, #ddf7f2, #b7f0e6, #b9aef5, #7a6be0, #c7b9f7, #9c7fe8, #b04db0);
  filter: blur(28px) saturate(1.05);
  animation: spin 5s linear infinite;
}
@keyframes spin { to { rotate: 360deg; } }
.end__panel {
  position: relative; height: 100%; overflow: hidden;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px;
  padding: 24px var(--gutter); text-align: center;
  background: #fff; border-radius: calc(var(--frame, 0) * 36px);
}
.end__title { font-size: clamp(40px, 4.4vw, 64px); }
.end__sub { color: var(--muted); font-size: 17px; }
.end .prompt { margin-top: 18px; }
html.motion .ew { display: inline-block; opacity: 0; filter: blur(14px); transform: translateY(.3em); transition: opacity .7s var(--ease), filter .7s var(--ease), transform .7s var(--ease); }
html.motion .ew.is-on { opacity: 1; filter: none; transform: none; }
html.motion .end__sub.ew, html.motion .end .prompt.ew { display: flex; }
html.motion .end__sub.ew { display: block; }
.end__contacts { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 6px; }
html.motion .end__contacts.ew { display: flex; }
.end__contacts a {
  display: inline-flex; align-items: center; gap: 8px; padding: 9px 15px; border-radius: 999px;
  border: 1px solid var(--line); background: #fff; text-decoration: none; font-size: 14px; font-weight: 700; color: var(--muted);
  transition: border-color .2s, color .2s;
}
.end__contacts a:hover { border-color: #cfc1ff; color: var(--accent); }
.end__contacts svg { width: 18px; height: 18px; }
.nav.is-hidden { transform: translateY(-120%); }
.nav { transition: transform .5s var(--ease); }
html:not(.motion) .end__track { height: auto; }
html:not(.motion) .end__stage { position: relative; height: auto; min-height: 100svh; --frame: 1; }

.footer {
  position: relative; z-index: 1;
  max-width: none; margin: 0; padding: 22px max(var(--gutter), calc((100% - var(--page)) / 2)) 26px;
  background: #fff;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 28px;
  font-size: 14px; color: var(--muted);
}
.footer nav { display: flex; gap: 20px; }
.footer nav a { text-decoration: none; }
.footer nav a:hover { color: var(--ink); }

/* ---------- Comparsa allo scorrimento ---------- */

html.motion [data-reveal] { opacity: 0; transform: translateY(28px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
html.motion [data-reveal].is-in { opacity: 1; transform: none; }
html.motion .rail .tile:nth-child(2) { transition-delay: .08s; }
html.motion .rail .tile:nth-child(3) { transition-delay: .16s; }
html.motion .rail .tile:nth-child(4) { transition-delay: .24s; }
html.motion .who__grid .who__item:nth-child(2) { transition-delay: .1s; }
html.motion .who__grid .who__item:nth-child(3) { transition-delay: .2s; }

/* ---------- Pagine legali ---------- */

.legal-page .nav { position: sticky; }
.legal-page .nav__bar { background: #fff; border-color: var(--line); grid-template-columns: 1fr auto; }
.legal { padding-top: clamp(48px, 7vw, 96px); padding-bottom: var(--section); max-width: calc(760px + var(--gutter) * 2); }
.legal .display { margin-bottom: 14px; }
.legal__updated { font-size: 13px; font-weight: 700; color: var(--soft); margin-bottom: 44px; }
.legal h2 { margin: 44px 0 12px; font-family: var(--f-display); font-stretch: 125%; font-weight: 600; font-size: 22px; letter-spacing: -0.02em; }
.legal h3 { margin: 22px 0 8px; font-size: 17px; font-weight: 700; }
.legal p, .legal li { color: var(--muted); line-height: 1.65; }
.legal p + p { margin-top: 12px; }
.legal ul { margin-top: 12px; display: grid; gap: 10px; padding-left: 20px; list-style: disc; }
.legal strong { color: var(--ink); }
.legal a { color: var(--accent); font-weight: 600; }
.legal-foot { padding-top: 24px; padding-bottom: 32px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; font-size: 14px; color: var(--muted); }
.legal-foot nav { display: flex; gap: 20px; }

/* ---------- Telefono e tablet ---------- */

@media (max-width: 960px) {
  .card { position: relative; top: auto; grid-template-columns: 1fr; min-height: 0; }
  .card__art { min-height: 300px; }
  .dots { display: none; }
  .who__grid { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  :root { --nav-h: 58px; }
  .nav { padding: 8px var(--gutter); }
  .nav__bar { grid-template-columns: 1fr auto; padding: 0 7px 0 18px; background: rgba(255,255,255,.9); border-color: var(--line); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
  .nav__toggle { display: block; }
  .nav__links {
    position: absolute; left: var(--gutter); right: var(--gutter); top: calc(var(--nav-h) + 16px);
    display: grid; gap: 2px; padding: 10px; border-radius: 24px; background: #fff; border: 1px solid var(--line);
    box-shadow: 0 24px 50px -30px rgba(40, 20, 120, .4);
    visibility: hidden; opacity: 0; transform: translateY(-8px);
    transition: opacity .25s var(--ease), transform .25s var(--ease), visibility 0s .25s;
  }
  .nav.is-open .nav__links { visibility: visible; opacity: 1; transform: none; transition-delay: 0s; }
  .nav__links a { padding: 14px 16px; font-size: 17px; color: var(--ink); }
  .hero { padding-top: calc(var(--nav-h) + 56px); }
  .hero__grid { opacity: .55; }
  .hero__chips .chip--float:nth-child(n+4) { display: none; }
  .chip--float { scale: .85; }
  .hero__chips li:nth-child(1) { --x: 4% !important; --y: 12% !important; }
  .hero__chips li:nth-child(2) { --x: 62% !important; --y: 10% !important; }
  .hero__chips li:nth-child(3) { --x: 8% !important; --y: 88% !important; }
  .prompt { padding-left: 14px; }
  .prompt input { font-size: 15px; }
  .rail { grid-auto-columns: 78%; }
  .footer { justify-content: center; text-align: center; }
  .where__col { padding: 8px 12px; }
  .globe__chips .chip { font-size: 12px; padding: 5px 11px 5px 5px; gap: 7px; }
  .globe__chips .chip__ico { width: 22px; height: 22px; padding: 4px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; }
}
