/* ==========================================================================
   logo.css — animation for the Samin "S" monogram (see js/logo.js).
   Everything animates with transform / opacity / dashoffset only.
   Resting state (no animation) is the fully drawn logo, so reduced-motion
   users simply see the finished mark.
   ========================================================================== */
.sl{display:block;width:100%;height:100%;overflow:visible}
.sl *{transform-box:view-box}

/* --- Entrance: lines draw in diagonally, left → right --- */
.sl-lines line{stroke-dasharray:1;animation:sl-draw 1.1s cubic-bezier(.2,.7,.2,1) both,sl-wave 3.6s ease-in-out infinite;animation-delay:calc(var(--i) * 26ms + 150ms),calc(var(--i) * -140ms)}
@keyframes sl-draw{from{stroke-dashoffset:1;opacity:0}30%{opacity:1}to{stroke-dashoffset:0}}

/* --- Ambient halo behind the S --- */
.sl-halo{transform-origin:120px 120px;animation:sl-halo-in 1.6s ease-out both,sl-breathe 8s ease-in-out 1.6s infinite alternate}
@keyframes sl-halo-in{from{opacity:0;transform:scale(.7)}}
@keyframes sl-breathe{from{opacity:.75;transform:scale(.97)}to{opacity:1;transform:scale(1.05)}}

/* --- Orbit rings: fade in, then drift slowly (different speeds + directions) --- */
.sl-in-ring{transform-origin:120px 120px;animation:sl-ring-in 1.4s ease-out .6s both}
@keyframes sl-ring-in{from{opacity:0;transform:scale(.86)}}
.sl-spin{transform-origin:120px 120px}
.sl-a{animation:sl-rot 18s linear infinite}
.sl-b{animation:sl-rot 30s linear infinite reverse}
.sl-c{animation:sl-rot 70s linear infinite}
@keyframes sl-rot{to{transform:rotate(360deg)}}

/* --- Light that travels along the S, plus a soft scan across the lines --- */
.sl-in-trace{animation:sl-fade 1s ease-out 1.2s both}
@keyframes sl-fade{from{opacity:0}}
.sl-trace,.sl-trace-glow{animation:sl-run 4.5s linear 1.2s infinite}
.sl-trace-glow{opacity:.8}
@keyframes sl-run{from{stroke-dashoffset:0}to{stroke-dashoffset:-100}}
.sl-sweep{animation:sl-sweep 5s ease-in-out 1.2s infinite;transform:translateX(-120px)}
.sl-mini .sl-sweep{animation-delay:.9s}
@keyframes sl-sweep{0%{transform:translateX(-120px)}70%,100%{transform:translateX(340px)}}

/* --- Flowing light: a bright pulse streams down every stripe, phase-shifted so it ripples across the S --- */
.sl-flow{animation:sl-fade 1s ease-out 1s both}
.sl-flow line{stroke-dasharray:.16 .84;animation:sl-flow 3.4s linear infinite,sl-wave 3.6s ease-in-out infinite;animation-delay:calc(var(--i) * -110ms),calc(var(--i) * -140ms)}
@keyframes sl-wave{0%,100%{transform:translateX(-2.2px)}50%{transform:translateX(2.2px)}}
@keyframes sl-flow{from{stroke-dashoffset:0}to{stroke-dashoffset:-1}}
.sl-mini .sl-flow line{animation-duration:2.8s}

/* --- Whole monogram gently floats and breathes --- */
.sl-float{transform-origin:120px 120px;animation:sl-float 5s ease-in-out infinite alternate}
@keyframes sl-float{from{transform:translateY(3px) scale(.985)}to{transform:translateY(-3px) scale(1.02)}}

/* --- Dust: slow fades (never a rapid blink) --- */
.sl-dust circle{opacity:.5;animation:sl-twinkle 4.5s ease-in-out infinite}
@keyframes sl-twinkle{0%,100%{opacity:.12}50%{opacity:.8}}

.sl-full{will-change:transform}
/* parallax depth (values set by logo.js): S in front, rings & dust behind, halo furthest */
.sl-full .sl-float{translate:calc(var(--px,0) * 1px) calc(var(--py,0) * 1px)}
.sl-full .sl-in-ring{translate:calc(var(--px,0) * -.6px) calc(var(--py,0) * -.6px)}
.sl-full .sl-dust{translate:calc(var(--px,0) * -1.4px) calc(var(--py,0) * -1.4px)}
.sl-full .sl-halo{translate:calc(var(--px,0) * 1.8px) calc(var(--py,0) * 1.8px)}

.sl.is-paused *{animation-play-state:paused!important}

@media (prefers-reduced-motion:reduce){
  .sl *{animation:none!important;translate:none!important}
  .sl{transform:none!important}
  .sl-sweep,.sl-in-trace,.sl-flow{display:none}
  .sl-dust circle{opacity:.45}
}
