/* Sito pubblico della rivista: stessi caratteri e colori del PDF */
@font-face { font-family: 'EB Garamond'; src: url('/assets/fonts/EBGaramond-Regular.ttf') format('truetype'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'EB Garamond'; src: url('/assets/fonts/EBGaramond-Italic.ttf') format('truetype'); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: 'EB Garamond'; src: url('/assets/fonts/EBGaramond-Bold.ttf') format('truetype'); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: 'EB Garamond'; src: url('/assets/fonts/EBGaramond-BoldItalic.ttf') format('truetype'); font-weight: 700; font-style: italic; font-display: swap; }
@font-face { font-family: 'Montserrat'; src: url('/assets/fonts/Montserrat-Regular.ttf') format('truetype'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Montserrat'; src: url('/assets/fonts/Montserrat-Bold.ttf') format('truetype'); font-weight: 700; font-display: swap; }

:root {
  --blue: #003366;
  --bronze: #b06a26;
  --bg: #faf8f4;
  --surface: #ffffff;
  --text: #1d2228;
  --text-2: #4c5560;
  --text-3: #7a828c;
  --border: #e4dfd6;
  --link: #003366;
  --box: #eaf0f7;
  --serif: 'EB Garamond', Georgia, 'Times New Roman', serif;
  --sans: 'Montserrat', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --shadow: 0 10px 30px rgb(0 20 50 / 0.18), 0 2px 6px rgb(0 20 50 / 0.12);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #12161b;
    --surface: #1a2027;
    --text: #e8e6e1;
    --text-2: #b9bcc0;
    --text-3: #8a9097;
    --border: #2c343d;
    --link: #8fb6e6;
    --box: #1d2a3a;
    --bronze: #d9954f;
    --shadow: 0 10px 30px rgb(0 0 0 / 0.5);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.6 var(--sans); }
a { color: var(--link); }
img { max-width: 100%; }
.wrap { max-width: 1160px; margin: 0 auto; padding: 0 20px; }
.wrap-text { max-width: 720px; margin-left: auto; margin-right: auto; padding: 0 20px; }

/* --- Testata --- */
.site-header { background: var(--blue); color: #fff; border-bottom: 4px solid var(--bronze); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 72px; flex-wrap: wrap; padding-top: 8px; padding-bottom: 8px; }
.brand { display: flex; align-items: center; gap: 12px; color: #fff; text-decoration: none; }
.brand img { width: 44px; height: 44px; object-fit: contain; }
.brand-text { display: grid; line-height: 1.1; }
.brand-name { font: 700 18px var(--sans); letter-spacing: 0.08em; text-transform: uppercase; }
.brand-sub { font: 13px var(--serif); letter-spacing: 0.2em; opacity: 0.8; }
.site-nav { display: flex; gap: 6px; }
.site-nav a { color: #fff; text-decoration: none; padding: 8px 14px; border-radius: 999px; font-size: 14px; font-weight: 700; opacity: 0.85; }
.site-nav a:hover, .site-nav a[aria-current] { opacity: 1; background: rgb(255 255 255 / 0.12); }

/* --- Elementi comuni --- */
.eyebrow { margin: 0 0 10px; font-size: 13px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--bronze); }
.eyebrow a { color: inherit; }
.lead { font: 21px/1.5 var(--serif); color: var(--text-2); margin: 0; }
.section-title { font: 700 13px var(--sans); letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-3); margin: 48px 0 20px; padding-bottom: 10px; border-bottom: 1px solid var(--border); }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.section-head .section-title { flex: 1; }
.section-head a { font-size: 14px; font-weight: 700; text-decoration: none; }
.button { display: inline-flex; align-items: center; gap: 8px; padding: 11px 20px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--text); font: 700 14px var(--sans); text-decoration: none; cursor: pointer; }
.button:hover { border-color: var(--text-3); }
.button.primary { background: var(--blue); border-color: var(--blue); color: #fff; }
.button.primary:hover { filter: brightness(1.15); }
.actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 24px; }
.kicker { display: inline-flex; align-items: center; gap: 6px; font: 700 12px var(--sans); letter-spacing: 0.08em; text-transform: uppercase; color: var(--section, var(--bronze)); }
.kicker::before { content: ''; width: 8px; height: 8px; border-radius: 2px; background: var(--section, var(--bronze)); }
.empty { padding: 64px 20px; text-align: center; color: var(--text-2); }
.page-head { padding-top: 40px; }
.page-head h1 { font: 700 44px/1.1 var(--serif); margin: 0 0 8px; }

/* --- Copertine --- */
.cover { display: block; aspect-ratio: 21 / 29.7; background: var(--surface); box-shadow: var(--shadow); border-radius: 2px; overflow: hidden; transition: transform 0.2s; }
.cover:hover { transform: translateY(-3px); }
.cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cover-placeholder { display: grid; place-items: center; height: 100%; padding: 16px; text-align: center; font: 700 20px var(--serif); color: #fff; background: var(--blue); }
.cover-lg { width: min(340px, 80vw); flex: none; }

/* --- Apertura (home e numero) --- */
.hero { background: linear-gradient(180deg, var(--surface), var(--bg)); border-bottom: 1px solid var(--border); }
.hero-inner { display: flex; gap: 56px; align-items: center; padding-top: 48px; padding-bottom: 48px; }
.hero-text h1 { font: 700 clamp(30px, 4vw, 48px)/1.1 var(--serif); margin: 0 0 16px; color: var(--text); }

/* --- Articoli in griglia --- */
.grid-articles { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 28px; }
.card-article a { display: grid; gap: 8px; text-decoration: none; color: inherit; height: 100%; padding-bottom: 20px; border-bottom: 1px solid var(--border); }
.card-article .card-img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 4px; background: var(--surface); }
.card-article h3 { font: 700 23px/1.2 var(--serif); margin: 0; }
.card-article a:hover h3 { color: var(--link); }
.card-article p { margin: 0; color: var(--text-2); font-size: 15px; }
.card-article .byline { font-size: 13px; color: var(--text-3); }
.card-article.president a { padding: 20px; border: 0; border-radius: 6px; background: var(--blue); color: #fff; }
.card-article.president .kicker { color: #e8b77f; }
.card-article.president .kicker::before { background: #e8b77f; }
.card-article.president p { color: rgb(255 255 255 / 0.85); }

/* --- Elenco dei numeri --- */
.grid-issues { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 36px 28px; }
.issue { display: grid; gap: 10px; align-content: start; }
.issue-title { font: 700 19px/1.2 var(--serif); color: var(--text); text-decoration: none; }
.issue-date { font-size: 13px; color: var(--text-3); }

/* --- Sommario del numero --- */
.toc { padding-bottom: 32px; }
.toc-section { display: grid; grid-template-columns: 240px 1fr; gap: 0 32px; padding: 24px 0; border-bottom: 1px solid var(--border); }
.toc-section-name { grid-row: span 99; margin: 4px 0 0; font: 700 13px var(--sans); letter-spacing: 0.08em; text-transform: uppercase; color: var(--section); display: flex; gap: 8px; align-items: baseline; }
.toc-section-name::before { content: ''; width: 10px; height: 10px; border-radius: 2px; background: var(--section); flex: none; }
.toc-item { display: grid; gap: 2px; padding: 8px 0 14px; text-decoration: none; color: inherit; }
.toc-title { font: 700 24px/1.2 var(--serif); }
.toc-item:hover .toc-title { color: var(--link); }
.toc-meta { font-size: 13px; color: var(--text-3); }
.toc-excerpt { color: var(--text-2); font-size: 15px; }

/* --- Articolo --- */
.article { padding: 40px 0 16px; }
.breadcrumb { font-size: 13px; color: var(--text-3); margin: 0 0 16px; }
.breadcrumb a { color: inherit; }
.article-head h1 { font: 700 clamp(32px, 5vw, 50px)/1.08 var(--serif); margin: 0 0 16px; }
.article-meta { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 0; font-size: 14px; color: var(--text-3); padding-bottom: 20px; border-bottom: 3px solid var(--section); }
.article-meta .author { color: var(--text); font-weight: 700; }
.opening { margin-top: 28px; }
.opening img { width: 100%; border-radius: 4px; }
figcaption { font-size: 13px; color: var(--text-3); margin-top: 6px; text-align: center; }
.prose { font: 20px/1.65 var(--serif); margin-top: 28px; }
.prose > * + * { margin-top: 1em; }
.prose p { margin: 0; }
.prose h1, .prose h2 { font: 700 28px/1.2 var(--serif); margin: 1.6em 0 0.4em; }
.prose h3 { font: 700 23px/1.25 var(--serif); margin: 1.4em 0 0.3em; }
.prose h4 { font: 700 13px var(--sans); text-transform: uppercase; letter-spacing: 0.08em; color: var(--section, var(--text-2)); margin: 1.4em 0 0.3em; }
.prose ul, .prose ol { padding-left: 1.4em; margin: 0; }
.prose li + li { margin-top: 0.3em; }
.prose blockquote { margin: 0; padding: 4px 0 4px 20px; border-left: 3px solid var(--section, var(--bronze)); color: var(--text-2); font-style: italic; }
.prose hr { border: 0; text-align: center; margin: 2em 0; }
.prose hr::after { content: '✦  ✦  ✦'; color: var(--text-3); font-size: 14px; letter-spacing: 0.4em; }
.prose figure { margin: 1.5em auto; text-align: center; }
.prose figure img { border-radius: 3px; }
.prose img.round { border-radius: 14px; }
.prose img.circle { border-radius: 50%; aspect-ratio: 1; object-fit: cover; }
.prose table { width: 100%; border-collapse: collapse; font: 15px/1.45 var(--sans); display: block; overflow-x: auto; }
.prose th, .prose td { padding: 8px 12px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }
.prose th { border-bottom: 2px solid var(--text-3); font-weight: 700; }
.prose code { font-size: 0.85em; }
.prose .box { padding: 20px 24px; background: var(--box); border-left: 4px solid var(--blue); border-radius: 4px; }
.prose .box.inv { background: var(--blue); color: #fff; border-left-color: var(--bronze); }
.prose .box.inv a { color: #fff; }
.prose .box > * + *, .prose .block > * + * { margin-top: 0.8em; }
.signature { display: flex; align-items: center; gap: 16px; margin-top: 32px; padding: 20px; background: var(--blue); color: #fff; border-radius: 6px; font-size: 15px; }
.signature img { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; }
.signature div { display: grid; }
.share { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--border); font-size: 14px; }
.share span { font-weight: 700; color: var(--text-3); margin-right: 4px; }
.share a, .share button { padding: 6px 14px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); color: var(--text); font: 600 13px var(--sans); text-decoration: none; cursor: pointer; }
.share a:hover, .share button:hover { border-color: var(--text-3); }
.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 32px; margin-bottom: 56px; }
.pager a { display: grid; gap: 4px; padding: 16px; border: 1px solid var(--border); border-radius: 6px; background: var(--surface); color: var(--text); text-decoration: none; font: 700 18px/1.25 var(--serif); }
.pager a span { font: 700 12px var(--sans); text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-3); }
.pager .next { text-align: right; grid-column: 2; }
.pager a:hover { border-color: var(--text-3); }

/* --- Piede --- */
.site-footer { margin-top: 64px; padding: 36px 0; background: var(--blue); color: rgb(255 255 255 / 0.85); font-size: 14px; }
.footer-inner { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.footer-inner p { margin: 0 0 4px; }
.footer-title { font: 700 18px var(--serif); color: #fff; max-width: 520px; }
.footer-links { display: grid; gap: 6px; align-content: start; justify-items: end; }
.footer-links a { color: #fff; }
.footer-links .staff { opacity: 0.6; font-size: 13px; }

@media (max-width: 760px) {
  .hero-inner { flex-direction: column; align-items: flex-start; gap: 28px; padding-top: 32px; }
  .cover-lg { width: min(260px, 70vw); }
  .toc-section { grid-template-columns: 1fr; }
  .toc-section-name { grid-row: auto; margin-bottom: 8px; }
  .prose { font-size: 19px; }
  .pager { grid-template-columns: 1fr; }
  .pager .next { grid-column: 1; }
  .footer-links { justify-items: start; }
  .grid-issues { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 28px 18px; }
}
