/* ============================================================
   Font ospitato sul nostro dominio: niente richiesta a Google,
   niente indirizzo IP del visitatore comunicato a terzi, e il
   testo compare prima perché non serve una seconda connessione.
   ============================================================ */
@font-face {
  font-family: "Plus Jakarta Sans";
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url("/assets/fonts/plus-jakarta-sans-latin-300-normal.woff2")
    format("woff2");
  unicode-range:
    U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
    U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212,
    U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Plus Jakarta Sans";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/fonts/plus-jakarta-sans-latin-400-normal.woff2")
    format("woff2");
  unicode-range:
    U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
    U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212,
    U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Plus Jakarta Sans";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/assets/fonts/plus-jakarta-sans-latin-500-normal.woff2")
    format("woff2");
  unicode-range:
    U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
    U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212,
    U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Plus Jakarta Sans";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/assets/fonts/plus-jakarta-sans-latin-600-normal.woff2")
    format("woff2");
  unicode-range:
    U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
    U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212,
    U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Plus Jakarta Sans";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/assets/fonts/plus-jakarta-sans-latin-700-normal.woff2")
    format("woff2");
  unicode-range:
    U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
    U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212,
    U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Plus Jakarta Sans";
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url("/assets/fonts/plus-jakarta-sans-latin-800-normal.woff2")
    format("woff2");
  unicode-range:
    U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
    U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212,
    U+2215, U+FEFF, U+FFFD;
}

/* ============================================================
   KINETIX.LAB — foglio di stile unico del sito
   Token, theming light/dark, componenti, widget chat.
   ============================================================ */

/* ============================================================
   TOKENS
============================================================ */
:root {
  /* dark surfaces */
  --d-bg: #0a0a0c;
  --d-bg2: #111115;
  --d-fg: #ffffff;
  --d-dim: rgba(255, 255, 255, 0.46);
  --d-dim2: rgba(255, 255, 255, 0.24);
  --d-line: rgba(255, 255, 255, 0.08);
  --d-line2: rgba(255, 255, 255, 0.14);
  --d-card: rgba(255, 255, 255, 0.035);
  --d-cardbd: rgba(255, 255, 255, 0.09);

  /* light surfaces */
  --l-bg: #eef1f6;
  --l-bg2: #e4e8f0;
  --l-fg: #0b0d12;
  --l-dim: rgba(11, 13, 18, 0.58);
  --l-dim2: rgba(11, 13, 18, 0.34);
  --l-line: rgba(11, 13, 18, 0.1);
  --l-line2: rgba(11, 13, 18, 0.16);
  --l-card: #ffffff;
  --l-cardbd: rgba(11, 13, 18, 0.08);

  /* accents */
  --accent: #5ad7ff; /* cyan  — for dark */
  --accent2: #2bf0c0; /* teal  — for dark */
  --ink: #0e8fd6; /* deep blue — accent on light */
  --ink2: #0bb39a; /* deep teal — accent on light */

  --grad-d: linear-gradient(120deg, #5ad7ff 0%, #2bf0c0 100%);
  --grad-l: linear-gradient(120deg, #0e8fd6 0%, #0bb39a 100%);

  /* active theme vars (default = dark) */
  --bg: var(--d-bg);
  --bg2: var(--d-bg2);
  --fg: var(--d-fg);
  --dim: var(--d-dim);
  --dim2: var(--d-dim2);
  --line: var(--d-line);
  --line2: var(--d-line2);
  --card: var(--d-card);
  --cardbd: var(--d-cardbd);
  --grad: var(--grad-d);
  --acc: var(--accent);
}

/* ============================================================
   RESET
============================================================ */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
html {
  overflow-x: hidden;
  scroll-behavior: auto;
}
body {
  background: var(--d-bg);
  color: var(--d-fg);
  font-family:
    "Plus Jakarta Sans",
    -apple-system,
    BlinkMacSystemFont,
    sans-serif;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
@media (pointer: fine) {
  body {
    cursor: none;
  }
}
a {
  text-decoration: none;
  color: inherit;
}
img,
video {
  display: block;
  max-width: 100%;
}
ul {
  list-style: none;
}
button,
input,
textarea,
select {
  font-family: inherit;
}

/* ============================================================
   THEME SCOPES — light / dark sections
============================================================ */
.sec--dark {
  --bg: var(--d-bg);
  --bg2: var(--d-bg2);
  --fg: var(--d-fg);
  --dim: var(--d-dim);
  --dim2: var(--d-dim2);
  --line: var(--d-line);
  --line2: var(--d-line2);
  --card: var(--d-card);
  --cardbd: var(--d-cardbd);
  --grad: var(--grad-d);
  --acc: var(--accent);
  background: var(--bg);
  color: var(--fg);
}
.sec--light {
  --bg: var(--l-bg);
  --bg2: var(--l-bg2);
  --fg: var(--l-fg);
  --dim: var(--l-dim);
  --dim2: var(--l-dim2);
  --line: var(--l-line);
  --line2: var(--l-line2);
  --card: var(--l-card);
  --cardbd: var(--l-cardbd);
  --grad: var(--grad-l);
  --acc: var(--ink);
  background: var(--bg);
  color: var(--fg);
}

/* ============================================================
   SHARED — eyebrow / gradient text
============================================================ */
.eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--acc);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.eyebrow::before {
  content: "";
  width: 22px;
  height: 1px;
  background: currentColor;
}
.gr {
  background: var(--grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ============================================================
   PROGRESS BAR
============================================================ */
#progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  width: 0%;
  background: var(--grad-d);
  z-index: 9900;
  pointer-events: none;
  will-change: width;
}

/* ============================================================
   CURSOR  (mix-blend-mode keeps it visible on any theme)
============================================================ */
.cur-outer,
.cur-inner {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  pointer-events: none;
  border-radius: 50%;
  mix-blend-mode: difference;
}
@media (pointer: fine) {
  .cur-outer,
  .cur-inner {
    display: block;
  }
}
.cur-outer {
  width: 32px;
  height: 32px;
  border: 1.5px solid #fff;
  z-index: 10001; /* FIX: sopra al chat widget (9999) */
  will-change: transform;
  transition:
    width 0.28s ease,
    height 0.28s ease;
}
.cur-inner {
  width: 5px;
  height: 5px;
  background: #fff;
  z-index: 10002; /* FIX: sopra al chat widget (9999) */
  will-change: transform;
}
.cur-outer.lnk {
  width: 52px;
  height: 52px;
}
.cur-outer.vid {
  width: 72px;
  height: 72px;
}

/* ============================================================
   NAV  (dark glass, light text — independent of section behind it)
============================================================ */
#nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 800;
  height: 60px;
  padding: 0 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: transparent;
  transition:
    background 0.4s ease,
    border-color 0.4s ease;
  border-bottom: 1px solid transparent;
}
#nav.scrolled {
  background: rgba(10, 10, 12, 0.78);
  backdrop-filter: blur(22px) saturate(180%);
  -webkit-backdrop-filter: blur(22px) saturate(180%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.nav-logo {
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #fff;
}
.nav-logo em {
  font-style: normal;
  background: var(--grad-d);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.nav-links {
  display: flex;
  gap: 32px;
  align-items: center;
}
.nav-links a {
  font-size: 13px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.5);
  transition: color 0.3s;
}
.nav-links a:hover {
  color: #fff;
}
.nav-cta {
  padding: 9px 22px;
  border-radius: 100px;
  font-size: 13px;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #fff !important;
  transition:
    background 0.3s,
    border-color 0.3s;
}
.nav-cta:hover {
  background: rgba(90, 215, 255, 0.1) !important;
  border-color: rgba(90, 215, 255, 0.3);
}
@media (max-width: 800px) {
  #nav {
    padding: 0 20px;
  }
  .nav-links {
    display: none;
  }
}

/* ── Menu mobile ── */
.nav-burger {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  cursor: pointer;
  padding: 0 11px;
}
.nav-burger span {
  display: block;
  height: 1.5px;
  width: 100%;
  background: #fff;
  border-radius: 2px;
  transition:
    transform 0.32s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.2s;
}
.nav-burger[aria-expanded="true"] span:first-child {
  transform: translateY(3.25px) rotate(45deg);
}
.nav-burger[aria-expanded="true"] span:last-child {
  transform: translateY(-3.25px) rotate(-45deg);
}
#navDrawer {
  position: fixed;
  inset: 60px 0 auto 0;
  z-index: 790;
  background: rgba(10, 10, 12, 0.96);
  backdrop-filter: blur(22px) saturate(180%);
  -webkit-backdrop-filter: blur(22px) saturate(180%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding: 14px 20px 26px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  transform: translateY(-12px);
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 0.28s ease,
    transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}
#navDrawer.open {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}
#navDrawer a {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #fff;
  padding: 15px 2px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}
#navDrawer a:last-child {
  border-bottom: none;
  margin-top: 14px;
  text-align: center;
  border-radius: 100px;
  background: var(--grad-d);
  color: #05070a;
  padding: 15px 22px;
}
@media (min-width: 801px) {
  #navDrawer,
  .nav-burger {
    display: none;
  }
}

/* ============================================================
   PROOF STRIP — lavori recenti (light)
============================================================ */
.proof {
  padding: 62px 52px 70px;
  border-bottom: 1px solid var(--line);
}
.proof-hd {
  margin-bottom: 32px;
}
.proof-hd h2 {
  font-size: clamp(21px, 2.5vw, 32px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: var(--fg);
  max-width: 24ch;
}
.proof-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.proof-card {
  background: var(--card);
  border: 1px solid var(--cardbd);
  border-radius: 18px;
  padding: 26px 24px 22px;
  display: flex;
  flex-direction: column;
  gap: 11px;
  opacity: 0;
  transform: translateY(20px);
}
.proof-sector {
  font-size: 14px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--fg);
}
.proof-line {
  font-size: 14px;
  line-height: 1.58;
  color: var(--dim);
}
.proof-meta {
  margin-top: auto;
  padding-top: 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  background: var(--grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  width: fit-content;
}
@media (max-width: 900px) {
  .proof {
    padding: 46px 24px 54px;
  }
  .proof-grid {
    grid-template-columns: 1fr;
  }
}

/* ============================================================
   HERO  (dark, animated gradient atmosphere — no video)
============================================================ */
#hero {
  position: relative;
  min-height: 100svh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}
.hero-atmos {
  position: absolute;
  inset: -20%;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(
      38% 50% at 22% 28%,
      rgba(90, 215, 255, 0.3) 0%,
      transparent 60%
    ),
    radial-gradient(
      42% 52% at 80% 30%,
      rgba(79, 140, 255, 0.24) 0%,
      transparent 62%
    ),
    radial-gradient(
      46% 55% at 55% 82%,
      rgba(43, 240, 192, 0.2) 0%,
      transparent 64%
    ),
    #060608;
  background-size:
    200% 200%,
    200% 200%,
    200% 200%,
    100% 100%;
  filter: blur(8px);
  animation: atmos 24s ease-in-out infinite alternate;
}
@keyframes atmos {
  0% {
    background-position:
      0% 0%,
      100% 0%,
      50% 100%,
      0 0;
  }
  50% {
    background-position:
      55% 40%,
      30% 70%,
      80% 30%,
      0 0;
  }
  100% {
    background-position:
      100% 100%,
      0% 100%,
      20% 0%,
      0 0;
  }
}
.hero-grain {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.hero-ov {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    to top,
    #060608 0%,
    rgba(6, 6, 8, 0.2) 55%,
    transparent 100%
  );
  pointer-events: none;
}
.hero-content {
  position: relative;
  z-index: 2;
  padding: 0 52px 76px;
  max-width: 1400px;
  width: 100%;
  margin: 0 auto;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 16px;
  border-radius: 100px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.72);
  margin-bottom: 30px;
  opacity: 0;
  transform: translateY(14px);
}
.hero-badge .ping {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent2);
  box-shadow: 0 0 8px var(--accent2);
  animation: ppulse 2s ease infinite;
}
@keyframes ppulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.35;
  }
}
.hero-h1 {
  font-size: clamp(72px, 13vw, 190px);
  font-weight: 800;
  line-height: 0.86;
  letter-spacing: -0.045em;
  color: #fff;
  margin-bottom: 30px;
}
.hero-h1 .rv {
  display: block;
  overflow: hidden;
}
.hero-h1 .rv span {
  display: block;
  will-change: transform;
}
.hero-h1 .gr-line span {
  background: var(--grad-d);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-sub {
  font-size: clamp(16px, 1.5vw, 21px);
  font-weight: 300;
  color: rgba(255, 255, 255, 0.56);
  max-width: 480px;
  line-height: 1.65;
  margin-bottom: 38px;
  opacity: 0;
  transform: translateY(18px);
}
.hero-ctas {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  opacity: 0;
  transform: translateY(18px);
}
.btn-p {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 32px;
  border-radius: 100px;
  background: #fff;
  color: #0a0a0c;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.01em;
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
}
.btn-p:hover {
  transform: scale(1.03);
  box-shadow: 0 14px 40px rgba(90, 215, 255, 0.22);
}
.btn-g {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 15px 30px;
  border-radius: 100px;
  background: transparent;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.24);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.01em;
  transition:
    background 0.3s,
    border-color 0.3s;
}
.btn-g:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.4);
}
.scroll-hint {
  position: absolute;
  bottom: 28px;
  right: 52px;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: rgba(255, 255, 255, 0.3);
  font-size: 10px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}
.scroll-line {
  width: 1px;
  height: 46px;
  background: linear-gradient(to bottom, transparent, rgba(255, 255, 255, 0.4));
}
@media (max-width: 800px) {
  .hero-content {
    padding: 0 20px 56px;
  }
  .scroll-hint {
    right: 20px;
  }
}

/* ============================================================
   STATS  (light band)
============================================================ */
.stats-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-bottom: 1px solid var(--line);
}
.stat-item {
  padding: 48px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  border-right: 1px solid var(--line);
  opacity: 0;
  transform: translateY(20px);
}
.stat-item:last-child {
  border-right: none;
}
.stat-num {
  font-size: clamp(42px, 5.5vw, 68px);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
  background: var(--grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.stat-lbl {
  font-size: 13px;
  font-weight: 500;
  color: var(--dim);
}
@media (max-width: 800px) {
  .stats-bar {
    grid-template-columns: repeat(2, 1fr);
  }
  .stat-item {
    padding: 36px 24px;
  }
  .stat-item:nth-child(2) {
    border-right: none;
  }
}

/* ============================================================
   REEL  (dark, animated gradient tiles — no video)
============================================================ */
.reel-pin {
  height: 100svh;
  overflow: hidden;
  position: relative;
  display: flex;
  align-items: center;
}
.reel-hd {
  position: absolute;
  top: 48px;
  left: 52px;
  z-index: 10;
  pointer-events: none;
}
.reel-hd h2 {
  font-size: clamp(28px, 4vw, 52px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
  color: #fff;
}
#reel-track {
  display: flex;
  gap: 24px;
  padding: 0 52px;
  align-items: center;
  will-change: transform;
}
.reel-item {
  flex-shrink: 0;
  width: min(70vw, 1020px);
  aspect-ratio: 16/9;
  border-radius: 18px;
  overflow: hidden;
  position: relative;
  border: 1px solid var(--line);
  cursor: none;
}
.reel-art {
  position: absolute;
  inset: 0;
}
.reel-art::before {
  content: "";
  position: absolute;
  inset: -40%;
  background-size: 200% 200%;
  animation: reelDrift 18s ease-in-out infinite alternate;
}
.reel-art::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.5;
  background-image: radial-gradient(
    rgba(255, 255, 255, 0.1) 1px,
    transparent 1px
  );
  background-size: 22px 22px;
  mix-blend-mode: overlay;
}
.reel-g1 .reel-art::before {
  background:
    radial-gradient(60% 70% at 30% 30%, #5ad7ff 0%, transparent 60%),
    radial-gradient(60% 70% at 75% 70%, #1d6bd6 0%, transparent 62%), #0a1422;
}
.reel-g2 .reel-art::before {
  background:
    radial-gradient(60% 70% at 70% 30%, #2bf0c0 0%, transparent 60%),
    radial-gradient(60% 70% at 30% 75%, #0e8fd6 0%, transparent 62%), #06140f;
}
.reel-g3 .reel-art::before {
  background:
    radial-gradient(60% 70% at 40% 35%, #6f8cff 0%, transparent 60%),
    radial-gradient(60% 70% at 80% 75%, #5ad7ff 0%, transparent 62%), #0b0f1f;
}
.reel-g4 .reel-art::before {
  background:
    radial-gradient(60% 70% at 30% 70%, #2bf0c0 0%, transparent 60%),
    radial-gradient(60% 70% at 75% 25%, #5ad7ff 0%, transparent 62%), #08161a;
}
@keyframes reelDrift {
  0% {
    background-position:
      0% 0%,
      100% 100%,
      0 0;
    transform: scale(1.05);
  }
  100% {
    background-position:
      100% 100%,
      0% 0%,
      0 0;
    transform: scale(1.18);
  }
}
.reel-item::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.72) 0%, transparent 56%);
  pointer-events: none;
}
.reel-label {
  position: absolute;
  bottom: 28px;
  left: 32px;
  z-index: 2;
}
.reel-n {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 6px;
}
.reel-name {
  font-size: clamp(20px, 2.5vw, 34px);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #fff;
}
.reel-tag {
  font-size: 12px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.55);
  margin-top: 4px;
}
.reel-dots {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 10;
}
.r-dot {
  width: 22px;
  height: 2px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.18);
  transition:
    width 0.4s ease,
    background 0.4s ease;
}
.r-dot.on {
  width: 42px;
  background: var(--accent);
}
@media (max-width: 800px) {
  .reel-hd {
    top: 24px;
    left: 20px;
  }
  #reel-track {
    padding: 0 20px;
    gap: 16px;
  }
  .reel-item {
    width: 84vw;
  }
}

/* ============================================================
   SERVICES  (light)
============================================================ */
#services {
  /* La spaziatura arriva da .sec-pad; "clip" invece di "hidden"
     perché hidden creerebbe un contenitore di scorrimento e
     romperebbe il pannello sticky dei servizi. */
  position: relative;
  overflow: clip;
}
#services::before {
  content: "";
  position: absolute;
  top: -10%;
  right: -5%;
  width: 520px;
  height: 520px;
  z-index: 0;
  background: radial-gradient(
    circle,
    rgba(14, 143, 214, 0.1) 0%,
    transparent 70%
  );
  pointer-events: none;
}
.wrap {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 52px;
  position: relative;
  z-index: 1;
}
.s-h2 {
  font-size: clamp(42px, 7vw, 96px);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 0.92;
  color: var(--fg);
  margin-bottom: 18px;
}
.s-sub {
  font-size: clamp(16px, 1.3vw, 20px);
  color: var(--dim);
  margin-bottom: 64px;
  max-width: 560px;
}
.srv-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  align-items: start;
}
.srv-card {
  background: var(--card);
  border: 1px solid var(--cardbd);
  border-radius: 20px;
  padding: 36px;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  opacity: 0;
  transform: translateY(50px);
  transition:
    border-color 0.35s,
    box-shadow 0.35s,
    opacity 0.35s;
  will-change: transform, opacity;
}
.srv-card:hover {
  border-color: rgba(14, 143, 214, 0.32);
  box-shadow: 0 24px 48px rgba(14, 143, 214, 0.08);
}
.srv-card.srv-open {
  border-color: rgba(14, 143, 214, 0.4);
  box-shadow:
    0 0 0 1px rgba(14, 143, 214, 0.16),
    0 24px 60px rgba(14, 143, 214, 0.08);
}
.srv-n {
  position: absolute;
  top: 16px;
  right: 20px;
  font-size: clamp(88px, 11vw, 130px);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1px rgba(11, 13, 18, 0.07);
  pointer-events: none;
}
.srv-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--grad-l);
  margin-bottom: 24px;
  color: #fff;
}
.srv-card h3 {
  font-size: clamp(18px, 2vw, 24px);
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--fg);
  margin-bottom: 8px;
}
.srv-short {
  font-size: 14px;
  color: var(--dim);
  line-height: 1.6;
  margin-bottom: 20px;
}
.srv-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-right: 40px;
}
.srv-tag {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 100px;
  border: 1px solid var(--line2);
  color: var(--dim);
}
.srv-toggle {
  position: absolute;
  bottom: 20px;
  right: 20px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid var(--line2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--dim);
  cursor: pointer;
}
.srv-expand {
  height: 0;
  overflow: hidden;
}
.srv-expand-inner {
  padding-top: 24px;
  border-top: 1px solid var(--line);
  margin-top: 20px;
}
.srv-expand-inner p {
  font-size: 14px;
  color: var(--dim);
  line-height: 1.7;
  margin-bottom: 16px;
}
.srv-expand-inner ul {
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.srv-expand-inner li {
  font-size: 13px;
  color: var(--dim);
  padding-left: 18px;
  position: relative;
}
.srv-expand-inner li::before {
  content: "→";
  position: absolute;
  left: 0;
  color: var(--acc);
}
.srv-divider {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 20px;
  margin: 12px 0;
}
.srv-div-line {
  flex: 1;
  height: 1px;
  background: var(--line);
}
.srv-div-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--acc);
  white-space: nowrap;
}
@media (max-width: 900px) {
  .srv-grid {
    grid-template-columns: 1fr;
  }
  .wrap {
    padding: 0 20px;
  }
  #services {
    padding: 90px 0;
  }
}

/* ============================================================
   TECH TILES  (dark)
============================================================ */
.tech-section {
  padding: 110px 0;
  overflow: hidden;
}
.tech-intro {
  text-align: center;
  padding: 0 52px;
  margin-bottom: 56px;
}
.tech-intro .eyebrow {
  justify-content: center;
}
.tech-intro h2 {
  font-size: clamp(42px, 7vw, 96px);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 0.92;
  color: var(--fg);
}
.tiles-stack {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.tiles-row {
  display: flex;
  gap: 14px;
  width: max-content;
  will-change: transform;
}
.t-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: 100px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--dim);
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  user-select: none;
  transition:
    border-color 0.3s,
    background 0.3s,
    color 0.3s;
}
.t-chip:hover {
  border-color: rgba(90, 215, 255, 0.35);
  background: rgba(90, 215, 255, 0.07);
  color: #fff;
}
.t-chip .d {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.6;
}
.t-chip.hi {
  border-color: rgba(90, 215, 255, 0.22);
  color: rgba(90, 215, 255, 0.85);
  background: rgba(90, 215, 255, 0.05);
}
@media (max-width: 800px) {
  .tech-intro {
    padding: 0 20px;
  }
}

/* ============================================================
   PROCESS  (light)
============================================================ */
#process {
  padding: 130px 0;
  position: relative;
  overflow: hidden;
}
#process::before {
  content: "";
  position: absolute;
  bottom: -10%;
  left: -5%;
  width: 480px;
  height: 480px;
  z-index: 0;
  background: radial-gradient(
    circle,
    rgba(11, 179, 154, 0.1) 0%,
    transparent 70%
  );
  pointer-events: none;
}
.proc-list {
  margin-top: 56px;
  border-top: 1px solid var(--line);
}
.proc-row {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 40px;
  align-items: start;
  padding: 44px 0;
  border-bottom: 1px solid var(--line);
  opacity: 0;
  transform: translateY(24px);
  will-change: opacity, transform;
  transition: padding 0.35s;
  cursor: default;
}
.proc-row:hover {
  padding-left: 10px;
}
.proc-n {
  font-size: clamp(44px, 5vw, 68px);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
  background: var(--grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.proc-body h3 {
  font-size: clamp(22px, 2.8vw, 34px);
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--fg);
  margin-bottom: 10px;
  transition: color 0.3s;
}
.proc-row:hover .proc-body h3 {
  color: var(--acc);
}
.proc-body p {
  font-size: 15px;
  color: var(--dim);
  line-height: 1.65;
  max-width: 560px;
}
@media (max-width: 800px) {
  .proc-row {
    grid-template-columns: 56px 1fr;
    gap: 20px;
  }
  #process {
    padding: 90px 0;
  }
}

/* ============================================================
   CONTACT  (dark, two-column with form)
============================================================ */
#contact {
  position: relative;
  overflow: hidden;
  padding: 140px 52px 130px;
}
.contact-glow {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(
      40% 50% at 18% 30%,
      rgba(90, 215, 255, 0.1) 0%,
      transparent 60%
    ),
    radial-gradient(
      40% 50% at 85% 75%,
      rgba(43, 240, 192, 0.08) 0%,
      transparent 62%
    );
  animation: glowPulse 9s ease-in-out infinite alternate;
}
@keyframes glowPulse {
  from {
    opacity: 0.7;
  }
  to {
    opacity: 1;
  }
}
.contact-grid {
  position: relative;
  z-index: 1;
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1.05fr;
  gap: 72px;
  align-items: start;
}
.contact-left {
  padding-top: 8px;
}
.contact-h2 {
  font-size: clamp(44px, 7vw, 104px);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 0.9;
  color: #fff;
  margin-bottom: 24px;
  opacity: 0;
  transform: translateY(30px);
}
.contact-sub {
  font-size: clamp(16px, 1.4vw, 19px);
  font-weight: 300;
  color: rgba(255, 255, 255, 0.5);
  max-width: 420px;
  line-height: 1.7;
  margin-bottom: 36px;
  opacity: 0;
  transform: translateY(30px);
}
.contact-direct {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: clamp(18px, 2vw, 26px);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #fff;
  opacity: 0;
  transform: translateY(30px);
}
.contact-direct .gr {
  background: var(--grad-d);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.contact-direct:hover {
  text-decoration: underline;
  text-decoration-color: rgba(90, 215, 255, 0.5);
  text-underline-offset: 5px;
}

/* form */
.contact-form {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 22px;
  padding: 36px;
  opacity: 0;
  transform: translateY(30px);
}
.field {
  margin-bottom: 20px;
}
.field label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.55);
  margin-bottom: 9px;
}
.field label .req {
  color: var(--accent2);
}
.field input,
.field textarea,
.field select {
  width: 100%;
  padding: 14px 16px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 15px;
  font-weight: 400;
  transition:
    border-color 0.3s,
    background 0.3s;
}
.field textarea {
  resize: vertical;
  min-height: 118px;
  line-height: 1.6;
}
.field input::placeholder,
.field textarea::placeholder {
  color: rgba(255, 255, 255, 0.3);
}
.field input:focus,
.field textarea:focus,
.field select:focus {
  outline: none;
  border-color: rgba(90, 215, 255, 0.55);
  background: rgba(90, 215, 255, 0.05);
}
.field select {
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2390cfe6' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
}
.field select option {
  background: #111115;
  color: #fff;
}
.row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.consent {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  margin: 4px 0 26px;
  font-size: 12.5px;
  color: rgba(255, 255, 255, 0.45);
  line-height: 1.55;
}
.consent input {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
  margin-top: 1px;
  accent-color: var(--accent);
  cursor: pointer;
}
.consent a {
  color: rgba(255, 255, 255, 0.7);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.form-submit {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 17px 28px;
  border: none;
  border-radius: 100px;
  background: var(--grad-d);
  color: #04181c;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.01em;
  cursor: pointer;
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease,
    opacity 0.3s;
}
.form-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 44px rgba(90, 215, 255, 0.25);
}
.form-note {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.3);
  text-align: center;
  margin-top: 16px;
}
@media (max-width: 900px) {
  #contact {
    padding: 100px 20px;
  }
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 48px;
  }
  .contact-form {
    padding: 28px;
  }
  .row-2 {
    grid-template-columns: 1fr;
  }
}

/* ============================================================
   FOOTER  (dark)
============================================================ */
footer {
  padding: 32px 52px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--line);
  flex-wrap: wrap;
  gap: 12px;
}
.f-logo {
  font-size: 14px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #fff;
}
.f-logo em {
  font-style: normal;
  background: var(--grad-d);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
footer p {
  font-size: 12px;
  color: var(--dim2);
}
.f-links {
  display: flex;
  gap: 22px;
}
.f-links a {
  font-size: 12px;
  font-weight: 500;
  color: var(--dim2);
  transition: color 0.3s;
}
.f-links a:hover {
  color: rgba(255, 255, 255, 0.8);
}
@media (max-width: 800px) {
  footer {
    padding: 28px 20px;
  }
}

/* ============================================================
   REDUCED MOTION
============================================================ */
@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}

/* Stili del Chatbot in linea per facilità di test */
#kx-chat-widget {
  position: fixed;
  bottom: 30px;
  right: 30px;
  z-index: 9999;
  font-family: "Plus Jakarta Sans", sans-serif;
}

/* Bottone di apertura */
#kx-chat-btn {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(120deg, #5ad7ff 0%, #2bf0c0 100%);
  border: none;
  color: #0a0a0c;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 10px 25px rgba(90, 215, 255, 0.3);
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
#kx-chat-btn:hover {
  transform: scale(1.1);
}

/* Finestra della Chat */
#kx-chat-window {
  position: absolute;
  bottom: 80px;
  right: 0;
  width: 350px;
  height: 500px;
  background: rgba(10, 10, 12, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  opacity: 0;
  transform: translateY(20px) scale(0.95);
  pointer-events: none;
  transition:
    opacity 0.4s ease,
    transform 0.4s ease;
}
#kx-chat-window.open {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: all;
}

/* Header */
.kx-chat-header {
  padding: 20px;
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.kx-chat-header h3 {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 8px;
}
.kx-ping {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #2bf0c0;
  box-shadow: 0 0 10px #2bf0c0;
  animation: kx-pulse 2s infinite;
}
@keyframes kx-pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.4;
  }
}

.kx-close-btn {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.5);
  cursor: pointer;
}
.kx-close-btn:hover {
  color: #fff;
}

/* Area Messaggi */
#kx-chat-body {
  flex: 1;
  min-height: 0; /* FIX: senza questo, flex: 1 cresce senza limite e overflow-y non scatta mai */
  padding: 20px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.kx-msg {
  max-width: 85%;
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 13px;
  line-height: 1.5;
}
.kx-msg.bot {
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  align-self: flex-start;
  border-bottom-left-radius: 4px;
}
.kx-msg.user {
  background: #5ad7ff;
  color: #0a0a0c;
  font-weight: 500;
  align-self: flex-end;
  border-bottom-right-radius: 4px;
}

/* Suggerimenti di avvio */
#kx-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 2px;
}
.kx-chip {
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.2;
  padding: 9px 13px;
  border-radius: 100px;
  border: 1px solid rgba(90, 215, 255, 0.28);
  background: rgba(90, 215, 255, 0.08);
  color: #cfeeff;
  cursor: pointer;
  transition:
    background 0.25s,
    border-color 0.25s,
    color 0.25s;
}
.kx-chip:hover {
  background: rgba(90, 215, 255, 0.16);
  border-color: rgba(90, 215, 255, 0.5);
  color: #fff;
}

/* Indicatore "sta scrivendo" */
.kx-typing {
  display: flex;
  gap: 5px;
  align-items: center;
  padding: 15px 16px;
}
.kx-typing span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.55);
  animation: kxBlink 1.2s infinite ease-in-out;
}
.kx-typing span:nth-child(2) {
  animation-delay: 0.18s;
}
.kx-typing span:nth-child(3) {
  animation-delay: 0.36s;
}
@keyframes kxBlink {
  0%,
  80%,
  100% {
    opacity: 0.25;
    transform: translateY(0);
  }
  40% {
    opacity: 1;
    transform: translateY(-3px);
  }
}
@media (prefers-reduced-motion: reduce) {
  .kx-typing span {
    animation: none;
    opacity: 0.6;
  }
}

/* Su mobile il pulsante della chat non deve coprire il consenso privacy */
@media (max-width: 800px) {
  .contact-form {
    padding-bottom: 74px;
  }
}

/* Input Area */
.kx-chat-footer {
  padding: 15px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  gap: 10px;
}
#kx-chat-input {
  flex: 1;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 100px;
  padding: 10px 16px;
  color: #fff;
  font-family: inherit;
  font-size: 13px;
  outline: none;
}
#kx-chat-input:focus {
  border-color: rgba(90, 215, 255, 0.5);
}

#kx-chat-send {
  background: none;
  border: none;
  color: #5ad7ff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 10px;
}
#kx-chat-send:hover {
  transform: scale(1.1);
}

/* ============================================================
   MULTIPAGINA — componenti condivisi dalle pagine interne
   ============================================================ */

/* ── Nav: più voci, spaziatura adattiva ── */
@media (max-width: 1160px) {
  .nav-links {
    gap: 22px;
  }
  .nav-links a {
    font-size: 12.5px;
  }
}
.nav-links a.current {
  color: #fff;
}
.nav-links a.current::after {
  content: "";
  display: block;
  height: 1.5px;
  margin-top: 4px;
  border-radius: 2px;
  background: var(--grad-d);
}

/* ── Hero di pagina interna ── */
.page-hero {
  padding: 132px clamp(20px, 5vw, 52px) 78px;
  border-bottom: 1px solid var(--line);
  position: relative;
  overflow: hidden;
}
.page-hero::before {
  content: "";
  position: absolute;
  width: 780px;
  height: 780px;
  left: -180px;
  top: -420px;
  background: radial-gradient(
    circle,
    rgba(90, 215, 255, 0.14) 0%,
    rgba(90, 215, 255, 0) 62%
  );
  pointer-events: none;
}
.page-hero > * {
  position: relative;
}
.page-hero h1 {
  font-size: clamp(38px, 6.4vw, 82px);
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 0.98;
  max-width: 16ch;
}
.page-hero .lead {
  margin-top: 24px;
  font-size: clamp(16px, 1.5vw, 19px);
  line-height: 1.6;
  color: var(--dim);
  max-width: 58ch;
}
.crumb {
  font-size: 12px;
  font-weight: 600;
  color: var(--dim2);
  margin-bottom: 26px;
}
.crumb a {
  color: var(--dim);
}
.crumb a:hover {
  color: var(--acc);
}

/* ── Sezione generica ── */
.sec-pad {
  padding: clamp(60px, 8vw, 96px) clamp(20px, 5vw, 52px);
  border-bottom: 1px solid var(--line);
}
.sec-pad > h2,
.sec-head h2 {
  font-size: clamp(26px, 3.6vw, 44px);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.06;
  max-width: 20ch;
}
.sec-head {
  margin-bottom: clamp(34px, 4vw, 52px);
  max-width: 62ch;
}
.sec-head p {
  margin-top: 16px;
  font-size: 16px;
  line-height: 1.62;
  color: var(--dim);
}

/* ── Portfolio ── */
.work-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 22px;
}
.work-card {
  background: var(--card);
  border: 1px solid var(--cardbd);
  border-radius: 22px;
  padding: 32px 32px 28px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  opacity: 0;
  transform: translateY(22px);
  transition:
    border-color 0.35s,
    transform 0.35s;
}
.work-card:hover {
  border-color: rgba(90, 215, 255, 0.34);
}
.work-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
}
.work-n {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: var(--dim2);
}
.work-tag {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 5px 11px;
  border-radius: 100px;
  border: 1px solid var(--cardbd);
  color: var(--dim);
  white-space: nowrap;
}
.work-card h3 {
  font-size: clamp(22px, 2.4vw, 29px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
}
.work-meta {
  font-size: 13px;
  font-weight: 600;
  color: var(--acc);
}
.work-body p {
  font-size: 14.5px;
  line-height: 1.62;
  color: var(--dim);
  margin-bottom: 10px;
}
.work-body p:last-child {
  margin-bottom: 0;
}
.work-body strong {
  color: var(--fg);
  font-weight: 700;
}
.work-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 4px;
}
.work-tech span {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  padding: 5px 10px;
  border-radius: 6px;
  background: rgba(127, 127, 127, 0.1);
  border: 1px solid var(--cardbd);
  color: var(--dim);
}
.work-link {
  margin-top: auto;
  padding-top: 18px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 14px;
  font-weight: 700;
  color: var(--acc);
}
.work-link span {
  transition: transform 0.3s;
}
.work-card:hover .work-link span {
  transform: translateX(4px);
}
@media (max-width: 900px) {
  .work-grid {
    grid-template-columns: 1fr;
  }
  .work-card {
    padding: 26px 24px 24px;
  }
}

/* ── Approfondimento servizio ── */
.deep {
  display: grid;
  grid-template-columns: 1fr 1.35fr;
  gap: clamp(28px, 5vw, 72px);
  padding: clamp(52px, 6vw, 80px) 0;
  border-bottom: 1px solid var(--line);
}
.deep:last-child {
  border-bottom: none;
  padding-bottom: 0;
}
.deep-aside h2 {
  font-size: clamp(25px, 3vw, 38px);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.08;
  margin-bottom: 16px;
}
.deep-num {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.2em;
  background: var(--grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 14px;
  display: block;
}
.deep-aside p {
  font-size: 15px;
  line-height: 1.64;
  color: var(--dim);
}
.deep-main p {
  font-size: 16px;
  line-height: 1.68;
  color: var(--dim);
  margin-bottom: 20px;
}
.deep-main p.hi {
  color: var(--fg);
  font-weight: 600;
  font-size: 17px;
}
.deep-main h3 {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--dim2);
  margin: 26px 0 14px;
}
.deep-list {
  display: flex;
  flex-direction: column;
  gap: 11px;
  margin-bottom: 6px;
}
.deep-list div {
  display: flex;
  gap: 12px;
  font-size: 15px;
  line-height: 1.55;
  color: var(--dim);
}
.deep-list div::before {
  content: "";
  flex: none;
  width: 6px;
  height: 6px;
  margin-top: 9px;
  border-radius: 50%;
  background: var(--grad);
}
@media (max-width: 900px) {
  .deep {
    grid-template-columns: 1fr;
    gap: 24px;
  }
}

/* ── Riquadro evidenziato ── */
.callout {
  background: var(--card);
  border: 1px solid var(--cardbd);
  border-radius: 20px;
  padding: 28px 30px;
  margin: 26px 0 0;
}
.callout h4 {
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 10px;
}
.callout p {
  font-size: 14.5px;
  line-height: 1.62;
  color: var(--dim);
  margin: 0;
}
.callout + .callout {
  margin-top: 14px;
}

/* ── CTA di chiusura pagina ── */
.cta-band {
  padding: clamp(64px, 8vw, 104px) clamp(20px, 5vw, 52px);
  text-align: center;
}
.cta-band h2 {
  font-size: clamp(28px, 4.4vw, 54px);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.04;
  margin: 0 auto 18px;
  max-width: 18ch;
}
.cta-band p {
  font-size: 16px;
  color: var(--dim);
  max-width: 52ch;
  margin: 0 auto 30px;
  line-height: 1.6;
}
.cta-row {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ── Footer multipagina ── */
.site-footer {
  padding: clamp(48px, 6vw, 72px) clamp(20px, 5vw, 52px) 34px;
  border-top: 1px solid var(--line);
}
.foot-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 40px;
}
.foot-brand .f-logo {
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 14px;
}
.foot-brand .f-logo em {
  font-style: normal;
  background: var(--grad-d);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.foot-brand p {
  font-size: 14px;
  line-height: 1.6;
  color: var(--dim);
  max-width: 34ch;
  margin-bottom: 18px;
}
.foot-mail {
  font-size: 15px;
  font-weight: 700;
  background: var(--grad-d);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.foot-col h5 {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.42);
  margin-bottom: 16px;
}
.foot-col a {
  display: block;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.62);
  margin-bottom: 11px;
  transition: color 0.25s;
}
.foot-col a:hover {
  color: #fff;
}
.foot-bottom {
  border-top: 1px solid var(--line);
  padding-top: 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
  font-size: 12.5px;
  color: rgba(255, 255, 255, 0.38);
}
@media (max-width: 800px) {
  .foot-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
}

/* ── Card servizio della home che porta alla pagina interna ── */
.srv-card.srv-link {
  cursor: pointer;
}
.srv-more {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 18px;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--acc);
}
.srv-more span {
  transition: transform 0.3s;
}
.srv-card:hover .srv-more span {
  transform: translateX(4px);
}

/* ── Reel: varianti aggiuntive e card finale ── */
.reel-g5 .reel-art::before {
  background:
    radial-gradient(60% 70% at 35% 30%, #ff9f6b 0%, transparent 58%),
    radial-gradient(60% 70% at 75% 72%, #5ad7ff 0%, transparent 62%), #17100c;
}
.reel-g6 .reel-art::before {
  background:
    radial-gradient(60% 70% at 68% 32%, #6f8cff 0%, transparent 60%),
    radial-gradient(60% 70% at 28% 72%, #2bf0c0 0%, transparent 62%), #0a1018;
}
.reel-item.reel-more {
  width: min(42vw, 520px);
}
.reel-more .reel-art::before {
  background:
    radial-gradient(
      70% 80% at 50% 45%,
      rgba(90, 215, 255, 0.22) 0%,
      transparent 62%
    ),
    #0c0f14;
}
.reel-more .reel-n {
  font-size: 26px;
  line-height: 1;
}
@media (max-width: 800px) {
  .reel-item.reel-more {
    width: min(78vw, 420px);
  }
}

/* La colonna di sinistra resta visibile mentre si legge quella lunga */
@media (min-width: 901px) {
  .deep-aside {
    position: sticky;
    top: 96px;
    align-self: start;
  }
}

/* ============================================================
   FRAME — finestra di browser con anteprima del sito
   ============================================================ */
.frame {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  background: #0d1117;
  border: 1px solid var(--cardbd);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.06) inset,
    0 24px 60px -28px rgba(0, 0, 0, 0.55);
  margin-bottom: 22px;
}
.frame-bar {
  height: 34px;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 0 13px;
  background: #14181f;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}
.frame-bar i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  flex: none;
  background: #3a4150;
}
.frame-bar i:nth-child(1) {
  background: #ff5f57;
}
.frame-bar i:nth-child(2) {
  background: #febc2e;
}
.frame-bar i:nth-child(3) {
  background: #28c840;
}
.frame-url {
  flex: 1;
  margin-left: 8px;
  height: 21px;
  border-radius: 100px;
  background: rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: rgba(255, 255, 255, 0.5);
  overflow: hidden;
  white-space: nowrap;
}
.frame-url svg {
  flex: none;
  opacity: 0.6;
}
.frame-view {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #0a0a0c;
}
.frame-view iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 1440px;
  height: 900px;
  border: 0;
  transform-origin: 0 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.7s ease;
}
.frame-view iframe.ready {
  opacity: 1;
}
.frame-poster {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-align: center;
  padding: 20px;
  transition: opacity 0.6s ease;
}
.frame-poster.hidden {
  opacity: 0;
}
.frame-poster b {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #fff;
}
.frame-poster span {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.4);
}
.frame-shade {
  position: absolute;
  inset: auto 0 0 0;
  height: 42%;
  background: linear-gradient(transparent, rgba(10, 10, 12, 0.5));
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.5s;
}
.work-card:hover .frame-shade {
  opacity: 1;
}
.frame-open {
  position: absolute;
  right: 14px;
  bottom: 14px;
  z-index: 3;
  padding: 9px 16px;
  border-radius: 100px;
  font-size: 12.5px;
  font-weight: 700;
  color: #05070a;
  background: var(--grad-d);
  opacity: 0;
  transform: translateY(8px);
  transition:
    opacity 0.35s,
    transform 0.35s;
}
.work-card:hover .frame-open {
  opacity: 1;
  transform: translateY(0);
}
@media (hover: none) {
  .frame-open {
    opacity: 1;
    transform: none;
  }
}
/* La card che contiene una finestra parte a tutta larghezza */
.work-card:has(.frame) {
  padding: 14px 14px 24px;
}
.work-card:has(.frame) > :not(.frame) {
  padding-left: 12px;
  padding-right: 12px;
}

/* Schermata a pagina intera che scorre dentro la finestra */
.frame-shot {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: auto;
  display: block;
  opacity: 0;
  transition: opacity 0.7s ease;
  will-change: transform;
}
.frame-shot.ready {
  opacity: 1;
}

/* Campo cinetico dell'hero (canvas WebGL) */
#heroFx {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  display: block;
  pointer-events: none;
  opacity: 0;
  transition: opacity 1.2s ease 0.15s;
}
#heroFx.on {
  opacity: 1;
}
@media (max-width: 900px) {
  #heroFx {
    display: none;
  }
}

/* ============================================================
   PAGEFX — pannello di passaggio fra le pagine
   Si ritira da solo con questa animazione: anche senza
   JavaScript il sito resta navigabile.
   ============================================================ */
.pfx {
  position: fixed;
  inset: 0;
  /* sopra tutto, cursore e widget della chat compresi */
  z-index: 2147483000;
  background: #0a0a0c;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: translateY(0);
  animation: pfxAway 0.72s cubic-bezier(0.76, 0, 0.24, 1) 0.06s forwards;
}
.pfx--boot {
  animation-play-state: paused;
}
.pfx--leaving {
  animation: pfxCover 0.44s cubic-bezier(0.76, 0, 0.24, 1) forwards;
}
@keyframes pfxAway {
  to {
    transform: translateY(-101%);
    visibility: hidden;
  }
}
@keyframes pfxCover {
  from {
    transform: translateY(101%);
    visibility: visible;
  }
  to {
    transform: translateY(0);
    visibility: visible;
  }
}
.pfx-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
}
.pfx-logo {
  font-size: clamp(20px, 3vw, 30px);
  font-weight: 800;
  letter-spacing: -0.04em;
  color: #fff;
}
.pfx-logo em {
  font-style: normal;
  background: linear-gradient(120deg, #5ad7ff 0%, #2bf0c0 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.pfx-count {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.3em;
  color: rgba(255, 255, 255, 0.34);
  font-variant-numeric: tabular-nums;
  opacity: 0;
}
.pfx--boot .pfx-count {
  opacity: 1;
}
.pfx-rule {
  width: min(220px, 40vw);
  height: 1px;
  background: rgba(255, 255, 255, 0.12);
  position: relative;
  overflow: hidden;
}
.pfx-rule::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, #5ad7ff, #2bf0c0);
  transform: scaleX(0);
  transform-origin: 0 50%;
  animation: pfxRule 1.4s ease-out forwards;
}
.pfx--boot .pfx-rule::after {
  animation-duration: 2.6s;
}
@keyframes pfxRule {
  to {
    transform: scaleX(1);
  }
}
@media (prefers-reduced-motion: reduce) {
  .pfx {
    animation: none;
    transform: translateY(-101%);
    visibility: hidden;
  }
  .pfx--leaving {
    animation: none;
  }
}

/* ============================================================
   PIPE — il percorso di un ordine, dal messaggio al gestionale
   ============================================================ */
.pipe-wrap {
  padding: clamp(46px, 5vw, 70px) 0 0;
}
.pipe-hd h3 {
  font-size: clamp(20px, 2.4vw, 28px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.14;
  max-width: 26ch;
  margin-bottom: 10px;
}
.pipe-hd p {
  font-size: 15px;
  line-height: 1.6;
  color: var(--dim);
  max-width: 58ch;
  margin-bottom: 34px;
}
.pipe {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  align-items: start;
  gap: 0;
}
.pipe-step {
  position: relative;
  padding: 0 16px 0 0;
  opacity: 0;
  transform: translateY(18px);
}
.pipe-ico {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  margin-bottom: 16px;
  border: 1px solid var(--cardbd);
  background: var(--card);
  color: var(--acc);
  position: relative;
  z-index: 2;
}
.pipe-ico svg {
  width: 19px;
  height: 19px;
}
.pipe-n {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: var(--dim2);
  margin-bottom: 7px;
}
.pipe-step h4 {
  font-size: 15.5px;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}
.pipe-step p {
  font-size: 13.5px;
  line-height: 1.58;
  color: var(--dim);
  margin: 0;
  padding-right: 6px;
}

/* Il binario che collega un passaggio al successivo */
.pipe-step::before {
  content: "";
  position: absolute;
  top: 20px;
  left: 46px;
  right: -2px;
  height: 1px;
  background: var(--line2);
}
.pipe-step:last-child::before {
  display: none;
}
.pipe-step::after {
  content: "";
  position: absolute;
  top: 19.5px;
  left: 46px;
  right: -2px;
  height: 2px;
  border-radius: 2px;
  background: var(--grad);
  transform: scaleX(0);
  transform-origin: 0 50%;
  transition: transform 0.85s cubic-bezier(0.65, 0, 0.35, 1);
}
.pipe-step.lit::after {
  transform: scaleX(1);
}
.pipe-step:last-child::after {
  display: none;
}

/* Il pacchetto che percorre il binario */
.pipe-dot {
  position: absolute;
  top: 20px;
  left: 46px;
  width: 7px;
  height: 7px;
  margin-top: -3px;
  border-radius: 50%;
  background: var(--acc);
  box-shadow: 0 0 12px 2px color-mix(in srgb, var(--acc) 55%, transparent);
  opacity: 0;
}
.pipe-step.lit .pipe-dot {
  animation: pipeRun 2.8s cubic-bezier(0.5, 0, 0.5, 1) infinite;
}
.pipe-step:last-child .pipe-dot {
  display: none;
}
@keyframes pipeRun {
  0% {
    opacity: 0;
    transform: translateX(0);
  }
  12% {
    opacity: 1;
  }
  82% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translateX(var(--run, 160px));
  }
}
.pipe-step:nth-child(2) .pipe-dot {
  animation-delay: 0.5s;
}
.pipe-step:nth-child(3) .pipe-dot {
  animation-delay: 1s;
}
.pipe-step:nth-child(4) .pipe-dot {
  animation-delay: 1.5s;
}

@media (max-width: 900px) {
  .pipe {
    grid-template-columns: 1fr;
    gap: 4px;
  }
  .pipe-step {
    padding: 0 0 26px 58px;
  }
  .pipe-ico {
    position: absolute;
    left: 0;
    top: 0;
    margin: 0;
  }
  .pipe-step::before,
  .pipe-step::after {
    top: 46px;
    bottom: -4px;
    left: 21px;
    right: auto;
    width: 1px;
    height: auto;
  }
  .pipe-step::after {
    transform: scaleY(0);
    transform-origin: 50% 0;
  }
  .pipe-step.lit::after {
    transform: scaleY(1);
  }
  .pipe-dot {
    display: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  .pipe-step.lit .pipe-dot {
    animation: none;
  }
}

/* ============================================================
   CUCITURE — il passaggio fra una sezione chiara e una scura
   La sezione che arriva sale sopra quella precedente, con un
   bordo arrotondato e una riga di luce sulla giunzione.
   ============================================================ */
.sec--light + .sec--dark,
.sec--dark + .sec--light,
.sec--light + .site-footer,
.sec--dark + .cta-band,
.sec--light + .cta-band {
  position: relative;
  z-index: 1;
  margin-top: -34px;
  border-top-left-radius: 34px;
  border-top-right-radius: 34px;
  box-shadow: 0 -30px 70px -34px rgba(0, 0, 0, 0.6);
}
/* la riga di luce sulla giunzione */
.sec--light + .sec--dark::before,
.sec--dark + .sec--light::before,
.sec--light + .site-footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  width: min(560px, 62%);
  height: 1px;
  transform: translateX(-50%) scaleX(0);
  background: linear-gradient(
    90deg,
    transparent,
    var(--accent) 30%,
    var(--accent2) 70%,
    transparent
  );
  opacity: 0.75;
  transition: transform 1.1s cubic-bezier(0.65, 0, 0.35, 1);
  pointer-events: none;
}
.seam-lit::before {
  transform: translateX(-50%) scaleX(1);
}
@media (max-width: 700px) {
  .sec--light + .sec--dark,
  .sec--dark + .sec--light,
  .sec--light + .site-footer,
  .sec--dark + .cta-band,
  .sec--light + .cta-band {
    margin-top: -22px;
    border-top-left-radius: 22px;
    border-top-right-radius: 22px;
  }
}

/* ============================================================
   TITOLI — le parole entrano una dopo l'altra
   ============================================================ */
.w {
  display: inline-block;
  overflow: hidden;
  vertical-align: bottom;
}
.w > i {
  display: inline-block;
  font-style: inherit;
  transform: translateY(110%);
}
.split-ready .w > i {
  transform: translateY(0);
  transition: transform 0.9s cubic-bezier(0.19, 1, 0.22, 1);
}
.split-ready .w:nth-child(1) > i {
  transition-delay: 0.02s;
}
.split-ready .w:nth-child(2) > i {
  transition-delay: 0.07s;
}
.split-ready .w:nth-child(3) > i {
  transition-delay: 0.12s;
}
.split-ready .w:nth-child(4) > i {
  transition-delay: 0.17s;
}
.split-ready .w:nth-child(5) > i {
  transition-delay: 0.22s;
}
.split-ready .w:nth-child(6) > i {
  transition-delay: 0.27s;
}
.split-ready .w:nth-child(n + 7) > i {
  transition-delay: 0.32s;
}
@media (prefers-reduced-motion: reduce) {
  .w > i {
    transform: none;
  }
}

/* ============================================================
   NUMERO FANTASMA dietro i blocchi di approfondimento
   ============================================================ */
.deep {
  position: relative;
}
.deep[data-ghost]::before {
  content: attr(data-ghost);
  position: absolute;
  top: -18px;
  left: -12px;
  font-size: clamp(120px, 17vw, 230px);
  font-weight: 800;
  letter-spacing: -0.06em;
  line-height: 0.8;
  color: var(--fg);
  opacity: 0.035;
  pointer-events: none;
  user-select: none;
  will-change: transform;
  transform: translateY(var(--ghost-y, 0px));
  z-index: 0;
}
.deep > * {
  position: relative;
  z-index: 1;
}
@media (max-width: 900px) {
  .deep[data-ghost]::before {
    font-size: 110px;
    top: -6px;
  }
}

/* ============================================================
   LAB — tre dimostrazioni interattive nella pagina Web & Design
   ============================================================ */
.lab-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 40px;
}
.lab-tile {
  background: var(--card);
  border: 1px solid var(--cardbd);
  border-radius: 20px;
  padding: 22px 22px 20px;
  display: flex;
  flex-direction: column;
  min-height: 300px;
  opacity: 0;
  transform: translateY(20px);
}
.lab-stage {
  flex: 1;
  border-radius: 14px;
  background: rgba(127, 127, 127, 0.07);
  border: 1px solid var(--line);
  position: relative;
  overflow: hidden;
  display: grid;
  place-items: center;
  margin-bottom: 16px;
  touch-action: none;
}
.lab-tile h4 {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 6px;
}
.lab-tile p {
  font-size: 13px;
  line-height: 1.55;
  color: var(--dim);
  margin: 0;
}
.lab-hint {
  position: absolute;
  left: 12px;
  bottom: 10px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--dim2);
  pointer-events: none;
}

/* 1 — bottone magnetico */
.lab-magnet {
  padding: 14px 30px;
  border-radius: 100px;
  font-size: 14px;
  font-weight: 700;
  color: #05070a;
  background: var(--grad);
  border: none;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  font-family: inherit;
}
.lab-ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.55);
  transform: translate(-50%, -50%) scale(0);
  pointer-events: none;
  animation: labRipple 0.65s ease-out forwards;
}
@keyframes labRipple {
  to {
    transform: translate(-50%, -50%) scale(9);
    opacity: 0;
  }
}

/* 2 — testo che si compone */
.lab-type {
  padding: 18px;
  text-align: center;
  font-size: clamp(15px, 1.5vw, 19px);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.25;
}
.lab-replay {
  position: absolute;
  right: 10px;
  bottom: 9px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--acc);
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  padding: 4px 6px;
}

/* 3 — griglia reattiva */
.lab-dots {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  gap: 0;
}
.lab-dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--dim2);
  position: absolute;
  will-change: transform;
  transition: background 0.3s;
}
.lab-dot.near {
  background: var(--acc);
}

@media (max-width: 1000px) {
  .lab-grid {
    grid-template-columns: 1fr;
  }
  .lab-tile {
    min-height: 250px;
  }
}

/* ============================================================
   DEMO CHAT — la conversazione che si scrive da sola
   ============================================================ */
.demo-chat {
  margin: 26px 0 6px;
  border: 1px solid var(--cardbd);
  border-radius: 18px;
  background: var(--card);
  overflow: hidden;
  position: relative;
}
.demo-head {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 13px 18px;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--fg);
  background: rgba(127, 127, 127, 0.05);
}
.demo-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #2bf0c0;
  box-shadow: 0 0 0 0 rgba(43, 240, 192, 0.55);
  animation: demoPing 2.2s ease-out infinite;
}
@keyframes demoPing {
  70%,
  100% {
    box-shadow: 0 0 0 7px rgba(43, 240, 192, 0);
  }
}
.demo-head span:last-child {
  margin-left: auto;
  font-weight: 600;
  color: var(--dim2);
  letter-spacing: 0.12em;
  font-size: 10px;
  text-transform: uppercase;
}
.demo-body {
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 11px;
  min-height: 268px;
}
.demo-msg {
  max-width: 82%;
  padding: 11px 15px;
  border-radius: 13px;
  font-size: 13.5px;
  line-height: 1.5;
  opacity: 0;
  transform: translateY(8px);
  transition:
    opacity 0.35s ease,
    transform 0.35s ease;
}
.demo-msg.on {
  opacity: 1;
  transform: none;
}
.demo-msg.user {
  align-self: flex-end;
  background: var(--acc);
  color: #05070a;
  font-weight: 600;
  border-bottom-right-radius: 4px;
}
.demo-msg.bot {
  align-self: flex-start;
  background: rgba(127, 127, 127, 0.12);
  color: var(--fg);
  border-bottom-left-radius: 4px;
}
.demo-msg .caret {
  display: inline-block;
  width: 2px;
  height: 1em;
  background: var(--acc);
  vertical-align: -2px;
  margin-left: 2px;
  animation: demoCaret 0.9s steps(1) infinite;
}
@keyframes demoCaret {
  50% {
    opacity: 0;
  }
}
.demo-typing {
  align-self: flex-start;
  display: none;
  gap: 4px;
  padding: 14px 16px;
  border-radius: 13px;
  background: rgba(127, 127, 127, 0.12);
}
.demo-typing.on {
  display: flex;
}
.demo-typing i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--dim);
  animation: kxBlink 1.2s infinite ease-in-out;
}
.demo-typing i:nth-child(2) {
  animation-delay: 0.18s;
}
.demo-typing i:nth-child(3) {
  animation-delay: 0.36s;
}
.demo-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 18px;
  border-top: 1px solid var(--line);
  font-size: 12px;
  color: var(--dim2);
}
.demo-replay {
  font-family: inherit;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--acc);
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px 2px;
}
@media (prefers-reduced-motion: reduce) {
  .demo-msg {
    opacity: 1;
    transform: none;
  }
}

/* ============================================================
   PATH — il percorso verticale del processo (pagina Studio)
   ============================================================ */
.path {
  position: relative;
  padding-left: 54px;
}
.path::before {
  content: "";
  position: absolute;
  left: 17px;
  top: 8px;
  bottom: 8px;
  width: 1px;
  background: var(--line2);
}
.path-fill {
  position: absolute;
  left: 16px;
  top: 8px;
  width: 3px;
  border-radius: 3px;
  height: 0;
  background: var(--grad);
  box-shadow: 0 0 14px 0 color-mix(in srgb, var(--acc) 45%, transparent);
}
.path-step {
  position: relative;
  padding-bottom: 34px;
}
.path-step:last-child {
  padding-bottom: 0;
}
.path-bullet {
  position: absolute;
  left: -54px;
  top: 2px;
  width: 35px;
  height: 35px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: var(--dim);
  background: var(--bg);
  border: 1px solid var(--line2);
  transition:
    color 0.4s,
    border-color 0.4s,
    transform 0.45s cubic-bezier(0.22, 1.4, 0.4, 1);
}
.path-step.on .path-bullet {
  color: #05070a;
  border-color: transparent;
  background: var(--grad);
  transform: scale(1.12);
}
.path-step h3 {
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.025em;
  color: var(--fg);
  margin: 0 0 9px;
  text-transform: none;
  letter-spacing: -0.025em;
}
.path-step p {
  font-size: 15px;
  line-height: 1.66;
  color: var(--dim);
  margin: 0;
}
@media (max-width: 600px) {
  .path {
    padding-left: 42px;
  }
  .path-bullet {
    left: -42px;
    width: 29px;
    height: 29px;
    font-size: 10px;
  }
  .path::before {
    left: 14px;
  }
  .path-fill {
    left: 13px;
  }
}

/* ============================================================
   STACK — la griglia viva delle tecnologie (pagina Studio)
   ============================================================ */
.stack-group + .stack-group {
  margin-top: 34px;
}
.stack-group h3 {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--dim2);
  margin-bottom: 16px;
}
.stack-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}
.stack-grid span {
  --chip-d: 0ms;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 10px 16px;
  border-radius: 10px;
  border: 1px solid var(--cardbd);
  background: var(--card);
  color: var(--dim);
  opacity: 0;
  transform: translateY(12px) scale(0.96);
  transition:
    opacity 0.5s ease var(--chip-d),
    transform 0.5s cubic-bezier(0.22, 1, 0.36, 1) var(--chip-d),
    color 0.25s,
    border-color 0.25s,
    background 0.25s;
  cursor: default;
}
.stack-lit span {
  opacity: 1;
  transform: none;
}
.stack-grid span:hover {
  color: var(--fg);
  border-color: color-mix(in srgb, var(--acc) 45%, transparent);
  background: color-mix(in srgb, var(--acc) 9%, transparent);
}

/* ============================================================
   FORM — avanzamento e messa a fuoco (pagina Contatti)
   ============================================================ */
.form-progress {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 22px;
  font-size: 12px;
  font-weight: 600;
  color: var(--dim2);
}
.form-progress .bar {
  flex: 1;
  height: 2px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.1);
  overflow: hidden;
}
.form-progress .bar i {
  display: block;
  height: 100%;
  width: 0%;
  border-radius: 2px;
  background: var(--grad-d);
  transition: width 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}
.form-progress .num {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.field {
  position: relative;
}
.field::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  border-radius: 2px;
  background: var(--grad-d);
  transform: scaleX(0);
  transform-origin: 0 50%;
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: none;
}
.field.focused::after {
  transform: scaleX(1);
}
.field.filled label {
  color: rgba(255, 255, 255, 0.75);
}

/* Il bottone secondario deve reggere anche sulle sezioni chiare */
.sec--light .btn-g {
  color: var(--l-fg);
  border-color: rgba(11, 13, 18, 0.2);
}
.sec--light .btn-g:hover {
  border-color: rgba(11, 13, 18, 0.42);
  background: rgba(11, 13, 18, 0.04);
}

/* ============================================================
   LAVORI IN HOME — una sola sezione, sei anteprime che scorrono
   ============================================================ */
.works-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
  margin-bottom: clamp(30px, 4vw, 48px);
}
.works-head > div {
  max-width: 58ch;
}
.works-head h2 {
  font-size: clamp(28px, 4vw, 50px);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.04;
  margin-bottom: 14px;
}
.works-head p {
  font-size: 16px;
  line-height: 1.6;
  color: var(--dim);
  max-width: 52ch;
}
.works-cta {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 11px;
  padding: 17px 32px;
  border-radius: 100px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: #05070a;
  background: var(--grad);
  box-shadow: 0 14px 34px -16px color-mix(in srgb, var(--acc) 70%, transparent);
  transition:
    transform 0.35s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.35s;
}
.works-cta span {
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}
.works-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 44px -16px color-mix(in srgb, var(--acc) 80%, transparent);
}
.works-cta:hover span {
  transform: translateX(5px);
}
.works-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.wtile {
  display: block;
  opacity: 0;
  transform: translateY(22px);
}
.wtile .frame {
  margin-bottom: 14px;
  transition:
    transform 0.45s cubic-bezier(0.22, 1, 0.36, 1),
    border-color 0.35s,
    box-shadow 0.45s;
}
.wtile:hover .frame {
  transform: translateY(-5px);
  border-color: color-mix(in srgb, var(--acc) 40%, transparent);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.06) inset,
    0 34px 70px -30px rgba(0, 0, 0, 0.6);
}
.wtile-foot {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 0 2px;
}
.wtile-foot b {
  display: block;
  font-size: 15.5px;
  font-weight: 800;
  letter-spacing: -0.025em;
  color: var(--fg);
  margin-bottom: 3px;
}
.wtile-foot small {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--dim);
}
.wtile-foot i {
  font-style: normal;
  font-size: 15px;
  color: var(--acc);
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}
.wtile:hover .wtile-foot i {
  transform: translate(4px, -4px);
}
@media (max-width: 1050px) {
  .works-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 700px) {
  .works-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 22px;
  }
  .works-cta {
    width: 100%;
    justify-content: center;
  }
  .works-grid {
    grid-template-columns: 1fr;
  }
}

/* ============================================================
   BAND — la striscia dei settori fra Lavori e Servizi
   ============================================================ */
.band {
  padding: 26px 0;
  overflow: hidden;
  position: relative;
  z-index: 1;
}
.band-track {
  display: flex;
  width: max-content;
  gap: 0;
  animation: bandRun 44s linear infinite;
}
.band:hover .band-track {
  animation-play-state: paused;
}
.band-track span {
  display: inline-flex;
  align-items: center;
  gap: 26px;
  padding-right: 26px;
  font-size: clamp(15px, 1.7vw, 21px);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: rgba(255, 255, 255, 0.42);
  white-space: nowrap;
}
.band-track span::after {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent2);
  opacity: 0.75;
  flex: none;
}
@keyframes bandRun {
  to {
    transform: translateX(-50%);
  }
}
@media (prefers-reduced-motion: reduce) {
  .band-track {
    animation: none;
  }
}

/* ============================================================
   Le sezioni che escono dallo schermo arretrano di un passo
   ============================================================ */
.recede {
  will-change: transform, opacity;
}

/* ============================================================
   SAY — la frase che si accende parola per parola sullo scroll
   ============================================================ */
.say {
  min-height: 190svh;
  position: relative;
  z-index: 1;
}
.say-inner {
  position: sticky;
  top: 0;
  height: 100svh;
  display: grid;
  place-items: center;
  padding: 0 clamp(22px, 6vw, 96px);
}
.say-text {
  font-size: clamp(27px, 4.6vw, 62px);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.16;
  text-align: center;
  max-width: 20ch;
  margin: 0;
}
.say-w {
  color: rgba(255, 255, 255, 0.13);
  transition: color 0.2s linear;
}
.say-w.lit {
  color: #fff;
}
.say-w.accent.lit {
  background: var(--grad-d);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
@media (max-width: 700px) {
  .say {
    min-height: 165svh;
  }
  .say-text {
    max-width: 16ch;
  }
}
@media (prefers-reduced-motion: reduce) {
  .say {
    min-height: 0;
  }
  .say-inner {
    position: static;
    height: auto;
    padding-top: 18vh;
    padding-bottom: 18vh;
  }
  .say-w {
    color: #fff;
  }
}

/* I numeri del processo si accendono quando la riga entra */
.proc-n {
  transition:
    color 0.5s ease,
    opacity 0.5s ease;
}
.proc-row.lit .proc-n {
  background: var(--grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  opacity: 1;
}

/* ============================================================
   SERVIZI — elenco a sinistra, scheda viva a destra
   Su schermo stretto le righe diventano fisarmoniche: stesso
   contenuto, nessuna colonna che si schiaccia.
   ============================================================ */
.svc {
  display: grid;
  grid-template-columns: 1fr 1.05fr;
  gap: clamp(28px, 4vw, 64px);
  align-items: start;
}
.svc-group {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--dim2);
  padding: 0 0 12px;
  margin-top: 26px;
  border-bottom: 1px solid var(--line);
}
.svc-group:first-child {
  margin-top: 0;
}
.svc-row {
  display: grid;
  grid-template-columns: 38px 1fr 22px;
  align-items: center;
  gap: 14px;
  width: 100%;
  text-align: left;
  padding: 21px 4px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: none;
  color: inherit;
  font-family: inherit;
  cursor: pointer;
  position: relative;
  transition: padding-left 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}
.svc-row::before {
  content: "";
  position: absolute;
  left: -22px;
  top: 50%;
  width: 3px;
  height: 0;
  border-radius: 3px;
  background: var(--grad);
  transform: translateY(-50%);
  transition: height 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}
.svc-row.on::before {
  height: 62%;
}
.svc-row.on {
  padding-left: 12px;
}
.svc-n {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  color: var(--dim2);
  transition: color 0.35s;
}
.svc-row.on .svc-n {
  color: var(--acc);
}
.svc-t {
  font-size: clamp(17px, 1.9vw, 23px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.16;
  color: var(--dim);
  transition: color 0.35s;
}
.svc-row.on .svc-t,
.svc-row:hover .svc-t {
  color: var(--fg);
}
.svc-arrow {
  font-style: normal;
  font-size: 15px;
  color: var(--dim2);
  opacity: 0;
  transform: translateX(-6px);
  transition:
    opacity 0.35s,
    transform 0.35s,
    color 0.35s;
}
.svc-row.on .svc-arrow {
  opacity: 1;
  transform: none;
  color: var(--acc);
}

/* la scheda che accompagna la riga scelta */
.svc-panel {
  position: sticky;
  top: 92px;
  border: 1px solid var(--cardbd);
  background: var(--card);
  border-radius: 22px;
  padding: 30px 32px 28px;
  min-height: 372px;
  overflow: hidden;
}
.svc-card {
  display: none;
}
.svc-card.on {
  display: block;
  animation: svcIn 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}
@keyframes svcIn {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
}
.svc-card h3 {
  font-size: clamp(21px, 2.3vw, 28px);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.1;
  margin-bottom: 12px;
}
.svc-card > p {
  font-size: 15px;
  line-height: 1.62;
  color: var(--dim);
  margin-bottom: 20px;
}
.svc-card ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0 0 22px;
  padding: 0;
}
.svc-card li {
  display: flex;
  gap: 11px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--dim);
}
.svc-card li::before {
  content: "";
  flex: none;
  width: 5px;
  height: 5px;
  margin-top: 8px;
  border-radius: 50%;
  background: var(--grad);
}
.svc-more {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-top: 4px;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--acc);
}
.svc-more span {
  transition: transform 0.3s;
}
.svc-more:hover span {
  transform: translateX(4px);
}

@media (max-width: 950px) {
  .svc {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .svc-panel {
    position: static;
    border: 0;
    background: none;
    border-radius: 0;
    padding: 0;
    min-height: 0;
    overflow: visible;
  }
  .svc-card.on {
    animation: none;
    padding: 4px 4px 26px;
    border-bottom: 1px solid var(--line);
  }
  .svc-card h3 {
    display: none;
  }
  .svc-row.on {
    border-bottom-color: transparent;
    padding-left: 4px;
  }
  .svc-row::before {
    left: -14px;
  }
}

/* La frase introduce i servizi: anche fra due sezioni scure
   serve lo stacco, altrimenti sembrano la stessa. */
.say + .sec--dark {
  position: relative;
  z-index: 1;
  margin-top: -34px;
  border-top-left-radius: 34px;
  border-top-right-radius: 34px;
  box-shadow: 0 -30px 70px -34px rgba(0, 0, 0, 0.75);
  background: #0f1013;
}
@media (max-width: 700px) {
  .say + .sec--dark {
    margin-top: -22px;
    border-top-left-radius: 22px;
    border-top-right-radius: 22px;
  }
}
