:root {
  --bg: #07090c;
  --ink: #f6f8fb;
  --muted: #b8c2cf;
  --soft: #111821;
  --panel: #151f2a;
  --line: rgba(255, 255, 255, 0.14);
  --cyan: #2bd3ff;
  --orange: #ff7a2f;
  --green: #6ee08f;
  --paper: #f3f0e8;
  --dark-ink: #111820;
  --shadow: 0 28px 70px rgba(0, 0, 0, 0.34);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  line-height: 1.55;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
}

.site-header {
  position: fixed;
  z-index: 20;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 76px;
  padding: 12px clamp(20px, 4vw, 56px);
  background: rgba(7, 9, 12, 0.84);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.brand img {
  width: 116px;
  height: auto;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(16px, 3vw, 34px);
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0;
}

.site-nav a {
  text-decoration: none;
}

.site-nav a:hover {
  color: var(--ink);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
  padding: 9px;
}

.menu-toggle span {
  display: block;
  height: 2px;
  margin: 5px 0;
  background: var(--ink);
}

.hero {
  position: relative;
  min-height: 94vh;
  display: grid;
  align-items: end;
  overflow: hidden;
  padding: 150px clamp(20px, 6vw, 76px) 96px;
}

.hero-media,
.hero-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero-media {
  object-fit: cover;
  filter: saturate(1.05) contrast(1.05);
}

.hero-overlay {
  background:
    linear-gradient(90deg, rgba(7, 9, 12, 0.95) 0%, rgba(7, 9, 12, 0.74) 45%, rgba(7, 9, 12, 0.28) 100%),
    linear-gradient(0deg, rgba(7, 9, 12, 0.92) 0%, rgba(7, 9, 12, 0.18) 45%);
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 830px;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--cyan);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 18px;
  font-size: clamp(42px, 6.6vw, 78px);
  line-height: 0.98;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 22px;
  font-size: clamp(24px, 2.45vw, 34px);
  line-height: 1.16;
  letter-spacing: 0;
  text-wrap: balance;
}

h3 {
  margin-bottom: 12px;
  font-size: 20px;
  line-height: 1.22;
}

.hero-copy {
  max-width: 720px;
  color: #d9e4ee;
  font-size: clamp(18px, 1.7vw, 23px);
  line-height: 1.32;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 34px;
}

.button {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  border-radius: 6px;
  padding: 0 20px;
  text-decoration: none;
  font-weight: 800;
}

.button.primary {
  color: #071018;
  background: var(--cyan);
}

.button.secondary {
  border: 1px solid var(--line);
  color: var(--ink);
  background: rgba(255, 255, 255, 0.07);
}

.intro-band {
  padding: 34px clamp(20px, 6vw, 76px);
  background: var(--paper);
  color: var(--dark-ink);
}

.intro-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.9fr);
  gap: 34px;
  max-width: 1180px;
  margin: 0 auto;
  align-items: center;
}

.intro-grid p {
  margin-bottom: 0;
  font-size: clamp(20px, 2vw, 28px);
  line-height: 1.24;
  font-weight: 800;
}

.value-list,
.check-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.value-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.value-list li,
.check-list li {
  position: relative;
  padding-left: 22px;
}

.value-list li::before,
.check-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.72em;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--orange);
}

.section {
  padding: clamp(72px, 9vw, 132px) clamp(20px, 6vw, 76px);
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(360px, 1fr);
  gap: clamp(36px, 7vw, 88px);
  align-items: center;
}

.section-copy,
.section-heading {
  max-width: 980px;
}

.section-heading h2,
.section-copy h2 {
  max-width: 920px;
}

.section-copy p,
.section-heading + p,
.solution-row p,
.result-band p,
.contact-copy p {
  color: var(--muted);
  font-size: 18px;
}

.image-panel {
  margin: 0;
  overflow: hidden;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.image-panel img,
.solution-row figure img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.credential-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-top: 28px;
}

.credential-strip img {
  max-width: 180px;
  max-height: 96px;
  width: auto;
  height: auto;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px;
  background: #050608;
}

.service-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  margin-top: 48px;
  border: 1px solid var(--line);
  background: var(--line);
}

.service-card {
  min-height: 285px;
  padding: 28px;
  background: var(--soft);
}

.service-card:nth-child(2) {
  background: #162331;
}

.service-card:nth-child(3) {
  background: #101d18;
}

.service-card:nth-child(4) {
  background: #241a14;
}

.service-card p {
  color: var(--muted);
}

.definition-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 28px;
}

.definition-grid article {
  border-left: 3px solid var(--cyan);
  padding: 4px 0 4px 18px;
}

.definition-grid h3 {
  margin-bottom: 6px;
}

.definition-grid p {
  margin-bottom: 0;
  color: var(--muted);
}

.process-section {
  background: #0a1118;
}

.process-layout {
  display: grid;
  grid-template-columns: minmax(320px, 0.85fr) minmax(0, 1.15fr);
  gap: clamp(28px, 5vw, 70px);
  align-items: start;
  margin-top: 46px;
}

.process-list {
  display: grid;
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.process-list li {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 10px 16px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
}

.process-list span {
  grid-row: span 2;
  color: var(--orange);
  font-weight: 900;
}

.process-list strong {
  color: var(--ink);
}

.wide {
  aspect-ratio: 16 / 10;
}

.sectors {
  background: var(--paper);
  color: var(--dark-ink);
}

.sectors .eyebrow {
  color: #1d7f99;
}

.sector-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 42px;
}

.sector-grid span {
  min-height: 68px;
  display: flex;
  align-items: center;
  border: 1px solid rgba(17, 24, 32, 0.16);
  border-radius: 6px;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.58);
  font-weight: 800;
}

.sector-photos {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-top: 36px;
}

.sector-photos img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 8px;
  box-shadow: 0 18px 42px rgba(17, 24, 32, 0.16);
}

.solution-stack {
  display: grid;
  gap: 74px;
}

.solution-row {
  display: grid;
  grid-template-columns: minmax(300px, 0.78fr) minmax(0, 1.22fr);
  gap: clamp(30px, 6vw, 80px);
  align-items: center;
}

.solution-row.reverse {
  grid-template-columns: minmax(0, 1.05fr) minmax(360px, 0.95fr);
}

.solution-row.reverse figure {
  order: 2;
}

.solution-row figure {
  margin: 0;
  overflow: hidden;
  border-radius: 8px;
  aspect-ratio: 4 / 3;
  background: var(--panel);
}

.solution-row:first-child figure {
  width: min(100%, 620px);
  justify-self: center;
}

.solution-row h2 {
  max-width: 720px;
  font-size: clamp(25px, 2.55vw, 38px);
}

.check-list {
  display: grid;
  gap: 10px;
  margin-top: 24px;
  color: var(--muted);
}

.text-link {
  display: inline-flex;
  margin-top: 16px;
  color: var(--cyan);
  font-weight: 900;
  text-decoration: none;
}

.saas-section {
  background: #071018;
}

.saas-section .section-heading p:not(.eyebrow) {
  color: var(--muted);
  font-size: 18px;
}

.saas-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.9fr);
  gap: 18px;
  margin-top: 42px;
}


.mini-modules-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-top: 24px;
}

.mini-module {
  background: #081320;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 14px;
  padding: 18px 12px;
  text-align: center;
  color: #d7e7f7;
  font-size: 0.9rem;
  font-weight: 600;
  min-height: 80px;

  display: flex;
  align-items: center;
  justify-content: center;

  transition: 0.25s ease;
}

.mini-module:hover {
  border-color: #1dcfff;
  transform: translateY(-3px);
  background: #0d1b2a;
}
.saas-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
}

.saas-card.active {
  display: grid;
  grid-template-columns: minmax(320px, 0.95fr) minmax(0, 1.05fr);
  align-items: stretch;
}

.saas-card img {
  width: 100%;
  height: 100%;
  min-height: 320px;
  object-fit: cover;
}

.saas-card div {
  padding: 28px;
}

.saas-card p {
  color: var(--muted);
}

.saas-card .button {
  margin-top: 16px;
}

.muted-card {
  display: grid;
  align-items: center;
  background: #10151b;
}

.result-band {
  display: grid;
  grid-template-columns: minmax(280px, 0.8fr) minmax(0, 1.2fr);
  gap: clamp(28px, 6vw, 80px);
  align-items: center;
  padding: clamp(54px, 7vw, 92px) clamp(20px, 6vw, 76px);
  background: #101a16;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.result-band img {
  border-radius: 8px;
}

.result-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
}

.result-list li {
  border: 1px solid rgba(110, 224, 143, 0.36);
  border-radius: 6px;
  padding: 8px 12px;
  color: #eafff0;
  background: rgba(110, 224, 143, 0.08);
  font-weight: 800;
}

.visual-gallery {
  background: #090d12;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 42px;
}

.gallery-grid figure {
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
}

.gallery-grid img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.gallery-grid figcaption {
  min-height: 78px;
  padding: 16px 18px;
  color: var(--muted);
  font-weight: 700;
}

.why-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin-top: 44px;
  background: var(--line);
  border: 1px solid var(--line);
}

.why-grid p {
  min-height: 124px;
  margin: 0;
  padding: 22px;
  background: var(--soft);
  color: #dfe8ef;
  font-size: 18px;
  font-weight: 800;
}

.contact-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(330px, 430px);
  gap: clamp(28px, 6vw, 80px);
  align-items: start;
  padding: clamp(76px, 10vw, 140px) clamp(20px, 6vw, 76px);
  color: var(--dark-ink);
  background: var(--paper);
}

.contact-section .eyebrow {
  color: #1d7f99;
}

.contact-panel {
  border-radius: 8px;
  padding: 28px;
  color: var(--ink);
  background: var(--dark-ink);
  box-shadow: var(--shadow);
}

.contact-panel p {
  color: var(--muted);
}

.contact-panel a {
  color: var(--cyan);
  text-decoration: none;
  font-weight: 800;
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 22px clamp(20px, 6vw, 76px);
  color: var(--muted);
  background: #050608;
  border-top: 1px solid var(--line);
}

.site-footer img {
  width: 82px;
}

.site-footer p {
  margin: 0;
}

@media (max-width: 1050px) {
  .service-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .definition-grid,
  .sector-photos,
  .saas-grid,
  .saas-card.active {
    grid-template-columns: 1fr;
  }

  .split,
  .process-layout,
  .solution-row,
  .solution-row.reverse,
  .result-band,
  .contact-section {
    grid-template-columns: 1fr;
  }

  .solution-row.reverse figure {
    order: 0;
  }

  .sector-grid,
  .why-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

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

  .menu-toggle {
    display: block;
  }

  .site-nav {
    position: absolute;
    top: 68px;
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px 20px 18px;
    background: rgba(7, 9, 12, 0.98);
    border-bottom: 1px solid var(--line);
  }

  .site-nav.open {
    display: flex;
  }

  .site-nav a {
    padding: 13px 0;
  }

  .hero {
    min-height: 88vh;
    padding: 122px 20px 72px;
  }

  .hero-overlay {
    background:
      linear-gradient(0deg, rgba(7, 9, 12, 0.96) 0%, rgba(7, 9, 12, 0.68) 58%, rgba(7, 9, 12, 0.3) 100%);
  }

  .intro-grid,
  .service-grid,
  .sector-grid,
  .why-grid {
    grid-template-columns: 1fr;
  }

  .value-list {
    grid-template-columns: 1fr;
  }

  .section {
    padding: 62px 20px;
  }

  .service-card {
    min-height: auto;
  }

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

  .credential-strip img {
    max-width: 145px;
  }

  .solution-row figure {
    min-height: 280px;
  }

  .site-footer {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* =====================================
   MODULI NEXORA - PNG GRANDI
   Aggiunto in fondo per non modificare la prima parte del sito
   ===================================== */

.saas-section .mini-modules-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
  margin-top: 42px;
  border: 0;
  background: transparent;
}

.saas-section .mini-module {
  position: relative;
  min-height: 220px;
  padding: 10px;

  display: flex;
  align-items: center;
  justify-content: center;

  overflow: hidden;
  text-decoration: none;

  border: 1px solid rgba(43, 211, 255, 0.18);
  border-radius: 18px;
  background:
    linear-gradient(145deg, rgba(9, 24, 38, 0.98), rgba(5, 12, 20, 0.98));

  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.02);

  transition:
    transform 0.25s ease,
    border-color 0.25s ease,
    box-shadow 0.25s ease,
    background 0.25s ease;
}

.saas-section .mini-module-card {
  display: grid;
  gap: 10px;
}

.saas-section .module-code-link {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(43, 211, 255, 0.38);
  border-radius: 12px;
  color: #071018;
  background: #2bd3ff;
  text-decoration: none;
  font-weight: 900;
  letter-spacing: 0;
}

.saas-section .module-code-link:hover {
  color: #071018;
  filter: brightness(1.08);
  transform: translateY(-1px);
}

.saas-section .mini-module::before {
  content: "";
  position: absolute;
  inset: -60%;
  background: radial-gradient(circle, rgba(43,211,255,0.18), transparent 42%);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.saas-section .mini-module img {
  position: relative;
  z-index: 1;

  width: 92%;
  max-width: 360px;
  max-height: 170px;

  object-fit: contain;

  filter: drop-shadow(0 0 15px rgba(43,211,255,0.25));

  transition:
    transform 0.25s ease,
    filter 0.25s ease;
}

.saas-section .mini-module:hover {
  transform: translateY(-6px);
  border-color: rgba(43,211,255,0.75);
  background:
    linear-gradient(145deg, rgba(12,33,52,0.98), rgba(7,18,30,0.98));
  box-shadow:
    0 18px 40px rgba(0,0,0,0.35),
    0 0 24px rgba(43,211,255,0.15);
}

.saas-section .mini-module:hover::before {
  opacity: 1;
}

.saas-section .mini-module:hover img {
  transform: scale(1.08);
  filter: drop-shadow(0 0 25px rgba(43,211,255,0.50));
}

@media (max-width: 1100px) {
  .saas-section .mini-modules-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .saas-section .mini-module {
    min-height: 200px;
  }

  .saas-section .mini-module img {
    width: 90%;
    max-height: 150px;
  }
}

@media (max-width: 760px) {
  .saas-section .mini-modules-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .saas-section .mini-module {
    min-height: 170px;
    border-radius: 14px;
  }

  .saas-section .mini-module img {
    width: 88%;
    max-width: 260px;
    max-height: 130px;
  }
}

@media (max-width: 430px) {
  .saas-section .mini-modules-grid {
    grid-template-columns: 1fr;
  }

  .saas-section .mini-module {
    min-height: 180px;
  }

  .saas-section .mini-module img {
    width: 90%;
    max-height: 140px;
  }
}

/* =====================================
   TOOLTIP MODULI NEXORA
   Mostra il nome del modulo al passaggio del mouse.
   Usa il testo presente in aria-label del link.
   Esempio: aria-label="Modulo HACCP"
   ===================================== */

.saas-section .mini-module::after {
  content: attr(aria-label);

  position: absolute;
  inset: 0;
  z-index: 3;

  display: flex;
  align-items: center;
  justify-content: center;

  padding: 18px;
  text-align: center;

  color: #ffffff;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0.4px;

background: rgba(7, 16, 24, 0.78);
border: 1px solid rgba(43, 211, 255, 0.35);
box-shadow:
  0 0 20px rgba(43, 211, 255, 0.15),
  inset 0 0 10px rgba(43, 211, 255, 0.08);
  backdrop-filter: blur(4px);

  opacity: 0;
  transition: opacity 0.28s ease;

  border-radius: 18px;
  pointer-events: none;

  text-shadow: 0 0 14px rgba(43, 211, 255, 0.75);
}

.saas-section .mini-module:hover::after {
  opacity: 1;
}

@media (max-width: 760px) {
  .saas-section .mini-module::after {
    font-size: 18px;
    border-radius: 14px;
  }
}

/* Privacy policy */
.privacy-page {
  padding-top: 76px;
  background: var(--bg);
}

.privacy-page h1 {
  margin-bottom: 18px;
  font-size: clamp(38px, 5.6vw, 68px);
  line-height: 1;
  letter-spacing: 0;
}

.privacy-content {
  display: grid;
  gap: 18px;
  max-width: 980px;
  margin-top: 42px;
}

.privacy-content article {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 24px;
  background: var(--soft);
}

.privacy-content h2 {
  margin-bottom: 10px;
  font-size: 22px;
}

.privacy-content p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 17px;
}

.privacy-content a {
  color: var(--cyan);
  font-weight: 800;
  text-decoration: none;
}

.button.orange {
  color: #071018;
  background: var(--orange);
  box-shadow: 0 14px 32px rgba(255, 122, 47, 0.22);
}

.button.orange:hover {
  filter: brightness(1.08);
}
