/* Rebuilt article templates: blog, case study, service brief (PLAN.md Phase 2).
 *
 * Layout and rhythm only. The Elementor kit (post-3209.css) already brands bare
 * h1-h6 and a under .elementor-kit-3209, so semantic markup inherits the site's
 * type without restating it here. Brand colours come from the kit's custom
 * properties rather than hard-coded hex, so a rebrand in Elementor carries over.
 */

.article {
  --article-width: 820px;
  --article-gap: 1.5rem;
  --rule: color-mix(in srgb, var(--e-global-color-secondary, #97989b) 30%, transparent);
  max-width: var(--article-width);
  margin-inline: auto;
  /* No top padding: the full-bleed hero (.article-hero, an .article child so
     tools/check_content.py's <article> scan still sees its download CTA)
     needs to sit flush under the nav with no gap, the way live's does. The
     no-hero header supplies its own top spacing instead (below). The footer's
     HubSpot form card pulls itself up 120px (--margin-top on
     .elementor-element-60bbfbf) to overlap whatever precedes it. Elementor
     pages ended with a padded band that absorbed it; these end flush, so
     reserve the space here or the card lands on the last row of cards. */
  padding: 0 1.25rem 9rem;
}

/* ---------------------------------------------------------------- masthead */
/* Only rendered when there's no hero image; the hero variant gets its own
   top spacing from .article-hero__inner's padding instead. */
.article__head { padding-top: 3rem; }

.article__eyebrow {
  margin: 0 0 0.75rem;
  font-family: "Geologica", sans-serif;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--e-global-color-primary, #5fa508);
}

/* .elementor-kit-3209 h1 (0-1-1) sets font-size:1.5em and beats a bare
   .article__title (0-1-0), so this clamp never applied and the headline
   rendered at 24px. Same trap as .article__cta and .prose h3. */
.article .article__title,
.article-hero .article__title {
  /* The kit sets h1 smaller than h2, which reads oddly on a long-form page. */
  margin: 0 0 1rem;
  font-size: clamp(1.9rem, 1.2rem + 2.2vw, 2.9rem);
  font-weight: 500;
  line-height: 1.15;
}

.article__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
  margin: 0;
  font-size: 0.9rem;
  color: var(--e-global-color-secondary, #97989b);
}
.article__meta time { white-space: nowrap; }
.article__meta span[aria-hidden] { opacity: 0.5; }

/* Live runs the hero photo edge-to-edge behind the title, right-anchored,
   fading into the page on the side facing the text -- not a standalone
   image block underneath the header. Full-bleed section, same convention
   as .hero in service.css: a section-level background with a max-width
   inner wrapper just for the text. */
.article-hero {
  /* Break out of .article's centered, max-width column to span the full
     viewport while staying a DOM child of <article> (see the padding note
     above). Standard full-bleed-in-a-constrained-parent trick. */
  width: 100vw;
  position: relative;
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
  min-height: 360px;
  display: flex;
  align-items: center;
  background-image: var(--hero-img);
  background-repeat: no-repeat;
  background-size: cover;
  background-position: 100% 50%;
}
/* Plateau must clear ~50% -- several of these source photos are a hard
   white/dark cut right around there (not a built-in gradient), so a plateau
   that lets go any earlier starts revealing translucent white over already
   -fully-dark photo, which reads as a muddy grey band instead of a fade. */
.article-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, #fff 0%, #fff 52%, transparent 74%);
}
.article-hero__inner {
  position: relative;
  width: 100%;
  max-width: 1140px;
  margin: 0 auto;
  padding: 3rem 1.25rem;
}
.article-hero .article__title { max-width: 700px; }
.article-hero__mobile-media { display: none; }

/* The side-by-side fade only has room to work once the title column and the
   fade's own width (a fraction of the full viewport) can both fit without
   overlapping -- below that, stack: plain title block, then the photo
   un-faded and full width, matching live's own separate mobile widget. */
@media (max-width: 700px) {
  .article-hero {
    display: block;
    min-height: 0;
    background-image: none;
  }
  .article-hero::before { content: none; }
  .article-hero__inner { padding: 2rem 1.25rem 1.5rem; }
  .article-hero .article__title { max-width: none; }
  /* Several of these source photos have a hard-edged fade baked in rather
     than a gradual one (fine full-bleed behind the desktop overlay, which
     hides the seam under its own gradient) -- fade the same way here, over
     the img rather than the img's own (unreliable cross-browser) mask. */
  .article-hero__mobile-media { display: block; position: relative; overflow: hidden; }
  .article-hero__mobile-media::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to right, #fff 0%, transparent 20%);
  }
  .article-hero__mobile-img { display: block; width: 100%; height: auto; }
}

/* ------------------------------------------------------------------- prose */
.prose { margin-top: 2.5rem; }
.prose > * + * { margin-top: var(--article-gap); }
.prose > h2 { margin-top: 2.75rem; font-size: 1.6rem; line-height: 1.25; }
.prose > h3 { margin-top: 2rem; font-size: 1.2rem; line-height: 1.3; letter-spacing: 0; }
.prose p, .prose li { line-height: 1.7; }
.prose ul, .prose ol { padding-left: 1.4rem; }
.prose li + li { margin-top: 0.4rem; }
.prose img { max-width: 100%; height: auto; border-radius: 12px; }
/* WordPress writes a typed emoji as an inline <img> of its Twemoji SVG
   rather than the character itself; core ships a matching rule (.emoji) to
   keep it text-sized. Extraction kept the img but not that rule, so it
   rendered at the SVG's own intrinsic size -- a lightbulb filling the page. */
.prose img[src*="/images/core/emoji/"] {
  display: inline;
  width: 1.1em;
  height: 1.1em;
  vertical-align: -0.15em;
  margin: 0 0.15em 0 0;
  border-radius: 0;
}
.prose strong { font-weight: 600; }
.prose a { text-decoration: underline; text-underline-offset: 2px; }

/* h3 IS the green subsection. Every entry uses h2 for sections and h3 for the
   subsections that used to carry <span class="green">, so the level says it and
   no inline HTML is needed -- which matters because the Pages CMS rich-text
   editor strips spans on save but round-trips heading levels. Its dropdown
   stops at Heading 3, so this is the deepest level an editor can pick.
   Scoped past .elementor-kit-3209 h3 (0-1-1), as .article__cta had to be. */
.article .prose h3 { color: var(--e-global-color-primary, #5fa508); }

/* Brand emphasis carried over from the Elementor copy. */
.prose .green { color: var(--e-global-color-primary, #5fa508); }

/* Comparison tables in the service briefs. They are wide, so they scroll
   inside their own container rather than pushing the page sideways. */
.prose .table-scroll { overflow-x: auto; margin-top: var(--article-gap); }
.prose table {
  width: 100%;
  min-width: 34rem;
  border-collapse: collapse;
  font-size: 0.95rem;
}
.prose th, .prose td {
  padding: 0.75rem 0.9rem;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--rule);
}
.prose thead th {
  font-family: "Geologica", sans-serif;
  font-weight: 500;
  background: var(--e-global-color-b9b3990, #fbfbfd);
}
.prose tbody tr:nth-child(even) { background: color-mix(in srgb, var(--e-global-color-b9b3990, #fbfbfd) 60%, transparent); }

/* --------------------------------------------------------------- resources */
.resources { color: var(--e-global-color-text, #343434); }
.resources-hero {
  min-height: 400px;
  display: flex;
  align-items: center;
  background-image: var(--hero-img);
  background-position: center right;
  background-size: cover;
}
.resources-hero__inner {
  width: min(1140px, calc(100% - 40px));
  margin: 0 auto;
}
.resources__eyebrow {
  margin: 0 0 0.7rem;
  color: var(--e-global-color-primary, #5fa508);
  font-family: "Geologica", sans-serif;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.resources .resources-hero__title {
  max-width: 65%;
  margin: 0 0 1rem;
  color: var(--e-global-color-text, #343434);
  font-family: "Geologica", sans-serif;
  font-size: 3rem;
  font-weight: 400;
  line-height: 1.02;
  text-transform: uppercase;
}
.resources-hero__title span { color: var(--e-global-color-primary, #5fa508); }
.resources-hero__body { max-width: 31rem; margin: 0; font-size: 1rem; line-height: 1.65; }
.resources-hero__mobile { display: none; }
.resources-listing {
  width: min(1140px, calc(100% - 40px));
  margin: 0 auto;
  padding: 35px 0 140px;
}
.resources-filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem 1.8rem;
  margin-bottom: 65px;
}
.resources-filters button {
  border: 0;
  padding: 0.4rem 0;
  background: transparent;
  color: var(--e-global-color-text, #343434);
  font: inherit;
  cursor: pointer;
}
.resources .resources-filters button:hover,
.resources .resources-filters button:focus,
.resources .resources-filters button[aria-pressed="true"] {
  background-color: transparent;
  color: var(--e-global-color-primary, #5fa508);
}
.resource-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 30px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.resource-card[hidden] { display: none; }
.resource-card { position: relative; min-width: 0; }
.resource-card article {
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 20px;
  background: var(--e-global-color-accent, #fff);
  box-shadow: 0 10px 10px 5px rgb(0 0 0 / 10%);
}
.resource-card__media { display: block; aspect-ratio: 1; overflow: hidden; }
.resource-card__media img { width: 100%; height: 100%; object-fit: cover; }
.resource-card__kind {
  position: absolute;
  top: 20px;
  right: 20px;
  z-index: 1;
  padding: 8px;
  border-radius: 8px;
  background: var(--e-global-color-primary, #5fa508);
  color: var(--e-global-color-accent, #fff);
  font-size: 0.75rem;
  text-transform: uppercase;
}
.resource-card__body { flex: 1; padding: 20px 20px 0; }
.resources .resource-card__title {
  margin: 0 0 0.8rem;
  color: var(--e-global-color-primary, #5fa508);
  font-family: "Poppins", sans-serif;
  font-size: 1.1rem;
  font-weight: 600;
  line-height: 1.35;
  text-transform: uppercase;
}
.resource-card__title a { color: inherit; text-decoration: none; }
.resource-card__excerpt { margin: 0; line-height: 1.6; }
.resource-card__more {
  display: inline-block;
  margin-top: 10px;
  color: var(--e-global-color-primary, #5fa508);
  text-decoration: none;
}
.resources .resource-card__title a:hover,
.resources .resource-card__more:hover {
  color: #1A4D08;
}
.resource-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 0;
  padding: 20px;
  color: var(--e-global-color-secondary, #97989b);
  font-size: 0.8rem;
  text-transform: uppercase;
}
.resources-empty { text-align: center; }

@media (max-width: 1024px) {
  .resource-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 767px) {
  .resources-hero { min-height: 0; display: block; background-image: none; }
  .resources-hero__mobile { display: block; width: 100%; }
  .resources-hero__inner { width: 100%; padding: 20px; }
  .resources .resources-hero__title { max-width: none; font-size: 2rem; }
  .resources-listing { padding: 60px 0 100px; }
  .resources-filters { gap: 0.4rem 0.9rem; margin-bottom: 30px; }
  .resource-cards { grid-template-columns: 1fr; }
}

/* ------------------------------------------------------------------ button */
/* .elementor-kit-3209 a (0-1-1) sets every link to the brand green, and it
   outranks a bare .article__cta (0-1-0) -- which painted the label the same
   green as the button. Scoping to .article wins on specificity. */
.article .article__cta,
.article-hero .article__cta {
  display: inline-block;
  margin-top: 1.5rem;
  padding: 0.7rem 1.6rem;
  border-radius: 10px;
  font-family: "Geologica", sans-serif;
  font-size: 0.95rem;
  text-decoration: none;
  color: var(--e-global-color-accent, #fff);
  background: var(--e-global-color-primary, #5fa508);
}
.article .article__cta:hover,
.article .article__cta:focus-visible,
.article-hero .article__cta:hover,
.article-hero .article__cta:focus-visible { background: #1A4D08; color: var(--e-global-color-accent, #fff); }

/* -------------------------------------------------------------- at a glance */
.glance {
  margin-top: 2.5rem;
  padding: 1.5rem;
  border-radius: 20px;
  background: var(--e-global-color-b9b3990, #fbfbfd);
}
/* Likewise .elementor-kit-3209 h2 (2em) beat .glance__title, rendering this
   small caps label at 32px. */
.article .glance__title {
  margin: 0 0 1.25rem;
  font-family: "Geologica", sans-serif;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--e-global-color-secondary, #97989b);
}
.glance__list {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  margin: 0;
}
.glance__item { display: flex; gap: 0.9rem; }
.glance__icon { flex: 0 0 auto; width: 1.4rem; height: 1.4rem; margin-top: 0.15rem; fill: var(--e-global-color-primary, #5fa508); }
.glance__label {
  margin: 0 0 0.3rem;
  font-family: "Geologica", sans-serif;
  font-size: 0.95rem;
  font-weight: 500;
}
.glance__text { margin: 0; font-size: 0.95rem; line-height: 1.6; }

/* ------------------------------------------------------------------ author */
.author {
  display: flex;
  gap: 1.25rem;
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--rule);
}
.author__avatar { flex: 0 0 auto; width: 4.5rem; height: 4.5rem; border-radius: 50%; object-fit: cover; }
.author__name { margin: 0 0 0.4rem; font-family: "Geologica", sans-serif; font-size: 1rem; font-weight: 500; }
.author__bio { margin: 0; font-size: 0.95rem; line-height: 1.65; }

@media (max-width: 480px) {
  .article { padding: 2rem 1rem 3rem; }
  .author { flex-direction: column; gap: 1rem; }
}
