/*
 * Éclore Aesthetics — Breadcrumbs (VISUAL-DESIGN §5.12)
 * ─────────────────────────────────────────────────────────────────────────────
 * Styles the existing markup from template-parts/breadcrumbs.php into a single
 * inline row that sits below the header and above the H1, within the
 * --container-max frame. Familjen uppercase caps at Caption size, muted Ink;
 * the current page is non-link Ink. Separators are quiet (muted tone), spaced
 * either side. Links carry no underline by default; on hover/focus the text
 * settles to Ink and the house Terracotta underline-reveal draws in (the 1px
 * line keeps Terracotta off small text, which would fail AA at this size).
 * Tokens only — no hardcoded hex. Squared, no shadows.
 */

.breadcrumbs {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--gutter);
  padding-block: var(--space-md) var(--space-sm);
}

.breadcrumbs__list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  row-gap: var(--space-2xs); /* breathing room when the trail wraps */
}

.breadcrumbs__item {
  display: inline-flex;
  align-items: center;
}

/* Quiet Inter treatment — deliberately NOT the Familjen tracked caps the
   primary nav speaks (the trail sits right under the header and was reading
   as a second nav row). Sentence case, normal tracking, muted. */
.breadcrumbs__link,
.breadcrumbs__current {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 0.8125rem; /* 13px */
  line-height: 1.4;
  letter-spacing: 0.01em;
  text-transform: none;
}

.breadcrumbs__link {
  position: relative;
  display: inline-block;
  color: var(--color-text-muted);
  text-decoration: none; /* overrides the global prose-link underline */
  transition: color var(--dur-micro) var(--ease-standard);
}

/* House underline-reveal: 1px Terracotta line, scaleX from left (§5.2). */
.breadcrumbs__link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 1px;
  background: var(--color-terracotta);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--dur-short) var(--ease-reveal);
}

.breadcrumbs__link:hover {
  color: var(--color-text); /* settle to Ink — stays AA-safe at this size */
}

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

/* Current page — Ink, not a link (§5.12); long article titles truncate so
   the trail never shouts across the full row. */
.breadcrumbs__current {
  color: var(--color-text);
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 48ch;
}

/* Separator — quiet muted tone, aria-hidden in markup; spaced either side. */
.breadcrumbs__separator {
  margin-inline: var(--space-2xs);
  color: var(--color-text-muted);
  user-select: none;
}

@media (prefers-reduced-motion: reduce) {
  .breadcrumbs__link::after {
    transition: none;
  }
}
