/* ==========================================================
   BEE AGENCY · style.css
   Fondo viola ad alveare, contenuti su "layer" scuri,
   header a capsula, serif classici, animazioni leggere.
   ========================================================== */

:root {
  --viola: #7349E9;
  --viola-gap: #6540DD;
  --viola-chiaro: #9B7BFF;
  --giallo: #FFCB30;
  --giallo-hover: #F2B800;
  --bianco: #F7F2FF;
  --nero: #1C1733;
  --nero-alto: #2B2450;
  --nero-hover: #3A3168;
  --bordo: rgba(247, 242, 255, .14);
  --testo-tenue: rgba(247, 242, 255, .74);
  --rosso: #FF8A7A;

  --font-titoli: "Bodoni Moda", "Didot", "Bodoni 72", Georgia, serif;
  --font-testo: "EB Garamond", Garamond, Georgia, "Times New Roman", serif;

  --raggio: 25px;
  --raggio-s: 14px;
  --esa: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
  --ease: cubic-bezier(.22, .8, .25, 1);
  --molla: cubic-bezier(.34, 1.56, .64, 1);
  --t: .3s var(--ease);

  --alveare: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='58.9' height='102.0' viewBox='0 0 58.9 102.0'%3E%3Cpath d='M0.0 -29.2 L25.3 -14.6 L25.3 14.6 L0.0 29.2 L-25.3 14.6 L-25.3 -14.6Z M58.9 -29.2 L84.2 -14.6 L84.2 14.6 L58.9 29.2 L33.6 14.6 L33.6 -14.6Z M0.0 72.8 L25.3 87.4 L25.3 116.6 L0.0 131.2 L-25.3 116.6 L-25.3 87.4Z M58.9 72.8 L84.2 87.4 L84.2 116.6 L58.9 131.2 L33.6 116.6 L33.6 87.4Z M29.4 21.8 L54.8 36.4 L54.8 65.6 L29.4 80.2 L4.1 65.6 L4.1 36.4Z' fill='%237349E9'/%3E%3C/svg%3E");
  color-scheme: dark;
}

/* ===== Base ===== */
*, *::before, *::after { box-sizing: border-box; }
html { overflow-x: clip; scroll-behavior: smooth; scroll-padding-top: 110px; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font-testo);
  font-size: 1.2rem;
  line-height: 1.55;
  color: var(--bianco);
  background-color: var(--viola-gap);
  background-image: var(--alveare);
  background-attachment: fixed;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(120% 80% at 50% 0%, transparent 40%, rgba(40, 18, 120, .35) 100%);
}

img { max-width: 100%; height: auto; display: block; }
picture { display: contents; }
a { color: inherit; }
h1, h2, h3, p { margin: 0; }
h1, h2 { font-family: var(--font-titoli); font-weight: 500; line-height: 1.1; text-wrap: balance; }
h3 { font-weight: 600; font-size: 1.35rem; line-height: 1.2; }
::selection { background: var(--giallo); color: var(--nero); }
:focus-visible { outline: 3px solid var(--giallo); outline-offset: 3px; border-radius: 6px; }

.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.salta {
  position: fixed; top: 10px; left: 10px; z-index: 200;
  padding: .5rem 1rem; border-radius: 999px;
  background: var(--giallo); color: var(--nero); text-decoration: none;
  transform: translateY(-200%); transition: transform var(--t);
}
.salta:focus { transform: none; }

.wrap {
  width: 100%;
  max-width: 1160px;
  margin-inline: auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}

.layer {
  background: var(--nero);
  border: 1px solid var(--bordo);
  border-radius: var(--raggio);
  padding: clamp(1.5rem, 4vw, 3rem);
  box-shadow: 0 30px 60px -35px rgba(15, 5, 50, .75);
}

.sopratitolo {
  font-size: .95rem;
  font-weight: 500;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--bianco);
  opacity: .9;
}
.sopratitolo--giallo { color: var(--giallo); opacity: 1; }

/* ===== Barra di avanzamento ===== */
.progresso { position: fixed; inset: 0 0 auto; height: 3px; z-index: 120; pointer-events: none; }
.progresso span {
  display: block; height: 100%;
  background: linear-gradient(90deg, var(--giallo), #FFE38A);
  transform-origin: 0 50%;
  transform: scaleX(var(--p, 0));
  box-shadow: 0 0 12px rgba(255, 203, 48, .7);
}

/* ===== Bottoni ===== */
.btn {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .55rem;
  padding: .7rem 1.5rem;
  border-radius: var(--raggio);
  border: 1.5px solid transparent;
  font: 500 1.15rem/1.2 var(--font-testo);
  text-decoration: none;
  cursor: pointer;
  transition: background var(--t), color var(--t), border-color var(--t), transform .35s var(--ease), box-shadow var(--t);
}
.btn::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, .55) 50%, transparent 70%);
  transform: translateX(-120%);
  transition: transform .7s var(--ease);
}
.btn:hover::after { transform: translateX(120%); }
.btn i { transition: transform var(--t); }
.btn:hover i { transform: translateX(3px); }
.btn:hover .fa-arrow-down { transform: translateY(3px); }
.btn--giallo { background: var(--giallo); color: var(--nero); box-shadow: 0 10px 24px -12px rgba(255, 203, 48, .8); }
.btn--giallo:hover { background: var(--giallo-hover); box-shadow: 0 16px 30px -12px rgba(255, 203, 48, .9); }
.btn--vuoto { border-color: var(--bianco); color: var(--bianco); background: transparent; }
.btn--vuoto::after { background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, .25) 50%, transparent 70%); }
.btn--vuoto:hover { background: var(--bianco); color: var(--nero); }
.btn--piccolo { padding: .45rem 1.15rem; font-size: 1.05rem; }
.magnete { will-change: transform; }

/* ===== Header a capsula ===== */
.header {
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  z-index: 50;
  padding-top: 14px;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
  transition: padding var(--t);
}
.capsula {
  position: relative;
  max-width: 1128px;
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .55rem .7rem .55rem 1.1rem;
  border-radius: 999px;
  background: rgba(28, 23, 51, .78);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border: 1px solid var(--bordo);
  box-shadow: 0 14px 30px -18px rgba(10, 4, 40, .9);
  transition: max-width .5s var(--ease), background var(--t), padding var(--t);
}
.header.scrollato { padding-top: 8px; }
.header.scrollato .capsula { max-width: 980px; background: rgba(28, 23, 51, .92); }
.js .header { animation: scendi .8s var(--ease) both; }
@keyframes scendi { from { transform: translateY(-120%); opacity: 0; } }

.brand { display: flex; align-items: center; gap: .6rem; text-decoration: none; }
.brand img { width: 40px; transition: transform .6s var(--molla); }
.brand:hover img { transform: rotate(-12deg) scale(1.08); }
.brand span { font-family: var(--font-titoli); font-size: 1.3rem; font-weight: 500; }

.nav { display: flex; align-items: center; gap: 1.5rem; }
.nav a { position: relative; text-decoration: none; font-size: 1.12rem; transition: color var(--t); }
.nav a:not(.nav__cta)::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -3px;
  height: 1.5px;
  background: var(--giallo);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform .4s var(--ease);
}
.nav a:hover, .nav a.attivo { color: var(--giallo); }
.nav a:hover::after, .nav a.attivo::after { transform: scaleX(1); transform-origin: left; }
.nav .nav__cta {
  padding: .35rem 1.1rem;
  border-radius: 999px;
  background: var(--giallo);
  color: var(--nero);
  font-weight: 500;
  transition: background var(--t), transform var(--t);
}
.nav .nav__cta:hover { background: var(--giallo-hover); color: var(--nero); transform: translateY(-1px); }

.burger {
  display: none;
  position: relative;
  width: 42px; height: 42px;
  border: 0; border-radius: 50%;
  background: var(--nero-alto);
  cursor: pointer;
}
.burger span {
  position: absolute; left: 12px; right: 12px; height: 2px; border-radius: 2px;
  background: var(--bianco);
  transition: transform .35s var(--ease), opacity .2s;
}
.burger span:nth-child(1) { top: 14px; }
.burger span:nth-child(2) { top: 20px; }
.burger span:nth-child(3) { top: 26px; }
.burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ===== Hero ===== */
.hero {
  position: relative;
  padding-block: clamp(2.5rem, 7vw, 5.5rem) clamp(3.5rem, 7vw, 5.5rem);
  min-height: min(92vh, 860px);
  display: grid;
  align-items: center;
}
.hero__fondo { position: absolute; inset: -80px 0 0; overflow: hidden; pointer-events: none; z-index: 0; }
.hex {
  position: absolute;
  width: var(--s, 120px);
  aspect-ratio: 1 / 1.1547;
  clip-path: var(--esa);
  background: linear-gradient(160deg, rgba(255, 203, 48, .22), rgba(255, 203, 48, 0) 70%);
  animation: deriva var(--dur, 18s) ease-in-out infinite alternate;
}
.hex::after { content: ""; position: absolute; inset: 2px; clip-path: var(--esa); background: var(--viola-gap); opacity: .55; }
.hex--1 { --s: 140px; top: 12%; left: -40px; --dur: 16s; }
.hex--2 { --s: 70px; top: 70%; left: 8%; --dur: 13s; animation-delay: -4s; }
.hex--3 { --s: 90px; top: 8%; left: 46%; --dur: 20s; animation-delay: -8s; }
.hex--4 { --s: 180px; top: 58%; right: -60px; --dur: 22s; }
.hex--5 { --s: 54px; top: 22%; right: 8%; --dur: 11s; animation-delay: -2s; }
.hex--6 { --s: 40px; top: 84%; left: 52%; --dur: 14s; animation-delay: -6s; }
@keyframes deriva {
  from { transform: translate3d(0, 0, 0) rotate(0); }
  to { transform: translate3d(30px, -40px, 0) rotate(24deg); }
}
.bagliore {
  position: absolute;
  width: 560px; height: 560px;
  left: calc(var(--mx, 70) * 1%); top: calc(var(--my, 40) * 1%);
  translate: -50% -50%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 203, 48, .18), rgba(255, 203, 48, 0) 65%);
  transition: left 1.2s var(--ease), top 1.2s var(--ease);
}

.hero__inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr);
  gap: clamp(1.5rem, 5vw, 4rem);
  align-items: center;
}
.hero__text { display: grid; gap: 1.4rem; }
.hero h1 { font-size: clamp(2.6rem, 1.5rem + 4.2vw, 4.9rem); line-height: 1.04; }
.hero h1 em { color: var(--giallo); }
.riga { display: block; overflow: hidden; padding-bottom: .08em; margin-bottom: -.08em; }
.riga > span { display: inline-block; }
.js .riga > span { animation: sali 1s var(--ease) both; animation-delay: calc(.25s + var(--d) * .12s); }
.js .entra { animation: appari .9s var(--ease) both; animation-delay: calc(.25s + var(--d) * .12s); }
@keyframes sali { from { transform: translateY(110%) rotate(3deg); } }
@keyframes appari { from { opacity: 0; transform: translateY(18px); filter: blur(4px); } }

.hero__servizi {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: .45rem;
  font-family: var(--font-titoli);
  font-style: italic;
  font-size: clamp(1.3rem, 1.1rem + .8vw, 1.75rem);
}
.rotore {
  display: inline-flex;
  flex-direction: column;
  height: 1.3em;
  overflow: hidden;
  line-height: 1.3;
  color: var(--giallo);
}
.rotore span {
  display: block;
  text-decoration: underline dashed rgba(255, 203, 48, .7);
  text-decoration-thickness: 1.5px;
  text-underline-offset: .18em;
  animation: ruota 12s var(--ease) infinite;
}
@keyframes ruota {
  0%, 13% { transform: translateY(0); }
  16.6%, 30% { transform: translateY(-100%); }
  33.3%, 46% { transform: translateY(-200%); }
  50%, 63% { transform: translateY(-300%); }
  66.6%, 80% { transform: translateY(-400%); }
  83.3%, 96% { transform: translateY(-500%); }
  100% { transform: translateY(-600%); }
}
.hero__servizi-coda { color: var(--bianco); opacity: .9; }
.hero__lead { font-size: clamp(1.2rem, 1.1rem + .4vw, 1.4rem); max-width: 36ch; color: rgba(247, 242, 255, .92); }
.hero__cta { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: .4rem; }

.hero__logo {
  position: relative;
  justify-self: center;
  width: min(100%, 440px);
  transform: perspective(900px) rotateX(calc(var(--ry, 0) * 1deg)) rotateY(calc(var(--rx, 0) * 1deg));
  transition: transform .6s var(--ease);
}
.js .hero__logo { animation: logoEntra 1.4s var(--molla) .3s both; }
@keyframes logoEntra { from { opacity: 0; scale: .7; rotate: -8deg; } }
.hero__logo img {
  position: relative;
  filter: drop-shadow(0 30px 40px rgba(25, 8, 85, .45));
  animation: fluttua 6s ease-in-out infinite;
}
.hero__logo-alone {
  position: absolute;
  inset: 10%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(247, 242, 255, .35), rgba(155, 123, 255, 0) 65%);
  filter: blur(20px);
  animation: pulsa 5s ease-in-out infinite;
}
@keyframes fluttua {
  0%, 100% { transform: translateY(0) rotate(0); }
  50% { transform: translateY(-14px) rotate(-1.5deg); }
}
@keyframes pulsa { 0%, 100% { opacity: .55; transform: scale(.92); } 50% { opacity: 1; transform: scale(1.06); } }

.scorri {
  position: absolute;
  left: 50%; bottom: 18px;
  translate: -50% 0;
  z-index: 1;
  width: 28px; height: 46px;
  border: 1.5px solid rgba(247, 242, 255, .6);
  border-radius: 999px;
}
.scorri span {
  position: absolute; left: 50%; top: 8px;
  width: 4px; height: 8px; margin-left: -2px; border-radius: 4px;
  background: var(--giallo);
  animation: rotella 1.8s var(--ease) infinite;
}
@keyframes rotella { 0% { opacity: 0; transform: translateY(0); } 30% { opacity: 1; } 100% { opacity: 0; transform: translateY(16px); } }

/* ===== Nastro dei servizi ===== */
.nastro {
  position: relative;
  z-index: 2;
  margin-block: clamp(.5rem, 2vw, 1.5rem) clamp(1.5rem, 4vw, 3rem);
  background: var(--giallo);
  color: var(--nero);
  transform: rotate(-2deg);
  margin-inline: -20px;
  box-shadow: 0 20px 40px -20px rgba(15, 5, 50, .6);
  overflow: hidden;
}
.nastro__pista { display: flex; width: max-content; animation: scorre 38s linear infinite; }
.nastro:hover .nastro__pista { animation-play-state: paused; }
.nastro__gruppo { display: flex; align-items: center; gap: 1.6rem; padding: .85rem .8rem; }
.nastro span { font-family: var(--font-titoli); font-style: italic; font-size: clamp(1.3rem, 1rem + 1vw, 1.9rem); white-space: nowrap; }
.nastro__hex { width: 14px; height: 16px; clip-path: var(--esa); background: var(--nero); flex: none; }
@keyframes scorre { to { transform: translateX(-50%); } }

/* ===== Rivelazioni allo scroll ===== */
.js .rivela { opacity: 0; translate: 0 40px; transition: opacity 1s var(--ease), translate 1s var(--ease); transition-delay: calc(var(--i, 0) * 90ms); }
.js .rivela.visto { opacity: 1; translate: none; }
[data-split] .parola { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .1em; margin-bottom: -.1em; }
[data-split] .parola > span { display: inline-block; }
.js [data-split] .parola > span { transform: translateY(105%); transition: transform .9s var(--ease); transition-delay: calc(.15s + var(--w) * 45ms); }
.js .visto [data-split] .parola > span { transform: none; }

/* ===== Sezioni ===== */
.sezione { padding-block: clamp(1rem, 3vw, 2rem); position: relative; }
.sezione h2 { font-size: clamp(1.9rem, 1.4rem + 2vw, 2.9rem); }

/* ===== Alveare ===== */
.alveare { display: grid; gap: 2.5rem; overflow: hidden; }
.alveare__intro { display: grid; gap: .9rem; max-width: 40rem; }
.alveare__intro p:not(.sopratitolo) { color: var(--testo-tenue); }
.alveare__corpo {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: clamp(1.5rem, 4vw, 3.5rem);
  align-items: center;
}
.favo { --c: 132px; --g: 8px; display: grid; justify-items: center; }
.favo__riga { display: flex; gap: var(--g); }
.favo__riga + .favo__riga { margin-top: calc(var(--c) * -0.2887 + var(--g) * .87); }

.cella {
  position: relative;
  width: var(--c);
  height: calc(var(--c) * 1.1547);
  clip-path: var(--esa);
  border: 0;
  background: var(--nero-alto);
  color: var(--bianco);
  display: grid;
  place-content: center;
  justify-items: center;
  gap: .45rem;
  padding: 0 .9rem;
  font: 500 1.02rem/1.15 var(--font-testo);
  text-align: center;
  cursor: pointer;
  transition: background .35s var(--ease), color .35s var(--ease), scale .45s var(--molla);
}
.cella::before {
  content: "";
  position: absolute; inset: 0;
  background: radial-gradient(circle at 50% 0%, rgba(255, 203, 48, .35), transparent 60%);
  opacity: 0;
  transition: opacity var(--t);
}
.cella > * { position: relative; }
.cella i { font-size: 1.35rem; color: var(--giallo); transition: color var(--t), transform .45s var(--molla); }
.cella:hover { background: var(--nero-hover); scale: 1.06; }
.cella:hover::before { opacity: 1; }
.cella:hover i { transform: translateY(-3px) scale(1.15); }
.cella[aria-selected="true"] { background: var(--giallo); color: var(--nero); scale: 1.04; }
.cella[aria-selected="true"]::before { opacity: 0; }
.cella[aria-selected="true"] i { color: var(--nero); }
.cella:focus-visible { outline: none; background: var(--nero-hover); box-shadow: inset 0 0 0 3px var(--giallo); }
/* entrata delle celle: usa transform, separato dallo scale dell'hover */
.js .alveare .cella { opacity: 0; transform: scale(.4) rotate(-30deg); }
.js .alveare.visto .cella {
  opacity: 1; transform: none;
  transition: opacity .5s var(--ease) calc(.3s + var(--i) * 70ms), transform .7s var(--molla) calc(.3s + var(--i) * 70ms), background .35s var(--ease), color .35s var(--ease), scale .45s var(--molla);
}

.consiglio {
  position: relative;
  display: grid;
  gap: 1rem;
  padding: clamp(1.4rem, 3vw, 2.2rem);
  border-radius: var(--raggio);
  background: linear-gradient(145deg, var(--viola), #5B36D6);
  min-width: 0;
  overflow: hidden;
  box-shadow: 0 30px 50px -30px rgba(10, 4, 40, .9);
}
.consiglio::before {
  content: "";
  position: absolute;
  width: 220px; aspect-ratio: 1 / 1.1547;
  right: -60px; top: -70px;
  clip-path: var(--esa);
  background: rgba(255, 203, 48, .12);
  animation: deriva 14s ease-in-out infinite alternate;
}
.consiglio__contenuto { display: grid; gap: 1rem; position: relative; }
.consiglio__contenuto.cambia > * { animation: cambia .55s var(--ease) both; }
.consiglio__contenuto.cambia > *:nth-child(2) { animation-delay: .05s; }
.consiglio__contenuto.cambia > *:nth-child(3) { animation-delay: .1s; }
.consiglio__contenuto.cambia > *:nth-child(4) { animation-delay: .15s; }
.consiglio__contenuto.cambia > *:nth-child(5) { animation-delay: .2s; }
@keyframes cambia { from { opacity: 0; transform: translateX(24px); filter: blur(3px); } }
.consiglio__tipo { font-size: .95rem; letter-spacing: .24em; text-transform: uppercase; color: var(--giallo); }
.consiglio__problema { font-family: var(--font-titoli); font-size: clamp(1.4rem, 1.15rem + 1vw, 1.9rem); line-height: 1.22; font-style: italic; }
.consiglio__etichetta { font-size: 1rem; color: rgba(247, 242, 255, .8); margin-top: .3rem; }
.consiglio__lista { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.consiglio__lista li {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .6rem .95rem;
  border-radius: var(--raggio-s);
  background: rgba(28, 23, 51, .4);
  transition: background var(--t), transform var(--t);
}
.consiglio__lista li:hover { background: rgba(28, 23, 51, .6); transform: translateX(4px); }
.consiglio__lista strong { font-weight: 600; }
.consiglio__lista i { color: var(--giallo); width: 1.1rem; flex: none; }
.consiglio__perche { color: rgba(247, 242, 255, .9); }
.consiglio .btn { justify-self: start; position: relative; }

/* ===== Servizi ===== */
.servizi__testa { display: grid; gap: .9rem; max-width: 44rem; margin-bottom: 1.8rem; }
.servizi__testa p:not(.sopratitolo) { color: rgba(247, 242, 255, .92); }
.servizi { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.1rem; }
.servizio {
  --mx: 50%; --my: 0%;
  position: relative;
  display: grid;
  gap: .7rem;
  align-content: start;
  padding: 1.7rem 1.5rem;
  border-radius: var(--raggio);
  background: var(--nero);
  border: 1px solid var(--bordo);
  overflow: hidden;
  transform: perspective(900px) rotateX(var(--tx, 0deg)) rotateY(var(--ty, 0deg)) translateY(var(--lift, 0px));
  transition: transform .5s var(--ease), border-color var(--t), box-shadow var(--t);
}
.js .servizio.rivela { transition: opacity 1s var(--ease) calc(var(--i) * 90ms), translate 1s var(--ease) calc(var(--i) * 90ms), transform .5s var(--ease), border-color var(--t), box-shadow var(--t); }
.servizio::before {
  content: "";
  position: absolute; inset: 0;
  background: radial-gradient(380px circle at var(--mx) var(--my), rgba(255, 203, 48, .16), transparent 45%);
  opacity: 0;
  transition: opacity var(--t);
  pointer-events: none;
}
.servizio:hover { --lift: -6px; border-color: rgba(255, 203, 48, .5); box-shadow: 0 30px 50px -30px rgba(10, 4, 40, .95); }
.servizio:hover::before { opacity: 1; }
.servizio__num {
  position: absolute;
  top: 1.1rem; right: 1.3rem;
  font-family: var(--font-titoli);
  font-style: italic;
  font-size: 1.1rem;
  color: rgba(247, 242, 255, .3);
  transition: color var(--t);
}
.servizio:hover .servizio__num { color: var(--giallo); }
.servizio .esagono { transition: transform .6s var(--molla); }
.servizio:hover .esagono { transform: rotate(60deg) scale(1.1); }
.servizio:hover .esagono i { transform: rotate(-60deg); }
.esagono i { transition: transform .6s var(--molla); }
.servizio h3 { font-family: var(--font-titoli); font-weight: 500; font-size: 1.7rem; }
.servizio p { color: var(--testo-tenue); font-size: 1.08rem; }

/* ===== Social ===== */
.social__testa { display: grid; gap: .9rem; max-width: 44rem; margin-bottom: 1.2rem; }
.social__testa p:not(.sopratitolo) { color: var(--testo-tenue); }
.tabella-scroll { overflow-x: auto; padding-top: .9rem; }
.tabella { width: 100%; min-width: 620px; border-collapse: separate; border-spacing: 0; text-align: center; }
.tabella th, .tabella td { padding: 1rem .9rem; border-bottom: 1px solid var(--bordo); transition: background var(--t); }
.tabella thead th {
  font-family: var(--font-titoli);
  font-weight: 500;
  font-size: 1.7rem;
  border-bottom-color: rgba(247, 242, 255, .3);
  padding-top: 1.6rem;
  position: relative;
}
.tabella tbody th, .tabella tfoot th { text-align: left; font-weight: 500; color: var(--testo-tenue); font-size: 1.08rem; }
.tabella tbody tr:hover th, .tabella tbody tr:hover td:not(.top) { background: rgba(247, 242, 255, .04); }
.tabella td { font-size: 1.12rem; }
.tabella td.piccolo { font-size: 1rem; color: var(--testo-tenue); font-style: italic; }
.tabella .fa-check { color: var(--giallo); }
.tabella .fa-minus { color: rgba(247, 242, 255, .35); }
.tabella .top { background: var(--viola); }
.tabella tbody tr:hover .top { background: #7D56F0; }
.tabella thead .top { border-radius: var(--raggio-s) var(--raggio-s) 0 0; box-shadow: 0 -12px 30px -12px rgba(155, 123, 255, .8); }
.tabella .scelte .top { border-radius: 0 0 var(--raggio-s) var(--raggio-s); }
.tabella .top.piccolo { color: rgba(247, 242, 255, .9); }
.top__tag {
  position: absolute;
  top: -.75rem; left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
  padding: .15rem .8rem;
  border-radius: 999px;
  background: var(--giallo);
  color: var(--nero);
  font-family: var(--font-testo);
  font-size: .9rem;
  font-weight: 600;
  animation: tag 2.6s ease-in-out infinite;
}
@keyframes tag { 0%, 100% { transform: translateX(-50%) translateY(0); } 50% { transform: translateX(-50%) translateY(-4px); } }
.tabella tfoot td, .tabella tfoot th { border-bottom: 0; }
.tabella .scelte td { padding-top: .2rem; padding-bottom: 1.2rem; }
.js .tabella-box tbody tr { opacity: 0; transform: translateX(-20px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.js .tabella-box.visto tbody tr { opacity: 1; transform: none; }
.js .tabella-box.visto tbody tr:nth-child(1) { transition-delay: .3s; }
.js .tabella-box.visto tbody tr:nth-child(2) { transition-delay: .4s; }
.js .tabella-box.visto tbody tr:nth-child(3) { transition-delay: .5s; }
.js .tabella-box.visto tbody tr:nth-child(4) { transition-delay: .6s; }
.js .tabella-box.visto tbody tr:nth-child(5) { transition-delay: .7s; }

/* ===== Metodo ===== */
.metodo__testa { display: grid; gap: 1rem; max-width: 48rem; padding-block: clamp(1.5rem, 4vw, 3rem) clamp(1.2rem, 3vw, 2rem); }
.metodo__testa > p { color: rgba(247, 242, 255, .9); max-width: 46ch; }
.noi__frase {
  margin: 0;
  font-family: var(--font-titoli);
  font-size: clamp(1.8rem, 1.3rem + 2vw, 2.8rem);
  line-height: 1.18;
  text-wrap: balance;
}
.noi__frase em { color: var(--giallo); }
.metodo {
  position: relative;
  list-style: none;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(1rem, 3vw, 2rem);
}
.metodo__linea {
  position: absolute;
  left: calc(clamp(1.5rem, 4vw, 3rem) + 32px);
  right: calc(clamp(1.5rem, 4vw, 3rem) + 32px);
  top: calc(clamp(1.5rem, 4vw, 3rem) + 36px);
  height: 2px;
  background: repeating-linear-gradient(90deg, rgba(255, 203, 48, .3) 0 8px, transparent 8px 14px);
}
.metodo__linea span {
  position: absolute; inset: 0;
  background: repeating-linear-gradient(90deg, var(--giallo) 0 8px, transparent 8px 14px);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 1.8s var(--ease) .3s;
}
.metodo.visto .metodo__linea span { transform: scaleX(1); }
.passo { position: relative; display: grid; gap: .6rem; align-content: start; }
.passo__hex {
  position: relative;
  width: 64px; height: 72px;
  display: grid; place-items: center;
  clip-path: var(--esa);
  background: var(--nero-alto);
  color: var(--giallo);
  font-size: 1.3rem;
  margin-bottom: .4rem;
  transition: background .5s var(--ease), color .5s var(--ease), transform .6s var(--molla);
  transition-delay: calc(.4s + var(--i) * .35s);
}
.passo__hex b { position: absolute; bottom: 10px; right: 14px; font: 600 .8rem var(--font-testo); opacity: .7; }
.metodo.visto .passo__hex { background: var(--giallo); color: var(--nero); transform: scale(1.05); }
.passo:hover .passo__hex { transform: scale(1.12) rotate(-6deg); transition-delay: 0s; }
.passo h3 { font-family: var(--font-titoli); font-weight: 500; font-size: 1.45rem; }
.passo p { color: var(--testo-tenue); font-size: 1.06rem; }

/* ===== Esagoni piccoli ===== */
.esagono {
  flex: none;
  width: 48px; height: 55px;
  display: grid; place-items: center;
  clip-path: var(--esa);
  background: var(--giallo);
  color: var(--nero);
  font-size: 1.1rem;
}
.esagono--piccolo { width: 36px; height: 41px; font-size: .9rem; }

/* ===== Chi siamo ===== */
.chi { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, .6fr); gap: clamp(1.5rem, 5vw, 4rem); align-items: center; }
.chi__storia { display: grid; gap: 1rem; }
.chi__storia p:not(.sopratitolo) { color: var(--testo-tenue); max-width: 62ch; }
.chi__numeri { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; }
.chi__numeri li {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.2rem;
  border-radius: var(--raggio-s);
  background: var(--nero-alto);
  border: 1px solid transparent;
  transition: translate .5s var(--ease), border-color var(--t);
}
.chi__numeri li:hover { translate: -6px 0; border-color: rgba(255, 203, 48, .4); }
.js .chi .chi__numeri li { opacity: 0; transform: translateX(30px); }
.js .chi.visto .chi__numeri li {
  opacity: 1; transform: none;
  transition: opacity .8s var(--ease) calc(.3s + var(--i) * .12s), transform .8s var(--ease) calc(.3s + var(--i) * .12s), translate .5s var(--ease), border-color var(--t);
}
.chi__cifra {
  flex: none;
  width: 64px; height: 72px;
  display: grid; place-items: center;
  clip-path: var(--esa);
  background: var(--giallo);
  color: var(--nero);
  font-family: var(--font-titoli);
  font-size: 1.9rem;
  font-variant-numeric: tabular-nums;
}
.chi__numeri li > span:last-child { font-size: 1.12rem; line-height: 1.3; }

/* ===== Contatti ===== */
.contatti { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: clamp(1.5rem, 5vw, 4rem); }
.contatti__info { display: grid; gap: 1rem; align-content: start; position: relative; }
.contatti__info > p { color: var(--testo-tenue); max-width: 34ch; }
.contatti__lista { list-style: none; margin: .4rem 0 0; padding: 0; display: grid; gap: .8rem; }
.contatti__lista li { display: flex; align-items: center; gap: .8rem; }
.contatti__lista a { text-decoration: none; background: linear-gradient(var(--giallo), var(--giallo)) 0 100% / 0 1.5px no-repeat; transition: background-size .4s var(--ease), color var(--t); }
.contatti__lista a:hover { color: var(--giallo); background-size: 100% 1.5px; }

.ape-volo { position: relative; width: 260px; height: 140px; margin-top: 1rem; }
.ape-volo__scia { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.ape-volo__scia path {
  fill: none;
  stroke: var(--giallo);
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-dasharray: 8 10;
  opacity: .8;
  animation: scia 1.2s linear infinite;
}
@keyframes scia { to { stroke-dashoffset: -18; } }
.ape {
  position: absolute;
  width: 92px;
  left: 0; top: 0;
  offset-path: path("M5 100 C 60 100, 70 40, 120 50 S 190 110, 250 20");
  offset-rotate: auto 10deg;
  animation: vola 7s ease-in-out infinite alternate;
}
@keyframes vola { from { offset-distance: 0%; } to { offset-distance: 100%; } }

.form-box { position: relative; min-width: 0; }
.form { display: grid; gap: 1rem; }
.form__riga { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.campo { position: relative; display: grid; gap: .35rem; min-width: 0; }
.campo label, .campo legend { font-size: 1.05rem; font-weight: 500; }
.campo small { color: var(--testo-tenue); font-size: .95rem; font-weight: 400; }
.campo input, .campo textarea {
  width: 100%;
  padding: .75rem .95rem;
  border: 1px solid var(--bordo);
  border-radius: var(--raggio-s);
  background: var(--nero-alto);
  color: var(--bianco);
  font: 400 1.1rem/1.4 var(--font-testo);
  transition: border-color var(--t), box-shadow var(--t), background var(--t);
}
.campo input:hover, .campo textarea:hover { border-color: rgba(247, 242, 255, .3); }
.campo input::placeholder, .campo textarea::placeholder { color: rgba(247, 242, 255, .4); }
.campo textarea { resize: vertical; min-height: 7.5rem; padding-bottom: 1.6rem; }
.campo input:focus, .campo textarea:focus {
  outline: none;
  border-color: var(--giallo);
  background: #312A5A;
  box-shadow: 0 0 0 4px rgba(255, 203, 48, .18);
}
.campo__conta { position: absolute; right: .8rem; bottom: .45rem; font-size: .85rem; color: rgba(247, 242, 255, .4); pointer-events: none; }
.campo.errore input, .campo.errore textarea { border-color: var(--rosso); animation: scuoti .4s; }
@keyframes scuoti { 20%, 60% { transform: translateX(-5px); } 40%, 80% { transform: translateX(5px); } }

.chips { border: 0; margin: 0; padding: 0; }
.chips legend { padding: 0; margin-bottom: .45rem; }
.chips__lista { display: flex; flex-wrap: wrap; gap: .45rem; }
.chip { position: relative; cursor: pointer; }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip span {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .35rem .9rem;
  border-radius: 999px;
  border: 1px solid var(--bordo);
  background: var(--nero-alto);
  font-size: 1.02rem;
  transition: background var(--t), color var(--t), border-color var(--t), transform .35s var(--molla);
  user-select: none;
}
.chip span::before {
  content: "";
  width: 0; height: 9px;
  margin-right: -.35rem;
  clip-path: var(--esa);
  background: var(--nero);
  transition: width .3s var(--molla), margin .3s var(--molla);
}
.chip:hover span { border-color: rgba(255, 203, 48, .55); transform: translateY(-2px); }
.chip input:checked + span { background: var(--giallo); color: var(--nero); border-color: var(--giallo); }
.chip input:checked + span::before { width: 8px; margin-right: 0; }
.chip input:focus-visible + span { outline: 3px solid var(--giallo); outline-offset: 2px; }
.chip.pop span { animation: pop .45s var(--molla); }
@keyframes pop { 50% { transform: scale(1.12); } }

.miele { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.spunta { display: flex; gap: .65rem; align-items: flex-start; font-size: 1.02rem; color: var(--testo-tenue); cursor: pointer; }
.spunta input { margin-top: .3rem; width: 18px; height: 18px; accent-color: var(--giallo); flex: none; }
.spunta a { color: var(--giallo); }
.spunta.errore span { color: var(--rosso); }
.form .btn { justify-self: start; }
.btn--invio { min-width: 220px; }
.btn__testo, .btn--invio i { transition: opacity .2s; }
.btn__carica {
  position: absolute;
  width: 22px; height: 22px;
  border: 2.5px solid rgba(28, 23, 51, .25);
  border-top-color: var(--nero);
  border-radius: 50%;
  opacity: 0;
}
.btn--invio.invio { pointer-events: none; }
.btn--invio.invio .btn__testo, .btn--invio.invio i { opacity: 0; }
.btn--invio.invio .btn__carica { opacity: 1; animation: gira .8s linear infinite; }
@keyframes gira { to { transform: rotate(360deg); } }
.form__esito { min-height: 1.4em; font-size: 1.05rem; }
.form__esito.ok { color: var(--giallo); }
.form__esito.ko { color: var(--rosso); }

.grazie {
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 1rem;
  text-align: center;
  min-height: 100%;
  padding: 2.5rem 1.2rem;
  border-radius: var(--raggio);
  background: linear-gradient(145deg, var(--viola), #5B36D6);
  animation: grazie .8s var(--molla) both;
}
.grazie[hidden] { display: none; }
.grazie:focus { outline: none; }
.grazie h3 { font-family: var(--font-titoli); font-weight: 500; font-size: 2rem; }
.grazie p { max-width: 34ch; color: rgba(247, 242, 255, .9); }
.grazie__hex {
  width: 84px; height: 96px;
  display: grid; place-items: center;
  clip-path: var(--esa);
  background: var(--giallo);
  color: var(--nero);
  font-size: 2rem;
  animation: hexPop .9s var(--molla) .2s both;
}
.grazie__hex i { animation: spunta .5s var(--molla) .7s both; }
@keyframes grazie { from { opacity: 0; transform: scale(.92) translateY(20px); } }
@keyframes hexPop { from { transform: scale(0) rotate(-120deg); } }
@keyframes spunta { from { transform: scale(0); } }
.coriandolo {
  position: absolute;
  z-index: 5;
  width: 10px; height: 11px;
  clip-path: var(--esa);
  background: var(--giallo);
  pointer-events: none;
  animation: esplodi 1.1s var(--ease) forwards;
}
@keyframes esplodi { to { transform: translate(var(--x), var(--y)) rotate(var(--r)); opacity: 0; } }

/* ===== Footer ===== */
.footer { padding-block: 3rem calc(2.5rem + env(safe-area-inset-bottom, 0px)); }
.footer__inner { display: grid; justify-items: center; gap: .9rem; text-align: center; }
.footer img { width: 130px; transition: transform .8s var(--molla); }
.footer img:hover { transform: rotate(-6deg) scale(1.05); }
.footer__motto { font-family: var(--font-titoli); font-size: 1.35rem; }
.footer__motto em { color: var(--giallo); }
.footer p:last-child { font-size: 1rem; color: rgba(247, 242, 255, .85); }
.footer a { text-decoration-color: rgba(255, 203, 48, .6); text-underline-offset: 3px; }

/* ===== Torna su ===== */
.su {
  position: fixed;
  right: max(18px, env(safe-area-inset-right, 0px));
  bottom: calc(18px + env(safe-area-inset-bottom, 0px));
  z-index: 60;
  width: 50px; height: 57px;
  border: 0;
  clip-path: var(--esa);
  background: var(--giallo);
  color: var(--nero);
  font-size: 1.05rem;
  cursor: pointer;
  opacity: 0;
  transform: translateY(20px) scale(.8);
  pointer-events: none;
  transition: opacity var(--t), transform .45s var(--molla), background var(--t);
}
.su.visibile { opacity: 1; transform: none; pointer-events: auto; }
.su:hover { background: var(--giallo-hover); transform: translateY(-3px); }

/* ===== Ape che segue il cursore ===== */
.ape-cursore {
  position: fixed;
  left: 0; top: 0;
  z-index: 150;
  width: 40px;
  pointer-events: none;
  opacity: 0;
  transition: opacity .4s;
  will-change: transform;
}
.ape-cursore.attiva { opacity: 1; }

/* ===== Pagine testuali (privacy) ===== */
.pagina { padding-block: clamp(2rem, 5vw, 4rem); }
.pagina .layer { max-width: 820px; margin-inline: auto; display: grid; gap: 1rem; }
.pagina h1 { font-size: clamp(2.2rem, 1.6rem + 2.5vw, 3.2rem); margin-bottom: .5rem; }
.pagina h2 { font-size: 1.6rem; margin-top: 1rem; }
.pagina p, .pagina li { color: var(--testo-tenue); }
.pagina a { color: var(--giallo); }
.pagina ul { margin: 0; padding-left: 1.2rem; display: grid; gap: .3rem; }
.da-completare { background: rgba(255, 203, 48, .15); color: var(--giallo); padding: 0 .3rem; border-radius: 4px; }

/* ===== Responsive ===== */
@media (max-width: 960px) {
  .alveare__corpo { grid-template-columns: 1fr; justify-items: center; }
  .consiglio { width: 100%; }
  .contatti, .chi { grid-template-columns: 1fr; }
  .servizi { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .chi__numeri { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .chi__numeri li { flex-direction: column; text-align: center; }
  .metodo { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 2rem; }
  .metodo__linea { display: none; }
  .ape-volo { position: absolute; right: 0; top: 0; width: 180px; height: 100px; margin: 0; }
  .ape-volo__scia { display: none; }
  .ape-volo .ape { width: 64px; offset-path: path("M5 80 C 40 80, 50 30, 90 40 S 140 80, 175 15"); }
}

@media (max-width: 820px) {
  .burger { display: block; }
  .nav {
    position: absolute;
    top: calc(100% + 8px);
    left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: .2rem;
    padding: .8rem;
    border-radius: var(--raggio);
    background: var(--nero);
    border: 1px solid var(--bordo);
    box-shadow: 0 20px 40px -20px rgba(10, 4, 40, .9);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px) scale(.98);
    transform-origin: top center;
    transition: opacity var(--t), transform .4s var(--ease), visibility var(--t);
  }
  .nav.aperto { opacity: 1; visibility: visible; transform: none; }
  .nav a { padding: .7rem 1rem; border-radius: var(--raggio-s); }
  .nav a::after { display: none; }
  .nav a:not(.nav__cta):hover { background: var(--nero-alto); }
  .nav .nav__cta { text-align: center; margin-top: .4rem; padding: .7rem 1rem; }
  .nav.aperto a { animation: appari .45s var(--ease) both; }
  .nav.aperto a:nth-child(2) { animation-delay: .04s; }
  .nav.aperto a:nth-child(3) { animation-delay: .08s; }
  .nav.aperto a:nth-child(4) { animation-delay: .12s; }
  .nav.aperto a:nth-child(5) { animation-delay: .16s; }
  .nav.aperto a:nth-child(6) { animation-delay: .2s; }
  .header.scrollato .capsula { max-width: 1128px; }

  .hero { min-height: 0; }
  .hero__inner { grid-template-columns: 1fr; }
  .hero__logo { order: -1; width: min(60%, 260px); }
  .scorri { display: none; }
}

@media (max-width: 560px) {
  body { font-size: 1.12rem; }
  .tabella { min-width: 540px; }
  .tabella th, .tabella td { padding: .8rem .6rem; }
  .tabella tbody th, .tabella tfoot th { position: sticky; left: 0; z-index: 1; background: var(--nero); min-width: 7.5rem; }
  .tabella thead th:first-child { position: sticky; left: 0; z-index: 1; background: var(--nero); }
  .tabella thead th { font-size: 1.35rem; }
  .favo { --c: 98px; --g: 6px; }
  .cella { font-size: .85rem; padding: 0 .55rem; gap: .3rem; }
  .cella i { font-size: 1.1rem; }
  .form__riga { grid-template-columns: 1fr; }
  .form .btn, .hero__cta .btn { justify-self: stretch; flex: 1 1 100%; }
  .servizi { grid-template-columns: 1fr; }
  .chi__numeri { grid-template-columns: 1fr; }
  .chi__numeri li { flex-direction: row; text-align: left; }
  .metodo { grid-template-columns: 1fr; }
  .ape-volo { width: 110px; height: 70px; }
  .ape-volo .ape { width: 46px; offset-path: path("M5 60 C 30 60, 40 20, 65 30 S 90 55, 105 10"); }
  .su { width: 44px; height: 50px; }
}

@media (max-width: 360px) {
  .favo { --c: 80px; --g: 5px; }
}

@media (hover: none), (pointer: coarse) {
  .ape-cursore { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .rivela, .js .alveare .cella, .js .tabella-box tbody tr, .js .chi .chi__numeri li { opacity: 1 !important; transform: none !important; translate: none !important; }
  .js [data-split] .parola > span { transform: none !important; }
  .rotore { height: auto; border: 0; }
  .rotore span:not(:first-child) { display: none; }
  .metodo__linea span { transform: none; }
  .ape-cursore { display: none; }
}
.ape-404 { width: 120px; animation: fluttua 3s ease-in-out infinite; }
.layer--centro { text-align: center; justify-items: center; }
[hidden] { display: none !important; }

.tabella .prezzo { display: block; margin-top: .25rem; font-size: 1.35rem; color: var(--giallo); font-variant-numeric: tabular-nums; }
.tabella .top .prezzo { color: var(--bianco); }
.tabella .prezzo small { font-family: var(--font-testo); font-size: .95rem; color: var(--testo-tenue); margin-left: .2rem; }
.tabella-box .nota { margin-top: 1.2rem; font-size: 1rem; font-style: italic; color: var(--testo-tenue); }
