/* ═══════════════ CSR ADVICE — Deep Signal ═══════════════ */
:root {
  --bg: #050B14;
  --bg-raise: #0A1522;
  --bg-glass: rgba(10, 21, 34, .72);
  --ink: #E9F1F8;
  --ink-soft: #C6D4E2;
  --muted: #8FA5B8;
  --blue: #2E86E0;
  --blue-light: #5FA8ED;
  --teal: #1FC2D2;
  --glow: #63D8E6;
  --btn-ink: #041018;
  --hair: rgba(233, 241, 248, .10);
  --hair-strong: rgba(233, 241, 248, .22);
  --ok: #4ADE80;
  --err: #FF7A6E;
  --grad: linear-gradient(120deg, #2E86E0, #1FC2D2);
  --ease: cubic-bezier(.22, 1, .36, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', 'Inter Fallback', 'Segoe UI', sans-serif;
  font-weight: 400;
  background: var(--bg);
  color: var(--ink);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  line-height: 1.65;
}

h1, h2, h3, h4, .btn, .nav-links a, .oc-links a, .step-n, .number .n, .marquee-track {
  font-family: 'Space Grotesk', 'Space Grotesk Fallback', 'Arial', sans-serif;
}

::selection { background: var(--teal); color: var(--btn-ink); }

/* canvas 3D fisso dietro tutto */
#scene {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  pointer-events: none;
}

/* grana leggerissima */
.grain {
  position: fixed;
  inset: -50%;
  z-index: 2;
  pointer-events: none;
  opacity: .05;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 8s steps(10) infinite;
  mix-blend-mode: screen;
}
@keyframes grain {
  0%, 100% { transform: translate(0, 0); }
  20% { transform: translate(-3%, 2%); }
  40% { transform: translate(2%, -3%); }
  60% { transform: translate(-2%, -2%); }
  80% { transform: translate(3%, 3%); }
}

/* barra progresso */
.progress { position: fixed; top: 0; left: 0; right: 0; height: 2px; z-index: 60; }
.progress-bar { height: 100%; width: 0; background: var(--grad); transition: width .1s linear; }

/* skip link */
.skip-link {
  position: fixed; top: -60px; left: 16px; z-index: 80;
  background: var(--teal); color: var(--btn-ink);
  padding: 12px 20px; border-radius: 0 0 4px 4px;
  text-decoration: none; font-size: 13px; font-weight: 700;
  transition: top .2s;
}
.skip-link:focus { top: 0; }

:focus-visible { outline: 2px solid var(--teal); outline-offset: 3px; }

/* ═══════════════ NAV ═══════════════ */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px clamp(24px, 5vw, 72px);
  background: linear-gradient(rgba(5, 11, 20, .92), rgba(5, 11, 20, 0));
  transition: padding .4s var(--ease), background .4s, box-shadow .4s;
}
section[id] { scroll-margin-top: 84px; }
.nav.scrolled {
  padding: 12px clamp(24px, 5vw, 72px);
  background: var(--bg-glass);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 1px 0 var(--hair);
}
.nav-logo { display: inline-flex; align-items: center; text-decoration: none; }
.nav-logo svg, .nav-logo img { height: 40px; width: auto; display: block; }
@media (max-width: 640px) { .nav-logo svg, .nav-logo img { height: 48px; } }

/* dropdown servizi (desktop) */
.nav-item-drop { position: relative; }
.nav-item-drop > a::before { content: ""; position: absolute; left: 0; right: 0; top: 100%; height: 22px; }
.nav-drop {
  position: absolute; top: calc(100% + 14px); left: 50%; transform: translateX(-50%) translateY(6px);
  min-width: 250px;
  background: var(--bg-glass);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--hair-strong); border-radius: 14px;
  padding: 10px;
  display: flex; flex-direction: column;
  opacity: 0; visibility: hidden;
  transition: opacity .28s var(--ease), transform .28s var(--ease), visibility .28s;
  box-shadow: 0 30px 70px -30px rgba(0, 0, 0, .8);
}
.nav-item-drop:hover .nav-drop,
.nav-item-drop:focus-within .nav-drop { opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0); }
.nav-drop a {
  display: block; padding: 9px 14px; border-radius: 8px;
  font-size: 13.5px; font-weight: 500; color: var(--ink); text-decoration: none;
  transition: background .2s, color .2s;
}
.nav-drop a::after { display: none !important; }
.nav-drop a:hover { background: var(--bg-raise); color: var(--glow); }
.nav-drop .nd-all { border-top: 1px solid var(--hair); margin-top: 6px; padding-top: 12px; color: var(--glow); font-weight: 700; }
.drop-caret { display: inline-block; margin-left: 5px; font-size: 9px; transform: translateY(-1px); transition: transform .25s; }
.nav-item-drop:hover .drop-caret { transform: translateY(-1px) rotate(180deg); }
.nav-links { display: flex; align-items: center; gap: clamp(12px, 2vw, 30px); }
.nav-links a {
  color: var(--ink);
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 500;
  letter-spacing: .05em;
  position: relative;
}
.nav-links a:not(.nav-cta)::after {
  content: "";
  position: absolute;
  left: 0; bottom: -5px;
  width: 100%; height: 2px;
  background: var(--grad);
  border-radius: 2px;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform .45s var(--ease);
}
.nav-links a:not(.nav-cta):hover::after,
.nav-links a.active:not(.nav-cta)::after { transform: scaleX(1); transform-origin: left; }
.nav-cta {
  border: 1px solid var(--teal);
  padding: 10px 22px;
  border-radius: 999px;
  transition: background .3s, color .3s, border-color .3s;
}
.nav-cta:hover { background: var(--grad); color: var(--btn-ink) !important; border-color: transparent; }

@media (max-width: 1120px) {
  .nav-links a:not(.nav-cta) { display: none; }
}
@media (max-width: 640px) {
  .nav-links .nav-cta { display: none; }
}

/* burger */
.burger {
  display: none;
  width: 44px; height: 44px;
  background: none; border: 0; cursor: pointer;
  position: relative; z-index: 57;
  margin-left: 18px;
}
.burger span {
  display: block; width: 26px; height: 2px; background: var(--ink);
  margin: 6px auto; transition: transform .35s var(--ease), opacity .3s;
}
.burger.x span:nth-child(1) { transform: translateY(4px) rotate(45deg); }
.burger.x span:nth-child(2) { transform: translateY(-4px) rotate(-45deg); }
@media (max-width: 1120px) { .burger { display: block; } }

/* offcanvas */
.offcanvas {
  position: fixed; inset: 0; z-index: 55;
  background: var(--bg);
  display: flex; flex-direction: column; justify-content: center;
  padding: 0 clamp(28px, 9vw, 80px);
  opacity: 0; visibility: hidden; transform: translateY(-2%);
  transition: opacity .35s var(--ease), transform .35s var(--ease), visibility .35s;
  overflow-y: auto;
}
.offcanvas.open { opacity: 1; visibility: visible; transform: none; }
.offcanvas.instant { transition: none; }
.oc-logo { position: absolute; top: 22px; left: clamp(24px, 5vw, 72px); }
.oc-logo svg, .oc-logo img { height: 40px; width: auto; display: block; }
.oc-close {
  position: absolute; top: 20px; right: 20px;
  width: 54px; height: 54px;
  background: none; border: 1px solid var(--hair-strong); border-radius: 999px;
  font-size: 34px; line-height: 1; color: var(--ink);
  cursor: pointer; display: grid; place-items: center;
  transition: background .3s, color .3s, transform .35s var(--ease);
}
.oc-close:hover { background: var(--teal); color: var(--btn-ink); transform: rotate(90deg); }
.oc-links { display: flex; flex-direction: column; gap: 2px; padding: 88px 0 4px; }
.oc-links a {
  color: var(--ink); text-decoration: none;
  font-weight: 700; font-size: clamp(24px, 5.6vw, 40px); line-height: 1.32;
  opacity: 0; transform: translateY(14px);
  transition: opacity .4s var(--ease), transform .4s var(--ease), color .3s;
}
.oc-links a:hover { color: var(--glow); }
.offcanvas.open .oc-links a { opacity: 1; transform: none; }
.offcanvas.open .oc-links a:nth-child(1) { transition-delay: .05s; }
.offcanvas.open .oc-links a:nth-child(2) { transition-delay: .1s; }
.offcanvas.open .oc-links a:nth-child(3) { transition-delay: .15s; }
.offcanvas.open .oc-links a:nth-child(4) { transition-delay: .2s; }
.offcanvas.open .oc-links a:nth-child(5) { transition-delay: .25s; }
.offcanvas.open .oc-links a:nth-child(6) { transition-delay: .3s; }
.offcanvas.open .oc-links a:nth-child(7) { transition-delay: .35s; }
.offcanvas.open .oc-links a:nth-child(8) { transition-delay: .4s; }
.oc-sub {
  display: flex; flex-wrap: wrap; gap: 4px 16px;
  padding: 10px 0 0 2px; margin: 0 0 6px;
  opacity: 0; transition: opacity .45s var(--ease) .3s;
}
.offcanvas.open .oc-sub { opacity: 1; }
.oc-sub a {
  color: var(--muted); text-decoration: none;
  font-size: 13.5px; font-weight: 500; line-height: 1.9;
  transition: color .2s;
}
.oc-sub a:hover { color: var(--glow); }
.oc-contact {
  margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--hair);
  display: flex; flex-direction: column; gap: 9px;
  opacity: 0; transition: opacity .45s var(--ease) .38s;
}
.offcanvas.open .oc-contact { opacity: 1; }
.oc-contact a {
  color: var(--ink-soft); text-decoration: none; font-size: 14.5px; font-weight: 600;
  display: inline-flex; align-items: center; gap: 11px; width: fit-content;
}
.oc-contact a:hover { color: var(--glow); }
.oc-contact svg { width: 17px; height: 17px; flex: none; stroke: var(--teal); }
.oc-socials {
  display: flex; gap: 12px; margin: 18px 0 34px;
  opacity: 0; transition: opacity .45s var(--ease) .45s;
}
.offcanvas.open .oc-socials { opacity: 1; }
.oc-socials a { display: grid; place-items: center; width: 42px; height: 42px; border: 1px solid var(--hair-strong); border-radius: 999px; transition: border-color .3s, background .3s; }
.oc-socials a:hover { border-color: var(--teal); background: var(--bg-raise); }
.oc-socials svg { width: 17px; height: 17px; stroke: var(--ink); }
@media (max-height: 700px) {
  .oc-links a { font-size: 21px; line-height: 1.45; }
  .oc-links { padding-top: 78px; }
}

/* ═══════════════ LAYOUT ═══════════════ */
main { position: relative; z-index: 3; }

.hero {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(100px, 14vh, 150px) clamp(24px, 7vw, 110px) 0;
  position: relative;
}
.hero-kicker {
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: .32em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 26px;
}
.hero-title {
  font-weight: 700;
  font-size: clamp(48px, 10.5vw, 144px);
  line-height: .98;
  letter-spacing: -.015em;
}
.hero-title .line { display: block; }
.hero-title .line em { font-style: normal; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-sub {
  max-width: 580px;
  margin-top: 32px;
  font-size: clamp(15px, 1.35vw, 18px);
  color: var(--ink-soft);
}
.hero-cta { display: flex; gap: 16px; margin-top: 40px; flex-wrap: wrap; }

.btn {
  display: inline-block;
  background: var(--grad);
  color: var(--btn-ink);
  text-decoration: none;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: .04em;
  padding: 16px 34px;
  border-radius: 999px;
  border: 0;
  cursor: pointer;
  transition: transform .35s var(--ease), box-shadow .35s, opacity .3s;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 14px 40px -12px rgba(31, 194, 210, .5); }
.btn:disabled { opacity: .45; cursor: default; transform: none; box-shadow: none; }
.btn-ghost { background: transparent; color: var(--ink); border: 1px solid var(--hair-strong); }
.btn-ghost:hover { border-color: var(--teal); color: var(--glow); box-shadow: none; }
.btn-big { font-size: 16px; padding: 20px 46px; margin-top: 44px; }

.hero-scroll {
  margin-top: clamp(44px, 8vh, 90px);
  padding-bottom: 28px;
  font-size: 11px;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 12px;
}
.hero-scroll span {
  display: block;
  width: 1px; height: 44px;
  background: var(--teal);
  transform-origin: top;
  animation: scrollline 1.8s var(--ease) infinite;
}
@keyframes scrollline {
  0% { transform: scaleY(0); transform-origin: top; }
  45% { transform: scaleY(1); transform-origin: top; }
  55% { transform: scaleY(1); transform-origin: bottom; }
  100% { transform: scaleY(0); transform-origin: bottom; }
}

/* sezioni */
.section {
  position: relative;
  padding: clamp(96px, 15vh, 180px) clamp(24px, 7vw, 110px);
  max-width: 1500px;
  margin: 0 auto;
}
.section-tight { padding-top: 30px; }
.eyebrow {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .32em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 24px;
}
.section h2 {
  font-weight: 700;
  font-size: clamp(32px, 5vw, 70px);
  line-height: 1.05;
  letter-spacing: -.015em;
  max-width: 1050px;
}
.section h2 em { font-style: normal; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lead {
  max-width: 660px;
  margin-top: 28px;
  font-size: clamp(15px, 1.3vw, 17.5px);
  color: var(--ink-soft);
}
.lead a { color: var(--glow); }
.wrap { max-width: 1280px; margin: 0 auto; }
.prose { max-width: 70ch; }
.prose p + p { margin-top: 1.2em; }
.more-link { color: var(--glow); font-weight: 700; text-decoration: none; }
.more-link:hover { text-decoration: underline; }

/* ═══════════════ PILLARS (valori/perché) ═══════════════ */
.pillars {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--hair);
  border: 1px solid var(--hair);
  margin-top: 64px;
}
@media (max-width: 1120px) { .pillars { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .pillars { grid-template-columns: 1fr; } }
.pillar {
  background: var(--bg);
  padding: 42px 34px 50px;
  position: relative;
  overflow: hidden;
}
.pillar::before {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 3px;
  background: var(--grad);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .5s var(--ease);
}
.pillar:hover::before { transform: scaleX(1); }
.pillar h3 { font-weight: 700; font-size: 20px; margin-bottom: 14px; letter-spacing: -.01em; }
.pillar p { font-size: 14.5px; color: var(--ink-soft); }

/* ═══════════════ STEPS (metodo) ═══════════════ */
.steps {
  list-style: none;
  margin-top: 64px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(28px, 3vw, 48px) clamp(28px, 4vw, 64px);
}
.steps.g2 { grid-template-columns: repeat(2, 1fr); max-width: 900px; }
@media (max-width: 880px) { .steps, .steps.g2 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .steps, .steps.g2 { grid-template-columns: 1fr; } }
.step { border-top: 1px solid var(--hair-strong); padding-top: 24px; }
.step-n {
  font-weight: 700;
  font-size: clamp(42px, 4.2vw, 60px);
  line-height: 1;
  display: block;
  margin-bottom: 12px;
  -webkit-text-stroke: 1.4px var(--teal);
  -webkit-text-fill-color: transparent;
  transition: -webkit-text-fill-color .4s;
}
.step:hover .step-n { -webkit-text-fill-color: var(--teal); }
.step h3 { font-weight: 700; font-size: 19px; margin-bottom: 9px; }
.step p { font-size: 14.5px; color: var(--ink-soft); }

/* ═══════════════ SERVIZI (griglia card, righe sempre piene) ═══════════════ */
/* griglia a 6 colonne: card base = span 2 (3 per riga); il build assegna
   .w3 (2 per riga) o .w6 alle card giuste così nessuna riga resta orfana
   e non compaiono celle vuote (il fondo hair si vedrebbe come box fantasma) */
.services {
  margin-top: 64px;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 1px;
  background: var(--hair);
  border: 1px solid var(--hair);
}
.service {
  grid-column: span 2;
  background: var(--bg);
  color: var(--ink);
  text-decoration: none;
  padding: 40px 32px 54px;
  position: relative;
  transition: background .45s var(--ease), box-shadow .45s var(--ease);
}
.service.w3 { grid-column: span 3; }
.service.w6 { grid-column: span 6; }
@media (max-width: 1120px) {
  .services { grid-template-columns: repeat(2, 1fr); }
  .service, .service.w3, .service.w6 { grid-column: span 1; }
  .service.odd1 { grid-column: span 2; }
}
@media (max-width: 640px) {
  .services { grid-template-columns: 1fr; }
  .service, .service.w3, .service.w6, .service.odd1 { grid-column: auto; }
}
.service h3 { font-weight: 700; font-size: 19px; margin-bottom: 12px; letter-spacing: -.01em; }
.service p { font-size: 14px; color: var(--ink-soft); }
.service .arrow {
  position: absolute;
  right: 28px; bottom: 22px;
  font-size: 22px;
  color: var(--glow);
  transform: translateX(-8px);
  opacity: 0;
  transition: transform .4s var(--ease), opacity .4s;
}
.service:hover { background: var(--bg-raise); box-shadow: inset 0 0 0 1px var(--teal); }
.service:hover .arrow { transform: translateX(0); opacity: 1; }

/* ═══════════════ NUMERI ═══════════════ */
.numbers {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 34px;
  max-width: 1280px; margin: 0 auto;
}
.number .n {
  font-weight: 700; font-size: clamp(42px, 5.6vw, 78px); line-height: 1;
  letter-spacing: -.02em; display: flex; align-items: baseline; gap: 4px;
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.number .n small { font-size: .45em; font-weight: 700; }
.number p { margin-top: 10px; color: var(--muted); font-size: 14px; max-width: 26ch; }

/* ═══════════════ MARQUEE ═══════════════ */
.marquee {
  overflow: hidden; white-space: nowrap;
  border-top: 1px solid var(--hair); border-bottom: 1px solid var(--hair);
  padding: 24px 0; position: relative; z-index: 3;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.marquee-track {
  display: inline-flex;
  white-space: nowrap;
  will-change: transform;
  animation: marquee var(--mq-speed, 26s) linear infinite;
  font-weight: 700; font-size: clamp(22px, 3vw, 38px); letter-spacing: .02em;
}
.mq-seg { display: inline-block; flex: none; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-track em { font-style: normal; color: transparent; -webkit-text-stroke: 1px var(--teal); }
@keyframes marquee { to { transform: translate3d(-50%, 0, 0); } }
@media (max-width: 640px) { .marquee-track { --mq-speed: 17s; } }

/* ═══════════════ CARD PORTFOLIO / CASE ═══════════════ */
.case-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 24px; max-width: 1380px; margin: 46px auto 0; }
.case-grid .case { grid-column: span 2; }
.case-grid .case.w3 { grid-column: span 3; }
.case-grid .case.w6 { grid-column: span 6; }
.case {
  border: 1px solid var(--hair); background: var(--bg-raise);
  text-decoration: none; color: var(--ink);
  display: flex; flex-direction: column;
  overflow: hidden; border-radius: 10px;
  transition: transform .35s var(--ease), box-shadow .35s var(--ease), border-color .35s;
}
.case:hover { transform: translateY(-4px); border-color: var(--teal); box-shadow: 0 30px 60px -34px rgba(31, 194, 210, .35); }
.case .cs-media { aspect-ratio: 16 / 10; position: relative; overflow: hidden; background: #0E1B2C; }
.case .cs-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease); }
.case:hover .cs-media img { transform: scale(1.04); }
.case .cs-body { padding: 22px 24px 26px; display: flex; flex-direction: column; gap: 8px; }
.case .eyebrow { margin: 0; font-size: 11px; }
.case h3 { font-size: 19px; font-weight: 700; }
.case p { font-size: 13.5px; color: var(--ink-soft); }

/* frame browser (dettaglio caso) */
.case-shot-link { display: block; text-decoration: none; color: inherit; }
.case-shot {
  max-width: 1380px; margin: 46px auto 0;
  border: 1px solid var(--hair); border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 30px 70px -40px rgba(0, 0, 0, .8);
  background: var(--bg-raise);
  transition: transform .4s var(--ease), box-shadow .4s;
}
.case-shot-link:hover .case-shot { transform: translateY(-4px); box-shadow: 0 44px 90px -44px rgba(31, 194, 210, .3); }
.case-shot-link:hover .cs-bar span::after { content: "  →  apri il sito"; }
.case-shot .cs-bar { display: flex; align-items: center; gap: 6px; padding: 11px 16px; border-bottom: 1px solid var(--hair); }
.case-shot .cs-bar i { width: 10px; height: 10px; border-radius: 50%; background: var(--hair-strong); display: block; }
.case-shot .cs-bar span { margin-left: 10px; font-size: 11.5px; letter-spacing: .08em; color: var(--muted); }
.case-shot img { width: 100%; display: block; }
.case-shot figcaption { padding: 12px 16px; font-size: 11.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); border-top: 1px solid var(--hair); }

/* chips filtri */
.chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 34px; }
.chip {
  border: 1px solid var(--hair-strong); border-radius: 999px;
  padding: 8px 18px; font-size: 13px; font-weight: 500; letter-spacing: .04em;
  color: var(--ink); text-decoration: none; background: none; cursor: pointer;
  font-family: inherit;
  transition: background .3s, color .3s, border-color .3s;
}
.chip:hover { border-color: var(--teal); color: var(--glow); }
.chip.on, .chip[aria-pressed="true"] { background: var(--grad); color: var(--btn-ink); border-color: transparent; }

/* ═══════════════ PSR + MOVES ═══════════════ */
.psr { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; max-width: 1280px; margin: 40px auto 0; }
.psr article { border-top: 2px solid var(--teal); padding-top: 22px; }
.psr h3 { font-size: 14px; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; margin-bottom: 13px; }
.psr p { font-size: 15.5px; line-height: 1.65; color: var(--ink-soft); }

.moves { display: grid; grid-template-columns: repeat(6, 1fr); gap: 30px; max-width: 1280px; margin: 40px auto 0; counter-reset: move; }
.move { grid-column: span 2; border-top: 1px solid var(--hair); padding-top: 18px; }
.move.w3 { grid-column: span 3; }
.move.w6 { grid-column: span 6; }
.moves.mono { grid-template-columns: 1fr; }
.moves.mono .move { grid-column: auto; }
@media (max-width: 880px) {
  .moves { grid-template-columns: repeat(2, 1fr); }
  .move, .move.w3, .move.w6 { grid-column: span 1; }
  .move.odd1 { grid-column: span 2; }
}
@media (max-width: 560px) {
  .moves { grid-template-columns: 1fr; }
  .move, .move.w3, .move.w6, .move.odd1 { grid-column: auto; }
}
.move h3 { font-size: 16.5px; font-weight: 700; margin-bottom: 8px; }
.move h3::before { counter-increment: move; content: counter(move, decimal-leading-zero) " \2014  "; font-weight: 700; color: var(--teal); }
.move p { font-size: 14.5px; color: var(--ink-soft); }

/* ═══════════════ QUOTE + CTA BAND ═══════════════ */
.quote {
  text-align: center; max-width: 900px; margin: 0 auto;
  font-size: clamp(24px, 3.4vw, 44px); font-weight: 700; line-height: 1.3; letter-spacing: -.01em;
  font-family: 'Space Grotesk', sans-serif;
}
.quote::before { content: "\201C"; display: block; font-size: 2em; font-weight: 700; line-height: .6; margin-bottom: 18px; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.quote-src { margin-top: 22px; font-size: 12px; letter-spacing: .3em; text-transform: uppercase; color: var(--muted); text-align: center; }

.cta-band {
  text-align: center;
  padding: clamp(90px, 14vh, 150px) clamp(24px, 7vw, 110px);
  border-top: 1px solid var(--hair);
  position: relative; z-index: 3;
}
.cta-band h2 { font-size: clamp(30px, 4.6vw, 58px); font-weight: 700; letter-spacing: -.015em; max-width: 24ch; margin: 0 auto; }
.cta-band .lead { margin-left: auto; margin-right: auto; }
.cta-band .btn { margin-top: 38px; }

/* ═══════════════ PAGE HERO + BREADCRUMB ═══════════════ */
.page-hero { padding: clamp(140px, 20vh, 210px) clamp(24px, 7vw, 110px) clamp(46px, 8vh, 84px); position: relative; }
.page-hero h1 {
  font-weight: 700;
  font-size: clamp(42px, 7vw, 90px);
  line-height: 1.02;
  letter-spacing: -.015em;
  max-width: 16ch;
}
.page-hero h1 em { font-style: normal; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.page-hero .lead { margin-top: 24px; }

.crumbs {
  display: flex; flex-wrap: wrap; gap: 8px;
  font-size: 12px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 28px;
}
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--glow); }
.crumbs span[aria-hidden] { opacity: .5; }

/* ═══════════════ ACCORDION FAQ ═══════════════ */
.acc { max-width: 860px; margin: 30px auto 0; }
.acc-item { border-bottom: 1px solid var(--hair); }
.acc-q {
  width: 100%; text-align: left; background: none; border: 0; cursor: pointer;
  font-family: 'Space Grotesk', sans-serif; font-size: clamp(17px, 1.8vw, 21px); font-weight: 700; color: var(--ink);
  padding: 24px 44px 24px 0; position: relative;
}
.acc-q::after {
  content: "+"; position: absolute; right: 4px; top: 50%;
  transform: translateY(-50%); font-size: 26px; font-weight: 400; color: var(--teal);
  transition: transform .3s var(--ease);
}
.acc-item.open .acc-q::after { transform: translateY(-50%) rotate(45deg); }
.acc-a { max-height: 0; overflow: hidden; transition: max-height .35s var(--ease); }
.acc-a p { padding: 0 0 24px; color: var(--ink-soft); font-size: 15.5px; line-height: 1.7; max-width: 64ch; }

/* ═══════════════ FORM ═══════════════ */
.cform { max-width: 760px; margin: 26px 0 0; }
.cform fieldset { border: 0; margin: 0 0 32px; padding: 0; }
.cform legend { font-size: 12px; font-weight: 700; letter-spacing: .26em; text-transform: uppercase; color: var(--muted); margin-bottom: 16px; }
.cform .frow { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.cform .frow + .frow { margin-top: 18px; }
.cform label { display: block; font-size: 13px; font-weight: 700; margin-bottom: 7px; }
.cform label .opt { font-weight: 400; color: var(--muted); }
.cform input[type="text"], .cform input[type="email"], .cform input[type="tel"],
.cform input[type="url"], .cform select, .cform textarea {
  width: 100%;
  font-family: inherit; font-size: 15px; color: var(--ink);
  background: var(--bg-raise);
  border: 1px solid var(--hair-strong); border-radius: 14px;
  padding: 13px 18px;
  transition: border-color .25s, box-shadow .25s;
}
.cform input::placeholder, .cform textarea::placeholder { color: var(--muted); }
.cform input:focus, .cform select:focus, .cform textarea:focus {
  outline: none; border-color: var(--teal); box-shadow: 0 0 0 1.5px var(--teal);
}
.cform textarea { min-height: 130px; resize: vertical; border-radius: 18px; }
.cform select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%2363D8E6' fill='none' stroke-width='1.6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 40px; }
.cform select option { background: var(--bg-raise); color: var(--ink); }
.svc-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.svc-check { position: relative; }
.svc-check input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.svc-check span {
  display: block; padding: 11px 16px;
  border: 1px solid var(--hair-strong); border-radius: 999px;
  font-size: 13.5px; font-weight: 500; text-align: center; color: var(--ink);
  transition: background .25s, color .25s, border-color .25s;
}
.svc-check input:checked + span { background: var(--grad); color: var(--btn-ink); border-color: transparent; }
.svc-check input:focus-visible + span { outline: 2px solid var(--teal); outline-offset: 2px; }
.cform .consent { display: flex; gap: 12px; align-items: flex-start; font-size: 13px; color: var(--ink-soft); }
.cform .consent input { width: 18px; height: 18px; margin-top: 1px; flex: none; accent-color: #1FC2D2; }
.cform .consent a { color: var(--glow); }
.cform .field-err { display: none; color: var(--err); font-size: 12.5px; margin-top: 6px; }
.cform .invalid input, .cform .invalid select, .cform .invalid textarea { border-color: var(--err); }
.cform .invalid .field-err { display: block; }
.cform .btn-big { margin-top: 8px; }
.form-note { margin-top: 18px; font-size: 13px; color: var(--muted); max-width: 56ch; }
.hp-field { position: absolute; left: -9999px; opacity: 0; height: 0; overflow: hidden; }
@media (max-width: 640px) {
  .cform .frow { grid-template-columns: 1fr; }
  .svc-grid { grid-template-columns: 1fr; }
}

/* ═══════════════ CONTATTI ═══════════════ */
.contact-emails { margin-top: 40px; display: flex; flex-direction: column; gap: 4px; }
.contact-email {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: clamp(22px, 4vw, 50px);
  letter-spacing: -.015em;
  color: var(--ink);
  text-decoration: none;
  width: fit-content;
  position: relative;
  line-height: 1.35;
  padding: 6px 0;
}
.contact-email::after {
  content: "";
  position: absolute;
  left: 0; bottom: 4px;
  width: 100%; height: clamp(2px, .3vw, 4px);
  background: var(--grad);
  border-radius: 3px;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform .55s var(--ease);
}
.contact-email:hover::after { transform: scaleX(1); transform-origin: left; }
.nap { margin-top: 34px; display: flex; flex-direction: column; gap: 12px; font-size: 15.5px; }
.nap a { color: var(--ink-soft); text-decoration: none; display: inline-flex; align-items: center; gap: 12px; width: fit-content; transition: color .25s; }
.nap a:hover { color: var(--glow); }
.nap svg { width: 19px; height: 19px; flex: none; stroke: var(--teal); }

/* ═══════════════ BLOG ═══════════════ */
.blog-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: clamp(34px, 4vw, 64px);
  max-width: 1280px;
  margin: 0 auto;
  align-items: start;
}
.blog-side { position: sticky; top: 96px; display: flex; flex-direction: column; gap: 24px; }

.post-card {
  display: grid; grid-template-columns: 210px 1fr; gap: 24px;
  border: 1px solid var(--hair); background: var(--bg-raise);
  text-decoration: none; color: var(--ink);
  padding: 20px; align-items: center; border-radius: 10px;
  transition: transform .35s var(--ease), border-color .35s, box-shadow .35s;
}
.post-card + .post-card { margin-top: 18px; }
.post-card:hover { transform: translateY(-3px); border-color: var(--teal); box-shadow: 0 22px 44px -28px rgba(31, 194, 210, .3); }
.pc-media { position: relative; aspect-ratio: 4 / 3; overflow: hidden; border-radius: 6px; background: #0E1B2C; }
.pc-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.post-card .pc-meta { font-size: 11.5px; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); margin-bottom: 9px; }
.post-card h3 { font-size: clamp(17px, 1.9vw, 21px); font-weight: 700; line-height: 1.3; }
.post-card p { margin-top: 9px; font-size: 14px; color: var(--ink-soft); line-height: 1.55; }
.post-card .pc-read { margin-top: 11px; font-size: 13px; font-weight: 700; color: var(--glow); }

.widget { border: 1px solid var(--hair); background: var(--bg-raise); padding: 24px; border-radius: 10px; }
.widget .wtitle { font-size: 11.5px; font-weight: 700; letter-spacing: .26em; text-transform: uppercase; margin-bottom: 15px; color: var(--muted); }
.widget-bio img, .widget-bio svg { height: 44px; width: auto; margin-bottom: 13px; }
.widget-bio p { font-size: 13.5px; color: var(--ink-soft); line-height: 1.6; }
.widget-bio .btn { margin-top: 15px; padding: 12px 26px; font-size: 13px; }
.widget ul { list-style: none; }
.widget li + li { margin-top: 10px; border-top: 1px solid var(--hair); padding-top: 10px; }
.widget ul a { color: var(--ink); text-decoration: none; font-size: 13.5px; font-weight: 500; line-height: 1.4; display: block; transition: color .2s; }
.widget ul a:hover { color: var(--glow); }
.widget ul .w-meta { display: block; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-top: 3px; }
.widget-cta { background: var(--grad); color: var(--btn-ink); border: 0; text-align: center; padding: 32px 26px; }
.widget-cta p { font-weight: 700; font-size: 19px; line-height: 1.3; letter-spacing: -.01em; font-family: 'Space Grotesk', sans-serif; }
.widget-cta .btn { margin-top: 17px; background: var(--btn-ink); color: var(--ink); padding: 13px 28px; font-size: 13px; }

/* articolo */
.post-hero { padding: clamp(130px, 18vh, 190px) clamp(24px, 7vw, 110px) 0; }
.post-hero .wrap-post { max-width: 1280px; margin: 0 auto; }
.post-hero h1 { font-weight: 700; font-size: clamp(32px, 4.4vw, 58px); line-height: 1.08; letter-spacing: -.015em; max-width: 24ch; }
.post-meta { display: flex; flex-wrap: wrap; gap: 10px 22px; margin-top: 18px; font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.post-meta a { color: var(--glow); text-decoration: none; }
.post-body { min-width: 0; }
.post-cover { margin: 32px 0; position: relative; aspect-ratio: 21 / 10; overflow: hidden; border-radius: 10px; background: #0E1B2C; }
.post-cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.post-body h2 { font-weight: 700; font-size: clamp(23px, 2.7vw, 34px); line-height: 1.18; letter-spacing: -.01em; margin: 44px 0 16px; }
.post-body h3 { font-weight: 700; font-size: clamp(19px, 2.1vw, 24px); margin: 32px 0 13px; }
.post-body h4 { font-weight: 700; font-size: 17px; margin: 26px 0 10px; }
.post-body p { font-size: 16.5px; line-height: 1.8; color: var(--ink-soft); margin-bottom: 1.25em; max-width: 70ch; }
.post-body ul, .post-body ol { margin: 0 0 1.4em 1.3em; }
.post-body li { font-size: 16px; line-height: 1.75; color: var(--ink-soft); margin-bottom: .45em; }
.post-body a { color: var(--glow); font-weight: 600; }
.post-body img { max-width: 100%; height: auto; border-radius: 8px; margin: 10px 0; }
.post-body strong { color: var(--ink); }
.post-body blockquote {
  margin: 38px 0; padding: 28px 32px;
  border-left: 3px solid var(--teal); background: var(--bg-raise); border-radius: 0 10px 10px 0;
  font-size: clamp(17px, 1.9vw, 21px); font-weight: 600; line-height: 1.5;
}
.tbl-wrap { overflow-x: auto; margin: 28px 0 38px; }
.post-body table { width: 100%; border-collapse: collapse; font-size: 14.5px; min-width: 560px; }
.post-body th, .post-body td { border: 1px solid var(--hair); padding: 12px 15px; text-align: left; vertical-align: top; color: var(--ink-soft); }
.post-body th { font-weight: 700; background: var(--bg-raise); color: var(--ink); }
.post-cta { margin: 46px 0 0; border: 1px solid var(--teal); border-radius: 10px; padding: 34px; }
.post-cta p { font-weight: 700; font-size: 17.5px; max-width: 60ch; color: var(--ink); }
.post-cta .btn { margin-top: 20px; }
.post-nav-back { display: inline-block; margin-top: 40px; font-size: 13px; font-weight: 700; color: var(--glow); text-decoration: none; }

/* prev/next */
.pn { display: grid; grid-template-columns: 1fr 1fr; max-width: 1280px; margin: 0 auto; border-top: 1px solid var(--hair); }
.pn a { padding: 32px 20px; text-decoration: none; color: var(--ink); font-weight: 700; font-size: clamp(15px, 1.7vw, 20px); font-family: 'Space Grotesk', sans-serif; transition: background .3s, color .3s; }
.pn a:hover { background: var(--bg-raise); color: var(--glow); }
.pn a:last-child { text-align: right; border-left: 1px solid var(--hair); }
.pn .eyebrow { display: block; margin-bottom: 8px; color: inherit; opacity: .5; font-family: 'Inter', sans-serif; }

/* ═══════════════ CAROSELLO PARTNER ═══════════════ */
.partners {
  overflow: hidden; white-space: nowrap; margin-top: 56px;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}
.partners-track {
  display: inline-flex; align-items: center;
  will-change: transform;
  animation: marquee var(--pt-speed, 38s) linear infinite;
}
.partners:hover .partners-track { animation-play-state: paused; }
.pt-seg { display: inline-flex; align-items: center; flex: none; }
.pt-item {
  display: inline-flex; align-items: center; gap: 13px;
  padding: 0 clamp(26px, 3.2vw, 46px);
  color: var(--ink-soft); opacity: .72;
  transition: opacity .3s, color .3s;
}
.pt-item:hover { opacity: 1; color: var(--ink); }
.pt-item svg, .pt-item img { height: 27px; width: auto; display: block; flex: none; }
.pt-item .pt-name {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600; font-size: 17.5px; letter-spacing: .01em;
  line-height: 1;
}
@media (max-width: 640px) { .partners-track { --pt-speed: 26s; } .pt-item svg, .pt-item img { height: 23px; } .pt-item .pt-name { font-size: 15.5px; } }
@media (prefers-reduced-motion: reduce) { .partners-track { animation-duration: 120s; } }

/* badge recensioni */
.badge-review {
  display: inline-flex; align-items: center; gap: 12px;
  border: 1px solid var(--hair-strong); border-radius: 999px;
  padding: 12px 24px; margin-top: 34px;
  color: var(--ink); text-decoration: none; font-size: 14px; font-weight: 600;
  transition: border-color .3s, color .3s;
}
.badge-review:hover { border-color: var(--teal); color: var(--glow); }
.badge-review .star { color: #00B67A; font-size: 17px; }

/* ═══════════════ LIGHTBOX ═══════════════ */
.lightbox {
  position: fixed; inset: 0; z-index: 70;
  background: rgba(5, 11, 20, .97);
  display: none; align-items: center; justify-content: center;
}
.lightbox.open { display: flex; }
.lb-stage { max-width: min(1200px, 88vw); max-height: 86vh; }
.lb-stage img, .lb-stage video { max-width: 100%; max-height: 86vh; display: block; border-radius: 6px; }
.lb-close, .lb-prev, .lb-next {
  position: absolute; background: none; border: 0; cursor: pointer;
  font-size: 30px; color: var(--ink); font-family: inherit;
  width: 54px; height: 54px; display: grid; place-items: center;
}
.lb-close { top: 18px; right: 18px; font-size: 40px; }
.lb-prev { left: 12px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 12px; top: 50%; transform: translateY(-50%); }
.lb-cap { position: absolute; bottom: 22px; left: 50%; transform: translateX(-50%); font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }

/* ═══════════════ FOOTER ═══════════════ */
.footer {
  position: relative; z-index: 3;
  border-top: 1px solid var(--hair);
  padding: clamp(60px, 9vh, 100px) clamp(24px, 7vw, 110px) 40px;
  background: var(--bg);
}
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.1fr; gap: 44px; max-width: 1280px; margin: 0 auto; }
.footer-brand-col a.f-logo { display: inline-block; }
.footer-brand-col svg, .footer-brand-col img { height: 42px; width: auto; }
.footer-brand-col p { margin-top: 18px; font-size: 14px; color: var(--muted); max-width: 32ch; line-height: 1.6; }
.footer .wtitle { font-size: 12px; font-weight: 700; letter-spacing: .26em; text-transform: uppercase; margin-bottom: 18px; color: var(--muted); }
.footer ul { list-style: none; }
.footer li + li { margin-top: 10px; }
.footer ul a { color: var(--ink-soft); text-decoration: none; font-size: 14px; transition: color .2s; display: inline-flex; align-items: center; gap: 10px; }
.footer ul a:hover { color: var(--glow); }
.footer ul svg { width: 17px; height: 17px; flex: none; stroke: var(--teal); }
.f-socials { display: flex; gap: 14px; margin-top: 18px; }
.f-socials a { display: grid; place-items: center; width: 40px; height: 40px; border: 1px solid var(--hair-strong); border-radius: 999px; transition: border-color .3s, background .3s; }
.f-socials a:hover { border-color: var(--teal); background: var(--bg-raise); }
.f-socials svg { width: 17px; height: 17px; stroke: var(--ink); }
.footer-base {
  max-width: 1280px; margin: 52px auto 0; padding-top: 24px;
  border-top: 1px solid var(--hair);
  display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap;
  font-size: 12.5px; color: var(--muted);
}
.footer-base a { color: var(--muted); }
.footer-base a:hover { color: var(--glow); }

/* ═══════════════ CONSENSO COOKIE ═══════════════ */
.consent-bar {
  position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 75;
  max-width: 640px; margin: 0 auto;
  background: var(--bg-raise);
  border: 1px solid var(--hair-strong); border-radius: 14px;
  padding: 22px 24px;
  box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .8);
  display: none;
}
.consent-bar.show { display: block; }
.consent-bar p { font-size: 13.5px; color: var(--ink-soft); line-height: 1.55; }
.consent-bar p a { color: var(--glow); }
.consent-actions { display: flex; gap: 10px; margin-top: 16px; flex-wrap: wrap; }
.consent-actions .btn { padding: 11px 22px; font-size: 13px; margin: 0; }

/* ═══════════════ REVEAL ═══════════════ */
/* default visibile (LCP immediato); il JS marca .pre SOLO gli elementi sotto il fold */
.reveal { opacity: 1; transform: none; }
.reveal.pre {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .5s var(--ease), transform .5s var(--ease);
  transition-delay: var(--d, 0s);
}
.reveal.pre.in { opacity: 1; transform: none; }

/* ═══════════════ 404 ═══════════════ */
.err { min-height: 82vh; display: flex; flex-direction: column; justify-content: center; padding: 0 clamp(24px, 7vw, 110px); }

/* ═══════════════ RESPONSIVE ═══════════════ */
@media (max-width: 1120px) {
  .numbers { grid-template-columns: repeat(2, 1fr); }
  .case-grid { grid-template-columns: repeat(2, 1fr); }
  .case-grid .case, .case-grid .case.w3, .case-grid .case.w6 { grid-column: span 1; }
  .case-grid .case.odd1 { grid-column: span 2; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .blog-layout { grid-template-columns: 1fr; }
  .blog-side { position: static; }
  .psr { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .numbers { grid-template-columns: 1fr 1fr; gap: 26px; }
  .case-grid { grid-template-columns: 1fr; }
  .case-grid .case, .case-grid .case.w3, .case-grid .case.w6, .case-grid .case.odd1 { grid-column: auto; }
  .footer-grid { grid-template-columns: 1fr; gap: 34px; }
  .pn { grid-template-columns: 1fr; }
  .pn a:last-child { border-left: 0; border-top: 1px solid var(--hair); text-align: left; }
  .post-card { grid-template-columns: 1fr; }
  .pc-media { aspect-ratio: 16 / 9; }
}

/* ═══════════════ REDUCED MOTION ═══════════════ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
  .grain { animation: none; }
  .hero-scroll span { animation: none; transform: scaleY(1); }
  .marquee-track { animation-duration: 90s; }
  .acc-a { transition: none; }
  .btn:hover, .case:hover, .post-card:hover, .ally:hover { transform: none; }
}
