:root {
  --bg: #101214;
  --surface: #181b1f;
  --text: #e9edf2;
  --muted: #b9c0c7;
  --brand: #df7f2f;
  --brand-strong: #ff9d3a;
  --accent: #2f6fb3;
  --card: #1f242a;
  --border: #2a2f36;
  --nav-bg: #1b1f25;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Manrope", sans-serif;
  color: var(--text);
  background: radial-gradient(1200px 600px at 70% -10%, #1f2b3a 0%, transparent 60%),
    radial-gradient(900px 500px at 0% 20%, #2c1c12 0%, transparent 55%), var(--bg);
  line-height: 1.6;
}

a {
  color: var(--text);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--brand);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: linear-gradient(180deg, rgba(27, 31, 37, 0.98), rgba(20, 23, 28, 0.96));
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
}

.site-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  max-width: 1100px;
  margin: 0 auto;
  padding: 16px 24px;
}

.nav-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: "Orbitron", sans-serif;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brand);
  font-weight: 600;
}

.nav-brand__logo {
  display: block;
  width: auto;
  height: 34px;
  max-width: 180px;
  object-fit: contain;
}

.nav-brand__text {
  font-size: 0;
  line-height: 0;
}

.nav-links {
  display: flex;
  gap: 18px;
  row-gap: 8px;
  flex-wrap: wrap;
  font-weight: 600;
  text-transform: uppercase;
  font-size: 13px;
}

.nav-links a {
  padding: 4px 0;
  color: #f1f4f7;
  letter-spacing: 0.04em;
}

.nav-links a:hover {
  color: var(--brand-strong);
}

.nav-link-cta {
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid rgba(223, 127, 47, 0.5);
  color: var(--brand-strong);
}

.nav-link-cta:hover {
  background: rgba(223, 127, 47, 0.12);
  color: #ffffff;
}

.nav-cta {
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--accent);
  color: #f5f7fa;
  font-weight: 700;
  text-transform: uppercase;
  font-size: 12px;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.nav-cta:hover {
  background: #3a7ed0;
  color: #ffffff;
}

.site-main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 56px 24px 96px;
}

.hero {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 32px;
  align-items: center;
  padding: 56px 0 32px;
}

.hero-panel {
  background: linear-gradient(150deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02));
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 32px;
}

.hero-eyebrow {
  font-family: "Source Code Pro", monospace;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 12px;
  color: var(--brand);
}

.hero-media {
  min-height: 240px;
  border-radius: 24px;
  background: radial-gradient(circle at 30% 30%, rgba(50, 112, 180, 0.5), transparent 60%),
    linear-gradient(135deg, rgba(223, 127, 47, 0.2), rgba(31, 36, 42, 0.8));
  border: 1px solid var(--border);
}

.section {
  margin: 48px 0;
}

.section-title {
  font-size: clamp(24px, 3vw, 36px);
  margin-bottom: 16px;
}

.section-subtitle {
  color: var(--muted);
  max-width: 720px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-top: 24px;
}

.grid-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 22px;
}

.grid-card h3 {
  margin-bottom: 10px;
  font-size: 18px;
}

.grid-card table {
  width: 100%;
  border-collapse: collapse;
}

.grid-card th,
.grid-card td {
  border-bottom: 1px solid var(--border);
}

.grid-card th {
  color: #d9e1ea;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.kpi-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  align-items: center;
  padding: 10px 12px;
  border: 1px dashed var(--border);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.02);
}

.toolbar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 12px;
  align-items: end;
}

.toolbar-actions .cta {
  margin-top: 2px;
}

.table-wrap {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(12, 16, 21, 0.45);
  padding: 6px;
}

.pagination-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  font-size: 11px;
  line-height: 1;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #d2d9e1;
  background: rgba(255, 255, 255, 0.04);
}

.status-badge--success,
.status-badge--sent,
.status-badge--active {
  border-color: rgba(61, 177, 118, 0.55);
  color: #8fe2b9;
  background: rgba(45, 143, 99, 0.18);
}

.status-badge--failed,
.status-badge--rejected,
.status-badge--revoked {
  border-color: rgba(220, 94, 94, 0.55);
  color: #f1a3a3;
  background: rgba(169, 65, 65, 0.2);
}

.status-badge--pending,
.status-badge--running,
.status-badge--in_review,
.status-badge--suspended,
.status-badge--skipped {
  border-color: rgba(214, 160, 66, 0.55);
  color: #f2c167;
  background: rgba(184, 132, 42, 0.2);
}

.entitlement-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.entitlement-card__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}

.entitlement-card__header h3 {
  margin: 0;
}

.entitlement-card__meta {
  display: grid;
  gap: 6px;
}

.entitlement-card__meta p {
  margin: 0;
}

.entitlement-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.entitlement-card__actions form {
  margin: 0;
}

.entitlement-card__actions .cta {
  min-width: 160px;
  justify-content: center;
}

.entitlement-card__history {
  border: 1px dashed var(--border);
  border-radius: 10px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.02);
}

.entitlement-card__history p {
  margin: 0 0 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 8px;
  align-items: center;
}

.entitlement-card__history p:last-child {
  margin-bottom: 0;
}

.pill {
  display: inline-flex;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(223, 127, 47, 0.15);
  color: var(--brand);
  font-size: 12px;
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.section-divider {
  border-top: 1px solid var(--border);
  margin: 40px 0;
}

.page-content {
  display: flex;
  flex-direction: column;
  gap: 40px;
}

/* Safety net: evita overflow orizzontale su immagini renderizzate dal CMS */
.page-content img,
.grid-card img,
.page-section img {
  max-width: 100%;
  height: auto;
}

.page-content img {
  display: block;
  width: min(100%, 920px);
  margin-left: auto;
  margin-right: auto;
}

.page-hero {
  position: relative;
  color: #f2f4f7;
  background: linear-gradient(180deg, rgba(19, 28, 40, 0.68), rgba(12, 15, 20, 0.9)),
    var(--hero-bg, none);
  background-size: cover;
  background-position: center;
  border-radius: 28px;
  overflow: hidden;
  padding: 64px 48px;
  min-height: 320px;
}

.page-hero--wide {
  width: 100vw;
  margin-left: calc(-50vw + 50%);
  border-radius: 0;
}

.page-hero__eyebrow {
  font-family: "Source Code Pro", monospace;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 12px;
  color: var(--brand);
}

.page-hero__title {
  font-size: clamp(34px, 5vw, 56px);
  margin: 16px 0;
  color: #ffffff;
}

.page-hero__text {
  max-width: 640px;
  color: #d7dbe0;
}

.page-section {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.page-split {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 32px;
  align-items: center;
}

.page-split__media {
  min-height: 260px;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--card);
}

.page-split__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.page-banner {
  width: 100%;
  min-height: 240px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: var(--banner-bg, #1a1e24);
  background-size: cover;
  background-position: center;
}

.timeline {
  display: grid;
  gap: 24px;
  margin-top: 16px;
}

.timeline-item {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 24px;
  align-items: start;
}

.timeline-date {
  font-family: "Source Code Pro", monospace;
  text-transform: uppercase;
  font-size: 13px;
  color: var(--brand);
}

.timeline-card {
  background: #f5f7fa;
  color: #1c222a;
  border-radius: 16px;
  padding: 20px;
  border: 1px solid #e2e6ec;
}

.timeline-card h3 {
  margin-top: 0;
  color: #1c222a;
}

.page-band {
  width: 100vw;
  margin-left: calc(-50vw + 50%);
  padding: 80px 24px;
  background: linear-gradient(180deg, rgba(10, 12, 14, 0.65), rgba(10, 12, 14, 0.9)),
    var(--band-bg, #12161b);
  background-size: cover;
  background-position: center;
  color: #f7f9fb;
}

.page-band__inner {
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
}

.page-band__inner h2 {
  margin-bottom: 16px;
  color: var(--brand);
}

.page-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 28px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
}

.page-cta h3 {
  margin: 0;
}

.home-intro {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03));
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 24px;
}

.home-intro h1 {
  margin-bottom: 10px;
}

.home-intro__secondary {
  background: transparent;
  border: 1px solid rgba(223, 127, 47, 0.5);
  color: var(--brand-strong);
  margin-left: 10px;
}

.home-intro__secondary:hover {
  background: rgba(223, 127, 47, 0.15);
  color: #ffffff;
}

.product-hero-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  margin-top: 24px;
  max-width: 760px;
}

.product-metric {
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(8, 11, 15, 0.55);
  border-radius: 12px;
  padding: 10px 12px;
}

.product-metric span {
  display: block;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #d3dae2;
}

.product-metric strong {
  font-size: 14px;
  color: #ffffff;
}

.product-layout {
  margin-top: 8px;
}

.product-feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}

.product-card {
  background: linear-gradient(150deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02));
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px;
}

.product-card p {
  margin: 0;
}

.product-schema-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}

.product-schema-link {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px;
}

.product-schema-link h3 {
  margin-bottom: 8px;
  font-size: 17px;
}

.product-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 420px));
  justify-content: center;
  gap: 16px;
}

.product-gallery__item {
  margin: 0;
  width: 100%;
  max-width: 420px;
  border: 1px solid var(--border);
  background: #11151a;
  border-radius: 14px;
  overflow: hidden;
}

.product-gallery__thumb {
  display: block;
}

.product-gallery__thumb img {
  transition: transform 0.25s ease, filter 0.25s ease;
}

.product-gallery__thumb:hover img {
  transform: scale(1.03);
  filter: brightness(1.06);
}

.product-gallery__item img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 240px;
  object-fit: contain;
  background: #0a0d11;
  margin: 0;
  padding: 8px;
}

.product-gallery__item figcaption {
  padding: 10px 12px;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.03em;
}

.product-lightbox {
  position: fixed;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 1000;
}

.product-lightbox:target {
  opacity: 1;
  pointer-events: auto;
}

.product-lightbox__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5, 8, 11, 0.84);
}

.product-lightbox__panel {
  position: relative;
  z-index: 2;
  width: min(1280px, calc(100vw - 24px));
  margin: 2vh auto 0;
  padding: 16px;
  background: #0f1318;
  border: 1px solid var(--border);
  border-radius: 14px;
  max-height: 96vh;
  overflow: auto;
}

.product-lightbox__panel img {
  width: 100%;
  max-height: 85vh;
  object-fit: contain;
  border-radius: 10px;
  background: #0a0d11;
}

.product-lightbox__panel p {
  margin: 12px 0 0;
}

.product-lightbox__close {
  margin-top: 10px;
}

@media (max-width: 768px) {
  .product-gallery__item img {
    max-height: 180px;
  }
}

.form-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}

label {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}

input,
textarea,
select {
  background: #0e1116;
  border: 1px solid var(--border);
  color: var(--text);
  padding: 12px 14px;
  border-radius: 10px;
  font-family: "Manrope", sans-serif;
}

input:focus,
textarea:focus,
select:focus {
  outline: 2px solid rgba(223, 127, 47, 0.4);
  border-color: rgba(223, 127, 47, 0.6);
}

button:focus,
.cta:focus,
a:focus {
  outline: 2px solid rgba(223, 127, 47, 0.5);
  outline-offset: 2px;
}

h1,
h2,
h3 {
  font-family: "Source Code Pro", monospace;
  letter-spacing: 0.02em;
  margin: 0 0 16px;
}

h1 {
  font-size: clamp(32px, 4vw, 48px);
  color: var(--brand-strong);
}

p {
  margin: 0 0 16px;
  color: var(--muted);
}

.card {
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.01));
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  border-radius: 999px;
  background: var(--brand);
  color: #0b0e11;
  font-weight: 700;
  text-transform: uppercase;
  font-size: 13px;
}

.cta:hover {
  color: #0b0e11;
  background: var(--brand-strong);
}

.campaign-compare {
  margin-top: 12px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.02);
}

.campaign-compare__row {
  display: grid;
  grid-template-columns: 88px 1fr auto;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.campaign-compare__row:last-child {
  margin-bottom: 0;
}

.campaign-compare__row span {
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.campaign-compare__track {
  height: 10px;
  border-radius: 999px;
  background: #0d1116;
  border: 1px solid var(--border);
  overflow: hidden;
}

.campaign-compare__bar {
  position: relative;
  height: 100%;
  min-width: 2px;
  border-radius: 999px;
}

.campaign-compare__bar--ctr {
  background: linear-gradient(90deg, #2f6fb3, #5da2ef);
}

.campaign-compare__bar--conv {
  background: linear-gradient(90deg, #df7f2f, #ffb266);
}

.campaign-compare__bar--low {
  background: linear-gradient(90deg, #a94141, #d86060);
}

.campaign-compare__bar--medium {
  background: linear-gradient(90deg, #b8842a, #e6b04f);
}

.campaign-compare__bar--high {
  background: linear-gradient(90deg, #2f8f63, #54c793);
}

.campaign-compare__bar:hover::after {
  content: attr(data-tooltip);
  position: absolute;
  left: 50%;
  bottom: calc(100% + 8px);
  transform: translateX(-50%);
  background: #0b0f14;
  color: #eef2f6;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 6px 8px;
  font-size: 11px;
  line-height: 1.3;
  white-space: nowrap;
  z-index: 2;
}

.campaign-compare__bar:hover::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: calc(100% + 3px);
  transform: translateX(-50%);
  border-width: 5px 5px 0 5px;
  border-style: solid;
  border-color: #0b0f14 transparent transparent transparent;
  z-index: 2;
}

.campaign-legend {
  margin-top: 12px;
  font-size: 12px;
  color: var(--muted);
}

.campaign-legend__item {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid var(--border);
}

.campaign-legend__item--high {
  color: #7fe1b6;
}

.campaign-legend__item--medium {
  color: #f2c167;
}

.campaign-legend__item--low {
  color: #e38383;
}

.category-share {
  margin-top: 8px;
}

.category-share__track {
  height: 10px;
  border-radius: 999px;
  background: #0d1116;
  border: 1px solid var(--border);
  overflow: hidden;
}

.category-share__bar {
  height: 100%;
  min-width: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, #2f6fb3, #54c793);
}

.trend-badge {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid var(--border);
  font-size: 11px;
  line-height: 1.2;
}

.trend-badge--up {
  color: #7fe1b6;
}

.trend-badge--down {
  color: #e38383;
}

.trend-badge--flat {
  color: #f2c167;
}

@media (max-width: 768px) {
  .site-nav {
    flex-direction: column;
    align-items: flex-start;
  }

  .nav-brand__logo {
    height: 28px;
    max-width: 150px;
  }

  .site-main {
    padding: 40px 20px 72px;
  }

  .kpi-inline {
    gap: 8px 10px;
    padding: 8px 10px;
  }

  .toolbar-actions .cta {
    width: 100%;
    justify-content: center;
  }

  .entitlement-card__actions .cta {
    width: 100%;
  }

  .page-hero {
    padding: 48px 24px;
  }

  .timeline-item {
    grid-template-columns: 1fr;
  }

  .page-cta {
    flex-direction: column;
    align-items: flex-start;
  }
}

.site-footer {
  max-width: 1100px;
  margin: 0 auto 24px;
  padding: 0 24px 10px;
}

.site-footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 13px;
  color: var(--muted);
  border-top: 1px solid var(--border);
  padding-top: 14px;
}

.cookie-banner {
  position: fixed;
  left: 20px;
  right: 20px;
  bottom: 18px;
  z-index: 60;
}

.cookie-banner__content {
  max-width: 880px;
  margin: 0 auto;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: linear-gradient(180deg, #1d232b, #151a21);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
  padding: 16px;
}

.cookie-banner__content h3 {
  margin: 0 0 6px 0;
  color: #ffffff;
}

.cookie-banner__content p {
  margin: 0 0 12px 0;
  color: var(--muted);
  font-size: 14px;
}

.cookie-banner__actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.cookie-banner__actions form,
.cookie-banner__customize {
  margin: 0;
}

.cookie-banner__customize {
  margin-top: 12px;
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 14px;
}

.cookie-btn {
  border: 1px solid var(--border);
  background: #212a35;
  color: #f3f6fb;
  border-radius: 8px;
  padding: 8px 12px;
  cursor: pointer;
  font-weight: 600;
}

.cookie-btn--primary {
  background: var(--accent);
  border-color: #2f6fb3;
}

.gdpr-form {
  margin-top: 20px;
  display: grid;
  gap: 14px;
}

.gdpr-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.gdpr-form input[type="text"],
.gdpr-form input[type="email"],
.gdpr-form select,
.gdpr-form textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #131920;
  color: #edf2f8;
  padding: 10px;
}

.gdpr-consent {
  display: flex;
  gap: 8px;
  align-items: flex-start;
}

.form-notices {
  border: 1px solid rgba(127, 225, 182, 0.35);
  background: rgba(127, 225, 182, 0.1);
  color: #c9f3df;
  border-radius: 8px;
  padding: 10px;
  margin-top: 10px;
}

@media (max-width: 768px) {
  .gdpr-grid {
    grid-template-columns: 1fr;
  }
}

.checkbox-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 14px;
}

.checkbox-grid label {
  display: inline-flex;
  gap: 8px;
  align-items: center;
}

@media (max-width: 768px) {
  .checkbox-grid {
    grid-template-columns: 1fr;
  }
}
