/* Correzioni richieste - agosto 2026 */

/* Impedisce agli elementi decorativi animati di allargare il viewport. */
html,
body {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

@supports (overflow: clip) {
  html,
  body {
    overflow-x: clip;
  }
}

body > main,
#top {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

@supports (overflow: clip) {
  body > main,
  #top {
    overflow-x: clip;
  }
}

.hero,
.marquee,
.about,
.services,
.manifesto,
.method,
.why,
.contact,
footer {
  max-width: 100%;
}

/* Intestazione: denominazione completa e logo sempre visibile. */
.site-header {
  min-height: 104px;
}

.brand {
  min-width: 0;
  gap: 1rem;
  letter-spacing: .07em;
  font-size: clamp(.72rem, 1.05vw, .98rem);
  font-weight: 900;
  text-transform: none;
}

.brand img {
  width: 70px;
  height: 76px;
  flex: 0 0 auto;
  object-fit: contain;
  object-position: center;
}

.brand span {
  line-height: 1.2;
  white-space: nowrap;
}

/* Marchio nella sezione aziendale: niente sfondo, cornice o ritaglio. */
.logo-tile {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 380px;
  min-height: 0;
  overflow: visible;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  transform: none;
}

.logo-tile img {
  width: min(100%, 280px);
  height: auto;
  max-height: none;
  aspect-ratio: auto;
  object-fit: contain;
  object-position: center;
  filter: brightness(0) saturate(100%) invert(11%) sepia(20%) saturate(1470%) hue-rotate(169deg) brightness(90%) contrast(98%);
}

/* Focus editoriale sui gemelli digitali. */
.digital-twin-focus {
  margin-top: 1.35rem !important;
  padding: 1.2rem 1.3rem;
  border-left: 4px solid #0b8fba;
  background: rgba(52, 217, 255, .13);
}

.digital-twin-focus strong {
  color: #075b7a;
}

.digital-twin-service h3 {
  color: var(--cyan);
}

.digital-twin-service:hover h3 {
  color: var(--ink);
}

/* Contatti: due colonne, senza sede legale. */
.contact-details {
  grid-template-columns: 1fr 1fr;
}

/* Piè di pagina: tutta la denominazione e i testi sono in grassetto. */
footer,
footer p,
.footer-brand,
.footer-brand span {
  font-weight: 850;
}

.footer-brand {
  gap: .8rem;
  letter-spacing: .06em;
  font-size: .78rem;
  text-transform: none;
}

.footer-brand img {
  width: 48px;
  height: 54px;
  object-fit: contain;
}

footer p {
  color: rgba(255, 255, 255, .82);
}

footer a,
.footer-cookie-button {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: .22em;
}

.footer-cookie-button {
  border: 0;
  padding: 0;
  background: transparent;
  font: inherit;
  font-weight: inherit;
  cursor: pointer;
}

.service-arrow {
  color: inherit;
  text-decoration: none;
}

.service-arrow:focus-visible {
  outline: 3px solid var(--tone);
  outline-offset: 4px;
}

/* Menu Servizi desktop. */
.services-dropdown {
  position: relative;
}

.services-dropdown summary {
  display: flex;
  align-items: center;
  gap: .45rem;
  padding: 1rem 0;
  cursor: pointer;
  list-style: none;
}

.services-dropdown summary::-webkit-details-marker {
  display: none;
}

.services-dropdown summary span {
  color: var(--gold);
  font-size: 1rem;
  transition: transform .2s ease;
}

.services-dropdown[open] summary span {
  transform: rotate(180deg);
}

@media (hover: hover) and (pointer: fine) {
  .services-dropdown:hover .services-submenu,
  .services-dropdown:focus-within .services-submenu {
    display: block;
  }

  .services-dropdown:hover summary span,
  .services-dropdown:focus-within summary span {
    transform: rotate(180deg);
  }
}

.services-submenu {
  display: none;
  position: absolute;
  top: calc(100% + .55rem);
  left: 50%;
  width: min(430px, 78vw);
  padding: .75rem;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 18px;
  background: rgba(4, 16, 28, .98);
  box-shadow: 0 25px 70px rgba(0, 0, 0, .45);
  transform: translateX(-50%);
}

.services-dropdown[open] .services-submenu {
  display: block;
}

.services-submenu:before {
  content: "";
  position: absolute;
  right: 0;
  bottom: 100%;
  left: 0;
  height: .7rem;
}

.desktop-nav .services-submenu a:not(.nav-cta) {
  display: grid;
  grid-template-columns: 35px 1fr;
  gap: .7rem;
  padding: .72rem .8rem;
  border-radius: 10px;
  line-height: 1.25;
  text-transform: none;
}

.desktop-nav .services-submenu a:not(.nav-cta):after {
  display: none;
}

.services-submenu a:hover,
.services-submenu a:focus-visible {
  color: var(--ink);
  background: var(--gold);
  outline: none;
}

.services-submenu b {
  color: var(--gold);
  font-family: ui-monospace, monospace;
}

.services-submenu a:hover b,
.services-submenu a:focus-visible b {
  color: var(--ink);
}

.desktop-nav .services-submenu .services-all:not(.nav-cta) {
  display: block;
  margin-top: .4rem;
  border-top: 1px solid rgba(255, 255, 255, .16);
  border-radius: 0 0 10px 10px;
  color: var(--gold);
  text-transform: uppercase;
}

.desktop-nav .services-submenu .services-all:hover,
.desktop-nav .services-submenu .services-all:focus-visible {
  color: var(--ink);
}

.mobile-menu nav {
  max-height: calc(100vh - 90px);
  overflow-y: auto;
}

.mobile-menu-label {
  padding: .85rem .85rem .35rem;
  color: var(--gold);
  font-size: .66rem;
  font-weight: 950;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.mobile-menu nav .mobile-service-link {
  padding: .65rem .85rem;
  color: rgba(255, 255, 255, .78);
  font-size: .68rem;
  line-height: 1.3;
  text-transform: none;
}

/* Copertina principale fornita da Diana. */
.cover-hero {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 100svh;
  padding-top: 104px;
  overflow: hidden;
  background: #030c18;
}

.cover-hero:after {
  content: "";
  pointer-events: none;
  position: absolute;
  inset: 0;
  border-bottom: 1px solid rgba(255, 255, 255, .2);
  box-shadow: inset 0 -80px 90px rgba(3, 12, 24, .45);
}

.cover-hero img {
  display: block;
  width: 100%;
  height: calc(100svh - 104px);
  min-height: 560px;
  object-fit: contain;
  object-position: center;
}

.cover-cta {
  z-index: 2;
  position: absolute;
  bottom: clamp(1.1rem, 3vw, 2.5rem);
  display: none;
  align-items: center;
  justify-content: space-between;
  min-width: 190px;
  padding: .9rem 1.15rem;
  border: 1px solid rgba(255, 255, 255, .45);
  border-radius: 999px;
  color: #fff;
  background: rgba(4, 16, 28, .88);
  font-size: .72rem;
  font-weight: 900;
  letter-spacing: .1em;
  text-decoration: none;
  text-transform: uppercase;
  backdrop-filter: blur(12px);
}

.cover-services {
  left: 1rem;
  color: var(--ink);
  border-color: var(--gold);
  background: var(--gold);
}

.cover-contact {
  right: 1rem;
}

.cover-cta:focus-visible {
  outline: 3px solid var(--cyan);
  outline-offset: 4px;
}

/* Nuova immagine inserita nella composizione hero originale. */
.hero-visual-new .hero-image-wrap {
  max-width: none;
  clip-path: ellipse(66% 58% at 61% 52%);
  background: #030c18;
}

/* Gerarchia tipografica più equilibrata. */
.hero h1 {
  font-size: clamp(3rem, 6.4vw, 7.1rem);
}

.about-copy h2,
.section-heading h2,
.method-heading h2,
.why h2 {
  font-size: clamp(2.2rem, 4.2vw, 4.8rem);
}

.manifesto blockquote {
  font-size: clamp(2.35rem, 5vw, 5.8rem);
}

.contact h2 {
  max-width: 1250px;
  font-size: clamp(3.1rem, 7.2vw, 7.8rem);
  line-height: .88;
}

.contact-intro {
  position: relative;
  max-width: 720px;
  margin: 2rem 0 0;
  color: rgba(7, 21, 38, .76);
  font-size: clamp(1rem, 1.4vw, 1.18rem);
  line-height: 1.65;
}

/* Modulo preventivo. */
.contact-form {
  position: relative;
  max-width: 980px;
  margin-top: 3rem;
  padding: clamp(1.25rem, 3vw, 2.2rem);
  border: 1px solid rgba(7, 21, 38, .3);
  border-radius: 24px;
  background: rgba(255, 255, 255, .2);
  backdrop-filter: blur(8px);
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.2rem;
}

.contact-form label > span {
  display: block;
  margin-bottom: .55rem;
  font-size: .72rem;
  font-weight: 950;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.contact-form input,
.contact-form select,
.contact-form textarea {
  width: 100%;
  border: 1px solid rgba(7, 21, 38, .42);
  border-radius: 12px;
  color: var(--ink);
  background: rgba(255, 255, 255, .68);
  outline: none;
}

.contact-form input,
.contact-form select {
  min-height: 52px;
  padding: 0 .9rem;
}

.contact-form textarea {
  min-height: 145px;
  padding: .9rem;
  resize: vertical;
}

.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
  border-color: #0b4f73;
  box-shadow: 0 0 0 3px rgba(11, 79, 115, .18);
}

.form-message {
  display: block;
  margin-top: 1.2rem;
}

.form-privacy {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: .7rem;
  align-items: start;
  margin-top: 1.2rem;
  cursor: pointer;
}

.form-privacy input {
  width: 20px;
  min-height: 20px;
  margin-top: .1rem;
  accent-color: var(--ink);
}

.contact-form .form-privacy > span {
  margin: 0;
  font-size: .73rem;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.5;
  text-transform: none;
}

.form-privacy a {
  text-decoration: underline;
  text-underline-offset: .2em;
}

.form-trap {
  position: absolute !important;
  left: -10000px !important;
  width: 1px !important;
  height: 1px !important;
  opacity: 0;
}

.form-submit {
  width: min(100%, 340px);
  border: 0;
  cursor: pointer;
}

.form-submit[disabled] {
  cursor: wait;
  opacity: .65;
}

.form-status {
  min-height: 1.5em;
  margin: 1rem 0 0;
  font-size: .85rem;
  font-weight: 800;
}

.form-status.is-error {
  color: #7c160c;
}

.form-status.is-success {
  color: #075b3f;
}

.hero-visual-new .hero-image-wrap:after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(90deg, #071526 0%, transparent 24%), linear-gradient(0deg, rgba(7, 21, 38, .36), transparent 38%);
}

.hero-visual-new .hero-image-wrap img {
  object-position: 65% center;
  animation: dianaHeroDrift 14s ease-in-out infinite alternate;
}

.hero-visual-new .scan-lines {
  max-width: none;
  clip-path: ellipse(66% 58% at 61% 52%);
}

.hero-visual-new:after {
  content: "";
  position: absolute;
  z-index: 4;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 0 8px rgba(52, 217, 255, .14), 0 0 30px rgba(52, 217, 255, .9);
  animation: dianaScanPoint 8s ease-in-out infinite;
}

@keyframes dianaHeroDrift {
  from { transform: scale(1.02) translate3d(-.5%, 0, 0); }
  to { transform: scale(1.08) translate3d(1.5%, -.8%, 0); }
}

@keyframes dianaScanPoint {
  0%, 100% { top: 22%; left: 34%; opacity: .35; }
  48% { top: 68%; left: 72%; opacity: 1; }
  72% { top: 42%; left: 84%; opacity: .7; }
}

@media (prefers-reduced-motion: reduce) {
  .hero-visual-new .hero-image-wrap img,
  .hero-visual-new:after {
    animation: none;
  }
}

/* Missione: palette ad alto contrasto, senza variazioni di layout o movimento. */
.manifesto {
  color: #fffdf7;
  background: #0b2038;
}

.manifesto .manifesto-grid {
  background-image:
    linear-gradient(rgba(255, 253, 247, .075) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 253, 247, .075) 1px, transparent 1px);
}

.manifesto:before,
.manifesto:after {
  border-color: rgba(242, 189, 24, .15);
}

.manifesto .section-label {
  color: #f2bd18;
}

.manifesto blockquote {
  color: #fffdf7;
}

.manifesto blockquote span {
  color: #f2bd18;
}

.manifesto > p:last-child {
  color: #fffdf7;
}

@media (max-width: 980px) {
  .site-header {
    min-height: 90px;
  }

  .brand img {
    width: 58px;
    height: 64px;
  }

  .brand span {
    max-width: 260px;
    white-space: normal;
  }

  .cover-hero {
    padding-top: 90px;
  }

  .cover-hero img {
    height: calc(100svh - 90px);
    min-height: 500px;
  }

  .hero-visual-new .hero-image-wrap,
  .hero-visual-new .scan-lines {
    clip-path: ellipse(64% 56% at 54% 52%);
  }

  .hero-visual-new .hero-image-wrap img {
    object-position: 69% center;
  }
}

@media (max-width: 680px) {
  .contact-details {
    grid-template-columns: 1fr;
  }

  .brand {
    gap: .65rem;
    font-size: .64rem;
  }

  .brand img {
    width: 48px;
    height: 54px;
  }

  .brand span {
    max-width: 185px;
  }

  .hero h1 {
    font-size: clamp(2.75rem, 13.5vw, 4.5rem);
  }

  .about-copy h2,
  .section-heading h2,
  .method-heading h2,
  .why h2 {
    font-size: clamp(2rem, 10vw, 3.4rem);
  }

  .contact h2 {
    font-size: clamp(2.7rem, 13vw, 4.5rem);
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .cover-hero {
    min-height: auto;
    padding-top: 90px;
    padding-bottom: 84px;
  }

  .cover-hero img {
    height: auto;
    min-height: 0;
    aspect-ratio: 1734 / 907;
    object-fit: contain;
  }

  .cover-cta {
    display: flex;
  }

  .logo-tile img {
    width: min(100%, 220px);
  }

  footer {
    gap: 1rem;
  }

  .service-arrow {
    display: grid;
    grid-area: 1 / 2;
    justify-self: end;
    width: 40px;
    height: 40px;
  }

  .footer-brand span {
    max-width: 230px;
    line-height: 1.25;
  }
}

/* Hero trasparente: l'arco vive direttamente sul fondale del sito. */
.hero-visual-new {
  --hero-x: 0px;
  --hero-y: 0px;
  --hero-rx: 0deg;
  --hero-ry: 0deg;
  --hero-scale: 1.035;
  --chip-top-y: 0px;
  --chip-bottom-y: 0px;
  --scan-y: 0px;
  perspective: 1200px;
  perspective-origin: 58% 48%;
  transform-style: preserve-3d;
}

.hero-visual-new .hero-image-wrap {
  z-index: 2;
  inset: 7% -5% 0 -25%;
  max-width: none;
  overflow: visible;
  clip-path: none;
  background: transparent;
  transform-style: preserve-3d;
}

.hero-visual-new .hero-image-wrap:after {
  display: none;
}

.hero-visual-new .hero-image-wrap img {
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: contain;
  object-position: center;
  filter: drop-shadow(0 28px 38px rgba(0, 0, 0, .28));
  animation: none;
  backface-visibility: hidden;
  transform-origin: 59% 52%;
  transform: translate3d(var(--hero-x), var(--hero-y), 0)
    rotateX(var(--hero-rx)) rotateY(var(--hero-ry)) scale(var(--hero-scale));
  transition: filter .3s ease;
  will-change: transform;
}

.hero-visual-new .scan-lines {
  z-index: 3;
  inset: 8% -4% 2% -8%;
  max-width: none;
  clip-path: none;
  opacity: .1;
  transform: translate3d(0, var(--scan-y), 22px);
  -webkit-mask-image: radial-gradient(ellipse at 67% 52%, #000 0 44%, transparent 73%);
  mask-image: radial-gradient(ellipse at 67% 52%, #000 0 44%, transparent 73%);
  will-change: transform;
}

.hero-visual-new .chip-top {
  transform: translate3d(0, var(--chip-top-y), 72px);
  will-change: transform;
}

.hero-visual-new .chip-bottom {
  transform: translate3d(0, var(--chip-bottom-y), 112px);
  will-change: transform;
}

.hero-visual-new .hero-index {
  transform: translateZ(45px);
}

.hero-visual-new.hero-3d-ready .hero-image-wrap img {
  filter: drop-shadow(0 34px 44px rgba(0, 0, 0, .32));
}

@media (max-width: 980px) {
  .hero-visual-new .hero-image-wrap {
    inset: 0 -10% -2% -19%;
    clip-path: none;
  }

  .hero-visual-new .scan-lines {
    inset: 2% -8% 0 -4%;
    clip-path: none;
  }
}

@media (max-width: 680px) {
  .hero-visual-new {
    perspective: 900px;
  }

  .hero-visual-new .hero-image-wrap {
    inset: -2% -17% -3% -22%;
  }

  .hero-visual-new .hero-image-wrap img {
    filter: drop-shadow(0 20px 28px rgba(0, 0, 0, .25));
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-visual-new .hero-image-wrap img,
  .hero-visual-new .scan-lines,
  .hero-visual-new .chip-top,
  .hero-visual-new .chip-bottom {
    transform: none;
    will-change: auto;
  }
}
