/*
 * Wonderboy Creative - the blog surface.
 *
 * Its own .wbb-* vocabulary, layered on the shared chrome in wonderboy.css the
 * same way .wsp-*, .dseo-* and .pf-* are. Nothing here restyles a component
 * another surface owns; the home page's latest-posts row keeps its own .wb-*
 * markup and is untouched by this file.
 *
 * Three views, one stylesheet: the index at /blog/, the archives at
 * /blog/<service-area>/ and the posts at /<service-area>/<slug>/.
 */

/* -- shell ----------------------------------------------------------------- */

.wbb-container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.wbb-container--narrow { max-width: 760px; }

.wbb-eyebrow {
  font-family: var(--font-mono);
  font-size: 12px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--hero-600); margin: 0 0 14px;
}

.wbb-dot {
  display: inline-block; width: 3px; height: 3px; border-radius: 50%;
  background: var(--gray-300); vertical-align: middle; margin: 0 9px;
}

.wbb-crumbs {
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
  font-size: 13px; color: var(--fg-secondary); margin: 0 0 20px;
}
.wbb-crumbs a { color: inherit; text-decoration: none; }
.wbb-crumbs a:hover { color: var(--hero-600); text-decoration: underline; }
.wbb-crumbs span { color: var(--gray-300); }

/* -- the post -------------------------------------------------------------- */

.wbb-post { padding: 0 0 96px; }
.wbb-post-head { padding: 56px 0 0; }

.wbb-post-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(32px, 4.6vw, 52px);
  line-height: 1.08;
  letter-spacing: -.02em;
  color: var(--midnight-900);
  text-wrap: balance;
  margin: 0 0 18px;
}

.wbb-post-meta {
  display: flex; flex-wrap: wrap; align-items: center;
  font-size: 14px; color: var(--fg-secondary); margin: 0 0 36px;
}

/*
 * The hero never upscales. Several of these images came off production at
 * their real size and two of them are only ~510px wide with no larger original
 * anywhere; stretching those across a 1130px column made a blurry banner out of
 * a small illustration. The figure centres whatever it is given and the image
 * stops at its own width.
 */
.wbb-post-hero {
  /* The figure shrinks to the image rather than pillarboxing it in a grey
     box, so a small source renders at its own size and centred. */
  max-width: min(100%, var(--wbb-hero-w, 100%));
  margin: 0 auto 48px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--gray-100);
}
.wbb-post-hero img { display: block; width: 100%; height: auto; }

/* -- the article ----------------------------------------------------------- */
/*
 * The bodies came off a page builder that had no styles of its own outside it,
 * so everything below is styling raw tags rather than classes. Scoped to
 * .wbb-prose so it cannot reach any other surface.
 */

.wbb-prose { font-size: 18px; line-height: 1.72; color: var(--fg-primary); }

/*
 * Spacing comes from the gap between siblings, not from each element's own
 * margin, so the first and last child sit flush against the column.
 *
 * The reset and the gap are both (0,1,0), so the gap wins by being second.
 * Do NOT reintroduce a `.wbb-prose p { margin: 0 }` rule: that is (0,1,1), it
 * beats the gap, and every paragraph in every post ran into the next one.
 */
.wbb-prose > * { margin-top: 0; margin-bottom: 0; }
.wbb-prose > * + * { margin-top: 1.15em; }

.wbb-prose h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(24px, 2.6vw, 31px);
  line-height: 1.22;
  letter-spacing: -.01em;
  color: var(--midnight-900);
  text-wrap: balance;
  margin-top: 2em;
  margin-bottom: .55em;
}

.wbb-prose h3 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(19px, 2vw, 23px);
  line-height: 1.3;
  color: var(--midnight-900);
  margin-top: 1.7em;
  margin-bottom: .45em;
}

.wbb-prose a { color: var(--hero-600); text-decoration: underline; text-underline-offset: 2px; }
.wbb-prose a:hover { color: var(--hero-700); }

.wbb-prose ul, .wbb-prose ol { margin: 1.15em 0 0; padding-left: 1.4em; }
.wbb-prose li + li { margin-top: .45em; }
.wbb-prose li { padding-left: .2em; }

.wbb-prose img {
  display: block;
  width: 100%;
  height: auto;
  margin: 2em 0;
  border-radius: var(--radius-md);
  background: var(--gray-100);
}

.wbb-prose blockquote {
  margin: 2em 0;
  padding: 4px 0 4px 22px;
  border-left: 3px solid var(--hero-500);
  font-size: 20px;
  line-height: 1.55;
  color: var(--midnight-800);
}

.wbb-prose strong { font-weight: 700; color: var(--midnight-900); }
.wbb-prose em { font-style: italic; }
.wbb-prose hr { border: 0; border-top: 1px solid var(--gray-200); margin: 2.5em 0; }

/* -- bio and the service hand-off ------------------------------------------ */

.wbb-bio {
  margin: 56px 0 0;
  padding: 22px 24px;
  border-left: 3px solid var(--hero-500);
  background: var(--gray-50);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
}
.wbb-bio p { margin: 0; font-size: 15px; line-height: 1.65; color: var(--fg-secondary); }
.wbb-bio strong { color: var(--midnight-900); }
.wbb-bio a { color: var(--hero-600); }

.wbb-area-cta {
  margin: 40px 0 0; padding: 28px 0 0;
  border-top: 1px solid var(--gray-200);
  display: flex; flex-wrap: wrap; align-items: center; gap: 16px;
}
.wbb-area-cta-label {
  margin: 0; font-size: 13px; letter-spacing: .08em;
  text-transform: uppercase; color: var(--fg-secondary);
}

/* -- index, archive and the related row ------------------------------------ */

.wbb-index { padding: 56px 0 96px; }
.wbb-index-head { padding: 0 0 34px; }

.wbb-index-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(32px, 4.4vw, 50px);
  line-height: 1.08;
  letter-spacing: -.02em;
  color: var(--midnight-900);
  text-wrap: balance;
  margin: 0 0 14px;
}
.wbb-index-deck {
  max-width: 620px; margin: 0;
  font-size: 18px; line-height: 1.6; color: var(--fg-secondary);
}
.wbb-index-service { margin: 18px 0 0; font-size: 15px; }
.wbb-index-service a {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--hero-600); text-decoration: none; font-weight: 600;
}
.wbb-index-service a:hover { text-decoration: underline; }

.wbb-topics { padding: 0 0 34px; }
.wbb-topics-list {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin: 0; padding: 0; list-style: none;
}
.wbb-topic {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 14px;
  border: 1px solid var(--gray-200);
  border-radius: 999px;
  font-size: 14px; font-weight: 500;
  color: var(--fg-secondary); text-decoration: none;
  transition: border-color var(--dur-fast) var(--ease-out),
              color var(--dur-fast) var(--ease-out);
}
.wbb-topic:hover { border-color: var(--hero-400); color: var(--midnight-900); }
.wbb-topic.is-current {
  background: var(--midnight-900); border-color: var(--midnight-900); color: #fff;
}
.wbb-topic-n { font-size: 12px; opacity: .6; }

.wbb-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px;
}

.wbb-card {
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform var(--dur-base) var(--ease-out),
              box-shadow var(--dur-base) var(--ease-out);
}
.wbb-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.wbb-card-link { display: block; color: inherit; text-decoration: none; }

.wbb-card-thumb {
  position: relative; aspect-ratio: 16/10; overflow: hidden; background: var(--gray-100);
}
.wbb-card-thumb img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform var(--dur-slow) var(--ease-out);
}
.wbb-card:hover .wbb-card-thumb img { transform: scale(1.04); }
.wbb-card-noimg {
  display: block; width: 100%; height: 100%;
  background: linear-gradient(135deg, var(--midnight-800), var(--midnight-950));
}
.wbb-card-cat {
  position: absolute; left: 12px; top: 12px;
  padding: 5px 11px; border-radius: 999px;
  background: rgba(255,255,255,.94);
  font-size: 12px; font-weight: 600; color: var(--midnight-900);
  backdrop-filter: blur(4px);
}

.wbb-card-body { padding: 20px 22px 22px; }
.wbb-card-meta {
  display: flex; align-items: center;
  font-size: 13px; color: var(--fg-secondary); margin: 0 0 10px;
}
.wbb-card-title {
  font-family: var(--font-display); font-weight: 700;
  font-size: 20px; line-height: 1.25; text-wrap: balance;
  color: var(--midnight-900); margin: 0 0 8px;
}
.wbb-card-blurb {
  font-size: 15px; line-height: 1.6; color: var(--fg-secondary); margin: 0 0 14px;
}
.wbb-card-more {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 14px; font-weight: 600; color: var(--hero-600);
}

.wbb-more { margin-top: 88px; padding: 56px 0 0; border-top: 1px solid var(--gray-200); }
.wbb-more-title {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(22px, 2.4vw, 28px); color: var(--midnight-900);
  margin: 0 0 28px;
}

.wbb-empty { font-size: 17px; color: var(--fg-secondary); }

.wbb-pagination { margin: 48px 0 0; }
.wbb-pagination .page-numbers {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 40px; height: 40px; padding: 0 12px;
  border: 1px solid var(--gray-200); border-radius: 10px;
  margin-right: 6px;
  color: var(--fg-secondary); text-decoration: none; font-size: 15px;
}
.wbb-pagination .page-numbers.current {
  background: var(--midnight-900); border-color: var(--midnight-900); color: #fff;
}
.wbb-pagination .page-numbers:hover:not(.current) { border-color: var(--hero-500); color: var(--midnight-900); }

@media (prefers-reduced-motion: reduce) {
  .wbb-card { transition: none; }
  .wbb-card:hover { transform: none; }
  .wbb-card-thumb img, .wbb-card:hover .wbb-card-thumb img { transition: none; transform: none; }
}

/* -- responsive ------------------------------------------------------------ */

@media (max-width: 1024px) {
  .wbb-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 680px) {
  .wbb-container { padding: 0 18px; }
  .wbb-grid { grid-template-columns: 1fr; }
  .wbb-post-head { padding-top: 34px; }
  .wbb-post { padding-bottom: 64px; }
  .wbb-index { padding: 34px 0 64px; }
  .wbb-prose { font-size: 17px; }
  .wbb-post-hero { margin-bottom: 34px; }
  .wbb-more { margin-top: 56px; padding-top: 40px; }
  .wbb-area-cta { flex-direction: column; align-items: flex-start; gap: 12px; }
}
