/* Kovara Bîr micro-interactions: ink links, a press on buttons, soft section headings. */
:root { --ink-fill: var(--petrol, #115463); --ink-ease: cubic-bezier(.2,.7,.2,1); }
html[data-theme=dark] body { --ink-fill: #ffa62b; }

/* 1. Ink links: a quiet hairline that fills with a 2px stroke from left to right. Text links only. */
:is(.article-body, .article-source, .author-bio, .page-intro, .footer-bottom) a[href]:not([class]):not([data-fn]):not(:has(img, picture, svg, video)) {
  text-decoration: none;
  background-image: linear-gradient(var(--ink-fill), var(--ink-fill)), linear-gradient(color-mix(in srgb, currentColor 38%, transparent), color-mix(in srgb, currentColor 38%, transparent));
  background-repeat: no-repeat;
  background-position: 0 100%, 0 100%;
  background-size: 0% 2px, 100% 1px;
  transition: background-size 320ms var(--ink-ease);
}
:is(.article-body, .article-source, .author-bio, .page-intro, .footer-bottom) a[href]:not([class]):not([data-fn]):not(:has(img, picture, svg, video)):is(:hover, :focus-visible) {
  background-size: 100% 2px, 100% 1px;
}
footer .footer-bottom a[href]:not([class]) { --ink-fill: #ffa62b; }

/* 2. Press feel: a tiny sink and a deeper shade while pressed; transform only, no layout shift. */
:is(.textlink, .plain-button, .culture-button, .error-actions .error-primary, .search-input-row button, .footer-top > a:last-child,
  .video-library-filters button, .pc-play, .pc-primary, .pc-secondary, .pc-filter button, .newsletter-row button, .special-band-more,
  .home-latest-all-go, .archive-filter-btn, .share-links a, .reading-tools button, .reading-tools summary, .end-tools-actions button) {
  transition: background-color .18s, color .18s, border-color .18s, transform 100ms ease-out, filter 100ms ease-out;
}
:is(.textlink, .plain-button, .culture-button, .error-actions .error-primary, .search-input-row button, .footer-top > a:last-child,
  .video-library-filters button, .pc-play, .pc-primary, .pc-secondary, .pc-filter button, .newsletter-row button, .special-band-more,
  .home-latest-all-go, .archive-filter-btn, .share-links a, .reading-tools button, .reading-tools summary, .end-tools-actions button):active:not(:disabled) {
  transform: translateY(1px) scale(.98);
  filter: brightness(.93);
}

/* 3. Section headings rise once into place. Only the script adds .kb-rise, and only below the fold. */
.kb-rise { opacity: 0; transform: translateY(8px); }
.kb-rise.is-in { opacity: 1; transform: none; transition: opacity 520ms var(--ink-ease), transform 520ms var(--ink-ease); }

@media (prefers-reduced-motion: reduce) {
  :is(.article-body, .article-source, .author-bio, .page-intro, .footer-bottom) a[href] { transition: none !important; }
  :is(.textlink, .plain-button, .culture-button, .error-actions .error-primary, .search-input-row button, .footer-top > a:last-child,
    .video-library-filters button, .pc-play, .pc-primary, .pc-secondary, .pc-filter button, .newsletter-row button, .special-band-more,
    .home-latest-all-go, .archive-filter-btn, .share-links a, .reading-tools button, .reading-tools summary, .end-tools-actions button):active { transform: none !important; }
  .kb-rise { opacity: 1 !important; transform: none !important; }
}
