/* ─── 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: 22px;
  height: 2px;
  background: var(--tertiary-dark);
}

.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;
  }
}
