/*
Theme Name: Legacy Farm
Theme URI: https://legacydigital.net/
Description: Child theme of Twenty Twenty-Five for the Legacy Digital microsite farm. Warm archival palette, serif display type, content-first layout. One theme, five sites: per-site colour is the only intended variation.
Author: Legacy Digital Productions
Template: twentytwentyfive
Version: 1.0.0
Requires at least: 6.7
Tested up to: 7.1
Requires PHP: 8.1
License: GNU General Public License v2 or later
Text Domain: legacyfarm
*/

/* Long-form readability: the content engine is the point of these sites. */
.entry-content > p { max-width: 42rem; }
.entry-content h2 { margin-top: 2.6em; }
.entry-content h3 { margin-top: 1.9em; }

/* Tables carry the format-comparison content and must never blow out mobile. */
.wp-block-table { overflow-x: auto; }
.wp-block-table table { border-collapse: collapse; width: 100%; }
.wp-block-table th,
.wp-block-table td {
  border: 1px solid var(--wp--preset--color--line);
  padding: 0.6rem 0.8rem;
  text-align: left;
}
.wp-block-table thead th {
  background: var(--wp--preset--color--surface);
  font-family: var(--wp--preset--font-family--body);
  font-weight: 700;
}

/* Callout: used by "From the lab" and "At a glance" blocks in drafts. */
.lf-callout {
  background: var(--wp--preset--color--surface);
  border-left: 3px solid var(--wp--preset--color--primary);
  padding: 1.25rem 1.5rem;
  margin: 2rem 0;
}
.lf-callout > *:first-child { margin-top: 0; }
.lf-callout > *:last-child { margin-bottom: 0; }

/* Eyebrow label above section headings. */
.lf-eyebrow {
  font-family: var(--wp--preset--font-family--body);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--wp--preset--color--primary);
}

/* Stat figure in the trust bar. */
.lf-stat strong {
  font-family: var(--wp--preset--font-family--display);
  font-size: 2.25rem;
  font-weight: 700;
  line-height: 1.05;
  display: block;
  color: var(--wp--preset--color--deep);
}

/* Deep sections invert; make sure headings and rules follow. */
.has-deep-background-color :is(h1,h2,h3,h4,p,li) { color: var(--wp--preset--color--base); }
.has-deep-background-color .lf-eyebrow { color: #E8B67F; }

/* Four-step process: stack earlier than the block default so headings
   like "1. Intake" never wrap mid-word in a squeezed column. */
@media (max-width: 900px) {
  .wp-block-columns:not(.is-not-stacked-on-mobile) { flex-wrap: wrap !important; }
  .wp-block-columns:not(.is-not-stacked-on-mobile) > .wp-block-column {
    flex-basis: calc(50% - var(--wp--style--block-gap, 1.2rem)) !important;
    flex-grow: 0;
  }
}
@media (max-width: 560px) {
  .wp-block-columns:not(.is-not-stacked-on-mobile) > .wp-block-column {
    flex-basis: 100% !important;
  }
}

/* An eyebrow belongs to the heading under it, so kill the heading's default
   top margin when it follows one. Without this the label floats ~100px above
   its own section and reads as unrelated. */
.lf-eyebrow { margin-bottom: 0.35rem; }
.lf-eyebrow + h2,
.lf-eyebrow + h3,
.lf-eyebrow + .wp-block-heading { margin-top: 0.1em !important; }

/* Section rhythm: headings inside page content should not inherit the
   long-form article spacing used inside .entry-content. */
.wp-block-group > .wp-block-heading:first-child { margin-top: 0; }
