/* Glass illustrations: soft flat-3D glass scenes (site/lib/glass-kit.mjs).
   Motion layers:
   1. Entrance  — the scene settles in as it scrolls into view.
   2. Ambient   — slow, offset floats and twinkles. Calm, never looping in sync.
   3. Hover     — one short story per card on hover or keyboard focus.
   Every layer is removed for prefers-reduced-motion. */

.sg-materials { position:absolute; width:0; height:0; overflow:hidden; pointer-events:none; }

.sg-illus { display:block; width:100%; overflow:visible; }
/* Glass art sets its own strokes; do not inherit line-art strokes from containers. */
:is(svg.sg-act, svg.sg-illus, svg.lead-spot) { stroke:none; }
/* Only motion wrappers pivot on themselves; positioned groups keep their SVG transform origin. */
:is(.sg-illus, .lead-spot, .sg-act) g[class^="sg-"] { transform-box:fill-box; transform-origin:center; }
.lead-spot .sg-glow { opacity:.55; }
.sf-strategy-thumbnail.sg-illus { height:112px; margin:4px 0 22px; color:inherit; }
/* Home topic cards: the glass scene sits on a soft accent wash at the top of the card. */
.sf-topic-art { width:100%; padding:20px 16px 8px; background:radial-gradient(ellipse at 50% 100%,color-mix(in srgb,var(--sf-accent) 12%,transparent),transparent 75%); }
.sf-topic-thumbnail.sg-illus { height:auto; aspect-ratio:300/120; }

:root {
  /* Spring with ~12% overshoot that settles quickly. */
  --sg-spring: linear(0, .009, .035 2.1%, .141 4.4%, .281 6.7%, .723 12.9%, .938 16.7%, 1.017, 1.077, 1.121, 1.149 24.3%, 1.159, 1.163, 1.161, 1.154 29.9%, 1.129 32.8%, 1.051 39.6%, 1.017 43.1%, .991, .977 51%, .974 53.8%, .975 57.1%, .997 69.8%, 1.003 76.9%, 1);
  --sg-out: cubic-bezier(.22, 1, .36, 1);
  --sg-sway: cubic-bezier(.45, 0, .25, 1);
}

/* Glows breathe very slightly so glass reads as lit, not painted. */
.sg-glow { opacity:.75; }
.sg-traveller { pointer-events:none; }

@media (prefers-reduced-motion: no-preference) {
  /* 1. Entrance */
  @supports (animation-timeline: view()) {
    .sg-illus, .lead-spot, .sg-act {
      animation:sg-enter linear both;
      animation-timeline:view();
      animation-range:entry 0% entry 70%;
    }
  }

  /* 2. Ambient */
  .sg-float { animation:sg-float 6.4s var(--sg-sway) calc(var(--sg-d, 0s) * -1) infinite; }
  .sg-twinkle { animation:sg-twinkle 3.6s ease-in-out calc(var(--sg-d, 0s) * -1) infinite; }
  .sg-rock { animation:sg-rock 7.2s var(--sg-sway) infinite; }
  .sg-needle { animation:sg-needle 5.2s var(--sg-sway) infinite; }
  .sg-glow { animation:sg-breathe 5.6s ease-in-out infinite; }
  .sg-flow { animation:sg-flow 2.8s linear infinite; }
  .sg-flow--rev { animation-direction:reverse; }
  /* Cycle stops pulse in turn as a linear traveller reaches them (see strategyCycleIllustration). */
  .sg-beat { animation:sg-beat var(--sg-beat, 8s) var(--sg-out) calc(var(--sg-d, 0s) * -1) infinite; }

  /* 3. Hover / keyboard focus: one story per card */
  :is(.sf-strategy-card:hover, .sf-strategy-card:focus-visible, .sf-topic-card:hover, .sf-topic-card:focus-visible, .sf-strategy-position:hover, .sf-point:hover, .sf-point:focus-within, .sf-area:hover, .sf-area:focus-within, .sf-home-map__tile:hover, .sf-home-map__tile:focus-visible, .fx-depth > li:hover) :is(.sg-h-pop, .sg-h-rise, .sg-h-bump, .sg-h-scan, .sg-h-gather, .sg-h-slide, .sg-h-drop, .sg-h-grow, .sg-h-spread, .sg-h-tilt, .sg-h-sweep, .sg-h-stamp, .sg-h-nudge) {
    animation-delay:var(--sg-d, 0s);
    animation-fill-mode:both;
  }
  :is(.sf-strategy-card:hover, .sf-strategy-card:focus-visible, .sf-topic-card:hover, .sf-topic-card:focus-visible, .sf-strategy-position:hover, .sf-point:hover, .sf-point:focus-within, .sf-area:hover, .sf-area:focus-within, .sf-home-map__tile:hover, .sf-home-map__tile:focus-visible, .fx-depth > li:hover) .sg-h-pop    { animation-name:sg-pop;    animation-duration:.9s;  animation-timing-function:var(--sg-spring); }
  :is(.sf-strategy-card:hover, .sf-strategy-card:focus-visible, .sf-topic-card:hover, .sf-topic-card:focus-visible, .sf-strategy-position:hover, .sf-point:hover, .sf-point:focus-within, .sf-area:hover, .sf-area:focus-within, .sf-home-map__tile:hover, .sf-home-map__tile:focus-visible, .fx-depth > li:hover) .sg-h-rise   { animation-name:sg-rise;   animation-duration:.9s;  animation-timing-function:var(--sg-spring); }
  :is(.sf-strategy-card:hover, .sf-strategy-card:focus-visible, .sf-topic-card:hover, .sf-topic-card:focus-visible, .sf-strategy-position:hover, .sf-point:hover, .sf-point:focus-within, .sf-area:hover, .sf-area:focus-within, .sf-home-map__tile:hover, .sf-home-map__tile:focus-visible, .fx-depth > li:hover) .sg-h-bump   { animation-name:sg-bump;   animation-duration:.7s;  animation-timing-function:var(--sg-sway); }
  :is(.sf-strategy-card:hover, .sf-strategy-card:focus-visible, .sf-topic-card:hover, .sf-topic-card:focus-visible, .sf-strategy-position:hover, .sf-point:hover, .sf-point:focus-within, .sf-area:hover, .sf-area:focus-within, .sf-home-map__tile:hover, .sf-home-map__tile:focus-visible, .fx-depth > li:hover) .sg-h-scan   { animation-name:sg-scan;   animation-duration:1.7s; animation-timing-function:var(--sg-sway); }
  :is(.sf-strategy-card:hover, .sf-strategy-card:focus-visible, .sf-topic-card:hover, .sf-topic-card:focus-visible, .sf-strategy-position:hover, .sf-point:hover, .sf-point:focus-within, .sf-area:hover, .sf-area:focus-within, .sf-home-map__tile:hover, .sf-home-map__tile:focus-visible, .fx-depth > li:hover) .sg-h-gather { animation-name:sg-gather; animation-duration:1.3s; animation-timing-function:var(--sg-sway); }
  :is(.sf-strategy-card:hover, .sf-strategy-card:focus-visible, .sf-topic-card:hover, .sf-topic-card:focus-visible, .sf-strategy-position:hover, .sf-point:hover, .sf-point:focus-within, .sf-area:hover, .sf-area:focus-within, .sf-home-map__tile:hover, .sf-home-map__tile:focus-visible, .fx-depth > li:hover) .sg-h-slide  { animation-name:sg-slide;  animation-duration:.95s; animation-timing-function:var(--sg-spring); }
  :is(.sf-strategy-card:hover, .sf-strategy-card:focus-visible, .sf-topic-card:hover, .sf-topic-card:focus-visible, .sf-strategy-position:hover, .sf-point:hover, .sf-point:focus-within, .sf-area:hover, .sf-area:focus-within, .sf-home-map__tile:hover, .sf-home-map__tile:focus-visible, .fx-depth > li:hover) .sg-h-drop   { animation-name:sg-drop;   animation-duration:.85s; animation-timing-function:var(--sg-spring); }
  :is(.sf-strategy-card:hover, .sf-strategy-card:focus-visible, .sf-topic-card:hover, .sf-topic-card:focus-visible, .sf-strategy-position:hover, .sf-point:hover, .sf-point:focus-within, .sf-area:hover, .sf-area:focus-within, .sf-home-map__tile:hover, .sf-home-map__tile:focus-visible, .fx-depth > li:hover) .sg-h-grow   { animation-name:sg-grow;   animation-duration:.9s;  animation-timing-function:var(--sg-spring); transform-origin:bottom; }
  :is(.sf-strategy-card:hover, .sf-strategy-card:focus-visible, .sf-topic-card:hover, .sf-topic-card:focus-visible, .sf-strategy-position:hover, .sf-point:hover, .sf-point:focus-within, .sf-area:hover, .sf-area:focus-within, .sf-home-map__tile:hover, .sf-home-map__tile:focus-visible, .fx-depth > li:hover) .sg-h-spread { animation-name:sg-spread; animation-duration:1.2s; animation-timing-function:var(--sg-sway); }
  :is(.sf-strategy-card:hover, .sf-strategy-card:focus-visible, .sf-topic-card:hover, .sf-topic-card:focus-visible, .sf-strategy-position:hover, .sf-point:hover, .sf-point:focus-within, .sf-area:hover, .sf-area:focus-within, .sf-home-map__tile:hover, .sf-home-map__tile:focus-visible, .fx-depth > li:hover) .sg-h-tilt   { animation-name:sg-tilt;   animation-duration:1.5s; animation-timing-function:var(--sg-sway); }
  :is(.sf-strategy-card:hover, .sf-strategy-card:focus-visible, .sf-topic-card:hover, .sf-topic-card:focus-visible, .sf-strategy-position:hover, .sf-point:hover, .sf-point:focus-within, .sf-area:hover, .sf-area:focus-within, .sf-home-map__tile:hover, .sf-home-map__tile:focus-visible, .fx-depth > li:hover) .sg-h-sweep  { animation-name:sg-sweep;  animation-duration:1.4s; animation-timing-function:var(--sg-sway); }
  :is(.sf-strategy-card:hover, .sf-strategy-card:focus-visible, .sf-topic-card:hover, .sf-topic-card:focus-visible, .sf-strategy-position:hover, .sf-point:hover, .sf-point:focus-within, .sf-area:hover, .sf-area:focus-within, .sf-home-map__tile:hover, .sf-home-map__tile:focus-visible, .fx-depth > li:hover) .sg-h-stamp  { animation-name:sg-stamp;  animation-duration:.8s;  animation-timing-function:var(--sg-sway); }
  :is(.sf-strategy-card:hover, .sf-strategy-card:focus-visible, .sf-topic-card:hover, .sf-topic-card:focus-visible, .sf-strategy-position:hover, .sf-point:hover, .sf-point:focus-within, .sf-area:hover, .sf-area:focus-within, .sf-home-map__tile:hover, .sf-home-map__tile:focus-visible, .fx-depth > li:hover) .sg-h-nudge  { animation-name:sg-nudge;  animation-duration:.8s;  animation-timing-function:var(--sg-sway); }
  :is(.sf-strategy-card:hover, .sf-strategy-card:focus-visible, .sf-topic-card:hover, .sf-topic-card:focus-visible, .sf-strategy-position:hover, .sf-point:hover, .sf-point:focus-within, .sf-area:hover, .sf-area:focus-within, .sf-home-map__tile:hover, .sf-home-map__tile:focus-visible, .fx-depth > li:hover) .sg-glow     { opacity:1; }
  .lead-content .sf-point:is(:hover, :focus-within) .sg-glow { opacity:.95; }
}

@keyframes sg-enter  { from { opacity:0; translate:0 14px; scale:.96; } to { opacity:1; translate:0 0; scale:1; } }
@keyframes sg-float  { 0%, 100% { translate:0 0; } 50% { translate:0 -3.2px; } }
@keyframes sg-twinkle { 0%, 100% { scale:.6; opacity:.35; rotate:0deg; } 50% { scale:1.1; opacity:1; rotate:45deg; } }
@keyframes sg-rock   { 0%, 100% { rotate:-1.6deg; } 50% { rotate:1.6deg; } }
@keyframes sg-needle { 0%, 100% { rotate:-6deg; } 50% { rotate:5deg; } }
@keyframes sg-breathe { 0%, 100% { opacity:.6; } 50% { opacity:.9; } }
@keyframes sg-flow   { to { stroke-dashoffset:-16; } }
@keyframes sg-beat   { 0%, 10%, 100% { scale:1; } 3% { scale:1.09; } }

@keyframes sg-pop    { from { scale:.55; opacity:0; } 30% { opacity:1; } to { scale:1; opacity:1; } }
@keyframes sg-rise   { from { translate:0 12px; opacity:.3; } to { translate:0 0; opacity:1; } }
@keyframes sg-bump   { 0%, 100% { translate:0 0; } 40% { translate:0 -7px; } 70% { translate:0 1px; } }
@keyframes sg-scan   { 0% { translate:0 0; } 30% { translate:var(--sx0) 4px; } 75% { translate:var(--sx1) 0; } 100% { translate:0 0; } }
@keyframes sg-gather { 0%, 100% { translate:0 0; } 45%, 60% { translate:var(--gx) var(--gy); } }
@keyframes sg-slide  { from { translate:var(--sx) 0; opacity:0; } to { translate:0 0; opacity:1; } }
@keyframes sg-drop   { from { translate:0 -18px; opacity:0; } to { translate:0 0; opacity:1; } }
@keyframes sg-grow   { from { scale:1 .1; } to { scale:1 1; } }
@keyframes sg-spread { 0%, 100% { translate:0 0; } 45% { translate:0 var(--sy); } }
@keyframes sg-tilt   { 0%, 100% { rotate:0deg; } 25% { rotate:-6deg; } 55% { rotate:4deg; } 80% { rotate:-1.5deg; } }
@keyframes sg-sweep  { 0% { rotate:0deg; } 35% { rotate:-70deg; } 75% { rotate:12deg; } 100% { rotate:0deg; } }
@keyframes sg-stamp  { 0%, 100% { scale:1; translate:0 0; } 35% { scale:1.08; translate:0 -6px; } 60% { scale:.94; translate:0 2px; } }
@keyframes sg-nudge  { 0%, 100% { translate:0 0; rotate:0deg; } 40% { translate:6px -3px; rotate:3deg; } }

@media (prefers-reduced-motion: reduce) {
  .sg-traveller { display:none; }
}
@media (prefers-reduced-transparency: reduce) {
  .sg-glow { display:none; }
}
@media (forced-colors: active) {
  .sg-illus { display:none; }
}
@media print {
  .sg-traveller, .sg-glow { display:none; }
}
