/* ============================================================
   BosCom — Design System "Blue AI Control Room" 2026
   Palette allineata al logo: blu BosCom, ciano elettrico,
   superfici profonde e interfacce futuristiche da regia AI.
   ============================================================ */

:root {
  /* superfici */
  --bg0: #020817;
  --bg1: #061432;
  --panel: #081d46;
  --panel-2: #0c2a63;
  --line: rgba(124, 180, 255, 0.16);
  --line-strong: rgba(124, 180, 255, 0.34);

  /* testo */
  --text: #f6fbff;
  --muted: #b6caf8;
  --faint: #7495d8;

  /* accenti */
  --emerald: #6be7ff;
  --emerald-deep: #1f72ff;
  --gold: #2358ff;
  --gold-soft: rgba(35, 88, 255, 0.18);
  --blue-logo: #123fc8;
  --blue-hot: #2f6bff;
  --cyan: #6be7ff;
  --wa: #23b559;

  --glow-e: 0 0 34px rgba(107, 231, 255, 0.3);
  --glow-g: 0 0 34px rgba(35, 88, 255, 0.42);
  --shadow: 0 26px 70px rgba(0, 7, 30, 0.62);
  --radius: 16px;
  --radius-sm: 10px;

  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Inter", ui-sans-serif, system-ui, sans-serif;

  color-scheme: dark;
  font-family: var(--font-body);
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg0);
  color: var(--text);
  font-size: 16.5px;
  line-height: 1.65;
  /* niente overflow-x:hidden qui: romperebbe position:sticky
     (vedi nota in fondo al file) */
}

img { max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.01em;
  margin: 0 0 16px;
  text-wrap: balance;
}

h1 em, h2 em, .gold-i {
  font-style: italic;
  font-weight: 700;
  color: var(--gold);
}

p { margin: 0 0 14px; }

::selection { background: rgba(35, 88, 255, 0.35); }

::-webkit-scrollbar { width: 11px; }
::-webkit-scrollbar-track { background: var(--bg0); }
::-webkit-scrollbar-thumb { background: #0c2a63; border-radius: 8px; }

/* nota d'autore in oro corsivo */
.hand-note {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(17px, 2.4vw, 21px);
  line-height: 1.4;
  color: var(--gold);
}

/* reveal on scroll */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 650ms cubic-bezier(0.2, 0.65, 0.3, 1), transform 650ms cubic-bezier(0.2, 0.65, 0.3, 1);
  transition-delay: var(--reveal-delay, 0ms);
}

.reveal.is-visible { opacity: 1; transform: none; }

/* ------------------------------------------------------------
   Layout base
   ------------------------------------------------------------ */
.section-inner {
  width: min(1140px, calc(100% - 40px));
  margin: 0 auto;
}

.section-dark,
.section-ink,
.section-light,
.page-section {
  position: relative;
  padding: clamp(64px, 9.5vw, 116px) 0;
}

.section-light { background: var(--bg0); }

.section-ink {
  background:
    radial-gradient(880px 460px at 85% 0%, rgba(107, 231, 255, 0.06), transparent 62%),
    var(--bg1);
}

.section-dark {
  background:
    radial-gradient(760px 420px at 12% 10%, rgba(35, 88, 255, 0.05), transparent 60%),
    var(--bg0);
}

.section-heading {
  max-width: 760px;
  margin-bottom: clamp(28px, 5vw, 52px);
}

.section-heading h2 { font-size: clamp(30px, 5vw, 46px); }

.section-heading p {
  color: var(--muted);
  font-size: clamp(15.5px, 2vw, 18px);
}

.section-heading.compact { margin-bottom: 26px; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  color: var(--gold);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.eyebrow::before {
  content: "";
  width: 26px;
  height: 1.5px;
  background: var(--gold);
}

/* ------------------------------------------------------------
   Bottoni
   ------------------------------------------------------------ */
.button,
.header-cta {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 54px;
  padding: 0 28px;
  border: 1.5px solid transparent;
  border-radius: 100px;
  font: 700 15.5px/1.2 var(--font-body);
  cursor: pointer;
  overflow: hidden;
  transition: transform 200ms cubic-bezier(0.34, 1.4, 0.6, 1), box-shadow 200ms ease, border-color 200ms ease, background 200ms ease;
  -webkit-tap-highlight-color: transparent;
  text-align: center;
}

.button-primary {
  background: linear-gradient(120deg, #6be7ff, var(--gold) 55%, #123fc8);
  color: #f6fbff;
  box-shadow: 0 12px 30px rgba(35, 88, 255, 0.25);
}

.button-primary::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, transparent 30%, rgba(255, 255, 255, 0.5) 50%, transparent 70%);
  transform: translateX(-130%);
  transition: transform 550ms ease;
}

.button-primary:hover::after { transform: translateX(130%); }

.button-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 40px rgba(35, 88, 255, 0.4);
}

.button-secondary {
  background: rgba(107, 231, 255, 0.06);
  border-color: rgba(107, 231, 255, 0.45);
  color: var(--text);
}

.button-secondary:hover {
  transform: translateY(-2px);
  border-color: var(--emerald);
  box-shadow: var(--glow-e);
}

.button-whatsapp {
  background: var(--wa);
  color: #f2fff6;
  box-shadow: 0 12px 30px rgba(35, 181, 89, 0.3);
}

.button-whatsapp:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 40px rgba(35, 181, 89, 0.45);
}

.button-whatsapp::before {
  content: "";
  width: 22px;
  height: 22px;
  flex: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32' fill='%23f2fff6'%3E%3Cpath d='M16 2.7C8.7 2.7 2.8 8.6 2.8 15.9c0 2.6.8 5 2.1 7L2.7 29.3l6.6-2.1c1.9 1.2 4.2 1.8 6.7 1.8 7.3 0 13.2-5.9 13.2-13.2S23.3 2.7 16 2.7zm0 24c-2.2 0-4.3-.6-6-1.7l-.4-.3-3.9 1.2 1.3-3.8-.3-.4a10.7 10.7 0 0 1-1.7-5.8C5 9.9 9.9 5 16 5s11 4.9 11 10.9-4.9 10.8-11 10.8zm6-8.1c-.3-.2-1.9-1-2.2-1.1-.3-.1-.5-.2-.8.2s-.9 1.1-1 1.3c-.2.2-.4.2-.7.1s-1.4-.5-2.6-1.6c-1-.9-1.6-1.9-1.8-2.2-.2-.3 0-.5.1-.7l.5-.6c.2-.2.2-.4.3-.6.1-.2.1-.4 0-.6l-1.1-2.7c-.3-.7-.6-.6-.8-.6h-.7c-.2 0-.6.1-.9.4-.3.3-1.2 1.1-1.2 2.8s1.2 3.2 1.4 3.4c.2.2 2.4 3.7 5.9 5.2.8.4 1.5.6 2 .7.8.3 1.6.2 2.2.1.7-.1 1.9-.8 2.2-1.5.3-.8.3-1.4.2-1.5-.1-.2-.3-.3-.6-.4z'/%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
}

/* ------------------------------------------------------------
   Header
   ------------------------------------------------------------ */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 13px clamp(16px, 4vw, 48px);
  background: rgba(10, 16, 14, 0.72);
  border-bottom: 1px solid transparent;
  backdrop-filter: blur(18px) saturate(1.3);
  -webkit-backdrop-filter: blur(18px) saturate(1.3);
  transition: background 220ms ease, border-color 220ms ease;
}

.site-header.is-scrolled {
  background: rgba(10, 16, 14, 0.92);
  border-color: var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-logo {
  width: clamp(102px, 12vw, 128px);
  filter: brightness(0) invert(1);
  transition: transform 250ms ease;
}

.brand:hover .brand-logo { transform: scale(1.03); }

.brand strong,
.brand small { display: block; }

.brand strong {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.15;
}

.brand small {
  margin-top: 2px;
  color: var(--faint);
  font-size: 10.5px;
  letter-spacing: 0.04em;
}

.site-header nav {
  display: none;
  align-items: center;
  gap: 4px;
  color: var(--muted);
  font-size: 14.5px;
  font-weight: 500;
}

.site-header nav a {
  position: relative;
  padding: 9px 13px;
  border-radius: 100px;
  transition: color 180ms ease, background 180ms ease;
}

.site-header nav a:hover {
  color: var(--text);
  background: rgba(214, 235, 222, 0.07);
}

.nav-audit { display: none; }

.menu-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 43px;
  padding: 0 17px;
  border: 1.5px solid var(--line-strong);
  border-radius: 100px;
  background: rgba(214, 235, 222, 0.05);
  color: var(--text);
  font: 700 13.5px/1 var(--font-body);
  cursor: pointer;
  transition: border-color 180ms ease;
}

.menu-toggle:hover { border-color: var(--gold); }

.header-cta {
  display: none;
  min-height: 45px;
  padding: 0 22px;
  font-size: 14.5px;
  background: linear-gradient(120deg, #6be7ff, var(--gold) 55%, #123fc8);
  color: #f6fbff;
}

.header-cta:hover { transform: translateY(-1px); box-shadow: var(--glow-g); }

/* menu mobile a tutto schermo */
.site-header.menu-open {
  background: var(--bg0);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.site-header.menu-open nav {
  position: fixed;
  inset: 0;
  z-index: -1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  padding: 90px 28px 40px;
  background:
    radial-gradient(600px 420px at 85% 12%, rgba(107, 231, 255, 0.09), transparent 62%),
    var(--bg0);
  font-family: var(--font-display);
  font-size: 27px;
  font-weight: 600;
  color: var(--text);
}

.site-header.menu-open nav a {
  padding: 13px 4px;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  animation: menu-in 440ms cubic-bezier(0.2, 0.7, 0.25, 1) both;
}

.site-header.menu-open nav a:nth-child(2) { animation-delay: 40ms; }
.site-header.menu-open nav a:nth-child(3) { animation-delay: 80ms; }
.site-header.menu-open nav a:nth-child(4) { animation-delay: 120ms; }
.site-header.menu-open nav a:nth-child(5) { animation-delay: 160ms; }
.site-header.menu-open nav a:nth-child(6) { animation-delay: 200ms; }

.site-header.menu-open .nav-audit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 24px;
  min-height: 56px;
  border: 0;
  border-radius: 100px;
  background: linear-gradient(120deg, #6be7ff, var(--gold) 55%, #123fc8);
  color: #f6fbff;
  font-family: var(--font-body);
  font-size: 17px;
  font-weight: 700;
}

@keyframes menu-in {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: none; }
}

/* ------------------------------------------------------------
   Hero: il consulente a 360 gradi
   ------------------------------------------------------------ */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 120px 0 60px;
  overflow: hidden;
  background:
    radial-gradient(900px 560px at 82% 30%, rgba(107, 231, 255, 0.07), transparent 60%),
    radial-gradient(700px 480px at 8% 85%, rgba(35, 88, 255, 0.05), transparent 60%),
    var(--bg0);
}

.hero-grid {
  position: relative;
  z-index: 2;
  display: grid;
  gap: 40px;
  width: min(1140px, calc(100% - 40px));
  margin: 0 auto;
  align-items: center;
}

.hero-copy h1 {
  font-size: clamp(36px, 7vw, 64px);
  margin-bottom: 20px;
}

.hero-copy > p {
  max-width: 590px;
  color: var(--muted);
  font-size: clamp(16px, 2.2vw, 19px);
}

.hero-copy > p strong { color: var(--text); font-weight: 600; }

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 28px;
}

.hero-stats {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-top: 34px;
  max-width: 600px;
}

.hero-stats article {
  display: grid;
  grid-template-columns: 108px 1fr;
  gap: 14px;
  align-items: baseline;
  padding: 4px 0;
}

@media (min-width: 480px) {
  .hero-stats { grid-template-columns: repeat(3, 1fr); gap: 16px; }
  .hero-stats article { display: block; }
}

.hero-stats strong {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(26px, 4vw, 38px);
  font-weight: 700;
  color: var(--gold);
}

.hero-stats span {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.45;
}

.hero-trust {
  margin-top: 30px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  color: var(--faint);
  font-size: 13.5px;
}

.hero-trust b { color: var(--muted); font-weight: 600; }

/* palco della sfera 3D */
.globe-stage {
  position: relative;
  justify-self: center;
  width: min(520px, 92vw);
  aspect-ratio: 1;
}

.hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.globe-stage::before {
  content: "";
  position: absolute;
  inset: 12%;
  border-radius: 50%;
  background:
    linear-gradient(90deg, transparent 49%, rgba(107, 231, 255, 0.22) 50%, transparent 51%),
    linear-gradient(0deg, transparent 49%, rgba(35, 88, 255, 0.24) 50%, transparent 51%),
    radial-gradient(circle, rgba(107, 231, 255, 0.13), transparent 65%);
  background-size: 100% 100%, 100% 100%, 100% 100%;
  box-shadow:
    inset 0 0 70px rgba(35, 88, 255, 0.16),
    0 0 80px rgba(35, 88, 255, 0.22);
  pointer-events: none;
}

.globe-stage::after {
  content: "";
  position: absolute;
  inset: -8%;
  border-radius: 50%;
  border: 1px solid rgba(107, 231, 255, 0.16);
  background:
    conic-gradient(from 110deg, transparent 0 24%, rgba(107, 231, 255, 0.22) 25%, transparent 31% 57%, rgba(35, 88, 255, 0.28) 60%, transparent 66% 100%);
  filter: blur(0.2px);
  animation: ai-ring-spin 18s linear infinite;
  pointer-events: none;
  opacity: 0.9;
}

.ai-hud {
  position: absolute;
  z-index: 4;
  width: min(210px, 42vw);
  padding: 12px 14px;
  border: 1px solid rgba(107, 231, 255, 0.32);
  border-radius: 14px;
  background:
    linear-gradient(135deg, rgba(9, 32, 79, 0.92), rgba(4, 13, 35, 0.72)),
    rgba(4, 13, 35, 0.82);
  box-shadow: 0 20px 46px rgba(0, 9, 40, 0.38), 0 0 28px rgba(35, 88, 255, 0.22);
  backdrop-filter: blur(14px);
  overflow: hidden;
  pointer-events: none;
}

.ai-hud::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, transparent, rgba(107, 231, 255, 0.28), transparent);
  transform: translateX(-130%);
  animation: hud-scan 3.8s ease-in-out infinite;
}

.ai-hud span,
.ai-hud strong {
  position: relative;
  display: block;
}

.ai-hud span {
  margin-bottom: 4px;
  color: var(--cyan);
  font: 800 10px/1 var(--font-body);
  letter-spacing: 0.18em;
}

.ai-hud strong {
  color: var(--text);
  font-size: 12.5px;
  line-height: 1.25;
}

.ai-hud-left {
  left: -4%;
  top: 18%;
  animation: hud-float-a 5.2s ease-in-out infinite;
}

.ai-hud-right {
  right: -6%;
  top: 58%;
  animation: hud-float-b 5.6s ease-in-out infinite;
}

@keyframes ai-ring-spin {
  to { rotate: 360deg; }
}

@keyframes hud-scan {
  0%, 42% { transform: translateX(-130%); }
  68%, 100% { transform: translateX(130%); }
}

@keyframes hud-float-a {
  0%, 100% { transform: translate3d(0, 0, 0); }
  50% { transform: translate3d(8px, -10px, 0); }
}

@keyframes hud-float-b {
  0%, 100% { transform: translate3d(0, 0, 0); }
  50% { transform: translate3d(-10px, 8px, 0); }
}

.flow-story {
  position: absolute;
  left: 50%;
  bottom: 13%;
  z-index: 3;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 10px;
  width: min(94%, 470px);
  translate: -50% 0;
  pointer-events: none;
}

.flow-story span,
.flow-story strong {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: rgba(10, 16, 14, 0.78);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.24);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.2;
  text-align: center;
  backdrop-filter: blur(12px);
}

.flow-story span {
  color: var(--muted);
  animation: flow-chip 4.8s ease-in-out infinite;
}

.flow-story strong {
  color: #f6fbff;
  background: linear-gradient(120deg, #6be7ff, var(--gold) 55%, #123fc8);
  border-color: rgba(35, 88, 255, 0.65);
  box-shadow: var(--glow-g);
  animation: flow-core 2.4s ease-in-out infinite;
}

.flow-story span:last-child { animation-delay: 1.2s; }

@keyframes flow-chip {
  0%, 100% { opacity: 0.72; transform: translateY(0); }
  45% { opacity: 1; transform: translateY(-4px); border-color: rgba(107, 231, 255, 0.42); }
}

@keyframes flow-core {
  0%, 100% { transform: scale(1); filter: brightness(1); }
  50% { transform: scale(1.055); filter: brightness(1.08); }
}

@media (max-width: 520px) {
  .ai-hud { display: none; }

  .flow-story {
    bottom: 8%;
    grid-template-columns: 1fr;
    width: min(78%, 310px);
  }

  .flow-story span,
  .flow-story strong {
    min-height: 34px;
    padding: 7px 10px;
    font-size: 11px;
  }
}

/* anello orbitante con le aree aziendali (posizioni gestite da JS) */
.orbit {
  position: absolute;
  inset: 3%;
  border-radius: 50%;
  border: 1px dashed rgba(214, 235, 222, 0.16);
  pointer-events: none;
}

.orbit span {
  position: absolute;
  left: 50%;
  top: 50%;
  padding: 7px 15px;
  border: 1px solid var(--line-strong);
  border-radius: 100px;
  background: rgba(14, 25, 21, 0.92);
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
  transform: translate(-50%, -50%);
}

.globe-caption {
  position: absolute;
  left: 50%;
  bottom: -8px;
  translate: -50% 0;
  white-space: nowrap;
}

/* ------------------------------------------------------------
   Le 6 aree della digitalizzazione
   ------------------------------------------------------------ */
.area-grid { display: grid; gap: 16px; }

.area-card {
  position: relative;
  display: grid;
  gap: 9px;
  align-content: start;
  padding: 26px 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(165deg, rgba(107, 231, 255, 0.05), rgba(107, 231, 255, 0.008) 55%), var(--panel);
  transition: transform 240ms ease, border-color 240ms ease, box-shadow 240ms ease;
  overflow: hidden;
}

.area-card::after {
  content: "";
  position: absolute;
  top: 0;
  left: 24px;
  right: 24px;
  height: 2px;
  background: linear-gradient(90deg, var(--gold), transparent);
  opacity: 0;
  transition: opacity 240ms ease;
}

.area-card:hover {
  transform: translateY(-5px);
  border-color: rgba(35, 88, 255, 0.45);
  box-shadow: var(--shadow);
}

.area-card:hover::after { opacity: 1; }

.area-card i {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: rgba(35, 88, 255, 0.08);
  font-style: normal;
  font-size: 21px;
}

.area-card h3 { margin: 4px 0 0; font-size: 20px; }
.area-card p { margin: 0; color: var(--muted); font-size: 14.5px; }

/* ------------------------------------------------------------
   Percorso di consulenza
   ------------------------------------------------------------ */
.steps-grid {
  display: grid;
  gap: 16px;
  counter-reset: passo;
}

.step-card {
  position: relative;
  padding: 26px 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  transition: transform 220ms ease, border-color 220ms ease;
}

.step-card:hover { transform: translateY(-4px); border-color: var(--line-strong); }

.step-card::before {
  counter-increment: passo;
  content: "0" counter(passo);
  display: block;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 38px;
  font-weight: 700;
  color: var(--gold);
  line-height: 1;
  margin-bottom: 12px;
}

.step-card h3 { font-size: 21px; margin-bottom: 8px; }
.step-card p { margin: 0; color: var(--muted); font-size: 14.8px; }

/* ------------------------------------------------------------
   Portfolio
   ------------------------------------------------------------ */
.portfolio-showcase {
  display: grid;
  gap: 14px;
}

.portfolio-feature {
  display: grid;
  gap: 14px;
  padding: clamp(14px, 2vw, 18px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(165deg, rgba(214, 235, 222, 0.05), rgba(214, 235, 222, 0.01));
  transition: transform 260ms ease, border-color 260ms ease, box-shadow 260ms ease;
}

.portfolio-feature:hover {
  transform: translateY(-5px);
  border-color: rgba(35, 88, 255, 0.4);
  box-shadow: var(--shadow);
}

.portfolio-feature h3 { font-size: clamp(18px, 2.1vw, 22px); margin: 5px 0 6px; }
.portfolio-feature p { color: var(--muted); font-size: 13.8px; line-height: 1.45; }

.project-kicker {
  display: inline-flex;
  width: fit-content;
  max-width: 100%;
  padding: 5px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--emerald);
  background: rgba(107, 231, 255, 0.08);
  font-size: 10.5px;
  font-weight: 850;
  line-height: 1.2;
}

.project-media {
  position: relative;
  min-height: 126px;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--line);
}

.project-photo img {
  width: 100%;
  height: 100%;
  min-height: 126px;
  object-fit: cover;
  transition: transform 550ms ease;
}

.portfolio-feature:hover .project-photo img,
.portfolio-card:hover .project-photo img { transform: scale(1.045); }

.visual-3d {
  display: grid;
  place-content: center;
  gap: 6px;
  text-align: center;
  padding: 18px 14px;
  background:
    radial-gradient(240px 160px at 50% 10%, rgba(107, 231, 255, 0.1), transparent 70%),
    var(--panel);
}

.visual-3d img {
  width: 56px;
  margin: 0 auto 4px;
  filter: drop-shadow(0 12px 20px rgba(2, 8, 5, 0.6));
}

.visual-3d strong {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
}

.project-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 6px;
  color: var(--emerald);
  font-size: 14.5px;
  font-weight: 700;
}

.project-link::after { content: "↗"; transition: transform 200ms ease; }
.project-link:hover::after { transform: translate(3px, -3px); }

.portfolio-grid {
  display: grid;
  gap: 16px;
  margin-top: 26px;
}

.portfolio-grid article,
.portfolio-card {
  display: grid;
  gap: 8px;
  align-content: start;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  transition: transform 240ms ease, border-color 240ms ease, box-shadow 240ms ease;
}

.portfolio-feature.portfolio-card {
  gap: 14px;
  padding: clamp(14px, 2vw, 18px);
}

.portfolio-grid article:hover,
.portfolio-card:hover {
  transform: translateY(-4px);
  border-color: var(--line-strong);
  box-shadow: var(--shadow);
}

.portfolio-grid h3 { font-size: 18px; margin: 0; }
.portfolio-grid p { margin: 0; color: var(--muted); font-size: 14px; }

.portfolio-card .project-media { min-height: 126px; }
.portfolio-card h3 { margin: 6px 0 0; font-size: 18px; }
.portfolio-card p { margin: 0; color: var(--muted); font-size: 14px; }

.portfolio-actions { display: flex; justify-content: center; margin-top: 34px; }

/* ------------------------------------------------------------
   Calcolatore
   ------------------------------------------------------------ */
.rognometro-grid {
  display: grid;
  gap: 36px;
  align-items: center;
}

.rognometro-copy h2 { font-size: clamp(29px, 5vw, 44px); }
.rognometro-copy > p { color: var(--muted); max-width: 470px; font-size: 16.5px; }

.rognometro-orbit { display: none; }

.rognometro-panel {
  display: grid;
  gap: 20px;
  padding: clamp(22px, 4vw, 32px);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: linear-gradient(160deg, rgba(35, 88, 255, 0.06), rgba(35, 88, 255, 0.01) 50%), var(--panel);
  box-shadow: var(--shadow);
}

.rognometro-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
  align-items: baseline;
}

.rognometro-head strong { font-family: var(--font-display); font-size: 20px; }

.rognometro-head span {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 16px;
  font-weight: 600;
  color: var(--gold);
}

.rognometro-questions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.pain-option {
  position: relative;
  display: grid;
  gap: 6px;
  min-height: 112px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.035);
  color: var(--text);
  text-align: left;
  cursor: pointer;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.pain-option::after {
  content: "+";
  position: absolute;
  top: 12px;
  right: 14px;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: rgba(107, 231, 255, 0.12);
  color: #6be7ff;
  font-weight: 900;
}

.pain-option strong { font-size: 15px; padding-right: 28px; }
.pain-option span { color: var(--muted); font-size: 12.8px; line-height: 1.35; }

.pain-option:hover,
.pain-option.is-selected {
  transform: translateY(-2px);
  border-color: rgba(107, 231, 255, 0.65);
  background: linear-gradient(145deg, rgba(35, 88, 255, 0.22), rgba(107, 231, 255, 0.08));
  box-shadow: 0 18px 46px rgba(35, 88, 255, 0.22);
}

.pain-option.is-selected::after {
  content: "✓";
  background: #6be7ff;
  color: #071428;
}

.rognometro-result {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 20px;
  align-items: center;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}

.score-ring {
  --score-angle: 0deg;
  position: relative;
  display: grid;
  place-content: center;
  width: 112px;
  height: 112px;
  border-radius: 50%;
  background:
    radial-gradient(closest-side, var(--panel) 76%, transparent 77%),
    conic-gradient(var(--gold) var(--score-angle), rgba(214, 235, 222, 0.12) 0deg);
  text-align: center;
  flex: none;
}

.score-ring strong {
  font-family: var(--font-display);
  font-size: 31px;
  font-weight: 700;
  line-height: 1;
  color: var(--gold);
}

.score-ring span { font-size: 10.5px; color: var(--faint); letter-spacing: 0.05em; }

.rognometro-result h3 { font-size: 20px; margin-bottom: 6px; }
.rognometro-result p { margin: 0; color: var(--muted); font-size: 14.2px; }

.calc-euro { margin: 10px 0 0 !important; font-size: 14.5px !important; }

.calc-euro strong {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 24px;
  font-weight: 700;
  color: var(--gold);
}

.rognometro-actions { display: flex; flex-wrap: wrap; gap: 14px; }

.privacy-check,
.chat-privacy {
  display: flex !important;
  align-items: flex-start;
  gap: 10px;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.35;
}

.privacy-check input,
.chat-privacy input {
  width: 18px;
  min-width: 18px;
  height: 18px;
  margin-top: 1px;
  accent-color: #2358ff;
}

@media (max-width: 620px) {
  .rognometro-questions { grid-template-columns: 1fr; }
  .pain-option { min-height: auto; }
  .rognometro-result { grid-template-columns: 1fr; }
}

/* ------------------------------------------------------------
   Pacchetti / livelli di consulenza
   ------------------------------------------------------------ */
.pricing-grid {
  display: grid;
  gap: 16px;
  margin-bottom: 28px;
}

.package-card {
  position: relative;
  display: grid;
  gap: 10px;
  align-content: start;
  padding: 28px 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  cursor: pointer;
  transition: transform 220ms ease, border-color 220ms ease, box-shadow 220ms ease;
}

.package-card:hover { transform: translateY(-4px); border-color: var(--line-strong); }

.package-card.is-active {
  border-color: rgba(35, 88, 255, 0.55);
  background: linear-gradient(165deg, rgba(35, 88, 255, 0.07), rgba(35, 88, 255, 0.01) 55%), var(--panel);
  box-shadow: 0 0 0 1px rgba(35, 88, 255, 0.3), var(--shadow);
}

.package-card.featured::before {
  content: "Il più scelto";
  position: absolute;
  top: -13px;
  right: 18px;
  padding: 5px 14px;
  border-radius: 100px;
  background: linear-gradient(120deg, #6be7ff, var(--gold));
  color: #f6fbff;
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.package-card h3 { font-size: 23px; margin: 0; }

.package-card .price {
  margin: 0;
  font-family: var(--font-display);
  font-size: 36px;
  font-weight: 700;
  color: var(--gold);
}

.package-card .price span {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  color: var(--faint);
}

.package-card > p { color: var(--muted); font-size: 14.5px; margin: 0; }

.package-card ul {
  margin: 8px 0 4px;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
}

.package-card li {
  position: relative;
  padding-left: 26px;
  color: var(--muted);
  font-size: 14.2px;
}

.package-card li::before {
  content: "✓";
  position: absolute;
  left: 1px;
  top: 0;
  color: var(--emerald);
  font-weight: 800;
}

.package-card button {
  justify-self: start;
  margin-top: 8px;
  padding: 10px 18px;
  border: 1.5px solid var(--line-strong);
  border-radius: 100px;
  background: transparent;
  color: var(--text);
  font: 600 13px/1 var(--font-body);
  cursor: pointer;
  transition: border-color 180ms ease, background 180ms ease;
}

.package-card button:hover { border-color: var(--gold); background: var(--gold-soft); }

.package-detail {
  display: grid;
  gap: 20px;
  padding: clamp(24px, 4vw, 34px);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: linear-gradient(160deg, rgba(107, 231, 255, 0.05), rgba(107, 231, 255, 0.01) 55%), var(--panel);
}

.package-detail [data-package-kicker] {
  color: var(--gold);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.package-detail h3 { margin: 8px 0; font-size: clamp(21px, 3vw, 27px); }
.package-detail > div > p { margin: 0; color: var(--muted); }

.package-detail-grid { display: grid; gap: 14px; }

.package-detail-grid > div {
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg0);
}

.package-detail-grid strong {
  display: block;
  margin-bottom: 5px;
  font-family: var(--font-display);
  font-size: 15px;
  color: var(--gold);
}

.package-detail-grid p { margin: 0; color: var(--muted); font-size: 13.8px; }
.package-detail .button { justify-self: start; }

.pricing-note { margin-top: 24px; text-align: center; }

/* ------------------------------------------------------------
   Chi sono
   ------------------------------------------------------------ */
.founder-grid {
  display: grid;
  gap: 40px;
  align-items: center;
}

.founder-grid h2 { font-size: clamp(28px, 4.6vw, 40px); }
.founder-grid p { color: var(--muted); font-size: 16px; }

.founder-portrait {
  position: relative;
  justify-self: center;
  width: min(330px, 80vw);
}

.founder-portrait img {
  width: 100%;
  display: block;
  border-radius: var(--radius);
  border: 1px solid var(--line-strong);
  box-shadow: var(--shadow);
  filter: saturate(0.94);
}

.founder-portrait::before {
  content: "";
  position: absolute;
  inset: -14px -14px 14px 14px;
  border: 1px solid rgba(35, 88, 255, 0.35);
  border-radius: var(--radius);
  pointer-events: none;
}

.founder-portrait span {
  position: absolute;
  left: 50%;
  bottom: -16px;
  translate: -50% 0;
  padding: 8px 18px;
  border-radius: 100px;
  border: 1px solid var(--line-strong);
  background: var(--bg0);
  font-family: var(--font-display);
  font-style: italic;
  font-size: 15px;
  color: var(--gold);
  white-space: nowrap;
}

.tape::before { display: none; }

.social-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 16px 0 20px;
}

.social-links a {
  padding: 8px 18px;
  border: 1.5px solid var(--line-strong);
  border-radius: 100px;
  color: var(--muted);
  font-size: 13.5px;
  font-weight: 600;
  transition: color 180ms ease, border-color 180ms ease, transform 180ms ease;
}

.social-links a:hover {
  color: var(--text);
  border-color: var(--gold);
  transform: translateY(-2px);
}

.quote-row { display: grid; gap: 12px; margin-bottom: 20px; }

.quote-row blockquote {
  margin: 0;
  padding: 4px 0 4px 20px;
  border-left: 3px solid var(--gold);
  color: var(--muted);
  font-family: var(--font-display);
  font-style: italic;
  font-size: 17.5px;
  font-weight: 500;
}

/* ------------------------------------------------------------
   Audit / form
   ------------------------------------------------------------ */
.audit-grid {
  display: grid;
  gap: 36px;
  align-items: start;
}

.audit-grid h2 { font-size: clamp(29px, 5vw, 44px); }
.audit-grid > div > p { color: var(--muted); max-width: 470px; font-size: 16.5px; }

.audit-aside { display: grid; gap: 18px; justify-items: start; margin-top: 10px; }

.audit-form {
  position: relative;
  display: grid;
  gap: 15px;
  padding: clamp(24px, 4vw, 34px);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: linear-gradient(165deg, rgba(35, 88, 255, 0.05), rgba(35, 88, 255, 0.01) 50%), var(--panel);
  box-shadow: var(--shadow);
}

.audit-form label {
  display: grid;
  gap: 7px;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
}

.audit-form input,
.audit-form textarea {
  width: 100%;
  padding: 13px 15px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--bg0);
  color: var(--text);
  font: 500 15.5px/1.45 var(--font-body);
  transition: border-color 180ms ease, box-shadow 180ms ease;
}

.audit-form input:focus,
.audit-form textarea:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(35, 88, 255, 0.15);
}

.audit-form textarea { resize: vertical; min-height: 108px; }

.hp-field {
  position: absolute !important;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.captcha-field span {
  padding: 10px 14px;
  border: 1px dashed rgba(35, 88, 255, 0.55);
  border-radius: var(--radius-sm);
  color: var(--gold);
  font-weight: 700;
  background: var(--gold-soft);
}

.form-note { margin: 0; color: var(--faint); font-size: 12.8px; }

.form-stamp {
  position: absolute;
  top: -16px;
  right: 20px;
  padding: 7px 16px;
  border-radius: 100px;
  background: linear-gradient(120deg, #6be7ff, var(--gold));
  color: #f6fbff;
  font: 800 12px/1 var(--font-body);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  rotate: 2deg;
}

.stamp.is-stamped { animation: stamp-in 460ms cubic-bezier(0.2, 1.5, 0.4, 1) both; }

@keyframes stamp-in {
  0% { transform: scale(2.2); opacity: 0; }
  60% { transform: scale(0.95); opacity: 1; }
  100% { transform: scale(1); }
}

/* ------------------------------------------------------------
   Strip pagine SEO
   ------------------------------------------------------------ */
.seo-card-grid { display: grid; gap: 14px; }

.seo-card-grid a {
  display: grid;
  gap: 7px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  transition: transform 220ms ease, border-color 220ms ease;
}

.seo-card-grid a:hover {
  transform: translateY(-4px);
  border-color: rgba(35, 88, 255, 0.4);
}

.seo-card-grid span {
  color: var(--gold);
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.seo-card-grid strong {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 600;
  line-height: 1.35;
}

/* ------------------------------------------------------------
   Footer
   ------------------------------------------------------------ */
footer {
  display: grid;
  gap: 10px;
  justify-items: center;
  padding: 54px 24px 100px;
  border-top: 1px solid var(--line);
  background: var(--bg1);
  text-align: center;
  color: var(--muted);
  font-size: 14px;
}

footer img {
  width: 120px;
  margin-bottom: 4px;
  filter: brightness(0) invert(1) opacity(0.92);
}

footer strong { font-family: var(--font-display); color: var(--text); font-size: 17px; }

footer a {
  color: var(--muted);
  border-bottom: 1px solid transparent;
  transition: color 180ms ease, border-color 180ms ease;
}

footer a:hover { color: var(--gold); border-color: var(--gold); }

/* ------------------------------------------------------------
   Feed Instagram in home
   ------------------------------------------------------------ */
.instagram-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-top: 34px;
}

.instagram-post {
  position: relative;
  display: block;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg1);
  transition: transform 220ms ease, border-color 220ms ease, box-shadow 220ms ease;
}

.instagram-post img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 420ms ease;
}

.instagram-post:hover {
  transform: translateY(-4px);
  border-color: var(--gold);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
}

.instagram-post:hover img { transform: scale(1.06); }

.instagram-video {
  position: absolute;
  right: 10px;
  top: 8px;
  font-size: 13px;
  color: #fff;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.8);
  pointer-events: none;
}

@media (max-width: 900px) {
  .instagram-grid { grid-template-columns: repeat(3, 1fr); gap: 10px; }
}

@media (max-width: 560px) {
  .instagram-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
}

/* indirizzo visibile: Google confronta questo con i dati strutturati */
.footer-address {
  font-style: normal;
  font-size: 13px;
  color: var(--muted);
  opacity: 0.85;
  max-width: 520px;
  line-height: 1.6;
}

.footer-social {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 18px;
  margin-top: 2px;
}

/* mappa del sito nel footer: tiene collegate tutte le pagine */
.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 20px;
  max-width: 720px;
  margin-top: 6px;
}

/* ------------------------------------------------------------
   Cookie banner
   ------------------------------------------------------------ */
.cookie-banner {
  position: fixed;
  left: 14px;
  right: 14px;
  bottom: 14px;
  z-index: 70;
  display: grid;
  gap: 14px;
  padding: 18px 20px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: rgba(14, 25, 21, 0.97);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
  font-size: 13.5px;
  animation: banner-in 420ms ease both;
}

@keyframes banner-in {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: none; }
}

.cookie-banner.is-hidden { display: none; }
.cookie-banner strong { font-family: var(--font-display); font-size: 16px; }
.cookie-banner p { margin: 4px 0 0; color: var(--muted); }

.cookie-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.cookie-actions a { color: var(--faint); font-size: 12.8px; text-decoration: underline; }

.cookie-actions button {
  min-height: 42px;
  padding: 0 18px;
  border: 1.5px solid var(--line-strong);
  border-radius: 100px;
  background: transparent;
  color: var(--text);
  font: 700 13px/1 var(--font-body);
  cursor: pointer;
  transition: transform 160ms ease;
}

.cookie-actions button[data-cookie-accept] {
  border: 0;
  background: linear-gradient(120deg, #6be7ff, var(--gold));
  color: #f6fbff;
}

.cookie-actions button:hover { transform: translateY(-1px); }

/* ------------------------------------------------------------
   Chatbot BotCom
   ------------------------------------------------------------ */
.chatbot {
  position: fixed;
  right: 14px;
  bottom: 14px;
  z-index: 80;
  display: grid;
  justify-items: end;
  gap: 12px;
}

.chatbot-toggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  padding: 6px 20px 6px 8px;
  border: 1px solid var(--line-strong);
  border-radius: 100px;
  background: rgba(14, 25, 21, 0.95);
  color: var(--text);
  font: 700 14.5px/1 var(--font-body);
  cursor: pointer;
  box-shadow: var(--shadow), var(--glow-e);
  backdrop-filter: blur(12px);
  transition: transform 220ms cubic-bezier(0.34, 1.5, 0.6, 1), box-shadow 220ms ease;
}

.chatbot-toggle:hover { transform: translateY(-3px); }

.chatbot-face {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  background: rgba(107, 231, 255, 0.1);
  overflow: hidden;
}

.chatbot-face img { width: 74%; }

.chatbot.is-open .chatbot-toggle { display: none; }

.chatbot-panel {
  display: none;
  width: min(380px, calc(100vw - 28px));
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: rgba(14, 25, 21, 0.98);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.chatbot.is-open .chatbot-panel {
  display: grid;
  animation: chat-in 300ms cubic-bezier(0.2, 0.7, 0.25, 1) both;
}

@keyframes chat-in {
  from { opacity: 0; transform: translateY(14px) scale(0.99); }
  to { opacity: 1; transform: none; }
}

.chatbot-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  background: rgba(35, 88, 255, 0.06);
}

.chatbot-head img { width: 80px; filter: brightness(0) invert(1); }
.chatbot-head strong { display: block; font-family: var(--font-display); font-size: 15px; }
.chatbot-head span { color: var(--muted); font-size: 12px; }

.chatbot-head button {
  margin-left: auto;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  color: var(--text);
  font-size: 14px;
  cursor: pointer;
  transition: background 180ms ease;
}

.chatbot-head button:hover { background: rgba(214, 235, 222, 0.08); }

.chatbot-messages {
  display: grid;
  gap: 10px;
  max-height: 300px;
  padding: 16px;
  overflow-y: auto;
  scroll-behavior: smooth;
}

.bot-msg,
.user-msg {
  max-width: 88%;
  margin: 0;
  padding: 11px 14px;
  border-radius: 14px;
  font-size: 13.8px;
  line-height: 1.5;
  animation: msg-in 240ms ease both;
}

@keyframes msg-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

.bot-msg {
  justify-self: start;
  border-bottom-left-radius: 4px;
  background: rgba(214, 235, 222, 0.07);
  border: 1px solid var(--line);
  color: var(--text);
}

.user-msg {
  justify-self: end;
  border-bottom-right-radius: 4px;
  background: linear-gradient(120deg, #6be7ff, var(--gold));
  color: #f6fbff;
  font-weight: 600;
}

.chatbot-form {
  display: flex;
  gap: 8px;
  padding: 12px 16px;
  border-top: 1px solid var(--line);
}

.chatbot-form input {
  flex: 1;
  min-width: 0;
  padding: 11px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 100px;
  background: var(--bg0);
  color: var(--text);
  font: 500 13.8px/1.4 var(--font-body);
}

.chatbot-form input:focus { outline: none; border-color: var(--gold); }

.chatbot-form button {
  min-height: 42px;
  padding: 0 18px;
  border: 0;
  border-radius: 100px;
  background: linear-gradient(120deg, #6be7ff, var(--gold));
  color: #f6fbff;
  font: 700 13px/1 var(--font-body);
  cursor: pointer;
}

.chatbot-lead { padding: 0 16px 8px; font-size: 13px; color: var(--muted); }
.chatbot-lead summary { cursor: pointer; padding: 6px 0; color: var(--gold); font-weight: 600; }

.chatbot-lead-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 8px 0;
}

.chatbot-lead-grid input {
  padding: 10px 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--bg0);
  color: var(--text);
  font: 500 13px/1.4 var(--font-body);
}

.chatbot-quick {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 16px 16px;
}

.chatbot-quick button {
  padding: 8px 14px;
  border: 1.5px solid var(--line-strong);
  border-radius: 100px;
  background: transparent;
  color: var(--muted);
  font: 600 12.5px/1 var(--font-body);
  cursor: pointer;
  transition: color 180ms ease, border-color 180ms ease;
}

.chatbot-quick button:hover { color: var(--text); border-color: var(--gold); }

/* ------------------------------------------------------------
   Pagine interne
   ------------------------------------------------------------ */
.page-main { padding-top: 74px; }

.page-hero {
  position: relative;
  padding: clamp(66px, 10vw, 122px) 0;
  overflow: hidden;
  background:
    radial-gradient(720px 420px at 82% 12%, rgba(107, 231, 255, 0.07), transparent 62%),
    radial-gradient(520px 360px at 8% 88%, rgba(35, 88, 255, 0.05), transparent 62%),
    var(--bg0);
}

.page-hero > div {
  position: relative;
  width: min(880px, calc(100% - 40px));
  margin: 0 auto;
  text-align: center;
}

.page-hero h1 { font-size: clamp(31px, 6vw, 52px); margin-bottom: 16px; }

.page-hero p {
  margin: 0 auto;
  max-width: 640px;
  color: var(--muted);
  font-size: clamp(15.5px, 2.2vw, 18px);
}

.page-section { background: var(--bg1); }

.page-grid {
  display: grid;
  gap: 40px;
  align-items: center;
}

.page-grid h2 { font-size: clamp(25px, 4.4vw, 37px); }
.page-grid > div > p { color: var(--muted); }

.page-visual {
  display: grid;
  place-items: center;
  padding: 34px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    radial-gradient(280px 200px at 50% 30%, rgba(107, 231, 255, 0.1), transparent 70%),
    var(--panel);
}

.page-visual img { width: min(210px, 52%); filter: drop-shadow(0 20px 30px rgba(2, 8, 5, 0.6)); }

.page-card-grid { display: grid; gap: 15px; }

.page-card {
  display: grid;
  gap: 8px;
  align-content: start;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  transition: transform 220ms ease, border-color 220ms ease, box-shadow 220ms ease;
}

.page-card:hover {
  transform: translateY(-4px);
  border-color: rgba(35, 88, 255, 0.4);
  box-shadow: var(--shadow);
}

.page-card span {
  color: var(--gold);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.page-card h3 { margin: 0; font-size: 18px; }
.page-card p { margin: 0; color: var(--muted); font-size: 14.2px; }

.pain-grid,
.case-grid { display: grid; gap: 15px; }

.pain-grid article,
.case-grid article {
  display: grid;
  gap: 7px;
  align-content: start;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  transition: transform 220ms ease, border-color 220ms ease;
}

.pain-grid article:hover,
.case-grid article:hover { transform: translateY(-4px); border-color: var(--line-strong); }

.pain-grid span {
  color: var(--gold);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.pain-grid h3,
.case-grid h3 { margin: 0; font-size: 17.5px; }

.pain-grid p,
.case-grid p { margin: 0; color: var(--muted); font-size: 14.2px; }

.compare-grid { display: grid; gap: 16px; }

.compare-grid article {
  padding: 26px 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}

.compare-grid article.after {
  border-color: rgba(107, 231, 255, 0.4);
  background: linear-gradient(165deg, rgba(107, 231, 255, 0.06), rgba(107, 231, 255, 0.01)), var(--panel);
}

.compare-grid span {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #e88a7a;
}

.compare-grid .after span { color: var(--emerald); }
.compare-grid h3 { margin: 8px 0 12px; font-size: 20px; }

.compare-grid ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 9px;
}

.compare-grid li {
  position: relative;
  padding-left: 24px;
  color: var(--muted);
  font-size: 14.2px;
}

.compare-grid li::before {
  content: "✕";
  position: absolute;
  left: 0;
  color: #e88a7a;
  font-size: 11px;
  font-weight: 800;
}

.compare-grid .after li::before { content: "✓"; color: var(--emerald); }

.pilot-layout { display: grid; gap: 36px; align-items: center; }
.pilot-layout h2 { font-size: clamp(25px, 4.6vw, 38px); }
.pilot-layout p { color: var(--muted); }

.pilot-steps { display: grid; gap: 13px; }

.pilot-steps article {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 4px 16px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--panel);
  transition: transform 200ms ease, border-color 200ms ease;
}

.pilot-steps article:hover { transform: translateX(5px); border-color: rgba(35, 88, 255, 0.4); }

.pilot-steps span {
  grid-row: span 2;
  align-self: start;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 16px;
  font-weight: 700;
  color: var(--gold);
  padding-top: 2px;
  min-width: 44px;
}

.pilot-steps strong { font-family: var(--font-display); font-size: 16px; }
.pilot-steps p { margin: 0; color: var(--muted); font-size: 13.8px; }

.case-method-grid { display: grid; gap: 15px; }

.case-method-grid article {
  padding: 24px 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}

.case-method-grid span {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 26px;
  font-weight: 700;
  color: var(--gold);
}

.case-method-grid h3 { margin: 10px 0 6px; font-size: 18px; }
.case-method-grid p { margin: 0; color: var(--muted); font-size: 14.2px; }

.sector-rail { display: grid; gap: 12px; }

.sector-rail article {
  display: grid;
  gap: 4px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--panel);
  transition: border-color 200ms ease, transform 200ms ease;
}

.sector-rail article:hover { border-color: rgba(35, 88, 255, 0.4); transform: translateY(-3px); }
.sector-rail strong { font-family: var(--font-display); font-size: 15.5px; }
.sector-rail span { color: var(--faint); font-size: 13px; }

.faq-grid { display: grid; gap: 12px; max-width: 820px; }

.faq-grid details {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--panel);
  overflow: hidden;
  transition: border-color 200ms ease;
}

.faq-grid details[open] { border-color: rgba(35, 88, 255, 0.45); }

.faq-grid summary {
  position: relative;
  padding: 18px 52px 18px 20px;
  cursor: pointer;
  list-style: none;
  font-family: var(--font-display);
  font-size: 16.5px;
  font-weight: 600;
}

.faq-grid summary::-webkit-details-marker { display: none; }

.faq-grid summary::after {
  content: "+";
  position: absolute;
  right: 16px;
  top: 50%;
  translate: 0 -50%;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  color: var(--gold);
  font-size: 16px;
  transition: rotate 220ms ease, background 220ms ease;
}

.faq-grid details[open] summary::after { rotate: 45deg; background: var(--gold-soft); }

.faq-grid details p {
  margin: 0;
  padding: 0 20px 18px;
  color: var(--muted);
  font-size: 14.5px;
}

/* demo flusso / gioco (pagina servizi) */
.automation-layout { display: grid; gap: 30px; }
.automation-layout h2 { font-size: clamp(25px, 4.6vw, 38px); }
.automation-layout > div:first-child p { color: var(--muted); max-width: 520px; }

.flow-board { display: grid; gap: 6px; justify-items: center; }

.flow-node {
  width: 100%;
  display: grid;
  gap: 2px;
  padding: 12px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--panel);
  text-align: center;
  transition: border-color 240ms ease, background 240ms ease, box-shadow 240ms ease;
}

.flow-node strong { font-family: var(--font-display); font-size: 14.5px; }
.flow-node span { color: var(--faint); font-size: 12.5px; }

.flow-node.active {
  border-color: rgba(35, 88, 255, 0.55);
  background: var(--gold-soft);
  box-shadow: var(--glow-g);
}

.flow-line { width: 2px; height: 16px; background: linear-gradient(var(--gold), transparent); }

.demo-console {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg0);
  font-size: 12.5px;
}

.demo-console span { display: block; color: var(--faint); margin-bottom: 3px; }
.demo-console strong { color: var(--gold); font-size: 13.5px; }

.live-demo-stage {
  position: relative;
  display: grid;
  gap: 18px;
  padding: clamp(18px, 3vw, 28px);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background:
    radial-gradient(420px 260px at 50% 0%, rgba(107, 231, 255, 0.07), transparent 70%),
    var(--panel);
  overflow: hidden;
}

.game-hud { display: grid; gap: 3px; }
.game-hud strong { font-family: var(--font-display); font-size: 17px; }
.game-hud span { color: var(--muted); font-size: 13px; }
.game-hud b { color: var(--gold); font-size: 13px; }

.process-stack {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.game-token {
  display: grid;
  gap: 3px;
  padding: 13px 15px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--bg0);
  color: var(--text);
  font: 700 13.5px/1.3 var(--font-body);
  text-align: left;
  cursor: pointer;
  transition: transform 200ms ease, border-color 200ms ease, opacity 200ms ease;
}

.game-token span { color: var(--faint); font-size: 11.5px; font-weight: 500; }
.game-token:hover { transform: translateY(-3px); border-color: var(--gold); }

.game-token.is-captured {
  opacity: 0.35;
  border-color: var(--emerald);
  transform: scale(0.97);
  pointer-events: none;
}

.ai-core {
  display: grid;
  justify-items: center;
  gap: 4px;
  padding: 18px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: rgba(107, 231, 255, 0.06);
  text-align: center;
  transition: box-shadow 240ms ease, transform 240ms ease;
}

.ai-core img { width: 70px; }
.ai-core strong { font-family: var(--font-display); font-size: 15px; color: var(--emerald); }
.ai-core span { color: var(--muted); font-size: 12.5px; }

.ai-core.is-fed {
  transform: scale(1.04);
  box-shadow: var(--glow-e);
}

.result-stack {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.result-item {
  display: grid;
  gap: 3px;
  padding: 13px 15px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg1);
  opacity: 0.45;
  transition: opacity 400ms ease, border-color 400ms ease;
}

.result-item span { color: var(--faint); font-size: 11px; font-weight: 800; }
.result-item strong { font-family: var(--font-display); font-size: 14px; }
.result-item p { margin: 0; color: var(--muted); font-size: 12.5px; }

[data-stage="1"] .result-item:nth-child(1),
[data-stage="2"] .result-item:nth-child(-n + 2),
[data-stage="3"] .result-item:nth-child(-n + 3),
[data-stage="4"] .result-item {
  opacity: 1;
  border-color: rgba(107, 231, 255, 0.5);
}

.demo-beam { display: none; }

.demo-chat-cta {
  justify-self: center;
  min-height: 46px;
  padding: 0 24px;
  border: 1.5px solid var(--line-strong);
  border-radius: 100px;
  background: transparent;
  color: var(--text);
  font: 700 13.5px/1 var(--font-body);
  cursor: pointer;
  transition: border-color 200ms ease, background 200ms ease;
}

.demo-chat-cta:hover { border-color: var(--gold); background: var(--gold-soft); }

.flying-token {
  position: fixed;
  z-index: 90;
  width: 130px;
  padding: 8px 12px;
  border: 1px solid var(--gold);
  border-radius: 100px;
  background: var(--gold-soft);
  color: var(--text);
  font: 700 12px/1.2 var(--font-body);
  text-align: center;
  pointer-events: none;
  transition: transform 640ms cubic-bezier(0.3, 0, 0.4, 1), opacity 640ms ease;
}

/* legal */
.legal-page { padding-top: 74px; }
.legal-content { max-width: 780px; padding: 10px 0 30px; }
.legal-content h1 { font-size: clamp(29px, 5vw, 42px); }
.legal-content h2 { margin-top: 34px; font-size: 22px; }
.legal-content p { color: var(--muted); }
.legal-content a { color: var(--gold); }

/* compat: elementi delle versioni precedenti non più in home */
.marquee, .mascot-scene, .system-stage, .notebook, .todo-list, .scribble svg { display: none; }
.scribble { font-style: italic; color: var(--gold); }

/* ------------------------------------------------------------
   Breakpoint: tablet ≥ 720px
   ------------------------------------------------------------ */
@media (min-width: 720px) {
  .hero-grid { grid-template-columns: 1.05fr 0.95fr; gap: 30px; }
  .area-grid { grid-template-columns: repeat(2, 1fr); }
  .steps-grid { grid-template-columns: repeat(2, 1fr); }
  .seo-card-grid { grid-template-columns: repeat(3, 1fr); }
  .portfolio-showcase { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .portfolio-grid { grid-template-columns: repeat(2, 1fr); }
  .pricing-grid { grid-template-columns: repeat(3, 1fr); }
  .package-detail-grid { grid-template-columns: repeat(3, 1fr); }
  .audit-grid { grid-template-columns: 0.9fr 1.1fr; }
  .rognometro-grid { grid-template-columns: 0.85fr 1.15fr; }
  .page-grid { grid-template-columns: 1fr 1fr; }
  .page-card-grid { grid-template-columns: repeat(2, 1fr); }
  .pain-grid, .case-grid { grid-template-columns: repeat(2, 1fr); }
  .compare-grid { grid-template-columns: 1fr 1fr; }
  .pilot-layout { grid-template-columns: 1fr 1fr; }
  .founder-grid { grid-template-columns: 0.8fr 1.2fr; }
  .case-method-grid { grid-template-columns: repeat(3, 1fr); }
  .sector-rail { grid-template-columns: repeat(2, 1fr); }
  .automation-layout { grid-template-columns: 1fr 1fr; align-items: start; }
  .automation-layout .flow-board { grid-column: 2; grid-row: 1 / span 2; }
  .automation-layout .demo-console { grid-column: 1; }
  .automation-layout .live-demo-stage { grid-column: 1 / -1; }
  .process-stack { grid-template-columns: repeat(4, 1fr); }
  .result-stack { grid-template-columns: repeat(4, 1fr); }
  .cookie-banner { left: auto; right: 20px; bottom: 20px; max-width: 440px; }
  footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 22px;
    padding-bottom: 64px;
  }
  footer img { margin: 0; }
}

/* ------------------------------------------------------------
   Breakpoint: desktop ≥ 1024px
   ------------------------------------------------------------ */
@media (min-width: 1024px) {
  .site-header nav { display: flex; }
  .menu-toggle { display: none; }
  .header-cta { display: inline-flex; }
  .area-grid { grid-template-columns: repeat(3, 1fr); }
  .steps-grid { grid-template-columns: repeat(4, 1fr); }
  .portfolio-showcase { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .pain-grid, .case-grid { grid-template-columns: repeat(3, 1fr); }
  .page-card-grid { grid-template-columns: repeat(3, 1fr); }
  .sector-rail { grid-template-columns: repeat(5, 1fr); }
  .sector-rail article { padding: 14px; }
  .portfolio-grid { grid-template-columns: repeat(4, 1fr); }
}

@media (min-width: 1180px) {
  .page-grid .page-card-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ------------------------------------------------------------
   Accessibilità / performance
   ------------------------------------------------------------ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: 0.001s !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001s !important;
  }
  .reveal { opacity: 1; transform: none; }
  .hero-canvas { display: none; }
  .orbit { animation: none; }
  .orbit span { animation: none; }
}

@media (hover: none) {
  .package-card:hover,
  .page-card:hover,
  .portfolio-card:hover,
  .area-card:hover { transform: none; }
}

/* ============================================================
   Il viaggio: dal caos all'ordine
   La sezione è alta 7 schermate; dentro, un palco fisso ospita
   il canvas WebGL. Scrollare fa volare la camera nei mondi.
   ============================================================ */
.journey {
  position: relative;
  height: 780vh;
  background: #020817;
}

.journey-sticky {
  position: sticky;
  top: 0;
  /* 100vh prima: se il browser non conosce svh la regola viene
     ignorata, l'altezza va a 0 (i figli sono tutti in assoluto)
     e resta solo lo sfondo nero. */
  height: 100vh;
  height: 100svh;
  overflow: hidden;
}

.journey-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.journey-flash {
  position: absolute;
  inset: 0;
  background: #eaf4ff;
  opacity: 0;
  pointer-events: none;
}

.journey-flash.is-on { animation: journey-flash 460ms ease-out; }

@keyframes journey-flash {
  0% { opacity: 0.62; }
  100% { opacity: 0; }
}

/* testo d'apertura: sta sopra la scrivania */
.journey-intro {
  position: absolute;
  left: clamp(20px, 6vw, 78px);
  top: 50%;
  translate: 0 -50%;
  max-width: min(560px, 84vw);
  z-index: 3;
  text-shadow: 0 4px 30px rgba(2, 8, 23, 0.85);
}

.journey-intro h1 {
  font-size: clamp(34px, 5.6vw, 62px);
  margin-bottom: 16px;
}

.journey-intro > p {
  color: var(--muted);
  font-size: clamp(15px, 1.7vw, 18px);
  max-width: 520px;
}

.journey-hint {
  margin-top: 26px;
  color: var(--cyan, #6be7ff);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.journey-hint span {
  display: inline-block;
  animation: journey-bob 1.8s ease-in-out infinite;
}

@keyframes journey-bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(6px); }
}

/* il titolo del mondo attraversato */
.journey-hud {
  position: absolute;
  left: 50%;
  bottom: clamp(84px, 14vh, 150px);
  translate: -50% 0;
  width: min(760px, 88vw);
  text-align: center;
  z-index: 3;
  pointer-events: none;
  transition: opacity 320ms ease;
  text-shadow: 0 4px 30px rgba(2, 8, 23, 0.9);
}

.journey-kicker {
  display: block;
  margin-bottom: 10px;
  color: var(--cyan, #6be7ff);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.26em;
  text-transform: uppercase;
}

.journey-title {
  font-size: clamp(26px, 4.4vw, 50px);
  margin: 0 0 8px;
}

.journey-sub {
  margin: 0;
  color: var(--muted);
  font-size: clamp(14px, 1.6vw, 17px);
}

/* le schede dei servizi che compaiono dentro il mondo giusto */
.journey-cards {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}

.journey-card {
  position: absolute;
  right: clamp(20px, 6vw, 78px);
  top: 50%;
  translate: 0 -50%;
  width: min(320px, 74vw);
  display: grid;
  gap: 6px;
  padding: 20px 22px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: rgba(6, 20, 50, 0.82);
  backdrop-filter: blur(14px);
  opacity: 0;
  transform: translateX(40px) scale(0.96);
  transition: opacity 520ms ease, transform 520ms cubic-bezier(0.2, 0.7, 0.25, 1);
}

.journey-card.is-on { opacity: 1; transform: translateX(0) scale(1); }
.journey-card strong { font-family: var(--font-display); font-size: 18px; }
.journey-card span { color: var(--muted); font-size: 14px; line-height: 1.5; }

/* la chiusura: i numeri e le CTA nel mondo del controllo */
.journey-outro {
  position: absolute;
  left: 50%;
  top: clamp(96px, 16vh, 170px);
  translate: -50% 0;
  width: min(880px, 90vw);
  z-index: 3;
  opacity: 0;
  text-align: center;
}

.journey-outro .hero-stats { max-width: none; margin: 0 0 26px; }
.journey-outro .hero-actions { justify-content: center; }

.journey-progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: rgba(124, 180, 255, 0.16);
  z-index: 4;
}

.journey-progress i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #2358ff, #6be7ff);
  transform-origin: left;
  transform: scaleX(0);
}

/* fallback: senza WebGL resta un hero normale e leggibile */
.journey.no-webgl { height: auto; background: var(--bg0); }
.journey.no-webgl .journey-sticky { position: relative; height: auto; padding: 120px 0 80px; }
.journey.no-webgl .journey-canvas,
.journey.no-webgl .journey-scrim,
.journey.no-webgl .journey-flash,
.journey.no-webgl .journey-hud,
.journey.no-webgl .journey-cards,
.journey.no-webgl .journey-progress,
.journey.no-webgl .journey-hint { display: none; }

/* senza 3D resta un hero normale: qui vanno azzerate TUTTE le
   coordinate assolute, non solo top/translate, altrimenti il
   testo resta spostato a metà pagina e sborda a destra. */
.journey.no-webgl .journey-intro,
.journey.no-webgl .journey-outro {
  position: relative;
  inset: auto;
  translate: none;
  width: min(1140px, calc(100% - 40px));
  max-width: none;
  margin-inline: auto;
  padding-inline: 0;
  background: none;
}
.journey.no-webgl .journey-outro { opacity: 1 !important; margin-top: 44px; }
.journey.no-webgl .journey-outro .hero-stats { text-align: left; }

@media (max-width: 719px) {
  .journey { height: 700vh; }

  /* apertura: tutto in colonna, ancorato in basso sopra al velo */
  .journey-intro {
    left: 18px;
    right: 18px;
    top: auto;
    bottom: 8vh;
    translate: none;
    max-width: none;
  }
  .journey-intro h1 { font-size: clamp(28px, 8.4vw, 38px); margin-bottom: 12px; }
  .journey-intro > p { font-size: 15px; line-height: 1.55; max-width: none; }
  .journey-intro .hero-actions { gap: 10px; margin-top: 20px; }
  .journey-intro .hero-actions .button { width: 100%; min-height: 50px; }
  .journey-hint { margin-top: 18px; font-size: 11.5px; letter-spacing: 0.1em; }

  /* dentro i mondi: prima la scheda, sotto il titolo. Mai sovrapposti */
  .journey-card {
    right: 18px;
    left: 18px;
    width: auto;
    top: 12vh;
    bottom: auto;
    translate: none;
    padding: 16px 18px;
    transform: translateY(-24px) scale(0.97);
  }
  .journey-card.is-on { transform: translateY(0) scale(1); }
  .journey-card strong { font-size: 16px; }
  .journey-card span { font-size: 13.5px; }

  .journey-hud { bottom: 9vh; width: min(560px, calc(100% - 36px)); }
  .journey-title { font-size: clamp(24px, 7.4vw, 34px); }
  .journey-sub { font-size: 14px; }

  /* finale: numeri in colonna, bottoni a tutta larghezza */
  .journey-outro {
    top: auto;
    bottom: 8vh;
    width: calc(100% - 36px);
    padding: 20px 16px 22px;
  }
  .journey-outro .hero-stats { grid-template-columns: 1fr; gap: 8px; margin-bottom: 18px; }
  .journey-outro .hero-stats article {
    display: grid;
    grid-template-columns: 92px 1fr;
    gap: 12px;
    align-items: baseline;
    text-align: left;
  }
  .journey-outro .hero-stats strong { font-size: 26px; }
  .journey-outro .hero-stats span { font-size: 12.5px; margin-top: 0; }
  .journey-outro .hero-actions { gap: 10px; }
  .journey-outro .hero-actions .button { width: 100%; }
}

/* schermi bassi (telefono in orizzontale): niente testo che deborda */
@media (max-height: 560px) and (max-width: 900px) {
  .journey-intro { bottom: 4vh; }
  .journey-intro h1 { font-size: 24px; }
  .journey-intro > p { display: none; }
  .journey-hint { display: none; }
  .journey-card { top: 6vh; }
  .journey-hud { bottom: 4vh; }
  .journey-title { font-size: 22px; }
}

@media (prefers-reduced-motion: reduce) {
  .journey { height: auto; }
  .journey-sticky { position: relative; height: auto; padding: 120px 0 80px; }
  .journey-canvas, .journey-scrim, .journey-flash,
  .journey-hud, .journey-cards, .journey-progress, .journey-hint { display: none; }
  .journey-intro,
  .journey-outro {
    position: relative;
    inset: auto;
    translate: none;
    width: min(1140px, calc(100% - 40px));
    max-width: none;
    margin-inline: auto;
    padding-inline: 0;
    background: none;
  }
  .journey-outro { opacity: 1 !important; margin-top: 44px; }
  .journey-outro .hero-stats { text-align: left; }
}

/* velo sotto al testo d'apertura: la scena resta visibile ma
   il titolo si legge sempre */
.journey-scrim {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(100deg, rgba(2, 8, 23, 0.86) 0%, rgba(2, 8, 23, 0.45) 30%, rgba(2, 8, 23, 0.04) 56%, transparent 100%);
}

@media (max-width: 719px) {
  .journey-scrim {
    background: linear-gradient(0deg, rgba(2, 8, 23, 0.94) 0%, rgba(2, 8, 23, 0.7) 42%, transparent 78%);
  }
}

/* il finale galleggia sul vortice: serve un fondo che stacchi */
.journey-outro {
  padding: 26px clamp(18px, 3vw, 34px) 30px;
  border-radius: var(--radius);
  background: radial-gradient(120% 140% at 50% 40%, rgba(2, 8, 23, 0.9) 40%, rgba(2, 8, 23, 0.35) 78%, transparent 100%);
}

.journey-outro .hero-stats strong {
  color: #8fd0ff;
  text-shadow: 0 2px 22px rgba(2, 8, 23, 0.9);
}

.journey-outro .hero-stats span { color: #cfe0fb; }


/* ------------------------------------------------------------
   Header su schermi stretti: logo + Menu, niente altro.
   La riga con logo, titolo, sottotitolo e bottone non ci sta.
   ------------------------------------------------------------ */
@media (max-width: 560px) {
  .site-header { padding: 10px 14px; gap: 10px; }
  .brand-logo { width: 104px; }
  .brand > span { display: none; }
  .menu-toggle { min-height: 40px; padding: 0 14px; }
}

/* Niente scorrimento orizzontale.
   ATTENZIONE: qui NON si può usare overflow-x:hidden su html/body —
   crea un contenitore di scorrimento e manda in pezzi position:sticky
   (il palco del viaggio smette di restare incollato). "clip" taglia
   senza creare scroll container; dove non è supportato non fa nulla,
   e va bene: lo sbordamento vero è già stato corretto alla radice. */
body { overflow-x: clip; }
