/* ==========================================================================
   IRSML — style.css
   Sistema di design condiviso (dark canvas, derivato da DESIGN-framer.md)
   Usato da tutte le pagine del sito irsml.it
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Token
   -------------------------------------------------------------------------- */
:root {
  /* Colori */
  --primary: #ffffff;
  --on-primary: #000000;
  --accent-blue: #0099ff;
  --ink: #ffffff;
  --ink-muted: #999999;
  --canvas: #090909;
  --surface-1: #141414;
  --surface-2: #1c1c1c;
  --hairline: #262626;
  --hairline-soft: #1a1a1a;
  --inverse-canvas: #ffffff;
  --inverse-ink: #000000;
  --gradient-magenta: #d44df0;
  --gradient-violet: #6a4cf5;
  --gradient-orange: #ff7a3d;
  --gradient-coral: #ff5577;
  --success: #22c55e;

  /* Raggi */
  --r-xs: 4px;
  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 15px;
  --r-xl: 20px;
  --r-xxl: 30px;
  --r-pill: 100px;
  --r-full: 9999px;

  /* Spaziature (base 5px) */
  --s-hair: 1px;
  --s-xxs: 4px;
  --s-xs: 8px;
  --s-sm: 12px;
  --s-md: 15px;
  --s-lg: 20px;
  --s-xl: 30px;
  --s-xxl: 40px;
  --s-section: 96px;

  /* Tipografia */
  --font-display: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  /* Layout */
  --container: 1180px;
  --measure: 760px;
}

/* --------------------------------------------------------------------------
   2. Reset
   -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 400;
  line-height: 1.55;
  letter-spacing: -0.15px;
  font-feature-settings: "cv01", "cv05", "cv09", "cv11", "ss03", "ss07";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, svg { max-width: 100%; }
img { height: auto; display: block; }

h1, h2, h3, h4, h5, h6 { margin: 0 0 var(--s-md); font-family: var(--font-display); }
p { margin: 0 0 var(--s-md); }
ul, ol { margin: 0 0 var(--s-md); padding-left: 1.15em; }
li { margin-bottom: var(--s-xs); }
table { border-collapse: collapse; width: 100%; }

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

:focus-visible {
  outline: 2px solid var(--accent-blue);
  outline-offset: 3px;
  border-radius: var(--r-xs);
}

/* --------------------------------------------------------------------------
   3. Tipografia
   -------------------------------------------------------------------------- */
.display-xxl {
  font-size: clamp(38px, 8.2vw, 96px);
  font-weight: 600;
  line-height: 0.92;
  letter-spacing: -0.05em;
}
.display-xl {
  font-size: clamp(32px, 6vw, 72px);
  font-weight: 600;
  line-height: 0.98;
  letter-spacing: -0.05em;
}
.display-lg {
  font-size: clamp(29px, 4.6vw, 56px);
  font-weight: 600;
  line-height: 1.02;
  letter-spacing: -0.05em;
}
.display-md {
  font-size: clamp(23px, 2.6vw, 32px);
  font-weight: 600;
  line-height: 1.13;
  letter-spacing: -0.032em;
}
.headline {
  font-size: 21px;
  font-weight: 700;
  line-height: 1.22;
  letter-spacing: -0.036px;
  letter-spacing: -0.036em;
}
.subhead {
  font-size: clamp(18px, 2vw, 23px);
  font-weight: 400;
  line-height: 1.32;
  letter-spacing: -0.012em;
}
.body-lg {
  font-size: clamp(16px, 1.4vw, 18px);
  font-weight: 400;
  line-height: 1.52;
  letter-spacing: -0.01em;
}
.body-sm { font-size: 14px; font-weight: 500; line-height: 1.45; }
.caption {
  font-size: 13px;
  font-weight: 500;
  line-height: 1.25;
  letter-spacing: -0.01em;
}
.micro { font-size: 12px; font-weight: 400; line-height: 1.3; }

.muted { color: var(--ink-muted); }
.measure { max-width: var(--measure); }
.center { margin-left: auto; margin-right: auto; }
.eyebrow {
  display: inline-block;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: var(--s-md);
}

/* --------------------------------------------------------------------------
   4. Layout
   -------------------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding-left: var(--s-lg);
  padding-right: var(--s-lg);
}

main > section {
  padding-top: 64px;
  padding-bottom: 64px;
  border-top: 1px solid var(--hairline-soft);
}
main > section:first-child { border-top: 0; }

.section-head { max-width: var(--measure); margin-bottom: var(--s-xxl); }
.section-head p:last-child { margin-bottom: 0; }

.prose { max-width: var(--measure); }
.prose h2 { margin-top: var(--s-xxl); }
.prose h3 { margin-top: var(--s-xl); }
.prose h2:first-child, .prose h3:first-child { margin-top: 0; }
.prose ul, .prose ol { color: var(--ink-muted); }
.prose ul strong, .prose ol strong { color: var(--ink); }
.prose p { color: var(--ink-muted); }
.prose p strong { color: var(--ink); font-weight: 600; }

.grid { display: grid; gap: var(--s-lg); }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

/* --------------------------------------------------------------------------
   5. Icone SVG
   -------------------------------------------------------------------------- */
.icon {
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  vertical-align: middle;
  color: currentColor;
}
.icon-sm { width: 17px; height: 17px; }
.icon-lg { width: 28px; height: 28px; }

.icon-tile {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--r-md);
  background: var(--surface-2);
  color: var(--ink);
  margin-bottom: var(--s-md);
}

/* --------------------------------------------------------------------------
   6. Pulsanti
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--s-xs);
  min-height: 44px;
  padding: 11px 20px;
  border: 0;
  border-radius: var(--r-pill);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  transition: transform .15s ease, background-color .15s ease, opacity .15s ease;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: scale(.97); }

.btn-primary { background: var(--primary); color: var(--on-primary); }
.btn-primary:hover { opacity: .88; }

.btn-secondary { background: var(--surface-1); color: var(--ink); }
.btn-secondary:hover { background: var(--surface-2); }

.btn-translucent {
  background: rgba(255, 255, 255, .16);
  color: var(--ink);
  border-radius: var(--r-xxl);
  padding: 10px 18px;
}
.btn-translucent:hover { background: rgba(255, 255, 255, .26); }

.btn-row { display: flex; flex-wrap: wrap; gap: var(--s-sm); align-items: center; }

/* --------------------------------------------------------------------------
   7. Header / navigazione
   -------------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(9, 9, 9, .88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--hairline-soft);
}

.site-nav {
  max-width: var(--container);
  margin: 0 auto;
  padding: var(--s-sm) var(--s-lg);
  display: flex;
  align-items: center;
  gap: var(--s-lg);
  min-height: 56px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: var(--s-xs);
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.03em;
  text-decoration: none;
  flex: 0 0 auto;
}
.logo:hover { text-decoration: none; }
.logo .logo-mark { width: 26px; height: 26px; }

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--s-lg);
  list-style: none;
  margin: 0 auto 0 var(--s-md);
  padding: 0;
}
.nav-links li { margin: 0; }
.nav-links a {
  color: var(--ink-muted);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.01em;
  text-decoration: none;
  white-space: nowrap;
}
.nav-links a:hover { color: var(--ink); text-decoration: none; }

.nav-actions { display: flex; align-items: center; gap: var(--s-xs); flex: 0 0 auto; }

.nav-toggle-checkbox { position: absolute; opacity: 0; pointer-events: none; }
.nav-toggle-label {
  display: none;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  border-radius: var(--r-full);
  background: var(--surface-1);
  color: var(--ink);
  cursor: pointer;
}

/* --------------------------------------------------------------------------
   8. Card e superfici
   -------------------------------------------------------------------------- */
.card {
  background: var(--surface-1);
  border: 1px solid var(--hairline);
  border-radius: var(--r-lg);
  padding: var(--s-lg);
}
.card h3 { margin-bottom: var(--s-xs); }
.card p { color: var(--ink-muted); margin-bottom: 0; }
.card p + p { margin-top: var(--s-sm); }

.card-link {
  display: block;
  color: inherit;
  text-decoration: none;
  transition: background-color .15s ease, border-color .15s ease;
}
.card-link:hover {
  background: var(--surface-2);
  border-color: var(--hairline);
  text-decoration: none;
}
.card-link .card-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: var(--s-md);
  color: var(--accent-blue);
  font-size: 14px;
  font-weight: 500;
}

.mockup-tile {
  background: var(--surface-1);
  border: 1px solid var(--hairline);
  border-radius: var(--r-xl);
  padding: var(--s-md);
}
.mockup-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding-bottom: var(--s-sm);
  margin-bottom: var(--s-sm);
  border-bottom: 1px solid var(--hairline);
}
.mockup-dot { width: 9px; height: 9px; border-radius: var(--r-full); background: var(--hairline); }
.mockup-title { margin-left: var(--s-xs); font-size: 12px; color: var(--ink-muted); }
.mockup-canvas {
  background: var(--canvas);
  border-radius: var(--r-md);
  padding: var(--s-md);
}

.spotlight {
  border-radius: var(--r-xxl);
  padding: clamp(24px, 4vw, 40px);
  color: #fff;
}
.spotlight h2, .spotlight h3 { color: #fff; }
.spotlight p { color: rgba(255, 255, 255, .86); }
.spotlight a:not(.btn) { color: #fff; text-decoration: underline; }
.spotlight-violet {
  background: linear-gradient(135deg, #6a4cf5 0%, #8f5cf0 55%, #b45cf0 100%);
}
.spotlight-magenta {
  background: linear-gradient(135deg, #d44df0 0%, #e2508f 60%, #ff5577 100%);
}
.spotlight-orange {
  background: linear-gradient(135deg, #ff7a3d 0%, #ff5577 70%, #d44df0 100%);
}
.spotlight .btn-primary { background: #fff; color: #000; }

/* --------------------------------------------------------------------------
   9. Liste con icone
   -------------------------------------------------------------------------- */
.icon-list { list-style: none; margin: 0; padding: 0; }
.icon-list li {
  display: flex;
  gap: var(--s-sm);
  align-items: flex-start;
  margin-bottom: var(--s-sm);
  color: var(--ink-muted);
}
.icon-list li strong { color: var(--ink); font-weight: 600; }
.icon-list .icon { margin-top: 2px; }
.icon-list .ok { color: var(--success); }
.icon-list .no { color: var(--ink-muted); }

.step-list { list-style: none; counter-reset: step; margin: 0; padding: 0; }
.step-list > li {
  counter-increment: step;
  position: relative;
  padding-left: 52px;
  margin-bottom: var(--s-xl);
}
.step-list > li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--r-full);
  background: var(--surface-2);
  border: 1px solid var(--hairline);
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
}
.step-list h3 { margin-bottom: 6px; }
.step-list p { color: var(--ink-muted); margin-bottom: 0; }

/* --------------------------------------------------------------------------
   10. Tabelle di confronto
   -------------------------------------------------------------------------- */
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--hairline);
  border-radius: var(--r-lg);
  -webkit-overflow-scrolling: touch;
}
.table-wrap table { min-width: 560px; background: var(--canvas); }
.table-wrap caption {
  caption-side: top;
  text-align: left;
  padding: var(--s-md) var(--s-md) 0;
  color: var(--ink-muted);
  font-size: 13px;
}
.table-wrap th, .table-wrap td {
  padding: 14px var(--s-md);
  text-align: left;
  font-size: 14px;
  border-bottom: 1px solid var(--hairline-soft);
  vertical-align: top;
}
.table-wrap thead th {
  color: var(--ink);
  font-weight: 600;
  background: var(--surface-1);
  white-space: nowrap;
}
.table-wrap tbody th { color: var(--ink); font-weight: 500; }
.table-wrap tbody td { color: var(--ink-muted); }
.table-wrap tbody tr:last-child th,
.table-wrap tbody tr:last-child td { border-bottom: 0; }

/* --------------------------------------------------------------------------
   11. FAQ
   -------------------------------------------------------------------------- */
.faq-list { border-top: 1px solid var(--hairline-soft); max-width: 900px; }
.faq-row {
  border-bottom: 1px solid var(--hairline-soft);
  background: var(--canvas);
  border-radius: var(--r-md);
}
.faq-row summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-md);
  padding: var(--s-lg) var(--s-xs);
  cursor: pointer;
  list-style: none;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.faq-row summary::-webkit-details-marker { display: none; }
.faq-row summary:hover { color: var(--ink); }
.faq-row .chevron { transition: transform .2s ease; color: var(--ink-muted); }
.faq-row[open] .chevron { transform: rotate(180deg); }
.faq-row .faq-answer { padding: 0 var(--s-xs) var(--s-lg); color: var(--ink-muted); max-width: var(--measure); }
.faq-row .faq-answer p:last-child { margin-bottom: 0; }

/* --------------------------------------------------------------------------
   12. Prezzi
   -------------------------------------------------------------------------- */
.pricing-switch { display: flex; gap: var(--s-xxs); padding: var(--s-xxs); background: var(--surface-1); border-radius: var(--r-pill); }
.pricing-switch label {
  padding: 9px 16px;
  border-radius: var(--r-pill);
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-muted);
  cursor: pointer;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
}
.pricing-radio { position: absolute; opacity: 0; pointer-events: none; }
.pricing-card {
  background: var(--surface-1);
  border: 1px solid var(--hairline);
  border-radius: var(--r-xl);
  padding: var(--s-xl);
  display: flex;
  flex-direction: column;
}
.pricing-card-featured { background: var(--surface-2); }
.pricing-card .price { font-family: var(--font-display); font-size: 44px; font-weight: 600; letter-spacing: -0.045em; line-height: 1; margin: var(--s-md) 0 var(--s-xs); }
.pricing-card .price small { font-size: 14px; font-weight: 500; letter-spacing: -0.01em; color: var(--ink-muted); }
.pricing-card .icon-list { margin: var(--s-lg) 0; flex: 1 1 auto; }
.pricing-card .badge { align-self: flex-start; }
.pricing-card .btn { justify-content: center; }
.pricing-card .btn-secondary { background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--hairline); }
.pricing-card .btn-secondary:hover { background: var(--hairline); }
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border-radius: var(--r-pill);
  background: var(--surface-2);
  border: 1px solid var(--hairline);
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-muted);
}
.badge-featured { background: var(--primary); color: var(--on-primary); border-color: var(--primary); }

/* --------------------------------------------------------------------------
   13. Footer
   -------------------------------------------------------------------------- */
.site-footer {
  background: var(--canvas);
  border-top: 1px solid var(--hairline-soft);
  padding: 64px 0 var(--s-xxl);
  color: var(--ink-muted);
  font-size: 13px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: var(--s-xl);
  margin-bottom: var(--s-xxl);
}
.footer-brand p { max-width: 320px; color: var(--ink-muted); font-size: 13px; }
.footer-col h2 {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin-bottom: var(--s-sm);
  font-family: var(--font-body);
}
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col li { margin-bottom: var(--s-xs); }
.footer-col a { color: var(--ink-muted); text-decoration: none; }
.footer-col a:hover { color: var(--ink); text-decoration: none; }
.footer-bottom {
  border-top: 1px solid var(--hairline-soft);
  padding-top: var(--s-lg);
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-sm) var(--s-lg);
  justify-content: space-between;
  align-items: center;
}
.footer-bottom p { margin: 0; }
.footer-bottom a { color: var(--ink-muted); }

/* --------------------------------------------------------------------------
   14. Breadcrumb
   -------------------------------------------------------------------------- */
.breadcrumb { padding-top: var(--s-lg); }
.breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-xs);
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 13px;
  color: var(--ink-muted);
}
.breadcrumb li { margin: 0; display: flex; align-items: center; gap: var(--s-xs); }
.breadcrumb li + li::before { content: "/"; color: var(--hairline); }
.breadcrumb a { color: var(--ink-muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--ink); }

/* --------------------------------------------------------------------------
   15. Form
   -------------------------------------------------------------------------- */
.field { margin-bottom: var(--s-md); }
.field label {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink);
}
.field input,
.field select,
.field textarea {
  width: 100%;
  background: var(--surface-1);
  color: var(--ink);
  border: 1px solid var(--hairline);
  border-radius: var(--r-md);
  padding: 12px 14px;
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.4;
}
.field textarea { min-height: 150px; resize: vertical; }
.field input::placeholder, .field textarea::placeholder { color: #6b6b6b; }
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 3px rgba(0, 153, 255, .18);
}
.field-hint { font-size: 12px; color: var(--ink-muted); margin-top: 6px; }
.field-check { display: flex; gap: var(--s-sm); align-items: flex-start; }
.field-check input { width: 18px; height: 18px; margin-top: 2px; flex: 0 0 auto; }
.field-check label { font-size: 13px; font-weight: 400; color: var(--ink-muted); }

/* --------------------------------------------------------------------------
   16. Blocchi ricorrenti delle pagine interne
   -------------------------------------------------------------------------- */
.page-hero { padding-top: var(--s-xl); padding-bottom: 56px; }
.page-hero h1 { margin: var(--s-xs) 0 var(--s-lg); max-width: 20ch; }
.page-hero .eyebrow { margin-top: var(--s-lg); margin-bottom: 0; }

.cta-banner {
  display: grid;
  grid-template-columns: 1.3fr .7fr;
  gap: var(--s-xl);
  align-items: center;
}
.cta-banner h2 { margin-bottom: var(--s-sm); }
.cta-banner p { margin-bottom: 0; }

@media (max-width: 980px) {
  .cta-banner { grid-template-columns: minmax(0, 1fr); }
  .page-hero h1 { max-width: none; }
}

/* --------------------------------------------------------------------------
   17. Utility
   -------------------------------------------------------------------------- */
.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
.stack-lg > * + * { margin-top: var(--s-lg); }
.mt-xl { margin-top: var(--s-xl); }
.mb-0 { margin-bottom: 0; }
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-muted);
  text-decoration: none;
}
.back-link:hover { color: var(--ink); text-decoration: none; }

/* --------------------------------------------------------------------------
   18. Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 980px) {
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: var(--s-lg); }
}

@media (max-width: 810px) {
  main > section { padding-top: 48px; padding-bottom: 48px; }

  .nav-toggle-label { display: flex; }
  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    margin: 0;
    padding: var(--s-xs) var(--s-lg) var(--s-lg);
    background: var(--canvas);
    border-bottom: 1px solid var(--hairline);
    display: none;
  }
  .nav-links li { width: 100%; }
  .nav-links a {
    display: block;
    width: 100%;
    padding: 13px 0;
    font-size: 16px;
    color: var(--ink);
    border-bottom: 1px solid var(--hairline-soft);
  }
  .nav-toggle-checkbox:checked ~ .nav-links { display: flex; }
  .site-nav { position: relative; flex-wrap: wrap; }
  .nav-actions { margin-left: auto; }
}

@media (max-width: 640px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: minmax(0, 1fr); }
  .footer-grid { grid-template-columns: 1fr; }
  .container { padding-left: var(--s-md); padding-right: var(--s-md); }
  .step-list > li { padding-left: 46px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
