/* ─── Section Head ──────────────────────────────────────────────
   Eyebrow + title with optional right-side link. Drop into any
   Divi Code module above a section. Markup: see docs/components.md
   ─────────────────────────────────────────────────────────────── */

.ch-section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
  margin: 0 0 28px;
  padding: 0 0 18px;
  border-bottom: 1px solid var(--line);
}

.ch-section-head__titles {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.ch-section-head__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--tertiary-dark);
}

.ch-section-head__eyebrow::before {
  content: "";
  display: inline-block;
  width: 16px;
  height: 16px;
  /* Crossed hammer & pick (Orediggers mining mark). Drawn via mask so the icon
     inherits the eyebrow text color via currentColor (and the --on-dark override
     below, which sets background, recolors it on dark surfaces). */
  background-color: currentColor;
  -webkit-mask: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff'><path d='M6 8 L19 21' stroke-width='2.2' stroke-linecap='round'/><path d='M16 8 L3 21' stroke-width='2.4' stroke-linecap='round'/><path d='M1.8 12.2 Q3 5 10.2 3.8' stroke-width='2.2' stroke-linecap='round'/><polygon points='14.73,3.61 20.39,9.27 17.27,12.39 11.61,6.73' fill='%23fff' stroke='none'/></svg>") center / contain no-repeat;
          mask: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff'><path d='M6 8 L19 21' stroke-width='2.2' stroke-linecap='round'/><path d='M16 8 L3 21' stroke-width='2.4' stroke-linecap='round'/><path d='M1.8 12.2 Q3 5 10.2 3.8' stroke-width='2.2' stroke-linecap='round'/><polygon points='14.73,3.61 20.39,9.27 17.27,12.39 11.61,6.73' fill='%23fff' stroke='none'/></svg>") center / contain no-repeat;
}

.ch-section-head__title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(28px, 4vw, 38px);
  letter-spacing: 0.02em;
  line-height: 1;
  color: var(--ink);
  text-transform: uppercase;
}

.ch-section-head__link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  white-space: nowrap;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-soft);
  text-decoration: none;
  transition: color 0.15s;
}

.ch-section-head__link:hover,
.ch-section-head__link:focus-visible {
  color: var(--tertiary-dark);
}

.ch-section-head__link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -3px;
  width: 100%;
  height: 1px;
  background: var(--tertiary-dark);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.2s;
}

.ch-section-head__link:hover::after,
.ch-section-head__link:focus-visible::after {
  transform: scaleX(1);
}

.ch-section-head__arrow {
  display: inline-block;
  transition: transform 0.2s;
}

.ch-section-head__link:hover .ch-section-head__arrow,
.ch-section-head__link:focus-visible .ch-section-head__arrow {
  transform: translateX(3px);
}

/* On dark surfaces — add the modifier to the wrapper */
.ch-section-head--on-dark {
  border-bottom-color: rgba(255, 255, 255, 0.12);
}
.ch-section-head--on-dark .ch-section-head__title { color: var(--on-primary); }
.ch-section-head--on-dark .ch-section-head__link  { color: var(--text-muted); }
.ch-section-head--on-dark .ch-section-head__link:hover,
.ch-section-head--on-dark .ch-section-head__link:focus-visible {
  color: var(--secondary);
}
.ch-section-head--on-dark .ch-section-head__link::after { background: var(--secondary); }
.ch-section-head--on-dark .ch-section-head__eyebrow,
.ch-section-head--on-dark .ch-section-head__eyebrow::before {
  color: var(--secondary);
  background: var(--secondary);
}
.ch-section-head--on-dark .ch-section-head__eyebrow { background: transparent; }

/* Phone — stack title above link */
@media (max-width: 600px) {
  .ch-section-head {
    flex-wrap: wrap;
    gap: 10px;
  }
}
