/* KeepLink blog — foglio di stile condiviso
   Modifica qui e cambia in tutte le pagine del blog. */

:root {
  --bg: #0E0B18;
  --bg-soft: #17122A;
  --card: #1C1630;
  --border: #2C2445;
  --text: #EDEAF5;
  --text-muted: #A79FC0;
  --accent: #7C5CBF;
  --accent-deep: #4A3490;
  --gradient: linear-gradient(135deg, #7C5CBF 0%, #4A3490 100%);
  --radius: 14px;
  --maxw: 720px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, Helvetica, Arial, sans-serif;
  font-size: 18px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

/* ---------- Layout ---------- */

.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Header ---------- */

.site-header {
  border-bottom: 1px solid var(--border);
  background: rgba(14, 11, 24, 0.85);
  backdrop-filter: blur(8px);
  position: sticky;
  top: 0;
  z-index: 10;
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

.wordmark {
  font-size: 22px;
  letter-spacing: -0.4px;
  text-decoration: none;
  color: var(--text);
}
.wordmark .keep { font-weight: 300; }
.wordmark .link { font-weight: 700; }

.nav-cta {
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  color: #fff;
  background: var(--gradient);
  padding: 9px 18px;
  border-radius: 999px;
  transition: opacity .2s ease;
}
.nav-cta:hover { opacity: .88; }

/* ---------- Home del blog ---------- */

.blog-intro {
  padding: 72px 0 40px;
  border-bottom: 1px solid var(--border);
}

.blog-intro h1 {
  font-size: 40px;
  line-height: 1.2;
  margin: 0 0 14px;
  letter-spacing: -1px;
  font-weight: 700;
}

.blog-intro p {
  margin: 0;
  color: var(--text-muted);
  font-size: 19px;
  max-width: 34em;
}

.post-list {
  padding: 40px 0 80px;
  display: grid;
  gap: 20px;
}

.post-card {
  display: block;
  text-decoration: none;
  color: inherit;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: border-color .2s ease, transform .2s ease;
}
.post-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.post-card .meta {
  font-size: 13px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.post-card h2 {
  margin: 0 0 10px;
  font-size: 25px;
  line-height: 1.3;
  letter-spacing: -0.4px;
  font-weight: 700;
}

.post-card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 17px;
}

.read-more {
  display: inline-block;
  margin-top: 16px;
  font-size: 15px;
  font-weight: 600;
  color: var(--accent);
}

/* ---------- Articolo ---------- */

.article-head {
  padding: 72px 0 32px;
}

.article-head .meta {
  font-size: 13px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.article-head h1 {
  font-size: 42px;
  line-height: 1.18;
  letter-spacing: -1.2px;
  margin: 0 0 18px;
  font-weight: 700;
}

.article-head .standfirst {
  font-size: 20px;
  color: var(--text-muted);
  margin: 0;
}

.rule {
  height: 3px;
  width: 72px;
  background: var(--gradient);
  border-radius: 999px;
  margin: 0 0 40px;
}

.article-body { padding-bottom: 64px; }

.article-body p { margin: 0 0 24px; }

.article-body h2 {
  font-size: 27px;
  line-height: 1.3;
  letter-spacing: -0.5px;
  margin: 48px 0 18px;
  font-weight: 700;
}

.article-body strong { color: #fff; font-weight: 700; }

.article-body a { color: var(--accent); }

.article-body img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  display: block;
  margin: 32px 0;
}

.article-body figure { margin: 32px 0; }
.article-body figcaption {
  font-size: 14px;
  color: var(--text-muted);
  text-align: center;
  margin-top: 10px;
}

.lead {
  font-size: 21px;
  color: var(--text);
}

/* ---------- CTA di chiusura ---------- */

.end-cta {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  text-align: center;
  margin: 56px 0 0;
}

.end-cta h3 {
  margin: 0 0 10px;
  font-size: 22px;
  font-weight: 700;
}

.end-cta p {
  margin: 0 0 22px;
  color: var(--text-muted);
  font-size: 17px;
}

.btn {
  display: inline-block;
  text-decoration: none;
  color: #fff;
  background: var(--gradient);
  font-weight: 600;
  padding: 13px 30px;
  border-radius: 999px;
  transition: opacity .2s ease;
}
.btn:hover { opacity: .88; }

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--border);
  padding: 32px 0;
  color: var(--text-muted);
  font-size: 15px;
}

.site-footer .wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.site-footer a { color: var(--text-muted); text-decoration: none; }
.site-footer a:hover { color: var(--text); }

/* ---------- Accessibilità ---------- */

a:focus-visible, .btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
}

/* ---------- Mobile ---------- */

@media (max-width: 640px) {
  body { font-size: 17px; }
  .blog-intro { padding: 48px 0 32px; }
  .blog-intro h1 { font-size: 32px; }
  .article-head { padding: 48px 0 24px; }
  .article-head h1 { font-size: 31px; letter-spacing: -0.6px; }
  .article-head .standfirst { font-size: 18px; }
  .article-body h2 { font-size: 23px; }
  .lead { font-size: 19px; }
  .post-card { padding: 22px; }
  .post-card h2 { font-size: 21px; }
  .end-cta { padding: 26px 20px; }
}
