/* =========================================================================
   MANIFESTINGS — theme.css
   Mobile-first FSE block theme. Recreates the Claude Design mock.
   Base styles = phone (single column); breakpoints add layout going up.
   ========================================================================= */

/* -------------------------------------------------------------------------
   1. SEMANTIC ROLE TOKENS  (light default + dark swap)
   Mirrors the mock's data-bg / data-tx / data-pill / data-bd / data-ph / data-inp
   ------------------------------------------------------------------------- */
:root {
  --mf-bg-page: #ffffff;
  --mf-bg-card: #ffffff;
  --mf-bg-soft: #faf9fb;

  --mf-text-hi: #18181b;
  --mf-text-mid: #3f3f46;
  --mf-text-mid-2: #52525b;
  --mf-text-lo: #a1a1aa;

  --mf-border: #ececef;
  --mf-border-soft: #f0f0f1;
  --mf-border-input: #e4e4e7;

  --mf-pill-accent-bg: #f3eefe;
  --mf-pill-accent-tx: #7c3aed;
  --mf-pill-neutral-bg: #f4f4f5;
  --mf-pill-neutral-tx: #52525b;

  --mf-ph-a: #f1f1f3;
  --mf-ph-b: #e9e9ec;
  --mf-ph-tx: #b8b8c0;

  --mf-inp-bg: #ffffff;
  --mf-inp-border: #e4e4e7;

  /* Brand gradient is constant across both themes. */
  --mf-gradient: linear-gradient(135deg, #f472b6 0%, #a855f7 100%);
  --mf-gradient-feature: linear-gradient(135deg, #f9d7ec 0%, #ecd5fb 52%, #dfe4fb 100%);
  --mf-avatar-grad: linear-gradient(135deg, #e7e7ec, #d6d6dd);

  /* Shape */
  --mf-r-pill: 999px;
  --mf-r-card-lg: 24px;
  --mf-r-card: 22px;
  --mf-r-media: 16px;
  --mf-r-thumb: 14px;
  --mf-r-author: 20px;

  /* Container */
  --mf-max: 1200px;
  --mf-pad: 20px; /* mobile side padding; bumped at 1024 */
}

html[data-theme="dark"] {
  --mf-bg-page: #0d0d10;
  --mf-bg-card: #16161b;
  --mf-bg-soft: #141419;

  --mf-text-hi: #f4f4f5;
  --mf-text-mid: #c4c4cc;
  --mf-text-mid-2: #c4c4cc;
  --mf-text-lo: #8a8a94;

  --mf-border: #272730;
  --mf-border-soft: #272730;
  --mf-border-input: #2c2c36;

  --mf-pill-accent-bg: #2a2140;
  --mf-pill-accent-tx: #c9a9ff;
  --mf-pill-neutral-bg: #262630;
  --mf-pill-neutral-tx: #c4c4cc;

  --mf-ph-a: #1c1c22;
  --mf-ph-b: #232330;
  --mf-ph-tx: #54545f;

  --mf-inp-bg: #16161b;
  --mf-inp-border: #2c2c36;

  --mf-avatar-grad: linear-gradient(135deg, #2a2a33, #36363f);
}

/* Fallback for visitors who never toggled, before JS sets data-theme. */
@media (prefers-color-scheme: dark) {
  html:not([data-theme]) {
    color-scheme: dark;
  }
}

/* -------------------------------------------------------------------------
   2. BASE
   ------------------------------------------------------------------------- */
html {
  scroll-behavior: smooth;
}

body.wp-site-blocks,
body {
  background: var(--mf-bg-page);
  color: var(--mf-text-mid);
  font-family: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background .25s ease, color .25s ease;
}

a { color: inherit; text-decoration: none; }

.screen-reader-text {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0);
  white-space: nowrap; border: 0;
}

img { max-width: 100%; height: auto; }

::selection { background: rgba(168, 85, 247, .22); }

/* Layout container — applies to root-padding aware alignments. */
.mf-container,
.wp-site-blocks > .mf-section,
.is-layout-constrained.mf-container {
  max-width: var(--mf-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--mf-pad);
  padding-right: var(--mf-pad);
  box-sizing: border-box;
}

/* -------------------------------------------------------------------------
   3. COMPONENTS — buttons, pills, avatars, placeholders
   ------------------------------------------------------------------------- */

/* Gradient button (SIGN UP / Subscribe / Follow / any .mf-btn) */
.mf-btn .wp-block-button__link,
.wp-block-button.mf-btn .wp-block-button__link,
a.mf-btn,
button.mf-btn {
  background: var(--mf-gradient) !important;
  color: #fff !important;
  font-weight: 700;
  border: none;
  border-radius: var(--mf-r-pill);
  cursor: pointer;
  line-height: 1;
  box-shadow: 0 6px 18px rgba(168, 85, 247, .28);
  transition: transform .15s ease, box-shadow .15s ease, filter .15s ease;
}
.mf-btn .wp-block-button__link:hover,
a.mf-btn:hover,
button.mf-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(168, 85, 247, .34);
  filter: saturate(1.05);
}

/* Small caps pill used in header SIGN UP */
.mf-btn--sm .wp-block-button__link,
a.mf-btn--sm {
  font-size: 13px;
  letter-spacing: .04em;
  padding: 11px 22px;
  text-transform: uppercase;
}

/* Pills / tags */
.mf-pill,
.mf-tags > a,
.mf-tags > span,
.wp-block-post-terms.mf-tags a {
  display: inline-flex;
  align-items: center;
  font-weight: 600;
  border-radius: var(--mf-r-pill);
  line-height: 1;
  white-space: nowrap;
}
.mf-pill--accent,
.wp-block-post-terms.mf-tags--accent a {
  background: var(--mf-pill-accent-bg);
  color: var(--mf-pill-accent-tx);
  font-size: 11.5px;
  padding: 5px 10px;
}
.mf-pill--neutral,
.wp-block-post-terms.mf-tags--neutral a {
  background: var(--mf-pill-neutral-bg);
  color: var(--mf-pill-neutral-tx);
  font-size: 12px;
  padding: 4px 12px;
}
.mf-tags { display: flex; flex-wrap: wrap; gap: 7px; }
.wp-block-post-terms.mf-tags { gap: 7px; }
.wp-block-post-terms.mf-tags a { text-decoration: none; }
.wp-block-post-terms .wp-block-post-terms__separator { display: none; }

/* Decorative gradient avatar dot (author meta) */
.mf-avatar {
  width: 22px;
  height: 22px;
  flex: none;
  border-radius: 50%;
  background: var(--mf-avatar-grad);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #71717a;
  font-weight: 700;
  font-size: 10px;
}
.mf-avatar--brand { background: var(--mf-gradient); color: #fff; }
.mf-avatar--lg { width: 34px; height: 34px; font-size: 13px; }
.mf-avatar--xl { width: 56px; height: 56px; font-size: 20px; }

/* Meta row: by Author • date */
.mf-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.mf-meta .mf-meta__author,
.mf-meta .wp-block-post-author__name {
  font-weight: 600;
  font-size: 13px;
  color: var(--mf-text-mid);
}
.mf-meta .mf-meta__date,
.mf-meta .wp-block-post-date {
  font-weight: 500;
  font-size: 12.5px;
  color: var(--mf-text-lo);
}
.mf-meta .mf-dot { color: var(--mf-text-lo); opacity: .6; }
.mf-meta .wp-block-post-author { display: flex; align-items: center; gap: 8px; }
.mf-meta .wp-block-post-author__avatar { display: none; }

/* Hatched placeholder media */
.mf-ph,
.mf-card__media .wp-block-post-featured-image,
.mf-card__media img {
  border-radius: var(--mf-r-media);
}
.mf-ph {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: repeating-linear-gradient(135deg, var(--mf-ph-a) 0 11px, var(--mf-ph-b) 11px 22px);
  color: var(--mf-ph-tx);
  font: 600 10px ui-monospace, Menlo, monospace;
  letter-spacing: .1em;
  text-transform: uppercase;
  padding: 10px;
}

/* Featured-image blocks behave like the media placeholder. */
.mf-card__media .wp-block-post-featured-image {
  margin: 0;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: repeating-linear-gradient(135deg, var(--mf-ph-a) 0 11px, var(--mf-ph-b) 11px 22px);
}
.mf-card__media .wp-block-post-featured-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--mf-r-media);
}

/* -------------------------------------------------------------------------
   4. HEADER + NAV
   ------------------------------------------------------------------------- */
.mf-header {
  max-width: var(--mf-max);
  margin: 0 auto;
  padding: 18px var(--mf-pad);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.mf-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: none;
}
.mf-logo__glyph {
  width: 34px;
  height: 34px;
  display: block;
  flex: none;
  object-fit: contain;
}
.mf-logo__name {
  font-family: "Mochiy Pop One", "Plus Jakarta Sans", sans-serif;
  font-weight: 400;
  font-size: 26px;
  letter-spacing: 0;
  color: var(--mf-text-hi);
}

/* Primary nav — drawer on mobile, inline on desktop */
.mf-nav {
  display: none;
  align-items: center;
  gap: 30px;
}
.mf-nav a { font-weight: 500; font-size: 15px; color: var(--mf-text-mid); }
.mf-nav a:first-child { font-weight: 600; color: var(--mf-text-hi); }

.mf-header-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: none;
}
.mf-icon-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--mf-text-hi);
  display: inline-flex;
  padding: 4px;
}
.mf-icon-btn svg { width: 20px; height: 20px; }

/* hide the SIGN UP + search on small screens to keep the bar clean */
.mf-header-actions .mf-btn,
.mf-icon-btn--search { display: none; }

/* Hamburger */
.mf-nav-toggle {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 28px;
  height: 28px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}
.mf-nav-toggle span {
  display: block;
  height: 2px;
  width: 22px;
  border-radius: 2px;
  background: var(--mf-text-hi);
  transition: transform .25s ease, opacity .2s ease;
}
body.mf-nav-open .mf-nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
body.mf-nav-open .mf-nav-toggle span:nth-child(2) { opacity: 0; }
body.mf-nav-open .mf-nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile drawer */
@media (max-width: 1023px) {
  .mf-nav {
    position: fixed;
    inset: 0 0 0 auto;
    width: min(80vw, 320px);
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    background: var(--mf-bg-card);
    border-left: 1px solid var(--mf-border);
    padding: 88px 28px 28px;
    transform: translateX(100%);
    transition: transform .3s ease;
    z-index: 80;
    box-shadow: -20px 0 50px rgba(0, 0, 0, .12);
  }
  body.mf-nav-open .mf-nav { display: flex; transform: translateX(0); }
  .mf-nav a { font-size: 18px; padding: 12px 0; width: 100%; }
  body.mf-nav-open::after {
    content: "";
    position: fixed;
    inset: 0;
    background: rgba(10, 8, 14, .4);
    z-index: 70;
  }
  body.mf-nav-open { overflow: hidden; }
}

/* Search — slide-down panel with backdrop */
.mf-search {
  position: fixed;
  inset: 0;
  z-index: 120;
  visibility: hidden;
  opacity: 0;
  transition: opacity .25s ease, visibility .25s ease;
}
body.mf-search-open .mf-search { visibility: visible; opacity: 1; }
body.mf-search-open { overflow: hidden; }
.mf-search__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 8, 14, .45);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
  cursor: pointer;
}
.mf-search__panel {
  position: relative;
  max-width: 680px;
  margin: 86px auto 0;
  padding: 0 var(--mf-pad);
  transform: translateY(-24px);
  transition: transform .28s cubic-bezier(.2, .8, .2, 1);
}
body.mf-search-open .mf-search__panel { transform: translateY(0); }
.mf-search__form {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--mf-bg-card);
  border: 1px solid var(--mf-border);
  border-radius: var(--mf-r-pill);
  padding: 8px 8px 8px 20px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .28);
}
.mf-search__icon { width: 20px; height: 20px; flex: none; color: var(--mf-text-lo); }
.mf-search__input {
  flex: 1;
  min-width: 0;
  border: none;
  background: none;
  outline: none;
  font-family: inherit;
  font-size: 16px;
  color: var(--mf-text-hi);
  padding: 9px 0;
}
.mf-search__input::placeholder { color: var(--mf-text-lo); }
.mf-search__submit { flex: none; padding: 11px 22px; font-size: 14px; }
.mf-search__close {
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--mf-pill-neutral-bg);
  color: var(--mf-text-mid);
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.mf-search__close svg { width: 18px; height: 18px; }
@media (max-width: 560px) {
  .mf-search__submit { display: none; }
}

/* -------------------------------------------------------------------------
   5. SECTION RHYTHM
   ------------------------------------------------------------------------- */
.mf-section {
  max-width: var(--mf-max);
  margin: 0 auto;
  padding-left: var(--mf-pad);
  padding-right: var(--mf-pad);
  box-sizing: border-box;
}
.mf-section--hero { margin-top: 14px; padding-top: 10px; }
.mf-section--work { margin-top: 48px; }
.mf-section--newsletter { margin-top: 64px; }
.mf-section--read-next { margin-top: 56px; }

.mf-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}
.mf-section-head h2 {
  margin: 0;
  font-weight: 800;
  font-size: clamp(24px, 5vw, 30px);
  letter-spacing: -.025em;
  color: var(--mf-text-hi);
}
.mf-viewall {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  font-size: 14px;
  color: var(--mf-text-hi);
}
.mf-viewall .mf-viewall__arrow {
  display: inline-flex;
  width: 22px;
  height: 22px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--mf-pill-neutral-bg);
  color: var(--mf-pill-neutral-tx);
  font-size: 13px;
}

.mf-read-next-heading {
  margin: 0 0 24px;
  font-weight: 800;
  font-size: 26px;
  letter-spacing: -.02em;
  color: var(--mf-text-hi);
}

/* Search results page */
.mf-section--results { margin-top: 40px; }
.mf-results-title {
  margin: 0 0 28px;
  font-weight: 800;
  font-size: clamp(26px, 5vw, 34px);
  letter-spacing: -.025em;
  color: var(--mf-text-hi);
}
.mf-no-results {
  margin: 8px 0 0;
  font-size: 16px;
  color: var(--mf-text-mid-2);
}
.mf-pagination {
  margin-top: 40px;
  gap: 8px;
  font-weight: 600;
  font-size: 14px;
}
.mf-pagination .wp-block-query-pagination-numbers,
.mf-pagination a,
.mf-pagination .page-numbers { color: var(--mf-text-mid); }
.mf-pagination .page-numbers.current { color: var(--mf-pill-accent-tx); }
@media (min-width: 1024px) { .mf-section--results { margin-top: 56px; } }

/* -------------------------------------------------------------------------
   6. HERO  (featured + sidebar) — stacked on mobile
   ------------------------------------------------------------------------- */
.mf-hero {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  align-items: stretch;
}

.mf-hero__featured {
  position: relative;
  display: flex;
  align-items: flex-end;
  min-height: 360px;
  border-radius: var(--mf-r-card);
  overflow: hidden;
  background: var(--mf-gradient-feature);
}
.mf-hero__featured .wp-block-post-featured-image {
  position: absolute;
  inset: 0;
  margin: 0;
  height: 100%;
}
.mf-hero__featured .wp-block-post-featured-image img {
  width: 100%; height: 100%; object-fit: cover; border-radius: 0;
}
.mf-hero__featured::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(15,10,20,.78) 0%, rgba(15,10,20,.25) 42%, rgba(15,10,20,0) 70%);
  z-index: 1;
}
.mf-hero__featured-inner {
  position: relative;
  z-index: 2;
  padding: 28px;
  width: 100%;
}
.mf-hero__featured .mf-tags > * {
  background: rgba(255,255,255,.92);
  color: #18181b;
  font-size: 12.5px;
  padding: 5px 13px;
}
.mf-hero__featured h1,
.mf-hero__featured .wp-block-post-title {
  margin: 14px 0;
  color: #fff;
  font-weight: 800;
  font-size: clamp(24px, 5vw, 34px);
  line-height: 1.12;
  letter-spacing: -.02em;
  text-wrap: balance;
}
.mf-hero__featured .wp-block-post-title a { color: #fff; }
.mf-hero__featured .mf-meta .mf-meta__author,
.mf-hero__featured .mf-meta .wp-block-post-author__name { color: rgba(255,255,255,.92); }
.mf-hero__featured .mf-meta .mf-meta__date,
.mf-hero__featured .mf-meta .wp-block-post-date { color: rgba(255,255,255,.8); }
.mf-hero__featured .mf-meta .mf-dot { color: rgba(255,255,255,.6); }

/* sidebar list panel */
.mf-hero__sidebar {
  border: 1px solid var(--mf-border);
  border-radius: var(--mf-r-card);
  background: var(--mf-bg-card);
  padding: 8px 22px;
  display: flex;
  flex-direction: column;
}
/* (Sidebar item layout is defined in section 11 — Query-loop driven hero.) */

/* -------------------------------------------------------------------------
   7. CARD GRIDS  (Work + Read next) — 1 col mobile
   ------------------------------------------------------------------------- */
.mf-card-grid,
.wp-block-post-template.mf-card-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 26px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.mf-card-grid > li { margin: 0; }

.mf-card,
.mf-card-grid > li {
  display: flex;
  flex-direction: column;
}
.mf-card__media { margin-bottom: 16px; }
.mf-card__media.mf-ph { width: 100%; aspect-ratio: 4 / 3; }
.mf-card .mf-tags,
.mf-card-grid .mf-tags { margin-bottom: 11px; }
.mf-card__title,
.mf-card-grid .wp-block-post-title {
  margin: 0 0 10px;
  font-weight: 700;
  font-size: 18.5px;
  line-height: 1.25;
  letter-spacing: -.015em;
  color: var(--mf-text-hi);
}
.mf-card__excerpt,
.mf-card-grid .wp-block-post-excerpt {
  margin: 0 0 16px;
  font-size: 14px;
  line-height: 1.55;
  color: var(--mf-text-mid-2);
}
.mf-card-grid .wp-block-post-excerpt__more-link { display: none; }
.mf-card .mf-meta,
.mf-card-grid .mf-meta {
  margin-top: auto;
  flex-wrap: nowrap;
  justify-content: flex-start;
  white-space: nowrap;
}

/* -------------------------------------------------------------------------
   8. NEWSLETTER
   ------------------------------------------------------------------------- */
.mf-newsletter {
  border: 1px solid var(--mf-border);
  border-radius: var(--mf-r-card-lg);
  background: var(--mf-bg-soft);
  padding: 40px 24px;
  text-align: center;
}
.mf-newsletter__glyph {
  font-size: 34px;
  line-height: 1;
  margin-bottom: 14px;
  background: var(--mf-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}
.mf-newsletter h2 {
  margin: 0 0 12px;
  font-weight: 800;
  font-size: clamp(24px, 5vw, 30px);
  letter-spacing: -.025em;
  color: var(--mf-text-hi);
}
.mf-newsletter p {
  margin: 0 auto 28px;
  max-width: 440px;
  font-size: 15.5px;
  line-height: 1.6;
  color: var(--mf-text-mid-2);
}
.mf-newsletter__form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 440px;
  margin: 0 auto;
}
.mf-newsletter__form input[type="email"],
.mf-newsletter__form .mf-input {
  flex: 1;
  border: 1px solid var(--mf-inp-border);
  border-radius: var(--mf-r-pill);
  padding: 13px 20px;
  font-size: 14.5px;
  font-family: inherit;
  background: var(--mf-inp-bg);
  color: var(--mf-text-hi);
  outline: none;
}
.mf-newsletter__form input::placeholder { color: var(--mf-text-lo); }
.mf-newsletter__form button,
.mf-newsletter__form .mf-btn {
  flex: none;
  border: none;
  cursor: pointer;
  background: var(--mf-gradient);
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  padding: 13px 26px;
  border-radius: var(--mf-r-pill);
}

/* -------------------------------------------------------------------------
   9. SINGLE POST
   ------------------------------------------------------------------------- */
.mf-post-header {
  max-width: 760px;
  margin: 0 auto;
  text-align: center;
  padding: 28px var(--mf-pad) 0;
}
.mf-post-header .mf-tags { justify-content: center; margin-bottom: 22px; }
.mf-post-header .mf-tags > * { background: var(--mf-pill-accent-bg); color: var(--mf-pill-accent-tx); font-size: 13px; padding: 6px 14px; }
.mf-post-header h1,
.mf-post-header .wp-block-post-title {
  margin: 0 0 26px;
  font-weight: 800;
  font-size: clamp(32px, 7vw, 48px);
  line-height: 1.08;
  letter-spacing: -.03em;
  color: var(--mf-text-hi);
  text-wrap: balance;
}
.mf-post-header .mf-meta { justify-content: center; margin-bottom: 32px; }
.mf-post-header .mf-meta .mf-meta__author,
.mf-post-header .mf-meta .wp-block-post-author__name { font-size: 14.5px; color: var(--mf-text-hi); }
.mf-post-header .mf-meta .wp-block-post-date,
.mf-post-header .mf-meta .mf-readtime { font-size: 14px; color: var(--mf-text-lo); }

.mf-post-feature {
  max-width: 1080px;
  margin: 0 auto;
  width: 100%;
  padding: 0 var(--mf-pad);
  box-sizing: border-box;
}
.mf-post-feature .wp-block-post-featured-image,
.mf-post-feature.mf-ph {
  aspect-ratio: 16 / 8;
  border-radius: var(--mf-r-card);
  overflow: hidden;
  margin: 0;
  background: var(--mf-gradient-feature);
}
.mf-post-feature .wp-block-post-featured-image img { width: 100%; height: 100%; object-fit: cover; border-radius: var(--mf-r-card); }

/* Article body */
.mf-post-body {
  max-width: 720px;
  margin: 40px auto 0;
  padding: 0 var(--mf-pad);
  font-size: 18px;
  line-height: 1.75;
  color: var(--mf-text-mid);
}
/* Blank / Wide Page templates — top/bottom breathing room (padding, since first-child margin is zeroed by core layout) */
.mf-page-blank, .mf-page-wide { padding-top: 40px; padding-bottom: 64px; }
.mf-page-blank .mf-post-body, .mf-page-wide .mf-post-body { margin-top: 0; }
/* Wide column for contact / two-column layouts */
.mf-post-body--wide { max-width: 960px; }

.mf-post-body > * { margin-top: 0; margin-bottom: 24px; }
.mf-post-body p { margin: 0 0 24px; }
.mf-post-body h2 {
  margin: 44px 0 18px;
  font-weight: 800;
  font-size: clamp(24px, 5vw, 28px);
  letter-spacing: -.02em;
  color: var(--mf-text-hi);
  line-height: 1.2;
}
.mf-post-body h3 { margin: 32px 0 14px; font-weight: 800; font-size: 22px; color: var(--mf-text-hi); }
.mf-post-body a { color: var(--mf-pill-accent-tx); text-decoration: underline; text-underline-offset: 2px; }
.mf-post-body ul, .mf-post-body ol { margin: 0 0 24px; padding-left: 22px; }
.mf-post-body li { margin-bottom: 10px; }
.mf-post-body img,
.mf-post-body .wp-block-image img { border-radius: var(--mf-r-media); }
.mf-post-body .wp-block-image figcaption,
.mf-post-body figcaption {
  font-size: 13px;
  color: var(--mf-text-lo);
  text-align: center;
  margin-top: 10px;
}
.mf-post-body blockquote,
.mf-post-body .wp-block-quote {
  margin: 40px 0;
  text-align: center;
  border: none;
  padding: 0;
}
.mf-post-body blockquote p,
.mf-post-body .wp-block-quote p {
  margin: 0;
  font-weight: 600;
  font-size: 26px;
  line-height: 1.4;
  letter-spacing: -.01em;
  color: var(--mf-text-hi);
  font-style: italic;
}

/* Author box */
.mf-author-box {
  max-width: 720px;
  margin: 48px auto 0;
  padding: 28px 24px;
  border: 1px solid var(--mf-border);
  border-radius: var(--mf-r-author);
  background: var(--mf-bg-soft);
  display: flex;
  gap: 18px;
  align-items: flex-start;
  flex-wrap: wrap;
}
.mf-author-box__body { flex: 1; min-width: 200px; }
.mf-author-box__label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--mf-text-lo);
  margin-bottom: 4px;
}
.mf-author-box__name { font-weight: 700; font-size: 17px; color: var(--mf-text-hi); margin-bottom: 4px; }
.mf-author-box__bio { font-size: 14px; line-height: 1.5; color: var(--mf-text-mid-2); }
.mf-author-box .mf-btn,
.mf-author-box button {
  flex: none;
  border: none;
  cursor: pointer;
  background: var(--mf-gradient);
  color: #fff;
  font-weight: 700;
  font-size: 13px;
  padding: 10px 20px;
  border-radius: var(--mf-r-pill);
}

/* -------------------------------------------------------------------------
   10. FOOTER
   ------------------------------------------------------------------------- */
.mf-footer {
  max-width: var(--mf-max);
  margin: 64px auto 0;
  padding: 48px var(--mf-pad) 56px;
  border-top: 1px solid var(--mf-border-soft);
}
.mf-footer__cols {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  margin-bottom: 40px;
}
.mf-footer__brand .mf-logo { margin-bottom: 14px; }
.mf-footer__brand .mf-logo__glyph { width: 28px; height: 28px; }
.mf-footer__brand .mf-logo__name { font-size: 20px; }
.mf-footer__blurb { margin: 0; max-width: 280px; font-size: 14px; line-height: 1.6; color: var(--mf-text-mid-2); }
.mf-footer__heading {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--mf-text-lo);
  margin-bottom: 16px;
}
.mf-footer__links { display: flex; flex-direction: column; gap: 11px; }
.mf-footer__links a { font-size: 14.5px; color: var(--mf-text-mid); }
.mf-footer__bottom {
  border-top: 1px solid var(--mf-border-soft);
  padding-top: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.mf-footer__bottom span { font-size: 13px; color: var(--mf-text-lo); }

/* -------------------------------------------------------------------------
   10b. QUERY-LOOP CARD HELPERS (featured image, author dot, meta separator)
   ------------------------------------------------------------------------- */
/* Card-grid featured images become the hatched media block. */
.mf-card-grid .wp-block-post-featured-image {
  margin: 0 0 16px;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: var(--mf-r-media);
  background: repeating-linear-gradient(135deg, var(--mf-ph-a) 0 11px, var(--mf-ph-b) 11px 22px);
}
.mf-card-grid .wp-block-post-featured-image img {
  width: 100%; height: 100%; object-fit: cover; border-radius: var(--mf-r-media);
}

/* Card meta: no avatar — "by Author" inline, left-aligned. */
.mf-card-grid .wp-block-post-author,
.mf-card-grid .wp-block-post-author__content {
  display: flex; flex-direction: row; align-items: baseline; gap: 4px;
}
.wp-block-post-author__name { margin: 0; font-weight: 600; font-size: 13px; color: var(--mf-text-mid); }
.wp-block-post-author__byline { margin: 0; font-weight: 600; font-size: 13px; color: var(--mf-text-mid); }

/* "•" separator before each date in a meta row. */
.mf-meta .wp-block-post-date { margin: 0; }
.mf-meta .wp-block-post-date::before {
  content: "\2022"; margin-right: 8px; color: var(--mf-text-lo); opacity: .7;
}
.mf-hero__featured-query .wp-block-post-date,
.mf-hero__featured-query .wp-block-post-date::before { color: rgba(255,255,255,.8); }

/* Author box (single post) — post-author block layout */
.mf-author-box .wp-block-post-author { display: flex; gap: 18px; align-items: center; width: 100%; }
.mf-author-box .wp-block-post-author__avatar img {
  width: 56px; height: 56px; border-radius: 50%; object-fit: cover;
}
.mf-author-box .wp-block-post-author__byline {
  font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
  color: var(--mf-text-lo); margin: 0 0 4px;
}
.mf-author-box .wp-block-post-author__name { font-weight: 700; font-size: 17px; color: var(--mf-text-hi); margin: 0 0 4px; }
.mf-author-box .wp-block-post-author__bio { font-size: 14px; line-height: 1.5; color: var(--mf-text-mid-2); margin: 0; }

/* -------------------------------------------------------------------------
   11. QUERY-LOOP DRIVEN HERO  (featured query + sidebar query)
   The post-template <li> becomes the card; styled to match the static mock.
   ------------------------------------------------------------------------- */
.mf-hero__featured-query .wp-block-post-template,
.mf-hero__sidebar-query .wp-block-post-template {
  margin: 0; padding: 0; list-style: none;
}

/* Featured (single latest post) — fills the grid cell so it matches panel height */
.mf-hero__featured-query { height: 100%; }
.mf-hero__featured-query > .wp-block-post-template { display: block; height: 100%; }
.mf-hero__featured-query > .wp-block-post-template > li {
  position: relative;
  display: flex;
  align-items: flex-end;
  min-height: 360px;
  height: 100%;
  border-radius: var(--mf-r-card);
  overflow: hidden;
  background: var(--mf-gradient-feature);
  margin: 0;
}
.mf-hero__featured-query > .wp-block-post-template > li::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(to top, rgba(15,10,20,.78) 0%, rgba(15,10,20,.25) 42%, rgba(15,10,20,0) 70%);
}
.mf-hero__featured-query .wp-block-post-featured-image {
  position: absolute; inset: 0; margin: 0; height: 100%; z-index: 0;
}
.mf-hero__featured-query .wp-block-post-featured-image img {
  width: 100%; height: 100%; object-fit: cover; border-radius: 0;
}

/* Featured card text (Batch 2): title + byline + date all white; meta on one line.
   Tags stay as white pills with dark text (matches the approved look). */
.mf-hero__featured-query .wp-block-post-title,
.mf-hero__featured-query .wp-block-post-title a {
  color: #fff;
}
/* Looser vertical rhythm: tags -> title -> author line */
.mf-hero__featured-query .mf-tags { margin: 0 0 20px; }
.mf-hero__featured-query .wp-block-post-title { margin: 0 0 18px; }
.mf-hero__featured-query .mf-tags > * {
  background: rgba(255, 255, 255, .92);
  color: #18181b;
  font-size: 12.5px;
  padding: 5px 13px;
  opacity: .6; /* tags only — ~40% less opaque */
}
.mf-hero__featured-query .mf-meta {
  flex-wrap: nowrap;
  align-items: center;
  color: #fff;
}
/* keep "by" + author name inline instead of stacked */
.mf-hero__featured-query .mf-meta .wp-block-post-author,
.mf-hero__featured-query .mf-meta .wp-block-post-author__content {
  display: flex;
  flex-direction: row;
  align-items: baseline;
  gap: 4px;
}
.mf-hero__featured-query .mf-meta .wp-block-post-author__byline,
.mf-hero__featured-query .mf-meta .wp-block-post-author__name,
.mf-hero__featured-query .mf-meta .wp-block-post-author__name a,
.mf-hero__featured-query .mf-meta .wp-block-post-date {
  margin: 0;
  color: #fff;
  font-size: 13.5px;
  font-weight: 600;
  white-space: nowrap;
}
.mf-hero__featured-query .mf-meta .wp-block-post-date { font-weight: 500; opacity: .85; }
.mf-hero__featured-query .mf-meta .wp-block-post-date::before { color: rgba(255, 255, 255, .7); }

/* Sidebar (next 3) — the query block is the bordered panel.
   Items distribute to fill the panel height so it matches the featured card.
   No dividers between items (only the tags->author divider inside each item). */
.mf-hero__sidebar-query .wp-block-post-template {
  display: flex; flex-direction: column; justify-content: space-between; height: 100%;
}
.mf-hero__sidebar-query .wp-block-post-template > li {
  display: flex; gap: 16px; align-items: stretch; padding: 12px 0; margin: 0;
}

/* Thumbnail stretches to the item's content height so its bottom lines up
   with the author row (and avatar) on the right. */
.mf-hero__sidebar-query .wp-block-post-featured-image {
  width: 124px; align-self: stretch; min-height: 132px; flex: none;
  border-radius: var(--mf-r-thumb); overflow: hidden; aspect-ratio: auto; margin: 0;
}
.mf-hero__sidebar-query .wp-block-post-featured-image img { width: 100%; height: 100%; object-fit: cover; border-radius: var(--mf-r-thumb); }

/* Item body */
.mf-sidebar-item__body { flex: 1; min-width: 0; }
.mf-sidebar-item__body .wp-block-post-title {
  margin: 2px 0 11px; font-weight: 700; font-size: 17px; line-height: 1.3;
  letter-spacing: -.01em; color: var(--mf-text-hi);
}
.mf-sidebar-item__body .wp-block-post-title a { color: inherit; }
/* Tags here are lavender (accent) — the ONLY lavender tags on the site. */
.mf-sidebar-item__body .mf-tags { margin: 0 0 14px; gap: 6px; }

/* Author row: light divider above, rounded-rect avatar, name + date stacked */
.mf-sidebar-author {
  display: flex; align-items: flex-end; gap: 10px;
  border-top: 1px solid var(--mf-border-soft);
  padding-top: 13px;
}
.mf-sidebar-avatar {
  width: 28px; height: 28px; flex: none; border-radius: 7px;
  overflow: hidden; background: var(--mf-avatar-grad); line-height: 0;
}
.mf-sidebar-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: 7px; }
.mf-sidebar-author__text { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.mf-sidebar-author__text .wp-block-post-author-name,
.mf-sidebar-author__text .wp-block-post-author-name a {
  font-weight: 600; font-size: 13px; color: var(--mf-text-mid); line-height: 1.35; text-decoration: none;
}
.mf-sidebar-author__text .wp-block-post-date {
  margin: 0; font-weight: 500; font-size: 12px; color: var(--mf-text-lo); line-height: 1.35;
}

/* =========================================================================
   RESPONSIVE LADDER (mobile-first — min-width adds layout going up)
   ========================================================================= */

/* 480 / 640 — minor type + spacing bumps */
@media (min-width: 480px) {
  .mf-hero__featured-inner { padding: 32px; }
  .mf-newsletter { padding: 48px 32px; }
}
@media (min-width: 640px) {
  .mf-hero__featured,
  .mf-hero__featured-query > .wp-block-post-template > li { min-height: 420px; }
  .mf-author-box { padding: 28px 32px; align-items: center; }
}

/* 768 — tablet: card grids go 2-col */
@media (min-width: 768px) {
  .mf-card-grid,
  .wp-block-post-template.mf-card-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .mf-post-body { padding: 0 32px; }
}

/* 1024 — desktop: hero splits, work 4-col, read-next 3-col, inline nav */
@media (min-width: 1024px) {
  :root { --mf-pad: 32px; }

  .mf-header { padding: 26px 32px; gap: 24px; }
  .mf-nav { display: flex; }
  .mf-nav-toggle { display: none; }
  .mf-header-actions { gap: 18px; }
  .mf-header-actions .mf-btn,
  .mf-icon-btn--search { display: inline-flex; }

  .mf-section--hero { margin-top: 14px; padding-top: 10px; }
  .mf-section--work { margin-top: 68px; }
  .mf-section--newsletter { margin-top: 96px; }
  .mf-section--read-next { margin-top: 72px; }

  .mf-hero { grid-template-columns: 1.85fr 1fr; }
  .mf-hero__featured,
  .mf-hero__featured-query > .wp-block-post-template > li { min-height: 460px; }
  .mf-hero__featured-inner { padding: 36px; }

  .mf-section-head { margin-bottom: 30px; }

  .mf-work-grid.mf-card-grid,
  .mf-work-grid.wp-block-post-template { grid-template-columns: repeat(4, 1fr); }
  .mf-read-next-grid.mf-card-grid,
  .mf-read-next-grid.wp-block-post-template { grid-template-columns: repeat(3, 1fr); }

  .mf-newsletter__form { flex-direction: row; }

  .mf-post-header { padding-top: 36px; }
  .mf-post-body { margin-top: 48px; }
  .mf-author-box { margin-top: 48px; }
  .mf-page-blank, .mf-page-wide { padding-top: 56px; padding-bottom: 88px; }
  .mf-page-blank .mf-post-body, .mf-page-wide .mf-post-body { margin-top: 0; }

  .mf-footer { margin-top: 80px; padding: 56px 32px 64px; }
  .mf-footer__cols { grid-template-columns: 1.6fr 1fr 1fr 1fr; margin-bottom: 48px; }
}

/* 1280 — large desktop: container already settled at 1200 max */
@media (min-width: 1280px) {
  .mf-header,
  .mf-section,
  .mf-footer { max-width: var(--mf-max); }
}

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