/* Electromm blog: cards (home strip + index), index page, article page. Uses the variables in style.css. */

/* cards */
.bgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.bcard, .bfeat { display: flex; flex-direction: column; text-decoration: none; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; transition: border-color .3s, transform .3s var(--ease); }
.bcard:hover, .bfeat:hover { border-color: rgba(255,196,0,.35); transform: translateY(-3px); }
.bimg { display: block; aspect-ratio: 1200/630; overflow: hidden; background: var(--bg2); }
.bimg img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease); }
.bcard:hover .bimg img, .bfeat:hover .bimg img { transform: scale(1.04); }
.bbody { display: flex; flex-direction: column; gap: 10px; padding: 22px 24px 24px; flex: 1; }
.bmeta { display: flex; align-items: center; gap: 10px; font-size: .8rem; color: var(--mut); }
.btag { color: var(--y); border: 1px solid rgba(255,196,0,.35); border-radius: 999px; padding: .2em .7em; font-weight: 560; letter-spacing: .04em; }
.bcard b, .bfeat b { font-weight: 800; font-size: 1.15rem; line-height: 1.22; letter-spacing: -0.01em; color: var(--fg); }
.bsum { color: var(--fg2); font-size: .93rem; }
.bmore { margin-top: auto; padding-top: 6px; display: inline-flex; align-items: center; gap: .5em; color: var(--y); font-weight: 560; font-size: .92rem; }
.bmore svg { width: 1em; height: 1em; transition: transform .2s var(--ease); }
.bcard:hover .bmore svg, .bfeat:hover .bmore svg { transform: translateX(4px); }

/* blog index */
.blog-index { position: relative; overflow: hidden; padding: 150px 0 110px; }
.blog-index .wm { position: absolute; right: -160px; top: 60px; opacity: .045; pointer-events: none; }
.blog-index .wm svg { width: 680px; height: 680px; }
.blog-index .wrap { position: relative; }
.blog-index .lead { margin-bottom: 48px; }
.bfeat { display: grid; grid-template-columns: 1.15fr 1fr; margin-bottom: 20px; }
.bfeat .bimg { aspect-ratio: auto; min-height: 340px; }
.bfeat .bbody { padding: 40px; justify-content: center; }
.bfeat b { font-size: clamp(1.5rem, 2.6vw, 2.1rem); }
.bfeat .bsum { font-size: 1.02rem; }
.bfeat .bmore { margin-top: 10px; }

/* article */
.post { padding: 140px 0 40px; }
.post-head { max-width: 860px; }
.post-head h1 { font-size: clamp(2.1rem, 4.6vw, 3.6rem); }
.crumbs { display: flex; gap: 10px; font-size: .86rem; color: var(--mut); margin-bottom: 26px; }
.crumbs a { text-decoration: none; color: var(--fg2); }
.crumbs a:hover { color: var(--y); }
.pmeta { color: var(--mut); font-size: .9rem; margin: 22px 0 0; }
.post-cover { margin: 44px 0 0; border-radius: 26px; overflow: hidden; border: 1px solid var(--line); aspect-ratio: 1200/560; }
.post-cover img { width: 100%; height: 100%; object-fit: cover; }
.post-grid { display: grid; grid-template-columns: 240px minmax(0, 720px); gap: 64px; justify-content: center; margin-top: 56px; }
.toc { position: sticky; top: 104px; align-self: start; font-size: .9rem; }
.toc b { display: block; font-size: .76rem; letter-spacing: .16em; text-transform: uppercase; color: var(--y); margin-bottom: 14px; }
.toc ol { list-style: none; padding: 0; margin: 0 0 24px; border-left: 1px solid var(--line2); }
.toc li a { display: block; padding: 7px 0 7px 16px; margin-left: -1px; border-left: 2px solid transparent; color: var(--fg2); text-decoration: none; line-height: 1.35; }
.toc li a:hover, .toc li a.on { color: var(--fg); border-left-color: var(--y); }
.toc .btn { padding: .8em 1.2em; font-size: .9rem; }

.prose { font-size: 1.08rem; color: var(--fg2); line-height: 1.75; }
.prose > :first-child { margin-top: 0; }
.prose h2 { color: var(--fg); font-size: clamp(1.5rem, 2.6vw, 1.95rem); margin: 2.2em 0 .7em; scroll-margin-top: 100px; }
.prose h3 { color: var(--fg); font-size: 1.22rem; margin: 1.8em 0 .5em; }
.prose p { margin: 0 0 1.2em; }
.prose strong { color: var(--fg); font-weight: 560; }
.prose a { color: var(--y); text-decoration-thickness: 1px; text-underline-offset: 3px; }
.prose ul, .prose ol { padding-left: 1.3em; margin: 0 0 1.4em; }
.prose li { margin: .45em 0; padding-left: .3em; }
.prose ul li::marker { color: var(--y); content: "◆  "; font-size: .7em; }
.prose ol li::marker { color: var(--y); font-weight: 800; }
.prose img { border-radius: 16px; margin: 1.5em 0; }
.note { margin: 1.6em 0; padding: 18px 22px; border-radius: 16px; background: rgba(255,196,0,.06); border: 1px solid rgba(255,196,0,.25); }
.note p { margin: 0 0 .6em; } .note p:last-child { margin: 0; }
.note.warn { background: rgba(224,72,76,.07); border-color: rgba(224,72,76,.35); }
.tbl { overflow-x: auto; margin: 1.6em 0; border: 1px solid var(--line); border-radius: 16px; }
.prose table { width: 100%; border-collapse: collapse; font-size: .96rem; }
.prose th, .prose td { text-align: left; padding: 13px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
.prose th { color: var(--fg); background: var(--panel); font-weight: 560; }
.prose tr:last-child td { border-bottom: 0; }
.prose td:last-child { color: var(--fg); font-weight: 560; }
.prose td.n { white-space: nowrap; }
.post-cta { margin: 2.4em 0 1em; display: flex; justify-content: space-between; align-items: center; gap: 22px; padding: 26px 28px; border-radius: 20px; background: linear-gradient(135deg, var(--panel2), var(--panel)); border: 1px solid var(--line2); }
.post-cta b { display: block; color: var(--fg); font-size: 1.15rem; }
.post-cta span { display: block; font-size: .95rem; }
.post-cta .btn { flex: none; }
.post-calc { margin: 1.6em 0; }
.related { padding: 70px 0 110px; }
.related h2 { font-size: 1.8rem; margin-bottom: 28px; }

/* home strip */
.home-blog .head .btn { flex: none; }

@media (max-width: 1080px) {
  .post-grid { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .toc { display: none; }
}
@media (max-width: 900px) {
  .bgrid { grid-template-columns: 1fr 1fr; }
  .bfeat { grid-template-columns: 1fr; }
  .bfeat .bimg { min-height: 0; aspect-ratio: 1200/630; }
  .bfeat .bbody { padding: 26px; }
}
@media (max-width: 600px) {
  .bgrid { grid-template-columns: 1fr; }
  .post { padding-top: 110px; }
  .blog-index { padding-top: 120px; }
  .post-cover { border-radius: 18px; aspect-ratio: 1200/700; }
  .prose { font-size: 1.02rem; }
  .post-cta { flex-direction: column; align-items: stretch; }
  .post-cta .btn { justify-content: center; }
}

/* buttons inside articles keep their own colours (not the yellow link colour) */
.prose a.btn { text-decoration: none; }
.prose a.btn-y { color: #0B1220; }
.prose a.btn-g { color: var(--fg); }
.prose a.btn-g:hover { color: var(--y); }
