/* Blog bebroggi.it — stylesheet autonomo, stesso stile della home (assets/site.css):
   blu notte per il testo, rosso, giallo e blu delle bandiere nautiche per gli accenti. */

:root {
  --paper: #fff;
  --ink: #0e1a2b;
  --muted: #5d6470;
  --text: #1c2738;
  --hair: #dde0e5;
  --red: #d7262e;
  --yellow: #f6c519;
  --blue: #1446a0;
  --font: "Google Sans", "Product Sans", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.65;
  font-variant-numeric: lining-nums;
  -webkit-font-smoothing: antialiased;
}
::selection { background: var(--yellow); color: var(--ink); }
a { color: inherit; }
img { max-width: 100%; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }

/* Etichette piccole: maiuscolo spaziato */
.topbar a, .post__meta, .related p, .footer p, .footer a, .post-card time {
  font-family: var(--font); font-size: .74rem; font-weight: 500; letter-spacing: .07em; text-transform: uppercase;
}

/* ─── Testata ─── */
.topbar { border-bottom: 2px solid var(--red); }
.topbar__inner {
  max-width: 720px; margin-inline: auto; padding: 18px 20px 14px;
  display: flex; align-items: baseline; justify-content: space-between; gap: 20px;
}
.topbar a { text-decoration: none; color: var(--muted); }
.topbar a:hover, .topbar a[aria-current="page"] { color: var(--ink); text-decoration: underline; text-underline-offset: .18em; }

/* ─── Contenitore articolo ─── */
.wrap { max-width: 720px; margin-inline: auto; padding: 0 20px; }

.post { padding: 48px 0 24px; }
.post__meta {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px;
  margin: 0 0 20px; color: var(--muted);
}
.post__meta .tag { padding: 2px 7px; background: var(--yellow); color: var(--ink); }
.post h1 {
  margin: 0 0 18px;
  font-size: clamp(2rem, 5.5vw, 2.9rem);
  font-weight: 500; line-height: 1.1; letter-spacing: -.035em;
}
.post h1 em { font-style: normal; }
.post__summary {
  margin: 0 0 36px; padding-bottom: 28px; border-bottom: 1px solid var(--hair);
  font-size: 1.3rem; line-height: 1.45; color: var(--muted);
}

.post h2 {
  margin: 44px 0 12px;
  font-size: 1.45rem; font-weight: 500; line-height: 1.2; letter-spacing: -.025em;
}
.post p { margin: 0 0 18px; color: var(--text); }
.post ul, .post ol { margin: 0 0 18px; padding-left: 22px; color: var(--text); }
.post li { margin-bottom: 7px; }
.post strong { color: var(--ink); font-weight: 600; }
.post a { color: var(--ink); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .18em; }
.post a:hover { text-decoration-thickness: 2px; text-decoration-color: var(--red); }

/* ─── Immagini nell'articolo ─── */
.post figure { margin: 30px 0 32px; }
.post figure img { display: block; width: 100%; height: auto; border: 1px solid var(--hair); }
.post figcaption { margin-top: 8px; font-size: .875rem; line-height: 1.45; color: var(--muted); }

/* ─── Box contatto ─── */
.cta-box {
  margin: 44px 0 10px; padding: 24px 24px 26px;
  background: var(--ink); color: var(--paper);
}
.cta-box p { margin: 0 0 16px; color: #d6deea; font-size: 1rem; }
.cta-box strong { color: var(--paper); }
.cta-box a {
  display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 18px;
  background: var(--yellow); color: var(--ink); text-decoration: none;
  font-family: var(--font); font-size: .76rem; letter-spacing: .06em; text-transform: uppercase;
  transition: background .2s ease;
}
.cta-box a:hover { background: var(--paper); }

/* ─── Articoli correlati ─── */
.related { margin: 34px 0 0; padding: 0; }
.related p { margin: 0 0 8px; color: var(--muted); }
.related ul { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--hair); }
.related li { margin: 0; padding: 9px 0; border-bottom: 1px solid var(--hair); }
.related a { font-weight: 400; }

/* ─── Piede ─── */
.footer { margin-top: 64px; border-top: 1px solid var(--ink); }
.footer .wrap {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 20px;
  padding-top: 16px; padding-bottom: 28px;
}
.footer p, .footer a { margin: 0; color: var(--muted); text-decoration: none; }
.footer a:hover { color: var(--ink); text-decoration: underline; }

/* ─── Indice del blog ─── */
.blog-hero { padding: 48px 0 28px; }
.blog-hero .post__meta { margin-bottom: 14px; }
.blog-hero h1 {
  margin: 0 0 12px;
  font-size: clamp(2.4rem, 7vw, 3.6rem);
  font-weight: 500; line-height: 1.05; letter-spacing: -.04em;
}
.blog-hero h1 em { font-style: normal; }
.blog-hero > .wrap > p { margin: 0; max-width: 46ch; color: var(--muted); font-size: 1.1rem; }

.post-list { list-style: none; margin: 0; padding: 0 0 30px; border-top: 2px solid var(--ink); }
.post-list li { margin: 0; border-bottom: 1px solid var(--hair); }
.post-card { display: block; padding: 16px 0 18px; text-decoration: none; }
.post-card time { display: block; margin-bottom: 4px; color: var(--muted); }
.post-card strong {
  display: block; font-size: 1.25rem; font-weight: 500;
  letter-spacing: -.02em; line-height: 1.25; color: var(--ink);
}
.post-card:hover strong { text-decoration: underline; text-decoration-thickness: 2px; text-decoration-color: var(--red); text-underline-offset: .18em; }
.post-card span { display: block; margin-top: 6px; color: var(--muted); font-size: 1rem; line-height: 1.5; }
.post-card .arrow { display: inline-block; margin-left: 6px; color: var(--red); transition: transform .3s ease; }
.post-card:hover .arrow { transform: translateX(4px); }

@media (max-width: 480px) {
  .post { padding-top: 36px; }
  .blog-hero { padding-top: 36px; }
}
