/* Section typography and ornament: no overflow locks, pointer capture, or hidden content. */
@media (prefers-reduced-motion: no-preference) {
  html:not(.reduced-motion) :is(.web-case .case-body h3, .specimen header h3, .specimen .category, .lab-nav .lab-name) {
    transition: color 240ms ease, text-decoration-color 240ms ease;
  }

  html:not(.reduced-motion) :is(.web-case .case-body a, .specimen .links a) {
    transition: color 200ms ease, text-underline-offset 200ms ease;
  }

  html:not(.reduced-motion) :is(.web-case .case-body a, .specimen .links a):focus-visible {
    text-decoration: underline;
    text-underline-offset: .3em;
  }

  html:not(.reduced-motion) .web-case:focus-within .case-body h3 { color: #f5a7b5; }
  html:not(.reduced-motion) .specimen:focus-within .category { color: #ffb8ac; }

  @media (hover: hover) and (pointer: fine) {
    html:not(.reduced-motion) .web-case:hover .case-body h3,
    html:not(.reduced-motion) .specimen:hover header h3 { color: #ffc1ca; }

    html:not(.reduced-motion) .specimen:hover .category,
    html:not(.reduced-motion) .lab-nav .lab-name:hover { color: #ffb8ac; }

    html:not(.reduced-motion) :is(.web-case .case-body a, .specimen .links a):hover {
      text-decoration: underline;
      text-underline-offset: .3em;
    }

    html:not(.reduced-motion) .disciplines > div > span {
      justify-self: start;
      text-decoration: underline;
      text-underline-offset: .27em;
      text-decoration-color: transparent;
      transition: color 210ms ease, text-decoration-color 210ms ease;
    }
    html:not(.reduced-motion) .disciplines > div > span:hover {
      color: #ffc1ca;
      text-decoration-color: #cc6d85;
    }

    html:not(.reduced-motion) .lab-hero .hero-glyph {
      transform-origin: 50% 62%;
      transition: rotate 380ms cubic-bezier(.2,.7,.22,1), color 230ms ease;
    }
    html:not(.reduced-motion) .lab-hero .hero-art:hover .hero-glyph {
      rotate: -5deg;
      color: #ffb1be;
    }
  }

  @supports (animation-timeline: view()) and (animation-range: entry 0% cover 40%) {
    /* Decorative proof rules measure viewport entry; reversing the scroll reverses the proof.
       The rules stay ornamental: all title text remains readable on every frame. */
    html:not(.reduced-motion) :is(.web-cases > .section-top, .control-top, .catalog-head) {
      position: relative;
    }
    html:not(.reduced-motion) :is(.web-cases > .section-top, .control-top, .catalog-head)::after {
      content: "";
      pointer-events: none;
      position: absolute;
      left: 0;
      bottom: -7px;
      width: min(104px, 22%);
      height: 1px;
      background: linear-gradient(90deg, #e68195, #e6819500);
      transform-origin: left;
      animation: karz-section-rule 1ms linear both;
      animation-timeline: view();
      animation-range: entry 0% cover 40%;
    }

    html:not(.reduced-motion) .lab-hero .hero-glyph {
      animation: karz-glyph-drift 1ms linear both;
      animation-timeline: view();
      animation-range: cover 31% exit 100%;
    }
  }
}
@keyframes karz-section-rule {
  from { transform: scaleX(.18); opacity: .55; }
  to { transform: scaleX(1); opacity: .95; }
}
@keyframes karz-glyph-drift {
  from { translate: 0 0; }
  to { translate: 0 14px; }
}
