/**
 * Dafa Theme — color discipline & hierarchy layer (additive, site-wide).
 *
 * Loaded after polish-v2. Goal: neutrals carry the interface; brand orange
 * is reserved for primary actions, current states and rare accents
 * (60-30-10). Every selector maps to markup verified in the theme source.
 *
 * @package DafaTheme
 */

/* =========================================================================
 * B1. Header nav badges → neutral outline pills.
 * DOM: inc/navigation.php emits .dafa-nav-badge--exclusive / --vip / --ai
 * inside primary-nav links. site.css (570-602) gives each a saturated tint;
 * badges are pointer-events:none, so the hover tint is driven by the parent
 * link. Resting state is now identical across all three; the semantic color
 * only returns on hover of the parent menu item.
 * ========================================================================= */

.dafa-nav-badge {
  --dafa-nav-badge-bg: transparent;
  --dafa-nav-badge-ink: var(--dafa-text-soft);

  border-color: var(--dafa-border);
}

@media (prefers-reduced-motion: no-preference) {
  .dafa-nav-badge {
    transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease;
  }
}

.primary-navigation a:hover .dafa-nav-badge--exclusive,
.primary-navigation a:focus-visible .dafa-nav-badge--exclusive {
  --dafa-nav-badge-bg: var(--dafa-accent-soft);
  --dafa-nav-badge-ink: var(--dafa-accent-strong);

  border-color: color-mix(in srgb, var(--dafa-accent-strong) 25%, transparent);
}

.primary-navigation a:hover .dafa-nav-badge--vip,
.primary-navigation a:focus-visible .dafa-nav-badge--vip {
  --dafa-nav-badge-bg: color-mix(in srgb, #d6a52a 20%, var(--dafa-surface));
  --dafa-nav-badge-ink: color-mix(in srgb, #8c6500 55%, var(--dafa-text));

  border-color: color-mix(in srgb, #d6a52a 40%, transparent);
}

.primary-navigation a:hover .dafa-nav-badge--ai,
.primary-navigation a:focus-visible .dafa-nav-badge--ai {
  --dafa-nav-badge-bg: color-mix(in srgb, #4d7fca 17%, var(--dafa-surface));
  --dafa-nav-badge-ink: color-mix(in srgb, #315f9f 55%, var(--dafa-text));

  border-color: color-mix(in srgb, #4d7fca 38%, transparent);
}

/* =========================================================================
 * B2. CTA hierarchy — verification layer.
 * site.css already gives exactly one solid primary per context
 * (.button--primary / .scope-search__submit / input[submit]) and neutral
 * outlines for secondary (.button--secondary, .news-filter-actions__reset).
 * Hero quick links stay text-only; this rule just guarantees they never
 * compete with the solid submit next to them.
 * ========================================================================= */

.home-hero__quick-link {
  font-weight: 620;
}

/* =========================================================================
 * B3. Unified chip language.
 * One neutral pill spec (padding / radius / 1px border / 12.5px / soft ink)
 * for tag clouds, archive hot-tag chips and resource filter pills. Brand
 * color appears only on hover / active. Footer chips keep their dark-band
 * variant (higher-specificity rules in polish-v2.css win there).
 * ========================================================================= */

.archive-subs__chip,
.resource-filters__row a,
.wp-block-tag-cloud a {
  padding: 5px 12px;
  border: 1px solid var(--dafa-border);
  border-radius: 999px;
  background: transparent;
  color: var(--dafa-text-soft);
  font-size: 12.5px;
  line-height: 1.5;
}

.archive-subs__chip:hover,
.resource-filters__row a:hover,
.wp-block-tag-cloud a:hover {
  border-color: var(--dafa-accent);
  background: var(--dafa-accent-soft);
  color: var(--dafa-accent-strong);
}

/* Active states stay branded (the "current" allowance of the 10%). */
.resource-filters__row a.is-active,
.archive-subs__chip.is-current {
  font-weight: 650;
}

/* =========================================================================
 * B4. Semantic-color containment.
 * File-type chips (PDF/DOC/XLS…) keep their identity colors — they are
 * status semantics, not decoration. Their tinted backgrounds (polish-v2)
 * are further desaturated so they stop competing with the brand orange.
 * ========================================================================= */

.entry-card__filetype {
  background: color-mix(in srgb, currentColor 9%, transparent);
}

/* =========================================================================
 * B5. Type hierarchy ladder.
 * Desktop targets: page H1 40-44 / section H2 28-30 / card H3 20.
 * Hero display type is the deliberate exception and stays as-is.
 * ========================================================================= */

.archive-hero h1,
.archive-title,
.search-hero h1,
.vip-hero h1 {
  font-size: clamp(32px, 4vw, 44px);
  letter-spacing: -0.03em;
}

.section-heading h2 {
  font-size: clamp(24px, 2.6vw, 30px);
}

.entry-card__title {
  font-size: 20px;
}

/* Page subtitles step down clearly below the H1. */
.archive-description {
  color: var(--dafa-text-soft);
  font-size: 15px;
}

/* Breadcrumbs recede to wayfinding metadata. */
.dafa-breadcrumbs {
  color: var(--dafa-text-soft);
  font-size: 12.5px;
}
