/* Landing RISCO · Tecno Sistemi · variante 2a (mobile first) */

:root {
  --ink: #0D1014;
  --ink-2: #161B22;
  --ink-3: #232A33;
  --paper: #F3F1EC;
  --paper-2: #F4F2EE;
  --red: #FF4B2B;
  --red-err: #D0331A;
  --live: #3DDC84;
  --brand: #93C740;       /* verde del logo: elementi decorativi */
  --green-ok: #1E9E5A;
  --star: #FFC53D;
  --muted-1: #C9CCD1;
  --muted-2: #B7BBC2;
  --muted-3: #8C9199;
  --muted-4: #6B7079;
  --grey-1: #4A4E55;
  --grey-2: #6B6F76;
  --grey-3: #7A7E85;
  --sans: 'Archivo', system-ui, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, Menlo, monospace;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
a:hover { opacity: .85; }
img { display: block; }
button { font: inherit; }
input { font: inherit; }
input:focus { outline: none; }

:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

.page {
  position: relative;
  margin: 0 auto;
  background: var(--ink);
  min-height: 100vh;
}

/* ---------- Tipografia titoli ---------- */
.display {
  margin: 0;
  font-weight: 900;
  font-stretch: 70%;
  word-spacing: .12em;
  line-height: .92;
  text-transform: uppercase;
}
.accent { color: var(--brand); }
.mono-label {
  font: 600 11px var(--mono);
  text-transform: uppercase;
}

/* ---------- Barra countdown ---------- */
.topbar {
  background: var(--brand);
  color: var(--ink);
  padding: 9px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  font: 600 10.5px/1.2 var(--mono);
  text-transform: uppercase;
}
.topbar__days {
  background: var(--ink);
  color: var(--brand);
  padding: 3px 7px;
  border-radius: 3px;
}

/* ---------- Header ---------- */
.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, .07);
}
.header__logo { height: 34px; width: auto; }
.header__call {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(255, 255, 255, .2);
  padding: 0 12px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 13px;
  height: 44px;
  flex: none;
}
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--live); }

/* ---------- Hero ---------- */
.hero { position: relative; height: 540px; overflow: hidden; }
.hero__img, .hero__img img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 78% 40%;
}
.hero__shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(13, 16, 20, 0) 22%, rgba(13, 16, 20, .8) 52%, var(--ink) 84%);
}
.hero__body {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 0 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 13px;
}
.hero__kicker { color: var(--brand); letter-spacing: .05em; }
.hero__title { font-size: clamp(38px, 13.2vw, 56px); line-height: .9; text-wrap: balance; }
.hero__sub { font-size: 15px; line-height: 1.4; color: var(--muted-1); }
.hero__cta {
  height: 58px;
  border: 0;
  border-radius: 10px;
  background: var(--red);
  color: var(--ink);
  font: 800 17px var(--sans);
  font-stretch: 90%;
  word-spacing: .12em;
  text-transform: uppercase;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 18px;
}

/* ---------- Riga Andrea ---------- */
.tech-row {
  margin: 0 16px;
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 12px;
  align-items: center;
  padding: 12px;
  background: var(--ink-2);
  border-radius: 12px;
}
.avatar { width: 52px; height: 52px; border-radius: 50%; overflow: hidden; background: var(--ink-3); }
.avatar img, .portrait img { width: 100%; height: 100%; object-fit: cover; }
.tech-row__text { display: flex; flex-direction: column; gap: 3px; }
.tech-row__name { font-size: 15px; }
.tech-row__meta { font-size: 12.5px; color: var(--muted-2); line-height: 1.35; }
.stars { color: var(--star); }

/* ---------- Esempio ---------- */
.example { padding: 30px 16px 8px; display: flex; flex-direction: column; gap: 14px; }
.example__title { font-size: 36px; }
.example__bars { display: flex; flex-direction: column; gap: 6px; }
.example__line {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 14px;
  line-height: 1.35;
  color: var(--muted-2);
}
.example__line > :last-child { flex: none; }
.example__line--gap { margin-top: 6px; }
.bar { height: 14px; border-radius: 3px; background: var(--paper); }
.bar--half { background: linear-gradient(90deg, var(--paper) 50%, var(--brand) 50%); }
.example__total {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  border-top: 1px solid rgba(255, 255, 255, .12);
  padding-top: 12px;
}
.example__total-label { font-weight: 700; font-size: 16px; }
.example__total-value {
  font-weight: 900;
  font-stretch: 70%;
  word-spacing: .12em;
  font-size: 48px;
  line-height: 1;
  color: var(--brand);
}
.example__note { font-size: 13.5px; line-height: 1.45; color: var(--muted-2); }
.example__note strong { color: var(--paper); }

/* ---------- Quiz ---------- */
.quiz-section { padding: 22px 16px 28px; scroll-margin-top: 12px; background: var(--red); }
.quiz-section__kicker { display: block; margin: 0 0 12px; color: var(--ink); font: 600 11px var(--mono); text-transform: uppercase; }
.quiz {
  background: var(--paper-2);
  color: var(--ink);
  border-radius: 14px;
  padding: 18px 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.quiz [hidden] { display: none !important; }
.quiz__head { display: flex; flex-direction: column; gap: 9px; }
.quiz__meta { display: flex; justify-content: space-between; align-items: center; }
.quiz__meta span { font: 600 10.5px var(--mono); text-transform: uppercase; }
.quiz__meta span:first-child { color: var(--grey-2); }
.quiz__meta span:last-child { color: var(--red); }
.progress { height: 4px; background: #E2DED6; border-radius: 2px; overflow: hidden; }
.progress__fill { height: 100%; width: 25%; background: var(--red); transition: width .35s ease; }

.step { display: flex; flex-direction: column; gap: 12px; }
.step__title {
  margin: 0;
  font-weight: 800;
  font-stretch: 78%;
  word-spacing: .12em;
  font-size: 28px;
  line-height: 1;
  text-transform: uppercase;
}
.step__title--done { font-size: 30px; }
.step__text { font-size: 13.5px; color: var(--grey-1); line-height: 1.4; }
.step__biz { font-size: 12.5px; line-height: 1.45; color: var(--grey-1); }

.opts-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.opts-list { display: flex; flex-direction: column; gap: 8px; }

.opt {
  border-radius: 9px;
  border: 1.5px solid #DAD6CE;
  background: #FFFFFF;
  color: var(--ink);
  cursor: pointer;
}
.opt[aria-pressed="true"] { border-color: var(--ink); background: var(--ink); color: #FFFFFF; }
.opt__sub { font: 500 10.5px var(--mono); opacity: .6; }

.opt--tile {
  text-align: left;
  min-height: 66px;
  padding: 12px;
  font: 700 15px var(--sans);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
}
.opt--row {
  min-height: 52px;
  padding: 0 14px;
  font: 700 15px var(--sans);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.opt--check {
  text-align: left;
  min-height: 50px;
  padding: 0 14px;
  font: 600 14.5px var(--sans);
  display: flex;
  gap: 12px;
  align-items: center;
}
.check {
  width: 20px;
  height: 20px;
  flex: none;
  border-radius: 4px;
  border: 1.5px solid currentColor;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
}
.opt--check[aria-pressed="true"] .check::after { content: "✓"; }

.btn-dark {
  height: 54px;
  border: 0;
  border-radius: 9px;
  background: var(--ink);
  color: var(--paper);
  font: 800 16px var(--sans);
  text-transform: uppercase;
  cursor: pointer;
}
.btn-red {
  height: 58px;
  border: 0;
  border-radius: 9px;
  background: var(--red);
  color: var(--ink);
  font: 800 17px var(--sans);
  text-transform: uppercase;
  cursor: pointer;
}
.btn-red:disabled { opacity: .6; cursor: progress; }

.field {
  height: 52px;
  border: 1.5px solid #D5D1C8;
  border-radius: 9px;
  padding: 0 14px;
  font-size: 16px;
  background: #fff;
  color: var(--ink);
  width: 100%;
}
.field:focus { border-color: var(--ink); }
/* Campo trappola anti spam: fuori schermo, invisibile alle persone */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.quiz__err { font: 600 12px var(--mono); color: var(--red-err); }
.quiz__err a { text-decoration: underline; white-space: nowrap; }
.quiz__legal { font-size: 11px; color: var(--grey-3); }
.quiz__legal a { text-decoration: underline; }

.quiz__ok { font: 600 11px var(--mono); color: var(--green-ok); text-transform: uppercase; }
.quiz__call {
  height: 54px;
  border-radius: 9px;
  background: var(--ink);
  color: var(--paper);
  font: 800 15px var(--sans);
  text-transform: uppercase;
  display: flex;
  align-items: center;
  justify-content: center;
}
.quiz__back {
  align-self: flex-start;
  border: 0;
  background: none;
  padding: 4px 0;
  color: var(--grey-2);
  font: 600 12px var(--mono);
  cursor: pointer;
}

.support {
  margin-top: 22px;
  padding-top: 14px;
  border-top: 1px solid rgba(13, 16, 20, .25);
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--ink);
}
.support a { color: var(--ink); font-weight: 700; }
.support__link { text-decoration: underline; }

/* ---------- Confronto ---------- */
.compare {
  padding: 28px 16px;
  background: var(--paper-2);
  color: var(--ink);
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.compare__title { font-size: 40px; }
.compare__sub { font-size: 14.5px; line-height: 1.45; color: var(--grey-1); }
.ctable {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  border-radius: 10px;
  overflow: hidden;
  font-size: 13px;
  line-height: 1.3;
}
.ctable [role="columnheader"], .ctable [role="rowheader"], .ctable [role="cell"] { padding: 10px 8px; }
.ctable .h-sub { background: #E4E0D8; font-weight: 700; }
.ctable .h-risco { background: var(--ink); color: var(--paper); font-weight: 700; }
.ctable .lbl { border-top: 1px solid #DAD6CE; color: var(--grey-1); }
.ctable .sub { border-top: 1px solid #DAD6CE; background: #ECE8E1; }
.ctable .risco { background: var(--ink-2); color: var(--paper); }
.ctable .total.total { padding: 12px 8px; border-top: 2px solid var(--ink); }
.ctable .lbl.total { color: inherit; font-weight: 700; }
.ctable .sub.total { background: #ECE8E1; font-weight: 800; font-size: 16px; }
.ctable .risco.total.total { background: var(--brand); color: var(--ink); font-weight: 900; font-size: 18px; border-top: 0; }
.ctable .hl { color: var(--brand); font-weight: 700; }
.compare__note { font-size: 10.5px; line-height: 1.45; color: var(--grey-2); }

/* ---------- Sezioni scure generiche ---------- */
.block { padding: 28px 16px; display: flex; flex-direction: column; gap: 14px; }
.block--rule { border-top: 1px solid rgba(255, 255, 255, .07); }
.block__title { font-size: 38px; }

.badges { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.badge {
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 8px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.badge strong { font-size: 15px; }
.badge span { font: 500 11px var(--mono); color: var(--muted-3); }
.block__caption { font-size: 13px; color: var(--muted-3); }

.points { display: flex; flex-direction: column; margin: 0; padding: 0; list-style: none; }
.point { display: flex; gap: 14px; padding: 12px 0; border-bottom: 1px solid rgba(255, 255, 255, .1); }
.point:last-child { border-bottom: 0; }
.point__n { font: 600 12px var(--mono); color: var(--brand); padding-top: 3px; }
.point__body { display: flex; flex-direction: column; gap: 3px; }
.point__body strong { font-size: 16px; }
.point__body span { font-size: 13.5px; color: var(--muted-2); line-height: 1.4; }

/* ---------- Immagini ---------- */
.media { margin: 0; border-radius: 12px; overflow: hidden; background: var(--ink-2); }
.media img { width: 100%; height: auto; }
.media--light { background: #EEF0F3; }
.media figcaption { padding: 10px 12px; font-size: 13px; color: var(--muted-2); background: var(--ink-2); }

.app { display: flex; flex-direction: column; gap: 14px; margin-top: 6px; }
.app__text { display: flex; flex-direction: column; gap: 6px; }
.app__text strong { font-size: 18px; }
.app__text span { font-size: 14px; line-height: 1.45; color: var(--muted-2); }
.app__stores { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 6px; }
.app__stores img { height: 40px; width: auto; }

/* ---------- Tecnico + recensioni ---------- */
.tech { padding: 28px 16px; background: var(--ink-2); display: flex; flex-direction: column; gap: 14px; }
.tech__head { display: grid; grid-template-columns: 88px 1fr; gap: 14px; align-items: center; }
.portrait { width: 88px; height: 88px; border-radius: 10px; overflow: hidden; background: var(--ink-3); }
.tech__text { display: flex; flex-direction: column; gap: 4px; }
.tech__text strong { font-size: 18px; }
.tech__text span { font-size: 13px; color: var(--muted-2); line-height: 1.4; }
.reviews {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  margin-right: -16px;
  padding-right: 16px;
  scrollbar-width: none;
}
.reviews::-webkit-scrollbar { display: none; }
.review {
  flex: none;
  width: 260px;
  scroll-snap-align: start;
  background: var(--ink);
  border-radius: 10px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0;
}
.review .stars { font-size: 12px; }
.review p { margin: 0; font-size: 14px; line-height: 1.45; }
.review cite { font: 500 11px var(--mono); color: var(--muted-3); font-style: normal; }

/* ---------- Rate ---------- */
.rate { padding: 28px 16px; background: var(--paper); color: var(--ink); display: flex; flex-direction: column; gap: 10px; }
.rate__title { font-size: 44px; }
.rate__text { font-size: 15.5px; line-height: 1.4; }

/* ---------- Roma ---------- */
.context { padding: 22px 16px; border-bottom: 1px solid rgba(255, 255, 255, .07); }
.context p { margin: 0; font-size: 13px; line-height: 1.5; color: var(--muted-3); }

/* ---------- FAQ ---------- */
.faq { padding: 28px 16px; display: flex; flex-direction: column; gap: 12px; }
.faq__title { font-size: 36px; }
.faq__list { display: flex; flex-direction: column; }
.faq__item { border-bottom: 1px solid rgba(255, 255, 255, .12); }
.faq__q {
  width: 100%;
  min-height: 56px;
  padding: 14px 0;
  border: 0;
  background: none;
  color: var(--paper);
  font: 700 16px var(--sans);
  text-align: left;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.faq__icon { flex: none; font: 600 18px var(--mono); color: var(--brand); }
.faq__icon::before { content: "+"; }
.faq__q[aria-expanded="true"] .faq__icon::before { content: "−"; }
.faq__a { margin: 0; padding: 0 0 16px; font-size: 14px; line-height: 1.5; color: var(--muted-2); }

/* ---------- CTA finale ---------- */
.final { padding: 28px 16px 24px; background: var(--brand); color: var(--ink); display: flex; flex-direction: column; gap: 12px; }
.final__title { font-size: 44px; line-height: .9; }
.final .btn-red { height: 56px; font-size: 16px; }

/* ---------- Footer + barra fissa ---------- */
.footer { padding: 22px 16px 90px; font-size: 11.5px; line-height: 1.6; color: var(--muted-4); }
.footer p { margin: 0; }
.footer__links { margin-top: 6px !important; }
.footer__links a { text-decoration: underline; }

.stickybar {
  position: sticky;
  bottom: 0;
  padding: 10px 12px calc(14px + env(safe-area-inset-bottom, 0px));
  background: linear-gradient(rgba(13, 16, 20, 0), var(--ink) 30%);
  display: grid;
  grid-template-columns: 1fr 56px;
  gap: 8px;
  z-index: 10;
}
.stickybar__cta {
  height: 54px;
  border: 0;
  border-radius: 10px;
  background: var(--red);
  color: var(--ink);
  font: 800 15px var(--sans);
  text-transform: uppercase;
  cursor: pointer;
}
.stickybar__call {
  height: 54px;
  border-radius: 10px;
  background: var(--paper);
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  font: 800 11px var(--sans);
  text-transform: uppercase;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .progress__fill { transition: none; }
}

/* =========================================================
   Tablet: il layout mobile si allarga, i testi restano leggibili
   ========================================================= */
@media (min-width: 600px) {
  .hero__body > * { max-width: 620px; }
  .hero__cta { max-width: 420px; }
}

/* =========================================================
   Desktop: hero a tutta larghezza, contenuti a sinistra,
   preventivo fisso a destra mentre si scorre
   ========================================================= */
@media (min-width: 1000px) {
  .topbar, .header, .footer {
    padding-left: max(32px, calc(50% - 568px));
    padding-right: max(32px, calc(50% - 568px));
  }
  .topbar { justify-content: center; font-size: 12px; }
  .header__logo { height: 42px; }

  main {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 400px;
    column-gap: 48px;
    align-items: start;
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px 32px 48px;
  }
  main > * { grid-column: 1; }

  /* Hero */
  .hero { grid-column: 1 / -1; grid-row: 1; height: 560px; border-radius: 20px; }
  .hero__shade {
    background: linear-gradient(90deg, var(--ink) 0%, rgba(13, 16, 20, .88) 38%, rgba(13, 16, 20, .2) 68%, rgba(13, 16, 20, 0) 100%);
  }
  .hero__body { top: 0; right: auto; width: 620px; padding: 48px; justify-content: center; gap: 18px; }
  .hero__title { font-size: 80px; }
  .hero__sub { font-size: 17px; max-width: 500px; }
  .hero__cta { max-width: 400px; }

  /* Preventivo fisso a destra */
  .quiz-section {
    grid-column: 2;
    grid-row: 2 / span 20;
    position: sticky;
    top: 24px;
    margin-top: 24px;
    padding: 20px;
    border-radius: 18px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, .45);
  }

  /* Colonna contenuti */
  .tech-row { margin: 24px 0 0; padding: 16px; }
  .example, .block, .faq { padding: 48px 0 8px; }
  .context { padding: 32px 0; }
  .compare, .tech, .rate, .final { margin-top: 40px; padding: 36px; border-radius: 18px; }

  .example__title, .faq__title { font-size: 44px; }
  .block__title { font-size: 48px; }
  .compare__title { font-size: 52px; }
  .ctable { font-size: 15px; }
  .ctable [role="columnheader"], .ctable [role="rowheader"], .ctable [role="cell"] { padding: 14px 16px; }
  .ctable .total.total { padding: 16px; }
  .ctable .sub.total { font-size: 20px; }
  .ctable .risco.total.total { font-size: 24px; }
  .compare__note { font-size: 12px; }

  .badges { grid-template-columns: repeat(4, 1fr); }
  /* Certificazioni: foto a sinistra, badge e testo a destra */
  .block--cert { display: grid; grid-template-columns: 300px 1fr; grid-template-rows: auto auto 1fr; column-gap: 28px; row-gap: 14px; align-items: start; }
  .block--cert > .block__title { grid-column: 1 / -1; }
  .block--cert > .media { grid-column: 1; grid-row: 2 / span 2; }
  .block--cert > .badges { grid-column: 2; grid-template-columns: 1fr 1fr; }
  .block--cert > .block__caption { grid-column: 2; font-size: 14px; line-height: 1.5; }
  .app { display: grid; grid-template-columns: 1.1fr 1fr; align-items: center; gap: 24px; }
  .reviews { display: grid; grid-template-columns: repeat(3, 1fr); overflow: visible; margin-right: 0; padding-right: 0; }
  .review { width: auto; }

  .final__title { font-size: 56px; }
  .final .btn-red { max-width: 400px; }

  .footer { padding-top: 28px; padding-bottom: 32px; }
  .stickybar { display: none; }
}
