/* =========================================================================
   PECGIL - Foglio di stile unico
   Sito statico, nessuna dipendenza esterna (font di sistema, zero CDN).
   Progettato per CSP rigida: default-src 'self'; script-src 'none'.
   ========================================================================= */

/* ---- Design tokens --------------------------------------------------- */
:root {
  --red: #c8102e;
  --red-600: #b00e28;
  --red-700: #8f0b20;
  --red-tint: #fdeef0;
  --ink: #0f172a;
  --slate-700: #334155;
  --slate-600: #475569;
  --slate-500: #64748b;
  --slate-400: #94a3b8;
  --slate-300: #cbd5e1;
  --slate-200: #e2e8f0;
  --slate-100: #f1f5f9;
  --slate-50:  #f8fafc;
  --white: #ffffff;
  --green: #0f9d58;
  --amber: #b45309;
  --amber-tint: #fff7ed;

  --maxw: 1120px;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .06), 0 1px 3px rgba(15, 23, 42, .08);
  --shadow: 0 4px 6px -1px rgba(15, 23, 42, .08), 0 10px 25px -5px rgba(15, 23, 42, .10);
  --shadow-lg: 0 20px 45px -12px rgba(15, 23, 42, .22);

  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* ---- Reset ----------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font);
  color: var(--slate-700);
  background: var(--white);
  line-height: 1.65;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--red-600); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { color: var(--ink); line-height: 1.2; letter-spacing: -.02em; font-weight: 700; }
h1 { font-size: clamp(2rem, 1.3rem + 3vw, 3.1rem); }
h2 { font-size: clamp(1.5rem, 1.1rem + 1.6vw, 2.1rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1rem; }
ul, ol { margin: 0 0 1rem; padding-left: 1.3rem; }
li { margin: .35rem 0; }
strong { color: var(--slate-700); font-weight: 650; }

/* ---- Accessibility --------------------------------------------------- */
.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 200;
  background: var(--ink); color: #fff; padding: .7rem 1.1rem; border-radius: 0 0 10px 0;
}
.skip-link:focus { left: 0; text-decoration: none; }
:focus-visible { outline: 3px solid var(--red); outline-offset: 2px; border-radius: 4px; }

/* ---- Layout ---------------------------------------------------------- */
.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: 20px; }
.section { padding: clamp(3rem, 2rem + 4vw, 5.5rem) 0; }
.section--tint { background: var(--slate-50); }
.eyebrow {
  display: inline-block; font-size: .78rem; font-weight: 700; letter-spacing: .12em;
  text-transform: uppercase; color: var(--red-600); margin-bottom: .6rem;
}
.lede { font-size: 1.15rem; color: var(--slate-600); max-width: 60ch; }
.section-head { max-width: 62ch; margin-bottom: 2.4rem; }

/* ---- Header / Nav (menu mobile senza JS, checkbox hack) -------------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255, 255, 255, .88);
  backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--slate-200);
}
.nav { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 68px; }
.brand { display: flex; align-items: center; gap: .65rem; font-weight: 800; color: var(--ink); letter-spacing: -.02em; }
.brand:hover { text-decoration: none; }
.brand__logo { width: 38px; height: 38px; flex: none; }
.brand__name { font-size: 1.28rem; }
.brand__name span { color: var(--red); }
.brand__tag { display: block; font-size: .62rem; letter-spacing: .14em; text-transform: uppercase; color: var(--slate-500); font-weight: 700; }

.nav-toggle { display: none; }
.nav-burger {
  display: none; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: 10px; cursor: pointer;
  border: 1px solid var(--slate-200); background: #fff; color: var(--ink);
}
.nav-burger svg { width: 22px; height: 22px; }

.nav-links { display: flex; align-items: center; gap: .3rem; list-style: none; margin: 0; padding: 0; }
.nav-links a {
  display: inline-block; padding: .5rem .8rem; border-radius: 9px;
  color: var(--slate-600); font-weight: 550; font-size: .97rem;
}
.nav-links a:hover { background: var(--slate-100); color: var(--ink); text-decoration: none; }
.nav-links a.is-active { color: var(--red-600); }
.nav-links a.is-active::after { content: ""; display: block; height: 2px; background: var(--red); border-radius: 2px; margin-top: 3px; }
.nav-links .btn { color: #fff; }
.nav-links .btn:hover { color: #fff; background: var(--red-600); }

/* ---- Buttons --------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .72rem 1.25rem; border-radius: 11px; font-weight: 650; font-size: .98rem;
  border: 1px solid transparent; cursor: pointer; transition: transform .06s ease, background .15s ease, box-shadow .15s ease;
  white-space: nowrap;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--red); color: #fff; box-shadow: 0 4px 14px -4px rgba(200, 16, 46, .5); }
.btn--primary:hover { background: var(--red-600); color: #fff; }
.btn--ghost { background: #fff; color: var(--ink); border-color: var(--slate-300); }
.btn--ghost:hover { background: var(--slate-50); border-color: var(--slate-400); }
.btn--lg { padding: .9rem 1.6rem; font-size: 1.05rem; }
.btn svg { width: 18px; height: 18px; flex: none; }

/* ---- Hero ------------------------------------------------------------ */
.hero {
  position: relative; overflow: hidden;
  background:
    radial-gradient(900px 420px at 88% -8%, var(--red-tint), transparent 60%),
    linear-gradient(180deg, #fff 0%, var(--slate-50) 100%);
  border-bottom: 1px solid var(--slate-200);
}
.hero__inner { display: grid; grid-template-columns: 1.15fr .85fr; gap: 3rem; align-items: center; padding: clamp(3rem, 2rem + 5vw, 6rem) 0; }
.hero h1 { margin-bottom: 1.1rem; }
.hero .lede { margin-bottom: 1.8rem; }
.hero__actions { display: flex; flex-wrap: wrap; gap: .8rem; }
.hero__badges { display: flex; flex-wrap: wrap; gap: 1.2rem; margin-top: 2rem; color: var(--slate-500); font-size: .9rem; }
.hero__badges span { display: inline-flex; align-items: center; gap: .45rem; }
.hero__badges svg { width: 18px; height: 18px; color: var(--green); }

/* Hero visual: scheda certificato stilizzata */
.hero__art {
  background: #fff; border: 1px solid var(--slate-200); border-radius: 20px;
  box-shadow: var(--shadow-lg); padding: 1.6rem; position: relative;
}
.hero__art-bar { display: flex; align-items: center; gap: .5rem; padding-bottom: 1rem; border-bottom: 1px solid var(--slate-100); margin-bottom: 1rem; }
.hero__art-dot { width: 11px; height: 11px; border-radius: 50%; background: var(--slate-200); }
.hero__art-row { display: flex; align-items: center; gap: .8rem; padding: .7rem 0; }
.hero__art-ico { width: 40px; height: 40px; border-radius: 10px; background: var(--red-tint); color: var(--red); display: grid; place-items: center; flex: none; }
.hero__art-ico svg { width: 22px; height: 22px; }
.hero__art-line { height: 9px; border-radius: 6px; background: var(--slate-100); }
.hero__art-stamp {
  position: absolute; right: 18px; bottom: 16px; display: inline-flex; align-items: center; gap: .4rem;
  color: var(--green); font-weight: 700; font-size: .85rem; background: #ecfdf3; border: 1px solid #abefc6;
  padding: .3rem .7rem; border-radius: 999px;
}
.hero__art-stamp svg { width: 16px; height: 16px; }

/* ---- Cards / grids --------------------------------------------------- */
.grid { display: grid; gap: 1.4rem; }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.card {
  background: #fff; border: 1px solid var(--slate-200); border-radius: var(--radius);
  padding: 1.6rem; box-shadow: var(--shadow-sm); transition: box-shadow .18s ease, transform .18s ease, border-color .18s ease;
}
.card--hover:hover { box-shadow: var(--shadow); transform: translateY(-3px); border-color: var(--slate-300); }
.card__ico { width: 46px; height: 46px; border-radius: 12px; background: var(--red-tint); color: var(--red); display: grid; place-items: center; margin-bottom: 1rem; }
.card__ico svg { width: 24px; height: 24px; }
.card h3 { margin-bottom: .5rem; }
.card p:last-child { margin-bottom: 0; }

/* ---- Document / download links -------------------------------------- */
.doclist { list-style: none; padding: 0; margin: 0; display: grid; gap: .7rem; }
.doclist li { margin: 0; }
.doc {
  display: flex; align-items: center; gap: .9rem; padding: .9rem 1.1rem;
  background: #fff; border: 1px solid var(--slate-200); border-radius: var(--radius-sm);
  color: var(--slate-700); font-weight: 550; transition: border-color .15s ease, background .15s ease;
}
.doc:hover { text-decoration: none; border-color: var(--red); background: var(--red-tint); }
.doc__ico { width: 40px; height: 40px; border-radius: 9px; background: var(--slate-100); color: var(--red); display: grid; place-items: center; flex: none; }
.doc:hover .doc__ico { background: #fff; }
.doc__ico svg { width: 20px; height: 20px; }
.doc__meta { display: flex; flex-direction: column; line-height: 1.3; min-width: 0; }
.doc__meta small { color: var(--slate-500); font-weight: 500; font-size: .8rem; }
.doc__arrow { margin-left: auto; color: var(--slate-400); flex: none; }
.doc:hover .doc__arrow { color: var(--red); }
.doc__arrow svg { width: 18px; height: 18px; }

/* ---- Steps ----------------------------------------------------------- */
.steps { counter-reset: step; display: grid; gap: 1.2rem; list-style: none; padding: 0; margin: 0; }
.steps > li { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 1.1rem; align-items: start; }
.steps > li::before {
  counter-increment: step; content: counter(step);
  width: 42px; height: 42px; border-radius: 50%; flex: none;
  background: var(--red); color: #fff; font-weight: 700; font-size: 1.1rem;
  display: grid; place-items: center;
}
.step__body { background: #fff; border: 1px solid var(--slate-200); border-radius: var(--radius-sm); padding: 1.1rem 1.3rem; box-shadow: var(--shadow-sm); }
.step__body h3 { margin-bottom: .3rem; }
.step__body p:last-child, .step__body ul:last-child { margin-bottom: 0; }

/* ---- Pricing --------------------------------------------------------- */
.plans { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.2rem; align-items: stretch; }
.plan {
  background: #fff; border: 1px solid var(--slate-200); border-radius: var(--radius);
  padding: 1.5rem; display: flex; flex-direction: column; box-shadow: var(--shadow-sm);
  transition: box-shadow .18s ease, transform .18s ease;
}
.plan--featured { border-color: var(--red); box-shadow: var(--shadow); position: relative; }
.plan--featured::before {
  content: "Più completa"; position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
  background: var(--red); color: #fff; font-size: .72rem; font-weight: 700; letter-spacing: .06em;
  text-transform: uppercase; padding: .28rem .8rem; border-radius: 999px; white-space: nowrap;
}
.plan__name { font-size: 1.15rem; font-weight: 700; color: var(--ink); }
.plan__price { margin: .6rem 0 .2rem; font-size: 2.2rem; font-weight: 800; color: var(--ink); letter-spacing: -.03em; }
.plan__price small { font-size: .9rem; font-weight: 600; color: var(--slate-500); letter-spacing: 0; }
.plan__note { font-size: .82rem; color: var(--slate-500); margin-bottom: 1rem; }
.plan__feats { list-style: none; padding: 0; margin: 0 0 1.3rem; display: grid; gap: .55rem; font-size: .93rem; }
.plan__feats li { display: grid; grid-template-columns: auto 1fr; gap: .55rem; margin: 0; color: var(--slate-600); }
.plan__feats svg { width: 18px; height: 18px; color: var(--green); flex: none; margin-top: .15rem; }
.plan .btn { margin-top: auto; justify-content: center; }

/* ---- Tables ---------------------------------------------------------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--slate-200); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
table.data { width: 100%; border-collapse: collapse; background: #fff; min-width: 420px; }
table.data caption { text-align: left; font-weight: 700; color: var(--ink); padding: 1rem 1.1rem .2rem; font-size: 1.05rem; }
table.data th, table.data td { padding: .85rem 1.1rem; text-align: left; border-bottom: 1px solid var(--slate-100); }
table.data thead th { background: var(--slate-50); color: var(--slate-600); font-size: .82rem; text-transform: uppercase; letter-spacing: .05em; }
table.data tbody tr:last-child td { border-bottom: none; }
table.data tbody tr:hover { background: var(--slate-50); }
table.data td.price { font-weight: 700; color: var(--ink); white-space: nowrap; }

/* ---- Callout / notice ------------------------------------------------ */
.notice {
  display: flex; gap: 1rem; align-items: flex-start;
  background: var(--amber-tint); border: 1px solid #fed7aa; border-left: 4px solid #f59e0b;
  border-radius: var(--radius-sm); padding: 1.2rem 1.3rem; color: #7c2d12;
}
.notice svg { width: 24px; height: 24px; color: var(--amber); flex: none; margin-top: .1rem; }
.notice h3 { color: #7c2d12; margin-bottom: .3rem; font-size: 1.05rem; }
.notice p:last-child { margin-bottom: 0; }
.notice a { color: var(--amber); font-weight: 650; }

/* ---- CTA band -------------------------------------------------------- */
.cta {
  background: linear-gradient(135deg, var(--ink) 0%, #1e293b 100%);
  color: #fff; border-radius: var(--radius); padding: clamp(2rem, 1.4rem + 3vw, 3.4rem);
  text-align: center; position: relative; overflow: hidden;
}
.cta::before { content: ""; position: absolute; inset: 0; background: radial-gradient(600px 240px at 80% 0%, rgba(200,16,46,.35), transparent 60%); pointer-events: none; }
.cta h2 { color: #fff; position: relative; }
.cta p { color: var(--slate-300); position: relative; max-width: 55ch; margin-inline: auto; }
.cta .btn { position: relative; }

/* CTA a due colonne: testo a sinistra, icona a destra */
.cta--split { display: grid; grid-template-columns: 1fr auto; gap: 2.4rem; align-items: center; text-align: left; }
.cta--split .cta__text { position: relative; }
.cta--split .cta__text p { margin-inline: 0; }
.cta__icon {
  position: relative; flex: none; display: block; justify-self: end;
  background: #fff; border-radius: 18px; padding: 1.3rem 1.6rem;
  box-shadow: 0 18px 40px -16px rgba(0, 0, 0, .55); transition: transform .18s ease, box-shadow .18s ease;
}
.cta__icon:hover { transform: translateY(-4px); box-shadow: 0 24px 50px -16px rgba(0, 0, 0, .6); }
.cta__icon img { width: 150px; height: auto; }
@media (max-width: 680px) {
  .cta--split { grid-template-columns: 1fr; text-align: center; gap: 1.6rem; }
  .cta--split .cta__text p { margin-inline: auto; }
  .cta__icon { justify-self: center; }
  .cta__icon img { width: 130px; }
}

/* ---- Page hero (sottopagine) ---------------------------------------- */
.page-hero { background: linear-gradient(180deg, #fff 0%, var(--slate-50) 100%); border-bottom: 1px solid var(--slate-200); padding: clamp(2.4rem, 1.8rem + 3vw, 4rem) 0; }
.breadcrumb { font-size: .85rem; color: var(--slate-500); margin-bottom: .8rem; }
.breadcrumb a { color: var(--slate-500); }
.breadcrumb a:hover { color: var(--red); }

/* ---- Prose ----------------------------------------------------------- */
.prose { max-width: 72ch; }
.prose h2 { margin: 2.2rem 0 .8rem; }
.prose h3 { margin: 1.6rem 0 .5rem; }
.prose ul li { margin: .4rem 0; }

/* ---- Footer ---------------------------------------------------------- */
.site-footer { background: var(--ink); color: var(--slate-400); padding: 3rem 0 2rem; font-size: .92rem; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 2rem; margin-bottom: 2rem; }
.site-footer h4 { color: #fff; font-size: .82rem; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 1rem; }
.site-footer a { color: var(--slate-300); }
.site-footer a:hover { color: #fff; }
.footer-links { list-style: none; padding: 0; margin: 0; display: grid; gap: .55rem; }
.footer-links li { margin: 0; }
.footer-brand .brand__name { color: #fff; }
.footer-brand p { color: var(--slate-400); margin-top: .8rem; max-width: 36ch; }
.footer-bottom { border-top: 1px solid #1e293b; padding-top: 1.4rem; display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between; align-items: center; font-size: .85rem; }
.footer-bottom a { color: var(--slate-400); }

/* ---- Utilities ------------------------------------------------------- */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.stack > * + * { margin-top: 1.1rem; }
.muted { color: var(--slate-500); }
.ext-ico { width: 14px; height: 14px; vertical-align: -2px; opacity: .7; }

/* ---- Responsive ------------------------------------------------------ */
@media (max-width: 920px) {
  .hero__inner { grid-template-columns: 1fr; gap: 2rem; }
  .hero__art { order: -1; }
  .grid--3 { grid-template-columns: repeat(2, 1fr); }
  .plans { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 680px) {
  body { font-size: 16px; }
  .nav-burger { display: inline-flex; }
  .nav-links {
    position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: .2rem;
    background: #fff; border-bottom: 1px solid var(--slate-200);
    padding: .7rem 20px 1rem; box-shadow: var(--shadow);
    display: none;
  }
  .nav-toggle:checked ~ .nav-links { display: flex; }
  .nav-links a { padding: .7rem .8rem; border-radius: 9px; }
  .nav-links a.is-active::after { display: none; }
  .nav-links .btn { margin-top: .4rem; justify-content: center; }
  .grid--3, .grid--2, .plans, .footer-grid { grid-template-columns: 1fr; }
  .steps > li { grid-template-columns: 1fr; gap: .6rem; }
  .steps > li::before { width: 36px; height: 36px; font-size: 1rem; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
