/* LABNET — tema chiaro B2B. Layout principale: Tailwind (CDN). Qui: componenti + pagine interne. */

:root {
  --brand: #0891b2;
  --brand-dark: #0e7490;
  --brand-light: #ecfeff;
  --accent: #06b6d4;
  --text: #0f172a;
  --text-muted: #64748b;
  --bg: #ffffff;
  --bg-alt: #f8fafc;
  --border: #e2e8f0;
  --success: #0d7a4d;
  --shadow: 0 12px 40px rgba(8, 51, 68, 0.08);
  --radius: 12px;
  --max: 72rem;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

/* Pagine interne (non ancora migrate a sole utility Tailwind) */
body.labnet-legacy {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
}

body.labnet-legacy a:not(.btn) {
  color: var(--brand);
  text-decoration: none;
}

body.labnet-legacy a:not(.btn):hover {
  text-decoration: underline;
}

.container {
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 72px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text);
  text-decoration: none;
}

.logo-mark {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--brand), var(--accent));
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.logo small {
  display: block;
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--text-muted);
}

.nav-toggle {
  display: none;
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 8px;
  padding: 0.5rem 0.75rem;
  cursor: pointer;
  font: inherit;
  font-weight: 600;
  font-size: 0.9rem;
}

.site-nav ul {
  display: flex;
  align-items: center;
  gap: 1rem;
  list-style: none;
  margin: 0;
  padding: 0;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.site-nav a {
  color: var(--text);
  font-size: 0.92rem;
  font-weight: 600;
  text-decoration: none;
}

.site-nav a:hover {
  color: var(--brand);
  text-decoration: none;
}

.site-nav a.active {
  color: var(--brand);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn:hover {
  text-decoration: none;
  transform: translateY(-1px);
}

/* Pulsanti: priorità su link globali, menu e utility Tailwind (CDN) */
a.btn,
button.btn {
  text-decoration: none;
}

a.btn:hover,
button.btn:hover {
  text-decoration: none;
}

.btn.btn-primary,
a.btn.btn-primary,
button.btn.btn-primary {
  background-color: var(--brand-dark) !important;
  border-color: transparent !important;
  color: #fff !important;
  box-shadow: 0 8px 24px rgba(8, 145, 178, 0.25);
}

.btn.btn-primary:hover,
.btn.btn-primary:focus-visible,
a.btn.btn-primary:hover,
a.btn.btn-primary:focus-visible,
button.btn.btn-primary:hover,
button.btn.btn-primary:focus-visible {
  background-color: #0c6378 !important;
  color: #fff !important;
}

.site-nav a.btn-primary,
.site-nav a.btn-primary:hover,
.site-nav a.btn-primary.active {
  color: #fff !important;
}

.btn.btn-secondary,
a.btn.btn-secondary,
button.btn.btn-secondary {
  background-color: #fff !important;
  color: var(--brand-dark) !important;
  border-color: var(--border) !important;
}

.btn.btn-secondary:hover,
a.btn.btn-secondary:hover,
button.btn.btn-secondary:hover {
  color: var(--brand-dark) !important;
}


.page-hero {
  padding: 3rem 0 2rem;
  background: var(--bg-alt);
  border-bottom: 1px solid var(--border);
}

.page-hero h1 {
  margin: 0 0 0.75rem;
  font-size: clamp(1.8rem, 3vw, 2.6rem);
}

.page-hero p {
  margin: 0;
  color: var(--text-muted);
  max-width: 44rem;
}

.section {
  padding: 4rem 0;
}

.section-alt {
  background: var(--bg-alt);
}

.section-header {
  max-width: 42rem;
  margin-bottom: 2rem;
}

.section-header h2 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  margin: 0 0 0.75rem;
}

.section-header p {
  color: var(--text-muted);
  margin: 0;
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
}

.card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
}

.card h3 {
  margin-top: 0;
  font-size: 1.08rem;
}

.card p {
  color: var(--text-muted);
  margin-bottom: 0;
}

.card-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: var(--brand-light);
  color: var(--brand-dark);
  font-weight: 800;
  margin-bottom: 1rem;
}

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: start;
}

.list-check {
  list-style: none;
  padding: 0;
  margin: 0;
}

.list-check li {
  position: relative;
  padding-left: 1.75rem;
  margin-bottom: 0.75rem;
}

.list-check li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--success);
  font-weight: 700;
}

.module-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
}

.module-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
}

.module-card .tag {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
  margin-bottom: 0.75rem;
  line-height: 1.3;
  text-transform: none;
}

.tag-incluso {
  color: #0e7490;
  background: #ecfeff;
  border: 1px solid #a5f3fc;
}

.tag-opzionale {
  color: #475569;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
}

.tag-sempre {
  color: #1e40af;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
}

.price-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
}

.price-card.featured {
  border-color: var(--brand);
  box-shadow: var(--shadow);
}

.price-card h3 {
  margin-top: 0;
}

.price-note {
  color: var(--text-muted);
  font-size: 0.92rem;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

form {
  display: grid;
  gap: 1rem;
}

label {
  display: grid;
  gap: 0.35rem;
  font-weight: 600;
  font-size: 0.92rem;
}

.label-optional {
  font-weight: 600;
}

.field-hint {
  font-size: 0.8rem;
  font-weight: 400;
  color: var(--text-muted);
  line-height: 1.4;
}

input,
select,
textarea {
  width: 100%;
  padding: 0.75rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  font: inherit;
}

textarea {
  min-height: 140px;
  resize: vertical;
}

.privacy-box {
  padding: 0.85rem 1rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #f8fafc;
  font-size: 0.88rem;
  font-weight: 400;
  line-height: 1.5;
}

.privacy-box a {
  font-weight: 600;
}

.privacy-check {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  font-weight: 400;
  font-size: 0.88rem;
  line-height: 1.45;
}

.privacy-check input {
  width: auto;
  margin-top: 0.2rem;
  flex-shrink: 0;
}

.faq details {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1rem 1.25rem;
  margin-bottom: 0.75rem;
}

.faq summary {
  cursor: pointer;
  font-weight: 600;
}

.cta-band {
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  color: #fff;
  border-radius: calc(var(--radius) + 4px);
  padding: 2.5rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.cta-band p {
  margin: 0;
  opacity: 0.92;
}

.cta-band .btn.btn-primary,
.cta-band a.btn.btn-primary {
  background-color: #fff !important;
  color: var(--brand-dark) !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.cta-band .btn.btn-primary:hover,
.cta-band a.btn.btn-primary:hover {
  background-color: var(--brand-light) !important;
  color: var(--brand-dark) !important;
}

.site-footer {
  background: #020617;
  color: #cbd5e1;
  padding: 3rem 0 1.5rem;
  margin-top: 2rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 2rem;
}

.site-footer a {
  color: #cbd5e1;
}

.footer-bottom {
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 0.88rem;
  color: #94a3b8;
}

@media (max-width: 900px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }
}

/* Screenshot + lightbox (site.js) */
.screenshot-frame {
  position: relative;
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: linear-gradient(145deg, #f1f5f9, #e2e8f0);
  box-shadow: var(--shadow);
}

.screenshot-frame:not(.is-missing) {
  cursor: zoom-in;
}

.screenshot-frame:not(.is-missing)::after {
  content: "Clicca per ingrandire";
  position: absolute;
  right: 0.65rem;
  bottom: 0.65rem;
  padding: 0.35rem 0.65rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #fff;
  background: rgba(15, 23, 42, 0.72);
  border-radius: 6px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.screenshot-frame:not(.is-missing):hover::after,
.screenshot-frame:not(.is-missing):focus-visible::after {
  opacity: 1;
}

.screenshot-frame:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.screenshot-frame img {
  display: block;
  width: 100%;
  height: auto;
}

.screenshot-placeholder {
  display: none;
  min-height: 11rem;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 1.5rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.92rem;
}

.screenshot-placeholder small {
  font-family: ui-monospace, monospace;
  font-size: 0.75rem;
  opacity: 0.85;
}

.screenshot-frame.is-missing .screenshot-placeholder {
  display: flex;
}

.screenshot-frame.is-missing img {
  display: none;
}

body.screenshot-lightbox-open {
  overflow: hidden;
}

.screenshot-lightbox {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.screenshot-lightbox[hidden] {
  display: none !important;
}

.screenshot-lightbox__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.88);
}

.screenshot-lightbox__close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  z-index: 2;
  width: 2.75rem;
  height: 2.75rem;
  border: none;
  border-radius: 999px;
  font-size: 1.75rem;
  line-height: 1;
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  cursor: pointer;
}

.screenshot-lightbox__close:hover {
  background: rgba(255, 255, 255, 0.22);
}

.screenshot-lightbox__panel {
  position: relative;
  z-index: 1;
  margin: 0;
  max-width: min(96vw, 1400px);
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

.screenshot-lightbox__img {
  display: block;
  max-width: 100%;
  max-height: calc(92vh - 3rem);
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.45);
  background: #0f172a;
}

.screenshot-lightbox__caption {
  margin: 0;
  padding: 0 0.5rem;
  text-align: center;
  font-size: 0.95rem;
  color: #e2e8f0;
}

.screenshot-lightbox__caption[hidden] {
  display: none;
}

@media (max-width: 900px) {
  .split,
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .nav-toggle {
    display: inline-block;
  }

  .site-header {
    position: relative;
  }

  .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border-bottom: 1px solid var(--border);
    padding: 1rem;
    box-shadow: var(--shadow);
  }

  .site-nav.open {
    display: block;
  }

  .site-nav ul {
    flex-direction: column;
    align-items: stretch;
  }
}
