.sf-live {
  position: relative;
}

.sf-live > svg {
  transform: perspective(700px) rotateY(var(--sf-ry, 0deg)) rotateX(var(--sf-rx, 0deg));
  transition: transform 0.15s ease-out;
  will-change: transform;
}

.sf-live:hover .sf-logo-core-group { animation-duration: 2.4s; }
.sf-live:hover .sf-logo-branch { animation-duration: 0.9s; }
.sf-live:hover .sf-logo-sheen { animation-duration: 0.7s; }
.sf-live:hover .sf-logo-flare { animation-duration: 2.2s; }
.sf-live:hover .sf-logo-orbit { animation-duration: 2.4s; }
.sf-live:hover .sf-logo-ring-outer { animation-duration: 14s; opacity: 0.85; }
.sf-live:hover .sf-logo-heat-bleed { opacity: 1 !important; filter: brightness(1.2); }
.sf-live .sf-logo-heat-bleed { transition: opacity 0.6s ease; }

.sf-shock {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 6%;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  border: 2px solid rgba(255, 178, 71, 0.85);
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 6;
  animation: sfShockRel 0.9s ease-out forwards;
}

@keyframes sfShockRel {
  0% { width: 6%; opacity: 0.9; border-color: rgba(255, 215, 158, 0.95); }
  100% { width: 240%; opacity: 0; border-color: rgba(35, 215, 255, 0.15); }
}

.sf-mini {
  position: relative;
  display: inline-block;
  flex-shrink: 0;
  width: var(--sf-mini-size, 36px);
  height: var(--sf-mini-size, 36px);
  vertical-align: middle;
  filter: drop-shadow(0 0 6px rgba(0, 217, 255, 0.4)) drop-shadow(0 0 10px rgba(255, 107, 53, 0.25));
  transition: filter 0.3s ease;
}

.sf-mini:hover {
  filter: drop-shadow(0 0 12px rgba(0, 217, 255, 0.65)) drop-shadow(0 0 18px rgba(255, 107, 53, 0.45));
}

.sf-mini svg { display: block; width: 100%; height: 100%; overflow: visible; }

.sf-mini .sf-logo-ring-outer { transform-origin: 200px 200px; animation: sfLogoSpin 22s linear infinite; opacity: 0.55; }
.sf-mini .sf-logo-ring-inner { transform-origin: 200px 200px; animation: sfLogoSpin 15s linear infinite reverse; opacity: 0.35; }
.sf-mini .sf-logo-orbit { transform-origin: 200px 200px; animation: sfLogoSpin 4s linear infinite; }
.sf-mini .sf-logo-core-group { transform-origin: 200px 200px; animation: sfLogoBreathe 6s ease-in-out infinite; }
.sf-mini .sf-logo-branch { stroke-dasharray: 14 10; animation: sfLogoFlow 2s linear infinite; }
.sf-mini .sf-logo-sheen { stroke-dasharray: 20 60; animation: sfLogoFlowSheen 1.6s linear infinite; mix-blend-mode: screen; }
.sf-mini .sf-logo-branch path:nth-child(2), .sf-mini .sf-logo-sheen path:nth-child(2) { animation-delay: 0.15s; }
.sf-mini .sf-logo-branch path:nth-child(3), .sf-mini .sf-logo-sheen path:nth-child(3) { animation-delay: 0.3s; }
.sf-mini .sf-logo-branch path:nth-child(4), .sf-mini .sf-logo-sheen path:nth-child(4) { animation-delay: 0.45s; }
.sf-mini .sf-logo-branch path:nth-child(5), .sf-mini .sf-logo-sheen path:nth-child(5) { animation-delay: 0.6s; }
.sf-mini .sf-logo-branch path:nth-child(6), .sf-mini .sf-logo-sheen path:nth-child(6) { animation-delay: 0.75s; }

.sf-mini .sf-logo-flare {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 24%;
  height: 24%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  mix-blend-mode: screen;
  background: conic-gradient(from 0deg, transparent 0%, #FFD79A 8%, transparent 20%, transparent 55%, #FFD79A 63%, transparent 75%);
  animation: sfLogoSpin 5.5s linear infinite;
  pointer-events: none;
  z-index: 3;
  filter: blur(1px);
}

.sf-mini .sf-logo-ember {
  position: absolute;
  bottom: 46%;
  left: 50%;
  width: 2px;
  height: 2px;
  border-radius: 50%;
  background: radial-gradient(circle, #FFFFFF 0%, #FFE3B0 30%, #FF7A18 80%, transparent 100%);
  box-shadow: 0 0 4px 1px rgba(255, 122, 24, 0.4);
  opacity: 0;
  animation: sfMiniRise 3.4s ease-in infinite;
  pointer-events: none;
  z-index: 4;
}

.sf-mini .sf-logo-ember-cyan {
  background: radial-gradient(circle, #FFFFFF 0%, #DFFBFF 30%, #23D7FF 80%, transparent 100%);
  box-shadow: 0 0 4px 1px rgba(35, 215, 255, 0.4);
}

.sf-mini .sf-logo-ember-1 { left: 49%; --sf-dx: 6px; animation-delay: 0s; }
.sf-mini .sf-logo-ember-2 { left: 46%; --sf-dx: -9px; animation-delay: 0.3s; }
.sf-mini .sf-logo-ember-3 { left: 53%; --sf-dx: 4px; animation-delay: 0.8s; }
.sf-mini .sf-logo-ember-4 { left: 48%; --sf-dx: -3px; animation-delay: 1.2s; }
.sf-mini .sf-logo-ember-5 { left: 51%; --sf-dx: 8px; animation-delay: 1.6s; }

@keyframes sfLogoSpin { to { transform: rotate(360deg); } }
@keyframes sfLogoBreathe {
  0%, 100% { transform: scale(1); filter: brightness(1); }
  50% { transform: scale(1.04); filter: brightness(1.18); }
}
@keyframes sfLogoFlow { to { stroke-dashoffset: -48; } }
@keyframes sfLogoFlowSheen { to { stroke-dashoffset: -80; } }
@keyframes sfMiniRise {
  0% { opacity: 0; transform: translate(0, 0) scale(0.3); }
  15% { opacity: 0.95; }
  80% { opacity: 0.4; }
  100% { opacity: 0; transform: translate(var(--sf-dx, 4px), -30px) scale(1.3); }
}

html.sf-cascade-on body {
  background: transparent;
}

.sf-cascade {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.8s ease;
}

.sf-cascade.is-full { opacity: 0.9; }

.sf-cascade.is-quiet {
  opacity: 0.6;
  z-index: -1;
}

.welcome-logo .sf-shock { animation-name: sfShockHero; }

@keyframes sfShockHero {
  0% { width: 6%; opacity: 0.9; border-color: rgba(255, 215, 158, 0.95); }
  100% { width: 310%; opacity: 0; border-color: rgba(35, 215, 255, 0.15); }
}

.welcome-logo .sf-logo-ember-6 { left: 44%; --sf-dx: -15px; animation-delay: 2.1s; width: 3px; height: 3px; }
.welcome-logo .sf-logo-ember-7 { left: 55%; --sf-dx: 18px; animation-delay: 2.7s; }
.welcome-logo .sf-logo-ember-8 { left: 50%; --sf-dx: -28px; animation-delay: 1.9s; width: 5px; height: 5px; }

html[data-sf-fx="reduced"] .sf-logo-flare,
html[data-sf-fx="reduced"] .sf-logo-ember,
html[data-sf-fx="reduced"] .sf-logo-sheen,
html[data-sf-fx="off"] .sf-logo-flare,
html[data-sf-fx="off"] .sf-logo-ember,
html[data-sf-fx="off"] .sf-logo-sheen,
html[data-sf-fx="reduced"] .sf-cascade,
html[data-sf-fx="off"] .sf-cascade,
html[data-sf-fx="reduced"] .syn-trail,
html[data-sf-fx="off"] .syn-trail { display: none !important; }

html[data-sf-fx="reduced"] .header-logo,
html[data-sf-fx="reduced"] .welcome-logo,
html[data-sf-fx="reduced"] .preview-idle-logo,
html[data-sf-fx="reduced"] .preview-loading-logo,
html[data-sf-fx="reduced"] .sf-header-logo,
html[data-sf-fx="reduced"] .sf-mini,
html[data-sf-fx="off"] .header-logo,
html[data-sf-fx="off"] .welcome-logo,
html[data-sf-fx="off"] .preview-idle-logo,
html[data-sf-fx="off"] .preview-loading-logo,
html[data-sf-fx="off"] .sf-header-logo,
html[data-sf-fx="off"] .sf-mini { filter: none !important; }

html[data-sf-fx="reduced"] .sf-live svg *,
html[data-sf-fx="off"] .sf-live svg *,
html[data-sf-fx="reduced"] .sf-mini svg *,
html[data-sf-fx="off"] .sf-mini svg * { filter: none !important; }

html[data-sf-fx="reduced"] .sf-live > svg,
html[data-sf-fx="off"] .sf-live > svg { will-change: auto; transition: none; }

html[data-sf-fx="reduced"] body::before,
html[data-sf-fx="reduced"] body::after,
html[data-sf-fx="off"] body::before,
html[data-sf-fx="off"] body::after { animation: none !important; }

html[data-sf-fx="off"] .sf-live,
html[data-sf-fx="off"] .sf-live *,
html[data-sf-fx="off"] .sf-mini,
html[data-sf-fx="off"] .sf-mini *,
html[data-sf-fx="off"] .hero-wordmark,
html[data-sf-fx="off"] .preview-idle-logo { animation: none !important; }
