/* Senza Ritocchi — foglio di stile condiviso da tutti i numeri */

:root {
  /* Carta e inchiostro */
  --paper: #FFFBFE;
  --paper-2: #F6EFFA;
  --ink: #1C1622;
  --ink-soft: #4A3F55;
  --line: #E3D6EC;

  /* Lilla della testata e accento magenta Coverfop */
  --lilac: #E7D8F3;
  --lilac-strong: #B79FCF;
  --accent: #A600B0;       /* 6,5:1 su bianco */
  --accent-ink: #FFFFFF;
  --accent-soft: #F7E3F8;

  /* Palette logo Coverfop (piè di pagina) */
  --cv-magenta: #A600B0;
  --cv-teal: #7AC4C2;
  --cv-lime: #CDCF01;
  --cv-green: #1B6E0E;

  /* Aiuto */
  --help-bg: #1C1622;
  --help-ink: #FFFFFF;

  --font-display: "Libre Bodoni", "Bodoni 72", Didot, Georgia, serif;
  --font-body: "Public Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --space-1: .5rem;
  --space-2: 1rem;
  --space-3: 1.5rem;
  --space-4: 2.5rem;
  --space-5: 4rem;
  --space-6: 6rem;

  --measure: 66ch;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(28, 22, 34, .06), 0 8px 24px rgba(28, 22, 34, .07);
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #17121C;
    --paper-2: #211A28;
    --ink: #F4EDF8;
    --ink-soft: #CBBFD6;
    --line: #3A2F45;
    --lilac: #3A2C49;
    --lilac-strong: #8E74A8;
    --accent: #E58BEB;     /* chiaro per il fondo scuro */
    --accent-ink: #1C1622;
    --accent-soft: #3B2440;
    --help-bg: #F4EDF8;
    --help-ink: #1C1622;
    --shadow: 0 1px 2px rgba(0,0,0,.4), 0 8px 24px rgba(0,0,0,.35);
  }
}

*, *::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(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--accent); text-underline-offset: .18em; text-decoration-thickness: .08em; }
a:hover { text-decoration-thickness: .14em; }

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip-link {
  position: absolute; left: var(--space-2); top: -100px;
  background: var(--ink); color: var(--paper);
  padding: .6rem 1rem; border-radius: 8px; z-index: 100;
  text-decoration: none; font-weight: 600;
}
.skip-link:focus { top: var(--space-2); }

.wrap { width: min(1120px, 100% - 2rem); margin-inline: auto; }
.narrow { width: min(var(--measure), 100% - 2rem); margin-inline: auto; }

/* ---------- Barra superiore ---------- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.topbar .wrap {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--space-2); min-height: 64px;
}
.brand {
  font-family: var(--font-display); font-weight: 700; font-size: 1.35rem;
  letter-spacing: -.01em; color: var(--ink); text-decoration: none;
}
.brand span { color: var(--accent); font-style: italic; }
.topnav { display: flex; gap: .25rem; flex-wrap: wrap; }
.topnav a {
  color: var(--ink); text-decoration: none; font-weight: 600; font-size: .95rem;
  padding: .6rem .8rem; border-radius: 999px; min-height: 44px;
  display: inline-flex; align-items: center;
  transition: background-color .2s ease;
}
.topnav a:hover { background: var(--lilac); }
.topnav a[aria-current="page"] { background: var(--lilac); }

/* ---------- Etichette "nastro adesivo" ---------- */
.tape {
  display: inline-block;
  background: var(--lilac);
  color: var(--ink);
  font-size: .78rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  padding: .3rem .7rem;
  transform: rotate(-1.5deg);
  box-shadow: 0 1px 0 rgba(0,0,0,.04);
}
.tape--accent { background: var(--accent); color: var(--accent-ink); }

/* ---------- Home: apertura ---------- */
.hero { padding-block: var(--space-4) var(--space-5); }
.hero-grid {
  display: grid; gap: var(--space-4); align-items: center;
  grid-template-columns: 1fr;
}
@media (min-width: 880px) {
  .hero-grid { grid-template-columns: 5fr 6fr; gap: var(--space-5); }
}
.cover {
  position: relative; margin: 0;
  transform: rotate(-1.2deg);
  box-shadow: var(--shadow);
  border-radius: 6px; overflow: hidden;
  background: var(--lilac);
  max-width: 520px; justify-self: center;
}
.cover img { width: 100%; aspect-ratio: 1844 / 2576; object-fit: cover; }

.hero h1 {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(2.6rem, 6vw, 4.6rem); line-height: 1.02;
  letter-spacing: -.02em; margin: var(--space-2) 0 var(--space-2);
}
.hero h1 em { color: var(--accent); }
.lede { font-size: 1.2rem; color: var(--ink-soft); max-width: 46ch; margin: 0 0 var(--space-3); }

.btn {
  position: relative;
  display: inline-flex; align-items: center; gap: .6rem;
  min-height: 48px; padding: .75rem 1.4rem;
  border-radius: 999px; font-weight: 700; font-size: 1rem;
  text-decoration: none; cursor: pointer; border: 2px solid transparent;
  transition: transform .15s ease, background-color .2s ease, color .2s ease;
}
.btn:active { transform: translateY(1px); }
.btn svg { width: 20px; height: 20px; flex: none; }
.btn--primary { background: var(--accent); color: var(--accent-ink); }
.btn--primary:hover { background: color-mix(in srgb, var(--accent) 85%, var(--ink)); }
.btn--ghost { border-color: var(--ink); color: var(--ink); background: transparent; }
.btn--ghost:hover { background: var(--ink); color: var(--paper); }
.btn-row { display: flex; flex-wrap: wrap; gap: .75rem; }

/* ---------- Sezioni ---------- */
.section { padding-block: var(--space-5); }
.section--tint { background: var(--paper-2); }
.section-head { margin-bottom: var(--space-3); }
.section-head h2 {
  font-family: var(--font-display); font-size: clamp(1.8rem, 3.5vw, 2.4rem);
  line-height: 1.1; margin: .6rem 0 0;
}

/* Archivio numeri */
.issues { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--space-3);
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.issue-card {
  position: relative; background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--radius); padding: var(--space-3);
  transition: box-shadow .2s ease, transform .2s ease;
}
.issue-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.issue-card .num { font-family: var(--font-display); font-size: 3rem; line-height: 1; color: var(--accent); }
.issue-card h3 { font-family: var(--font-display); font-size: 1.5rem; margin: .5rem 0 .25rem; }
.issue-card p { margin: 0; color: var(--ink-soft); }
.issue-card a { color: inherit; text-decoration: none; }
.issue-card a::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.issue-card--soon { border-style: dashed; background: transparent; }
.issue-card--soon .num { color: var(--lilac-strong); }

/* ---------- Pagina del numero ---------- */
.issue-hero { padding-block: var(--space-4) var(--space-3); border-bottom: 1px solid var(--line); }
.issue-hero-grid { display: grid; gap: var(--space-3); align-items: end; grid-template-columns: 1fr; }
@media (min-width: 760px) { .issue-hero-grid { grid-template-columns: 1fr 220px; } }
.issue-hero h1 {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(2.4rem, 6vw, 4.2rem); line-height: 1.02; letter-spacing: -.02em;
  margin: var(--space-2) 0 .5rem;
}
.issue-hero .cover { transform: rotate(2deg); max-width: 220px; }
.meta { color: var(--ink-soft); font-size: .95rem; margin: 0; }

.toc { margin-top: var(--space-3); }
.toc ol { list-style: none; counter-reset: toc; padding: 0; margin: 0; display: grid; gap: .5rem;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.toc li { counter-increment: toc; }
.toc a {
  display: flex; gap: .75rem; align-items: baseline; min-height: 44px;
  padding: .8rem 1rem; border-radius: 10px; background: var(--paper-2);
  color: var(--ink); text-decoration: none; font-weight: 600; line-height: 1.3;
  transition: background-color .2s ease;
}
.toc a::before { content: counter(toc, decimal-leading-zero); font-family: var(--font-display); color: var(--accent); font-weight: 700; }
.toc a:hover { background: var(--lilac); }

/* Editoriale */
.editorial { padding-block: var(--space-5); }
.editorial .dropcap::first-letter {
  font-family: var(--font-display); float: left; font-size: 4.2rem; line-height: .85;
  padding: .3rem .6rem 0 0; color: var(--accent); font-weight: 700;
}
.signature { font-family: var(--font-display); font-style: italic; font-size: 1.2rem; margin-top: var(--space-3); }

/* Articoli */
.article { padding-block: var(--space-5); border-top: 1px solid var(--line); scroll-margin-top: 80px; }
.article:nth-of-type(even) { background: var(--paper-2); }
.article h2 {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(2rem, 4.6vw, 3rem); line-height: 1.05; letter-spacing: -.015em;
  margin: var(--space-2) 0 .5rem;
}
.article .deck {
  font-family: var(--font-display); font-style: italic; font-size: 1.35rem; line-height: 1.35;
  color: var(--ink-soft); margin: 0 0 var(--space-2);
}
.byline { font-size: .92rem; color: var(--ink-soft); margin: 0 0 var(--space-3); }
.byline strong { color: var(--ink); }
.article h3 { font-family: var(--font-display); font-size: 1.45rem; line-height: 1.2; margin: var(--space-4) 0 var(--space-2); }

.prose p { margin: 0 0 1.1em; }

/* Elenchi anaforici: "Non è giusto…", "Vogliamo…", "Non è normale…" */
.litany { list-style: none; padding: 0; margin: 0 0 var(--space-3); border-left: 4px solid var(--accent); }
.litany li { padding: .55rem 0 .55rem 1.1rem; font-weight: 600; }
.litany li + li { border-top: 1px dashed var(--line); }

.pull {
  margin: var(--space-4) 0; padding: 0;
  font-family: var(--font-display); font-style: italic; font-weight: 500;
  font-size: clamp(1.6rem, 3.6vw, 2.2rem); line-height: 1.2; color: var(--accent);
}
.pull::before { content: "“"; display: block; font-size: 3em; line-height: .6; height: .45em; }

.manifesto {
  margin: var(--space-4) 0 0; padding: var(--space-3);
  background: var(--accent); color: var(--accent-ink); border-radius: var(--radius);
  font-weight: 700; font-size: 1.15rem; line-height: 1.5;
}
.manifesto p { margin: 0; }
.manifesto p + p { margin-top: .4rem; }

/* Box aiuto */
.help {
  background: var(--help-bg); color: var(--help-ink);
  border-radius: var(--radius); padding: var(--space-4) var(--space-3);
}
.help h2 { font-family: var(--font-display); font-size: clamp(1.8rem, 3.6vw, 2.4rem); margin: .6rem 0 var(--space-2); line-height: 1.1; }
.help .numbers { display: grid; gap: var(--space-2); grid-template-columns: minmax(0, 520px); margin: var(--space-3) 0; }
.help a.num {
  display: block; text-decoration: none; color: inherit;
  border: 2px solid currentColor; border-radius: var(--radius); padding: var(--space-2) var(--space-3);
  transition: background-color .2s ease, color .2s ease;
}
.help a.num:hover { background: var(--help-ink); color: var(--help-bg); }
.help .big { font-family: var(--font-display); font-weight: 700; font-size: 3rem; line-height: 1; display: block; }
.help .label { font-weight: 700; display: block; margin-top: .3rem; }
.help .desc { display: block; font-size: .95rem; opacity: .9; margin-top: .2rem; }
.help p { margin: 0; }

.back { display: inline-flex; align-items: center; gap: .4rem; min-height: 44px; font-weight: 600; }

/* ---------- Piè di pagina ---------- */
.site-footer { margin-top: var(--space-5); border-top: 1px solid var(--line); background: var(--paper); }
.follow {
  padding-block: var(--space-4); text-align: center;
  display: grid; justify-items: center; gap: var(--space-2);
}
.follow p { margin: 0; color: var(--ink-soft); }
.btn--ig {
  background: linear-gradient(135deg, #7A2BB5 0%, #A600B0 45%, #D6246E 100%);
  color: #FFFFFF; font-size: 1.1rem; padding: .85rem 1.8rem;
}
.btn--ig:hover { filter: brightness(1.08); }

.engine {
  text-align: center; padding: var(--space-2) 1rem; margin: 0;
  font-size: .9rem; font-weight: 600; letter-spacing: .06em; color: var(--ink-soft);
}
.brand-stripe { display: grid; grid-template-columns: repeat(4, 1fr); height: 8px; }
.brand-stripe span:nth-child(1) { background: var(--cv-magenta); }
.brand-stripe span:nth-child(2) { background: var(--cv-teal); }
.brand-stripe span:nth-child(3) { background: var(--cv-lime); }
.brand-stripe span:nth-child(4) { background: var(--cv-green); }

/* Avviso bozza */
.draft-banner {
  background: var(--cv-lime); color: #1C1622; text-align: center;
  font-size: .85rem; font-weight: 700; padding: .4rem 1rem; letter-spacing: .04em;
}

/* Movimento ridotto */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
  .cover, .tape { transform: none; }
}

@media print {
  .topbar, .site-footer .follow, .draft-banner, .skip-link { display: none; }
  .article { break-inside: avoid-page; }
}

/* ---------- Ritocchi mobile ---------- */
.brand { white-space: nowrap; }
@media (max-width: 560px) {
  .topbar .wrap { flex-wrap: wrap; gap: 0; padding-block: .35rem; }
  .brand { font-size: 1.25rem; }
  .topnav { width: 100%; justify-content: space-between; gap: 0; margin-inline: -.6rem; width: calc(100% + 1.2rem); }
  .topnav a { font-size: .9rem; padding: .5rem .6rem; }
  .article { scroll-margin-top: 120px; }
}
@media (max-width: 759px) {
  .issue-hero .cover { display: none; }
}

/* ---------- Numero 2: nuovi elementi ---------- */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* frasi in grassetto del testo, messe in evidenza */
.statement {
  font-family: var(--font-display); font-style: italic; font-weight: 600;
  font-size: clamp(1.35rem, 3vw, 1.7rem); line-height: 1.3; color: var(--accent);
  margin: var(--space-3) 0 !important; padding-left: 1rem; border-left: 4px solid var(--accent);
}

/* battute di dialogo */
.voices { font-family: var(--font-display); font-style: italic; font-size: 1.45rem; line-height: 1.35; }
.litany--voices li { font-family: var(--font-display); font-style: italic; font-weight: 400; font-size: 1.15rem; }

.testimony {
  margin: var(--space-3) 0; padding: var(--space-2) var(--space-3);
  background: var(--lilac); border-radius: var(--radius);
  font-family: var(--font-display); font-style: italic; font-size: 1.2rem; line-height: 1.45;
}
.testimony p { margin: 0; }

/* "Parole che aiutano" / "Frasi da evitare" */
.say-grid { display: grid; gap: var(--space-2); grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); margin: var(--space-3) 0; }
.say { border-radius: var(--radius); padding: var(--space-2) var(--space-3); border: 2px solid; }
.say ul { list-style: none; margin: 0; padding: 0; }
.say li { font-family: var(--font-display); font-style: italic; font-size: 1.2rem; padding: .3rem 0; }
.say-head { font-weight: 700; margin: 0 0 .5rem !important; }
.say--yes { border-color: var(--accent); background: var(--accent-soft); }
.say--no { border-color: var(--ink-soft); border-style: dashed; }
.say--no li { color: var(--ink-soft); }

/* illustrazione a tutta pagina tra gli articoli */
.poster { margin: 0; padding: var(--space-5) 1rem; background: var(--ink); border-top: 1px solid var(--line); }
.poster img { width: min(560px, 100%); margin-inline: auto; border-radius: 6px; box-shadow: var(--shadow); }

.issue-nav { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; margin-top: 2rem; }

/* copertine nell'archivio */
.issue-card .thumb { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; object-position: top; border-radius: 8px; margin-bottom: var(--space-2); background: var(--lilac); }
