/* Module CSS, copied from templates/modules. Do not add project styling here. */

/* ---- reveal ---- */
/* Every hidden-then-revealed state is scoped under .js, a class an inline
   script in the document head sets before first paint. With JavaScript
   disabled or broken the class is never added, nothing is hidden, and the
   page reads as plain content. */
.js [data-reveal] {
  opacity: 0;
  transform: translate3d(0, 18px, 0);
  transition: opacity var(--dur-slow, 720ms) var(--ease, ease),
              transform var(--dur-slow, 720ms) var(--ease, ease);
  will-change: opacity, transform;
}
.js [data-reveal].is-revealed {
  opacity: 1;
  transform: none;
}
@media (prefers-reduced-motion: reduce) {
  .js [data-reveal] { opacity: 1; transform: none; transition: none; }
}

/* Native scroll-driven tier (opt-in): data-reveal-scrub.
   Pure CSS, no JS. The element is only animated where view() timelines are
   supported and motion is allowed, so everywhere else it is plain visible
   content (no .js class needed, nothing is ever hidden). It scrubs with scroll
   position rather than firing once, and has no stagger. Compositor properties
   only (opacity, transform). */
@media (prefers-reduced-motion: no-preference) {
  @supports ((animation-timeline: view()) and (animation-range: entry)) {
    @keyframes reveal-scrub {
      from { opacity: 0; transform: translate3d(0, 18px, 0); }
    }
    [data-reveal-scrub] {
      animation: reveal-scrub linear both;
      animation-timeline: view();
      animation-range: entry 0% entry 60%;
    }
  }
}

/* ---- counter ---- */
[data-counter] {
  font-variant-numeric: tabular-nums;
}
@media (prefers-reduced-motion: reduce) {
  [data-counter] { transition: none; }
}

/* ---- stroke-draw ---- */
/* Scoped under .js for the same reason as reveal: without JavaScript the
   strokes must render normally rather than sitting at a dash offset of 1,
   which would make the artwork invisible. */
.js svg[data-stroke-draw] path,
.js svg[data-stroke-draw] line,
.js svg[data-stroke-draw] polyline,
.js svg[data-stroke-draw] circle,
.js svg[data-stroke-draw] rect {
  fill: none;
  stroke: currentColor;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  transition: stroke-dashoffset var(--dur-slow, 720ms) var(--ease, ease);
}
.js svg[data-stroke-draw].is-drawn path,
.js svg[data-stroke-draw].is-drawn line,
.js svg[data-stroke-draw].is-drawn polyline,
.js svg[data-stroke-draw].is-drawn circle,
.js svg[data-stroke-draw].is-drawn rect {
  stroke-dashoffset: 0;
}
@media (prefers-reduced-motion: reduce) {
  svg[data-stroke-draw] * { transition: none; stroke-dashoffset: 0; }
}
