/* =========================================================================
   Blog styles, in the same editorial system as the careers page.

   Loaded after styles.css, which supplies the reset, the fonts, the :root
   variables, the navbar and the footer. Nothing here restyles shared chrome.

   The pattern: a dark band for the page header, a light band for the
   reading, thin rules instead of cards, large light-weight display type and
   outlined rectangular buttons. The dark band is the site's green-black and
   the light band an off-white with a faint green-grey bias, so the blog
   belongs to regobs.com rather than reading as a generic magazine.

   Class names are unchanged from the previous version so the six existing
   pages needed almost no markup edits.
   ========================================================================= */

:root {
  --c-light:      #F4F5F2;
  --c-light-2:    #EAECE7;
  --c-ink:        #0C1E1B;
  --c-ink-soft:   #3E4A46;
  --c-ink-dim:    #7A847F;
  --c-rule-light: rgba(12, 30, 27, 0.16);
  --c-rule-soft:  rgba(12, 30, 27, 0.09);
  --c-rule-dark:  rgba(240, 240, 240, 0.14);
}

/* The reading surface is light. The header bands paint themselves dark. */
.blog-page {
  background: var(--c-light);
  color: var(--c-ink);
}

.blog-container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 32px;
}

/* ---------------------------------------------------------------- type */

.display {
  font-weight: 300;
  letter-spacing: -0.025em;
  line-height: 1.04;
  text-wrap: balance;
  margin: 0;
}

.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 15px 26px;
  border: 1px solid currentColor;
  border-radius: 0;
  font-size: 0.9375rem;
  font-weight: 500;
  text-decoration: none;
  color: inherit;
  background: transparent;
  transition: background 0.25s ease, color 0.25s ease;
}
.btn-outline svg { width: 16px; height: 16px; flex: none; transition: transform 0.25s ease; }
.btn-outline:hover svg { transform: translateX(4px); }
.btn-outline:focus-visible { outline: 2px solid var(--green-accent); outline-offset: 3px; }

/* ------------------------------------------------------------ blog index */

.blog-hero {
  background: var(--bg-dark);
  color: var(--text-white);
  padding: 176px 0 96px;
  text-align: center;
}

.blog-hero-eyebrow {
  color: var(--green-accent);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-bottom: 26px;
}

.blog-hero h1 {
  font-size: clamp(2.75rem, 6vw, 5rem);
  line-height: 1;
  font-weight: 300;
  letter-spacing: -0.03em;
  text-wrap: balance;
  margin: 0 auto 24px;
  max-width: 18ch;
}

.blog-hero p {
  color: var(--text-muted);
  font-size: 1.0625rem;
  line-height: 1.7;
  max-width: 56ch;
  margin: 0 auto;
}

/* Posts as a three-column editorial grid: a rule above, the meta line, the
   title, the excerpt. No boxes. */
.blog-list {
  padding: 96px 0 120px;
  display: grid;
  gap: 48px 32px;
  grid-template-columns: 1fr;
}

@media (min-width: 700px)  { .blog-list { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .blog-list { grid-template-columns: repeat(3, 1fr); } }

.blog-card {
  display: flex;
  flex-direction: column;
  padding-top: 22px;
  border-top: 1px solid var(--c-rule-light);
  text-decoration: none;
  color: inherit;
}

.blog-card-meta {
  color: var(--c-ink-dim);
  font-size: 0.8125rem;
  margin-bottom: 16px;
}

.blog-card h2 {
  font-size: 1.375rem;
  line-height: 1.3;
  font-weight: 600;
  letter-spacing: -0.015em;
  margin-bottom: 14px;
  transition: color 0.2s ease;
}
.blog-card:hover h2 { color: var(--c-ink-soft); }

.blog-card p {
  color: var(--c-ink-soft);
  font-size: 0.9375rem;
  line-height: 1.65;
  flex: 1;
  margin-bottom: 20px;
}

.blog-card-more {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--c-ink);
  font-size: 0.875rem;
  font-weight: 500;
}
.blog-card-more::after {
  content: "\2192";
  transition: transform 0.25s ease;
}
.blog-card:hover .blog-card-more::after { transform: translateX(4px); }

/* The closing band on the index, matching the careers page's. */
.blog-closing {
  background: var(--bg-dark);
  color: var(--text-white);
  padding: 120px 0;
}

.blog-closing .blog-container {
  display: grid;
  gap: 32px;
  align-items: center;
}
@media (min-width: 800px) { .blog-closing .blog-container { grid-template-columns: 1fr auto; gap: 60px; } }

.blog-closing h2 {
  font-size: clamp(2.5rem, 5vw, 4.25rem);
  font-weight: 300;
  letter-spacing: -0.025em;
  line-height: 1.04;
  margin: 0 0 14px;
}
.blog-closing p {
  font-size: 1.25rem;
  font-weight: 300;
  color: var(--text-muted);
  margin: 0;
}
.blog-closing .btn-outline:hover { background: var(--text-white); color: var(--c-ink); }

/* ----------------------------------------------------------- blog post */

.post-header {
  background: var(--bg-dark);
  color: var(--text-white);
  padding: 168px 0 80px;
}

.post-breadcrumb {
  font-size: 0.8125rem;
  color: var(--text-dim);
  margin-bottom: 32px;
}
.post-breadcrumb a { color: var(--text-muted); text-decoration: none; }
.post-breadcrumb a:hover { color: var(--text-white); }

.post-header h1 {
  font-size: clamp(2.25rem, 5vw, 4rem);
  line-height: 1.05;
  font-weight: 300;
  letter-spacing: -0.028em;
  text-wrap: balance;
  margin: 0 0 28px;
  max-width: 24ch;
}

.post-meta {
  color: var(--text-dim);
  font-size: 0.875rem;
}

/* The article column. Character-capped so the measure holds at any size. */
.post-body {
  max-width: 68ch;
  padding: 72px 0 96px;
  font-size: 1.0625rem;
  line-height: 1.75;
  color: var(--c-ink-soft);
}

.post-body h2 {
  color: var(--c-ink);
  font-size: 1.875rem;
  line-height: 1.2;
  font-weight: 300;
  letter-spacing: -0.02em;
  margin: 56px 0 18px;
  padding-top: 24px;
  border-top: 1px solid var(--c-rule-light);
}

.post-body h3 {
  color: var(--c-ink);
  font-size: 1.1875rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 32px 0 12px;
}

.post-body p { margin-bottom: 20px; }

.post-body a {
  color: var(--c-ink);
  text-decoration: underline;
  text-decoration-color: var(--c-rule-light);
  text-underline-offset: 3px;
  transition: text-decoration-color 0.2s ease;
}
.post-body a:hover { text-decoration-color: var(--c-ink); }

.post-body ul, .post-body ol {
  margin: 0 0 20px 1.25rem;
  padding: 0;
}
.post-body li { margin-bottom: 10px; }

.post-body strong { color: var(--c-ink); font-weight: 600; }
.post-body em { font-style: italic; }

.post-body hr {
  border: 0;
  border-top: 1px solid var(--c-rule-light);
  margin: 44px 0;
}

.post-body code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.875em;
  background: var(--c-light-2);
  border: 1px solid var(--c-rule-soft);
  border-radius: 0;
  padding: 1px 6px;
  color: var(--c-ink);
  overflow-wrap: anywhere;
}

/* Code blocks scroll inside their own box. Without this a long command line
   widens the document past a phone's viewport and the whole page zooms out. */
.post-body pre {
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  background: var(--c-light-2);
  border: 1px solid var(--c-rule-soft);
  padding: 16px 20px;
  margin: 0 0 20px;
  font-size: 0.875rem;
  line-height: 1.6;
}
.post-body pre code {
  background: none;
  border: 0;
  padding: 0;
  font-size: inherit;
}

/* The summary box. The block most likely to be quoted, by a reader or an
   assistant, so it gets a rule on every side rather than a coloured bar. */
.post-takeaways {
  border-top: 1px solid var(--c-ink);
  border-bottom: 1px solid var(--c-ink);
  padding: 28px 0;
  margin-bottom: 48px;
}

.post-takeaways-label {
  color: var(--c-ink);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.post-takeaways ul { margin: 0 0 0 1.1rem; }
.post-takeaways li { color: var(--c-ink); }
.post-takeaways li:last-child { margin-bottom: 0; }

/* A ranked entry in the listing post. */
.firm {
  padding: 28px 0;
  border-top: 1px solid var(--c-rule-light);
}
.firm:last-of-type { border-bottom: 1px solid var(--c-rule-light); margin-bottom: 20px; }

.firm-rank {
  color: var(--c-ink-dim);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.firm h3 { margin-top: 0; }

.firm-detail { font-size: 0.9375rem; margin: 0; }
.firm-detail + .firm-detail { margin-top: 10px; }

/* Who wrote this and why they are worth considering. Quieter than the CTA. */
.post-pick {
  border-top: 1px solid var(--c-rule-light);
  padding: 32px 0 8px;
  margin: 56px 0 0;
  font-size: 0.9375rem;
}

.post-pick-label {
  color: var(--c-ink);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.post-pick p:last-child { margin-bottom: 0; }

/* The action. An outlined box, and its links become outlined buttons. */
.post-cta {
  border: 1px solid var(--c-ink);
  padding: 40px;
  margin: 40px 0 0;
}

.post-cta h2 {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
  font-size: 2rem;
}

.post-cta p:last-child {
  margin-bottom: 0;
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  align-items: center;
}

.post-cta p:last-child a {
  display: inline-flex;
  align-items: center;
  padding: 13px 22px;
  border: 1px solid var(--c-ink);
  text-decoration: none;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--c-ink);
  transition: background 0.25s ease, color 0.25s ease;
}
.post-cta p:last-child a:hover { background: var(--c-ink); color: var(--c-light); }

/* --------------------------------------------------------------- motion */

@media (prefers-reduced-motion: reduce) {
  .btn-outline, .btn-outline svg, .blog-card h2, .blog-card-more::after,
  .post-body a, .post-cta p:last-child a { transition: none; }
}
