/* =====================================================================
   SETWEB MAGAZINE 2026 — main.css
   Linea grafica editoriale contemporanea.
   Display serif (Fraunces) + Sans (Inter), carta calda, accento vermiglio,
   color-coding per categoria, dark mode, griglia bento responsive.
   Autore: tema "Setweb Magazine" — sorgente unica condivisa da preview e WP.
   ===================================================================== */

/* ------------------------------------------------------------------ *
 * 1. TOKEN / VARIABILI
 * ------------------------------------------------------------------ */
:root {
  /* Palette — Light (default) */
  --paper:      #FBF8F3;   /* sfondo carta calda           */
  --paper-2:    #F2ECE2;   /* bande alternate              */
  --surface:    #FFFFFF;   /* card                         */
  --ink:        #15120E;   /* testo principale             */
  --ink-2:      #574F46;   /* testo secondario             */
  --ink-3:      #8B8175;   /* meta / faint                 */
  --line:       #E7DFD2;   /* hairline                     */
  --line-2:     #D8CFBF;   /* bordi più marcati            */

  --brand:      #D93A28;   /* vermiglio editoriale         */
  --brand-ink:  #B12B1B;   /* hover / testo su chiaro      */
  --brand-tint: #FBE9E5;   /* fondo tenue del brand        */

  /* Color-coding categorie */
  --cat-cinema:  #C0392B;
  --cat-arte:    #8B47B0;
  --cat-musica:  #2E74D0;
  --cat-moda:    #D6337E;
  --cat-viaggi:  #128A6F;
  --cat-casa:    #D07E12;
  --cat-eventi:  #D93A28;
  --cat-diritto: #3C5066;
  --cat-imprese: #1C7F73;

  /* Tipografia */
  --font-display: "Fraunces", "Iowan Old Style", Georgia, "Times New Roman", serif;
  --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  /* Scala tipografica fluida */
  --fs-eyebrow: 0.72rem;
  --fs-meta:    0.8rem;
  --fs-small:   0.9rem;
  --fs-base:    1.05rem;
  --fs-lead:    clamp(1.12rem, 0.95rem + 0.7vw, 1.35rem);
  --fs-h4:      clamp(1.05rem, 0.98rem + 0.35vw, 1.2rem);
  --fs-h3:      clamp(1.2rem,  1.05rem + 0.7vw, 1.55rem);
  --fs-h2:      clamp(1.6rem,  1.25rem + 1.6vw, 2.45rem);
  --fs-h1:      clamp(2.1rem,  1.5rem + 2.8vw, 3.4rem);
  --fs-display: clamp(2.6rem,  1.4rem + 5.4vw, 5.2rem);

  /* Spaziatura */
  --sp-1: 0.5rem;  --sp-2: 0.875rem; --sp-3: 1.25rem; --sp-4: 1.75rem;
  --sp-5: 2.5rem;  --sp-6: 3.5rem;   --sp-7: 5rem;    --sp-8: 7rem;

  /* Raggi */
  --r-sm: 8px; --r: 14px; --r-lg: 22px; --r-pill: 999px;

  /* Ombre */
  --shadow-sm: 0 1px 2px rgba(20,16,12,.05), 0 2px 6px rgba(20,16,12,.05);
  --shadow-md: 0 10px 30px -12px rgba(20,16,12,.20);
  --shadow-lg: 0 28px 64px -24px rgba(20,16,12,.32);

  /* Layout */
  --wrap: 1240px;
  --gutter: clamp(1rem, 0.4rem + 2.4vw, 2.75rem);

  --ease: cubic-bezier(.2, .7, .2, 1);
  --header-h: 116px;
}

/* Il magazine resta sul look originale chiaro anche se OS/browser sono in dark mode. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper:#FBF8F3; --paper-2:#F2ECE2; --surface:#FFFFFF;
    --ink:#15120E; --ink-2:#574F46; --ink-3:#8B8175;
    --line:#E7DFD2; --line-2:#D8CFBF;
    --brand:#D93A28; --brand-ink:#B12B1B; --brand-tint:#FBE9E5;
    --shadow-sm:0 1px 2px rgba(20,16,12,.05), 0 2px 6px rgba(20,16,12,.05);
    --shadow-md:0 10px 30px -12px rgba(20,16,12,.20);
    --shadow-lg:0 28px 64px -24px rgba(20,16,12,.32);
  }
}
[data-theme="dark"] {
  --paper:#14110E; --paper-2:#1B1712; --surface:#1D1914;
  --ink:#F4EFE7; --ink-2:#BCB3A6; --ink-3:#8B8175;
  --line:#2C261E; --line-2:#3A3328;
  --brand:#F0573F; --brand-ink:#F0573F; --brand-tint:#2A1612;
  --shadow-sm:0 1px 2px rgba(0,0,0,.4);
  --shadow-md:0 12px 32px -12px rgba(0,0,0,.6);
  --shadow-lg:0 28px 64px -24px rgba(0,0,0,.7);
}

/* ------------------------------------------------------------------ *
 * 2. RESET / BASE
 * ------------------------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: var(--fs-base);
  line-height: 1.65;
  font-feature-settings: "kern", "liga", "calt";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img, picture, svg, video { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: 0; background: none; color: inherit; }
ul[role="list"], ol[role="list"] { list-style: none; padding: 0; }
input, textarea, select { font: inherit; }
:focus-visible { outline: 3px solid var(--brand); outline-offset: 3px; border-radius: 4px; }

h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 600; line-height: 1.08; letter-spacing: -0.015em; color: var(--ink); }
h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); }

::selection { background: var(--brand); color: #fff; }

/* skip link accessibilità */
.skip-link {
  position: absolute; left: 50%; top: -60px; transform: translateX(-50%);
  background: var(--ink); color: var(--paper); padding: .6rem 1.1rem;
  border-radius: var(--r-pill); z-index: 9999; transition: top .2s var(--ease);
}
.skip-link:focus { top: 12px; }

/* ------------------------------------------------------------------ *
 * 3. LAYOUT
 * ------------------------------------------------------------------ */
.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: clamp(2.5rem, 1.5rem + 4vw, 5rem); }
.section--tight { padding-block: clamp(1.75rem, 1rem + 3vw, 3rem); }
.band { background: var(--paper-2); }

/* ------------------------------------------------------------------ *
 * 4. ELEMENTI EDITORIALI (eyebrow, pill, kicker)
 * ------------------------------------------------------------------ */
.eyebrow {
  font-size: var(--fs-eyebrow);
  text-transform: uppercase;
  letter-spacing: .16em;
  font-weight: 700;
  color: var(--ink-3);
}

/* Pill di categoria — color-coded */
.cat-pill {
  display: inline-flex; align-items: center; gap: .4em;
  font-size: var(--fs-eyebrow);
  font-weight: 700; text-transform: uppercase; letter-spacing: .1em;
  color: #fff; background: var(--c, var(--brand));
  padding: .34em .7em; border-radius: var(--r-pill);
  line-height: 1; white-space: nowrap;
  transition: filter .2s var(--ease), transform .2s var(--ease);
}
.cat-pill:hover { filter: brightness(1.08); }
/* le pill dentro a un body flex non devono stirarsi a tutta larghezza */
.card__body .cat-pill, .article-hero .cat-pill, .ranked .cat-pill { align-self: flex-start; width: fit-content; }
.cat-pill--ghost {
  color: var(--c, var(--brand)); background: transparent;
  padding-inline: 0; letter-spacing: .14em;
}
.cat-pill--ghost::before { content:""; width:18px; height:2px; background: var(--c,var(--brand)); border-radius:2px; }

/* mappa categorie -> colore (slug o classe) */
.cat-cinema  { --c: var(--cat-cinema); }
.cat-arte    { --c: var(--cat-arte); }
.cat-musica  { --c: var(--cat-musica); }
.cat-moda    { --c: var(--cat-moda); }
.cat-viaggi  { --c: var(--cat-viaggi); }
.cat-casa    { --c: var(--cat-casa); }
.cat-eventi  { --c: var(--cat-eventi); }
.cat-diritto { --c: var(--cat-diritto); }
.cat-imprese { --c: var(--cat-imprese); }

/* meta riga (data, autore, tempo lettura) */
.meta { display:flex; flex-wrap:wrap; align-items:center; gap:.5rem .75rem; color: var(--ink-3); font-size: var(--fs-meta); }
.meta .dot { width:3px; height:3px; border-radius:50%; background: currentColor; opacity:.6; }
.meta time, .meta .author { font-weight:500; }

/* Bottoni */
.btn {
  display:inline-flex; align-items:center; gap:.5rem;
  font-weight:600; font-size: var(--fs-small);
  padding:.8rem 1.4rem; border-radius: var(--r-pill);
  background: var(--ink); color: var(--paper);
  transition: transform .2s var(--ease), background .2s var(--ease), box-shadow .2s var(--ease);
}
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.btn--brand { background: var(--brand); color:#fff; }
.btn--ghost { background: transparent; color: var(--ink); border:1.5px solid var(--line-2); }
.btn--ghost:hover { border-color: var(--ink); background: var(--ink); color: var(--paper); }
.btn .arrow { transition: transform .25s var(--ease); }
.btn:hover .arrow { transform: translateX(3px); }

/* link "vedi tutto" */
.more-link { display:inline-flex; align-items:center; gap:.4rem; font-weight:600; font-size: var(--fs-small); color: var(--brand-ink); }
.more-link .arrow { transition: transform .25s var(--ease); }
.more-link:hover .arrow { transform: translateX(4px); }

/* ------------------------------------------------------------------ *
 * 5. TOP BAR (utility)
 * ------------------------------------------------------------------ */
.topbar {
  border-bottom: 1px solid var(--line);
  background: var(--paper);
  font-size: var(--fs-meta);
  color: var(--ink-2);
}
.topbar__row { display:flex; align-items:center; justify-content:space-between; gap:1rem; min-height:40px; }
.topbar__date { text-transform: capitalize; letter-spacing:.02em; }
.topbar__tools { display:flex; align-items:center; gap:1.1rem; }
.topbar__tools a { transition: color .2s var(--ease); }
.topbar__tools a:hover { color: var(--brand-ink); }
.icon-btn { display:inline-grid; place-items:center; width:34px; height:34px; border-radius:50%; transition: background .2s var(--ease), color .2s var(--ease); }
.icon-btn:hover { background: var(--paper-2); color: var(--brand-ink); }
.icon-btn svg { width:18px; height:18px; }

/* ------------------------------------------------------------------ *
 * 6. MASTHEAD + NAV
 * ------------------------------------------------------------------ */
.masthead { text-align:center; padding-block: clamp(1.5rem, 1rem + 2vw, 2.6rem) clamp(1rem,.6rem + 1.5vw,1.6rem); }
.brand-logo {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(2.2rem, 1.2rem + 4vw, 4rem);
  letter-spacing: 0;
  line-height: 1;
  display:inline-block;
}
.brand-logo b { color: var(--brand); font-weight:600; }
.brand-logo__set { color: var(--brand); }
.brand-logo__web, .brand-logo__dot { color: var(--ink); }
.brand-tagline { margin-top:.6rem; color: var(--ink-2); font-size: var(--fs-small); letter-spacing:.01em; }

/* nav sticky */
.nav {
  position: sticky; top: 0; z-index: 200;
  background: color-mix(in srgb, var(--paper) 82%, transparent);
  backdrop-filter: saturate(1.4) blur(12px);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-block: 1px solid var(--line);
  transition: box-shadow .25s var(--ease);
}
.nav.is-stuck { box-shadow: var(--shadow-sm); }
.nav__row { display:flex; align-items:center; gap:1rem; min-height:54px; }
.nav__brand-mini {
  font-family: var(--font-display); font-weight:600; font-size:1.15rem;
  opacity:0; transform: translateY(4px); pointer-events:none;
  transition: opacity .25s var(--ease), transform .25s var(--ease);
  white-space:nowrap;
}
.nav__brand-mini b { color: var(--brand); }
.nav__brand-mini .brand-logo__set { color: var(--brand); }
.nav__brand-mini .brand-logo__web, .nav__brand-mini .brand-logo__dot { color: var(--ink); }
.nav.is-stuck .nav__brand-mini { opacity:1; transform:none; pointer-events:auto; }

.nav__list { display:flex; align-items:center; gap:.2rem; margin-inline:auto; list-style:none; padding:0; flex-wrap:wrap; justify-content:center; }
.nav__list a {
  position:relative; display:block; padding:.55rem .7rem; font-weight:600; font-size:.92rem;
  color: var(--ink); border-radius: var(--r-sm); transition: color .2s var(--ease);
}
.nav__list a::after {
  content:""; position:absolute; left:.7rem; right:.7rem; bottom:.34rem; height:2px;
  background: var(--c, var(--brand)); border-radius:2px; transform: scaleX(0); transform-origin:left;
  transition: transform .25s var(--ease);
}
.nav__list a:hover, .nav__list .current-menu-item > a { color: var(--c, var(--brand-ink)); }
.nav__list a:hover::after, .nav__list .current-menu-item > a::after { transform: scaleX(1); }

.nav__toggle { display:none; align-items:center; gap:.5rem; font-weight:600; }
.nav__toggle .bars { width:22px; height:14px; position:relative; }
.nav__toggle .bars span { position:absolute; left:0; right:0; height:2px; background: var(--ink); border-radius:2px; transition: transform .25s var(--ease), opacity .2s var(--ease); }
.nav__toggle .bars span:nth-child(1){ top:0; }
.nav__toggle .bars span:nth-child(2){ top:6px; }
.nav__toggle .bars span:nth-child(3){ top:12px; }
body.menu-open .nav__toggle .bars span:nth-child(1){ transform: translateY(6px) rotate(45deg); }
body.menu-open .nav__toggle .bars span:nth-child(2){ opacity:0; }
body.menu-open .nav__toggle .bars span:nth-child(3){ transform: translateY(-6px) rotate(-45deg); }

/* ------------------------------------------------------------------ *
 * 7. CARD (varianti)
 * ------------------------------------------------------------------ */
.card { position:relative; display:flex; flex-direction:column; gap: .85rem; min-width:0; }
.card__media, .card__body { min-width:0; }
.card__media { position:relative; overflow:hidden; width:100%; max-width:100%; border-radius: var(--r); background: var(--paper-2); aspect-ratio: 16/10; }
.card__media img { width:100%; height:100%; object-fit:cover; transition: transform .6s var(--ease); }
.card:hover .card__media img { transform: scale(1.05); }
.card__media .cat-pill { position:absolute; top:.8rem; left:.8rem; z-index:2; box-shadow: var(--shadow-sm); }
.card__body { display:flex; flex-direction:column; gap:.5rem; }
.card__title { font-size: var(--fs-h4); line-height:1.18; overflow-wrap:break-word; }
.card__title a { background-image: linear-gradient(var(--ink),var(--ink)); background-size:0% 1.5px; background-position:0 100%; background-repeat:no-repeat; transition: background-size .3s var(--ease); overflow-wrap:anywhere; }
.card:hover .card__title a { background-size:100% 1.5px; }
.card__excerpt { color: var(--ink-2); font-size: var(--fs-small); line-height:1.55; }

/* card grande (titolo serif più ampio) */
.card--lg .card__title { font-size: var(--fs-h3); }
.card--lg .card__media { aspect-ratio: 16/11; }

/* card overlay (testo sull'immagine) — grid stacking: la card cresce col titolo,
   l'immagine riempie sempre tutta l'area. Niente overflow verso l'alto. */
.card--overlay { display:grid; }
.card--overlay .card__media { grid-area:1/1; width:100%; max-width:100%; aspect-ratio: 4/5; height:100%; border-radius: var(--r-lg); }
.card--overlay .card__body {
  grid-area:1/1; align-self:end; z-index:2;
  padding: clamp(1.35rem,1rem + 1.4vw,2.2rem); gap:.6rem;
  color:#fff;
}
.card--overlay .card__media::after {
  content:""; position:absolute; inset:0; z-index:1;
  background: linear-gradient(to top, rgba(8,6,5,.92) 0%, rgba(8,6,5,.62) 38%, rgba(8,6,5,.28) 70%, rgba(8,6,5,.12) 100%);
}
.card--overlay .card__title, .card--overlay .card__excerpt { text-shadow: 0 1px 24px rgba(0,0,0,.45); }
.card--overlay .card__title { color:#fff; }
.card--overlay .card__title a { background-image:none; }
.card--overlay:hover .card__title a { background-size:0; }
.card--overlay .card__excerpt { color: rgba(255,255,255,.85); }
.card--overlay .meta { color: rgba(255,255,255,.78); }
.card--overlay .card__media img { z-index:0; }
.card--overlay .cat-pill { position:relative; top:0; left:0; box-shadow:none; }

/* card hero (lead) */
.card--hero .card__media { aspect-ratio: 16/12; }
.card--hero .card__title { font-size: clamp(1.9rem, 1rem + 3.1vw, 3.2rem); line-height:1.05; letter-spacing:-0.02em; }
.card--hero .card__excerpt { font-size: var(--fs-lead); color: rgba(255,255,255,.88); max-width: 44ch; }

/* card orizzontale (lista secondaria) */
.card--row { flex-direction: row; gap:1rem; align-items:flex-start; }
.card--row .card__media { flex: 0 0 40%; max-width: 150px; aspect-ratio: 1/1; border-radius: var(--r-sm); }
.card--row .card__title { font-size: 1.02rem; }
.card--row .card__body { flex:1; gap:.35rem; }

/* card testo (no immagine) */
.card--text { padding: 1.3rem 0; border-top:1px solid var(--line); }

/* ------------------------------------------------------------------ *
 * 8. HERO / LEAD BLOCK
 * ------------------------------------------------------------------ */
.lead-grid { display:grid; grid-template-columns: 1.55fr 1fr; gap: clamp(1rem,.6rem + 1.5vw,2rem); align-items:stretch; }
.lead-grid .lead-main { height:100%; }
.lead-grid .lead-main .card__media { height:100%; min-height: 420px; }
.lead-aside { display:grid; grid-template-rows: 1fr 1fr; gap: clamp(1rem,.6rem + 1.5vw,1.5rem); }
.lead-aside .card { padding-bottom: clamp(1rem,.6rem + 1.5vw,1.5rem); border-bottom:1px solid var(--line); }
.lead-aside .card:last-child { border-bottom:0; padding-bottom:0; }

/* ------------------------------------------------------------------ *
 * 9. SECTION HEADER
 * ------------------------------------------------------------------ */
.sec-head { display:flex; align-items:flex-end; justify-content:space-between; gap:1rem; margin-bottom: clamp(1.25rem,.8rem + 1.5vw,2rem); }
.sec-head__title { display:flex; align-items:center; gap:.7rem; font-size: var(--fs-h2); }
.sec-head__title .tick { width:10px; height:1.1em; background: var(--c, var(--brand)); border-radius:3px; display:inline-block; }
.sec-head p { color: var(--ink-2); font-size: var(--fs-small); margin-top:.3rem; }

/* ------------------------------------------------------------------ *
 * 10. GRID BENTO / FEED
 * ------------------------------------------------------------------ */
.grid { display:grid; gap: clamp(1.25rem,.8rem + 1.6vw,2.2rem); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }
.grid--feed { grid-template-columns: repeat(3, 1fr); }

/* bento: prima card grande 2x2 */
.bento { display:grid; gap: clamp(1.25rem,.8rem + 1.6vw,2rem); grid-template-columns: repeat(4, 1fr); grid-auto-rows: auto; }
.bento > .card--feature { grid-column: span 2; grid-row: span 2; }
.bento > .card--feature .card__media { aspect-ratio: 4/3; height: 100%; }
.bento > .card--feature .card__title { font-size: var(--fs-h2); }
.bento > .card--wide { grid-column: span 2; }
.bento > .card--wide { flex-direction:row; gap:1.2rem; }
.bento > .card--wide .card__media { flex: 0 0 46%; aspect-ratio: 4/3; }
.bento > .card--wide .card__body { flex:1; justify-content:center; }

/* ------------------------------------------------------------------ *
 * 11. CATEGORY STRIP (scroll orizzontale)
 * ------------------------------------------------------------------ */
.scroller { display:grid; grid-auto-flow:column; grid-auto-columns: minmax(260px, 1fr); gap: clamp(1rem,.6rem + 1.4vw,1.6rem); overflow-x:auto; max-width:100%; scroll-snap-type:x mandatory; padding-bottom:1rem; scrollbar-width:thin; }
.scroller > * { scroll-snap-align:start; }
.scroller::-webkit-scrollbar { height:8px; }
.scroller::-webkit-scrollbar-thumb { background: var(--line-2); border-radius:99px; }

/* ------------------------------------------------------------------ *
 * 12. POPULAR (numerata)
 * ------------------------------------------------------------------ */
.ranked { display:flex; flex-direction:column; }
.ranked__item { display:flex; gap:1rem; align-items:flex-start; padding:1.1rem 0; border-top:1px solid var(--line); }
.ranked__item:first-child { border-top:0; }
.ranked__num { font-family: var(--font-display); font-size: 2.1rem; font-weight:600; line-height:1; color: var(--line-2); flex:0 0 auto; width:1.6em; }
.ranked__item:hover .ranked__num { color: var(--brand); }
.ranked__title { font-family: var(--font-display); font-weight:600; font-size:1.05rem; line-height:1.22; }
.ranked__title a:hover { color: var(--brand-ink); }

/* ------------------------------------------------------------------ *
 * 13. NEWSLETTER BAND
 * ------------------------------------------------------------------ */
/* Banda sempre scura, indipendente dal tema (in dark var(--ink) diventerebbe chiaro
   rendendo invisibili testo bianco e input). */
.newsletter { background: #15120E; color: #fff; border-radius: var(--r-lg); padding: clamp(2rem,1.4rem + 3vw,3.6rem); position:relative; overflow:hidden; }
[data-theme="dark"] .newsletter, :root:not([data-theme="light"]) .newsletter { border: 1px solid #322a20; }
.newsletter::before { content:""; position:absolute; right:-80px; top:-80px; width:320px; height:320px; border-radius:50%; background: radial-gradient(circle at center, var(--brand) 0%, transparent 70%); opacity:.5; }
.newsletter__inner { position:relative; display:grid; grid-template-columns: 1.1fr 1fr; gap: clamp(1.5rem,1rem + 2vw,3rem); align-items:center; }
.newsletter h2 { color: #fff; font-size: var(--fs-h2); }
.newsletter p { color: rgba(255,255,255,.7); margin-top:.6rem; }
.newsletter form { display:flex; gap:.6rem; flex-wrap:wrap; }
.newsletter input[type=email] { flex:1; min-width:220px; padding:.95rem 1.2rem; border-radius: var(--r-pill); border:1.5px solid rgba(255,255,255,.2); background: rgba(255,255,255,.06); color:#fff; }
.newsletter input::placeholder { color: rgba(255,255,255,.55); }
.newsletter input:focus { outline:none; border-color: var(--brand); background: rgba(255,255,255,.1); }
.newsletter .form-note { font-size: var(--fs-meta); color: rgba(255,255,255,.55); margin-top:.8rem; }
.newsletter .form-note a { text-decoration: underline; }

/* ------------------------------------------------------------------ *
 * 14. CONTENT + SIDEBAR (archivi / blog)
 * ------------------------------------------------------------------ */
.with-aside { display:grid; grid-template-columns: minmax(0,1fr) 320px; gap: clamp(1.5rem,1rem + 3vw,3.5rem); align-items:start; }
.sidebar { position:sticky; top: calc(var(--header-h) - 40px); display:flex; flex-direction:column; gap: 2rem; }
.widget { background: var(--surface); border:1px solid var(--line); border-radius: var(--r); padding: 1.4rem; }
.band .widget, [data-theme] .widget { box-shadow: var(--shadow-sm); }
.widget__title { font-family: var(--font-sans); font-size: var(--fs-meta); text-transform:uppercase; letter-spacing:.14em; font-weight:700; color: var(--ink-3); margin-bottom:1rem; padding-bottom:.7rem; border-bottom:1px solid var(--line); }
.widget ul { list-style:none; padding:0; display:flex; flex-direction:column; gap:.7rem; }
.widget a:hover { color: var(--brand-ink); }
.tagcloud { display:flex; flex-wrap:wrap; gap:.5rem; }
.tagcloud a { font-size:.82rem; padding:.35rem .7rem; border:1px solid var(--line-2); border-radius: var(--r-pill); color: var(--ink-2); transition: all .2s var(--ease); }
.tagcloud a:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }

/* ------------------------------------------------------------------ *
 * 15. SINGOLO ARTICOLO
 * ------------------------------------------------------------------ */
.reading-bar { position:fixed; top:0; left:0; height:3px; width:0; background: var(--brand); z-index:9999; transition: width .1s linear; }

.article-hero { text-align:center; max-width: 820px; margin-inline:auto; padding-top: clamp(1.5rem,1rem + 2vw,2.5rem); }
.article-hero .cat-pill { margin-bottom:1.1rem; }
.article-hero h1 { font-size: var(--fs-h1); margin-bottom:1rem; }
.article-hero .dek { font-size: var(--fs-lead); color: var(--ink-2); font-family: var(--font-display); font-weight:400; font-style:italic; line-height:1.4; }
.article-byline { display:flex; align-items:center; justify-content:center; gap:.75rem; margin-top:1.5rem; flex-wrap:wrap; }
.avatar { width:42px; height:42px; border-radius:50%; object-fit:cover; background: var(--paper-2); }
.article-figure { margin: clamp(1.5rem,1rem + 2vw,2.5rem) 0; }
.article-figure img { width:100%; border-radius: var(--r-lg); }
.article-figure figcaption { text-align:center; color: var(--ink-3); font-size: var(--fs-meta); margin-top:.7rem; }

.prose { max-width: 720px; margin-inline:auto; font-size: 1.14rem; line-height: 1.78; color: var(--ink); }
.prose > * + * { margin-top: 1.4rem; }
.prose p { hyphens:auto; }
.prose h2 { font-size: clamp(1.5rem,1.2rem + 1.2vw,2rem); margin-top: 2.6rem; }
.prose h3 { margin-top: 2rem; }
.prose a { color: var(--brand-ink); text-decoration: underline; text-underline-offset:3px; text-decoration-thickness:1.5px; }
.prose blockquote { border-left: 4px solid var(--brand); padding-left: 1.4rem; font-family: var(--font-display); font-size:1.35rem; font-style:italic; color: var(--ink); line-height:1.4; }
.prose img { border-radius: var(--r); }
.prose ul, .prose ol { padding-left: 1.4rem; }
.prose li::marker { color: var(--brand); }
.prose figure { margin: 2rem 0; }
.prose code { background: var(--paper-2); padding:.15em .4em; border-radius:6px; font-size:.9em; }
.prose hr { border:0; height:1px; background: var(--line); margin:2.5rem 0; }
.drop-cap::first-letter { font-family: var(--font-display); font-size: 3.6em; line-height:.8; float:left; padding:.05em .12em 0 0; color: var(--brand); font-weight:600; }

.share { display:flex; gap:.6rem; align-items:center; }
.share .icon-btn { border:1px solid var(--line-2); }
.tags-row { display:flex; flex-wrap:wrap; gap:.5rem; margin-top:1.5rem; }

.article-foot { max-width:720px; margin-inline:auto; padding-top:2rem; margin-top:2.5rem; border-top:1px solid var(--line); display:flex; justify-content:space-between; align-items:center; gap:1rem; flex-wrap:wrap; }

/* author box */
.author-box { max-width:720px; margin: 2.5rem auto 0; display:flex; gap:1.2rem; align-items:flex-start; background: var(--surface); border:1px solid var(--line); border-radius: var(--r-lg); padding: 1.6rem; }
.author-box .avatar { width:64px; height:64px; }
.author-box h4 { font-family: var(--font-display); font-size:1.2rem; }
.author-box p { color: var(--ink-2); font-size: var(--fs-small); margin-top:.3rem; }

/* ------------------------------------------------------------------ *
 * 16. BREADCRUMB + PAGINATION
 * ------------------------------------------------------------------ */
.crumbs { display:flex; flex-wrap:wrap; gap:.45rem; font-size: var(--fs-meta); color: var(--ink-3); }
.crumbs a:hover { color: var(--brand-ink); }
.crumbs .sep { opacity:.6; }

.pagination { display:flex; justify-content:center; gap:.4rem; margin-top: clamp(2rem,1.4rem + 2vw,3.5rem); }
.pagination a, .pagination span { display:grid; place-items:center; min-width:44px; height:44px; padding:0 .6rem; border-radius: var(--r-sm); border:1px solid var(--line-2); font-weight:600; transition: all .2s var(--ease); }
.pagination a:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.pagination .current { background: var(--brand); color:#fff; border-color: var(--brand); }

/* ------------------------------------------------------------------ *
 * 17. FOOTER
 * ------------------------------------------------------------------ */
/* Footer sempre scuro (in dark var(--ink) diventerebbe chiaro, rendendo il testo bianco illeggibile). */
.site-footer { background: #15120E; color: rgba(255,255,255,.72); margin-top: clamp(3rem,2rem + 4vw,6rem); padding-block: clamp(3rem,2rem + 4vw,5rem) 2rem; border-top:0; }
[data-theme="dark"] .site-footer, :root:not([data-theme="light"]) .site-footer { border-top:0; }
.footer-grid { display:grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: clamp(1.5rem,1rem + 2vw,3rem); padding-bottom: clamp(2rem,1.5rem + 2vw,3rem); border-bottom:1px solid rgba(255,255,255,.12); }
.footer-brand .brand-logo { color:#fff; font-size:2rem; }
.site-footer .brand-logo__web, .site-footer .brand-logo__dot { color:#fff; }
.footer-brand p { margin-top:1rem; font-size: var(--fs-small); max-width: 34ch; }
.footer-col h5 { color:#fff; font-family: var(--font-sans); font-size: var(--fs-meta); text-transform:uppercase; letter-spacing:.14em; margin-bottom:1.1rem; }
.footer-col ul { list-style:none; padding:0; display:flex; flex-direction:column; gap:.65rem; }
.site-footer a { color: rgba(255,255,255,.72); background: transparent !important; box-shadow:none !important; text-decoration:none; }
.footer-col a { font-size: var(--fs-small); transition: color .2s var(--ease); }
.footer-col a:hover { color:#fff; }
.footer-bottom { display:flex; justify-content:space-between; align-items:center; gap:1rem; flex-wrap:wrap; padding-top:1.6rem; font-size: var(--fs-meta); color: rgba(255,255,255,.55); }
.footer-bottom .legal { display:flex; gap:1.2rem; flex-wrap:wrap; }
.footer-bottom a:hover { color:#fff; }
.footer-disclaimer { margin-top:1.2rem; font-size:.78rem; line-height:1.6; color: rgba(255,255,255,.45); max-width: 90ch; white-space:pre-line; }
.site-footer .widget {
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  padding: 0;
}
.site-footer .widget__title, .site-footer .widget-title { color:#fff; }
.site-footer .widget a:hover { color:#fff; }
.social { display:flex; gap:.5rem; }
.social a { width:38px; height:38px; border-radius:50%; display:grid; place-items:center; background: rgba(255,255,255,.08); transition: background .2s var(--ease), transform .2s var(--ease); }
.social a:hover { background: var(--brand); transform: translateY(-2px); }
.social svg { width:18px; height:18px; }

/* ------------------------------------------------------------------ *
 * 18. MOBILE DRAWER
 * ------------------------------------------------------------------ */
.drawer { position:fixed; inset:0; z-index:500; visibility:hidden; overflow:hidden; }
.drawer__scrim { position:absolute; inset:0; background: rgba(10,8,6,.5); opacity:0; transition: opacity .3s var(--ease); }
.drawer__panel { position:absolute; top:0; right:0; bottom:0; width: min(360px, 86vw); background: var(--paper); box-shadow: var(--shadow-lg); transform: translateX(100%); transition: transform .35s var(--ease); display:flex; flex-direction:column; padding: 1.5rem; overflow-y:auto; }
body.menu-open .drawer { visibility:visible; }
body.menu-open .drawer__scrim { opacity:1; }
body.menu-open .drawer__panel { transform: none; }
.drawer__head { display:flex; align-items:center; justify-content:space-between; margin-bottom:1.5rem; }
.drawer__panel nav a { display:block; padding:.9rem .4rem; font-family: var(--font-display); font-size:1.35rem; font-weight:600; border-bottom:1px solid var(--line); }
.drawer__panel nav a .dotc { display:inline-block; width:8px; height:8px; border-radius:50%; background: var(--c,var(--brand)); margin-right:.6rem; vertical-align:middle; }

/* ------------------------------------------------------------------ *
 * 19. ANIMAZIONI REVEAL
 * ------------------------------------------------------------------ */
/* Le animazioni reveal si attivano SOLO con JS abilitato (html.js):
   senza JavaScript il contenuto resta pienamente visibile (SEO/accessibilità). */
.reveal { transition: opacity .6s var(--ease), transform .6s var(--ease); }
html.js .reveal { opacity:0; transform: translateY(18px); }
html.js .reveal.is-in { opacity:1; transform:none; }
@media (prefers-reduced-motion: reduce) { html.js .reveal { opacity:1; transform:none; } }

/* ------------------------------------------------------------------ *
 * 20. UTILITIES
 * ------------------------------------------------------------------ */
.sr-only { position:absolute!important; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }
.divider { height:1px; background: var(--line); border:0; }
.text-center { text-align:center; }
.mt-0{margin-top:0}.flow > * + *{margin-top:1rem}

/* ------------------------------------------------------------------ *
 * 21. RESPONSIVE
 * ------------------------------------------------------------------ */
@media (max-width: 1024px) {
  .lead-grid { grid-template-columns: 1fr; }
  .lead-aside { grid-template-rows:none; grid-template-columns: 1fr 1fr; }
  .bento { grid-template-columns: repeat(2, 1fr); }
  .bento > .card--feature { grid-column: span 2; grid-row: auto; }
  .bento > .card--wide { grid-column: span 2; }
  .grid--4 { grid-template-columns: repeat(3, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
  .with-aside { grid-template-columns: 1fr; }
  .sidebar { position:static; flex-direction:row; flex-wrap:wrap; }
  .sidebar .widget { flex:1; min-width:260px; }
}

@media (max-width: 760px) {
  :root { --header-h: 64px; }
  .masthead { padding-block: 1.1rem .9rem; }
  .brand-logo { font-size: clamp(2rem, 1.35rem + 6vw, 3rem); }
  .brand-tagline { max-width: 30ch; margin-inline:auto; line-height:1.5; }
  .nav__list { display:none; }
  .nav__toggle { display:flex; }
  .nav__row { justify-content:space-between; }
  .nav__brand-mini { opacity:1; transform:none; pointer-events:auto; }
  .topbar__date { display:none; }
  .grid--3, .grid--feed, .grid--4 { grid-template-columns: 1fr; }
  /* Bento → colonna semplice su mobile: niente span di griglia, niente media a
     height:100%, niente immagini che sforano o card che si sovrappongono. */
  .bento { display:flex; flex-direction:column; }
  .bento > .card { width:100%; }
  .bento > .card--feature .card__media { height:auto; aspect-ratio:16/10; }
  .bento > .card--feature .card__title { font-size: var(--fs-h3); }
  .bento > .card--wide { flex-direction:column; }
  .bento > .card--wide .card__media { flex:none; width:100%; aspect-ratio:16/10; }
  .lead-aside { grid-template-columns: 1fr; }
  .lead-grid .lead-main .card__media { height:auto; min-height: 0; aspect-ratio: 16/11; }
  .card--hero .card__title { font-size: clamp(1.35rem,.95rem + 4.2vw,1.85rem); line-height:1.08; }
  .card--hero .card__excerpt, .card--hero .meta { display:none; }
  .card--overlay .card__body { padding:1.15rem; }
  .newsletter__inner { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-bottom { flex-direction:column; align-items:flex-start; }
  .article-foot { flex-direction:column; align-items:flex-start; }
  .scroller { grid-auto-columns: minmax(78%, 1fr); }
}

@media (max-width: 460px) {
  .footer-grid { grid-template-columns: 1fr; }
  .lead-aside .card--row .card__media { max-width: 110px; }
  .lead-grid .lead-main .card__media { aspect-ratio: 4/3; }
}

[data-theme="dark"] .newsletter, :root:not([data-theme="light"]) .newsletter { border:1px solid var(--line); }
.sw-legal-footer { display:none !important; }

/* ==================================================================== *
 * 22. INTEGRAZIONE WORDPRESS
 * ==================================================================== */

/* Logo personalizzato */
.custom-logo-wrap { display:flex; justify-content:center; }
.custom-logo { max-height: 64px; width:auto; height:auto; }
.nav__brand-mini .custom-logo, .footer-brand .custom-logo { max-height: 40px; }

/* Placeholder quando manca l'immagine in evidenza */
.card__ph { position:absolute; inset:0; background:
  radial-gradient(120% 100% at 0% 0%, color-mix(in srgb, var(--c, var(--brand)) 30%, var(--surface)), var(--surface) 70%); }
.card__ph::after { content:""; position:absolute; inset:0; background:
  repeating-linear-gradient(135deg, transparent 0 14px, color-mix(in srgb, var(--c, var(--brand)) 7%, transparent) 14px 15px); }

/* Ricerca: overlay centrale */
body.search-open { overflow:hidden; }
.search-pop { position:relative; }
.search-pop > summary { list-style:none; cursor:pointer; }
.search-pop > summary::-webkit-details-marker { display:none; }
.search-pop[open]::before {
  content:""; position:fixed; inset:0; z-index:850;
  background:rgba(8,6,5,.58);
  backdrop-filter: blur(9px) saturate(1.05);
  -webkit-backdrop-filter: blur(9px) saturate(1.05);
}
.search-pop__panel {
  position:fixed; inset:0; z-index:860; display:grid; place-items:center;
  padding:clamp(1rem,3vw,2rem); background:transparent; border:0; box-shadow:none;
}
.search-pop__box {
  width:min(680px, calc(100vw - 2rem));
  background:var(--surface);
  border:1px solid var(--line);
  border-radius:var(--r-lg);
  box-shadow:0 32px 90px -28px rgba(0,0,0,.55);
  padding:clamp(1.05rem,.85rem + 1.2vw,1.65rem);
}
.search-pop__head { display:flex; align-items:center; justify-content:space-between; gap:1rem; margin-bottom:1rem; }
.search-pop__head p {
  margin:0; font-family:var(--font-display); font-size:clamp(1.35rem,1.05rem + 1.5vw,2rem);
  font-weight:600; line-height:1.05; color:var(--ink);
}
.search-pop__close { flex:0 0 auto; border:1px solid var(--line); background:var(--paper); }
.search-pop[open] > summary { background:var(--paper-2); color:var(--brand-ink); }

/* Form di ricerca */
.search-form { display:flex; gap:.5rem; }
.search-field { flex:1; min-width:0; padding:.7rem 1rem; border-radius:var(--r-pill);
  border:1.5px solid var(--line-2); background:var(--paper); color:var(--ink); }
.search-field:focus { outline:none; border-color:var(--brand); }
.search-submit { display:grid; place-items:center; width:44px; height:44px; flex:0 0 auto;
  border-radius:50%; background:var(--brand); color:#fff; }
.search-submit svg { width:18px; height:18px; }
.search-pop__box .search-form { gap:.75rem; }
.search-pop__box .search-field { min-height:58px; padding:1rem 1.25rem; font-size:1.1rem; border-radius:var(--r-pill); }
.search-pop__box .search-submit { width:58px; height:58px; }
.search-pop__box .search-submit svg { width:22px; height:22px; }
.drawer__search { margin-top:1.5rem; }

/* Menu nel drawer (wp_nav_menu) */
.drawer__menu { list-style:none; margin:0; padding:0; }
.drawer__panel nav a::before { content:""; display:inline-block; width:8px; height:8px;
  border-radius:50%; background:var(--c, var(--brand)); margin-right:.6rem; vertical-align:middle; }

/* Menu legale nel footer */
.footer-bottom ul.legal { list-style:none; margin:0; padding:0; }
.footer-col .menu, .footer-col ul { list-style:none; margin:0; padding:0; }
.footer-col .menu li, .footer-col ul li { margin:0 0 .65rem; }
.site-footer .footer-col ul li { margin:0; }

/* Drop-cap automatico sul primo paragrafo dell'articolo */
.single .entry-content.prose > p:first-of-type::first-letter,
.drop-cap::first-letter {
  font-family: var(--font-display); font-size: 3.6em; line-height:.8; float:left;
  padding:.05em .12em 0 0; color: var(--brand); font-weight:600;
}

/* Navigazione articolo precedente/successivo */
.post-nav { max-width:720px; margin:2.5rem auto 0; }
.post-navigation .nav-links { display:flex; gap:1rem; justify-content:space-between; }
.post-navigation .nav-links > div { flex:1; }
.post-navigation .nav-next { text-align:right; }
.post-navigation a { display:flex; flex-direction:column; gap:.35rem; padding:1.1rem 1.3rem;
  border:1px solid var(--line); border-radius:var(--r); transition:border-color .2s var(--ease), transform .2s var(--ease); }
.post-navigation a:hover { border-color:var(--ink); transform:translateY(-2px); }
.post-nav__title { font-family:var(--font-display); font-weight:600; font-size:1.02rem; line-height:1.2; color:var(--ink); }

/* Intestazioni archivio */
.archive-head { margin-bottom: clamp(1.5rem,1rem + 1.5vw,2.25rem); }
.archive-desc { color:var(--ink-2); margin-top:.6rem; max-width:60ch; }

/* Contenuto a blocchi / allineamenti */
.entry-content .alignwide { margin-inline:calc(50% - 50vw); max-width:100vw; }
.entry-content .alignfull { margin-inline:calc(50% - 50vw); max-width:100vw; }
.entry-content .alignleft { float:left; margin:.4rem 1.5rem 1rem 0; }
.entry-content .alignright { float:right; margin:.4rem 0 1rem 1.5rem; }
.entry-content .aligncenter { margin-inline:auto; }
.entry-content figcaption, .wp-caption-text { color:var(--ink-3); font-size:var(--fs-meta); text-align:center; margin-top:.5rem; }
.wp-block-pullquote, .entry-content .wp-block-quote { border-left:4px solid var(--brand); padding-left:1.4rem; }
.sticky-badge { color:var(--brand); }

/* Commenti */
.comments-area { margin-top:1rem; }
.comment-list { list-style:none; margin:0 0 2rem; padding:0; }
.comment-list ol.children { list-style:none; margin:0 0 0 1.5rem; padding:0; border-left:1px solid var(--line); padding-left:1.2rem; }
.comment-body { padding:1.2rem 0; border-bottom:1px solid var(--line); }
.comment-author { display:flex; align-items:center; gap:.6rem; }
.comment-author .avatar { width:40px; height:40px; border-radius:50%; }
.comment-author .fn { font-weight:600; font-style:normal; }
.comment-metadata { font-size:var(--fs-meta); color:var(--ink-3); margin:.2rem 0 .6rem; }
.comment-metadata a { color:inherit; }
.reply { font-size:var(--fs-small); }
.comment-respond { background:var(--surface); border:1px solid var(--line); border-radius:var(--r-lg); padding:1.6rem; margin-top:1.5rem; }
.comment-form { display:flex; flex-direction:column; gap:1rem; }
.comment-form label { font-size:var(--fs-small); font-weight:600; display:block; margin-bottom:.3rem; }
.comment-form input[type=text], .comment-form input[type=email], .comment-form input[type=url], .comment-form textarea {
  width:100%; padding:.8rem 1rem; border:1.5px solid var(--line-2); border-radius:var(--r-sm); background:var(--paper); color:var(--ink); }
.comment-form input:focus, .comment-form textarea:focus { outline:none; border-color:var(--brand); }
.comment-form .form-submit { margin:0; }

/* Page links */
.page-links { margin-top:2rem; display:flex; gap:.5rem; align-items:center; font-weight:600; }
.page-links a, .page-links > span { display:grid; place-items:center; min-width:38px; height:38px; border:1px solid var(--line-2); border-radius:var(--r-sm); }
.page-links a:hover { background:var(--ink); color:var(--paper); }

/* Mailchimp newsletter widget */
.widget_mc4wp_form_widget {
  position: relative;
  overflow: hidden;
  background: #15120E;
  color: #fff;
  border: 0;
  border-radius: var(--r-lg);
  padding: 1.45rem;
  box-shadow: var(--shadow-md);
}
.widget_mc4wp_form_widget::before {
  content: "";
  position: absolute;
  inset: -35% -20% auto auto;
  width: 170px;
  height: 170px;
  border-radius: 999px;
  background: rgba(217,58,40,.22);
  filter: blur(2px);
  pointer-events: none;
}
.widget_mc4wp_form_widget .widget__title { display: none; }
.setweb-mc4wp-card { position: relative; display: flex; flex-direction: column; gap: .9rem; }
.setweb-mc4wp-eyebrow {
  color: var(--brand);
  text-transform: uppercase;
  font-size: var(--fs-eyebrow);
  letter-spacing: .14em;
  font-weight: 800;
  margin: 0;
}
.setweb-mc4wp-card h3 {
  color: #fff;
  font-family: var(--font-display);
  font-size: 1.45rem;
  line-height: 1.05;
  margin: 0;
}
.setweb-mc4wp-card p { color: rgba(255,255,255,.72); font-size: var(--fs-small); line-height: 1.5; margin: 0; }
.setweb-mc4wp-field span {
  display: block;
  color: rgba(255,255,255,.78);
  font-size: var(--fs-meta);
  font-weight: 700;
  margin-bottom: .35rem;
}
.setweb-mc4wp-field input[type=email] {
  width: 100%;
  border: 1px solid rgba(255,255,255,.18);
  background: rgba(255,255,255,.07);
  color: #fff;
  border-radius: var(--r-pill);
  padding: .85rem 1rem;
}
.setweb-mc4wp-field input::placeholder { color: rgba(255,255,255,.55); }
.setweb-mc4wp-consent {
  display: flex;
  gap: .55rem;
  align-items: flex-start;
  color: rgba(255,255,255,.62);
  font-size: .78rem;
  line-height: 1.45;
}
.setweb-mc4wp-consent input { margin-top: .18rem; flex: 0 0 auto; }
.setweb-mc4wp-consent a { color: #fff; text-decoration: underline; text-underline-offset: 2px; }
.setweb-mc4wp-card input[type=submit] {
  width: 100%;
  border: 0;
  border-radius: var(--r-pill);
  background: var(--brand);
  color: #fff;
  font-weight: 800;
  padding: .88rem 1.1rem;
  cursor: pointer;
}
.setweb-mc4wp-card input[type=submit]:hover { background: var(--brand-ink); }

@media (max-width:600px){
  .post-navigation .nav-links { flex-direction:column; }
  .post-navigation .nav-next { text-align:left; }
  .search-pop__panel { padding:1rem; align-items:start; padding-top:16vh; }
  .search-pop__box { width:100%; border-radius:18px; padding:1rem; }
  .search-pop__head { margin-bottom:.85rem; }
  .search-pop__box .search-form { gap:.55rem; }
  .search-pop__box .search-field { min-height:52px; font-size:1rem; padding:.85rem 1rem; }
  .search-pop__box .search-submit { width:52px; height:52px; }
}
