/* Rinnovasito – foglio di stile unico */

@font-face {
  font-family: "Schibsted Grotesk";
  src: url("fonts/schibsted-latin.woff2") format("woff2");
  font-weight: 400 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Schibsted Grotesk";
  src: url("fonts/schibsted-latin-ext.woff2") format("woff2");
  font-weight: 400 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --ink: #14213d;
  --ink-soft: #3d4a63;
  --muted: #5b6577;
  --paper: #f4f6f8;
  --white: #ffffff;
  --line: #d8dee6;
  --green: #0b7a54;
  --green-dark: #08603f;
  --green-tint: #e3f2eb;
  --focus: #f2b705;
  --radius: 10px;
  --wrap: 1180px;
  --font: "Schibsted Grotesk", "Segoe UI", system-ui, -apple-system, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 88px; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.1875rem; /* 19px: pubblico adulto, si legge senza sforzo */
  line-height: 1.6;
  color: var(--ink);
  background: var(--white);
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--green-dark); text-underline-offset: .18em; }
a:hover { color: var(--ink); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3 { line-height: 1.12; margin: 0; font-weight: 800; letter-spacing: -0.02em; }
p { margin: 0; }
.wrap { width: min(100% - 40px, var(--wrap)); margin-inline: auto; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 50; background: var(--ink); color: var(--white); padding: 10px 16px; border-radius: 6px; }
.skip:focus { top: 12px; }

/* ---------- Bottoni ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  min-height: 52px; padding: 0 26px;
  font: 700 1.0625rem/1 var(--font);
  border-radius: 999px; border: 2px solid transparent;
  text-decoration: none; cursor: pointer;
  transition: background-color .15s, color .15s, border-color .15s;
}
.btn-primary { background: var(--green); color: var(--white); }
.btn-primary:hover { background: var(--green-dark); color: var(--white); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: var(--white); }
.btn-small { min-height: 42px; padding: 0 18px; font-size: .9375rem; white-space: nowrap; }

/* ---------- Testata ---------- */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: rgba(255, 255, 255, .94);
  backdrop-filter: saturate(1.4) blur(8px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 72px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 800; font-size: 1.375rem; letter-spacing: -0.03em; }
.brand svg { width: 30px; height: 30px; flex: none; }
.brand:hover { color: var(--ink); }
.nav { display: flex; align-items: center; gap: 28px; }
.nav a:not(.btn) { color: var(--ink-soft); text-decoration: none; font-weight: 600; font-size: 1rem; }
.nav a:not(.btn):hover { color: var(--green-dark); text-decoration: underline; }

/* ---------- Hero ---------- */
.hero { padding: clamp(48px, 7vw, 96px) 0 clamp(56px, 7vw, 104px); background: var(--paper); border-bottom: 1px solid var(--line); }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr); gap: clamp(32px, 5vw, 72px); align-items: center; }
.hero h1 { font-size: clamp(2.375rem, 5.2vw, 4rem); max-width: 14ch; }
.hero .lead { margin-top: 24px; font-size: clamp(1.1875rem, 1.6vw, 1.3125rem); color: var(--ink-soft); max-width: 36ch; }
.hero .actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 34px; }
.hero .reassure { margin-top: 26px; display: flex; gap: 10px; align-items: flex-start; color: var(--ink-soft); font-size: 1rem; max-width: 40ch; }
.hero .reassure svg { width: 22px; height: 22px; flex: none; margin-top: 2px; color: var(--green); }

/* ---------- Confronto prima/dopo ---------- */
.compare { margin: 0; }
.compare-frame {
  position: relative; container-type: inline-size;
  aspect-ratio: 4 / 3.15;
  border-radius: 12px; overflow: hidden;
  background: var(--white);
  box-shadow: 0 1px 0 var(--line), 0 24px 48px -24px rgba(20, 33, 61, .35);
  border: 1px solid var(--line);
  touch-action: pan-y;
}
/* un solo movimento al caricamento: la maniglia mostra il "prima" e torna al centro */
@property --pos { syntax: "<percentage>"; inherits: true; initial-value: 36%; }
@keyframes sweep { 0%, 25% { --pos: 88%; } 100% { --pos: 36%; } }
.compare-frame.intro { animation: sweep 1.9s cubic-bezier(.22, .8, .3, 1) both; }
.compare-layer { position: absolute; inset: 0; display: flex; flex-direction: column; }
.compare-after { clip-path: inset(0 0 0 var(--pos, 50%)); }
.chrome { display: flex; align-items: center; gap: 1.6cqw; height: 7.2cqw; padding: 0 2.4cqw; background: #e9edf2; border-bottom: 1px solid #d3d9e1; flex: none; }
.chrome i { width: 1.6cqw; height: 1.6cqw; border-radius: 50%; background: #c3cad4; }
.chrome span { margin-left: 1.6cqw; flex: 1; height: 4.4cqw; border-radius: 2.2cqw; background: var(--white); display: flex; align-items: center; padding: 0 2cqw; font: 500 2.2cqw/1 var(--font); color: #5b6577; white-space: nowrap; overflow: hidden; }
.compare-before .chrome span { color: #a12a2a; }

/* lato "prima": il web di vent'anni fa */
.old { flex: 1; background: #c0c0c0; font-family: "Times New Roman", Times, serif; color: #000; padding: 2cqw; display: grid; grid-template-columns: 24% 1fr; grid-template-rows: auto 1fr auto; gap: 1.4cqw; overflow: hidden; }
.old-top { grid-column: 1 / -1; background: #000080; color: #ffff00; text-align: left; padding: 1.4cqw; border: .5cqw outset #8080ff; }
.old-top b { display: block; font-size: 4.6cqw; letter-spacing: .3cqw; }
.old-top small { font-size: 2.2cqw; color: #fff; }
.old-menu { background: #fff; border: .4cqw inset #808080; padding: 1.4cqw; font-size: 2.3cqw; line-height: 1.5; }
.old-menu u { color: #0000ee; display: block; }
.old-menu u.v { color: #551a8b; }
.old-main { background: #fff; border: .4cqw inset #808080; padding: 1.6cqw 2cqw; font-size: 2.4cqw; line-height: 1.35; }
.old-main h4 { margin: 0 0 1cqw; font-size: 3.4cqw; color: #ff0000; font-style: italic; }
.old-main p { margin: 0 0 1.2cqw; }
.old-wip { display: inline-block; margin-top: .6cqw; padding: .8cqw 1.6cqw; font: bold 2.2cqw/1 Arial, sans-serif; color: #000; background: repeating-linear-gradient(-45deg, #ffd800 0 2cqw, #000 2cqw 4cqw); }
.old-wip span { background: #ffd800; padding: .2cqw 1cqw; }
.old-foot { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: center; font-size: 2cqw; }
.old-counter { font-family: "Courier New", monospace; background: #000; color: #00ff00; padding: .4cqw 1cqw; letter-spacing: .4cqw; }

/* lato "dopo": lo stesso studio, rifatto */
/* il contenuto che conta sta a destra della maniglia (ferma al 36%) */
.new { flex: 1; background: var(--white); display: grid; grid-template-columns: 36% 1fr; overflow: hidden; }
.new-side { background: var(--ink); color: #fff; padding: 4cqw 3.4cqw; display: flex; flex-direction: column; justify-content: space-between; }
.new-side b { font-size: 4.4cqw; line-height: 1.05; letter-spacing: -.1cqw; }
.new-side span { font-size: 2cqw; line-height: 1.6; color: #b9c2d0; }
.new-body { display: flex; flex-direction: column; min-width: 0; }
.new-nav { display: flex; align-items: center; justify-content: flex-end; padding: 2.6cqw 4cqw; border-bottom: 1px solid #edf0f3; }
.new-nav span { display: flex; gap: 2.6cqw; font-size: 2.1cqw; color: var(--muted); }
.new-hero { padding: 4.4cqw 4cqw 3.4cqw; background: linear-gradient(180deg, var(--green-tint), #fff); }
.new-hero small { display: block; font-size: 2.2cqw; color: var(--green-dark); font-weight: 700; }
.new-hero strong { display: block; margin-top: 1.4cqw; font-size: 5.4cqw; line-height: 1.05; letter-spacing: -.12cqw; max-width: 22ch; }
.new-cta { display: flex; gap: 1.6cqw; margin-top: 3cqw; }
.new-cta em { font-style: normal; font-size: 2.2cqw; font-weight: 700; padding: 1.4cqw 2.6cqw; border-radius: 99px; background: var(--green); color: #fff; }
.new-cta em + em { background: #fff; color: var(--ink); box-shadow: inset 0 0 0 .3cqw var(--ink); }
.new-list { padding: 1cqw 4cqw; }
.new-list div { display: flex; justify-content: space-between; padding: 1.7cqw 0; border-bottom: 1px solid #edf0f3; font-size: 2.4cqw; font-weight: 600; }
.new-list div span { color: var(--green); }

.compare-handle { position: absolute; top: 0; bottom: 0; left: var(--pos, 50%); width: 0; pointer-events: none; }
.compare-handle::before { content: ""; position: absolute; top: 0; bottom: 0; left: -1.5px; width: 3px; background: var(--white); box-shadow: 0 0 0 1px rgba(20, 33, 61, .25); }
.compare-handle span { position: absolute; top: 50%; left: 0; width: 46px; height: 46px; transform: translate(-50%, -50%); border-radius: 50%; background: var(--ink); color: var(--white); display: grid; place-items: center; box-shadow: 0 6px 16px rgba(20, 33, 61, .3); }
.compare-handle svg { width: 24px; height: 24px; }
.compare-range { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: ew-resize; }
.compare-range:focus-visible + .compare-handle span { outline: 3px solid var(--focus); outline-offset: 3px; }
.compare-tag { position: absolute; bottom: 2.4cqw; padding: .6cqw 1.6cqw; border-radius: 99px; font: 700 2cqw/1.2 var(--font); background: rgba(20, 33, 61, .82); color: #fff; pointer-events: none; }
.compare-tag.before { left: 2cqw; }
.compare-tag.after { right: 2cqw; background: var(--green); }
.compare figcaption { margin-top: 14px; font-size: .9375rem; color: var(--muted); }

/* ---------- Sezioni ---------- */
.section { padding: clamp(64px, 8vw, 112px) 0; }
.section + .section { border-top: 1px solid var(--line); }
.section-paper { background: var(--paper); }
.section h2 { font-size: clamp(2rem, 3.6vw, 2.875rem); max-width: 20ch; }
.section .intro { margin-top: 18px; color: var(--ink-soft); max-width: 58ch; }
.split { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(32px, 6vw, 88px); align-items: start; }

/* problemi del sito vecchio: righe, non card */
.problems { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--ink); }
.problems li { display: grid; grid-template-columns: 44px 1fr; gap: 6px 18px; padding: 26px 0; border-bottom: 1px solid var(--line); }
.problems svg { width: 30px; height: 30px; color: #b3261e; grid-row: span 2; margin-top: 2px; }
.problems h3 { font-size: 1.3125rem; letter-spacing: -.01em; }
.problems p { color: var(--ink-soft); max-width: 56ch; }

/* passi: una vera sequenza */
.steps { list-style: none; margin: 56px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; counter-reset: passo; position: relative; }
.steps li { counter-increment: passo; padding: 0 28px 0 0; position: relative; }
.steps li::before {
  content: counter(passo);
  display: grid; place-items: center;
  width: 52px; height: 52px; border-radius: 50%;
  background: var(--white); border: 2px solid var(--ink);
  font-weight: 800; font-size: 1.375rem;
  position: relative; z-index: 1;
}
.steps li:last-child::before { background: var(--green); border-color: var(--green); color: var(--white); }
.steps li::after { content: ""; position: absolute; top: 26px; left: 52px; right: 0; height: 2px; background: var(--line); }
.steps li:last-child::after { display: none; }
.steps h3 { margin-top: 22px; font-size: 1.3125rem; letter-spacing: -.01em; }
.steps p { margin-top: 10px; color: var(--ink-soft); font-size: 1.0625rem; }

/* DNS: cosa cambia e cosa no */
.dns { width: 100%; border-collapse: collapse; background: var(--white); border-radius: var(--radius); overflow: hidden; box-shadow: inset 0 0 0 1px var(--line); font-size: 1.0625rem; }
.dns caption { text-align: left; padding: 0 0 14px; font-weight: 700; color: var(--ink-soft); font-size: 1rem; }
.dns th, .dns td { text-align: left; padding: 18px 20px; border-bottom: 1px solid var(--line); vertical-align: top; }
.dns thead th { background: var(--ink); color: var(--white); font-weight: 700; font-size: .9375rem; }
.dns tbody tr:last-child td, .dns tbody tr:last-child th { border-bottom: 0; }
.dns tbody th { font-weight: 800; white-space: nowrap; }
.dns tbody th small { display: block; font-weight: 500; color: var(--muted); font-size: .875rem; }
.dns .change { color: var(--green-dark); font-weight: 700; }
.dns .keep { color: var(--ink); font-weight: 700; }
.dns tr.keep-row { background: var(--green-tint); }
.points { margin: 28px 0 0; padding: 0; list-style: none; display: grid; gap: 14px; }
.points li { display: grid; grid-template-columns: 26px 1fr; gap: 12px; color: var(--ink-soft); }
.points svg { width: 22px; height: 22px; color: var(--green); margin-top: 4px; }

/* cosa include */
.includes { list-style: none; margin: 48px 0 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 56px; }
.includes li { padding: 22px 0; border-top: 1px solid var(--line); }
.includes h3 { font-size: 1.1875rem; letter-spacing: -.01em; }
.includes p { margin-top: 6px; color: var(--ink-soft); font-size: 1.0625rem; max-width: 52ch; }

/* per chi */
.for-whom { margin-top: 28px; font-size: clamp(1.375rem, 2.4vw, 1.875rem); line-height: 1.35; font-weight: 700; letter-spacing: -.015em; max-width: 34ch; }
.for-whom span { color: var(--muted); font-weight: 500; }
.note { margin-top: 28px; padding: 18px 22px; border-left: 4px solid var(--green); background: var(--white); color: var(--ink-soft); max-width: 62ch; font-size: 1.0625rem; }

/* domande */
.faq { margin-top: 40px; border-top: 2px solid var(--ink); max-width: 860px; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 24px; padding: 24px 0; font-weight: 700; font-size: 1.25rem; letter-spacing: -.01em; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; flex: none; width: 14px; height: 14px; border-right: 2.5px solid var(--ink); border-bottom: 2.5px solid var(--ink); transform: rotate(45deg) translate(-3px, -3px); transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(225deg) translate(-3px, -3px); }
.faq details p { padding: 0 0 26px; color: var(--ink-soft); max-width: 66ch; }
.faq details p + p { margin-top: -12px; }

/* modulo */
.request { background: var(--ink); color: var(--white); }
.request h2 { color: var(--white); }
.request .intro { color: #c9d1de; }
.request .split { align-items: center; }
.request-side { padding-top: 6px; }
.btn-mail { min-height: 62px; padding: 0 30px; font-size: 1.1875rem; }
.request-hint { margin-top: 14px; color: #c9d1de; font-size: 1rem; max-width: 46ch; }
.request-side ul { margin: 28px 0 0; padding: 0; list-style: none; display: grid; gap: 14px; color: #dfe5ee; }
.request-side li { display: grid; grid-template-columns: 26px 1fr; gap: 12px; }
.request-side svg { width: 22px; height: 22px; color: #5fd3a3; margin-top: 4px; }

/* piè di pagina */
.site-footer { background: #0e182d; color: #b9c2d0; padding: 48px 0 40px; font-size: .9375rem; }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 24px 48px; align-items: flex-start; }
.site-footer .brand { color: var(--white); font-size: 1.25rem; }
.site-footer a { color: #dfe5ee; }
.site-footer a:hover { color: var(--white); }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 8px 24px; }

/* pagine interne (privacy, cookie, grazie, errore) */
.page { padding: clamp(48px, 7vw, 88px) 0 clamp(64px, 8vw, 104px); }
.page .wrap { max-width: 780px; }
.page h1 { font-size: clamp(2.125rem, 4.4vw, 3rem); }
.page .updated { margin-top: 12px; color: var(--muted); font-size: 1rem; }
.page h2 { margin-top: 44px; font-size: 1.5rem; letter-spacing: -.01em; }
.page p, .page ul { margin-top: 14px; color: var(--ink-soft); }
.page ul { padding-left: 1.2em; }
.page li + li { margin-top: 6px; }
.page .btn { margin-top: 32px; }
.result-icon { width: 64px; height: 64px; color: var(--green); margin-bottom: 24px; }
.result-icon.error { color: #b3261e; }

/* ---------- Responsive ---------- */
@media (max-width: 1000px) {
  .hero .wrap, .split { grid-template-columns: 1fr; }
  .hero h1 { max-width: 16ch; }
  .steps { grid-template-columns: 1fr 1fr; gap: 40px 0; }
  .steps li:nth-child(2)::after { display: none; }
  .request-side { position: static; }
}
@media (max-width: 760px) {
  body { font-size: 1.125rem; }
  .nav a:not(.btn) { display: none; }
  .brand { font-size: 1.1875rem; }
  .btn-small { padding: 0 14px; font-size: .875rem; }
  .steps { grid-template-columns: 1fr; gap: 0; margin-top: 40px; }
  .steps li { display: grid; grid-template-columns: 52px 1fr; column-gap: 18px; padding: 0 0 32px; }
  .steps li::before { grid-row: span 2; }
  .steps li::after { display: block; top: 52px; bottom: 0; left: 25px; right: auto; width: 2px; height: auto; }
  .steps li:last-child { padding-bottom: 0; }
  .steps h3 { margin-top: 10px; }
  .includes { grid-template-columns: 1fr; }
  .dns th, .dns td { padding: 14px 12px; }
  .dns thead th:nth-child(2), .dns tbody td:nth-child(2) { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
