/* ==========================================================================
   Look&Feel — valori ripresi dalle Theme Options di Salient
   ========================================================================== */

:root {
  /* Colori */
  --accent: #37c1c3;          /* accent-color */
  --extra-1: #f3c105;         /* extra-color-1 (giallo, bottoni e stelle) */
  --extra-2: #ffffff;         /* extra-color-2 */
  --extra-3: #343b4a;         /* extra-color-3 (blu ardesia del logo) */
  --bg: #ffffff;              /* overall-bg-color */
  --text: #000000;            /* overall-font-color */
  --nav-text: #000000;        /* menu: nero come il testo */
  --nav-hover: #27ccc0;       /* header-font-hover-color */
  --offcanvas-bg: #262d3a;    /* header-slide-out-widget-area-background-color */
  --offcanvas-text: #eefbfa;
  --offcanvas-hover: #ffc203;
  --offcanvas-close: #ff1053;
  --footer-bg: #313233;
  --footer-text: #cccccc;
  --footer-muted: #777777;
  --footer-bottom-bg: #1f1f1f;

  /* Tipografia */
  --font-body: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-nav: var(--font-body);

  /* Layout: max_container_width 1725, padding 90px, mobile 6% */
  --container: 1725px;
  --gutter: 90px;

  --radius-btn: 6px;          /* button-styling-roundness */
  --radius-card: 15px;        /* border_radius del carosello */
  --ease: cubic-bezier(0.215, 0.61, 0.355, 1); /* easeOutCubic */
}

*,
*::before,
*::after { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 18px;
  line-height: 28px;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Sfondo con gradienti sferici (bg_image dell'originale), fisso dietro tutte le
   sezioni: effetto parallasse "fixed". Un layer fixed funziona anche su iOS,
   dove background-attachment: fixed viene ignorato. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background: url("../assets/img/hero-bg.jpg") center center / cover no-repeat;
  pointer-events: none;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
strong { font-weight: 700; }

h1, h2, h3 { margin: 0; }

.h1-style,
.hero-lead {
  font-size: 40px;
  line-height: 55px;
  font-weight: 500;
  letter-spacing: -2px;
  word-spacing: 3px;
}

.container {
  width: 100%;
  max-width: calc(var(--container) + var(--gutter) * 2);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

@media (max-width: 999px) {
  :root { --gutter: 6vw; }
}

/* ==========================================================================
   Header — formato "centered-menu", trasparente all'inizio, si riduce allo scroll
   ========================================================================== */

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  transition: background-color .35s var(--ease), box-shadow .35s var(--ease), transform .45s var(--ease);
}
/* Nascosto scendendo: esce dall'alto, ricompare risalendo */
.site-header.is-hidden { transform: translateY(calc(-100% - 24px)); }

.header-inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  height: 100px;
  transition: height .35s var(--ease);
}

.site-header.is-scrolled {
  background: #fff;
  box-shadow: 0 0 3px 0 rgba(0, 0, 0, .22);
}
.site-header.is-scrolled .header-inner { height: 70px; }

.logo img { height: 25px; width: auto; }

.main-nav ul {
  display: flex;
  gap: 20px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.main-nav a {
  font-family: var(--font-nav);
  font-weight: 600;
  font-size: 15px;
  line-height: 18px;
  letter-spacing: -0.01em;
  color: var(--nav-text);
  opacity: .75;               /* header-starting-opacity */
  padding: 10px;
  transition: color .2s, opacity .2s;
}
.site-header.is-scrolled .main-nav a { opacity: 1; }
.main-nav a:hover { color: var(--nav-hover); opacity: 1; }

.header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 18px;
}

.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  padding: 0 9px;
  border: 0;
  background: none;
  cursor: pointer;
  color: var(--nav-text);
}
.menu-toggle span {
  display: block;
  height: 2px;
  width: 22px;
  background: currentColor;
  border-radius: 2px;
  transition: width .3s var(--ease);
}
.menu-toggle span:nth-child(2) { width: 16px; }
.menu-toggle:hover span:nth-child(2) { width: 22px; }

@media (max-width: 999px) {
  .main-nav { display: none; }
  .menu-toggle { display: flex; }
  .header-inner { grid-template-columns: 1fr auto; height: 80px; }
  .site-header.is-scrolled .header-inner { height: 64px; }
  .logo img { height: 20px; }
}
@media (max-width: 520px) {
  .header-actions .btn { display: none; }
}

/* Variante "pill": barra flottante arrotondata, in vetro smerigliato.
   Per tornare all'header classico togli la classe site-header--pill. */
.site-header--pill {
  top: 18px;
  padding: 0 24px;
  pointer-events: none; /* solo la pillola intercetta i clic */
  transition: top .45s var(--ease), transform .45s var(--ease);
}
.site-header--pill .header-inner {
  pointer-events: auto;
  max-width: 1120px;
  height: 68px;
  padding: 0 10px 0 28px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .62);
  border: 1px solid rgba(52, 59, 74, .08);
  box-shadow: 0 10px 34px -14px rgba(52, 59, 74, .28);
  -webkit-backdrop-filter: blur(16px) saturate(1.5);
          backdrop-filter: blur(16px) saturate(1.5);
  transition: height .45s var(--ease), background-color .45s var(--ease), box-shadow .45s var(--ease);
}
.site-header--pill.is-scrolled { background: none; box-shadow: none; top: 12px; }
.site-header--pill.is-scrolled .header-inner {
  height: 60px;
  background: rgba(255, 255, 255, .82);
  box-shadow: 0 14px 40px -16px rgba(52, 59, 74, .38);
}

.site-header--pill .main-nav ul { gap: 4px; }
.site-header--pill .main-nav a {
  display: block;
  padding: 11px 16px;
  border-radius: 999px;
  opacity: 1;
  transition: background-color .25s, color .25s;
}
.site-header--pill .main-nav a:hover {
  background: rgba(52, 59, 74, .07);
  color: var(--nav-text);
}

.site-header--pill .btn {
  border-radius: 999px;
  padding: .55em 1.4em;
  box-shadow: none;
}
.site-header--pill .btn:hover { transform: none; box-shadow: 0 8px 20px -8px rgba(243, 193, 5, .8); }

@media (max-width: 999px) {
  .site-header--pill { top: 12px; padding: 0 12px; }
  .site-header--pill .header-inner,
  .site-header--pill.is-scrolled .header-inner { height: 58px; padding: 0 8px 0 20px; }
}

/* Menu fullscreen ("fullscreen-alt") */
.offcanvas {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: var(--offcanvas-bg);
  display: grid;
  place-items: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity .45s var(--ease), visibility .45s;
}
.offcanvas.is-open { opacity: 1; visibility: visible; }

.offcanvas ul { list-style: none; margin: 0; padding: 0; text-align: center; }
.offcanvas li {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity .5s var(--ease), transform .5s var(--ease);
}
.offcanvas.is-open li { opacity: 1; transform: none; }
.offcanvas.is-open li:nth-child(2) { transition-delay: .06s; }
.offcanvas.is-open li:nth-child(3) { transition-delay: .12s; }
.offcanvas.is-open li:nth-child(4) { transition-delay: .18s; }

.offcanvas a {
  display: inline-block;
  font-family: var(--font-nav);
  font-weight: 500;
  font-size: clamp(34px, 7vw, 48px);
  letter-spacing: -0.035em;
  line-height: 1;
  padding: 14px 0;
  color: var(--offcanvas-text);
  transition: color .2s;
}
.offcanvas a:hover { color: var(--offcanvas-hover); }

.offcanvas-close {
  position: absolute;
  top: 24px;
  right: 24px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 0;
  background: var(--offcanvas-close);
  color: #fff;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: transform .3s var(--ease);
}
.offcanvas-close:hover { transform: rotate(90deg); }

/* ==========================================================================
   Bottoni
   ========================================================================== */

/* "text-reveal" su extra-color-1, stile "slightly_rounded_shadow" */
.btn {
  display: inline-flex;
  align-items: center;
  padding: .5em 1.4em;
  border-radius: var(--radius-btn);
  background: var(--extra-1);
  color: #000;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 16px;
  line-height: 28px;
  box-shadow: 0 6px 18px -6px rgba(243, 193, 5, .65);
  transition: box-shadow .35s var(--ease), transform .35s var(--ease);
  white-space: nowrap;
}
.btn:hover {
  box-shadow: 0 14px 28px -8px rgba(243, 193, 5, .75);
  transform: translateY(-2px);
}
.btn-sm { font-size: 14px; padding: .25em 1.1em; }

/* Il testo sale e una copia entra dal basso */
.btn-reveal .btn-label {
  position: relative;
  display: inline-block;
  overflow: hidden;
  vertical-align: top;
  color: transparent;
}
.btn-reveal .btn-label::before,
.btn-reveal .btn-label::after {
  content: attr(data-text);
  position: absolute;
  left: 0;
  top: 0;
  color: #000;
  transition: transform .45s var(--ease);
}
.btn-reveal .btn-label::after { transform: translateY(100%); }
.btn-reveal:hover .btn-label::before { transform: translateY(-100%); }
.btn-reveal:hover .btn-label::after { transform: none; }

/* "underline" */
.link-underline {
  position: relative;
  display: inline-block;
  padding: .5em 1.4em;
  font-weight: 600;
  font-size: 16px;
  line-height: 28px;
  color: #000;
}
.link-underline::after {
  content: "";
  position: absolute;
  left: 1.4em;
  right: 1.4em;
  bottom: .45em;
  height: 2px;
  background: currentColor;
  transform-origin: right;
  transition: transform .45s var(--ease);
}
.link-underline:hover::after { animation: underline-swap .7s var(--ease); }
@keyframes underline-swap {
  0%   { transform: scaleX(1); transform-origin: right; }
  45%  { transform: scaleX(0); transform-origin: right; }
  46%  { transform: scaleX(0); transform-origin: left; }
  100% { transform: scaleX(1); transform-origin: left; }
}

@media (max-width: 690px) {
  .hide-phone { display: none !important; }
}

/* ==========================================================================
   Hero
   ========================================================================== */

.hero {
  position: relative;
  padding-top: 100px; /* spazio per l'header fisso */
}

.hero-title {
  font-size: 10vw;
  line-height: .9;
  font-weight: 500;
  letter-spacing: -0.045em;
  padding: 4.5% 0 10%; /* meno spazio sopra: bilancia il vuoto sotto la valutazione */
  color: var(--text);
}
.hero-title > .hero-line:first-child { padding-top: 0; }

.hero-line { display: block; }
.hero-line--center { text-align: center; }
.hero-line--left { text-align: left; padding: 0 8%; }

.hero-lead {
  max-width: 850px;
  margin: 0 auto;
  padding: 0 0 6%;
  text-align: center;
}

.hero-ctas {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: nowrap;
  gap: 10px;
  padding-bottom: 3%;
}

.rating {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin-top: -20px;
  padding-bottom: 9%;
  font-size: 14px;
  line-height: 1;
}
.stars { display: inline-flex; margin-right: 10px; }
.stars svg { width: 20px; height: 20px; fill: var(--extra-1); }

@media (min-width: 691px) and (max-width: 1300px) {
  .hero-lead { font-size: clamp(26px, 2.8vw, 40px); line-height: 1.3; }
}
@media (max-width: 999px) {
  .hero-title { font-size: 8vw; }
  .hero-ctas, .rating { padding-bottom: 6%; }
}
@media (max-width: 690px) {
  .hero-title { font-size: 15vw; padding: 18% 0; }
  .hero-line--left { padding: 0 4%; }
  .h1-style, .hero-lead { font-size: 26px; line-height: 36px; letter-spacing: -1px; }
  .rating { margin-top: 0; padding-bottom: 14%; }
}

/* ==========================================================================
   Clienti — carosello loghi
   ========================================================================== */

.logos { padding: 20px 0 0; }

.logos-title {
  margin: 0 0 32px;
  text-align: center;
  font-size: 22px;
  line-height: 1.3;
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--text);
}

.logos-marquee {
  overflow: hidden;
  /* Dissolvenza ai bordi */
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}

.logos-track {
  display: flex;
  width: max-content;
  animation: logos-scroll var(--logos-duration, 40s) linear infinite;
  animation-delay: var(--logos-delay, 0s);
  animation-play-state: paused; /* parte quando entra nel viewport (main.js) */
  will-change: transform;
  backface-visibility: hidden;
}
.logos-track.is-running { animation-play-state: running; }
.logos-marquee:hover .logos-track.is-running { animation-play-state: paused; }

@keyframes logos-scroll {
  to { transform: translate3d(-50%, 0, 0); }
}

.logos-group {
  display: flex;
  align-items: center;
  gap: 80px;
  margin: 0;
  padding: 0 80px 0 0; /* stesso valore del gap: il loop resta continuo */
  list-style: none;
}
.logos-group li {
  display: flex;
  align-items: center;
  height: 64px;
  flex-shrink: 0;
}

/* Loghi monocromatici: sagome scure attenuate, piene al passaggio del mouse */
.logos-group img {
  height: var(--h, 48px);
  width: auto;
  filter: brightness(0);
  opacity: .42;
  transition: opacity .4s;
  -webkit-user-drag: none;
}
.logos-group li:hover img { opacity: .9; }

@media (max-width: 690px) {
  .logos-group { gap: 48px; padding-right: 48px; }
  .logos-group li { height: 48px; }
  .logos-group img { height: calc(var(--h, 48px) * .72); }
}

/* Il carosello scorre sempre (anche con "riduci movimento"): è lento, lineare
   e si mette in pausa al passaggio del mouse */

/* ==========================================================================
   Servizi
   ========================================================================== */

.services { padding-top: 7%; }

.eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 28px;
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
}
/* I due cerchi del favicon (stessa disposizione e proporzioni) */
.eyebrow-dots {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  background: url("../assets/img/favicon.svg") center / contain no-repeat;
}

.services-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--text);
}

.service { position: relative; border-bottom: 1px solid var(--text); }
/* Linea colorata che si riempie al passaggio del mouse */
.service::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--extra-1));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .7s var(--ease);
}

.service-link {
  display: grid;
  grid-template-columns: 48px minmax(0, 1.15fr) minmax(0, 1fr);
  column-gap: 40px;
  align-items: start;
  padding: 44px 0;
}

.service-num {
  padding-top: .9em;
  font-family: var(--font-nav);
  font-weight: 700;
  font-size: 15px;
  line-height: 1;
  color: var(--text);
  transition: color .3s;
}

.service-title {
  font-size: clamp(28px, 2.8vw, 48px);
  line-height: 1.02;
  font-weight: 500;
  letter-spacing: -0.04em;
  transition: transform .6s var(--ease);
}

.service-text {
  margin: 0;
  padding-top: 6px;
  max-width: 560px;
  font-size: 17px;
  line-height: 27px;
  color: var(--text);
}

.service-arrow {
  justify-self: end;
  align-self: center;
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 1px solid var(--text);
  overflow: hidden;
  transition: background-color .4s var(--ease), border-color .4s var(--ease);
}
.service-arrow svg {
  width: 26px;
  height: 26px;
  transition: transform .5s var(--ease);
}

.service:hover .service-arrow { background: var(--extra-1); border-color: var(--extra-1); }
.service:hover .service-arrow svg { animation: arrow-through .6s var(--ease); }
@keyframes arrow-through {
  0%   { transform: translateX(0); }
  45%  { transform: translateX(150%); }
  46%  { transform: translateX(-150%); }
  100% { transform: translateX(0); }
}
.service-link:focus-visible { outline: 2px solid var(--accent); outline-offset: 6px; border-radius: 4px; }

@media (max-width: 999px) {
  .service-link {
    grid-template-columns: 50px minmax(0, 1fr);
    row-gap: 14px;
    column-gap: 20px;
    padding: 34px 0;
  }
  .service-text { grid-column: 2 / 3; grid-row: 2; }
  .service-arrow { width: 52px; height: 52px; grid-column: 3; grid-row: 1; }
}
@media (max-width: 690px) {
  .services { padding-top: 14%; }
  .service-link { grid-template-columns: minmax(0, 1fr); }
  .service-num { grid-column: 1; padding-top: 0; }
  .service-text { padding-top: 0; }
  .service-title { grid-column: 1; grid-row: 2; font-size: 26px; }
  .service-text { grid-column: 1 / -1; grid-row: 3; font-size: 16px; line-height: 25px; }
  .service-arrow { grid-column: 2; grid-row: 1 / 3; align-self: center; width: 44px; height: 44px; }
  .service-arrow svg { width: 20px; height: 20px; }
  .service:hover .service-title { transform: none; }
}

/* ==========================================================================
   Progetti + carosello
   ========================================================================== */

.projects { padding-bottom: 9%; overflow: hidden; }

.projects-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 30px;
  padding-top: 9%;
  margin-bottom: 40px;
}
.projects-intro p { max-width: 650px; margin: 14px 0 0; }

.carousel { position: relative; }
.carousel-track {
  display: flex;
  gap: 20px;
  cursor: grab;
  touch-action: pan-y;
  user-select: none;
  will-change: transform;
}
.carousel-track.is-dragging { cursor: grabbing; }

.carousel-item {
  position: relative;
  flex: 0 0 calc((100% - 20px) / 2);
  height: 60vh;
  min-height: 340px;
  border-radius: var(--radius-card);
  overflow: hidden;
  isolation: isolate;
  background: linear-gradient(135deg, var(--accent), var(--extra-1));
}
.carousel-item:nth-child(3n+2) { background: linear-gradient(135deg, var(--extra-3), var(--accent)); }
.carousel-item:nth-child(3n)   { background: linear-gradient(135deg, var(--extra-1), #f7dc6f); }

.item-media {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center center;
  transition: transform 1.2s var(--ease);
  -webkit-user-drag: none;
}
.carousel-item:hover .item-media { transform: scale(1.04); }

.item-caption {
  position: absolute;
  left: 24px;
  bottom: 22px;
  z-index: 1;
  padding: 8px 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .92);
  color: var(--text);
  font-weight: 600;
  font-size: 15px;
  line-height: 20px;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity .4s var(--ease), transform .4s var(--ease);
}
.carousel-item:hover .item-caption,
.carousel-item:focus-visible .item-caption { opacity: 1; transform: none; }
@media (hover: none) {
  .item-caption { opacity: 1; transform: none; }
}

.carousel-arrow {
  position: absolute;
  top: 50%;
  z-index: 5;
  width: 56px;
  height: 56px;
  margin-top: -28px;
  border: 0;
  border-radius: 50%;
  background: #fff;
  color: #000;
  display: grid;
  place-items: center;
  cursor: pointer;
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, .35);
  transition: transform .3s var(--ease);
}
.carousel-arrow svg { width: 22px; height: 22px; }
.carousel-arrow:hover { transform: scale(1.08); }
.carousel-arrow--prev { left: 20px; }
.carousel-arrow--next { right: 20px; }

@media (max-width: 690px) {
  .carousel-item { flex-basis: 100%; height: 55vh; }
  .carousel-arrow { width: 46px; height: 46px; margin-top: -23px; }
  .carousel-arrow--prev { left: 10px; }
  .carousel-arrow--next { right: 10px; }
  .projects-head { margin-bottom: 28px; }
}
/* Mockup interi: su tablet, smartphone e schermi bassi l'altezza segue il formato 4:3 */
@media (max-width: 999px), (max-height: 600px) {
  .carousel-item { height: auto; min-height: 0; aspect-ratio: 4 / 3; }
}

/* ==========================================================================
   Chi siamo (anteprima)
   ========================================================================== */

.about { padding: 4% 0 9%; }

.about-inner {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: 8%;
  align-items: center;
}

.about-photo {
  position: relative;
  margin: 0;
  aspect-ratio: 1 / 1;
  border-radius: var(--radius-card);
  background: linear-gradient(160deg, rgba(55, 193, 195, .25), rgba(243, 193, 5, .3));
}
.about-photo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 25%;
  border-radius: inherit;
  z-index: 1;
}
.about-photo-placeholder {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  opacity: .6;
}
.about-text { max-width: 600px; }
.about-title {
  font-size: clamp(30px, 3.2vw, 52px);
  line-height: 1.06;
  font-weight: 500;
  letter-spacing: -0.045em;
  word-spacing: 3px;
}
.about-body { margin-top: 10px; }
.about-body p { margin: 18px 0 0; max-width: 540px; }
.about-ctas {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 34px;
}

@media (max-width: 999px) {
  .about-inner { grid-template-columns: 1fr; gap: 56px; }
  .about-photo { max-width: 460px; }
}
@media (max-width: 690px) {
  .about { padding: 14% 0; }
  .about-ctas .link-underline { padding-left: 0; }
  .about-ctas .link-underline::after { left: 0; }
}

/* ==========================================================================
   Recensioni: bento grid (5 recensioni + voto medio + invito a Google)
   Desktop, 4 colonne:   A A S B
                         A A C C
                         D E E F
   ========================================================================== */

.reviews { padding: 3% 0 9%; }

.reviews-head { margin-bottom: 40px; }
.reviews-title {
  max-width: 14em;
  margin: 18px 0 0;
  font-size: clamp(30px, 3.2vw, 52px);
  line-height: 1.08;
  font-weight: 600;
  letter-spacing: -0.04em;
}

.bento {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-auto-rows: minmax(220px, auto);
  grid-template-areas:
    "a a s b"
    "a a c c"
    "d e e f";
  gap: 16px;
}
.bento-a { grid-area: a; }
.bento-score { grid-area: s; }
.bento-b { grid-area: b; }
.bento-c { grid-area: c; }
.bento-d { grid-area: d; }
.bento-e { grid-area: e; }
.bento-cta { grid-area: f; }

/* Riquadro base: vetro chiaro sopra lo sfondo a gradienti */
.bento-card {
  position: relative;
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: 30px;
  border-radius: var(--radius-card);
  background: rgba(244, 243, 240, .82);
  border: 1px solid rgba(0, 0, 0, .05);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}
.bento-review .stars { margin: 0 0 18px; }
.bento-review .stars svg { width: 16px; height: 16px; }
.bento-review blockquote {
  flex: 1;
  margin: 0;
  font-size: clamp(17px, 1.25vw, 20px);
  line-height: 1.4;
  font-weight: 500;
  letter-spacing: -0.02em;
}
.bento-review figcaption {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 26px;
  font-size: 15px;
  line-height: 1.25;
}
.bento-review figcaption strong { display: block; font-weight: 600; }
.bento-review figcaption small { display: block; font-size: 13px; opacity: .6; }

/* Iniziale nel cerchio, nei due colori del logo */
.bento-avatar {
  display: grid;
  place-items: center;
  flex: 0 0 40px;
  height: 40px;
  border-radius: 50%;
  font-weight: 700;
  font-size: 16px;
  color: #000;
}
.bento-avatar--yellow { background: #FFC200; }
.bento-avatar--teal { background: var(--accent); }

/* Recensione principale: grande, scura */
.bento-review--dark {
  padding: 44px;
  background: #1f1f1f;
  border-color: #1f1f1f;
  color: #fff;
}
.bento-review--dark blockquote {
  /* in basso nel riquadro (che è una colonna flex); niente flex qui,
     altrimenti le parole animate perderebbero gli spazi */
  flex: 0 1 auto;
  margin-top: auto;
  font-size: clamp(24px, 2.2vw, 36px);
  line-height: 1.22;
  letter-spacing: -0.035em;
}
.bento-review--dark::before {
  content: "";
  position: absolute;
  top: 44px;
  right: 44px;
  width: 52px;
  height: 52px;
  background: url("../assets/img/favicon.svg") center / contain no-repeat;
}

/* Voto medio: vetro come gli altri, stelle gialle */
.bento-score { justify-content: flex-end; }
.bento-score-num {
  margin: 0 0 10px;
  font-size: clamp(56px, 5vw, 88px);
  line-height: .9;
  font-weight: 700;
  letter-spacing: -0.05em;
}
.bento-score .stars { margin: 0 0 14px; }
.bento-score .stars svg { width: 20px; height: 20px; }
.bento-score-text { margin: 0; font-size: 15px; font-weight: 500; }
.bento-score-text { display: flex; align-items: center; gap: 8px; }
.bento-score-text img { height: 20px; width: auto; transform: translateY(1px); }

/* Invito a leggere tutto su Google */
.bento-cta {
  justify-content: space-between;
  background: var(--extra-1);
  border-color: var(--extra-1);
  color: #000;
  text-decoration: none;
  font-size: clamp(20px, 1.6vw, 26px);
  line-height: 1.15;
  font-weight: 600;
  letter-spacing: -0.03em;
}
.bento-cta svg {
  align-self: flex-end;
  width: 44px;
  height: 44px;
}

@media (max-width: 1200px) {
  .bento {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-areas:
      "a a"
      "s b"
      "c c"
      "d e"
      "f f";
  }
  .bento-cta { min-height: 0; }
}

@media (max-width: 690px) {
  .reviews { padding: 8% 0 14%; }
  .reviews-head { margin-bottom: 28px; }
  .bento {
    grid-template-columns: minmax(0, 1fr);
    grid-auto-rows: auto;
    grid-template-areas: "a" "s" "b" "c" "d" "e" "f";
    gap: 12px;
  }
  .bento-card { padding: 24px; }
  .bento-review--dark { padding: 28px; }
  .bento-review--dark::before { top: 28px; right: 28px; width: 40px; height: 40px; }
  .bento-review--dark blockquote { min-height: 0; margin-top: 64px; }
  .bento-score { flex-direction: row; flex-wrap: wrap; justify-content: flex-start; align-items: center; gap: 4px 16px; }
  .bento-score-num { margin: 0; font-size: 56px; }
  .bento-score .stars { margin: 0; }
  .bento-score-text { flex-basis: 100%; }
  .bento-cta { flex-direction: row; align-items: center; gap: 16px; }
  .bento-cta svg { align-self: center; width: 32px; height: 32px; flex: 0 0 32px; }
}

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
  position: relative;
  isolation: isolate;
  background: #000;
  color: var(--footer-text);
  clip-path: inset(0); /* ritaglia lo sfondo fisso qui sotto alla sola area del footer */
}

/* Le stesse sfere dello sfondo della pagina, versione su nero, ferme
   rispetto allo schermo: sembrano passare sotto il footer in trasparenza */
.site-footer::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background: url("../assets/img/hero-bg-dark.jpg") center center / cover no-repeat;
  opacity: .14; /* sfere appena accennate: il testo resta leggibile */
  pointer-events: none;
}

.footer-cta { padding-top: 110px; padding-bottom: 80px; }
.footer-kicker { margin: 0 0 10px; color: var(--footer-text); }
.footer-big {
  display: inline-block;
  font-size: clamp(54px, 8vw, 140px);
  line-height: .95;
  font-weight: 500;
  letter-spacing: -0.045em;
  color: #fff;
  transition: color .3s;
}

.footer-big { margin: 0; }

/* --------------------------------------------------------------------------
   Modulo di contatto multistep (sul fondo scuro del footer)
   -------------------------------------------------------------------------- */

/* Modulo a sinistra, invito alla chiamata a destra */
.footer-cta-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 340px);
  gap: 48px 80px;
  align-items: start;
  margin-top: 56px;
}
.lead-form { max-width: 920px; color: #fff; }
.lead-form [hidden] { display: none !important; }
.lead-honeypot { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

.lead-progress {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 28px;
  font-size: 14px;
  color: var(--footer-text);
}
.lead-progress b { font-weight: 600; color: #fff; }
.lead-progress-bars { display: flex; gap: 6px; }
.lead-progress-bars i {
  width: 36px;
  height: 4px;
  border-radius: 2px;
  background: rgba(255, 255, 255, .15);
  transition: background-color .4s var(--ease);
}
.lead-progress-bars i.is-done { background: var(--extra-1); }

.lead-step { margin: 0; padding: 0; border: 0; min-width: 0; }
.js-ready .lead-step:not(.is-active) { display: none; }
.lead-step.is-active { animation: lead-in .6s var(--ease) both; }
@keyframes lead-in {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: none; }
}

.lead-question {
  display: block;
  margin: 0 0 22px;
  padding: 0;
  font-size: clamp(22px, 2vw, 30px);
  line-height: 1.2;
  font-weight: 500;
  letter-spacing: -0.03em;
  color: #fff;
  outline: none;
}
.lead-sub { margin: 30px 0 14px; font-size: 16px; color: var(--footer-text); }
.lead-sub a { color: #fff; text-decoration: underline; text-underline-offset: 3px; }

/* Scelte a pillola: radio nascosti, etichetta cliccabile */
.pills { display: flex; flex-wrap: wrap; gap: 10px; }
.pill { position: relative; cursor: pointer; }
.pill input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.pill span {
  display: inline-block;
  padding: 14px 24px;
  border: 1px solid rgba(255, 255, 255, .25);
  border-radius: 999px;
  font-size: 17px;
  font-weight: 500;
  line-height: 1.2;
  transition: background-color .25s var(--ease), border-color .25s var(--ease), color .25s var(--ease);
}
.pill:hover span { border-color: rgba(255, 255, 255, .7); }
.pill input:checked + span { background: var(--extra-1); border-color: var(--extra-1); color: #000; }
.pill input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 3px; }

/* Campi */
.lead-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 18px; }
.field { display: flex; flex-direction: column; gap: 8px; font-size: 14px; color: var(--footer-text); }
.field--full { grid-column: 1 / -1; }
.field em { font-style: normal; opacity: .6; }
.field input::placeholder { color: rgba(255, 255, 255, .3); }
.field input,
.field textarea {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid rgba(255, 255, 255, .2);
  border-radius: var(--radius-btn);
  background: rgba(255, 255, 255, .05);
  color: #fff;
  font: inherit;
  font-size: 16px; /* evita lo zoom automatico su iOS */
  transition: border-color .25s, background-color .25s;
}
.field textarea { resize: vertical; min-height: 96px; }
.field input:focus,
.field textarea:focus { outline: none; border-color: var(--accent); background: rgba(255, 255, 255, .08); }
.field input.is-invalid { border-color: var(--offcanvas-close); }

.lead-check {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-top: 20px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--footer-text);
  cursor: pointer;
}
.lead-check input { flex: 0 0 18px; width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--extra-1); }
.lead-check a { color: #fff; text-decoration: underline; text-underline-offset: 3px; }

.lead-error { margin: 16px 0 0; font-size: 14px; color: #ff6b8b; }
.lead-fail { margin: 20px 0 0; font-size: 15px; color: #ff6b8b; }
.lead-fail a { color: #fff; text-decoration: underline; }

.lead-actions { display: flex; align-items: center; gap: 22px; margin-top: 30px; }
.lead-actions .btn { border: 0; cursor: pointer; }
.lead-actions .btn[disabled] { opacity: .6; cursor: progress; }
.lead-back {
  padding: 0;
  border: 0;
  background: none;
  color: var(--footer-text);
  font: inherit;
  font-size: 15px;
  cursor: pointer;
  transition: color .2s;
}
.lead-back:hover { color: #fff; }

/* Invito alla chiamata conoscitiva, sotto il modulo */
.lead-call {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 18px;
  padding: 28px;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: var(--radius-card);
  background: rgba(255, 255, 255, .04);
  font-size: 16px;
  line-height: 1.6;
  color: var(--footer-text);
}
.lead-call p { margin: 0; }
.lead-call-avatar {
  position: relative;
  display: grid;
  place-items: center;
  flex: none;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  overflow: hidden;
  background: linear-gradient(135deg, #FFC200, var(--accent));
  color: #000;
  font-weight: 700;
  font-size: 20px;
  letter-spacing: -0.02em;
}
.lead-call-avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* Pulsante pill per WhatsApp */
.lead-call-link {
  display: flex;
  width: fit-content;
  margin-top: 18px;
  white-space: nowrap;
  align-items: center;
  gap: 10px;
  padding: 12px 22px 12px 16px;
  border-radius: 999px;
  background: #fff;
  color: #000;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.2;
  transition: background-color .3s var(--ease), transform .3s var(--ease);
}
.lead-call-link svg { width: 22px; height: 22px; color: #25d366; flex: 0 0 22px; }
.lead-call-link:hover { background: var(--extra-1); transform: translateY(-2px); }

/* Conferma: i due cerchi del logo */
.lead-done { outline: none; animation: lead-in .6s var(--ease) both; }
.lead-done-eyes {
  display: block;
  width: 48px;
  height: 48px;
  margin-bottom: 22px;
  background: url("../assets/img/favicon.svg") center / contain no-repeat;
}
.lead-done .lead-sub { margin-top: 0; }

@media (max-width: 1000px) {
  .footer-cta-grid { grid-template-columns: minmax(0, 1fr); }
  .lead-call { max-width: 560px; }
}

@media (max-width: 690px) {
  .footer-cta-grid { margin-top: 40px; }
  .lead-fields { grid-template-columns: 1fr; }
  .pill span { padding: 12px 18px; font-size: 16px; }
  .lead-progress-bars i { width: 26px; }
  .lead-call { padding: 22px; }
  .lead-call-avatar { width: 56px; height: 56px; font-size: 16px; }
}

.footer-cols {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
  padding-top: 60px;
  padding-bottom: 70px;
  border-top: 1px solid rgba(255, 255, 255, .1);
  background-clip: content-box;
}
.footer-cols p { max-width: 380px; margin: 18px 0 0; font-size: 16px; line-height: 26px; }
.footer-cols h3 { color: #fff; font-size: 16px; font-weight: 600; margin-bottom: 14px; }
.footer-cols ul { list-style: none; margin: 0; padding: 0; }
.footer-cols li { margin-bottom: 6px; font-size: 16px; }
.footer-cols a { transition: color .2s; }
.footer-address { margin: 0 0 14px; font-style: normal; font-size: 16px; line-height: 26px; }
.footer-cols .footer-note { margin: 14px 0 0; font-size: 16px; font-style: italic; color: #fff; }
.footer-cols a:hover { color: var(--accent); }

/* Versione del logo con scritta bianca per il fondo scuro */
.footer-logo { height: 25px; width: auto; }

.footer-bottom { background: rgba(0, 0, 0, .55); color: var(--footer-muted); font-size: 14px; }
.footer-bottom-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 20px;
  padding-top: 22px;
  padding-bottom: 22px;
}
.footer-bottom a:hover { color: #fff; }

@media (max-width: 690px) {
  .footer-cols { grid-template-columns: 1fr 1fr; }
  .footer-cols > div:first-child { grid-column: 1 / -1; }
  .footer-cta { padding-top: 80px; padding-bottom: 50px; }
}

/* ==========================================================================
   Pagina Chi siamo: pochi testi, molto spazio
   ========================================================================== */

.page-hero { padding: 220px 0 12vw; }
.page-title {
  max-width: 11em;
  margin: 0;
  font-size: clamp(46px, 6.6vw, 112px);
  line-height: .98;
  font-weight: 500;
  letter-spacing: -0.045em;
}
.page-lead {
  max-width: 640px;
  margin: 48px 0 0;
  font-size: clamp(19px, 1.6vw, 24px);
  line-height: 1.5;
}

/* Il numero */
.stat { padding: 0 0 12vw; }
.stat-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  gap: 40px 80px;
  align-items: end;
}
.stat-figure { margin: 0; }
.stat-num {
  display: block;
  font-size: clamp(110px, 17vw, 300px);
  line-height: .85;
  font-weight: 500;
  letter-spacing: -0.06em;
  font-variant-numeric: tabular-nums;
}
.stat-label {
  display: block;
  margin-top: 22px;
  font-size: clamp(18px, 1.5vw, 22px);
  font-weight: 600;
}
.stat-text {
  max-width: 420px;
  margin: 0 0 8px;
  font-size: 17px;
  line-height: 27px;
}

/* Metodo: linea del tempo a tutta altezza con scorrimento orizzontale.
   Il JS dà alla sezione l'altezza necessaria e sposta la traccia;
   senza JS la traccia si scorre a mano. */
.method {
  position: relative;
  --step: clamp(280px, 34vw, 520px);
  /* margine laterale della traccia: il primo e l'ultimo passo arrivano al centro */
  --inset: calc(50vw - var(--step) / 2);
}
.method-sticky {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 100vh;
  min-height: 100svh;
  padding: 100px 0 60px;
  overflow: hidden;
}
.method.is-pinned .method-sticky { position: sticky; top: 0; height: 100vh; height: 100svh; }
.method-head { margin-bottom: clamp(48px, 9vh, 110px); }
.method-heading {
  margin: 0;
  font-size: clamp(36px, 4.4vw, 72px);
  line-height: 1;
  font-weight: 500;
  letter-spacing: -0.045em;
}
.method-viewport { overflow-x: auto; scrollbar-width: none; }
.method.is-pinned .method-viewport { overflow: visible; }
.method-track {
  position: relative;
  width: max-content;
  padding: 0 var(--inset);
  will-change: transform;
}
.method-steps {
  display: flex;
  gap: clamp(120px, 16vw, 300px);
  margin: 0;
  padding: 0;
  list-style: none;
}
.method-step {
  position: relative;
  flex: 0 0 var(--step);
  padding-top: 64px;
}
.method.is-pinned .method-step { opacity: .3; transition: opacity .5s var(--ease); }
.method.is-pinned .method-step.is-active { opacity: 1; }

/* Pallini come i cerchi del logo: si colorano quando la linea li raggiunge */
.method-dot {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 1;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid var(--text);
  background: #fff;
  transition: background-color .4s var(--ease), border-color .4s var(--ease);
}
.method-step.is-active .method-dot { background: #FFC200; border-color: #FFC200; }
.method-step.is-active:nth-child(even) .method-dot { background: var(--accent); border-color: var(--accent); }

.method-line {
  position: absolute;
  top: 11px;
  left: var(--inset);
  right: var(--inset);
  height: 2px;
  background: rgba(0, 0, 0, .12);
}
.method-line-fill {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, var(--accent), var(--extra-1));
  transform: scaleX(0);
  transform-origin: left;
}

.method-num { display: block; margin-bottom: 18px; font-size: 15px; font-weight: 700; }
.method-title {
  margin: 0 0 18px;
  font-size: clamp(26px, 2.5vw, 42px);
  line-height: 1.05;
  font-weight: 500;
  letter-spacing: -0.04em;
}
.method-text { max-width: 420px; margin: 0; font-size: 17px; line-height: 27px; }
.method-cta { margin-top: 32px; }

/* Schermi bassi (smartphone in orizzontale): spazi e testi compatti, così ogni passo sta nello schermo */
@media (max-height: 560px) and (orientation: landscape) {
  .method .method-sticky { padding: 20px 0 14px; }
  .method .method-head { margin-bottom: 16px; }
  .method .method-head .eyebrow { margin-bottom: 8px; }
  .method .method-heading { font-size: 28px; }
  .method .method-step { padding-top: 38px; }
  .method .method-num { margin-bottom: 4px; }
  .method .method-title { margin-bottom: 6px; font-size: 22px; }
  .method .method-text { font-size: 15px; line-height: 21px; }
  .method .method-cta { margin-top: 12px; }
}

/* Coriandoli all'arrivo sull'ultima tappa: sopra tutto, non intercetta i clic */
.confetti-canvas { position: fixed; inset: 0; z-index: 200; width: 100%; height: 100%; pointer-events: none; }

/* Team: intro sulla rete, poi i loghi dei partner */
.team { padding: 0 0 12vw; }
.team-intro {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: 32px 80px;
  align-items: end;
  margin-bottom: 72px;
}
.team-title {
  max-width: 13em;
  margin: 0;
  font-size: clamp(30px, 3.2vw, 52px);
  line-height: 1.08;
  font-weight: 600;
  letter-spacing: -0.04em;
}
.team-text { max-width: 520px; margin: 0; font-size: 17px; line-height: 27px; }
.partners {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 16px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.partner { display: flex; flex-direction: column; align-items: center; gap: 14px; height: 100%; text-align: center; }
.partner-logo {
  display: grid;
  place-items: center;
  width: 100%;
  height: 96px;
}
.partner-logo img { max-width: 88%; max-height: 58px; }
.partner-name { margin-bottom: -10px; font-size: 15px; font-weight: 600; line-height: 1.35; }
.partner-role { font-size: 14px; line-height: 1.35; opacity: .65; }

/* In home: prima Francesco e i collaboratori, poi la rete di partner */
.team--home { padding: 4% 0 9%; }
/* Titolo sopra; sotto, a sinistra foto e testo, a destra il contatore */
.team-title--home { margin-bottom: 56px; }
.team-bio {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  column-gap: 80px;
  row-gap: 48px;
  align-items: center;
  margin-bottom: 72px;
}
.team-stat .stat-num { font-size: clamp(72px, 8vw, 140px); }
.team-stat .stat-label { margin-top: 14px; }
.team-bio-photo { display: block; width: 160px; height: 160px; margin-bottom: 28px; border-radius: 50%; object-fit: cover; background: #fff; box-shadow: 0 0 0 1px rgba(0, 0, 0, .08); }
.team-bio .team-text { max-width: 600px; }

/* Clienti: elenco testuale su 3 colonne, letto dall'alto in basso */
.clients-list { padding: 0 0 12vw; }
.clients-list .team-title { max-width: none; margin-bottom: 64px; }
.clients-names {
  columns: 3;
  column-gap: 80px;
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 17px;
  line-height: 1.5;
}
.clients-names li { break-inside: avoid; padding: 3px 0; }

/* CTA verso il form "Parliamone" del footer */
.page-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px 48px;
}
.page-cta--clients { margin-top: 96px; padding-top: 56px; border-top: 1px solid rgba(0, 0, 0, .1); }
.page-cta-title {
  margin: 0;
  font-size: clamp(30px, 3.2vw, 52px);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.04em;
}

@media (max-width: 1000px) {
  .stat-inner { grid-template-columns: minmax(0, 1fr); }
  .team-intro { grid-template-columns: minmax(0, 1fr); }
  .team-bio { grid-template-columns: minmax(0, 1fr); }
  .partners { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 40px; }
  .clients-names { columns: 2; column-gap: 48px; }
}

@media (max-width: 690px) {
  .page-hero { padding: 150px 0 80px; }
  .page-lead { margin-top: 32px; }
  .stat, .team, .clients-list { padding-bottom: 96px; }
  .clients-names { columns: 1; }
  .clients-list .team-title { margin-bottom: 40px; }
  .page-cta--clients { margin-top: 64px; padding-top: 40px; }
  .method { --step: 78vw; }
  .method-step { padding-top: 56px; }
  .method-sticky { padding: 80px 0 40px; }
  .partners { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .team-intro { margin-bottom: 48px; }
  .team-bio { margin-bottom: 48px; }
  .team-title--home { margin-bottom: 36px; }
  .team-bio-photo { width: 120px; height: 120px; margin-bottom: 20px; }
  .partner-logo { height: 80px; }
}

/* ==========================================================================
   Pagina Creazione siti web
   ========================================================================== */

.svc-h2 {
  max-width: 14em;
  margin: 0;
  font-size: clamp(30px, 3.2vw, 52px);
  line-height: 1.08;
  font-weight: 600;
  letter-spacing: -0.04em;
}
.svc-head { margin-bottom: 56px; }
.svc-head--row { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px 40px; flex-wrap: wrap; }

/* Hero: testo a sinistra, mockup impilati a destra */
.svc-hero { padding: 190px 0 8vw; overflow-x: clip; }
.svc-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
  gap: 56px 6vw;
  align-items: center;
}
.svc-title {
  margin: 0;
  font-size: clamp(44px, 5.4vw, 92px);
  line-height: .98;
  font-weight: 500;
  letter-spacing: -0.045em;
}
.svc-rotator {
  margin: 22px 0 0;
  font-size: clamp(24px, 2.3vw, 38px);
  line-height: 1.2;
  font-weight: 500;
  letter-spacing: -0.03em;
}
/* Parola che cambia: entra dal basso, esce verso l'alto */
.rotator {
  position: relative;
  display: inline-grid;
  vertical-align: bottom;
  overflow: hidden;
  padding-bottom: .12em;
}
.rotator-word {
  grid-area: 1 / 1;
  white-space: nowrap;
  opacity: 0;
  transform: translateY(100%);
  transition: transform .7s var(--ease), opacity .7s var(--ease);
}
.rotator-word.is-active { opacity: 1; transform: none; }
.rotator-word.is-leaving { opacity: 0; transform: translateY(-100%); }
.rotator::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--accent), #FFC200);
  transform-origin: left;
  animation: rotator-bar var(--rotator-time, 2600ms) linear infinite;
}
@keyframes rotator-bar { from { transform: scaleX(0); } to { transform: scaleX(1); } }

.svc-lead { max-width: 560px; margin: 32px 0 0; font-size: clamp(17px, 1.3vw, 20px); line-height: 1.55; }
.svc-hero .hero-ctas { margin-top: 40px; }

/* Mockup impilati: la carta davanti esce, le altre avanzano */
.stack {
  position: relative;
  aspect-ratio: 4 / 3;
  margin-right: 6%;
  perspective: 1400px;
}
.stack-card {
  --tx: 0%; --ty: 0%; --rot: 0deg; --sc: 1; --depth: 1;
  position: absolute;
  inset: 0;
  border-radius: var(--radius-card);
  background: #ddd center / cover no-repeat;
  box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .35);
  transform:
    translate3d(calc(var(--tx) + var(--px, 0) * var(--depth) * 1px), calc(var(--ty) + var(--py, 0) * var(--depth) * 1px), 0)
    rotate(var(--rot)) scale(var(--sc));
  transition: transform 1s var(--ease), opacity .8s var(--ease);
  will-change: transform;
}
.stack-card[data-pos="0"] { z-index: 5; --depth: 18; }
.stack-card[data-pos="1"] { z-index: 4; --tx: 7%; --ty: -7%; --rot: 4deg; --sc: .93; --depth: 10; }
.stack-card[data-pos="2"] { z-index: 3; --tx: 13%; --ty: -13%; --rot: 8deg; --sc: .86; --depth: 5; }
.stack-card[data-pos="3"],
.stack-card[data-pos="4"] { z-index: 2; --tx: 17%; --ty: -17%; --rot: 11deg; --sc: .8; opacity: 0; }
.stack-card.is-out { z-index: 6; --tx: -28%; --ty: 10%; --rot: -12deg; --sc: .9; opacity: 0; transition-duration: .7s; }

/* Nastro di parole */
.svc-marquee {
  overflow: hidden;
  padding: 26px 0;
  border-block: 1px solid rgba(0, 0, 0, .12);
  background: rgba(255, 255, 255, .5);
}
.svc-marquee-track {
  display: flex;
  align-items: center;
  gap: 48px;
  width: max-content;
  animation: svc-marquee 36s linear infinite;
}
.svc-marquee span {
  font-size: clamp(34px, 4.4vw, 76px);
  line-height: 1;
  font-weight: 600;
  letter-spacing: -0.04em;
  white-space: nowrap;
}
.svc-marquee span:nth-of-type(even) { color: transparent; -webkit-text-stroke: 1.5px #000; }
.svc-marquee i {
  flex: none;
  width: 40px;
  height: 40px;
  background: url("../assets/img/favicon.svg") center / contain no-repeat;
  animation: svc-spin 8s linear infinite;
}
@keyframes svc-marquee { to { transform: translateX(-50%); } }
@keyframes svc-spin { to { transform: rotate(360deg); } }

/* Manifesto: parole spente che si accendono scorrendo */
.svc-manifesto { padding: 11vw 0; }
.svc-manifesto-text {
  max-width: 22em;
  margin: 0;
  font-size: clamp(28px, 3.6vw, 60px);
  line-height: 1.15;
  font-weight: 500;
  letter-spacing: -0.04em;
}
.svc-manifesto-text .hl { opacity: .14; transition: opacity .4s linear; }
.svc-manifesto-text .hl.is-lit { opacity: 1; }

/* Cosa realizziamo: schede con luce che segue il mouse */
.svc-types { padding-bottom: 10vw; }
.svc-cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.svc-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 340px;
  padding: 32px;
  overflow: hidden;
  border-radius: var(--radius-card);
  background: rgba(244, 243, 240, .82);
  border: 1px solid rgba(0, 0, 0, .05);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  transition: transform .6s var(--ease), background-color .6s var(--ease), color .6s var(--ease), opacity .75s var(--ease);
}
.svc-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(380px circle at var(--mx, 50%) var(--my, 50%), rgba(55, 193, 195, .35), rgba(255, 194, 0, .18) 45%, transparent 70%);
  opacity: 0;
  transition: opacity .5s var(--ease);
  pointer-events: none;
}
.svc-cards .svc-card:hover { transform: translateY(-8px); }
.svc-card:hover::before { opacity: 1; }
.svc-card > * { position: relative; }
.svc-card-num { font-size: 15px; font-weight: 700; }
.svc-card-title {
  margin: auto 0 14px;
  padding-top: 48px;
  font-size: clamp(24px, 1.9vw, 32px);
  line-height: 1.05;
  font-weight: 600;
  letter-spacing: -0.035em;
}
.svc-card-text { margin: 0; font-size: 16px; line-height: 25px; }

/* Cosa è incluso: titolo fisso, voci che si accendono al centro dello schermo */
.svc-included { padding-bottom: 6vw; }
.svc-included-grid {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
  gap: 48px 8vw;
  align-items: start;
}
.svc-included-head { position: sticky; top: 140px; }
.svc-included-text { max-width: 420px; margin: 28px 0 0; font-size: 17px; line-height: 27px; }
.svc-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid rgba(0, 0, 0, .15); }
.svc-item {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 24px;
  padding: 34px 0;
  border-bottom: 1px solid rgba(0, 0, 0, .15);
  opacity: .28;
  transition: opacity .6s var(--ease);
}
.svc-item.is-on { opacity: 1; }
.svc-item h3 { margin: 4px 0 8px; font-size: clamp(22px, 1.8vw, 30px); line-height: 1.1; font-weight: 600; letter-spacing: -0.03em; }
.svc-item p { max-width: 520px; margin: 0; font-size: 17px; line-height: 27px; }
.svc-check {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid #000;
  transition: background-color .5s var(--ease), border-color .5s var(--ease);
}
.svc-check svg { width: 22px; height: 22px; fill: none; stroke: #000; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.svc-check path { stroke-dasharray: 24; stroke-dashoffset: 24; transition: stroke-dashoffset .6s var(--ease) .15s; }
.svc-item.is-on .svc-check path { stroke-dashoffset: 0; }
.svc-item.is-on .svc-check { border-color: var(--accent); background: var(--accent); }
.svc-item:nth-child(even).is-on .svc-check { border-color: #FFC200; background: #FFC200; }

/* Metodo compatto: la linea si riempie e i pallini si accendono in sequenza */
.svc-steps-wrap { padding: 4vw 0 10vw; }
.svc-steps {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 32px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.svc-steps::before,
.svc-steps::after {
  content: "";
  position: absolute;
  top: 10px;
  left: 0;
  right: 0;
  height: 2px;
  background: rgba(0, 0, 0, .12);
}
.svc-steps::after {
  background: linear-gradient(90deg, var(--accent), #FFC200);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 2.4s var(--ease) .3s;
}
.svc-steps.is-visible::after { transform: scaleX(1); }
.svc-step { position: relative; padding-top: 48px; }
.svc-step-dot {
  position: absolute;
  top: 0;
  left: 0;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid rgba(0, 0, 0, .2);
  transition: background-color .4s var(--ease), border-color .4s var(--ease), transform .4s var(--ease);
}
.svc-steps.is-visible .svc-step-dot { background: var(--accent); border-color: var(--accent); transform: scale(1.15); }
.svc-steps.is-visible .svc-step:nth-child(even) .svc-step-dot { background: #FFC200; border-color: #FFC200; }
.svc-step:nth-child(1) .svc-step-dot { transition-delay: .3s; }
.svc-step:nth-child(2) .svc-step-dot { transition-delay: .95s; }
.svc-step:nth-child(3) .svc-step-dot { transition-delay: 1.6s; }
.svc-step:nth-child(4) .svc-step-dot { transition-delay: 2.25s; }
.svc-step-num { font-size: 15px; font-weight: 700; }
.svc-step h3 { margin: 10px 0 10px; font-size: clamp(22px, 1.8vw, 30px); line-height: 1.1; font-weight: 600; letter-spacing: -0.03em; }
.svc-step p { margin: 0; font-size: 16px; line-height: 25px; }

/* Alessandria e provincia */
.svc-local { padding-bottom: 8vw; }
.svc-local-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 48px 6vw;
  align-items: center;
}
.svc-local-text > p:not(.eyebrow) { max-width: 540px; margin: 24px 0 0; font-size: 17px; line-height: 27px; }
.svc-local-text .svc-h2 + p { margin-top: 32px; }
.svc-local-text .btn { margin-top: 36px; }
.svc-map { margin: 0; }
.svc-map svg { display: block; width: 100%; max-height: 720px; overflow: visible; }
.map-lines line {
  stroke-width: 2;
  stroke-dasharray: 6 8;
  stroke-dashoffset: 0;
  opacity: 0;
  transition: opacity .6s var(--ease);
  transition-delay: calc(400ms + var(--i) * 160ms);
  animation: map-flow 1.4s linear infinite;
}
@keyframes map-flow { to { stroke-dashoffset: -28; } }
.map-town { opacity: 0; transition: opacity .6s var(--ease); transition-delay: calc(500ms + var(--i) * 160ms); }
.map-town circle { fill: #fff; stroke: #000; stroke-width: 2; }
.map-town text, .map-home text { font-family: var(--font-body); font-size: 22px; font-weight: 600; fill: #000; }
.map-home text { font-size: 28px; font-weight: 700; }
.map-home-dot { fill: #FFC200; stroke: #000; stroke-width: 2; }
.map-pulse { fill: none; stroke: var(--accent); stroke-width: 2; transform-box: fill-box; transform-origin: center; animation: map-pulse 2.6s var(--ease) infinite; }
.map-pulse--late { animation-delay: 1.3s; }
@keyframes map-pulse { from { transform: scale(1); opacity: .9; } to { transform: scale(4.5); opacity: 0; } }
.svc-map.is-visible .map-lines line,
.svc-map.is-visible .map-town { opacity: 1; }

/* Recensioni: tre recensioni e l'invito a Google */
.svc-reviews { padding-top: 4vw; }
.svc-bento {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) repeat(2, minmax(0, 1fr));
  grid-template-rows: auto auto;
  gap: 16px;
}
.svc-bento .bento-review--dark { grid-row: 1 / 3; grid-column: 1; }
.svc-bento .bento-cta { grid-column: 2 / 4; grid-row: 2; flex-direction: row; align-items: center; gap: 24px; }
.svc-bento .bento-cta svg { align-self: center; flex: 0 0 44px; }
.svc-score { display: block; margin-bottom: 4px; font-size: clamp(44px, 3.6vw, 64px); line-height: 1; letter-spacing: -0.05em; }

/* Domande frequenti */
.svc-faq { padding: 2vw 0 10vw; }
.svc-faq-grid {
  display: grid;
  grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr);
  gap: 40px 8vw;
  align-items: start;
}
.svc-faq-head { position: sticky; top: 140px; }
.faq-list { border-top: 1px solid #000; }
.faq { border-bottom: 1px solid #000; }
.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 28px 0;
  cursor: pointer;
  list-style: none;
  font-size: clamp(20px, 1.6vw, 26px);
  line-height: 1.2;
  font-weight: 600;
  letter-spacing: -0.03em;
  transition: color .3s;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary:hover { color: var(--accent); }
.faq summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 4px; }
/* Il più diventa meno */
.faq summary i {
  position: relative;
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid #000;
  transition: background-color .4s var(--ease), border-color .4s var(--ease), transform .5s var(--ease);
}
.faq summary i::before,
.faq summary i::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 16px;
  height: 2px;
  margin: -1px 0 0 -8px;
  background: #000;
  transition: transform .5s var(--ease);
}
.faq summary i::after { transform: rotate(90deg); }
.faq[open] summary i { background: #FFC200; border-color: #FFC200; transform: rotate(180deg); }
.faq[open] summary i::after { transform: rotate(0deg); }
.faq-body { overflow: hidden; }
.faq-body p { max-width: 640px; margin: 0; padding: 0 64px 30px 0; font-size: 17px; line-height: 27px; }

@media (max-width: 1100px) {
  .svc-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .svc-card { min-height: 280px; }
  .svc-bento { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .svc-bento .bento-review--dark { grid-row: auto; grid-column: 1 / -1; }
  .svc-bento .bento-cta { grid-column: 1 / -1; grid-row: auto; }
}

@media (max-width: 999px) {
  .svc-hero { padding-top: 160px; }
  .svc-hero-grid,
  .svc-included-grid,
  .svc-local-grid,
  .svc-faq-grid { grid-template-columns: minmax(0, 1fr); }
  .stack { width: min(100%, 560px); margin: 24px auto 0 0; }
  .svc-included-head,
  .svc-faq-head { position: static; }
  .svc-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 48px; }
  .svc-steps::before, .svc-steps::after { display: none; }
  .svc-map svg { max-height: 560px; }
}

@media (max-width: 690px) {
  .svc-hero { padding: 140px 0 72px; }
  .stack { margin-right: 14%; }
  .svc-marquee { padding: 18px 0; }
  .svc-marquee-track { gap: 28px; }
  .svc-marquee i { width: 28px; height: 28px; }
  .svc-manifesto { padding: 96px 0; }
  .svc-head { margin-bottom: 36px; }
  .svc-cards { grid-template-columns: minmax(0, 1fr); }
  .svc-card { min-height: 0; padding: 26px; }
  .svc-card-title { padding-top: 32px; }
  .svc-types, .svc-steps-wrap, .svc-local, .svc-faq { padding-bottom: 96px; }
  .svc-item { grid-template-columns: 36px minmax(0, 1fr); gap: 16px; padding: 26px 0; }
  .svc-check { width: 36px; height: 36px; }
  .svc-steps { grid-template-columns: minmax(0, 1fr); }
  .svc-bento { grid-template-columns: minmax(0, 1fr); }
  .svc-bento .bento-review--dark,
  .svc-bento .bento-cta { grid-column: auto; }
  .faq summary { padding: 22px 0; }
  .faq summary i { width: 36px; height: 36px; }
  .faq-body p { padding-right: 0; }
  /* la mappa si rimpicciolisce: i nomi restano leggibili */
  .map-town text { font-size: 32px; }
  .map-home text { font-size: 38px; }
}

@media (prefers-reduced-motion: reduce) {
  .svc-marquee-track, .svc-marquee i, .rotator::after, .map-lines line, .map-pulse { animation: none; }
  .stack-card { transition: none; }
}

/* ==========================================================================
   Pagine legali (privacy e cookie policy): testo lungo, leggibilità prima di tutto
   ========================================================================== */

.legal {
  display: grid;
  grid-template-columns: minmax(0, 260px) minmax(0, 760px);
  justify-content: space-between;
  gap: 32px 80px;
  padding-top: 200px;
  padding-bottom: 120px;
}
.legal-head { grid-column: 1 / -1; max-width: 860px; }
.legal-title {
  margin: 0;
  font-size: clamp(40px, 5.4vw, 88px);
  line-height: 1;
  font-weight: 500;
  letter-spacing: -0.045em;
}
.legal-lead { max-width: 640px; margin: 28px 0 0; font-size: clamp(18px, 1.4vw, 21px); line-height: 1.5; }
.legal-updated { margin: 16px 0 0; font-size: 15px; opacity: .6; }

/* Indice: fisso a lato su desktop */
.legal-toc { position: sticky; top: 120px; align-self: start; padding-top: 8px; }
.legal-toc-title { margin: 0 0 12px; font-size: 14px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.legal-toc ol { margin: 0; padding: 0; list-style: none; counter-reset: toc; }
.legal-toc li { counter-increment: toc; margin: 0; }
.legal-toc a {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr);
  padding: 6px 0;
  font-size: 14px;
  line-height: 1.35;
  color: rgba(0, 0, 0, .7);
  transition: color .2s;
}
.legal-toc a::before { content: counter(toc); font-weight: 700; color: var(--accent); }
.legal-toc a:hover { color: #000; }

.legal-body { font-size: 17px; line-height: 1.7; }
.legal-body > p:first-child { margin-top: 0; }
.legal-body p { margin: 0 0 1em; }
.legal-body ul { margin: 0 0 1em; padding-left: 1.2em; }
.legal-body li { margin-bottom: .5em; }
.legal-body li::marker { color: var(--accent); }
.legal-body a { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--accent); }
.legal-section { padding-top: 40px; scroll-margin-top: 100px; }
.legal-section + .legal-section { margin-top: 8px; border-top: 1px solid rgba(0, 0, 0, .1); }
.legal-section h2 {
  display: flex;
  gap: 14px;
  margin: 0 0 18px;
  font-size: clamp(21px, 1.7vw, 26px);
  line-height: 1.25;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.legal-section h2 span { flex: none; min-width: 1.4em; color: var(--accent); }
/* Spazio per la tabella di CookieYes: scorre in orizzontale se è più larga */
.legal-cookie-table { overflow-x: auto; margin: 8px 0 1em; }
.legal-cookie-table table { width: 100%; border-collapse: collapse; font-size: 15px; }

/* Link a privacy e cookie policy nella barra in fondo al footer */
.footer-legal { display: flex; flex-wrap: wrap; gap: 6px 20px; }
.footer-legal a:hover { color: var(--accent); }
.site-footer--legal .footer-cols { border-top: 0; }

@media (max-width: 999px) {
  .legal { grid-template-columns: minmax(0, 1fr); padding-top: 160px; }
  .legal-toc { position: static; padding: 20px 24px; border-radius: var(--radius-card); background: rgba(244, 243, 240, .82); }
}
@media (max-width: 690px) {
  .legal { padding-top: 130px; padding-bottom: 80px; }
  .legal-body { font-size: 16px; }
  .legal-section { padding-top: 32px; }
}

/* ==========================================================================
   Animazioni di ingresso
   ========================================================================== */

/* letter-reveal-blur-bottom */
.reveal-letters .word { display: inline-block; white-space: nowrap; }
.reveal-letters .char {
  display: inline-block;
  opacity: 0;
  filter: blur(12px);
  transform: translateY(.35em);
  transition: opacity .9s var(--ease), filter .9s var(--ease), transform .9s var(--ease);
  transition-delay: var(--d, 0ms);
}
.reveal-letters.is-visible .char { opacity: 1; filter: blur(0); transform: none; }

/* fade-bottom parola per parola */
.reveal-words .word {
  display: inline-block;
  opacity: 0;
  transform: translateY(.5em);
  transition: opacity .75s var(--ease), transform .75s var(--ease);
  transition-delay: var(--d, 0ms);
}
.reveal-words.is-visible .word { opacity: 1; transform: none; }

/* slight-fade-in-from-bottom */
.fade-up {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity .75s var(--ease), transform .75s var(--ease);
  transition-delay: var(--delay, 0ms);
}
.fade-up.is-visible { opacity: 1; transform: none; }

/* Senza JS il contenuto resta visibile */
.no-js .reveal-letters .char,
.no-js .reveal-words .word,
.no-js .fade-up { opacity: 1; filter: none; transform: none; }


/* ==========================================================================
   Pre-load: i due cerchi del logo si aprono come occhi e si guardano intorno
   ========================================================================== */

.preloader {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  background: #fff;
  /* Paracadute: se il JS non parte, l'intro sparisce comunque */
  animation: preloader-failsafe .01s linear 10s forwards;
}
/* Le lenti (maschera) si aprono: la scritta e le pupille spariscono */
.preloader.is-opening {
  -webkit-mask-composite: source-in;
          mask-composite: intersect;
}
/* (serve un'animazione: quella d'ingresso, rimasta "forwards", vincerebbe su una transition) */
.preloader.is-opening .preloader-word {
  animation: word-out .3s var(--ease) forwards;
}
.preloader.is-opening .eye-pupil {
  opacity: 0;
  transition: opacity .25s var(--ease);
}
@keyframes word-out {
  from { opacity: 1; transform: translate(560px, 0); }
  to   { opacity: 0; transform: translate(560px, 0); }
}
@keyframes preloader-failsafe { to { opacity: 0; visibility: hidden; } }

body.is-loading { overflow: hidden; }

.preloader-logo {
  width: min(84vw, 860px);
  height: auto;
  overflow: visible;
}

/* Palpebre: il cerchio si schiaccia sul suo asse orizzontale */
.eye {
  transform-box: fill-box;
  transform-origin: center;
  transform: scaleY(.06);
  animation: eye-lids 2.6s cubic-bezier(.3, 0, .2, 1) forwards;
}
.eye + .eye { animation-delay: .06s; }

@keyframes eye-lids {
  0%, 14%  { transform: scaleY(.06); }
  26%      { transform: scaleY(1.08); }
  31%      { transform: scaleY(.97); }
  35%, 70% { transform: scaleY(1); }
  74%      { transform: scaleY(.06); }
  79%, 100% { transform: scaleY(1); }
}

/* Pupille: guardano la scritta, poi in alto, poi verso chi guarda */
.eye-pupil {
  animation: eye-look 2.6s cubic-bezier(.45, 0, .2, 1) forwards;
}
@keyframes eye-look {
  0%, 34%   { transform: translate(0, 0); }
  42%, 52%  { transform: translate(52px, 10px); }
  60%, 68%  { transform: translate(-34px, -44px); }
  80%, 100% { transform: translate(10px, 6px); }
}

/* La scritta entra mentre gli occhi si aprono */
.preloader-word {
  opacity: 0;
  animation: word-in .9s var(--ease) .45s forwards;
}
@keyframes word-in {
  from { opacity: 0; transform: translate(590px, 0); }
  to   { opacity: 1; transform: translate(560px, 0); }
}

.no-js .preloader,
.intro-seen .preloader { display: none; }
.no-js body.is-loading,
.intro-seen body.is-loading { overflow: auto; }

/* ==========================================================================
   Easter egg: le O del titolo diventano occhi (main.js → startLazyEyes)
   ========================================================================== */

.char--eye {
  position: relative;
  transform-origin: var(--ox, 50%) var(--oy, 60%);
}

/* Pupilla al centro del buco della O */
.o-pupil {
  position: absolute;
  left: var(--ox);
  top: var(--oy);
  width: var(--pupil, .12em);
  height: var(--pupil, .12em);
  margin: calc(var(--pupil, .12em) / -2) 0 0 calc(var(--pupil, .12em) / -2);
  border-radius: 50%;
  background: currentColor;
  opacity: 0;
  pointer-events: none;
}

/* Palpebra: riempie il buco della O dall'alto. È un po' più grande del buco
   e si sovrappone al tratto (stesso colore), così non resta un filo bianco */
.o-lid {
  position: absolute;
  left: var(--ox);
  top: var(--oy);
  width: var(--lid, .36em);
  height: var(--lid, .36em);
  margin: calc(var(--lid, .36em) / -2) 0 0 calc(var(--lid, .36em) / -2);
  border-radius: 50%;
  overflow: hidden;
  pointer-events: none;
  z-index: 1;
}
.o-lid > span {
  display: block;
  width: 100%;
  height: 100%;
  background: currentColor;
  opacity: 0;
}

/* Le Z del sonno, una scia per ogni O (posizionate da main.js) */
.hero-title { position: relative; }
.o-zzz {
  position: absolute;
  font-size: .17em;
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1;
  color: var(--text);
  pointer-events: none;
}
.o-zzz span {
  position: absolute;
  left: 0;
  bottom: 0;
  opacity: 0;
}
.o-zzz.is-on span { animation: zzz-float 3s ease-in-out infinite; }
.o-zzz.is-on span:nth-child(2) { animation-delay: 1s; }
.o-zzz.is-on span:nth-child(3) { animation-delay: 2s; }
@keyframes zzz-float {
  0%   { opacity: 0; transform: translate(0, 0) scale(.6) rotate(-8deg); }
  20%  { opacity: 1; }
  80%  { opacity: .9; }
  100% { opacity: 0; transform: translate(.9em, -1.8em) scale(1.25) rotate(8deg); }
}
