/* ============================================
   FALCONI.DEV — Style Sheet
   Ispirato allo stile di falconi.dev
   ============================================ */

/* ─── CSS CUSTOM PROPERTIES ─── */
:root {
  /* Palette (da falconi.dev) */
  --primary:       #0059b2;           /* thirdcolor */
  --primary-light: #006caa;           /* fourcolor  */
  --accent:        #00acca;
  --accent-dark:   #007a91;           /* testo su bianco WCAG AA 5:1 */
  --accent-light:  #5ce0f5;           /* icone su sfondo scuro 6.78:1 */

  --white:   #ffffff;
  --black:   #000000;
  --gray-50: #f8f9fa;
  --gray-100:#f0f2f5;
  --gray-200:#e4e7ec;
  --gray-300:#d0d5dd;
  --gray-400:#6d7585;                 /* WCAG 4.63:1 su bianco */
  --gray-600:#475467;
  --gray-700:#344054;
  --gray-800:#1d2939;
  --gray-900:#101828;

  --body-bg:  var(--black);
  --text:     #333333;
  --text-muted: var(--gray-400);

  /* Gradienti */
  /* --gradient-hero: radial-gradient(circle, #00acca 0%, #0085d1 72%, #0059b2 100%); */
  --gradient-hero: radial-gradient(circle, #0082b6 0%, #0076bb 72%, #0059b2 100%);
  --gradient-cta:  linear-gradient(135deg, #0059b2 0%, #009bb6 100%);
 /*  --gradient-footer: linear-gradient(0deg, rgba(0, 92, 170, 1) 0%, rgba(0, 63, 178, 1) 100%); */
 --gradient-footer: linear-gradient(0deg, rgb(37, 37, 37) 0%, rgb(14, 14, 14) 100%);
  /* Tipografia */
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --fs-base: 1rem;
  --fs-sm:   0.875rem;
  --fs-xs:   0.75rem;
  --fs-lg:   1.125rem;
  --fs-xl:   1.25rem;

  /* Spacing */
  --space-xs:  0.25rem;
  --space-sm:  0.5rem;
  --space-md:  1rem;
  --space-lg:  1.5rem;
  --space-xl:  2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;
  --space-4xl: 6rem;

  /* Raggi */
  --radius-sm:  0.375rem;
  --radius-md:  0.625rem;
  --radius-lg:  1rem;
  --radius-xl:  1.5rem;
  --radius-full:50%;

  /* Transizioni */
  --transition: 0.3s ease;

  /* Container */
  --container-max: 1300px;

  /* Ombre */
  --shadow-sm:  0 1px 3px rgba(0,0,0,.08);
  --shadow-md:  0 4px 12px rgba(0,0,0,.1);
  --shadow-lg:  0 8px 30px rgba(0,0,0,.12);
  --shadow-xl:  0 20px 60px rgba(0,0,0,.15);

  /* Header altezza */
  --header-h: 72px;
}

/* ─── RESET ─── */
*,*::before,*::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font);
  font-size: var(--fs-base);
  line-height: 1.7;
  color: var(--text);
  background: var(--body-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; transition: color var(--transition); }
ul, ol { list-style: none; }
button { cursor: pointer; border: none; background: none; font: inherit; color: inherit; }
input, textarea, select { font: inherit; }
h1, h2, h3, h4, h5, h6 { line-height: 1.25; font-weight: 700; }

/* ─── LAYOUT ─── */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: 1rem;
}
.text-center { text-align: center; }

/* ─── SKIP-LINK (neuro-accessibilità: riduce frizione per tastiera/screen reader) ─── */
.skip-link {
  position: absolute;
  left: var(--space-md);
  top: -100px;
  z-index: 2000;
  background: var(--primary);
  color: var(--white);
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  box-shadow: var(--shadow-md);
  transition: top var(--transition);
}
.skip-link:focus {
  top: var(--space-md);
}
#main-content { scroll-margin-top: var(--header-h); }

/* ─── SECTION ─── */
.section {
  padding: var(--space-3xl) 0 var(--space-4xl);
  background: var(--white);
}
.section--gray {
  background: var(--gray-50);
}
.section--dark {
  background: var(--gray-900);
  color: var(--white);
}
.section--dark .section-title { color: var(--white); }
.section--dark .section-label { color: var(--accent-light); }

/* ─── SECTION TEXT ─── */
.section-label {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: var(--fs-sm);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-dark);
  margin-bottom: var(--space-md);
}
.section-title {
  font-size: clamp(1.6rem, 3.5vw, 2.2rem);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0;
  margin-bottom: var(--space-md);
  line-height: 1.3;
  color: var(--gray-900);
}
.section-title span {
  color: var(--primary);
}
.section-subtitle {
  font-size: var(--fs-lg);
  color: var(--gray-400);
  max-width: 680px;
  margin-inline: auto;
  line-height: 1.8;
}
.section-header {
  margin-bottom: var(--space-3xl);
}

/* ─── GRID ─── */
.grid { display: grid; gap: var(--space-xl); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 1024px) {
  .grid--4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 830px) {
  .grid--2 { grid-template-columns: 1fr; }
  .grid--3 { grid-template-columns: 1fr; }
  .grid--4 { grid-template-columns: 1fr; }
  .section-title { text-align: center; }
}

/* ─── BUTTONS ─── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  font-weight: 600;
  font-size: var(--fs-sm);
  padding: 0.75rem 1.75rem;
  border-radius: 0.5rem;
  transition: all var(--transition);
  white-space: nowrap;
  border: 2px solid transparent;
  cursor: pointer;
  text-decoration: none;
  line-height: 1.4;
}
.btn--primary {
  background: var(--primary);
  color: var(--white);
  border-color: var(--primary);
}
.btn--primary:hover {
  background: #003f8a;
  border-color: #003f8a;
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}
.btn--white {
  background: var(--white);
  color: var(--primary);
  border-color: var(--white);
}
.btn--white:hover {
  background: var(--gray-50);
  border-color: var(--gray-50);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}
.btn--ghost {
  background: transparent;
  color: var(--white);
  border-color: rgba(255,255,255,.35);
}
.btn--ghost:hover {
  background: rgba(255,255,255,.12);
  border-color: rgba(255,255,255,.6);
}
.btn--outline {
  background: transparent;
  color: var(--primary);
  border-color: var(--primary);
}
.btn--outline:hover {
  background: var(--primary);
  color: var(--white);
}
.btn--sm {
  padding: 0.5rem 1.15rem;
  font-size: var(--fs-xs);
}
.btn--lg {
  padding: 0.95rem 2.25rem;
  font-size: var(--fs-base);
}
.btn-group {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
}

/* ─── FOCUS VISIBILE (neuro-accessibilità: guida l'attenzione da tastiera) ─── */
a:focus-visible,
button:focus-visible,
.btn:focus-visible,
.nav__link:focus-visible,
.card__link:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}
.btn--ghost:focus-visible,
.btn--white:focus-visible {
  outline-color: var(--white);
}

/* ═══════════════════════════════════════
   HEADER  — Navbar bianca con ombra
   ═══════════════════════════════════════ */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background: var(--white);
  transition: box-shadow var(--transition), background var(--transition);
}
.header > .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
}
.header.scrolled {
  box-shadow: 0 2px 20px rgba(0,0,0,.08);
}

/* Logo */
.logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
}
.logo__icon {
  width: 38px;
  height: 38px;
  background: var(--primary);
  color: var(--white);
  font-weight: 800;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
}
.logo__text {
  font-weight: 800;
  font-size: 1.2rem;
  letter-spacing: -0.02em;
  color: var(--gray-900);
}
.logo__text span {
  color: var(--primary);
}

/* Nav */
.nav {
  display: flex;
  align-items: center;
  gap: var(--space-xl);
}
.nav__menu {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}
.nav__link {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: var(--fs-sm);
  font-weight: 500;
  color: var(--gray-600);
  padding: 0.55rem 0.95rem;
  border-radius: var(--radius-sm);
  transition: color var(--transition), background var(--transition);
  position: relative;
  text-decoration: none;
}
.nav__link:hover,
.nav__link.active {
  color: var(--primary);
  background: rgba(65, 75, 85, 0.05);
}

/* Underline animation like falconi.dev */
.nav__link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 1px;
  background: var(--primary);
  transition: width 0.35s ease, left 0.35s ease;
}
.nav__link:hover::after,
.nav__link.active::after {
  width: 60%;
  left: 20%;
}

/* Chevron icon */
.chevron-icon {
  font-size: 1rem;
  transition: transform var(--transition);
}

/* Nav CTA */
.nav__cta {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

/* ═══════════════════════════════════════
   MEGA MENU
   ═══════════════════════════════════════ */
.nav__dropdown {
  position: relative;
}
.mega-menu {
  position: absolute;
  top: calc(100% + 14px);
  left: 50%;
  transform: translateX(-50%);
  width: 680px;
  background: var(--white);
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  box-shadow: var(--shadow-xl);
  border: 1px solid var(--gray-200);
  padding: 0;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s;
  transform: translateX(-50%) translateY(8px);
  z-index: 100;
}
/* Invisible bridge */
.nav__dropdown::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  height: 20px;
  background: transparent;
}
.nav__dropdown:hover .mega-menu {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}
.mega-menu__inner {
  display: grid;
  grid-template-columns: 1fr 1fr 1.1fr;
  gap: 0;
}
.mega-menu__col {
  padding: var(--space-xl);
  border-right: 1px solid var(--gray-100);
}
.mega-menu__col:last-child { border-right: none; }
.mega-menu__heading {
  font-size: var(--fs-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--gray-400);
  margin-bottom: var(--space-md);
}
.mega-menu__links li {
  margin-bottom: var(--space-xs);
}
.mega-menu__links a {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 0.5rem 0.65rem;
  border-radius: var(--radius-sm);
  font-size: var(--fs-sm);
  font-weight: 500;
  color: var(--gray-700);
  transition: background var(--transition), color var(--transition);
}
.mega-menu__links a:hover {
  background: rgba(0,89,178,.06);
  color: var(--primary);
}
.mega-menu__links a i {
  font-size: 1.15rem;
  color: var(--accent-dark);
}
.mega-menu__featured {
  padding: var(--space-xl);
  background: var(--primary);
  border-radius: 0 0 var(--radius-lg) 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.mega-menu__featured h4 {
  font-size: 1.05rem;
  margin-bottom: var(--space-sm);
  color: var(--white);
}
.mega-menu__featured p {
  font-size: var(--fs-sm);
  opacity: .85;
  margin-bottom: var(--space-lg);
  line-height: 1.6;
  color: var(--white);
}

/* ═══════════════════════════════════════
   HAMBURGER & MOBILE MENU
   ═══════════════════════════════════════ */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 0.5rem;
  z-index: 1100;
}
.hamburger__line {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--gray-800);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}
.hamburger.active .hamburger__line:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.hamburger.active .hamburger__line:nth-child(2) {
  opacity: 0;
}
.hamburger.active .hamburger__line:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.mobile-menu {
  position: fixed;
  inset: 0;
  top: var(--header-h);
  background: var(--white);
  z-index: 999;
  display: flex;
  flex-direction: column;
  padding: var(--space-xl);
  gap: var(--space-xs);
  transform: translateX(100%);
  transition: transform 0.35s ease;
  overflow-y: auto;
}
.mobile-menu.active {
  transform: translateX(0);
}
.mobile-menu .nav__link {
  font-size: 1.1rem;
  padding: 0.8rem 0.8rem;
  border-bottom: 1px solid var(--gray-100);
  width: 100%;
  border-radius: 0;
}
.mobile-menu .nav__link::after { display: none; }
.mobile-menu .btn-group {
  margin-top: auto;
  padding-top: var(--space-xl);
}
.mobile-menu .btn-group .btn {
  width: 100%;
  justify-content: center;
}

/* Mobile accordion submenu */
.mobile-menu__dropdown {}
.mobile-menu__toggle {
  justify-content: space-between;
}
.mobile-menu__toggle .chevron-icon {
  transition: transform var(--transition);
}
.mobile-menu__toggle.is-open .chevron-icon {
  transform: rotate(180deg);
}
.mobile-menu__sub {
  display: flex;
  flex-direction: column;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease;
}
.mobile-menu__sub.is-open {
  max-height: 400px;
}
.mobile-menu__sub a {
  padding: 0.6rem 0 0.6rem var(--space-xl);
  font-size: var(--fs-sm);
  color: var(--gray-600);
  border-bottom: 1px solid var(--gray-100);
  transition: color var(--transition);
}
.mobile-menu__sub a:hover {
  color: var(--primary);
}

@media (max-width: 830px) {
  .nav, .nav__cta { display: none; }
  .hamburger { display: flex; }
}

/* ═══════════════════════════════════════
   HERO  — Gradiente radiale da falconi.dev
   ═══════════════════════════════════════ */
.hero {
  position: relative;
  background: var(--gradient-hero);
  padding: calc(var(--header-h) + var(--space-4xl)) 0 var(--space-4xl);
  color: var(--white);
  overflow: hidden;
  min-height: 85vh;
  display: flex;
  align-items: center;
}
.hero--sm {
  min-height: auto;
  padding: calc(var(--header-h) + var(--space-3xl)) 0 var(--space-3xl);
}
.hero__content {
  position: relative;
  z-index: 2;
  max-width: 750px;
}
.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  background: rgba(255,255,255,.15);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 0.45rem 1.1rem;
  border-radius: var(--radius-md);
  font-size: var(--fs-sm);
  font-weight: 500;
  margin-bottom: var(--space-xl);
  border: 1px solid rgba(255,255,255,.2);
}
.hero__title {
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: var(--space-lg);
  letter-spacing: -0.02em;
}
.hero__title span {
  background: linear-gradient(135deg, #020202, #303030);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,.35));
}
.hero__description {
  font-size: clamp(1rem, 1.8vw, 1.2rem);
  line-height: 1.8;
  opacity: .9;
  margin-bottom: var(--space-2xl);
  max-width: 620px;
    color: var(--white);
}
.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
}

/* Hero floating shapes — lava lamp effect */
.hero__shapes {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  overflow: hidden;
  filter: url(#goo);
  /* Isola il ripaint del filtro "goo" (animazione infinita, molto costosa)
     su un layer GPU dedicato: non invalida il resto della pagina mentre scorri. */
  transform: translateZ(0);
  contain: paint;
}
.hero__shape {
  position: absolute;
  background: rgba(58, 188, 248, 0.2);
  will-change: transform, border-radius;
}

/* ── Blob 1 — MASSA BASE: grande pozza sul fondo che dondola ── */
.hero__shape:nth-child(1) {
  width: 130%; height: 220px;
  bottom: -100px; left: -15%;
  background: rgba(58, 188, 248, 0.3);
  animation: lava-base-sway 10s ease-in-out infinite,
             lava-base-morph 14s ease-in-out infinite;
}

/* ── Blob 2 — grande bolla, sale lenta dal centro ── */
.hero__shape:nth-child(2) {
  width: 200px; height: 200px;
  bottom: -60px; left: 25%;
  animation: lava-up-1 18s ease-in-out infinite,
             lava-morph-1 12s ease-in-out infinite;
}

/* ── Blob 3 — media bolla, sale da destra ── */
.hero__shape:nth-child(3) {
  width: 220px; height: 220px;
  bottom: -50px; left: 55%;
  animation: lava-up-2 22s ease-in-out infinite 3s,
             lava-morph-2 14s ease-in-out infinite;
}

/* ── Blob 4 — piccola, sale veloce dal centro-sinistra ── */
.hero__shape:nth-child(4) {
  width: 130px; height: 130px;
  bottom: -40px; left: 38%;
  animation: lava-up-3 15s ease-in-out infinite 1.5s,
             lava-morph-3 10s ease-in-out infinite;
}

/* ── Blob 5 — grande bolla, sale lenta da destra ── */
.hero__shape:nth-child(5) {
  width: 260px; height: 260px;
  bottom: -55px; left: 65%;
  animation: lava-up-4 25s ease-in-out infinite 1s,
             lava-morph-1 16s ease-in-out infinite reverse;
}

/* ── Blob 6 — piccola, sale da sinistra ── */
.hero__shape:nth-child(6) {
  width: 100px; height: 100px;
  bottom: -30px; left: 12%;
  animation: lava-up-5 13s ease-in-out infinite 2s,
             lava-morph-2 9s ease-in-out infinite reverse;
}

/* ── Blob 7 — mini, sale rapida dal centro ── */
.hero__shape:nth-child(7) {
  width: 80px; height: 80px;
  bottom: -25px; left: 48%;
  animation: lava-up-6 11s ease-in-out infinite 7s,
             lava-morph-3 8s ease-in-out infinite;
}

/* ── Blob 8 — media, sale ondulando da sinistra ── */
.hero__shape:nth-child(8) {
  width: 180px; height: 180px;
  bottom: -45px; left: 5%;
  animation: lava-up-7 20s ease-in-out infinite 4s,
             lava-morph-1 13s ease-in-out infinite;
}

/* ── Blob 9 — piccola, sale da destra ── */
.hero__shape:nth-child(9) {
  width: 110px; height: 110px;
  bottom: -35px; left: 78%;
  animation: lava-up-8 16s ease-in-out infinite 8s,
             lava-morph-2 11s ease-in-out infinite reverse;
}

/* ── Blob 10 — media, sale lenta dal lato destro ── */
.hero__shape:nth-child(10) {
  width: 190px; height: 190px;
  bottom: -40px; left: 93%;
  animation: lava-up-2 19s ease-in-out infinite 5s,
             lava-morph-3 13s ease-in-out infinite;
}

/* ── Massa base: dondola a destra e sinistra come un liquido ── */
@keyframes lava-base-sway {
  0%, 100% { transform: translateX(0) scaleY(1); }
  15%      { transform: translateX(4%) scaleY(1.05); }
  30%      { transform: translateX(-3%) scaleY(0.95); }
  50%      { transform: translateX(5%) scaleY(1.08); }
  70%      { transform: translateX(-4%) scaleY(0.97); }
  85%      { transform: translateX(2%) scaleY(1.03); }
}

@keyframes lava-base-morph {
  0%, 100% { border-radius: 50% 50% 0 0 / 30% 30% 0 0; }
  20%      { border-radius: 45% 55% 0 0 / 35% 25% 0 0; }
  40%      { border-radius: 55% 45% 0 0 / 25% 35% 0 0; }
  60%      { border-radius: 48% 52% 0 0 / 32% 28% 0 0; }
  80%      { border-radius: 52% 48% 0 0 / 28% 32% 0 0; }
}

/* ── Morphing organico bolle ── */
@keyframes lava-morph-1 {
  0%, 100% { border-radius: 42% 58% 62% 38% / 58% 34% 66% 42%; }
  25%      { border-radius: 56% 44% 34% 66% / 44% 52% 48% 56%; }
  50%      { border-radius: 38% 62% 68% 32% / 52% 62% 38% 48%; }
  75%      { border-radius: 52% 48% 42% 58% / 38% 48% 62% 52%; }
}

@keyframes lava-morph-2 {
  0%, 100% { border-radius: 48% 52% 44% 56% / 44% 56% 48% 52%; }
  33%      { border-radius: 38% 62% 58% 42% / 58% 42% 62% 38%; }
  66%      { border-radius: 58% 42% 38% 62% / 42% 58% 38% 62%; }
}

@keyframes lava-morph-3 {
  0%, 100% { border-radius: 44% 56% 62% 38% / 56% 38% 62% 44%; }
  25%      { border-radius: 58% 42% 38% 62% / 62% 44% 56% 38%; }
  50%      { border-radius: 36% 64% 56% 44% / 38% 62% 44% 56%; }
  75%      { border-radius: 62% 38% 44% 56% / 48% 52% 38% 62%; }
}

/* ── Salita bolle: partono dal fondo, salgono fluide, ridiscendono nella massa ── */
@keyframes lava-up-1 {
  0%, 100% { transform: translateY(0) translateX(0) scale(1); }
  8%       { transform: translateY(-8vh) translateX(5px) scale(1.06); }
  20%      { transform: translateY(-28vh) translateX(-15px) scale(1.14); }
  35%      { transform: translateY(-50vh) translateX(10px) scale(1.22); }
  50%      { transform: translateY(-65vh) translateX(-8px) scale(1.18); }
  65%      { transform: translateY(-50vh) translateX(12px) scale(1.12); }
  80%      { transform: translateY(-25vh) translateX(-5px) scale(1.06); }
  92%      { transform: translateY(-8vh) translateX(3px) scale(1.02); }
}

@keyframes lava-up-2 {
  0%, 100% { transform: translateY(0) translateX(0) scale(1); }
  10%      { transform: translateY(-12vh) translateX(-10px) scale(1.08); }
  25%      { transform: translateY(-35vh) translateX(20px) scale(1.18); }
  40%      { transform: translateY(-55vh) translateX(-15px) scale(1.25); }
  55%      { transform: translateY(-68vh) translateX(8px) scale(1.2); }
  70%      { transform: translateY(-45vh) translateX(-12px) scale(1.12); }
  85%      { transform: translateY(-18vh) translateX(6px) scale(1.04); }
}

@keyframes lava-up-3 {
  0%, 100% { transform: translateY(0) translateX(0) scale(1); }
  12%      { transform: translateY(-15vh) translateX(12px) scale(1.1); }
  30%      { transform: translateY(-42vh) translateX(-20px) scale(1.25); }
  48%      { transform: translateY(-62vh) translateX(15px) scale(1.18); }
  65%      { transform: translateY(-72vh) translateX(-8px) scale(1.3); }
  80%      { transform: translateY(-35vh) translateX(10px) scale(1.1); }
  92%      { transform: translateY(-10vh) translateX(-4px) scale(1.03); }
}

@keyframes lava-up-4 {
  0%, 100% { transform: translateY(0) translateX(0) scale(1); }
  8%       { transform: translateY(-10vh) translateX(-8px) scale(1.05); }
  22%      { transform: translateY(-30vh) translateX(18px) scale(1.15); }
  38%      { transform: translateY(-48vh) translateX(-12px) scale(1.2); }
  52%      { transform: translateY(-60vh) translateX(6px) scale(1.15); }
  68%      { transform: translateY(-42vh) translateX(-10px) scale(1.1); }
  82%      { transform: translateY(-20vh) translateX(8px) scale(1.05); }
  93%      { transform: translateY(-6vh) translateX(-3px) scale(1.01); }
}

@keyframes lava-up-5 {
  0%, 100% { transform: translateY(0) translateX(0) scale(1); }
  15%      { transform: translateY(-20vh) translateX(15px) scale(1.15); }
  35%      { transform: translateY(-48vh) translateX(-25px) scale(1.3); }
  55%      { transform: translateY(-70vh) translateX(10px) scale(1.2); }
  75%      { transform: translateY(-38vh) translateX(-12px) scale(1.1); }
  90%      { transform: translateY(-10vh) translateX(5px) scale(1.03); }
}

@keyframes lava-up-6 {
  0%, 100% { transform: translateY(0) translateX(0) scale(1); }
  12%      { transform: translateY(-18vh) translateX(-8px) scale(1.12); }
  28%      { transform: translateY(-40vh) translateX(15px) scale(1.28); }
  45%      { transform: translateY(-60vh) translateX(-10px) scale(1.35); }
  60%      { transform: translateY(-75vh) translateX(5px) scale(1.2); }
  78%      { transform: translateY(-32vh) translateX(-8px) scale(1.1); }
  92%      { transform: translateY(-8vh) translateX(3px) scale(1.02); }
}

@keyframes lava-up-7 {
  0%, 100% { transform: translateY(0) translateX(0) scale(1); }
  10%      { transform: translateY(-14vh) translateX(12px) scale(1.08); }
  25%      { transform: translateY(-35vh) translateX(30px) scale(1.16); }
  42%      { transform: translateY(-52vh) translateX(15px) scale(1.22); }
  58%      { transform: translateY(-62vh) translateX(-10px) scale(1.15); }
  72%      { transform: translateY(-40vh) translateX(8px) scale(1.1); }
  88%      { transform: translateY(-15vh) translateX(-5px) scale(1.04); }
}

@keyframes lava-up-8 {
  0%, 100% { transform: translateY(0) translateX(0) scale(1); }
  14%      { transform: translateY(-16vh) translateX(-12px) scale(1.1); }
  32%      { transform: translateY(-38vh) translateX(18px) scale(1.22); }
  50%      { transform: translateY(-58vh) translateX(-8px) scale(1.28); }
  68%      { transform: translateY(-45vh) translateX(14px) scale(1.15); }
  84%      { transform: translateY(-18vh) translateX(-6px) scale(1.06); }
}

/* Hero small variant shapes */
.hero--sm .hero__shape:nth-child(1) {
  width: 130%; height: 140px; bottom: -70px;
}
.hero--sm .hero__shape:nth-child(2) {
  width: 200px; height: 200px;
}
.hero--sm .hero__shape:nth-child(3) {
  width: 140px; height: 140px;
}
.hero--sm .hero__shape:nth-child(4) {
  width: 85px; height: 85px;
}
.hero--sm .hero__shape:nth-child(5) {
  width: 170px; height: 170px;
}
.hero--sm .hero__shape:nth-child(6) {
  width: 65px; height: 65px;
}
.hero--sm .hero__shape:nth-child(7) {
  width: 55px; height: 55px;
}
.hero--sm .hero__shape:nth-child(8) {
  width: 120px; height: 120px;
}
.hero--sm .hero__shape:nth-child(9) {
  width: 75px; height: 75px;
}
.hero--sm .hero__shape:nth-child(10) {
  width: 130px; height: 130px;
}

@media (max-width: 830px) {
  .hero {
    min-height: auto;
    padding: calc(var(--header-h) + var(--space-3xl)) 0 var(--space-3xl);
    text-align: center;
  }
  .hero__content { max-width: 100%; }
  .hero__actions { justify-content: center; }
  .hero__description { margin-inline: auto; }
  .hero--full-mobile {
    min-height: 100vh;
    min-height: 100dvh;
  }
}

/* ─── BREADCRUMB ─── */
.breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-sm);
  font-size: var(--fs-sm);
  margin-bottom: var(--space-xl);
  opacity: .8;
}
.breadcrumb a {
  color: rgba(255,255,255,.8);
  text-decoration: none;
  transition: color var(--transition);
}
.breadcrumb a:hover {
  color: var(--white);
  text-decoration: underline;
}
.breadcrumb__sep {
  color: rgba(255,255,255,.45);
  font-size: var(--fs-xs);
}

/* ═══════════════════════════════════════
   CARDS  — Stile servizi falconi.dev
   ═══════════════════════════════════════ */
.card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-xl);
  padding: var(--space-2xl);
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
  position: relative;
  overflow: hidden;
}
.card:hover,
.card.is-active {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(0,89,178,.15);
}
.card__number {
  position: absolute;
  top: var(--space-lg);
  right: var(--space-lg);
  font-size: 3rem;
  font-weight: 900;
  color: var(--gray-100);
  line-height: 1;
}
.card__icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, rgba(0,89,178,.08), rgba(0,172,202,.08));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  color: var(--primary);
  margin-bottom: var(--space-lg);
}
.card__title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: var(--space-sm);
  line-height: 1.3;
}
.card__text {
  font-size: var(--fs-sm);
  color: var(--gray-400);
  line-height: 1.7;
  margin-bottom: var(--space-lg);
}
.card__link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--primary);
  transition: gap var(--transition), color var(--transition);
}
.card__link:hover {
  gap: 0.65rem;
  color: #003f8a;
}

/* ═══════════════════════════════════════
   PORTFOLIO CARDS
   ═══════════════════════════════════════ */
.portfolio-card {
  position: relative;
  display: block;
  border-radius: var(--radius-xl);
  overflow: hidden;
  aspect-ratio: 4 / 3;
  text-decoration: none;
}
.portfolio-card__overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: var(--space-xl);
  background: linear-gradient(to top, rgba(0,0,0,.7) 0%, transparent 60%);
  opacity: 0;
  transition: opacity 0.35s ease;
}
.portfolio-card:hover .portfolio-card__overlay {
  opacity: 1;
}
.portfolio-card__title {
  color: var(--white);
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 0.3rem;
}
.portfolio-card__category {
  color: rgba(255,255,255,.75);
  font-size: var(--fs-sm);
}

/* ═══════════════════════════════════════
   STATS
   ═══════════════════════════════════════ */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-xl);
  text-align: center;
}
.stat__number {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  color: var(--primary);
  line-height: 1;
  margin-bottom: var(--space-sm);
}
.stat__label {
  font-size: var(--fs-sm);
  color: var(--gray-400);
  font-weight: 500;
}
@media (max-width: 640px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
}

/* ═══════════════════════════════════════
   FEATURE LIST  (es. Perché scegliermi)
   ═══════════════════════════════════════ */
.feature-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-xl);
}
.feature-item {
  display: flex;
  gap: var(--space-lg);
  align-items: flex-start;
}
.feature-item__icon {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: rgba(0,172,202,.12);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  color: var(--accent-light);
}
.feature-item__title {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
  color: var(--gray-900);
}
.feature-item__text {
  font-size: var(--fs-sm);
  color: var(--gray-400);
  line-height: 1.65;
}

/* Feature su sezioni scure: colori adattati automaticamente */
.section--dark .feature-item__title { color: var(--white); }
.section--dark .feature-item__text { color: rgba(255,255,255,.6); }

/* ═══════════════════════════════════════
   SERVICE DETAIL HEADER
   ═══════════════════════════════════════ */
.service-detail__header {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: var(--space-3xl);
  align-items: center;
}
@media (max-width: 830px) {
  .service-detail__header {
    grid-template-columns: 1fr;
  }
}

/* ═══════════════════════════════════════
   PROJECT INFO & SIDEBAR
   ═══════════════════════════════════════ */
.project-info {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: var(--space-3xl);
  align-items: flex-start;
}
.project-sidebar {
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-xl);
  padding: var(--space-2xl);
  position: sticky;
  top: calc(var(--header-h) + var(--space-xl));
}
.project-sidebar__item {
  padding: var(--space-md) 0;
  border-bottom: 1px solid var(--gray-200);
}
.project-sidebar__item:last-of-type {
  border-bottom: none;
}
.project-sidebar__label {
  font-size: var(--fs-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--gray-400);
  margin-bottom: 0.3rem;
}
.project-sidebar__value {
  font-weight: 600;
  color: var(--gray-800);
}
.project-sidebar__value a {
  color: var(--primary);
}
.project-sidebar__value a:hover {
  text-decoration: underline;
}
@media (max-width: 830px) {
  .project-info {
    grid-template-columns: 1fr;
  }
  .project-sidebar {
    position: static;
  }
}

/* ─── TAGS ─── */
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}
.tag {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.5rem 1.05rem;
  background: var(--white);
  color: var(--gray-700);
  font-size: var(--fs-sm);
  font-weight: 600;
  border-radius: var(--radius-md);
  border: 1px solid var(--gray-200);
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition), color var(--transition);
}
.tag::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: var(--radius-full);
  background: var(--accent);
  flex-shrink: 0;
}
.tag:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary);
  color: var(--primary);
}

/* ─── TECH STACK (secondario, orientato al beneficio) ─── */
.tech-stack {
  max-width: 900px;
  margin-inline: auto;
  text-align: center;
}
.tech-stack__eyebrow {
  display: inline-block;
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-dark);
  margin-bottom: var(--space-sm);
}
.tech-stack__title {
  font-size: clamp(1.3rem, 2.5vw, 1.6rem);
  font-weight: 800;
  color: var(--gray-900);
  margin-bottom: var(--space-sm);
}
.tech-stack__subtitle {
  font-size: var(--fs-sm);
  line-height: 1.6;
  color: var(--text-muted);
  max-width: 560px;
  margin: 0 auto var(--space-2xl);
}
.tech-stack__chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.6rem;
}
.tech-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.5rem 1.05rem;
  background: var(--white);
  color: var(--gray-700);
  font-size: var(--fs-sm);
  font-weight: 600;
  border-radius: var(--radius-md);
  border: 1px solid var(--gray-200);
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition), color var(--transition);
}
.tech-chip::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: var(--radius-full);
  background: var(--accent);
  flex-shrink: 0;
}
.tech-chip:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary);
  color: var(--primary);
}

/* ═══════════════════════════════════════
   CTA SECTION — Gradiente come falconi.dev
   ═══════════════════════════════════════ */
.cta-section {
  background: var(--gradient-cta);
  padding: var(--space-4xl) 0;
  text-align: center;
  color: var(--white);
}
.cta-section h2 {
  font-size: clamp(1.6rem, 3.5vw, 2.4rem);
  font-weight: 800;
  margin-bottom: var(--space-md);
  color: var(--white);
  text-transform: uppercase;
}
.cta-section p {
  font-size: var(--fs-lg);
    color: var(--white);
  opacity: .9;
  max-width: 640px;
  margin-inline: auto;
  margin-bottom: var(--space-2xl);
  line-height: 1.8;
}

/* ═══════════════════════════════════════
   FORM
   ═══════════════════════════════════════ */
.form-group {
  margin-bottom: var(--space-lg);
}
.form-label {
  display: block;
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--gray-700);
  margin-bottom: 0.4rem;
}
.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  font-size: var(--fs-base);
  color: var(--gray-800);
  background: var(--white);
  transition: border-color var(--transition), box-shadow var(--transition);
}
.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(0,89,178,.1);
}
.form-input::placeholder,
.form-textarea::placeholder {
  color: var(--gray-400);
}
.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23475467' d='M6 8.825L.35 3.175l.7-.7L6 7.425l4.95-4.95.7.7z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
}
.form-textarea {
  resize: vertical;
  min-height: 140px;
}

/* ═══════════════════════════════════════
   MAP
   ═══════════════════════════════════════ */
.map-container {
  margin-top: var(--space-3xl);
  border-radius: var(--radius-xl);
  overflow: hidden;
  border: 1px solid var(--gray-200);
}
.map-container iframe {
  display: block;
  width: 100%;
  height: 380px;
  border: none;
}

/* ═══════════════════════════════════════
   FOOTER  — Gradiente blu come falconi.dev
   ═══════════════════════════════════════ */
.footer {
  background: var(--gradient-footer);
  color: var(--white);
  padding-top: var(--space-4xl);
}
.footer__grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: var(--space-2xl);
}
.footer__brand { }
.footer__logo {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--white);
  text-decoration: none;
  margin-bottom: var(--space-lg);

  background: hsl(0, 1%, 68%);
background: linear-gradient(120deg,rgb(136, 136, 136) 0%, rgba(249, 249, 249, 1) 90%); display: inline-block; border-radius: 8px; padding: 11px; border: 1px solid hsl(240, 1%, 68%); box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1);
}
.footer__logo .logo__icon {
  background: rgba(255,255,255,.2);
}
.footer__desc {
  font-size: var(--fs-sm);
  line-height: 1.7;
  color: rgba(255,255,255,.8);
  margin-bottom: var(--space-xl);
}
.footer__social {
  display: flex;
  gap: var(--space-sm);
}
.footer__social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,.1);
  color: var(--white);
  font-size: 1.15rem;
  transition: background var(--transition), transform var(--transition);
}
.footer__social a:hover {
  background: rgba(255,255,255,.2);
  transform: translateY(-2px);
}
.footer__heading {
  font-size: var(--fs-sm);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--white);
  margin-bottom: var(--space-lg);
  position: relative;
  padding-bottom: var(--space-sm);
}
/* Decoratore sotto h4 (ispirato falconi.dev) */
.footer__heading::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 28px;
  height: 2px;
  background: rgba(255,255,255,.35);
  border-radius: 2px;
}
.footer__links li {
  margin-bottom: var(--space-sm);
}
.footer__links a {
  font-size: var(--fs-sm);
  color: rgba(255,255,255,.75);
  transition: color var(--transition), padding-left var(--transition);
}
.footer__links a:hover {
  color: var(--white);
  padding-left: 0.3rem;
}
.footer__contact li {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-md);
  font-size: var(--fs-sm);
  color: rgba(255,255,255,.75);
}
.footer__contact a {
  color: rgba(255,255,255,.75);
}
.footer__contact a:hover {
  color: var(--white);
}
.footer__contact i {
  font-size: 1.1rem;
  width: 20px;
  text-align: center;
}
.footer__bottom {
  margin-top: var(--space-3xl);
  padding: var(--space-xl) 0;
  border-top: 1px solid rgba(255,255,255,.12);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: var(--fs-xs);
  color: rgba(255,255,255,.55);
  flex-wrap: wrap;
  gap: var(--space-md);
}
.footer__legal {
  display: flex;
  gap: var(--space-lg);
}
.footer__legal a {
  color: rgba(255,255,255,.55);
  transition: color var(--transition);
}
.footer__legal a:hover {
  color: var(--white);
}
@media (max-width: 830px) {
  .footer__grid {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .footer__social { justify-content: center; }
  .footer__heading::after { left: 50%; transform: translateX(-50%); }
  .footer__contact li { justify-content: center; }
  .footer__bottom {
    flex-direction: column;
    text-align: center;
  }
  .footer__legal { justify-content: center; }
}

/* ═══════════════════════════════════════
   SCROLL TO TOP  — Come falconi.dev
   ═══════════════════════════════════════ */
.scroll-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 46px;
  height: 46px;
  border-radius: var(--radius-full);
  background: var(--primary);
  color: var(--white);
  font-size: 1.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md);
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity var(--transition), transform var(--transition), visibility var(--transition), background var(--transition);
}
.scroll-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.scroll-top:hover {
  background: #003f8a;
  transform: translateY(-2px);
}

/* ═══════════════════════════════════════
   REVEAL ANIMATIONS
   ═══════════════════════════════════════ */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}
.reveal--delay-1 { transition-delay: 0.12s; }
.reveal--delay-2 { transition-delay: 0.24s; }
.reveal--delay-3 { transition-delay: 0.36s; }

/* ─── RIDUZIONE MOVIMENTO (neuro-accessibilità: meno carico vestibolare/cognitivo) ─── */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .reveal {
    opacity: 1 !important;
    transform: none !important;
  }
}

/* ═══════════════════════════════════════
   UTILITIES / TYPOGRAPHY
   ═══════════════════════════════════════ */
h2 {
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  font-weight: 700;
  color: var(--gray-900);
  line-height: 1.3;
}
h2 span {
  color: var(--primary);
}
h3 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--gray-800);
}
h4 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--gray-900);
}
p {
  line-height: 1.7;
  color: var(--gray-600);
}
.section--dark p {
  color: rgba(255,255,255,.7);
}

/* ─── SELECTION ─── */
::selection {
  background: rgba(0,89,178,.15);
  color: var(--primary);
}

/* ─── SCROLLBAR (Webkit) ─── */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--gray-50); }
::-webkit-scrollbar-thumb {
  background: var(--gray-300);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--gray-400);
}

/* ─── PRINT ─── */
@media print {
  .header, .footer, .scroll-top, .cta-section, .hero__shapes { display: none; }
  .hero { min-height: auto; padding: 2rem 0; }
  body { background: white; color: black; }
  .section { padding: 1rem 0; }
}

/* ═══════════════════════════════════════
   UTILITY (spaziature e allineamenti)
   ═══════════════════════════════════════ */
.mt-md  { margin-top: var(--space-md); }
.mt-xl  { margin-top: var(--space-xl); }
.mt-3xl { margin-top: var(--space-3xl); }

/* griglia con celle centrate verticalmente */
.grid--middle { align-items: center; }

/* btn-group centrato orizzontalmente */
.btn-group--center { justify-content: center; }

/* section-label centrata quando l'header è centrato */
.text-center .section-label { justify-content: center; }

/* span full-width dentro una griglia */
.grid-span-full { grid-column: 1 / -1; }

/* ─── IMMAGINE PROFILO (sezione "Cosa faccio") ─── */
.profile-img {
  width: 100%;
  max-width: 650px;
  height: auto;
  border-radius: var(--radius-xl);
  display: block;
  margin: 0 auto;
}

/* ─── PORTFOLIO: immagine e placeholder ─── */
.portfolio-card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.portfolio-card__placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #667eea, #764ba2);
}
.portfolio-card__placeholder span {
  color: var(--white);
  font-size: 1.5rem;
  font-weight: 700;
}

/* ═══════════════════════════════════════
   SERVIZI (bento interattivo)
   ═══════════════════════════════════════ */
.svc-bento {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: 1fr;
  gap: var(--space-lg);
}

.svc-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-xl);
  padding: var(--space-2xl);
  text-decoration: none;
  overflow: hidden;
  isolation: isolate;
  transition: transform .28s ease, box-shadow .28s ease, border-color .28s ease;
}
/* sweep di gradiente che entra in hover */
.svc-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--gradient-cta);
  opacity: 0;
  transform: scale(1.08);
  transition: opacity .3s ease, transform .4s ease;
}
.svc-card:hover,
.svc-card:focus-visible,
.svc-card.is-active {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: transparent;
}
.svc-card:hover::before,
.svc-card:focus-visible::before,
.svc-card.is-active::before { opacity: 1; transform: scale(1); }

/* numero filigrana */
.svc-card__num {
  position: absolute;
  top: var(--space-md);
  right: var(--space-lg);
  font-size: 2.75rem;
  font-weight: 900;
  line-height: 1;
  color: var(--gray-100);
  transition: color .3s ease, transform .3s ease;
}
.svc-card:hover .svc-card__num,
.svc-card:focus-visible .svc-card__num,
.svc-card.is-active .svc-card__num {
  color: rgba(255,255,255,.22);
  transform: translateY(-2px);
}

/* icona */
.svc-card__icon {
  width: 54px;
  height: 54px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: var(--primary);
  background: linear-gradient(135deg, rgba(0,89,178,.08), rgba(0,172,202,.08));
  transition: background .3s ease, color .3s ease, transform .35s ease;
}
.svc-card:hover .svc-card__icon,
.svc-card:focus-visible .svc-card__icon,
.svc-card.is-active .svc-card__icon {
  background: rgba(255,255,255,.18);
  color: #fff;
  transform: rotate(-6deg) scale(1.06);
}

/* testi */
.svc-card__title {
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--gray-900);
  transition: color .3s ease;
}
.svc-card__text {
  font-size: var(--fs-sm);
  line-height: 1.7;
  color: var(--gray-400);
  margin: 0;
  transition: color .3s ease;
}
.svc-card__link {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  margin-top: auto;
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--primary);
  transition: gap .3s ease, color .3s ease;
}
.svc-card__link i { transition: transform .3s ease; }
.svc-card:hover .svc-card__title,
.svc-card:hover .svc-card__text,
.svc-card:hover .svc-card__link,
.svc-card:focus-visible .svc-card__title,
.svc-card:focus-visible .svc-card__text,
.svc-card:focus-visible .svc-card__link,
.svc-card.is-active .svc-card__title,
.svc-card.is-active .svc-card__text,
.svc-card.is-active .svc-card__link { color: #fff; }
.svc-card:hover .svc-card__text,
.svc-card:focus-visible .svc-card__text,
.svc-card.is-active .svc-card__text { color: rgba(255,255,255,.85); }
.svc-card:hover .svc-card__link i,
.svc-card:focus-visible .svc-card__link i,
.svc-card.is-active .svc-card__link i { transform: translateX(5px); }

@media (max-width: 992px) {
  .svc-bento { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .svc-bento { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .svc-card,
  .svc-card::before,
  .svc-card__num,
  .svc-card__icon,
  .svc-card__link,
  .svc-card__link i { transition: none; }
  .svc-card:hover,
  .svc-card:focus-visible,
  .svc-card.is-active { transform: none; }
  .svc-card:hover .svc-card__icon,
  .svc-card:focus-visible .svc-card__icon,
  .svc-card.is-active .svc-card__icon { transform: none; }
}
