/* ===== B2B Payment Onboarding & Merchant Account Workflows — Case Study ===== */

.header {
  background-color: var(--bg-color-cs);
}

/* Page offset for fixed-ish header */
.mac-page {
  padding-top: 120px;
  background-color: var(--background-color_lighter);
}

/* ── Wrappers ── */
.mac-wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 80px;
  box-sizing: border-box;
}

.mac-wrap--wide {
  max-width: 1340px;
  margin: 0 auto;
  padding: 0 80px;
  box-sizing: border-box;
}

.mac-wrap--narrow {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 80px;
  box-sizing: border-box;
}

/* ── Section base ── */
.mac-section {
  padding: 72px 0;
  border-top: 1px solid var(--border-color, #e5e7eb);
}

.mac-section--featured {
  background: color-mix(in srgb, var(--primary-color) 5%, var(--background-color_lighter));
  border-top-color: color-mix(in srgb, var(--primary-color) 15%, transparent);
}

/* ── Eyebrow / label ── */
.mac-label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--primary-color);
  margin-bottom: 12px;
}

/* ── Section headings ── */
.mac-section h2 {
  font-size: clamp(1.4rem, 2vw + 0.8rem, 2rem);
  font-weight: 600;
  color: var(--text-headline);
  margin: 0 0 8px;
  line-height: 1.2;
}

.mac-section-intro {
  font-size: 15px !important;
  color: var(--text-secondary) !important;
  line-height: 1.7 !important;
  max-width: 660px;
  margin: 0 0 24px !important;
}

/* ── Prose ── */
.mac-prose p {
  font-size: 15px !important;
  line-height: 1.75 !important;
  color: var(--text-primary) !important;
  margin-bottom: 20px !important;
  max-width: 660px;
}

.mac-prose p:last-child {
  margin-bottom: 0 !important;
}

/* ════════════════════════════════
   HERO
════════════════════════════════ */
.mac-hero {
  padding: 80px 0 72px;
}

.mac-hero-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 80px;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 64px;
  align-items: center;
  box-sizing: border-box;
}

.mac-eyebrow {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--primary-color);
  margin-bottom: 16px;
}

.mac-hero h1 {
  font-size: clamp(1.7rem, 2.3vw + 1rem, 2.5rem);
  font-weight: 700;
  color: var(--text-headline);
  line-height: 1.15;
  margin: 0 0 14px;
}

.mac-hero-sub {
  font-size: 16px !important;
  color: var(--text-secondary) !important;
  line-height: 1.65 !important;
  margin-bottom: 24px !important;
}

.mac-hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.mac-hero-visual {
  display: flex;
  align-items: center;
  justify-content: center;
}

.mac-hero-visual img {
  width: 100%;
  max-width: 480px;
  border-radius: 16px;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.14);
  display: block;
}

/* Generic image placeholder (image to be supplied later) */
.mac-img-placeholder {
  width: 100%;
  aspect-ratio: 16 / 10;
  background: linear-gradient(160deg, #ededf8 0%, #e2e2f2 100%);
  border-radius: 16px;
  border: 1px dashed var(--border-color, #c7c7d6);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--text-hover);
  font-size: 13px;
  text-align: center;
  padding: 24px;
  box-sizing: border-box;
}

.mac-img-placeholder svg {
  opacity: 0.35;
}

.mac-img-placeholder span {
  max-width: 280px;
  line-height: 1.5;
}

.mac-img-placeholder code {
  display: inline-block;
  margin-top: 4px;
  padding: 3px 8px;
  font-size: 11px;
  font-family: ui-monospace, Menlo, Consolas, monospace;
  background: rgba(0, 0, 0, 0.06);
  border-radius: 6px;
  color: var(--text-primary);
  word-break: break-all;
}
html.dark .mac-img-placeholder code {
  background: rgba(255, 255, 255, 0.1);
}

.mac-hero-visual .mac-img-placeholder {
  aspect-ratio: 4 / 3;
  border-radius: 16px;
}

/* Wide screenshot frame (desktop UI captures) */
.mac-shot-frame {
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border-color, #e5e7eb);
  background: var(--background-color_lighter);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
}

.mac-shot-frame img {
  width: 100%;
  display: block;
}

.mac-shot-frame .mac-img-placeholder {
  aspect-ratio: 16 / 10;
  border: none;
  border-radius: 0;
}

.mac-shot-caption {
  font-size: 13px;
  color: var(--text-hover);
  line-height: 1.5;
  padding: 12px 16px;
  border-top: 1px solid var(--border-color, #e5e7eb);
}

.mac-shot-single {
  margin-top: 36px;
}

/* ════════════════════════════════
   SNAPSHOT
════════════════════════════════ */
.mac-snapshot-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--border-color, #e5e7eb);
}

.mac-snapshot-item {
  padding: 12px 14px;
  background: var(--background-color_lighter);
  border: 1px solid var(--border-color, #e5e7eb);
  border-radius: 8px;
}

.mac-snap-key {
  display: block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-hover);
  margin-bottom: 3px;
}

.mac-snap-val {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.5;
}

.mac-snapshot-item--span {
  grid-column: span 2;
}

/* ════════════════════════════════
   STATES / BULLET CARD
════════════════════════════════ */
.mac-pull-quote {
  font-size: 16px;
  font-weight: 500;
  color: var(--text-headline);
  line-height: 1.6;
  padding: 22px 26px;
  background: color-mix(in srgb, var(--primary-color) 6%, var(--background-color_lighter));
  border: 1px solid color-mix(in srgb, var(--primary-color) 20%, transparent);
  border-radius: 12px;
  margin: 0 0 28px;
}

.mac-states-card {
  padding: 24px 26px;
  border: 1px solid var(--border-color, #e5e7eb);
  border-radius: 12px;
}

.mac-states-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 11px;
}

.mac-states-list li {
  margin-left: 0 !important;
  font-size: 14px;
  color: var(--text-primary);
  display: flex;
  justify-content: flex-start;
  align-items: baseline;
  gap: 8px;
  line-height: 1.5;
}

.mac-states-list li::before {
  content: "–";
  font-size: 12px;
  color: var(--text-hover);
  flex-shrink: 0;
}

/* ════════════════════════════════
   POINT CARDS (UX direction)
════════════════════════════════ */
.mac-points-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 24px;
}

.mac-point-card {
  padding: 20px 22px;
  border: 1px solid var(--border-color, #e5e7eb);
  border-radius: 12px;
}

.mac-point-card h3 {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-headline);
  margin: 0 0 8px;
}

.mac-point-card p {
  font-size: 13px !important;
  color: var(--text-primary) !important;
  line-height: 1.6 !important;
  margin: 0 !important;
}

/* ════════════════════════════════
   INSIGHT QUESTIONS
════════════════════════════════ */
.mac-insight-questions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 24px 0 8px;
}

.mac-insight-q {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px 18px;
  border: 1px solid var(--border-color, #e5e7eb);
  border-radius: 10px;
}

.mac-insight-n {
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--primary-color);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mac-insight-q p {
  font-size: 14px !important;
  color: var(--text-primary) !important;
  line-height: 1.5 !important;
  margin: 0 !important;
  font-weight: 500;
}

/* ════════════════════════════════
   DECISION CARDS (Solution)
════════════════════════════════ */
.mac-decision-cards {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 16px;
}

.mac-decision-card {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 16px 20px;
  border: 1px solid var(--border-color, #e5e7eb);
  border-radius: 10px;
}

.mac-decision-n {
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--primary-color);
}

.mac-decision-card p {
  font-size: 14px !important;
  color: var(--text-primary) !important;
  line-height: 1.55 !important;
  margin: 0 !important;
}

/* ════════════════════════════════
   OUTCOME
════════════════════════════════ */
.mac-outcome-highlight {
  font-size: 18px;
  font-weight: 400;
  color: var(--text-primary);
  line-height: 1.6;
  border-left: 3px solid var(--primary-color);
  padding: 20px 24px;
  margin: 28px 0 0;
  background: color-mix(in srgb, var(--primary-color) 2.5%, var(--background-color_lighter));
  border-radius: 0 8px 8px 0;
}

/* ════════════════════════════════
   CLOSING — WHAT THIS DEMONSTRATES
════════════════════════════════ */
.mac-closing {
  padding: 88px 0;
  border-top: 1px solid var(--border-color, #e5e7eb);
  text-align: center;
}

.mac-closing-inner {
  max-width: 620px;
  margin: 0 auto;
  padding: 0 40px;
}

.mac-closing-body {
  font-size: 15px !important;
  color: var(--text-secondary) !important;
  line-height: 1.75 !important;
  margin: 0 !important;
}

/* ════════════════════════════════
   NEXT CASE STUDY
════════════════════════════════ */
.next {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 24px 80px;
  background: var(--background-color_lighter);
  border-top: 1px solid var(--border-color, #e5e7eb);
  color: var(--text-secondary);
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s;
  width: 100%;
  box-sizing: border-box;
}

.next:hover {
  background: var(--about-background, #f3f3f3);
}

.next:hover .next-arrow {
  background: var(--primary-color);
  border-color: var(--primary-color);
  transform: translateX(3px);
}

.next img {
  border-radius: 8px;
  object-fit: cover;
  height: 110px;
  width: 160px;
  flex-shrink: 0;
}

.next-text {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.next-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-hover, rgba(0, 0, 0, .45));
}

.next-title {
  font-size: 17px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.3;
  display: flex;
  align-items: center;
  gap: 10px;
}

.next-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1.5px solid var(--line-color, rgba(0,0,0,.15));
  font-size: 0;
  color: transparent;
  flex-shrink: 0;
  position: relative;
  transition: background 0.2s, border-color 0.2s, transform 0.2s;
}

.next-arrow::after {
  content: '';
  display: block;
  width: 8px;
  height: 8px;
  border-right: 2.5px solid var(--text-primary);
  border-top: 2.5px solid var(--text-primary);
  border-radius: 1px;
  transform: rotate(45deg) translate(-1px, 0px);
  transition: border-color 0.2s;
}

.next:hover .next-arrow::after {
  border-color: #fff;
}

/* ════════════════════════════════
   RESPONSIVE
════════════════════════════════ */
@media (max-width: 1024px) {
  .mac-page {
    padding-top: 96px;
  }
  .mac-hero-inner,
  .mac-wrap,
  .mac-wrap--wide,
  .mac-wrap--narrow {
    padding: 0 40px;
  }
  .mac-snapshot-row {
    grid-template-columns: repeat(2, 1fr);
  }
  .next {
    padding: 24px 40px;
  }
}

@media (max-width: 700px) {
  .mac-page {
    padding-top: 0;
  }
  .mac-hero-inner,
  .mac-wrap,
  .mac-wrap--wide,
  .mac-wrap--narrow {
    padding: 0 24px;
  }
  .mac-hero-inner {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .mac-hero-visual {
    display: none;
  }
  .mac-snapshot-row,
  .mac-points-grid {
    grid-template-columns: 1fr;
  }
  .mac-snapshot-item--span {
    grid-column: span 1;
  }
  .mac-decision-card {
    flex-direction: column;
    gap: 4px;
  }
  .mac-section {
    padding: 48px 0;
  }
  .mac-hero {
    padding: 40px 0 36px;
  }
  .mac-closing {
    padding: 56px 0;
  }
  .next {
    padding: 20px 24px 44px;
    gap: 16px;
  }
  .next img {
    height: 84px;
    width: 126px;
  }
  .next-title {
    font-size: 15px;
  }
  .next-label {
    font-size: 11px;
  }
  .next-arrow {
    display: none;
  }
}

@media (max-width: 450px) {
  .mac-page {
    padding-top: 0;
  }
  .mac-hero-inner,
  .mac-wrap,
  .mac-wrap--wide,
  .mac-wrap--narrow {
    padding: 0 16px;
  }
}
