/* Pagine di testo del sito (privacy, termini, elimina account): stessi colori e caratteri della pagina principale. */
:root {
  --night: #0B2E1E;
  --green: #006E22;
  --lime: #C8FF00;
  --paper: #F9F9F8;
  --mint: #E3F4D2;
  --ink: #191C1C;
  --muted: #3D4A3B;
  --on-dark: #F9F9F8;
  --on-dark-muted: #C9D8C6;
  --display: "Barlow Condensed", "Arial Narrow", sans-serif;
  --text: "Barlow", system-ui, sans-serif;
  --step-small: 0.875rem;
  --step-body: clamp(1.0625rem, 1rem + 0.25vw, 1.1875rem);
  --step-lead: clamp(1.25rem, 1.1rem + 0.7vw, 1.75rem);
  --step-head: clamp(2.5rem, 1.4rem + 4.4vw, 5.5rem);
  --margin: clamp(16px, 3vw, 40px);
  --ease: cubic-bezier(.2,.7,.2,1);
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--text); font-size: var(--step-body); line-height: 1.6; }
a { color: inherit; text-underline-offset: 4px; text-decoration-thickness: 2px; }
a:hover { color: var(--green); }
img { display: block; max-width: 100%; height: auto; }
h1, h2 { font-family: var(--display); font-weight: 700; line-height: .95; letter-spacing: -0.01em; margin: 0; text-wrap: balance; }
p, ul, ol { margin: 0; }
:focus-visible { outline: 3px solid var(--green); outline-offset: 3px; }
::selection { background: var(--lime); color: var(--ink); }

/* Menu in alto, uguale alla pagina principale: resta visibile mentre si scorre */
.bar { position: sticky; top: 0; z-index: 50; height: 72px; display: flex; align-items: center; gap: 40px;
  padding: 0 var(--margin); background: #fff; color: var(--ink); box-shadow: 0 1px 0 #DCE6D8; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font: 700 var(--step-lead)/1 var(--display); letter-spacing: .02em; }
.brand img { width: 36px; height: 36px; }
.bar .brand:hover { color: var(--ink); }
.bar__nav { flex: 1; display: flex; align-items: center; gap: clamp(20px, 3vw, 40px); }
.bar__nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: clamp(20px, 2.4vw, 32px); font-weight: 500; }
.bar__nav ul a { display: inline-block; padding: 12px 0; text-decoration: none; transition: color .18s; }
.bar__nav ul a:hover, .bar__nav ul a:focus-visible, .bar__nav ul a[aria-current="page"] { color: var(--green); }
.bar__login { margin-left: auto; font-weight: 600; }
.bar .btn { min-height: 48px; padding: 0 24px; border-radius: 999px; background: var(--lime); color: var(--ink); }
.bar .btn:hover { color: var(--ink); }
.menu-btn { display: none; margin-left: auto; min-height: 44px; padding: 0 20px; border: 0; border-radius: 999px; background: var(--lime); color: var(--ink); font: 600 var(--step-body)/1 var(--text); cursor: pointer; }
:target, section[id] { scroll-margin-top: 88px; }

.head { background: var(--night); color: var(--on-dark); padding: clamp(56px, 8vw, 120px) var(--margin) clamp(40px, 5vw, 72px);
  display: grid; grid-template-columns: 7fr 5fr; gap: var(--margin); align-items: end; }
.head h1 { font-size: var(--step-head); }
.head p { font-size: var(--step-lead); line-height: 1.35; max-width: 34ch; }
.head small { display: block; margin-top: 16px; font-size: var(--step-small); color: var(--on-dark-muted); }

.doc { display: grid; grid-template-columns: 7fr 5fr; gap: var(--margin); padding: clamp(56px, 7vw, 112px) var(--margin) clamp(96px, 10vw, 160px); align-items: start; }
.doc__body { display: grid; gap: clamp(48px, 5vw, 72px); max-width: 68ch; }
.doc__body section { display: grid; gap: 16px; }
.doc__body h2 { font-size: clamp(1.75rem, 1.3rem + 1.6vw, 2.75rem); scroll-margin-top: 24px; }
.doc__body ul, .doc__body ol { padding-left: 1.2em; display: grid; gap: 8px; }
.doc__body strong { font-weight: 600; }

/* In breve: il riassunto resta accanto mentre si legge */
.brief { position: sticky; top: 92px; background: var(--lime); padding: clamp(24px, 3vw, 40px); display: grid; gap: 20px;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 28px), calc(100% - 28px) 100%, 0 100%); }
.brief h2 { font-size: clamp(1.75rem, 1.3rem + 1.6vw, 2.75rem); }
.brief ul { padding-left: 1.2em; display: grid; gap: 10px; }
.brief nav { display: grid; gap: 6px; font-weight: 600; }

/* Striscia con la foto del campo sotto il titolo */
.band { margin: 0; height: clamp(220px, 34svh, 380px); overflow: hidden; background: var(--night); }
.band img { width: 100%; height: 100%; object-fit: cover; filter: brightness(.8); }

.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }
.band img.reveal { transform: scale(1.06); }
.band img.reveal.is-in { transform: none; transition-duration: 1.4s; }

/* Frammento dell'app (data-ui): la riga del Profilo da toccare */
.ui { background: #fff; border-radius: 24px; padding: 20px; display: grid; gap: 10px; max-width: 420px; font-size: var(--step-body); }
.ui__row { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border: 1.5px solid #C9E0C3; border-radius: 16px; }
.ui__row--danger { border-color: #C71818; color: #8C1D18; font-weight: 600; background: #FDE8E8; }
.ui__row span:last-child { margin-left: auto; color: var(--muted); }
.app-steps { display: grid; grid-template-columns: 1fr 1fr; gap: var(--margin); align-items: center; }

/* Da completare prima della pubblicazione */
mark.todo { background: #FFF3C4; color: #6B4E00; padding: 0 .25em; font-weight: 600; }

.steps { counter-reset: s; list-style: none; padding: 0 !important; display: grid; gap: 12px; }
.steps li { counter-increment: s; display: grid; grid-template-columns: 48px 1fr; gap: 16px; align-items: center; background: var(--mint); padding: 16px; }
.steps li::before { content: counter(s); width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; background: var(--green); color: #fff; font: 700 1.375rem/1 var(--display); }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: 0 28px; background: var(--ink); color: var(--lime); font-weight: 600; text-decoration: none; width: fit-content;
  transition: transform .18s var(--ease); }
.btn:hover { color: var(--lime); transform: translateY(-2px); }

.foot { background: var(--night); color: var(--on-dark); padding: 48px var(--margin); display: flex; flex-wrap: wrap; gap: 16px 40px; justify-content: space-between; align-items: center; font-size: .9375rem; }
.foot nav { display: flex; flex-wrap: wrap; gap: 12px 28px; }
.foot a { color: var(--on-dark); }
.foot a:hover { color: var(--lime); }

/* ---------- BLOG: elenco degli articoli ---------- */
.posts { padding: clamp(56px, 7vw, 112px) var(--margin) clamp(96px, 10vw, 160px); display: grid; gap: clamp(56px, 6vw, 96px); }
.post { display: grid; grid-template-columns: 5fr 7fr; gap: clamp(24px, 4vw, 64px); align-items: center; }
.post:nth-child(even) .post__pic { order: 2; }
.post__pic { margin: 0; overflow: hidden; }
.post__pic img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; transition: transform .6s var(--ease);
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 28px), calc(100% - 28px) 100%, 0 100%); }
.post:hover .post__pic img { transform: scale(1.04); }
.post__text { display: grid; gap: 16px; max-width: 52ch; }
.post__text time { font-size: var(--step-small); color: var(--muted); font-weight: 600; }
.post__text h2 { font-size: clamp(2rem, 1.3rem + 2.6vw, 3.75rem); }
.post__text h2 a { text-decoration: none; }
.post__text p { font-size: var(--step-lead); line-height: 1.35; }
.more { font-weight: 600; width: fit-content; }
.doc__body h3 { font: 700 var(--step-lead)/1.2 var(--text); margin: 0; }

/* Il menu passa al pulsante "Menu" prima che le voci si stringano */
@media (max-width: 1000px) {
  .bar { height: 64px; }
  .menu-btn { display: block; }
  .bar__login { margin-left: 0; }
  .bar__nav { display: none; position: absolute; top: 64px; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 20px;
    padding: 16px var(--margin) 32px; background: #fff; box-shadow: 0 1px 0 #DCE6D8; }
  .bar.is-open .bar__nav { display: flex; }
  .bar__nav ul { flex-direction: column; gap: 4px; }
  .bar__nav ul a { display: block; padding: 12px 0; font: 700 2rem/1.1 var(--display); }
  .bar .btn { width: 100%; }
}
@media (max-width: 860px) {
  .post, .post:nth-child(even) { grid-template-columns: 1fr; }
  .post:nth-child(even) .post__pic { order: 0; }
  .head, .doc { grid-template-columns: 1fr; }
  .brief { position: static; grid-row: 1; }
  .doc__body { max-width: none; }
  .app-steps { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .reveal, .band img.reveal { opacity: 1; transform: none; }
}
