/* Blog restyle for mhigrowthengine.com (blog/index.html and every blog/<slug>/index.html).
   Loads after /brand/mhi.css and uses its tokens. Visual rules only.
   Spec: companies/mhi-media/projects/mhigrowthengine-rebrand/brand-spec.md
   Markup is produced by tools/restyle-blog.py, which strips the old-theme colour styles and
   hover handlers. A few layout-only inline styles remain (nav links wrapper, services section
   and links row, first footer paragraph); the rules that override those use !important. */

/* 0. Reset (replaces the old inline "*{margin:0;padding:0;box-sizing:border-box}") */
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; }
::selection { background-color: var(--white); color: var(--blue); }

/* 1. Nav: wordmark, links and clock on one wrapping row, bottom-aligned, space-between */
.nav {
  position: relative;
  z-index: 2;
  width: 100%;
  background-color: var(--blue);
  border-bottom: 2px solid var(--white);
  padding: 2.5rem;
}
.nav-inner {
  display: flex;
  flex-flow: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1rem;
  width: 100%;
}
/* The links wrapper carries an inline display:flex; flatten it so each link is spaced like mhimedia.com */
.nav-inner > .nav-links { display: contents !important; }
.nav-brand {
  display: flex;
  align-items: flex-end;
  gap: 1rem;
  color: var(--white);
  text-decoration: none;
}
.nav-brand:hover { opacity: .8; }
.nav-brand .mhi-wordmark { display: block; flex: none; width: 20.625rem; max-width: 100%; height: auto; }
.nav-brand-text,
.nav-link {
  color: var(--white);
  font-family: var(--font-mono);
  font-size: .75rem;
  font-weight: 500;
  line-height: 1.1;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
}
.nav-link { transition: all .3s; }
.nav-link:hover { opacity: .6; }

/* 2. Article column */
.article {
  max-width: calc(45rem + 5rem);
  margin: 0 auto;
  padding: 4rem 2.5rem 3rem;
}
.article-header {
  display: flex;
  flex-flow: column;
  align-items: flex-start;
  gap: 1.5rem;
  margin-bottom: 2rem;
}
.back-link {
  color: var(--white);
  font-family: var(--font-mono);
  font-size: .75rem;
  font-weight: 500;
  line-height: 1.1;
  text-transform: uppercase;
  transition: all .3s;
}
.back-link:hover { opacity: .6; }
/* Date and read time as a tag pill */
.article-meta {
  display: inline-flex;
  align-items: center;
  background-color: var(--white-10);
  clip-path: var(--notch-tag);
  padding: 8px .875rem;
  font-size: .875rem;
  font-weight: 500;
  line-height: 1.1;
}

.article-body {
  font-size: 1.125rem;
  font-weight: 400;
  line-height: 1.55;
  overflow-wrap: break-word;
}
.article-body h1.article-title {
  margin: 0 0 2rem;
  padding-bottom: 2rem;
  border-bottom: 2px solid var(--white);
  font-size: 3.5rem;
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -.5px;
}
.article-body h2 { margin: 3.5rem 0 1.25rem; font-size: 2.25rem; font-weight: 400; line-height: 1.05; }
.article-body h3 { margin: 2.5rem 0 1rem; font-size: 1.5rem; font-weight: 400; line-height: 1.15; }
.article-body h4 { margin: 2rem 0 .75rem; font-size: 1.125rem; font-weight: 500; line-height: 1.3; }
.article-body p { margin: 0 0 1.25em; }
.article-body strong, .article-body b { font-weight: 500; }
.article-body ul, .article-body ol { margin: 0 0 1.25em; padding-left: 1.25em; }
.article-body li { margin-bottom: .4em; }
.article-body li::marker { color: var(--white); }
.article-body hr { height: 0; margin: 3rem 0; border: 0; border-top: 2px solid var(--white); }
.article-body a {
  color: var(--white);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: .2em;
  transition: opacity .2s;
}
.article-body a:hover { opacity: .6; }
.article-body blockquote {
  margin: 0 0 1.5rem;
  padding: .25rem 0 .25rem 1.5rem;
  border-left: 2px solid var(--white);
  font-size: 1.5rem;
  line-height: 1.2;
}
.article-body code {
  font-family: var(--font-mono);
  font-size: .875em;
  background-color: var(--white-10);
  padding: .1em .3em;
}
.article-body pre {
  margin: 0 0 1.5rem;
  padding: 1.25rem 1.5rem;
  background-color: var(--white-10);
  font-family: var(--font-mono);
  font-size: .8125rem;
  line-height: 1.6;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  overflow-x: auto;
}
.article-body pre code { background: none; padding: 0; font-size: inherit; }
.article-body pre ul { margin: 0; }

/* Tables: 2px white rules, no vertical lines, mono header row */
.table-wrap { overflow-x: auto; margin: 0 0 1.75rem; }
.article-body table {
  width: 100%;
  border-collapse: collapse;
  border-top: 2px solid var(--white);
  font-size: .9375rem;
  line-height: 1.35;
}
.article-body th, .article-body td {
  padding: .75rem 1rem .75rem 0;
  border: 0;
  border-bottom: 2px solid var(--white);
  text-align: left;
  vertical-align: top;
}
.article-body th:last-child, .article-body td:last-child { padding-right: 0; }
.article-body th {
  font-family: var(--font-mono);
  font-size: .75rem;
  font-weight: 500;
  line-height: 1.3;
  text-transform: uppercase;
}

/* Responsive video embed (YouTube iframe): full column width, 16:9 */
.video-embed { position: relative; width: 100%; aspect-ratio: 16 / 9; margin: 0 0 1.75rem; }
.video-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* 3. Services links box (classes added by restyle-blog.py; section and links row keep layout-only inline styles) */
.services {
  max-width: calc(45rem + 5rem) !important;
  margin: 0 auto 3rem !important;
  padding: 0 2.5rem !important;
}
.services-box {
  border: 0;
  border-top: 2px solid var(--white);
  border-radius: 0;
  background: none;
  padding: 2rem 0 0;
}
.services-label {
  color: var(--white);
  opacity: .6;
  font-family: var(--font-mono);
  font-size: .75rem;
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: .04em;
  text-transform: uppercase;
  margin: 0 0 1rem;
}
.services-links { gap: .5rem !important; }
.services-link {
  display: inline-flex;
  align-items: center;
  border: 0;
  border-radius: 0;
  background-color: var(--white-10);
  clip-path: var(--notch-tag);
  color: var(--white);
  padding: 8px .875rem;
  font-family: var(--font-sans);
  font-size: .875rem;
  font-weight: 500;
  line-height: 1.1;
  text-transform: capitalize;
  transition: opacity .2s;
}
.services-link:hover { opacity: .6; }

/* 4. CTA: dashed panel (mhimedia.com case-study CTA) with the notched white button */
.cta-section {
  max-width: calc(45rem + 5rem);
  margin: 0 auto;
  padding: 0 2.5rem 5rem;
}
.cta-box {
  display: flex;
  flex-flow: column;
  align-items: center;
  gap: 1.5rem;
  padding: 3rem 2rem;
  border: 2px dashed var(--white);
  background-color: var(--blue);
  text-align: center;
}
.cta-box h2 { margin: 0; font-size: 2rem; font-weight: 400; line-height: 1; }
.cta-box p { max-width: 32rem; margin: 0; font-size: 1rem; line-height: 1.35; }
.cta-button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  white-space: nowrap;
  background-color: var(--white);
  color: var(--blue);
  clip-path: var(--notch-button);
  padding: .75em 1.5em;
  font-family: var(--font-mono);
  font-size: .75rem;
  font-weight: 500;
  line-height: 1;
  text-transform: uppercase;
  text-decoration: none;
  transition: opacity .2s;
}
.cta-button:hover { opacity: .85; color: var(--blue); }

/* 5. Cards (related posts and blog index): translucent white-10 fill with side notches */
.card-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }
.card {
  display: flex;
  flex-flow: column;
  align-items: flex-start;
  gap: .75rem;
  background-color: var(--white-10);
  clip-path: var(--notch-card);
  padding: 2rem 1.75rem;
  color: var(--white);
  text-decoration: none;
  transition: opacity .2s;
}
.card:hover { opacity: .75; }
.card-date { opacity: .6; font-size: .875rem; font-weight: 500; line-height: 1.1; }
.card-title { margin: 0; font-size: 1.5rem; font-weight: 400; line-height: 1.1; }
.card-excerpt { flex: 1 1 auto; margin: 0; opacity: .6; font-size: .875rem; font-weight: 500; line-height: 1.3; }
.card-read {
  margin-top: .5rem;
  font-family: var(--font-mono);
  font-size: .75rem;
  font-weight: 500;
  line-height: 1.1;
  text-transform: uppercase;
}

/* Related posts: full-width section with a 2px top rule, three cards */
.related { border-top: 2px solid var(--white); padding: 4rem 2.5rem 5rem; }
.related > * { max-width: 64rem; margin-left: auto; margin-right: auto; }
.related-title { margin-bottom: 2rem; font-size: 2rem; font-weight: 400; line-height: 1; }
.related .card-grid { grid-template-columns: 1fr 1fr 1fr; }

/* 6. Blog index */
.index-hero {
  max-width: calc(64rem + 5rem);
  margin: 0 auto;
  padding: 5rem 2.5rem 3rem;
}
.index-hero h1 { margin: 0 0 1.5rem; font-size: 4rem; font-weight: 400; line-height: 1.05; letter-spacing: -.5px; }
.index-hero p { max-width: 40rem; margin: 0; font-size: 1.125rem; line-height: 1.4; }
.index-hero a { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .2em; transition: opacity .2s; }
.index-hero a:hover { opacity: .6; }
.index-main {
  max-width: calc(64rem + 5rem);
  margin: 0 auto;
  padding: 0 2.5rem 5rem;
}

/* 7. Footer (spec 4.10): full-width wordmark, 2px line, then mono links left and legal line right */
.footer {
  display: flex;
  flex-flow: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1rem 2rem;
  border-top: 2px solid var(--white);
  padding: 5rem 2.5rem 2.5rem;
  font-family: var(--font-mono);
  font-size: .75rem;
  font-weight: 500;
  line-height: 1.6;
  text-transform: uppercase;
}
.footer > .mhi-footer-logo,
.footer > .footer-line { flex: 0 0 100%; align-self: stretch; }
.footer > .mhi-footer-logo { margin-bottom: 1.5rem; }
.footer > .footer-line { margin-bottom: .5rem; }
.footer p { margin: 0 !important; }
.footer a { color: var(--white); font-weight: 500; transition: all .2s; }
.footer a:hover { opacity: .5; }

/* 8. Responsive (mhimedia.com breakpoints) */
@media screen and (max-width: 991px) {
  .nav-brand .mhi-wordmark { width: 15rem; }
}
@media screen and (max-width: 767px) {
  .nav { padding: 2rem 1.25rem; }
  .nav-brand .mhi-wordmark { width: 10rem; }
  .article { padding: 3rem 1.25rem 2rem; }
  .article-body { font-size: 1.0625rem; }
  .article-body h1.article-title { font-size: 2.25rem; padding-bottom: 1.5rem; margin-bottom: 1.5rem; }
  .article-body h2 { margin-top: 2.75rem; font-size: 1.75rem; }
  .article-body h3 { margin-top: 2rem; font-size: 1.375rem; }
  .article-body pre { padding: 1rem; }
  .services { padding: 0 1.25rem !important; }
  .cta-section { padding: 0 1.25rem 3rem; }
  .cta-box { padding: 2.5rem 1.25rem; }
  .cta-box h2 { font-size: 1.5rem; }
  .card-grid, .related .card-grid { grid-template-columns: 1fr; }
  .card { padding: 1.75rem 1.5rem; }
  .related { padding: 3rem 1.25rem; }
  .related-title { font-size: 1.5rem; margin-bottom: 1.5rem; }
  .index-hero { padding: 3rem 1.25rem 2rem; }
  .index-hero h1 { font-size: 2.5rem; }
  .index-main { padding: 0 1.25rem 3rem; }
  .footer { flex-flow: column; justify-content: center; text-align: center; padding: 3rem 1.25rem 2rem; }
  .footer > .mhi-footer-logo,
  .footer > .footer-line { flex: none; width: 100%; }
  .footer > .mhi-footer-logo { margin-bottom: .5rem; }
}
@media screen and (max-width: 479px) {
  .nav-inner { gap: 1.25rem 1.5rem; }
  .nav-brand { flex: 1 1 100%; flex-flow: column; align-items: flex-start; gap: .75rem; }
  .nav-brand .mhi-wordmark { width: 100%; }
}

/* Links inside the CTA panel stay visible as links. */
.cta-box a:not(.cta-button) { text-decoration: underline; text-underline-offset: 2px; }

/* 4. Data-article furniture (22 Oct 2026): byline, change note, answer box, table captions and source lines */
.article-body .byline {
  font-family: var(--font-mono);
  font-size: .75rem;
  font-weight: 500;
  line-height: 1.5;
  text-transform: uppercase;
  letter-spacing: .02em;
  margin: 0 0 .5rem;
}
.article-body .byline a { text-decoration: underline; }
.article-body .what-changed {
  font-size: .9375rem;
  line-height: 1.5;
  opacity: .85;
  border-left: 2px solid var(--white);
  padding-left: 1rem;
  margin: 0 0 2rem;
}
.article-body .answer-box {
  border: 2px solid var(--white);
  padding: 1.25rem 1.5rem;
  margin: 0 0 2.25rem;
  font-size: 1.0625rem;
  line-height: 1.55;
}
.article-body .answer-box p:last-child { margin-bottom: 0; }
.article-body figure.table-figure { margin: 0 0 1.75rem; }
.article-body figure.table-figure .table-wrap { margin: 0; }
.article-body figcaption {
  font-family: var(--font-mono);
  font-size: .75rem;
  font-weight: 500;
  line-height: 1.4;
  text-transform: uppercase;
  padding: 0 0 .75rem;
}
.article-body .table-source {
  font-size: .8125rem;
  line-height: 1.5;
  opacity: .8;
  margin: .75rem 0 0;
}
