/* Styles for Engineering Manager++ */

/* Self-hosted variable fonts — replaces the render-blocking Google Fonts
   requests and keeps visitor IPs off Google (GDPR). One file per family
   covers every weight via the wght axis; font-display: swap avoids invisible
   text while loading.

   Body text is Google Sans, the family re:Work uses (open-sourced on Google
   Fonts under the OFL in Dec 2025; latin subset, wght 400–700 and its small
   opsz axis). Headings stay EB Garamond. */
@font-face {
  font-family: 'Google Sans';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("/fonts/emplusplus/googlesans-var.woff2") format('woff2');
}
@font-face {
  font-family: 'Google Sans';
  font-style: italic;
  font-weight: 400 700;
  font-display: swap;
  src: url("/fonts/emplusplus/googlesans-italic-var.woff2") format('woff2');
}

/* shared.css sets Inter on body and .btn for every course; EM++ swaps it. */
html body,
body .btn { font-family: 'Google Sans', system-ui, -apple-system, sans-serif; }
@font-face {
  font-family: 'EB Garamond';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("/fonts/emplusplus/ebgaramond-var.woff2") format('woff2');
}
@font-face {
  font-family: 'EB Garamond';
  font-style: italic;
  font-weight: 400 800;
  font-display: swap;
  src: url("/fonts/emplusplus/ebgaramond-italic-var.woff2") format('woff2');
}

h1, h2, h4 {
  font-family: 'EB Garamond', Georgia, serif;
}

/* ── Page background ──────────────────────────────────────────────
   Plain white in light mode (re:Work-style, no texture); dark mode keeps
   the shared dark background. */
html:not(.dark) body { background: #FFFFFF; }

/* ── Presale hero ──────────────────────────────────────────────
   Converted from the Figma Make "Hero" React component. The grid
   texture/glow now live on the page background (above); the hero just
   handles layout + headline styling. */
.emcc-hero {
  padding-block: 1rem 2rem;
}

.emcc-hero__badge {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  background: rgba(109, 40, 217, 0.10);
  color: var(--color-link);
}

.emcc-hero__headline {
  font-family: 'EB Garamond', Georgia, serif;
  font-size: clamp(2.75rem, 5.5vw, 5rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: #0d0d14;
  margin: 0 0 1.25rem;
}
html.dark .emcc-hero__headline { color: var(--color-heading); }
.emcc-hero__headline .accent { color: var(--color-link); }

.emcc-hero__subhead {
  font-size: 1.125rem;
  line-height: 1.6;
  color: var(--color-body);
  max-width: 32rem;
  margin: 0 0 2.5rem;
}

.emcc-hero__fineprint {
  font-size: 0.875rem;
  color: var(--color-muted-functional);
}

/* CTA — enlarges the shared .btn .btn-primary to match the design */
.emcc-hero__cta {
  padding: 16px 40px;
  font-size: 1.125rem;
  border-radius: 12px;
}
.emcc-hero__cta-form { margin: 1.25rem 0 0; }

/* book mockup */
.emcc-hero__book-wrap {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}
/* soft purple brand glow behind the book */
.emcc-hero__book-wrap::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background: radial-gradient(ellipse at center, rgba(109, 40, 217, 0.10) 0%, transparent 70%);
  transform: scale(1.15);
  filter: blur(24px);
}
.emcc-hero__book {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 560px;       /* ~500–600px on desktop */
  height: auto;           /* scale proportionally (intrinsic 700×715) */
  /* image has a baked-in shadow; keep this extra one very soft */
  filter: drop-shadow(0 25px 50px rgba(28, 23, 23, 0.15));
}

/* mobile: book sits below the text, smaller and centered */
@media (max-width: 767px) {
  .emcc-hero__book { max-width: 340px; }
}

/* ── Homepage hero (teaser variant) ── single column, newsletter signup
   instead of the book/preorder CTA (those live on /book). */
.emcc-hero__single {
  max-width: 40rem;
}
/* longer stat-led headline needs a step down from the display clamp, and the
   heavy serif needs more leading than the display style's 1.05 */
.emcc-hero__headline--long {
  font-size: clamp(2.25rem, 4.5vw, 3.75rem);
  line-height: 1.15;
  margin-bottom: 1.75rem;
}
/* the purple reframe is its own beat: block-level, a pause above it, and
   smaller than the stat so the hook stays the hook */
.emcc-hero__headline--long .accent {
  display: block;
  font-size: 0.8em;
  margin-top: 0.6em;
}
/* bold lead-in naming what the form gives you, so the button can just say "Subscribe" */
.emcc-hero__signup-lead {
  font-weight: 600;
  font-size: 1.0625rem;
  color: var(--color-heading);
  margin: 0 0 0.75rem;
}
/* dagger footnote on the hero stat, anchors to #em-stats */
.emcc-hero__stat-ref {
  font-size: 0.45em;
  vertical-align: super;
  margin-left: 0.15em;
  color: var(--color-link);
  text-decoration: none;
}
.emcc-hero__stat-ref:hover { text-decoration: underline; }
.emcc-hero__signup-form {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.625rem;
  max-width: 34rem;
}
.emcc-hero__signup-input {
  flex: 1 1 16rem;
  margin: 0;
}
.emcc-hero__signup-title {
  font-family: 'EB Garamond', Georgia, serif;
  font-size: 1.375rem;
  font-weight: 700;
  color: var(--color-heading);
  margin: 0 0 0.25rem;
}
.emcc-hero__signup-sub {
  font-size: 0.9375rem;
  line-height: 1.55;
  color: var(--color-body);
  margin: 0;
}
.emcc-hero__signup-note {
  flex-basis: 100%;
  font-size: 0.8125rem;
  color: var(--color-muted-functional);
  margin: 0;
}

/* First name sits beside the email on wide screens, so it can be narrower */
.emcc-hero__signup-input--name { flex: 1 1 9rem; }

/* ── First 30 Days purchase tiers (homepage hero, right column) ── */
.emcc-tiers {
  display: grid;
  gap: 1rem;
}
.emcc-tier {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 16px;
  padding: 2rem 2.25rem;
}
.emcc-tier--featured {
  border: 2px solid var(--color-link);
  box-shadow: 0 12px 32px rgba(109, 40, 217, 0.10);
}
.emcc-tier__label {
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-link);
  margin: 0 0 0.5rem;
}
.emcc-tier__price {
  font-family: 'EB Garamond', Georgia, serif;
  font-size: 2.5rem;
  font-weight: 800;
  line-height: 1;
  color: var(--color-heading);
  margin: 0 0 0.75rem;
}
.emcc-tier__blurb {
  font-size: 0.9375rem;
  line-height: 1.55;
  color: var(--color-body);
  margin: 0;
}
.emcc-tier__cta-form { margin: 1.25rem 0 0; }
.emcc-tier__cta { width: 100%; padding: 12px 24px; border-radius: 10px; }

/* ── Homepage sections (Bio / Problem / Curriculum / What You Get / FAQ /
   Final CTA) ── Converted from the Figma landing export. Sections are
   full-bleed bands that break out of the constrained <main>, with
   alternating backgrounds; inner content is centered at a fixed width.
   Tokens map to the light/dark palettes; the curriculum band is
   intentionally dark in both modes. */
body { overflow-x: hidden; } /* guard against the 100vw full-bleed trick */

.emcc-section {
  width: 100vw;
  position: relative;
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
  padding-block: 6.5rem;
}
.emcc-section--tinted  { background: var(--color-bg); border-block: 1px solid var(--color-border); }
.emcc-section--surface { background: var(--color-surface); }
.emcc-section--dark    { background: #1E1E2E; }
.emcc-section__inner {
  max-width: 1120px;
  margin: 0 auto;
  padding-inline: 2.5rem;
}

/* eyebrow label */
.emcc-eyebrow {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-link);
  margin: 0 0 1.4rem;
}
.emcc-eyebrow--accent { color: var(--color-accent); }

/* body prose */
.emcc-prose {
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--color-muted-functional);
  margin: 0 0 1.25rem;
  max-width: 40rem;
}
.emcc-prose--lead { font-size: 1.1875rem; }

/* shared headline base (h2 inherits EB Garamond; .emcc-section__title is
   also reused by the checkout success page) */
.emcc-section__title,
.emcc-bio__title,
.emcc-problem__title,
.emcc-curriculum__title,
.emcc-wyg__title,
.emcc-faq__title,
.emcc-final__title,
.emcc-newsletter__title {
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--color-heading);
  margin: 0 0 1.5rem;
}

/* ── Bio ── */
.emcc-bio__grid { display: grid; gap: 3rem; align-items: start; }
@media (min-width: 900px) { .emcc-bio__grid { grid-template-columns: 0.8fr 1.2fr; gap: 5rem; } }
.emcc-bio__photo-col { display: flex; justify-content: center; }
.emcc-bio__photo {
  width: 100%;
  max-width: 340px;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  object-fit: cover;
  object-position: center top;
  border: 1px solid var(--color-border);
  box-shadow: 0 20px 60px rgba(109, 40, 217, 0.12), 0 4px 20px rgba(0, 0, 0, 0.06);
}
.emcc-bio__title { font-size: clamp(2rem, 4vw, 3rem); max-width: 32rem; }
.emcc-bio__quote {
  font-family: 'EB Garamond', Georgia, serif;
  font-style: italic;
  font-size: 1.5rem;
  line-height: 1.45;
  color: var(--color-heading);
  margin: 0 0 2.25rem;
  max-width: 35rem;
  border-left: 2px solid var(--color-link);
  padding-left: 1.5rem;
}
.emcc-bio__creds { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.875rem 2rem; max-width: 35rem; }
@media (min-width: 600px) { .emcc-bio__creds { grid-template-columns: 1fr 1fr; } }
.emcc-bio__creds li { display: flex; gap: 0.625rem; align-items: baseline; font-size: 0.875rem; color: var(--color-body); }
.emcc-bio__plus { color: var(--color-link); font-weight: 600; }

/* ── Problem ── */
.emcc-problem__head { max-width: 48rem; margin-bottom: 3.5rem; }
.emcc-problem__title { font-size: clamp(2.25rem, 4.5vw, 3.5rem); }
.emcc-problem__cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--color-border);
  border: 1px solid var(--color-border);
  border-radius: 16px;
  overflow: hidden;
}
@media (max-width: 768px) { .emcc-problem__cards { grid-template-columns: 1fr; } }
.emcc-problem__card { background: var(--color-surface); padding: 2.375rem 2rem; }
.emcc-problem__card-num { font-size: 0.875rem; font-weight: 600; color: var(--color-link); margin-bottom: 1rem; }
.emcc-problem__card p { margin: 0; font-size: 1rem; line-height: 1.6; color: var(--color-heading); }

/* ── Curriculum (dark band) ── */
.emcc-curriculum__head { max-width: 45rem; margin-bottom: 4.5rem; }
.emcc-curriculum__title { font-size: clamp(2.25rem, 4.5vw, 3.5rem); color: #FAFAFB; }
.emcc-curriculum__lede { font-size: 1.125rem; line-height: 1.7; color: #9a99a8; margin: 0; max-width: 37rem; }
.emcc-curriculum__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: #2C2C40;
  border: 1px solid #2C2C40;
  border-radius: 18px;
  overflow: hidden;
}
@media (max-width: 768px) { .emcc-curriculum__grid { grid-template-columns: 1fr; } }
.emcc-layer { background: #1E1E2E; padding: 2.625rem 2.375rem; }
.emcc-layer__num { font-size: 0.8125rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--color-accent); margin-bottom: 1.125rem; }
.emcc-layer__title { font-family: 'EB Garamond', Georgia, serif; font-weight: 600; font-size: 2rem; letter-spacing: -0.01em; color: #FAFAFB; margin: 0 0 0.625rem; }
.emcc-layer__sub { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.08em; color: #7a7a8c; font-weight: 500; margin-bottom: 1rem; }
.emcc-layer__desc { font-size: 0.9375rem; line-height: 1.65; color: #9a99a8; margin: 0; }

/* ── What You Get ── */
.emcc-wyg__grid { display: grid; gap: 3rem; align-items: start; }
@media (min-width: 900px) { .emcc-wyg__grid { grid-template-columns: 0.9fr 1.1fr; gap: 5rem; } }
.emcc-wyg__title { font-size: clamp(2rem, 4vw, 3.125rem); }
.emcc-wyg__item { display: flex; align-items: baseline; gap: 1.25rem; padding: 1.375rem 0; border-bottom: 1px solid var(--color-border); }
.emcc-wyg__num { font-size: 0.875rem; font-weight: 600; color: var(--color-link); min-width: 2.75rem; }
.emcc-wyg__item-title { font-size: 1.125rem; font-weight: 600; color: var(--color-heading); }
.emcc-wyg__item-desc { font-size: 0.9375rem; color: var(--color-muted-functional); margin-top: 0.2rem; }
.emcc-wyg__bonus {
  display: flex; align-items: baseline; gap: 1.25rem;
  padding: 1.5rem; margin-top: 0.875rem;
  background: rgba(109, 40, 217, 0.06);
  border: 1px solid rgba(109, 40, 217, 0.18);
  border-radius: 14px;
}
.emcc-wyg__star { color: var(--color-link); min-width: 2.75rem; }

/* ── FAQ ── */
.emcc-faq__inner { max-width: 52rem; }
.emcc-faq__title { font-size: clamp(2rem, 4vw, 3.125rem); margin-bottom: 3rem; }
.emcc-faq__item { border-bottom: 1px solid var(--color-border); }
.emcc-faq__q {
  display: flex; justify-content: space-between; align-items: center; gap: 1.5rem;
  padding: 1.625rem 0;
  font-family: 'EB Garamond', Georgia, serif;
  font-weight: 600; font-size: 1.1875rem; color: var(--color-heading);
  cursor: pointer; list-style: none;
}
.emcc-faq__q::-webkit-details-marker { display: none; }
.emcc-faq__plus { font-size: 1.5rem; color: var(--color-link); line-height: 1; transition: transform 0.2s ease; flex-shrink: 0; }
.emcc-faq__item[open] .emcc-faq__plus { transform: rotate(45deg); }
.emcc-faq__a { font-size: 1rem; line-height: 1.7; color: var(--color-muted-functional); margin: 0; padding: 0 0 1.75rem; max-width: 40rem; }

/* ── Final CTA ── */
.emcc-final__inner { text-align: center; }
.emcc-final__title { font-size: clamp(2.5rem, 5vw, 4rem); max-width: 42rem; margin: 0 auto 2.875rem; }
.emcc-final__card {
  display: inline-flex; flex-direction: column; align-items: center;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 24px;
  padding: 2.875rem 3.5rem;
  box-shadow: 0 1px 3px rgba(13, 13, 20, 0.06);
}
.emcc-final__price-row { display: flex; align-items: baseline; gap: 0.875rem; margin-bottom: 0.5rem; }
.emcc-final__price { font-family: 'EB Garamond', Georgia, serif; font-weight: 600; font-size: 4.125rem; line-height: 1; color: var(--color-heading); }
.emcc-final__price-old { font-family: 'EB Garamond', Georgia, serif; font-size: 2.125rem; color: var(--color-muted); text-decoration: line-through; }
.emcc-final__price-note { font-size: 0.75rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--color-link); margin-bottom: 1.875rem; }
.emcc-final__form { margin: 0; }
.emcc-final__cta { padding: 17px 44px; font-size: 1.0625rem; border-radius: 12px; }
.emcc-final__fineprint { font-size: 0.875rem; color: var(--color-muted); margin-top: 1.25rem; }

/* ── Newsletter / "stay in the loop" CTA ── */
.emcc-newsletter__inner { max-width: 48rem; text-align: center; }
.emcc-newsletter__title { font-size: clamp(1.75rem, 3.5vw, 2.25rem); }
.emcc-newsletter__sub { margin: 0 auto 1.875rem; }

/* ── Checkout success / thank-you page ──────────────────────────
   Converted from the Figma "Thank You" export. Reuses the shared
   tokens + existing classes (.emcc-eyebrow, .emcc-section__title,
   .emcc-prose, .btn); only success-specific structure lives here.
   Header/footer/grid come from the layout, not duplicated here. */
.emcc-success {
  max-width: 560px;
  margin: 0 auto;
  padding: 2rem 0 3rem;
  text-align: center;
}

/* heading-tinted variant of the eyebrow (vs the default purple) */
.emcc-eyebrow--ink { color: var(--color-heading); letter-spacing: 0.14em; }

/* larger, lighter headline for the success moment */
.emcc-success .emcc-section__title {
  font-size: clamp(2.75rem, 6vw, 3.875rem);
  font-weight: 600;
}

.emcc-success__subhead { max-width: 27.5rem; margin-inline: auto; }

/* animated check badge */
.emcc-success__badge {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--color-link);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 2.25rem;
  box-shadow: 0 12px 30px -10px rgba(109, 40, 217, 0.5);
  animation: emcc-pop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}
@keyframes emcc-pop {
  0%   { transform: scale(0.6); opacity: 0; }
  60%  { transform: scale(1.08); }
  100% { transform: scale(1); opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .emcc-success__badge { animation: none; }
}

/* receipt card */
.emcc-success__receipt {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 18px;
  padding: 1.75rem 1.875rem;
  text-align: left;
  margin: 0 0 2.75rem;
}
.emcc-success__receipt-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1.25rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--color-border);
}
.emcc-success__receipt-title { font-weight: 600; color: var(--color-heading); }
.emcc-success__receipt-sub { font-size: 0.875rem; color: var(--color-body); margin-top: 0.2rem; }
.emcc-success__receipt-status {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding-top: 1rem;
  font-size: 0.8125rem;
  color: var(--color-body);
}
.emcc-success__dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: #16a34a; display: inline-block;
}

/* "Confirmed" pill — reuses the purple-pill look */
.emcc-pill {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-link);
  background: rgba(109, 40, 217, 0.08);
  border: 1px solid rgba(109, 40, 217, 0.18);
  border-radius: 999px;
  padding: 5px 12px;
  white-space: nowrap;
}

/* what-happens-next steps */
.emcc-success__steps { text-align: left; max-width: 480px; margin: 0 auto 2.75rem; }
.emcc-success__step {
  display: flex;
  gap: 1rem;
  align-items: baseline;
  padding: 0.875rem 0;
  border-bottom: 1px solid var(--color-border);
}
.emcc-success__step:last-child { border-bottom: none; }
.emcc-success__step-num {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-link);
  min-width: 24px;
}
.emcc-success__step p { margin: 0; font-size: 0.9375rem; line-height: 1.6; color: var(--color-body); }

/* actions row */
.emcc-success__actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.375rem;
  flex-wrap: wrap;
}
.emcc-success__link {
  font-size: 0.9375rem;
  color: var(--color-body);
  text-decoration: none;
  border-bottom: 1px solid var(--color-border);
  padding-bottom: 2px;
  transition: color 0.18s ease, border-color 0.18s ease;
}
.emcc-success__link:hover { color: var(--color-heading); border-bottom-color: var(--color-link); }

/* ── Blog cards ──
   Shared by the homepage "From the blog" section (_featured_writing) and the
   /blog index, via app/views/emplusplus/blogposts/_card.html.erb. */
.emcc-blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}
@media (max-width: 900px) { .emcc-blog-grid { grid-template-columns: 1fr; gap: 2.5rem; } }
.emcc-blog-card {
  display: flex;
  flex-direction: column;
  color: inherit;
  border: 1px solid var(--color-border);
  border-radius: 12px;
  overflow: hidden;
  background: var(--color-bg);
  transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}
.emcc-blog-card:hover {
  border-color: var(--color-accent);
  transform: translateY(-3px);
  box-shadow: 0 12px 30px rgba(109, 40, 217, 0.1);
}
.emcc-blog-card__thumb {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
}
.emcc-blog-card__body { padding: 1.5rem 1.5rem 1.75rem; }
.emcc-blog-card__date {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-muted);
}
.emcc-blog-card__title {
  font-family: 'EB Garamond', Georgia, serif;
  font-weight: 600;
  font-size: 1.375rem;
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: var(--color-heading);
  margin: 0.5rem 0 0.625rem;
}
.emcc-blog-card__blurb {
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--color-muted-functional);
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Homepage "From the blog" section header (grid/cards above are shared) */
.emcc-featured__block + .emcc-featured__block { margin-top: 5rem; }
.emcc-featured__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1.5rem;
  margin-bottom: 3rem;
}
.emcc-featured__title { font-size: clamp(1.75rem, 3vw, 2.5rem); margin: 0; }
.emcc-featured__title a { color: inherit; }
.emcc-featured__title a:hover { color: var(--color-accent); }
.emcc-featured__all {
  flex-shrink: 0;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--color-link);
  white-space: nowrap;
}
.emcc-featured__all:hover { color: var(--color-accent); }

/* ── Inline blog newsletter CTA ─────────────────────────────────
   Injected mid-article by BlogpostsHelper#inject_inline_newsletter_cta.
   A quiet bordered card — it should read as an aside, not interrupt the
   prose. Descendant selectors (.emcc-inline-cta .x) so these beat the
   `.prose p` typography rules on specificity. */
.emcc-inline-cta {
  max-width: 34rem;
  margin: 2.25rem auto;
  padding: 1.5rem 1.75rem;
  border: 1px solid rgba(109, 40, 217, 0.25);
  border-radius: 12px;
  background: rgba(109, 40, 217, 0.05);
}
html.dark .emcc-inline-cta {
  border-color: rgba(167, 139, 250, 0.3);
  background: rgba(167, 139, 250, 0.07);
}
.emcc-inline-cta .emcc-inline-cta__title {
  line-height: 1.3;
  font-family: 'EB Garamond', Georgia, serif;
  font-size: 1.375rem;
  font-weight: 700;
  color: var(--color-heading);
  margin: 0 0 0.25rem;
}
.emcc-inline-cta .emcc-inline-cta__sub {
  font-size: 0.9375rem;
  line-height: 1.55;
  color: var(--color-body);
  margin: 0 0 1rem;
}
.emcc-inline-cta__form {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.625rem;
}
.emcc-inline-cta .emcc-inline-cta__input {
  flex: 1 1 14rem;
  margin: 0;
}
.emcc-inline-cta .emcc-inline-cta__note {
  flex-basis: 100%;
  font-size: 0.8125rem;
  color: var(--color-muted-functional);
  margin: 0;
}

/* ── Research stats section (homepage) ─────────────────────────────
   Sourced numbers behind the hero's "60%†" claim; the dagger anchors here. */
#em-stats, #hero-signup { scroll-margin-top: 2rem; }
.emcc-stats__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  margin-top: 3rem;
}
@media (max-width: 768px) { .emcc-stats__grid { grid-template-columns: 1fr; } }
.emcc-stats__card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  padding: 2rem;
}
.emcc-stats__card .emcc-stats__num {
  font-family: 'EB Garamond', Georgia, serif;
  font-size: clamp(2.5rem, 4vw, 3.5rem);
  font-weight: 700;
  line-height: 1;
  color: var(--color-link);
  margin: 0 0 0.75rem;
}
.emcc-stats__card p {
  margin: 0;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--color-heading);
}
.emcc-stats__card .emcc-stats__source {
  margin-top: 1rem;
  font-size: 0.8125rem;
}
.emcc-stats__source a { color: var(--color-muted-functional); }
.emcc-stats__close { margin-top: 3rem; max-width: 44rem; }

/* ── Homepage (re:Work-style) ─────────────────────────────────────
   White page, lots of air, thin borders, no shadows or tinted bands.
   Sections sit inside the constrained <main>; only the footer is a band. */
/* Top nav: spans the full window (not the content column), logo then topic
   links on the left, theme toggle at the far right. On phones the links drop
   to their own full-width row under the logo and wrap if they still don't
   fit, so nothing scrolls sideways. */
.emh-nav {
  display: flex;
  align-items: center;
  gap: 2.5rem;
  min-height: 4rem;
  padding: 0 clamp(1rem, 3vw, 2.5rem);
}
.emh-nav__logo { flex: none; display: flex; align-items: center; }
.emh-nav__links {
  display: flex;
  align-items: stretch;
  align-self: stretch;
  gap: 1.75rem;            /* + link padding = the spacing the nav shipped with */
  min-width: 0;
  margin: 0;
  padding: 0;
  list-style: none;
  overflow-x: auto;
  scrollbar-width: none;
}
.emh-nav__links li { display: flex; margin: 0; padding: 0; } /* undo shared.css bare `li` */
.emh-nav__link {
  display: flex;
  align-items: center;
  padding: 0 0.875rem;
  font-size: 0.9375rem;
  white-space: nowrap;
  border-bottom: 3px solid transparent;
  border-top: 3px solid transparent; /* keeps the label centred */
}
/* Three classes to outrank shared.css's long `a:not(...)` link-colour rule. */
.emh-nav .emh-nav__links .emh-nav__link { color: var(--color-muted-functional); }
.emh-nav .emh-nav__links .emh-nav__link:hover { color: var(--color-heading); }
.emh-nav .emh-nav__links .emh-nav__link[aria-current="page"] { color: var(--color-heading); border-bottom-color: var(--color-link); }
.emh-nav__end { flex: none; margin-left: auto; display: flex; align-items: center; }
@media (max-width: 640px) {
  .emh-nav { flex-wrap: wrap; gap: 0 1rem; padding-top: 0.5rem; }
  .emh-nav__links {
    order: 3;              /* after the theme toggle: a row of its own */
    flex-basis: 100%;
    flex-wrap: wrap;
    overflow-x: visible;
    margin: 0 -0.5rem;     /* first label lines up with the logo */
    gap: 0 1rem;
  }
  .emh-nav__link { padding: 0.625rem 0.5rem; font-size: 0.9375rem; }
}

.emh-topics__all { margin: 1.25rem 0 0; font-size: 0.9375rem; }

.emh-eyebrow {
  display: block;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-muted-functional);
  margin: 0 0 0.75rem;
}

.emh-hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
  padding-block: 3.5rem 5rem;
}
@media (max-width: 860px) {
  .emh-hero { grid-template-columns: 1fr; gap: 2.5rem; padding-block: 2rem 3.5rem; }
}
.emh-hero__title {
  font-size: clamp(2.75rem, 6vw, 4.25rem);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -0.015em;
  color: var(--color-heading);
  margin: 0 0 1.5rem;
}
.emh-hero__lead {
  font-size: 1.1875rem;
  line-height: 1.6;
  color: var(--color-muted-functional);
  margin: 0 0 2rem;
  max-width: 34rem;
}
.emh-hero__more { font-size: 1.0625rem; font-weight: 500; color: var(--color-link); }
.emh-hero__more span { display: inline-block; margin-left: 0.25rem; transition: transform 0.15s ease; }
.emh-hero__more:hover span { transform: translateX(3px); }
.emh-hero__img {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  border-radius: 8px;
}
.emh-hero__img--placeholder { background: rgba(109, 40, 217, 0.06); }
html.dark .emh-hero__img--placeholder { background: rgba(167, 139, 250, 0.08); }

.emh-section { padding-block: 4.5rem; }
.emh-section__title {
  text-align: center;
  font-size: clamp(2rem, 3.5vw, 2.5rem);
  font-weight: 500;
  color: var(--color-heading);
  margin: 0 0 2.75rem;
}
.emh-section__more { text-align: center; margin: 2.25rem 0 0; font-size: 0.9375rem; }

.emh-articles__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}
@media (max-width: 860px) { .emh-articles__grid { grid-template-columns: 1fr; } }
.emh-card {
  display: block;
  min-height: 9rem;
  padding: 1.5rem;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  color: inherit;
  transition: border-color 0.15s ease;
}
.emh-card:hover { border-color: var(--color-link); }
.emh-card__title {
  font-size: 1.25rem;
  font-weight: 500;
  line-height: 1.3;
  color: var(--color-heading);
  margin: 0;
}

.emh-topics__tabs {
  display: flex;
  overflow-x: auto;
  overflow-y: hidden; /* tabs' -1px margin would otherwise add a vertical scrollbar */
  scrollbar-width: none;
  border-bottom: 1px solid var(--color-border);
  margin-bottom: 3.5rem;
}
.emh-topics__tab {
  flex: 1 0 auto;
  padding: 0.875rem 1.25rem;
  font-size: 0.9375rem;
  color: var(--color-muted-functional);
  background: none;
  border: 0;
  border-bottom: 3px solid transparent;
  margin-bottom: -1px;
  cursor: pointer;
  white-space: nowrap;
}
.emh-topics__tab:hover { color: var(--color-heading); }
.emh-topics__tab[aria-selected="true"] { color: var(--color-heading); font-weight: 600; border-bottom-color: var(--color-link); }
.emh-topics__panel {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3.5rem;
  align-items: center;
}
.emh-topics__panel[hidden] { display: none; }
@media (max-width: 860px) { .emh-topics__panel { grid-template-columns: 1fr; gap: 2rem; } }
.emh-topics__pitch {
  font-size: 1.5rem;
  line-height: 1.35;
  color: var(--color-heading);
  margin: 0 0 1.5rem;
}
.emh-topics__posts { list-style: none; padding: 0; margin: 0; }
.emh-topics__posts li { padding: 0.625rem 0; border-top: 1px solid var(--color-border); font-size: 0.9375rem; }
.emh-topics__posts li:last-child { border-bottom: 1px solid var(--color-border); }
.emh-topics__art {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 16 / 10;
  border-radius: 8px;
  background: rgba(109, 40, 217, 0.06);
  color: var(--color-link);
}
html.dark .emh-topics__art { background: rgba(167, 139, 250, 0.08); }
.emh-topics__art svg { width: 38%; height: auto; }

/* Page width for main content and footer (layouts/emplusplus.html.erb):
   72rem, close to re:Work's ~1070px content area. */
.emh-wrap { max-width: 72rem; }

/* Article page (/blog/:slug), re:Work-style: wide hero, centred header,
   byline between thin rules, narrow left-aligned body. */
.emh-article__hero {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 8px;
  margin: 1rem 0 0;
}
/* Spacing and sizes measured from re:Work's article page (desktop): 60px
   hero→title, 60px/72px title, 18px date 16px below it, the byline row well
   clear of both, 16px/24px body with 20px between paragraphs, 28px section
   headings. Near-black body text, as re:Work uses. */
.emh-article__header { text-align: center; max-width: 54rem; margin: 0 auto; padding-top: 4.5rem; }
.emh-article__hero + .emh-article__header { padding-top: 3.75rem; }
.emh-article .emh-article__header .emh-article__eyebrow { display: inline-block; color: var(--color-muted-functional); margin-bottom: 1.5rem; }
.emh-article .emh-article__header .emh-article__eyebrow:hover { color: var(--color-heading); }
.emh-article__title {
  font-size: clamp(2.5rem, 5.5vw, 3.75rem);
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: var(--color-heading);
  margin: 0;
}
.emh-article__date { margin: 1rem 0 0; font-size: 1.125rem; line-height: 1.75rem; color: var(--color-muted-functional); }
.emh-article__byline {
  margin: 4rem 0 4.5rem;
  padding: 2rem 0;
  border-block: 1px solid var(--color-border);
  text-align: center;
  font-size: 1rem;
  color: var(--color-heading);
}
.emh-article .emh-article__byline .emh-article__author { color: inherit; }
/* Body column: 48rem (768px), a little wider than re:Work's 689px. */
.emh-article .emh-article__body { max-width: 48rem; margin-inline: auto; }
.emh-article__body p,
.emh-article__body li { font-size: 1rem; line-height: 1.5rem; color: var(--color-heading); }
.emh-article__body p { margin: 1.25rem 0; }
.emh-article__body li { margin-bottom: 0.5rem; }
/* Headings get more air than re:Work's (20px above): a clear break before
   each section, and less below so the heading stays with its text. */
.emh-article__body h2 {
  font-size: 2rem;
  line-height: 2.5rem;
  font-weight: 500;
  margin: 4.5rem 0 1.5rem;
}
.emh-article__body h3 { font-size: 1.125rem; line-height: 1.75rem; margin: 3rem 0 1rem; }
.emh-article__body h4 { font-size: 1rem; line-height: 1.5rem; margin: 2.25rem 0 0.75rem; }
.emh-article__body > :first-child,
.emh-article__body > p:first-child { margin-top: 0; }
.emh-article__more { max-width: 48rem; margin: 3rem auto 2rem; font-size: 0.9375rem; }
/* The comments pane sits below the post until it has comments (then beside
   it on wide screens, shared.css): line it up with the body column. */
.cmt-layout:has(.emh-article) .cmt-pane { max-width: 48rem; margin-inline: auto; }
@media (min-width: 1024px) {
  .cmt-layout--open:has(.emh-article) .cmt-pane { max-width: none; margin-inline: 0; }
}

/* Topic landing page (/blog/topics/:slug) */
.emh-topic__header { text-align: center; padding-block: 3.5rem 4.5rem; }
.emh-topic__title {
  font-size: clamp(2.75rem, 6vw, 4.25rem);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -0.015em;
  color: var(--color-heading);
  margin: 0 0 1.5rem;
}
.emh-topic__lead {
  max-width: 44rem;
  margin: 0 auto;
  font-size: 1.375rem;
  line-height: 1.5;
  color: var(--color-body);
}
.emh-topic__articles { padding-bottom: 4rem; }
.emh-topic__heading {
  font-size: clamp(2rem, 3.5vw, 2.5rem);
  font-weight: 500;
  color: var(--color-heading);
  margin: 0 0 2rem;
}
.emh-topic__grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.75rem; }
@media (max-width: 720px) { .emh-topic__grid { grid-template-columns: 1fr; } }
/* Grid class + doubled card class to outrank shared.css's `a:not(...)` link colour. */
.emh-topic__grid .emh-topic-card.emh-topic-card {
  display: flex;
  flex-direction: column;
  min-height: 12rem;
  padding: 1.75rem;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  color: var(--color-heading);
  text-decoration: none;
  transition: border-color 0.15s ease;
}
.emh-topic__grid .emh-topic-card.emh-topic-card:hover { border-color: var(--color-link); }
.emh-topic-card .emh-eyebrow { margin-bottom: 0.875rem; }
.emh-topic-card__title { font-size: 1.25rem; line-height: 1.35; }
.emh-topic-card__arrow {
  margin-top: auto;
  align-self: flex-end;
  padding-top: 1.5rem;
  font-size: 1.375rem;
  line-height: 1;
  color: var(--color-link);
  transition: transform 0.15s ease;
}
.emh-topic-card:hover .emh-topic-card__arrow { transform: translateX(3px); }

.emh-stats { text-align: center; }
.emh-stats__lead { max-width: 36rem; margin: -1.5rem auto 3rem; color: var(--color-body); line-height: 1.65; }
.emh-stats__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  text-align: left;
}
@media (max-width: 860px) { .emh-stats__grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .emh-stats__grid { grid-template-columns: 1fr; } }
.emh-stats__item { border-top: 1px solid var(--color-border); padding-top: 1.25rem; }
.emh-stats__item p { margin: 0; font-size: 0.9375rem; line-height: 1.55; color: var(--color-body); }
.emh-stats__item .emh-stats__num {
  font-family: 'EB Garamond', Georgia, serif;
  font-size: 2.75rem;
  line-height: 1;
  color: var(--color-heading);
  margin-bottom: 0.75rem;
}
.emh-stats__item .emh-stats__source { margin-top: 0.75rem; font-size: 0.8125rem; }
.emh-stats__source a { color: var(--color-muted-functional); }
.emh-stats__close { max-width: 40rem; margin: 3rem auto 0; color: var(--color-body); line-height: 1.65; }

.emh-footer {
  margin-top: 3rem;
  background: var(--color-bg);
  border-top: 1px solid var(--color-border);
  font-size: 0.875rem;
}
.emh-footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.5rem;
  padding-block: 1.75rem;
}
/* Doubled + inner class to outrank shared.css's `a:not(...)` link colour. */
.emh-footer.emh-footer .emh-footer__inner a { color: var(--color-muted-functional); }
.emh-footer.emh-footer .emh-footer__inner a:hover { color: var(--color-heading); }
.emh-footer__brand { font-family: 'EB Garamond', Georgia, serif; font-size: 1.125rem; color: var(--color-heading); }
.emh-footer__spacer { flex: 1; }
