/*
Theme Name: MUVIST Blog
Theme URI: https://muvist.com/blog/
Author: ReadTomato
Description: Blog engine for MUVIST Academy. Inherits the static site's design system (Oswald + Montserrat, brand palette) from /assets/css/style.css and adds only what the blog needs on top.
Version: 1.0.0
License: Proprietary
Text Domain: muvist-blog
*/

/* ============================================================
   MUVIST blog layer.
   The shared site stylesheet (/assets/css/style.css) is enqueued
   first and owns the palette, type scale, buttons, hero and
   section classes. Everything below is blog-only.
   ============================================================ */

/* The shared header is position:sticky/top:0; the admin bar is fixed above it.
   Offset only when WordPress says the bar is present. */
body.admin-bar .site-header{top:32px}
@media screen and (max-width:782px){
  body.admin-bar .site-header{top:46px}
}

/* ---------- blog hero (static image, no video) ---------- */
.hero--photo-blog{
  background:#0d3b2a url("/assets/MUV-BLOG-hero.jpg?v=20260721a") center/cover no-repeat;
  min-height:calc(100vw * 700 / 1920);
}
@media (max-width:640px){
  .hero--photo-blog{min-height:auto;background-position:72% center}
}

/* ---------- post card grid ---------- */
.post-grid{
  display:grid;
  grid-template-columns:repeat(auto-fill,minmax(330px,1fr));
  gap:clamp(20px,3vw,34px);
}
.post-card{
  display:flex;flex-direction:column;
  background:var(--white);
  border:1px solid var(--line);
  border-radius:var(--radius);
  overflow:hidden;
  transition:transform .18s ease,border-color .18s ease;
}
.post-card:hover{transform:translateY(-3px);border-color:var(--orange)}
.post-card__media{aspect-ratio:16/9;overflow:hidden;background:var(--cream-2)}
.post-card__media img{width:100%;height:100%;object-fit:cover;transition:transform .4s ease}
.post-card:hover .post-card__media img{transform:scale(1.04)}
.post-card__body{display:flex;flex-direction:column;flex:1;padding:clamp(20px,2.4vw,28px)}
.post-card__cat{
  font-family:var(--ff-display);text-transform:uppercase;letter-spacing:.16em;
  font-size:.78rem;font-weight:500;color:var(--red-deep);margin-bottom:.7rem;
}
.post-card__title{font-size:1.45rem;margin:0 0 .6rem;line-height:1.12}
.post-card__title a{color:var(--ink);text-decoration:none}
.post-card__title a:hover{color:var(--red-deep)}
.post-card__excerpt{font-size:.95rem;color:var(--slate);margin:0 0 1.2rem}
.post-card__meta{
  margin-top:auto;display:flex;flex-wrap:wrap;gap:.5rem .9rem;align-items:center;
  font-size:.82rem;color:var(--slate);border-top:1px solid var(--line);padding-top:.9rem;
}
.post-card__meta time{font-variant-numeric:tabular-nums}

/* ---------- single post ---------- */
.post-head{padding:clamp(40px,6vw,78px) 0 0}
.post-head__cat{
  display:inline-block;font-family:var(--ff-display);text-transform:uppercase;
  letter-spacing:.2em;font-size:1.05rem;font-weight:500;color:var(--red-deep);margin-bottom:1rem;
}
.post-head h1{font-size:clamp(2.4rem,5.2vw,4rem);margin-bottom:.4em}
.post-head__standfirst{font-size:1.2rem;line-height:1.55;color:var(--ink-2);max-width:60ch;margin-bottom:1.6rem}
.post-byline{
  display:flex;flex-wrap:wrap;align-items:center;gap:.75rem 1.15rem;
  padding:1.1rem 0;border-top:1px solid var(--line);border-bottom:1px solid var(--line);
  font-size:.9rem;color:var(--slate);
}
.post-byline__who{display:flex;align-items:center;gap:.6rem}
.post-byline__who img{width:42px;height:42px;border-radius:50%;object-fit:cover}
.post-byline b{color:var(--ink);font-weight:600}
.post-byline__sep{width:4px;height:4px;border-radius:50%;background:var(--line);flex:0 0 auto}
.post-byline time{font-variant-numeric:tabular-nums}

.post-hero-img{margin:clamp(28px,4vw,48px) 0 0;border-radius:var(--radius);overflow:hidden}
.post-hero-img img{width:100%}
.post-hero-img figcaption{font-size:.82rem;color:var(--slate);padding:.7rem .2rem 0}

/* table of contents */
.post-toc{
  background:var(--cream);border:1px solid var(--line);border-radius:var(--radius-sm);
  padding:clamp(18px,2.2vw,26px);margin:clamp(28px,3.5vw,44px) 0;
}
.post-toc h2{
  font-size:.9rem;font-family:var(--ff-display);text-transform:uppercase;
  letter-spacing:.18em;color:var(--slate);margin:0 0 .8rem;
}
.post-toc ol{margin:0;padding-left:1.15em;columns:2;column-gap:2rem}
.post-toc li{margin-bottom:.4em;break-inside:avoid}
.post-toc a{color:var(--ink-2);text-decoration:none;font-size:.95rem}
.post-toc a:hover{color:var(--red-deep);text-decoration:underline}
@media (max-width:640px){.post-toc ol{columns:1}}

/* body copy */
.post-body{font-size:1.08rem;line-height:1.78}
.post-body > h2{font-size:2.1rem;margin:2.1em 0 .5em;scroll-margin-top:96px}
.post-body > h3{font-size:1.4rem;margin:1.8em 0 .45em;scroll-margin-top:96px}
.post-body ul,.post-body ol{padding-left:1.3em}
.post-body li{margin-bottom:.55em}
.post-body img{border-radius:var(--radius-sm);margin:1.6em 0}
.post-body blockquote{
  margin:1.8em 0;padding:.2em 0 .2em 1.4em;
  border-left:3px solid var(--orange);
  font-size:1.22rem;line-height:1.5;color:var(--ink-2);font-style:normal;
}
.post-body blockquote p:last-child{margin-bottom:0}
.post-body blockquote cite{display:block;margin-top:.7em;font-size:.88rem;color:var(--slate);font-style:normal}
.post-body a{text-decoration:underline;text-underline-offset:2px}
.post-body figure{margin:1.8em 0}
.post-body figcaption{font-size:.84rem;color:var(--slate);margin-top:.6em}

/* pull-out stat / key takeaway */
.post-key{
  background:linear-gradient(150deg,var(--green-deep),var(--green));
  color:#eafaf0;border-radius:var(--radius);
  padding:clamp(22px,3vw,34px);margin:clamp(28px,3.5vw,44px) 0;
}
.post-key h3{color:#fff;font-size:1.25rem;margin-bottom:.6rem}
.post-key ul{margin:0;padding-left:1.2em}
.post-key li{margin-bottom:.5em}
.post-key li::marker{color:var(--orange)}

/* data table */
.post-table-wrap{overflow-x:auto;margin:1.8em 0}
.post-table{border-collapse:collapse;width:100%;min-width:520px;font-size:.95rem}
.post-table th,.post-table td{padding:.7em .9em;text-align:left;border-bottom:1px solid var(--line)}
.post-table thead th{
  font-family:var(--ff-display);text-transform:uppercase;letter-spacing:.1em;
  font-size:.82rem;color:var(--slate);border-bottom-width:2px;
}
.post-table td:not(:first-child),.post-table th:not(:first-child){font-variant-numeric:tabular-nums}
.post-table tbody tr:hover{background:var(--cream)}

/* FAQ block reuses the site's details styling but scoped for the post */
.post-faq{margin:clamp(30px,4vw,50px) 0}
.post-faq h2{margin-bottom:.7em}
.post-faq details{border-bottom:1px solid var(--line);padding:.2em 0}
.post-faq summary{
  cursor:pointer;list-style:none;padding:.95em 2em .95em 0;position:relative;
  font-family:var(--ff-display);font-size:1.14rem;color:var(--ink);
}
.post-faq summary::-webkit-details-marker{display:none}
.post-faq summary::after{
  content:"";position:absolute;right:.2em;top:50%;width:.62em;height:.62em;
  border-right:2px solid var(--red-deep);border-bottom:2px solid var(--red-deep);
  transform:translateY(-70%) rotate(45deg);transition:transform .22s ease;
}
.post-faq details[open] summary::after{transform:translateY(-30%) rotate(-135deg)}
.post-faq details > div{padding:0 0 1.1em}
.post-faq details > div p:last-child{margin-bottom:0}

/* tags */
.post-tags{display:flex;flex-wrap:wrap;gap:.5rem;margin:clamp(28px,3.5vw,44px) 0 0}
.post-tags a{
  font-size:.82rem;padding:.4em .9em;border-radius:999px;
  border:1px solid var(--line);color:var(--slate);text-decoration:none;
}
.post-tags a:hover{border-color:var(--red);color:var(--red-deep);text-decoration:none}

/* author box */
.post-author{
  display:flex;gap:1.2rem;align-items:flex-start;
  background:var(--cream);border-radius:var(--radius);
  padding:clamp(20px,2.6vw,30px);margin:clamp(32px,4vw,52px) 0 0;
}
.post-author img{width:74px;height:74px;border-radius:50%;object-fit:cover;flex:0 0 auto}
.post-author h3{font-size:1.2rem;margin:0 0 .1rem}
.post-author .role{font-size:.85rem;color:var(--red-deep);margin:0 0 .6rem;font-weight:600}
.post-author p:last-child{margin-bottom:0;font-size:.95rem;color:var(--ink-2)}
@media (max-width:560px){.post-author{flex-direction:column}}

/* prev / next */
.post-nav{display:grid;grid-template-columns:1fr 1fr;gap:1rem;margin:clamp(32px,4vw,52px) 0 0}
.post-nav a{
  display:block;padding:1.1rem 1.3rem;border:1px solid var(--line);
  border-radius:var(--radius-sm);text-decoration:none;color:var(--ink);
}
.post-nav a:hover{border-color:var(--orange);text-decoration:none}
.post-nav span{
  display:block;font-family:var(--ff-display);text-transform:uppercase;
  letter-spacing:.14em;font-size:.74rem;color:var(--slate);margin-bottom:.35rem;
}
.post-nav .is-next{text-align:right}
@media (max-width:640px){.post-nav{grid-template-columns:1fr}.post-nav .is-next{text-align:left}}

/* breadcrumbs */
.crumbs{font-size:.84rem;color:var(--slate);margin-bottom:1.2rem}
.crumbs a{color:var(--slate);text-decoration:none}
.crumbs a:hover{color:var(--red-deep);text-decoration:underline}
.crumbs span{margin:0 .45em;opacity:.6}

/* empty / 404 / search states */
.blog-empty{text-align:center;padding:clamp(40px,6vw,90px) 0}
.blog-empty h2{margin-bottom:.4em}

/* pagination */
.post-pager{display:flex;justify-content:center;gap:.5rem;margin-top:clamp(32px,4vw,52px);flex-wrap:wrap}
.post-pager .page-numbers{
  display:inline-flex;align-items:center;justify-content:center;
  min-width:2.6em;height:2.6em;padding:0 .7em;border-radius:999px;
  border:1px solid var(--line);color:var(--ink-2);text-decoration:none;font-size:.92rem;
}
.post-pager .page-numbers:hover{border-color:var(--red);color:var(--red-deep);text-decoration:none}
.post-pager .page-numbers.current{background:#23272d;color:#fff;border-color:#23272d}

/* search form */
.blog-search{display:flex;gap:.6rem;max-width:460px;margin:0 auto}
.blog-search input[type=search]{
  flex:1;padding:.75em 1em;border:1px solid var(--line);border-radius:999px;
  font-family:var(--ff-body);font-size:.95rem;background:var(--white);color:var(--ink);
}
.blog-search input[type=search]:focus-visible{outline:2px solid var(--red);outline-offset:1px}

@media (prefers-reduced-motion:reduce){
  .post-card,.post-card__media img,.post-faq summary::after{transition:none}
  .post-card:hover{transform:none}
  .post-card:hover .post-card__media img{transform:none}
}
