/* ====================================================================
   Punto Doc — Blog "Chiacchiere di corsia"
   Layers on top of subpage.css. Use with body[data-theme="ai"].
   ==================================================================== */

/* ---- masthead hero (listing) ---- */
.blog-hero {
  background: var(--ink); color: #fff; position: relative; overflow: hidden;
  padding: clamp(118px, 16vh, 178px) 0 clamp(40px, 6vh, 60px);
}
.blog-hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(60% 60% at 82% 8%, rgba(170,178,255,0.18), transparent 70%);
}
.blog-hero .wrap { position: relative; z-index: 2; }
.masthead-top {
  display: flex; justify-content: space-between; align-items: center; gap: 14px 30px;
  flex-wrap: wrap; border-bottom: 1px solid rgba(255,255,255,0.18); padding-bottom: 18px;
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase;
  color: rgba(255,255,255,0.62);
}
.masthead-top .hl { color: #aab2ff; }
.masthead h1 {
  font-family: var(--display); font-weight: 700; margin-top: 30px;
  font-size: clamp(52px, 11vw, 148px); line-height: 0.84; letter-spacing: -0.05em; text-wrap: balance;
}
.masthead h1 em { font-style: normal; color: #aab2ff; }
.masthead .sub {
  margin-top: 24px; font-size: clamp(16px, 1.9vw, 21px); line-height: 1.5;
  max-width: 58ch; color: rgba(255,255,255,0.82);
}
.masthead .sub b { color: #fff; font-weight: 600; }

/* ---- body / featured ---- */
.blog-body { padding: clamp(54px, 8vh, 88px) 0 clamp(70px, 10vh, 120px); }

.featured {
  display: grid; grid-template-columns: 1.02fr 0.98fr; gap: 46px; align-items: center;
  margin-bottom: clamp(50px, 8vh, 92px);
}
.featured-cover {
  position: relative; background: var(--paper-2); border: 1px solid var(--hair);
  border-radius: 22px; aspect-ratio: 4 / 3; display: grid; place-items: center; overflow: hidden;
}
.featured-cover img { width: 64%; height: auto; filter: drop-shadow(0 26px 32px rgba(20,21,43,0.16)); transition: transform .5s ease; }
.featured:hover .featured-cover img { transform: scale(1.04) rotate(-2deg); }
.sticker-tag {
  position: absolute; top: 18px; left: 18px; z-index: 2;
  background: var(--accent); color: #fff; font-family: var(--mono); font-weight: 600;
  font-size: 10.5px; letter-spacing: 0.08em; text-transform: uppercase;
  padding: 7px 12px; border-radius: 7px; transform: rotate(-3deg);
}
.featured-copy .cat,
.post-card .cat {
  font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--accent-deep); font-weight: 600; display: inline-flex; align-items: center; gap: 8px;
}
.featured-copy .cat::before,
.post-card .cat::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.featured-copy h2 {
  font-family: var(--display); font-weight: 700; margin: 18px 0 0;
  font-size: clamp(28px, 3.7vw, 50px); line-height: 1.0; letter-spacing: -0.03em; text-wrap: balance;
}
.featured-copy .exc { margin-top: 18px; font-size: 16.5px; line-height: 1.62; color: #3a3c52; max-width: 50ch; }
.featured-copy .byline {
  margin-top: 22px; font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--muted);
}
.featured-copy .actions { margin-top: 26px; }

/* ---- posts grid ---- */
.posts-head {
  display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; flex-wrap: wrap;
  border-top: 1.5px solid var(--ink); padding-top: 18px; margin-bottom: 30px;
}
.posts-head h3 { font-family: var(--display); font-weight: 700; font-size: clamp(22px, 2.6vw, 32px); letter-spacing: -0.025em; }
.posts-head .mono { color: var(--muted); }

.posts-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.post-card {
  display: flex; flex-direction: column; background: var(--paper); border: 1px solid var(--hair);
  border-radius: 18px; overflow: hidden; position: relative;
  transition: transform .3s cubic-bezier(.6,0,.2,1), box-shadow .3s ease, border-color .3s ease;
}
.post-card:hover { transform: translateY(-6px); box-shadow: 0 28px 48px rgba(20,21,43,0.10); border-color: var(--accent); }
.pc-cover { aspect-ratio: 3 / 2; background: var(--paper-2); display: grid; place-items: center; border-bottom: 1px solid var(--hair); position: relative; overflow: hidden; }
.pc-cover img { width: 54%; height: auto; filter: drop-shadow(0 16px 22px rgba(20,21,43,0.14)); transition: transform .45s ease; }
.post-card:hover .pc-cover img { transform: scale(1.06) rotate(-2deg); }
.pc-body { padding: 22px 22px 22px; display: flex; flex-direction: column; flex: 1; }
.pc-body h4 { font-family: var(--display); font-weight: 700; font-size: 20px; line-height: 1.12; letter-spacing: -0.02em; margin: 13px 0 0; text-wrap: balance; }
.pc-body .exc { margin-top: 10px; font-size: 13.5px; line-height: 1.55; color: #3a3c52; flex: 1; }
.pc-foot {
  margin-top: 18px; padding-top: 13px; border-top: 1px solid var(--hair);
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.pc-foot .meta { font-family: var(--mono); font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.pc-foot .go { font-family: var(--mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink); font-weight: 600; display: inline-flex; gap: 6px; white-space: nowrap; }
.post-card:hover .pc-foot .go { color: var(--accent-deep); }
.pc-foot .go .arr { transition: transform .2s; }
.post-card:hover .pc-foot .go .arr { transform: translateX(3px); }

/* ====================================================================
   Single article page
   ==================================================================== */
.post-hero { padding: clamp(116px, 15vh, 168px) 0 0; }
.article-head { max-width: 840px; margin: 0 auto; text-align: center; }
.article-head .crumbs { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); margin-bottom: 20px; }
.article-head .crumbs a:hover { color: var(--accent-deep); }
.article-head .cat {
  display: inline-flex; align-items: center; gap: 8px; font-family: var(--mono);
  font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; font-weight: 600;
  color: var(--accent-deep); border: 1px solid var(--accent); border-radius: 100px; padding: 7px 14px;
}
.article-head h1 {
  font-family: var(--display); font-weight: 700; margin: 22px 0 0;
  font-size: clamp(34px, 5.4vw, 70px); line-height: 0.98; letter-spacing: -0.04em; text-wrap: balance;
}
.article-head .dek { margin: 22px auto 0; max-width: 56ch; font-size: clamp(16px, 1.8vw, 20px); line-height: 1.55; color: var(--muted); }
.article-meta {
  margin-top: 26px; display: flex; align-items: center; justify-content: center; gap: 10px 18px; flex-wrap: wrap;
  font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted);
}
.article-meta .sep { color: var(--hair); }
.article-meta b { color: var(--ink); font-weight: 600; }

.article-cover {
  max-width: 1000px; margin: clamp(36px, 5vh, 56px) auto 0; background: var(--paper-2);
  border: 1px solid var(--hair); border-radius: 22px; aspect-ratio: 16 / 9;
  display: grid; place-items: center; position: relative; overflow: hidden;
}
.article-cover img { width: 40%; height: auto; filter: drop-shadow(0 30px 36px rgba(20,21,43,0.18)); }

.article-body { max-width: 700px; margin: clamp(42px, 6vh, 72px) auto 0; padding-bottom: clamp(60px, 9vh, 110px); }
.article-body > p { font-size: 17.5px; line-height: 1.72; color: #34364c; }
.article-body > p + p { margin-top: 20px; }
.article-body > p b { color: var(--ink); font-weight: 600; }
.article-body .lead { font-size: 20px; line-height: 1.6; color: var(--ink); }
.article-body h2 {
  font-family: var(--display); font-weight: 700; font-size: clamp(24px, 3vw, 34px);
  letter-spacing: -0.025em; line-height: 1.08; margin: clamp(34px, 5vh, 52px) 0 0;
}
.article-body h2 + p { margin-top: 14px; }
.article-body blockquote {
  margin: clamp(30px, 4vh, 44px) 0; padding: 4px 0 4px 26px; border-left: 5px solid var(--accent);
  font-family: var(--display); font-weight: 500; font-size: clamp(20px, 2.6vw, 28px);
  line-height: 1.3; letter-spacing: -0.02em; color: var(--ink); text-wrap: balance;
}
.article-body blockquote cite { display: block; margin-top: 12px; font-family: var(--mono); font-style: normal; font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.article-body ul.gloss { list-style: none; margin: 22px 0 0; display: grid; gap: 14px; }
.article-body ul.gloss li { position: relative; padding-left: 30px; font-size: 16px; line-height: 1.6; color: #34364c; }
.article-body ul.gloss li::before { content: ""; position: absolute; left: 2px; top: 8px; width: 12px; height: 12px; border-radius: 50%; background: var(--accent-soft); border: 3px solid var(--accent); }
.article-body ul.gloss li b { color: var(--ink); font-weight: 600; }

/* article footer / related */
.article-foot { border-top: 1px solid var(--hair); padding-top: 34px; }
.article-foot .back { font-family: var(--mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent-deep); font-weight: 600; }
.related-head { font-family: var(--mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); margin: clamp(40px,6vh,64px) 0 22px; }

/* ---- responsive ---- */
@media (max-width: 980px) {
  .featured { grid-template-columns: 1fr; gap: 26px; }
  .featured-cover { order: -1; }
  .posts-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 680px) {
  .posts-grid { grid-template-columns: 1fr; }
  .masthead h1 { font-size: clamp(46px, 16vw, 96px); }
}
