/* Home copy phase: layout secca. Glass solo sulle card servizi. */
.page-home--copy {
  --copy-max: 42rem;
  --copy-wide: 40rem;
  --hero-height: auto;
  --hero-scroll-offset: 0;
  --scroll-gap: 0px;
  overflow-anchor: none;
  overflow-x: clip;
  max-width: 100%;
  width: 100%;
  position: relative;
}

html:has(body.page-home--copy),
html:has(body.page-home--copy) body {
  overflow-x: clip;
  max-width: 100%;
  width: 100%;
}

.page-home--copy .page-scanlines,
.page-home--copy .hero-bg,
.page-home--copy .hero-background-glow,
.page-home--copy .hero-particles-canvas {
  display: none !important;
}

/* Firefly SOTTO il WebGL: si vedono attraverso il clear alpha del 3D */
.page-home--copy .lucanus-stage .fireflies-canvas {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.9s ease;
}

.page-home--copy .lucanus-stage .fireflies-canvas.is-ready {
  opacity: 1;
}

/* Hero in flusso documento, non fullscreen fisso */
.page-home--copy .hero {
  position: relative !important;
  inset: auto !important;
  z-index: 1;
  display: block !important;
  width: 100%;
  height: auto !important;
  min-height: 0 !important;
  overflow: visible;
  pointer-events: auto;
  padding: 5.5rem 1.25rem 2rem;
  background: transparent;
}

.page-home--copy .hero-stack {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 1.25rem;
  width: 100%;
  max-width: var(--copy-wide);
  margin: 0 auto;
  padding: 0;
  text-align: left;
}

.page-home--copy .logo-container,
.page-home--copy .hero-logo-static {
  width: min(200px, 65vw);
  height: auto;
}

.page-home--copy .hero-content {
  text-align: left;
  padding: 0;
  width: 100%;
  pointer-events: auto;
  will-change: auto;
  filter: none !important;
  transform: none !important;
}

.page-home--copy .hero-heading,
.page-home--copy #hero-title {
  margin: 0;
  font-family: var(--font-serif, "Exo 2", sans-serif);
  font-weight: 800;
  font-size: clamp(1.5rem, 4vw, 2rem);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #eaeaea;
  line-height: 1.15;
  max-width: none;
  text-align: left;
}

.page-home--copy .hero-subtitle {
  display: block;
  margin-top: 0.45rem;
  font-family: var(--font-sans, Montserrat, sans-serif);
  font-weight: 500;
  font-size: 1rem;
  color: #b0b0b0;
  letter-spacing: 0.02em;
  text-align: left;
}

.page-home--copy main#content-flow,
.page-home--copy #content-flow {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: var(--copy-wide);
  margin: 0 auto;
  padding: 0 1.25rem 6rem;
  display: flex;
  flex-direction: column;
  gap: clamp(4rem, 14vh, 7.5rem);
}

.page-home--copy .home-section {
  margin: 0;
  padding: 0;
  background: none !important;
  border: none !important;
  border-radius: 0 !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  box-shadow: none !important;
  transform: none !important;
  filter: none !important;
  align-items: flex-start;
  text-align: left;
  --scroll-gap: 0px;
}

.page-home--copy .home-kicker {
  display: block;
  margin: 0 0 0.75rem;
  font-family: var(--font-sans, Montserrat, sans-serif);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #888;
}

.page-home--copy .home-section h1,
.page-home--copy .home-section h2,
.page-home--copy #content-flow > .footer-section > h2 {
  font-family: var(--font-serif, "Exo 2", sans-serif);
  font-weight: 800;
  font-size: clamp(1.4rem, 3vw, 1.85rem);
  line-height: 1.25;
  letter-spacing: -0.02em;
  margin: 0 0 1rem;
  color: #eaeaea;
  text-align: left;
  max-width: none;
}

.page-home--copy .home-section h3 {
  font-family: var(--font-serif, "Exo 2", sans-serif);
  font-weight: 700;
  font-size: 1.05rem;
  margin: 0 0 0.45rem;
  color: #eaeaea;
}

.page-home--copy .home-section h4 {
  font-family: var(--font-serif, "Exo 2", sans-serif);
  font-weight: 700;
  font-size: 1rem;
  margin: 0 0 0.35rem;
  color: #f0f0f0;
}

.page-home--copy .home-section p,
.page-home--copy .home-section li,
.page-home--copy .home-lead,
.page-home--copy .s1-panel p,
.page-home--copy #content-flow > .footer-section > p {
  font-family: var(--font-sans, Montserrat, sans-serif);
  font-size: 1.02rem;
  line-height: 1.65;
  color: #c8c8c8;
  margin: 0 0 0.85rem;
  max-width: var(--copy-max);
  text-align: justify;
  text-justify: inter-word;
  hyphens: none;
  -webkit-hyphens: none;
  -ms-hyphens: none;
  word-break: normal;
  overflow-wrap: normal;
  margin-left: 0;
  margin-right: 0;
}

.page-home--copy .home-prose p:last-child {
  margin-bottom: 0;
}

.page-home--copy .home-section strong,
.page-home--copy #content-flow > .footer-section strong {
  --mark-band: 56%;
  --mark-fill: rgba(255, 31, 77, 0.6);
  --mark-tilt: 182deg;
  color: #fff;
  font-weight: 700;
  padding: 0 0.05em 0.03em;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
  background-image: linear-gradient(
    var(--mark-tilt),
    transparent var(--mark-band),
    var(--mark-fill) var(--mark-band),
    var(--mark-fill) 100%
  );
  background-repeat: no-repeat;
  background-size: 100% 100%;
  background-position: left bottom;
}

.page-home--copy .home-section strong.mark-ink,
.page-home--copy #content-flow > .footer-section strong.mark-ink {
  --mark-fill: #0a0a0a;
  --mark-band: 50%;
  --mark-tilt: 178deg;
}

.page-home--copy .home-section p strong:nth-of-type(2n),
.page-home--copy .home-section li strong:nth-of-type(2n) {
  --mark-tilt: 178.2deg;
  --mark-fill: rgba(217, 18, 60, 0.6);
}

.page-home--copy .home-section p strong:nth-of-type(3n),
.page-home--copy .home-section li strong:nth-of-type(3n) {
  --mark-tilt: 183.1deg;
  --mark-fill: rgba(255, 51, 92, 0.6);
}

.page-home--copy .home-section p strong:nth-of-type(4n),
.page-home--copy .home-section li strong:nth-of-type(4n) {
  --mark-tilt: 177.5deg;
  --mark-fill: #050505;
}

.page-home--copy .home-lead {
  font-size: 1.05rem;
  color: #d0d0d0;
}

.page-home--copy .pillar-list,
.page-home--copy .service-list,
.page-home--copy .workflow-list {
  list-style: none;
  margin: 1.35rem 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: calc(1.35rem + var(--scroll-gap, 0px));
}

.page-home--copy .home-section--pillars .pillar-list {
  gap: calc(clamp(5rem, 18vh, 10rem) + var(--scroll-gap, 0px));
  margin-top: clamp(2.5rem, 8vh, 4.5rem);
  padding-bottom: clamp(3rem, 12vh, 6rem);
}

.page-home--copy .home-section--pillars {
  padding-bottom: clamp(5rem, 20vh, 11rem);
  margin-bottom: 0;
}

/* Ponte scroll: stacco netto pillars → 3D → services */
.page-home--copy .home-bridge {
  position: relative;
  width: 100%;
  min-height: clamp(80vh, 100vh, 120vh);
  margin: 0;
  padding: 0;
  pointer-events: none;
}

.page-home--copy .home-bridge-mark {
  position: absolute;
  left: 50%;
  top: 42%;
  width: 2.5rem;
  height: 2.5rem;
  margin: 0;
  border: 1px solid rgba(153, 22, 54, 0.35);
  border-radius: 50%;
  transform: translate(-50%, -50%) scale(0.6);
  opacity: 0;
  pointer-events: none;
}

/* —— Workflow: stesso linguaggio della home (glass sul 3D) —— */
.page-home--copy .home-section.home-section--workflow {
  position: relative;
  z-index: 3;
  width: 100%;
  max-width: none;
  margin: clamp(2rem, 8vh, 4.5rem) 0 0;
  margin-left: 0;
  margin-right: 0;
  padding: clamp(2.5rem, 8vh, 4.5rem) 0 clamp(3rem, 10vh, 5.5rem);
  background: transparent !important;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  color: #eaeaea;
}

.page-home--copy .home-section--workflow .workflow-inner {
  width: 100%;
  max-width: var(--copy-wide);
  margin: 0;
}

.page-home--copy .home-section--workflow .home-kicker {
  margin-bottom: 0.9rem;
}

.page-home--copy .home-section--workflow h2 {
  color: #eaeaea !important;
  font-size: clamp(1.4rem, 3vw, 1.85rem);
  margin-bottom: 0.85rem;
}

.page-home--copy .home-section--workflow .home-lead {
  color: #c8c8c8 !important;
  max-width: 38ch;
}

.page-home--copy .home-section--workflow .workflow-list {
  list-style: none;
  margin: clamp(2rem, 7vh, 3.5rem) 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: calc(1.35rem + var(--scroll-gap, 0px));
}

.page-home--copy .home-section--workflow .workflow-card {
  position: relative;
  z-index: 1;
  margin: 0;
  max-width: none;
  padding: 1.25rem 1.25rem 1.4rem 1.35rem;
  background: rgba(10, 6, 8, 0.42);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 2px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
  transform: translateZ(0);
  -webkit-backdrop-filter: blur(18px) saturate(1.2);
  backdrop-filter: blur(18px) saturate(1.2);
  will-change: transform, opacity;
}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .page-home--copy .home-section--workflow .workflow-card {
    background: rgba(18, 12, 14, 0.88);
  }
}

@media (pointer: coarse) {
  .page-home--copy .home-section--workflow .workflow-card {
    backdrop-filter: blur(12px) saturate(1.1);
    -webkit-backdrop-filter: blur(12px) saturate(1.1);
  }
}

.page-home--copy .home-section--workflow .workflow-index {
  display: block;
  margin: 0 0 0.65rem;
  font-family: var(--font-serif, "Exo 2", sans-serif);
  font-weight: 800;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  color: rgba(153, 22, 54, 0.85);
}

.page-home--copy .home-section--workflow .workflow-card h3 {
  margin: 0 0 0.65rem;
  color: #f0f0f0 !important;
  font-family: var(--font-serif, "Exo 2", sans-serif);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
}

.page-home--copy .home-section--workflow .workflow-card p {
  margin: 0;
  color: #c8c8c8;
  font-size: 1.02rem;
  line-height: 1.65;
  max-width: var(--copy-max);
}

.page-home--copy .home-section--workflow .workflow-card em {
  color: #bbb;
  font-style: italic;
}

.page-home--copy .home-section--workflow .workflow-card strong {
  color: #fff;
  font-weight: 700;
}

.page-home--copy .home-section--workflow .workflow-card[data-workflow="risk"] {
  border-color: rgba(153, 22, 54, 0.28);
}

/* —— Chiusura: glass sul 3D, wash RED —— */
.page-home--copy .home-section.home-section--pact {
  --pact-red: #991636;
  position: relative;
  z-index: 3;
  width: 100%;
  max-width: 100%;
  margin: clamp(2.5rem, 8vh, 5rem) 0 0;
  margin-left: 0;
  margin-right: 0;
  padding: clamp(5rem, 16vh, 9rem) 0;
  background: transparent !important;
  overflow: visible;
  min-height: min(88svh, 52rem);
  display: flex;
  align-items: center;
  justify-content: center;
}

.page-home--copy .home-section--pact .pact-inner {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: min(100%, 38rem);
  margin: 0 auto;
  box-sizing: border-box;
  padding: clamp(1.6rem, 4vw, 2.4rem) clamp(1.35rem, 3.5vw, 2.1rem) clamp(1.75rem, 4vw, 2.5rem);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 2px;
  background: rgba(10, 6, 8, 0.38);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.07),
    0 18px 48px rgba(0, 0, 0, 0.35);
  transform: translateZ(0);
  -webkit-backdrop-filter: blur(20px) saturate(1.25);
  backdrop-filter: blur(20px) saturate(1.25);
}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .page-home--copy .home-section--pact .pact-inner {
    background: rgba(22, 10, 14, 0.9);
  }
}

@media (pointer: coarse) {
  .page-home--copy .home-section--pact .pact-inner {
    backdrop-filter: blur(14px) saturate(1.15);
    -webkit-backdrop-filter: blur(14px) saturate(1.15);
  }
}

.page-home--copy .home-section--pact h2 {
  color: #fff !important;
  font-size: clamp(1.75rem, 4.6vw, 2.55rem);
  margin: 0 0 1.35rem;
  line-height: 1.15;
}

.page-home--copy .home-section--pact .home-prose {
  gap: 1.05rem;
}

.page-home--copy .home-section--pact .home-prose p {
  color: rgba(235, 230, 232, 0.88);
  font-size: clamp(1.02rem, 2.1vw, 1.18rem);
  line-height: 1.55;
  max-width: 36ch;
}

.page-home--copy .home-section--pact .home-prose strong {
  color: #fff;
}

.page-home--copy .home-section--pact .trk-cta {
  margin-top: 1.65rem;
}

/* Contatto: stacco dopo il patto */
.page-home--copy .home-section--contact[data-home-zone="contact"] {
  position: relative;
  z-index: 3;
  margin-top: clamp(2rem, 8vh, 4rem);
  padding-top: clamp(2.5rem, 8vh, 4rem);
}


.page-home--copy .service-group {
  margin-top: calc(2.75rem + var(--scroll-gap, 0px) * 0.5);
  padding-top: clamp(0.5rem, 2vh, 1.25rem);
}

.page-home--copy .service-group-title {
  margin: 0 0 1.75rem;
  font-family: var(--font-serif, "Exo 2", sans-serif);
  font-size: clamp(1.35rem, 3.2vw, 1.85rem);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.15;
  text-transform: none;
  color: #eaeaea;
  max-width: 18ch;
}

.page-home--copy .service-group-title .text-mask,
.page-home--copy .split-line,
.page-home--copy .service-group-title .split-line {
  display: block;
  overflow: hidden;
  padding-bottom: 0.08em;
  margin-bottom: -0.04em;
}

.page-home--copy .service-group-title .text-mask-inner,
.page-home--copy .split-line-inner {
  display: block;
  will-change: transform;
}

.page-home--copy .has-line-split .split-word {
  display: inline;
}

.page-home--copy .home-section h2.has-line-split,
.page-home--copy .home-section h3.has-line-split,
.page-home--copy .home-section h4.has-line-split {
  overflow: visible;
}

.page-home--copy .service-list {
  gap: calc(1.75rem + var(--scroll-gap, 0px));
}

/* Card lavorazioni: glass blur sul 3D dietro */
.page-home--copy .service-item {
  position: relative;
  z-index: 1;
  padding: 1.15rem 1.2rem 1.3rem;
  margin: 0;
  max-width: none;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 2px;
  background: rgba(10, 6, 8, 0.42);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
  transform: translateZ(0);
  -webkit-backdrop-filter: blur(18px) saturate(1.2);
  backdrop-filter: blur(18px) saturate(1.2);
}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .page-home--copy .service-item {
    background: rgba(18, 12, 14, 0.88);
  }
}

@media (pointer: coarse) {
  .page-home--copy .service-item {
    backdrop-filter: blur(12px) saturate(1.1);
    -webkit-backdrop-filter: blur(12px) saturate(1.1);
  }
}

.page-home--copy .service-item:last-child {
  padding-bottom: 1.3rem;
}

.page-home--copy .service-item > p:last-of-type {
  margin-bottom: 0;
}

.page-home--copy .home-prose {
  display: flex;
  flex-direction: column;
  gap: calc(1.15rem + var(--scroll-gap, 0px) * 0.4);
}

.page-home--copy .home-prose p {
  margin-bottom: 0;
}

.page-home--copy .work-toasts {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0.65rem 0 0;
  padding: 0;
}

.page-home--copy .work-toasts li {
  margin: 0;
  max-width: none;
}

.page-home--copy .work-toast,
.page-home--copy a.work-toast {
  display: inline-block;
  transition: none !important;
  animation: none !important;
  box-shadow: none !important;
  background: transparent !important;
  border: 1px solid rgba(255, 255, 255, 0.22) !important;
  border-radius: 2px !important;
  padding: 0.28rem 0.5rem;
  font-size: 0.62rem;
  letter-spacing: 0.04em;
  color: #bbb;
  text-decoration: none;
}

.page-home--copy a.work-toast:hover,
.page-home--copy a.work-toast:focus-visible {
  color: #fff !important;
  border-color: rgba(255, 255, 255, 0.45) !important;
  box-shadow: none !important;
}

.page-home--copy .trk-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.75rem;
  padding: 0.5rem 0;
  background: none !important;
  border: none !important;
  border-bottom: 1px solid #eaeaea !important;
  border-radius: 0 !important;
  color: #eaeaea;
  text-decoration: none;
  font-family: var(--font-sans, Montserrat, sans-serif);
  font-weight: 600;
  font-size: 0.95rem;
  box-shadow: none !important;
  transition: none !important;
  animation: none !important;
}

.page-home--copy .trk-cta::before,
.page-home--copy .trk-cta::after {
  display: none !important;
  content: none !important;
}

.page-home--copy .trk-cta .cta-arrow {
  display: none !important;
}

.page-home--copy .trk-cta:hover,
.page-home--copy .trk-cta:focus-visible {
  color: #fff;
  border-bottom-color: #fff !important;
  transform: none !important;
  box-shadow: none !important;
}

.page-home--copy .home-section--contact,
.page-home--copy #content-flow > .footer-section {
  padding-top: 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  align-items: flex-start !important;
  text-align: left !important;
}

.page-home--copy #content-flow > .footer-section > h2,
.page-home--copy #content-flow > .footer-section > p {
  text-align: justify !important;
  text-justify: inter-word;
  hyphens: none !important;
  -webkit-hyphens: none !important;
  -ms-hyphens: none !important;
  word-break: normal;
  overflow-wrap: normal;
  margin-left: 0 !important;
  margin-right: 0 !important;
  max-width: var(--copy-max);
}

.page-home--copy #content-flow > .footer-section > h2 {
  text-align: left !important;
}

.page-home--copy #content-flow > .footer-section .contact-form {
  width: 100%;
  max-width: var(--copy-max);
  margin-inline: 0;
}

.page-home--copy .home-section--contact .form-group,
.page-home--copy .home-section--contact .form-consent {
  margin-bottom: calc(1.5rem + var(--scroll-gap, 0px) * 0.35);
}

/* Footer: in flusso, sempre visibile (niente barra fissa glass) */
.page-home--copy .site-footer {
  position: relative !important;
  left: auto;
  right: auto;
  bottom: auto;
  z-index: 1;
  transform: none !important;
  opacity: 1 !important;
  pointer-events: auto !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  background: transparent !important;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: none !important;
  margin-top: 2.5rem;
  padding: 1.5rem 0 0;
}

.page-home--copy .site-footer.is-visible {
  transform: none !important;
  opacity: 1 !important;
}

.page-home--copy .site-footer-inner {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.75rem;
  max-width: none;
  padding: 0;
}

.page-home--copy .partner-badge {
  margin: 0.5rem 0 0;
  max-width: 120px;
  opacity: 0.85;
}

.page-home--copy .footer-legal {
  font-size: 0.8rem;
  line-height: 1.5;
  color: #888;
}

/* —— Mobile UX —— */
@media (max-width: 767px) {
  .page-home--copy {
    --copy-max: 100%;
    --copy-wide: 100%;
  }

  .page-home--copy .hero {
    padding: 4.75rem 1rem 1.5rem;
  }

  .page-home--copy main#content-flow,
  .page-home--copy #content-flow {
    width: 100%;
    max-width: 100%;
    padding: 0 1rem 4.5rem;
    gap: clamp(2.75rem, 10vh, 4.5rem);
    box-sizing: border-box;
    overflow-x: clip;
  }

  .page-home--copy .home-section,
  .page-home--copy .home-section--workflow,
  .page-home--copy .home-section--pact,
  .page-home--copy .home-bridge {
    max-width: 100%;
    overflow-x: clip;
  }

  .page-home--copy .home-section--workflow .workflow-inner {
    max-width: 100%;
  }

  .page-home--copy .home-section--pact {
    min-height: auto;
    padding: clamp(3rem, 12vh, 5rem) 0;
  }

  .page-home--copy .home-section--pact .pact-inner {
    max-width: 100%;
    padding: 1.25rem 1.1rem 1.4rem;
    -webkit-backdrop-filter: blur(8px) saturate(1.05);
    backdrop-filter: blur(8px) saturate(1.05);
  }

  .page-home--copy .service-item,
  .page-home--copy .home-section--workflow .workflow-card {
    -webkit-backdrop-filter: blur(8px) saturate(1.05);
    backdrop-filter: blur(8px) saturate(1.05);
    will-change: auto;
  }

  .page-home--copy .home-bridge {
    min-height: 48vh;
  }

  .page-home--copy .home-section--pillars {
    padding-bottom: clamp(2.5rem, 10vh, 5rem);
  }

  .page-home--copy .home-section--pillars .pillar-list {
    gap: clamp(2.5rem, 10vh, 4.5rem);
    margin-top: 1.75rem;
    padding-bottom: 1.5rem;
  }

  .page-home--copy .home-section h1,
  .page-home--copy .home-section h2 {
    overflow-wrap: anywhere;
    word-break: break-word;
  }
}
