/* Rendering vs Reality hero: a balloon arch that loops from a pencil sketch to the finished garland.
   With no class it shows the finished arch (no JavaScript, reduced motion); arch-reveal.js runs the
   loop by switching the classes below. */
.showcase-rendering-hero .ar { width: 100%; max-width: 30rem; justify-self: center; align-self: center; }
.ar-art { display: block; width: 100%; height: auto; max-height: 22.5rem; aspect-ratio: 1; margin-inline: auto; }
@media (min-width: 1024px) {
  .showcase-rendering-hero .ar { max-width: none; }
  .ar-art { max-height: 32rem; }
}

.ar[role="button"] { cursor: pointer; border-radius: 1.5rem; }
.ar[role="button"]:focus-visible { outline: 3px solid var(--raspberry); outline-offset: 4px; }

.ar-halo { fill: var(--blush); opacity: .7; }
.ar-paper { fill: #fffdfb; stroke: #ead9df; }
.ar-gridrect { fill: url(#ar-grid); }
.ar pattern path { fill: none; stroke: var(--ink); stroke-opacity: .07; }
/* Paths draw fully; balloon outlines stop short, like a pencil circle that never quite closes. */
.ar-line { --len: 100; }
.ar-line circle { --len: 88; }
.ar-line, .ar-line circle { fill: none; stroke: var(--raspberry-deep); stroke-width: 1.3; stroke-linecap: round; stroke-dasharray: var(--len) 200; stroke-dashoffset: 0; }
.ar-dim { stroke: var(--ink); stroke-opacity: .45; stroke-width: 1; }
.ar-frame { fill: none; stroke: url(#ar-chrome); stroke-width: 5; stroke-linecap: round; }
.ar-real .p { fill: url(#ar-p); }
.ar-real .r { fill: url(#ar-r); }
.ar-real .b { fill: url(#ar-b); }
.ar-real .w { fill: url(#ar-w); }
.ar-real .c { fill: url(#ar-c); }
.ar-real circle { transform-box: fill-box; transform-origin: center; }

/* Reality: the default. */
.ar-sketch { opacity: 0; }
/* Sketch: the drawing on its paper, the balloons and frame put away at once. */
.ar.is-sketch .ar-sketch { opacity: 1; }
.ar.is-sketch .ar-real circle { scale: 0; transition: none; }
.ar.is-sketch .ar-real > :not(.ar-bob) { opacity: 0; transition: none; }
/* Blank: the paper before the lines are drawn. */
.ar.is-blank :is(.ar-line, .ar-line circle) { stroke-dashoffset: var(--len); transition: none; }
/* Fading: the finished arch dissolves back into the sketch. */
.ar.is-fading .ar-sketch { opacity: 1; }
.ar.is-fading .ar-real { opacity: 0; }

@media (prefers-reduced-motion: no-preference) {
  .ar-sketch { transition: opacity 1.2s .3s; }
  .ar-line, .ar-line circle { transition: stroke-dashoffset 1s ease-out; }
  .ar-real circle { transition: scale .5s cubic-bezier(.34, 1.56, .64, 1) calc(var(--i) * 40ms); }
  .ar-real > :not(.ar-bob) { transition: opacity .5s; }
  .ar.is-sketch .ar-sketch { transition: none; }
  .ar.is-fading .ar-sketch, .ar.is-fading .ar-real { transition: opacity .8s ease-in-out; }
  .ar.is-live .ar-bob { animation: ar-bob 2.5s ease-in-out infinite alternate; }
  .ar.is-paused .ar-bob { animation-play-state: paused; }
}
@keyframes ar-bob { to { translate: 0 -3px; } }
