/* ============ DTF Studio — foglio di stile ============ */
:root {
  --paper: #FBFBF9;
  --ink: #16151A;
  --cyan: #00AEEF;
  --magenta: #EC008C;
  --yellow: #FFD400;
  --grey: #6E6D74;
  --line: #E4E3DE;
  --radius: 14px;
  --font-display: 'Unbounded', sans-serif;
  --font-body: 'Manrope', sans-serif;
  --font-mono: 'Space Mono', monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

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

body {
  font-family: var(--font-body);
  background: var(--paper);
  color: var(--ink);
  font-size: 17px;
  line-height: 1.65;
}

/* Barra CMYK — firma del sito */
.cmyk-bar {
  display: flex;
  height: 6px;
  width: 100%;
}
.cmyk-bar span { flex: 1; }
.cmyk-bar .c { background: var(--cyan); }
.cmyk-bar .m { background: var(--magenta); }
.cmyk-bar .y { background: var(--yellow); }
.cmyk-bar .k { background: var(--ink); }

/* ============ Navigazione ============ */
header {
  position: sticky;
  top: 0;
  background: rgba(251, 251, 249, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
  z-index: 100;
}
nav {
  max-width: 1100px;
  margin: 0 auto;
  padding: 18px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.logo {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.02em;
  text-decoration: none;
  color: var(--ink);
}
.logo em {
  font-style: normal;
  background: linear-gradient(90deg, var(--cyan), var(--magenta));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.nav-links { display: flex; gap: 18px; list-style: none; flex-wrap: nowrap; }
.nav-links a {
  text-decoration: none;
  color: var(--ink);
  font-weight: 600;
  font-size: 0.85rem;
  padding-bottom: 3px;
  border-bottom: 2px solid transparent;
  transition: border-color 0.2s;
  white-space: nowrap;
}
.nav-links a:hover, .nav-links a:focus-visible { border-bottom-color: var(--magenta); }
.nav-links a.active { border-bottom-color: var(--cyan); }
.nav-toggle { display: none; background: none; border: none; font-size: 1.6rem; cursor: pointer; color: var(--ink); }

/* ============ Hero ============ */
.hero {
  max-width: 1100px;
  margin: 0 auto;
  padding: 84px 24px 72px;
  position: relative;
  overflow: hidden;
}
.hero::after {
  content: '';
  position: absolute;
  right: -60px;
  top: 20px;
  width: 340px;
  height: 340px;
  background-image: radial-gradient(var(--magenta) 2.4px, transparent 2.6px);
  background-size: 18px 18px;
  opacity: 0.16;
  border-radius: 50%;
  pointer-events: none;
}
.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--grey);
  display: block;
  margin-bottom: 18px;
}
h1 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.5rem, 4.1vw, 3rem);
  line-height: 1.14;
  letter-spacing: -0.01em;
  max-width: 900px;
  white-space: normal;
  text-wrap: balance;
  overflow-wrap: break-word;
}
h1 .accent {
  background: linear-gradient(90deg, var(--cyan) 0%, var(--magenta) 55%, var(--yellow) 110%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero p.lead {
  margin-top: 24px;
  font-size: 1.15rem;
  max-width: 620px;
  color: #3B3A40;
}
.hero-cta { margin-top: 36px; display: flex; gap: 14px; flex-wrap: wrap; }

.btn {
  display: inline-block;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.98rem;
  padding: 14px 28px;
  border-radius: 999px;
  transition: transform 0.15s, box-shadow 0.15s;
}
.btn:hover, .btn:focus-visible { transform: translateY(-2px); }
.btn-primary {
  background: var(--ink);
  color: var(--paper);
  box-shadow: 4px 4px 0 var(--magenta);
}
.btn-primary:hover { box-shadow: 6px 6px 0 var(--magenta); }
.btn-ghost {
  border: 2px solid var(--ink);
  color: var(--ink);
}

/* ============ Sezioni ============ */
section { padding: 64px 0; }
.wrap { max-width: 1100px; margin: 0 auto; padding: 0 24px; }
h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.5rem, 3.4vw, 2.1rem);
  line-height: 1.2;
  margin-bottom: 14px;
  max-width: 700px;
}
h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.08rem;
  margin-bottom: 10px;
}
.section-intro { max-width: 640px; color: #3B3A40; margin-bottom: 40px; }

.alt { background: #F2F1EC; }

/* Griglia card */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 22px;
}
.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px 26px;
  position: relative;
  overflow: hidden;
}
.card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 4px;
}
.card:nth-child(3n+1)::before { background: var(--cyan); }
.card:nth-child(3n+2)::before { background: var(--magenta); }
.card:nth-child(3n)::before   { background: var(--yellow); }
.card p { font-size: 0.97rem; color: #3B3A40; }

/* Passi del processo */
.steps { counter-reset: step; display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 22px; }
.step {
  counter-increment: step;
  padding: 26px 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
}
.step::before {
  content: counter(step, decimal-leading-zero);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--magenta);
  display: block;
  margin-bottom: 12px;
}

/* Tabella comparativa */
.table-scroll { overflow-x: auto; }
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
th, td { padding: 14px 16px; text-align: left; border-bottom: 1px solid var(--line); }
th {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  background: var(--ink);
  color: var(--paper);
}
tr:last-child td { border-bottom: none; }
td strong { color: var(--ink); }

/* FAQ */
details {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  margin-bottom: 12px;
  padding: 4px 22px;
}
summary {
  cursor: pointer;
  font-weight: 700;
  padding: 16px 0;
  list-style: none;
  position: relative;
  padding-right: 34px;
}
summary::after {
  content: '+';
  position: absolute;
  right: 4px;
  font-family: var(--font-mono);
  color: var(--magenta);
  font-size: 1.2rem;
  transition: transform 0.2s;
}
details[open] summary::after { transform: rotate(45deg); }
details p { padding-bottom: 18px; color: #3B3A40; font-size: 0.97rem; }

/* Banda CTA */
.cta-band {
  background: var(--ink);
  color: var(--paper);
  border-radius: var(--radius);
  padding: 52px 40px;
  text-align: center;
}
.cta-band h2 { color: var(--paper); margin-left: auto; margin-right: auto; }
.cta-band p { color: #C9C8CE; max-width: 560px; margin: 12px auto 30px; }
.cta-band .btn-primary { background: var(--paper); color: var(--ink); box-shadow: 4px 4px 0 var(--cyan); }

/* Pagina contatti */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: start; }
.contact-info dt {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--grey);
  margin-top: 22px;
}
.contact-info dd { font-size: 1.05rem; font-weight: 600; margin-top: 4px; }
.contact-info a { color: var(--ink); }

form label {
  display: block;
  font-weight: 700;
  font-size: 0.92rem;
  margin: 18px 0 6px;
}
form input, form textarea {
  width: 100%;
  padding: 13px 15px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-family: var(--font-body);
  font-size: 1rem;
  background: var(--paper);
}
form input:focus, form textarea:focus {
  outline: 2px solid var(--cyan);
  outline-offset: 1px;
  border-color: var(--cyan);
}
form button {
  margin-top: 22px;
  border: none;
  cursor: pointer;
  font-family: var(--font-body);
}
.form-note { font-size: 0.85rem; color: var(--grey); margin-top: 14px; }

/* Articolo (pagina guida) */
.article { max-width: 760px; }
.article h2 { margin-top: 48px; }
.article p { margin-bottom: 18px; }
.article ul { margin: 0 0 18px 22px; }
.article li { margin-bottom: 8px; }

/* ============ Footer ============ */
footer {
  border-top: 1px solid var(--line);
  margin-top: 40px;
}
.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 40px 24px;
  display: flex;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  font-size: 0.9rem;
  color: var(--grey);
}
.footer-inner a { color: var(--ink); text-decoration: none; font-weight: 600; }
.footer-inner a:hover { color: var(--magenta); }
.footer-links { display: flex; gap: 20px; list-style: none; flex-wrap: wrap; }

/* ============ Responsive ============ */
@media (max-width: 1080px) {
  .nav-toggle { display: block; }
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    padding: 8px 24px 16px;
  }
  .nav-links.open { display: flex; }
  .nav-links li { padding: 10px 0; }
  .hero { padding: 56px 24px 48px; }
  .contact-grid { grid-template-columns: 1fr; }
  .cta-band { padding: 40px 24px; }
}

/* ---- Aggiunte v2: blog, note, tabelle prezzi ---- */
.blog-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 22px; }
.post-card { border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; background: var(--paper); display: flex; flex-direction: column; }
.post-card time { font-family: var(--font-mono); font-size: 0.75rem; color: var(--grey); text-transform: uppercase; letter-spacing: 0.1em; }
.post-card h3 { margin: 10px 0 8px; }
.post-card h3 a { color: var(--ink); text-decoration: none; }
.post-card h3 a:hover { color: var(--magenta); }
.post-card p { font-size: 0.95rem; color: #3B3A40; flex: 1; }
.post-card .read-more { margin-top: 14px; font-weight: 700; font-size: 0.9rem; color: var(--ink); text-decoration: none; border-bottom: 2px solid var(--cyan); align-self: flex-start; }
.note-box { border-left: 4px solid var(--yellow); background: #FDF9E7; padding: 16px 20px; border-radius: 0 10px 10px 0; margin: 22px 0; font-size: 0.95rem; }
.updated { font-family: var(--font-mono); font-size: 0.75rem; color: var(--grey); text-transform: uppercase; letter-spacing: 0.1em; }
.faq-section h2 { margin-bottom: 24px; }
.breadcrumb { font-size: 0.85rem; color: var(--grey); margin-bottom: 10px; }
.breadcrumb a { color: var(--grey); }

/* ---- Immagini responsive + fallback grazioso se il file manca ---- */
img { max-width: 100%; height: auto; display: block; }
.img-frame {
  border-radius: var(--radius);
  overflow: hidden;
  background: linear-gradient(135deg, #F2F1EC 25%, #E9E8E2 25%, #E9E8E2 50%, #F2F1EC 50%, #F2F1EC 75%, #E9E8E2 75%);
  background-size: 24px 24px;
  border: 1px solid var(--line);
  aspect-ratio: var(--ar, 16/10);
}
.img-frame img { width: 100%; height: 100%; object-fit: cover; }
.img-frame img.img-error { display: none; }
.img-caption { font-size: 0.85rem; color: var(--grey); margin-top: 8px; }

/* ---- Chi siamo ---- */
.value-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 22px; margin: 32px 0; }

/* ---- 404 ---- */
.error-page { text-align: center; padding: 90px 24px 100px; }
.error-code { font-family: var(--font-mono); font-size: clamp(3rem, 12vw, 6rem); font-weight: 700; background: linear-gradient(90deg, var(--cyan), var(--magenta), var(--yellow)); -webkit-background-clip: text; background-clip: text; color: transparent; line-height: 1; }

/* ---- Glossario ---- */
.glossario dt { font-family: var(--font-display); font-weight: 700; font-size: 1.05rem; margin-top: 26px; color: var(--ink); }
.glossario dd { margin: 6px 0 0; color: #3B3A40; }

/* Card del blog come link interi */
a.blog-card { text-decoration: none; color: var(--ink); display: block; }
a.blog-card h3 { margin: 10px 0 8px; }
a.blog-card:hover h3 { color: var(--magenta); }
a.blog-card .eyebrow { margin-bottom: 6px; }

/* ---- Articoli correlati ---- */
.related-section { border-top: 1px solid var(--line); margin-top: 48px; padding-top: 32px; }
.related-section h2 { font-size: 1.3rem; margin-bottom: 20px; }
.related-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.related-card {
  display: block;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 20px;
  text-decoration: none;
  color: var(--ink);
  background: var(--paper);
  transition: border-color 0.2s, transform 0.2s;
}
.related-card:hover { border-color: var(--cyan); transform: translateY(-2px); }
.related-card .related-eyebrow { font-family: var(--font-mono); font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--grey); display: block; margin-bottom: 6px; }
.related-card h3 { font-size: 0.98rem; line-height: 1.3; margin: 0; }
