:root {
  --bg: #eef6f8;
  --panel: #ffffff;
  --text: #10242b;
  --muted: #5c737a;
  --line: #dbe8eb;
  --blue: #0d5c75;
  --blue-dark: #073f52;
  --cyan: #7fd6e7;
  --sand: #f7f1e8;
  --shadow: 0 18px 45px rgba(7, 63, 82, 0.10);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: 'Inter', Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(127, 214, 231, 0.28), transparent 35%),
    linear-gradient(180deg, #f7fbfc 0%, var(--bg) 42%, #f8fafb 100%);
  line-height: 1.7;
}

a {
  color: var(--blue);
  text-decoration: none;
  font-weight: 600;
}

a:hover {
  color: var(--blue-dark);
  text-decoration: underline;
}

.page-wrap {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.container {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
}

/* HEADER PAGINE LEGALI E MENU RESPONSIVE */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: linear-gradient(180deg, rgba(2, 12, 22, 0.94) 0%, rgba(4, 22, 36, 0.88) 100%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 4px 25px rgba(0, 0, 0, 0.35);
}

.nav-row {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  position: relative;
}

.logo {
  font-size: 24px;
  font-weight: 700;
  line-height: 1.05;
  margin-bottom: 0;
  text-decoration: none;
  color: #fff;
  display: inline-block;
}

.logo span { color: #f6c431; }

.payoff {
  display: block;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.16em;
  color: #8da4ac;
  text-transform: uppercase;
  margin-top: 3px;
}

/* Menu Hamburger Toggle */
.menu-toggle {
  margin-left: auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 44px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  padding: 9px;
  cursor: pointer;
  transition: all 0.2s ease;
  z-index: 102;
}

.menu-toggle:hover {
  background: rgba(255, 255, 255, 0.16);
  border-color: #f6c431;
}

.menu-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.menu-toggle.is-open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.menu-toggle.is-open span:nth-child(2) {
  opacity: 0;
}

.menu-toggle.is-open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Base Navigazione */
.main-nav a {
  display: flex;
  align-items: center;
  color: #edf8fb;
  font-size: 15px;
  font-weight: 500;
  transition: background 0.2s ease, color 0.2s ease;
  text-decoration: none;
}

.main-nav a:hover {
  color: #f6c431;
}

.main-nav a.nav-cta {
  background: linear-gradient(90deg, #ffc94c, #f0ae20);
  color: #061d30 !important;
  font-weight: 800;
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: 0.04em;
  border-radius: 999px;
  padding: 8px 16px;
}

.main-nav a.nav-cta:hover {
  background: linear-gradient(90deg, #ffd466, #f5b933);
  box-shadow: 0 4px 15px rgba(246, 196, 49, 0.35);
}

/* Mobile (<= 900px): Popover Dropdown */
@media (max-width: 900px) {
  .menu-toggle {
    display: flex !important;
  }

  .main-nav {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    left: auto;
    width: min(300px, 88vw);
    background: rgba(3, 20, 33, 0.98);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 14px;
    padding: 12px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.65), 0 0 0 1px rgba(246, 196, 49, 0.18);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    display: none;
    flex-direction: column;
    gap: 4px;
    z-index: 101;
  }

  .main-nav.is-open {
    display: flex !important;
  }

  .main-nav a {
    padding: 12px 14px;
    border-radius: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  }

  .main-nav a:last-child {
    border-bottom: 0;
  }

  .main-nav a:hover {
    background: rgba(255, 255, 255, 0.08);
  }

  .main-nav a.nav-cta {
    margin-top: 8px;
    padding: 12px 18px;
    justify-content: center;
    border-bottom: 0;
  }
}

/* Desktop (> 900px): Link in linea */
@media (min-width: 901px) {
  .menu-toggle {
    display: none !important;
  }

  .main-nav {
    position: static !important;
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 20px !important;
    width: auto !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    padding: 0 !important;
  }

  .main-nav a {
    padding: 8px 12px;
    border-bottom: none !important;
    border-radius: 6px;
  }
}

.nav-cta {
  background: var(--blue);
  color: #fff !important;
  padding: 11px 18px;
  border-radius: 999px;
  box-shadow: 0 12px 26px rgba(13, 92, 117, 0.18);
}

.hamburger {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 12px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
}

.hamburger span {
  width: 21px;
  height: 2px;
  background: var(--blue-dark);
  border-radius: 20px;
  transition: 0.2s ease;
}

/* HERO LEGALE */
.legal-hero {
  padding: 44px 0 28px;
}

.hero-card {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(7, 63, 82, 0.97), rgba(13, 92, 117, 0.92));
  color: #fff;
  border-radius: 24px;
  padding: 38px 46px;
  box-shadow: var(--shadow);
}

.hero-card::after {
  content: "";
  position: absolute;
  right: -90px;
  top: -120px;
  width: 360px;
  height: 360px;
  border-radius: 50%;
  background: rgba(127, 214, 231, 0.18);
}

.hero-kicker {
  margin: 0 0 10px;
  color: var(--cyan);
  font-family: 'Work Sans', Arial, sans-serif;
  text-transform: uppercase;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.hero-card h1 {
  position: relative;
  z-index: 1;
  margin: 0;
  max-width: 780px;
  font-family: 'Work Sans', Arial, sans-serif;
  font-size: clamp(26px, 3.2vw, 38px);
  line-height: 1.15;
  letter-spacing: -0.03em;
  color: #ffffff !important;
}

.hero-card p {
  position: relative;
  z-index: 1;
  max-width: 720px;
  margin: 14px 0 0;
  color: rgba(255,255,255,0.86);
  font-size: 16px;
}

/* CONTENUTI & TABELLE LEGALI */
.legal-layout {
  padding: 28px 0 80px;
}

.legal-shell {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 34px;
  align-items: start;
}

.legal-toc {
  position: sticky;
  top: 104px;
  background: rgba(255,255,255,0.82);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: 0 12px 30px rgba(7, 63, 82, 0.06);
}

.legal-toc h2 {
  margin: 0 0 14px;
  font-family: 'Work Sans', Arial, sans-serif;
  font-size: 17px;
  letter-spacing: -0.02em;
}

.legal-toc a {
  display: block;
  padding: 8px 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid rgba(219, 232, 235, 0.6);
}

.legal-toc a:last-child {
  border-bottom: 0;
}

.legal-toc a:hover {
  color: var(--blue);
}

.privacy-content {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 28px;
  padding: clamp(28px, 5vw, 58px);
  box-shadow: var(--shadow);
}

.privacy-content > p:first-of-type {
  display: inline-flex;
  margin: 0 0 26px;
  padding: 8px 14px;
  background: var(--sand);
  border-radius: 999px;
  color: var(--blue-dark);
  font-size: 14px;
  font-weight: 700;
}

.privacy-content h2 {
  margin: 42px 0 14px;
  padding-top: 6px;
  font-family: 'Work Sans', Arial, sans-serif;
  font-size: clamp(24px, 2.3vw, 32px);
  line-height: 1.18;
  letter-spacing: -0.04em;
  color: var(--blue-dark);
}

.privacy-content h2:first-of-type {
  margin-top: 10px;
}

.privacy-content p {
  margin: 0 0 16px;
  color: #38525a;
  font-size: 16px;
}

.info-table {
  width: 100%;
  border-collapse: collapse;
  margin: 22px 0 34px;
  background: #f7fbfc;
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
}

.info-table td {
  padding: 14px 20px;
  border-bottom: 1px solid var(--line);
  font-size: 15px;
  color: #38525a;
}

.info-table tr:last-child td {
  border-bottom: 0;
}

.info-table td:first-child {
  width: 32%;
  font-weight: 700;
  color: var(--blue-dark);
  background: rgba(127, 214, 231, 0.08);
}

.focus-list {
  list-style: none;
  padding: 0;
  margin: 18px 0 0;
  display: grid;
  gap: 12px;
}

.focus-list li {
  position: relative;
  padding: 16px 18px 16px 46px;
  background: #f7fbfc;
  border: 1px solid var(--line);
  border-radius: 16px;
  color: #38525a;
}

.focus-list li::before {
  content: "";
  position: absolute;
  left: 18px;
  top: 22px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 0 5px rgba(127, 214, 231, 0.18);
}

.cta-contact {
  margin-top: 48px;
  background: linear-gradient(135deg, #f7f1e8, #edf6f8);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.cta-contact h3 {
  margin: 0 0 6px;
  font-family: 'Work Sans', Arial, sans-serif;
  font-size: 20px;
  color: var(--blue-dark);
}

.cta-contact p {
  margin: 0;
  font-size: 15px;
  color: var(--muted);
}

.cta-contact a {
  background: var(--blue-dark);
  color: #fff;
  padding: 12px 22px;
  border-radius: 999px;
  font-weight: 700;
  white-space: nowrap;
}

.cta-contact a:hover {
  text-decoration: none;
  background: var(--blue);
}

strong {
  color: var(--text);
}

/* FOOTER LEGALE */
.site-footer {
  margin-top: auto;
  background: #071f27;
  color: rgba(255,255,255,0.78);
  padding: 34px 0;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 26px;
  font-size: 14px;
}

.footer-inner p {
  margin: 0;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-links a,
.site-footer a {
  color: #fff;
  text-decoration: none;
  font-weight: 600;
}

.site-footer a:hover {
  text-decoration: underline;
}

@media (max-width: 900px) {
  .legal-hero {
    padding-top: 38px;
  }

  .hero-card {
    padding: 38px 28px;
    border-radius: 24px;
  }

  .legal-shell {
    grid-template-columns: 1fr;
  }

  .legal-toc {
    position: static;
  }

  .info-table td:first-child {
    width: auto;
    white-space: normal;
  }

  .cta-contact {
    flex-direction: column;
    align-items: flex-start;
  }

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

/* STILI PAGINA 404 */
.error-404-card {
  text-align: center;
  padding: 60px 40px;
}
.error-404-code {
  font-family: 'Work Sans', sans-serif;
  font-size: clamp(80px, 12vw, 130px);
  font-weight: 800;
  line-height: 1;
  color: var(--blue);
  margin: 0 0 10px;
  letter-spacing: -0.04em;
  background: linear-gradient(135deg, var(--blue-dark), var(--blue));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.error-404-title {
  font-size: clamp(24px, 4vw, 36px);
  font-weight: 800;
  margin: 0 0 16px;
  color: var(--text);
}
.error-404-text {
  font-size: 17px;
  color: var(--muted);
  max-width: 540px;
  margin: 0 auto 30px;
}
.btn-primary {
  display: inline-block;
  background: var(--blue-dark);
  color: #ffffff !important;
  padding: 14px 28px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 15px;
  transition: transform 0.2s ease, background 0.2s ease;
}
.btn-primary:hover {
  background: var(--blue);
  text-decoration: none;
  transform: translateY(-2px);
}
.error-quick-links {
  margin-top: 40px;
  padding-top: 30px;
  border-top: 1px solid var(--line);
}
.error-quick-links h3 {
  font-size: 16px;
  color: var(--muted);
  margin-bottom: 16px;
  font-weight: 600;
}
.quick-links-grid {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}
.quick-links-grid a {
  background: #f0f7f9;
  border: 1px solid var(--line);
  padding: 10px 18px;
  border-radius: 12px;
  font-size: 14px;
  transition: border-color 0.2s ease, background 0.2s ease;
}
.quick-links-grid a:hover {
  background: #e2f1f5;
  border-color: var(--blue);
  text-decoration: none;
}

/* STILI FORM E AUDIT PER DESIGN SYSTEM LEGAL */
.legal-form-wrap {
  max-width: 480px;
  margin: 0 auto;
}

.form-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 32px 28px;
  box-shadow: 0 16px 40px rgba(7, 63, 82, 0.08);
}

.form-card h2 {
  font-family: 'Work Sans', sans-serif;
  font-size: 22px;
  font-weight: 800;
  color: var(--blue-dark);
  margin: 0 0 22px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  text-align: center;
}

.form-group {
  margin-bottom: 18px;
  text-align: left;
}

.form-group label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  color: var(--blue-dark);
  margin-bottom: 8px;
  font-size: 14px;
  font-family: 'Inter', sans-serif;
}

.form-group label i {
  color: var(--blue);
  font-size: 15px;
}

.form-control-custom {
  display: block;
  width: 100%;
  padding: 14px 16px;
  border: 1.5px solid var(--line);
  border-radius: 8px;
  font-size: 15px;
  font-family: 'Inter', sans-serif;
  color: var(--text);
  background: #f7fbfc;
  transition: all 0.2s ease-in-out;
  box-sizing: border-box;
}

.form-control-custom:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(13, 92, 117, 0.12);
  background: #ffffff;
}

.form-actions-center {
  margin-top: 24px;
}

.btn-submit-custom {
  width: 100%;
  border: none;
  border-radius: 999px;
  background: linear-gradient(90deg, #ffc94c, #f0ae20);
  color: #061d30 !important;
  font-weight: 800;
  font-size: 15px;
  padding: 16px 20px;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  transition: all 0.25s ease;
  box-shadow: 0 8px 20px rgba(240, 174, 32, 0.28);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-decoration: none;
  text-align: center;
}

.btn-submit-custom:hover {
  background: linear-gradient(90deg, #ffd466, #f5b933);
  transform: translateY(-2px);
  box-shadow: 0 12px 26px rgba(240, 174, 32, 0.42);
  color: #061d30 !important;
  text-decoration: none;
}

.btn-secondary-custom {
  background: #f0f7f9;
  color: var(--blue-dark) !important;
  border: 1px solid var(--line);
  padding: 10px 20px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
  text-decoration: none;
}

.btn-secondary-custom:hover {
  background: #e2f1f5;
  border-color: var(--blue);
  text-decoration: none;
}

.audit-score-box {
  background: linear-gradient(135deg, #eef9fc, #e3f3f7);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 28px;
  text-align: center;
  margin-bottom: 30px;
}

.audit-score-num {
  font-family: 'Work Sans', sans-serif;
  font-size: 54px;
  font-weight: 800;
  color: var(--blue-dark);
  line-height: 1;
  margin: 10px 0;
}

.result-card-item {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 24px;
  margin-bottom: 18px;
  transition: all 0.2s ease;
}

.result-card-item:hover {
  box-shadow: 0 8px 24px rgba(7, 63, 82, 0.08);
  border-color: var(--cyan);
}

/* UTILITY GRIGLIE A 2 COLONNE PER SCHEDE E PROCESSI */
.grid-2-col {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

@media (max-width: 768px) {
  .grid-2-col {
    grid-template-columns: 1fr;
  }
}



